16 {{{ -16,-16, 0 }, 0, { 0x0000, 0x0000 }, { 0, 0, 0, 255 }}},
17 {{{ 16,-16, 0 }, 0, { 0x1000, 0x0000 }, { 0, 0, 0, 255 }}},
18 {{{ 16, 16, 0 }, 0, { 0x1000, 0x1000 }, { 0, 0, 0, 255 }}},
19 {{{ -16, 16, 0 }, 0, { 0x0000, 0x1000 }, { 0, 0, 0, 255 }}},
32 u16* prevGfxCfb = NULL;
36 x2 = x2 - (x2 % 4) + 4;
38 stripY = (y2 - y1) / 6;
39 extraY = (y2 - y1) % 6;
42 for (i = 0; i < nuGfxCfbNum; i++) {
44 prevGfxCfb =
nuGfxCfb[(i + nuGfxCfbNum - 1) % nuGfxCfbNum];
50 gDPSetRenderMode(
gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
55 gSPTexture(
gMainGfxPos++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
59 gDPSetPrimColor(
gMainGfxPos++, 0, 0, 255, 255, 255, alpha);
61 for (i = 0; i < stripY; i++) {
62 gDPLoadTextureTile(
gMainGfxPos++, osVirtualToPhysical(prevGfxCfb), G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, 6,
63 x1, y1 + i * 6, x2 - 1, y1 + i * 6 + 5, 0,
64 G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
65 gSPTextureRectangle(
gMainGfxPos++, x1 * 4, (y1 + i * 6) * 4, x2 * 4, (y1 + i * 6 + 6) * 4,
66 G_TX_RENDERTILE, x1 * 32, (y1 + i * 6) * 32, 1024, 1024);
70 gDPLoadTextureTile(
gMainGfxPos++, osVirtualToPhysical(prevGfxCfb), G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, extraY,
71 x1, y1 + i * 6, x2 - 1, y1 + i * 6 + extraY - 1, 0,
72 G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
73 gSPTextureRectangle(
gMainGfxPos++, x1 * 4, (y1 + i * 6) * 4, x2 * 4, (y1 + i * 6 + extraY) * 4,
74 G_TX_RENDERTILE, x1 * 32, (y1 + i * 6) * 32, 1024, 1024);
139 texScale = (255.0f - alpha) * 10.0f / 255.0f + 0.14;
142 texScale = (255.0f - alpha) * 9.5f / 255.0f + texScale;
143 posX += (camera->
viewportW / 2 - posX) * (255.0f - alpha) / 255.0f;
144 posY += (camera->
viewportH / 2 - posY) * (255.0f - alpha) / 255.0f;
153 gDPSetScissor(
gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, 64, 64);
163 for (i = 0; i < 2; i++) {
178 gDPSetPrimColor(
gMainGfxPos++, 0, 0, 255, 255, 255, s0);
190 gDPSetScissor(
gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, 64, 64);
193 for (i = 0; i < 4; i++) {
194 gDPLoadTextureTile(
gMainGfxPos++, osVirtualToPhysical(&
nuGfxZBuffer[i * 2048]), G_IM_FMT_RGBA, G_IM_SIZ_32b, 64, 16, 0, 0, 63, 15, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
196 gSPTextureRectangle(
gMainGfxPos++, 0, (i * 16) * 4, 64 * 4, (i * 16 + 16) * 4, G_TX_RENDERTILE, 0, 0, 0x400, 0x400);
200 gDPLoadTextureTile(
gMainGfxPos++, osVirtualToPhysical(
nuGfxZBuffer), G_IM_FMT_I, G_IM_SIZ_8b, 64, 64, 0, 0, 63, 63,
201 0, G_TX_MIRROR | G_TX_CLAMP, G_TX_MIRROR | G_TX_CLAMP, 6, 6, 15, 15);
202 gDPSetTileSize(
gMainGfxPos++, G_TX_RENDERTILE, 0, 0, 0x01FC, 0x01FC);
206 gDPSetRenderMode(
gMainGfxPos++, G_RM_NOOP, G_RM_NOOP2);
208 gDPSetFillColor(
gMainGfxPos++, GPACK_ZDZ(G_MAXFBZ, 0)<<16 | GPACK_ZDZ(G_MAXFBZ, 0));
218 gDPSetRenderMode(
gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
220 if (alpha != 255.0f || isWorld == 1) {
226 gDPSetPrimColor(
gMainGfxPos++, 0, 0, 0, 0, 0, alpha * 0.5f * progress / 255.0f);
227 gDPSetEnvColor(
gMainGfxPos++, 255, 255, 255, (255.0f - alpha * 0.5f) * progress / 255.0f);
234 (12 - posX) * 32.0f / texScale + 16.0f + 1024.0f, (19 - posY) * 32.0f / texScale + 16.0f + 1024.0f,
235 1024.0f / texScale, 1024.0f / texScale);
241 (9 - posX) * 32.0f / texScale + 1024.0f, (32 - posY) * 32.0f / texScale + 1024.0f,
242 1024.0f / texScale, 1024.0f / texScale);
247 s32 x1, y1, x2, y2, t5, t6;
266 if (progress == 0.0f) {
270 gDPSetScissor(
gMainGfxPos++, G_SC_NON_INTERLACE, x1, y1, x2, y2);
271 if (progress == 255.0f) {
274 gDPSetPrimColor(
gMainGfxPos++, 0, 0, primR, primG, primB, primA);
275 texScale = (255.0f - progress) * 10.5f / 255.0f + 0.09;
276 gSPTextureRectangle(
gMainGfxPos++, x1 * 4, y1 * 4, x2 * 4, y2 * 4, G_TX_RENDERTILE,
277 (t5 - arg0) * 32.0f / texScale + 16.0f + 1024.0f, (t6 - arg1) * 32.0f / texScale + 16.0f + 1024.0f,
278 1024.0f / texScale, 1024.0f / texScale);