static.c
2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*---------------------------------------------------------------------*
Copyright (C) 1997 Nintendo.
$RCSfile: static.c,v $
$Revision: 1.1.1.1 $
$Date: 2002/05/02 03:27:12 $
*---------------------------------------------------------------------*/
#include "headers.h"
/*****************************************************************
* RSP initialize *
* Remember,viewport structures have 2 bits of fraction in them. *
*****************************************************************/
static Vp vp = {
SCREEN_WD*2, SCREEN_HT*2, G_MAXZ/2, 0, /* scale */
SCREEN_WD*2, SCREEN_HT*2, G_MAXZ/2, 0, /* translate */
};
Gfx rspinit_dl[] = {
gsSPViewport(&vp),
gsSPClearGeometryMode(0xffffffff),
gsSPSetGeometryMode(G_SHADE | G_SHADING_SMOOTH),
gsSPEndDisplayList()
};
/******************
* RDP initialize *
******************/
Gfx rdpinit_dl[] = {
gsDPPipeSync(),
gsDPSetScissor(G_SC_NON_INTERLACE, 0, 0, SCREEN_WD, SCREEN_HT),
gsDPPipelineMode(G_PM_1PRIMITIVE),
gsDPSetEnvColor(0,0,0,0),
gsDPSetPrimColor(0,0,0,0,0,0),
gsDPSetBlendColor(0,0,0,0),
gsDPSetFogColor(0,0,0,0),
gsDPSetFillColor(0),
gsDPSetPrimDepth(0,0),
gsDPSetConvert(0,0,0,0,0,0),
gsDPSetKeyR(0,0,0),
gsDPSetKeyGB(0,0,0,0,0,0),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
gsDPSetCycleType(G_CYC_COPY),
gsDPSetTextureLOD(G_TL_TILE),
gsDPSetTextureLUT(G_TT_NONE),
gsDPSetTextureDetail(G_TD_CLAMP),
gsDPSetTexturePersp(G_TP_PERSP),
gsDPSetTextureFilter(G_TF_BILERP),
gsDPSetTextureConvert(G_TC_FILT),
gsDPSetCombineKey(G_CK_NONE),
gsDPSetAlphaCompare(G_AC_NONE),
gsDPSetRenderMode(G_RM_OPA_SURF, G_RM_OPA_SURF2),
gsDPSetBlendMask(0xff),
gsDPSetColorDither(G_CD_DISABLE),
gsDPPipeSync(),
gsSPEndDisplayList(),
};
Gfx sprite_dl[]={
gsDPPipeSync(),
gsDPSetCycleType(G_CYC_COPY),
gsDPSetTexturePersp(G_TP_NONE),
gsDPSetTextureLUT(G_TT_NONE),
gsDPSetTextureLOD(G_TL_LOD),
gsDPSetAlphaCompare(G_AC_THRESHOLD),
gsDPSetRenderMode(G_RM_AA_TEX_EDGE,G_RM_AA_TEX_EDGE2),
gsDPSetCombineMode(G_CC_DECALRGBA,G_CC_DECALRGBA),
gsSPEndDisplayList()
};