6 #define CHANGED_RENDERMODE 0x0001
7 #define CHANGED_CYCLETYPE 0x0002
8 #define CHANGED_SCISSOR 0x0004
9 #define CHANGED_TMEM 0x0008
10 #define CHANGED_TILE 0x0010
11 #define CHANGED_COMBINE_COLORS 0x0020
12 #define CHANGED_COMBINE 0x0040
13 #define CHANGED_ALPHACOMPARE 0x0080
14 #define CHANGED_FOGCOLOR 0x0100
15 #define CHANGED_DEPTHSOURCE 0x0200
16 #define CHANGED_PRIMITIVEZ 0x0400
17 #define CHANGED_ENV_COLOR 0x0800
18 #define CHANGED_PRIM_COLOR 0x1000
19 #define CHANGED_BLENDCOLOR 0x2000
20 #define CHANGED_CONVERT 0x4000
22 #define TEXTUREMODE_NORMAL 0
23 #define TEXTUREMODE_TEXRECT 1
24 #define TEXTUREMODE_BGIMAGE 2
25 #define TEXTUREMODE_FRAMEBUFFER 3
27 #define LOADTYPE_BLOCK 0
28 #define LOADTYPE_TILE 1
68 u32 format, size, line, tmem, palette;
89 //FrameBuffer *frameBuffer;
92 f32 fuls, fult, flrs, flrt;
93 u32 uls, ult, lrs, lrt;
104 unsigned int alphaCompare : 2;
105 unsigned int depthSource : 1;
109 unsigned int AAEnable : 1;
110 unsigned int depthCompare : 1;
111 unsigned int depthUpdate : 1;
112 unsigned int imageRead : 1;
113 unsigned int clearOnCvg : 1;
115 unsigned int cvgDest : 2;
116 unsigned int depthMode : 2;
118 unsigned int cvgXAlpha : 1;
119 unsigned int alphaCvgSel : 1;
120 unsigned int forceBlender : 1;
121 unsigned int textureEdge : 1;
126 unsigned int c2_m2b : 2;
127 unsigned int c1_m2b : 2;
128 unsigned int c2_m2a : 2;
129 unsigned int c1_m2a : 2;
130 unsigned int c2_m1b : 2;
131 unsigned int c1_m1b : 2;
132 unsigned int c2_m1a : 2;
133 unsigned int c1_m1a : 2;
136 unsigned int blendMask : 4;
137 unsigned int alphaDither : 2;
138 unsigned int colorDither : 2;
140 unsigned int combineKey : 1;
141 unsigned int textureConvert : 3;
142 unsigned int textureFilter : 2;
143 unsigned int textureLUT : 2;
145 unsigned int textureLOD : 1;
146 unsigned int textureDetail : 2;
147 unsigned int texturePersp : 1;
148 unsigned int cycleType : 2;
149 unsigned int unusedColorDither : 1; // unsupported
150 unsigned int pipelineMode : 1;
152 unsigned int pad : 8;
167 gDPTile tiles[8], *loadTile;
172 } fogColor, blendColor, envColor;
194 u32 format, size, width, bpl;
200 u32 format, size, width, height, bpl;
201 u32 address, changed;
205 u32 depthImageAddress;
210 f32 ulx, uly, lrx, lry;
215 f32 k0, k1, k2, k3, k4, k5;
223 } center, scale, width;
234 u32 paletteCRC16[16];
243 void gDPSetOtherMode( u32 mode0, u32 mode1 );
244 void gDPSetPrimDepth( u16 z, u16 dz );
245 void gDPPipelineMode( u32 mode );
246 void gDPSetCycleType( u32 type );
247 void gDPSetTexturePersp( u32 enable );
248 void gDPSetTextureDetail( u32 type );
249 void gDPSetTextureLOD( u32 mode );
250 void gDPSetTextureLUT( u32 mode );
251 void gDPSetTextureFilter( u32 type );
252 void gDPSetTextureConvert( u32 type );
253 void gDPSetCombineKey( u32 type );
254 void gDPSetColorDither( u32 type );
255 void gDPSetAlphaDither( u32 type );
256 void gDPSetAlphaCompare( u32 mode );
257 void gDPSetDepthSource( u32 source );
258 void gDPSetRenderMode( u32 mode1, u32 mode2 );
259 void gDPSetCombine( s32 muxs0, s32 muxs1 );
260 void gDPSetColorImage( u32 format, u32 size, u32 width, u32 address );
261 void gDPSetTextureImage( u32 format, u32 size, u32 width, u32 address );
262 void gDPSetDepthImage( u32 address );
263 void gDPSetEnvColor( u32 r, u32 g, u32 b, u32 a );
264 void gDPSetBlendColor( u32 r, u32 g, u32 b, u32 a );
265 void gDPSetFogColor( u32 r, u32 g, u32 b, u32 a );
266 void gDPSetFillColor( u32 c );
267 void gDPSetPrimColor( u32 m, u32 l, u32 r, u32 g, u32 b, u32 a );
268 void gDPSetTile(u32 format, const u32 size, const u32 line, const u32 tmem, u32 tile,
269 const u32 palette, const u32 cmt, const u32 cms, const u32 maskt, const u32 masks,
270 const u32 shiftt, const u32 shifts );
271 void gDPSetTileSize( u32 tile, u32 uls, u32 ult, u32 lrs, u32 lrt );
272 void gDPLoadTile( u32 tile, u32 uls, u32 ult, u32 lrs, u32 lrt );
273 void gDPLoadBlock( u32 tile, u32 uls, u32 ult, u32 lrs, u32 dxt );
274 void gDPLoadTLUT( u32 tile, u32 uls, u32 ult, u32 lrs, u32 lrt );
275 void gDPSetScissor( u32 mode, f32 ulx, f32 uly, f32 lrx, f32 lry );
276 void gDPFillRectangle( s32 ulx, s32 uly, s32 lrx, s32 lry );
277 void gDPSetConvert( s32 k0, s32 k1, s32 k2, s32 k3, s32 k4, s32 k5 );
278 void gDPSetKeyR( u32 cR, u32 sR, u32 wR );
279 void gDPSetKeyGB(u32 cG, u32 sG, u32 wG, u32 cB, u32 sB, u32 wB );
280 void gDPTextureRectangle( f32 ulx, f32 uly, f32 lrx, f32 lry, s32 tile, f32 s, f32 t, f32 dsdx, f32 dtdy );
281 void gDPTextureRectangleFlip( f32 ulx, f32 uly, f32 lrx, f32 lry, s32 tile, f32 s, f32 t, f32 dsdx, f32 dtdy );