82 gsSPTexture(0x8000, 0x8000, 0, G_TX_RENDERTILE, G_OFF),
84 gsDPSetCycleType(G_CYC_1CYCLE),
85 gsDPSetDepthSource(G_ZS_PRIM),
86 gsDPSetPrimDepth(0, 0),
87 gsDPSetRenderMode(Z_UPD | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | GBL_c1(G_BL_CLR_MEM, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA), Z_UPD | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | GBL_c2(G_BL_CLR_MEM, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)),
89 gsDPSetTexturePersp(G_TP_PERSP),
90 gsDPSetTextureDetail(G_TD_CLAMP),
91 gsDPSetTextureLOD(G_TL_TILE),
92 gsDPSetTextureLUT(G_TT_NONE),
93 gsDPSetTextureFilter(G_TF_BILERP),
94 gsDPSetTextureConvert(G_TC_FILT),
95 gsSPClearGeometryMode(G_CULL_BOTH | G_LIGHTING | G_SHADING_SMOOTH),
96 gsSPSetGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BACK),
97 gsSPVertex(&vtx_stencil1, 10, 0),
98 gsSP2Triangles(0, 1, 2, 0, 3, 0, 2, 0),
99 gsSP2Triangles(0, 4, 1, 0, 3, 5, 0, 0),
100 gsSP2Triangles(1, 6, 2, 0, 7, 3, 2, 0),
101 gsSP2Triangles(8, 7, 2, 0, 7, 9, 3, 0),
103 gsDPSetDepthSource(G_ZS_PIXEL),
131 gsDPSetDepthSource(G_ZS_PRIM),
132 gsDPSetPrimDepth(20, 0),
133 gsDPSetRenderMode(Z_CMP | CVG_DST_FULL | ZMODE_OPA | ALPHA_CVG_SEL | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM), Z_CMP | CVG_DST_FULL | ZMODE_OPA | ALPHA_CVG_SEL | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM)),
134 gsSPClearGeometryMode(G_CULL_BOTH | G_LIGHTING),
135 gsSPClearGeometryMode(G_SHADING_SMOOTH),
136 gsSPTexture(0x8000, 0x8000, 0, G_TX_RENDERTILE, G_ON),
138 gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
139 gsDPSetTexturePersp(G_TP_PERSP),
140 gsDPSetTextureDetail(G_TD_CLAMP),
141 gsDPSetTextureLOD(G_TL_TILE),
142 gsDPSetTextureLUT(G_TT_NONE),
143 gsDPSetTextureFilter(G_TF_BILERP),
144 gsDPSetTextureConvert(G_TC_FILT),
145 gsSPVertex(&vtx_stencil2, 24, 0),
146 gsDPLoadTextureTile(&
D_80156910, G_IM_FMT_RGBA, G_IM_SIZ_16b, 160, 0, 0, 0, 159, 11, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 8, 4, G_TX_NOLOD, G_TX_NOLOD),
147 gsSP2Triangles(0, 2, 1, 0, 3, 1, 2, 0),
148 gsDPLoadTextureTile(&
D_80156910, G_IM_FMT_RGBA, G_IM_SIZ_16b, 160, 0, 0, 11, 159, 22, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 8, 4, G_TX_NOLOD, G_TX_NOLOD),
149 gsSP2Triangles(2, 4, 3, 0, 5, 3, 4, 0),
150 gsDPLoadTextureTile(&
D_80156910, G_IM_FMT_RGBA, G_IM_SIZ_16b, 160, 0, 0, 22, 159, 33, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 8, 4, G_TX_NOLOD, G_TX_NOLOD),
151 gsSP2Triangles(4, 6, 5, 0, 7, 5, 6, 0),
152 gsDPLoadTextureTile(&
D_80156910, G_IM_FMT_RGBA, G_IM_SIZ_16b, 160, 0, 0, 33, 159, 44, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 8, 4, G_TX_NOLOD, G_TX_NOLOD),
153 gsSP2Triangles(6, 8, 7, 0, 9, 7, 8, 0),
154 gsDPLoadTextureTile(&
D_80156910, G_IM_FMT_RGBA, G_IM_SIZ_16b, 160, 0, 0, 44, 159, 55, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 8, 4, G_TX_NOLOD, G_TX_NOLOD),
155 gsSP2Triangles(8, 10, 9, 0, 11, 9, 10, 0),
156 gsDPLoadTextureTile(&
D_80156910, G_IM_FMT_RGBA, G_IM_SIZ_16b, 160, 0, 0, 55, 159, 66, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 8, 4, G_TX_NOLOD, G_TX_NOLOD),
157 gsSP2Triangles(10, 12, 11, 0, 13, 11, 12, 0),
158 gsDPLoadTextureTile(&
D_80156910, G_IM_FMT_RGBA, G_IM_SIZ_16b, 160, 0, 0, 66, 159, 77, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 8, 4, G_TX_NOLOD, G_TX_NOLOD),
159 gsSP2Triangles(12, 14, 13, 0, 15, 13, 14, 0),
160 gsDPLoadTextureTile(&
D_80156910, G_IM_FMT_RGBA, G_IM_SIZ_16b, 160, 0, 0, 77, 159, 88, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 8, 4, G_TX_NOLOD, G_TX_NOLOD),
161 gsSP2Triangles(14, 16, 15, 0, 17, 15, 16, 0),
162 gsDPLoadTextureTile(&
D_80156910, G_IM_FMT_RGBA, G_IM_SIZ_16b, 160, 0, 0, 88, 159, 99, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 8, 4, G_TX_NOLOD, G_TX_NOLOD),
163 gsSP2Triangles(16, 18, 17, 0, 19, 17, 18, 0),
164 gsDPLoadTextureTile(&
D_80156910, G_IM_FMT_RGBA, G_IM_SIZ_16b, 160, 0, 0, 99, 159, 110, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 8, 4, G_TX_NOLOD, G_TX_NOLOD),
165 gsSP2Triangles(18, 20, 19, 0, 21, 19, 20, 0),
166 gsDPLoadTextureTile(&
D_80156910, G_IM_FMT_RGBA, G_IM_SIZ_16b, 160, 0, 0, 110, 159, 119, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 8, 4, G_TX_NOLOD, G_TX_NOLOD),
167 gsSP2Triangles(20, 22, 21, 0, 23, 21, 22, 0),
169 gsDPSetDepthSource(G_ZS_PIXEL)
181 if (progress == 0.0f) {
185 if (overlay != NULL) {
193 alpha = overlay->
alpha;
195 colR = colG = colB = 0;
196 x1 = y1 = x2 = y2 = 0;
200 switch (stencilType) {
206 if (progress == 255.0f) {
207 gDPSetRenderMode(
gMainGfxPos++, CVG_DST_SAVE | G_RM_OPA_SURF, CVG_DST_SAVE | G_RM_OPA_SURF2);
209 gDPSetRenderMode(
gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
211 gDPSetCombineMode(
gMainGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
212 gDPSetPrimColor(
gMainGfxPos++, 0, 0, colR, colG, colB, progress);
222 if (progress == 255.0f) {
223 gDPSetRenderMode(
gMainGfxPos++, CVG_DST_SAVE | G_RM_OPA_SURF, CVG_DST_SAVE | G_RM_OPA_SURF2);
225 gDPSetRenderMode(
gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
227 gDPSetCombineMode(
gMainGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
228 gDPSetPrimColor(
gMainGfxPos++, 0, 0, colR, colG, colB, progress);
236 guOrtho(&matrixStack[
gMatrixListPos], 0.0f, 320.0f, 0.0f, 240.0f, -1000.0f, 1000.0f, 1.0f);
239 switch (stencilType) {
268 guScale(&matrixStack[
gMatrixListPos], (1.0f - s0 / 255.0f) * 0.8, (1.0f - s0 / 255.0f) * 0.8, 1.0f);
270 guRotate(&matrixStack[
gMatrixListPos], s0 * 0.5f, 0.0f, 0.0f, 1.0f);
277 guScale(&matrixStack[
gMatrixListPos], (1.0f - s0 / 255.0f) * 0.8, (1.0f - s0 / 255.0f) * 0.8, 1.0f);
279 guRotate(&matrixStack[
gMatrixListPos], s0 * 0.5f, 0.0f, 0.0f, 1.0f);
294 guScale(&matrixStack[
gMatrixListPos], (1.0f - s0 / 255.0f) * 0.8, (1.0f - s0 / 255.0f) * 0.8, 1.0f);
303 guScale(&matrixStack[
gMatrixListPos], (1.0f - s0 / 255.0f) * 0.8, (1.0f - s0 / 255.0f) * 0.8, 1.0f);
312 gDPSetPrimColor(
gMainGfxPos++, 0, 0, 0, 0, 0, alpha);
321 guScale(&matrixStack[
gMatrixListPos], (1.0f - s0 / 255.0f) * 0.8, (1.0f - s0 / 255.0f) * 0.8, 1.0f);
323 guRotate(&matrixStack[
gMatrixListPos], (f32)(-s0) * 0.5, 0.0f, 0.0f, 1.0f);
330 gDPSetPrimColor(
gMainGfxPos++, 0, 0, 0, 0, 0, alpha);
334 if (progress > 170) {