158 s32 dxRight, dxLeft, dyTop, dyBottom;
171 for (i = 0; i < 40; i++) {
174 G_IM_FMT_RGBA, G_IM_SIZ_16b,
177 G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
178 G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
183 G_TX_RENDERTILE, 0, 0, 0x1000, 0x0400);
192 gDPSetRenderMode(
gMainGfxPos++, CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | G_RM_PASS, CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1));
196 guFrustumF(mtx, -80.0f, 80.0f, 60.0f, -60.0f, 160.0f, 640.0f, 1.0f);
199 gSPClearGeometryMode(
gMainGfxPos++, G_CULL_BOTH | G_LIGHTING);
200 gSPSetGeometryMode(
gMainGfxPos++, G_SHADE | G_SHADING_SMOOTH);
203 for (j = 0; j < 12; j++) {
221 for (i = 0; i < 18; i++) {
241 (((((x + dxRight + 16) - (x + dxLeft)) + 1) * 2) + 7) >> 3, 0x0000,
243 G_TX_NOMIRROR | G_TX_CLAMP, 6, G_TX_NOLOD,
244 G_TX_NOMIRROR | G_TX_CLAMP, 6, G_TX_NOLOD);
249 (x + dxRight + 16) * 4,
250 (y + dyBottom + 16) * 4);
254 (((((x + dxRight + 16) - (x + dxLeft)) + 1) * 2) + 7) >> 3, 0x0000,
256 G_TX_NOMIRROR | G_TX_CLAMP, 6, G_TX_NOLOD,
257 G_TX_NOMIRROR | G_TX_CLAMP, 6, G_TX_NOLOD);
259 0, 0, (x + dxRight + 31) * 4, (y + dyBottom + 31) * 4);
261 if (edgeX && edgeY) {
274 gSPModifyVertex(
gMainGfxPos++, vtxIdx , G_MWO_POINT_XYSCREEN, ((x + dxLeft ) << 0x12) | ((y + dyTop ) * 4 + data->
unk_23[i ][j ]));
275 gSPModifyVertex(
gMainGfxPos++, vtxIdx + 1, G_MWO_POINT_XYSCREEN, ((x + dxRight + 0x10) << 0x12) | ((y + dyTop ) * 4 + data->
unk_23[i + 1][j ]));
276 gSPModifyVertex(
gMainGfxPos++, vtxIdx + 2, G_MWO_POINT_XYSCREEN, ((x + dxLeft ) << 0x12) | ((y + dyBottom + 0x10) * 4 + data->
unk_23[i ][j + 1]));
277 gSPModifyVertex(
gMainGfxPos++, vtxIdx + 3, G_MWO_POINT_XYSCREEN, ((x + dxRight + 0x10) << 0x12) | ((y + dyBottom + 0x10) * 4 + data->
unk_23[i + 1][j + 1]));
278 gSP2Triangles(
gMainGfxPos++, vtxIdx, vtxIdx + 3, vtxIdx + 1, 0, vtxIdx, vtxIdx + 2, vtxIdx + 3, 0);