diff --git a/include/macros.h b/include/macros.h index d61729e57b..251ba3e262 100644 --- a/include/macros.h +++ b/include/macros.h @@ -85,13 +85,20 @@ } \ (void)0 -extern GraphicsContext* oGfxCtx; +extern GraphicsContext* __gfxCtx; +#define WORK_DISP __gfxCtx->work.p +#define POLY_OPA_DISP __gfxCtx->polyOpa.p +#define POLY_XLU_DISP __gfxCtx->polyXlu.p +#define OVERLAY_DISP __gfxCtx->overlay.p + +// __gfxCtx shouldn't be used directly. +// Use the DISP macros defined above when writing to display buffers. #define OPEN_DISPS(gfxCtx, file, line) \ { \ - GraphicsContext* oGfxCtx; \ + GraphicsContext* __gfxCtx; \ Gfx* dispRefs[4]; \ - oGfxCtx = gfxCtx; \ + __gfxCtx = gfxCtx; \ Graph_OpenDisps(dispRefs, gfxCtx, file, line) #define CLOSE_DISPS(gfxCtx, file, line) \ diff --git a/src/code/flg_set.c b/src/code/flg_set.c index 44707957ad..a2bef505a6 100644 --- a/src/code/flg_set.c +++ b/src/code/flg_set.c @@ -46,9 +46,9 @@ void FlagSet_Update(GlobalContext* globalCtx) { GfxPrint printer; s32 pad; - polyOpa = oGfxCtx->polyOpa.p; + polyOpa = POLY_OPA_DISP; gfx = Graph_GfxPlusOne(polyOpa); - gSPDisplayList(oGfxCtx->overlay.p++, gfx); + gSPDisplayList(OVERLAY_DISP++, gfx); GfxPrint_Init(&printer); GfxPrint_Open(&printer, gfx); @@ -141,7 +141,7 @@ void FlagSet_Update(GlobalContext* globalCtx) { gSPEndDisplayList(gfx++); Graph_BranchDlist(polyOpa, gfx); - oGfxCtx->polyOpa.p = gfx; + POLY_OPA_DISP = gfx; } if (CHECK_BTN_ALL(input->press.button, BTN_L)) { diff --git a/src/code/game.c b/src/code/game.c index bafc504696..ce0d91c9e2 100644 --- a/src/code/game.c +++ b/src/code/game.c @@ -151,8 +151,8 @@ void GameState_Draw(GameState* gameState, GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../game.c", 746); - newDList = Graph_GfxPlusOne(polyOpaP = oGfxCtx->polyOpa.p); - gSPDisplayList(oGfxCtx->overlay.p++, newDList); + newDList = Graph_GfxPlusOne(polyOpaP = POLY_OPA_DISP); + gSPDisplayList(OVERLAY_DISP++, newDList); if (R_ENABLE_FB_FILTER == 1) { GameState_SetFBFilter(&newDList); @@ -186,7 +186,7 @@ void GameState_Draw(GameState* gameState, GraphicsContext* gfxCtx) { gSPEndDisplayList(newDList++); Graph_BranchDlist(polyOpaP, newDList); - oGfxCtx->polyOpa.p = newDList; + POLY_OPA_DISP = newDList; if (1) {} @@ -203,15 +203,15 @@ void GameState_Draw(GameState* gameState, GraphicsContext* gfxCtx) { void GameState_SetFrameBuffer(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../game.c", 814); - gSPSegment(oGfxCtx->polyOpa.p++, 0, 0); - gSPSegment(oGfxCtx->polyOpa.p++, 0xF, gfxCtx->curFrameBuffer); - gSPSegment(oGfxCtx->polyOpa.p++, 0xE, gZBuffer); - gSPSegment(oGfxCtx->polyXlu.p++, 0, 0); - gSPSegment(oGfxCtx->polyXlu.p++, 0xF, gfxCtx->curFrameBuffer); - gSPSegment(oGfxCtx->polyXlu.p++, 0xE, gZBuffer); - gSPSegment(oGfxCtx->overlay.p++, 0, 0); - gSPSegment(oGfxCtx->overlay.p++, 0xF, gfxCtx->curFrameBuffer); - gSPSegment(oGfxCtx->overlay.p++, 0xE, gZBuffer); + gSPSegment(POLY_OPA_DISP++, 0, 0); + gSPSegment(POLY_OPA_DISP++, 0xF, gfxCtx->curFrameBuffer); + gSPSegment(POLY_OPA_DISP++, 0xE, gZBuffer); + gSPSegment(POLY_XLU_DISP++, 0, 0); + gSPSegment(POLY_XLU_DISP++, 0xF, gfxCtx->curFrameBuffer); + gSPSegment(POLY_XLU_DISP++, 0xE, gZBuffer); + gSPSegment(OVERLAY_DISP++, 0, 0); + gSPSegment(OVERLAY_DISP++, 0xF, gfxCtx->curFrameBuffer); + gSPSegment(OVERLAY_DISP++, 0xE, gZBuffer); CLOSE_DISPS(gfxCtx, "../game.c", 838); } @@ -222,12 +222,12 @@ void func_800C49F4(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../game.c", 846); - newDlist = Graph_GfxPlusOne(polyOpaP = oGfxCtx->polyOpa.p); - gSPDisplayList(oGfxCtx->overlay.p++, newDlist); + newDlist = Graph_GfxPlusOne(polyOpaP = POLY_OPA_DISP); + gSPDisplayList(OVERLAY_DISP++, newDlist); gSPEndDisplayList(newDlist++); Graph_BranchDlist(polyOpaP, newDlist); - oGfxCtx->polyOpa.p = newDlist; + POLY_OPA_DISP = newDlist; if (1) {} diff --git a/src/code/graph.c b/src/code/graph.c index 3ba23f9ff1..9d568068cb 100644 --- a/src/code/graph.c +++ b/src/code/graph.c @@ -220,7 +220,7 @@ void Graph_TaskSet00(GraphicsContext* gfxCtx) { task->data_ptr = (u64*)gfxCtx->workBuffer; OPEN_DISPS(gfxCtx, "../graph.c", 828); - task->data_size = (u32)oGfxCtx->work.p - (u32)gfxCtx->workBuffer; + task->data_size = (u32)WORK_DISP - (u32)gfxCtx->workBuffer; CLOSE_DISPS(gfxCtx, "../graph.c", 830); { s32 pad2; } // Necessary to match stack usage @@ -268,10 +268,10 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) { OPEN_DISPS(gfxCtx, "../graph.c", 966); - gDPNoOpString(oGfxCtx->work.p++, "WORK_DISP 開始", 0); - gDPNoOpString(oGfxCtx->polyOpa.p++, "POLY_OPA_DISP 開始", 0); - gDPNoOpString(oGfxCtx->polyXlu.p++, "POLY_XLU_DISP 開始", 0); - gDPNoOpString(oGfxCtx->overlay.p++, "OVERLAY_DISP 開始", 0); + gDPNoOpString(WORK_DISP++, "WORK_DISP 開始", 0); + gDPNoOpString(POLY_OPA_DISP++, "POLY_OPA_DISP 開始", 0); + gDPNoOpString(POLY_XLU_DISP++, "POLY_XLU_DISP 開始", 0); + gDPNoOpString(OVERLAY_DISP++, "OVERLAY_DISP 開始", 0); CLOSE_DISPS(gfxCtx, "../graph.c", 975); @@ -280,21 +280,21 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) { OPEN_DISPS(gfxCtx, "../graph.c", 987); - gDPNoOpString(oGfxCtx->work.p++, "WORK_DISP 終了", 0); - gDPNoOpString(oGfxCtx->polyOpa.p++, "POLY_OPA_DISP 終了", 0); - gDPNoOpString(oGfxCtx->polyXlu.p++, "POLY_XLU_DISP 終了", 0); - gDPNoOpString(oGfxCtx->overlay.p++, "OVERLAY_DISP 終了", 0); + gDPNoOpString(WORK_DISP++, "WORK_DISP 終了", 0); + gDPNoOpString(POLY_OPA_DISP++, "POLY_OPA_DISP 終了", 0); + gDPNoOpString(POLY_XLU_DISP++, "POLY_XLU_DISP 終了", 0); + gDPNoOpString(OVERLAY_DISP++, "OVERLAY_DISP 終了", 0); CLOSE_DISPS(gfxCtx, "../graph.c", 996); OPEN_DISPS(gfxCtx, "../graph.c", 999); - gSPBranchList(oGfxCtx->work.p++, gfxCtx->polyOpaBuffer); - gSPBranchList(oGfxCtx->polyOpa.p++, gfxCtx->polyXluBuffer); - gSPBranchList(oGfxCtx->polyXlu.p++, gfxCtx->overlayBuffer); - gDPPipeSync(oGfxCtx->overlay.p++); - gDPFullSync(oGfxCtx->overlay.p++); - gSPEndDisplayList(oGfxCtx->overlay.p++); + gSPBranchList(WORK_DISP++, gfxCtx->polyOpaBuffer); + gSPBranchList(POLY_OPA_DISP++, gfxCtx->polyXluBuffer); + gSPBranchList(POLY_XLU_DISP++, gfxCtx->overlayBuffer); + gDPPipeSync(OVERLAY_DISP++); + gDPFullSync(OVERLAY_DISP++); + gSPEndDisplayList(OVERLAY_DISP++); CLOSE_DISPS(gfxCtx, "../graph.c", 1028); diff --git a/src/code/speed_meter.c b/src/code/speed_meter.c index b1ee055a32..1dc6d54959 100644 --- a/src/code/speed_meter.c +++ b/src/code/speed_meter.c @@ -74,7 +74,7 @@ void SpeedMeter_DrawTimeEntries(SpeedMeter* this, GraphicsContext* gfxCtx) { SET_FULLSCREEN_VIEWPORT(&view); - gfx = oGfxCtx->overlay.p; + gfx = OVERLAY_DISP; func_800AB9EC(&view, 0xF, &gfx); gDPPipeSync(gfx++); @@ -96,7 +96,7 @@ void SpeedMeter_DrawTimeEntries(SpeedMeter* this, GraphicsContext* gfxCtx) { } gDPPipeSync(gfx++); - oGfxCtx->overlay.p = gfx; + OVERLAY_DISP = gfx; CLOSE_DISPS(gfxCtx, "../speed_meter.c", 276); } @@ -130,7 +130,7 @@ void SpeedMeter_DrawAllocEntry(SpeedMeterAllocEntry* this, GraphicsContext* gfxC SET_FULLSCREEN_VIEWPORT(&view); - gfx = oGfxCtx->overlay.p; + gfx = OVERLAY_DISP; func_800AB9EC(&view, 0xF, &gfx); gDPPipeSync(gfx++); @@ -145,7 +145,7 @@ void SpeedMeter_DrawAllocEntry(SpeedMeterAllocEntry* this, GraphicsContext* gfxC gDPPipeSync(gfx++); - oGfxCtx->overlay.p = gfx; + OVERLAY_DISP = gfx; CLOSE_DISPS(gfxCtx, "../speed_meter.c", 339); } } diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 24176a48f3..ab31237886 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -22,19 +22,19 @@ void func_8002B200(Actor* actor, Lights* lights, GlobalContext* globalCtx, Gfx* if (temp1 >= -50.0f && temp1 < 500.0f) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 1553); - oGfxCtx->polyOpa.p = Gfx_CallSetupDL(oGfxCtx->polyOpa.p, 0x2C); + POLY_OPA_DISP = Gfx_CallSetupDL(POLY_OPA_DISP, 0x2C); - gDPSetCombineLERP(oGfxCtx->polyOpa.p++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, COMBINED, 0, + gDPSetCombineLERP(POLY_OPA_DISP++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, COMBINED, 0, 0, 0, COMBINED); temp1 = (temp1 < 0.0f) ? 0.0f : ((temp1 > 150.0f) ? 150.0f : temp1); temp2 = 1.0f - (temp1 * (1.f / 350)); if (color != NULL) { - gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, color->r, color->g, color->b, + gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, color->r, color->g, color->b, (u32)(actor->shape.unk_14 * temp2) & 0xFF); } else { - gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, 0, 0, 0, (u32)(actor->shape.unk_14 * temp2) & 0xFF); + gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0, (u32)(actor->shape.unk_14 * temp2) & 0xFF); } func_80038A28(actor->floorPoly, actor->posRot.pos.x, actor->groundY, actor->posRot.pos.z, &sp60); @@ -47,9 +47,9 @@ void func_8002B200(Actor* actor, Lights* lights, GlobalContext* globalCtx, Gfx* temp2 = (1.0f - (temp1 * (1.f / 350))) * actor->shape.unk_10; Matrix_Scale(actor->scale.x * temp2, 1.0f, actor->scale.z * temp2, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 1588), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 1588), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, dlist); + gSPDisplayList(POLY_OPA_DISP++, dlist); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 1594); } @@ -77,7 +77,7 @@ void func_8002B66C(GlobalContext* globalCtx, Light* light, MtxF* arg2, s32 arg3, OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 1661); - gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, 0, 0, 0, + gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0, (u32)(((arg3 * 0.00005f) > 1.0f ? 1.0f : (arg3 * 0.00005f)) * arg4) & 0xFF); sp58 = Math_atan2f(light->l.dir[0], light->l.dir[2]); @@ -87,9 +87,9 @@ void func_8002B66C(GlobalContext* globalCtx, Light* light, MtxF* arg2, s32 arg3, Matrix_RotateY(sp58, MTXMODE_APPLY); Matrix_Scale(arg5, 1.0f, arg5 * arg6, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 1687), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 1687), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, &D_04048180); + gSPDisplayList(POLY_OPA_DISP++, &D_04048180); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 1693); } @@ -137,7 +137,7 @@ void ActorShadow_DrawFunc_Teardrop(Actor* actor, Lights* lights, GlobalContext* OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 1741); - oGfxCtx->polyOpa.p = Gfx_CallSetupDL(oGfxCtx->polyOpa.p, 0x2C); + POLY_OPA_DISP = Gfx_CallSetupDL(POLY_OPA_DISP, 0x2C); actor->shape.unk_15 = 0; for (i = 0; i < 2; i++) { @@ -359,7 +359,7 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) { func_8002BE64(targetCtx, targetCtx->unk_4C, spBC.x, spBC.y, spBC.z); if ((!(player->stateFlags1 & 0x40)) || (actor != player->unk_664)) { - oGfxCtx->overlay.p = Gfx_CallSetupDL(oGfxCtx->overlay.p, 0x39); + OVERLAY_DISP = Gfx_CallSetupDL(OVERLAY_DISP, 0x39); for (spB0 = 0, spAC = targetCtx->unk_4C; spB0 < spB8; spB0++, spAC = (spAC + 1) % 3) { entry = &targetCtx->arr_50[spAC]; @@ -374,7 +374,7 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) { Matrix_Translate(entry->pos.x, entry->pos.y, 0.0f, MTXMODE_NEW); Matrix_Scale(var2, 0.15f, 1.0f, MTXMODE_APPLY); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, entry->color.r, entry->color.g, entry->color.b, + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, entry->color.r, entry->color.g, entry->color.b, (u8)spCE); Matrix_RotateZ((targetCtx->unk_4B & 0x7F) * (M_PI / 64), MTXMODE_APPLY); @@ -383,9 +383,9 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) { Matrix_RotateZ(M_PI / 2, MTXMODE_APPLY); Matrix_Push(); Matrix_Translate(entry->unk_0C, entry->unk_0C, 0.0f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->overlay.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 2116), + gSPMatrix(OVERLAY_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 2116), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->overlay.p++, D_0404D450); + gSPDisplayList(OVERLAY_DISP++, D_0404D450); Matrix_Pull(); } } @@ -402,17 +402,17 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) { if ((actor != NULL) && !(actor->flags & 0x8000000)) { NaviColor* naviColor = &sNaviColorList[actor->type]; - oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 0x7); + POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x7); Matrix_Translate(actor->posRot2.pos.x, actor->posRot2.pos.y + (actor->unk_4C * actor->scale.y) + 17.0f, actor->posRot2.pos.z, MTXMODE_NEW); Matrix_RotateY((f32)((u16)(globalCtx->gameplayFrames * 3000)) * (M_PI / 32768), MTXMODE_APPLY); Matrix_Scale((iREG(27) + 35) / 1000.0f, (iREG(28) + 60) / 1000.0f, (iREG(29) + 50) / 1000.0f, MTXMODE_APPLY); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, naviColor->inner.r, naviColor->inner.g, naviColor->inner.b, 255); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 2153), + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, naviColor->inner.r, naviColor->inner.g, naviColor->inner.b, 255); + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 2153), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, &D_0400CB70); + gSPDisplayList(POLY_XLU_DISP++, &D_0400CB70); } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 2158); @@ -732,26 +732,26 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) { if (1) {} // Necessary to match - oGfxCtx->overlay.p = func_80093808(oGfxCtx->overlay.p); + OVERLAY_DISP = func_80093808(OVERLAY_DISP); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, (u8)titleCtx->unk_E, (u8)titleCtx->unk_E, (u8)titleCtx->unk_E, + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, (u8)titleCtx->unk_E, (u8)titleCtx->unk_E, (u8)titleCtx->unk_E, (u8)titleCtx->unk_C); - gDPLoadTextureBlock(oGfxCtx->overlay.p++, titleCtx->texture + spB0, G_IM_FMT_IA, G_IM_SIZ_8b, spCC, spC8, 0, + gDPLoadTextureBlock(OVERLAY_DISP++, titleCtx->texture + spB0, G_IM_FMT_IA, G_IM_SIZ_8b, spCC, spC8, 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); - gSPTextureRectangle(oGfxCtx->overlay.p++, spC0, spB8, ((sp38 * 2) + spC0) - 4, spB8 + (spC8 * 4) - 1, + gSPTextureRectangle(OVERLAY_DISP++, spC0, spB8, ((sp38 * 2) + spC0) - 4, spB8 + (spC8 * 4) - 1, G_TX_RENDERTILE, 0, 0, 1024, 1024); spC8 = titleCtx->unk_9 - spC8; if (spC8 > 0) { - gDPLoadTextureBlock(oGfxCtx->overlay.p++, titleCtx->texture + spB0 + 0x1000, G_IM_FMT_IA, G_IM_SIZ_8b, spCC, + gDPLoadTextureBlock(OVERLAY_DISP++, titleCtx->texture + spB0 + 0x1000, G_IM_FMT_IA, G_IM_SIZ_8b, spCC, spC8, 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); - gSPTextureRectangle(oGfxCtx->overlay.p++, spC0, spB4, ((sp38 * 2) + spC0) - 4, spB4 + (spC8 * 4) - 1, + gSPTextureRectangle(OVERLAY_DISP++, spC0, spB4, ((sp38 * 2) + spC0) - 4, spB4 + (spC8 * 4) - 1, G_TX_RENDERTILE, 0, 0, 1024, 1024); } @@ -1307,7 +1307,7 @@ Hilite* func_8002EABC(Vec3f* object, Vec3f* eye, Vec3f* lightDir, GraphicsContex OPEN_DISPS(gfxCtx, "../z_actor.c", 4306); - oGfxCtx->polyOpa.p = func_8002E830(object, eye, lightDir, gfxCtx, oGfxCtx->polyOpa.p, &hilite); + POLY_OPA_DISP = func_8002E830(object, eye, lightDir, gfxCtx, POLY_OPA_DISP, &hilite); CLOSE_DISPS(gfxCtx, "../z_actor.c", 4313); @@ -1319,7 +1319,7 @@ Hilite* func_8002EB44(Vec3f* object, Vec3f* eye, Vec3f* lightDir, GraphicsContex OPEN_DISPS(gfxCtx, "../z_actor.c", 4332); - oGfxCtx->polyXlu.p = func_8002E830(object, eye, lightDir, gfxCtx, oGfxCtx->polyXlu.p, &hilite); + POLY_XLU_DISP = func_8002E830(object, eye, lightDir, gfxCtx, POLY_XLU_DISP, &hilite); CLOSE_DISPS(gfxCtx, "../z_actor.c", 4339); @@ -1351,7 +1351,7 @@ void func_8002EBCC(Actor* actor, GlobalContext* globalCtx, s32 flag) { gDPSetHilite1Tile(displayListHead++, 1, hilite, 0x10, 0x10); gSPEndDisplayList(displayListHead); - gSPSegment(oGfxCtx->polyOpa.p++, 0x07, displayList); + gSPSegment(POLY_OPA_DISP++, 0x07, displayList); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 4394); } @@ -1377,7 +1377,7 @@ void func_8002ED80(Actor* actor, GlobalContext* globalCtx, s32 flag) { gDPSetHilite1Tile(displayListHead++, 1, hilite, 0x10, 0x10); gSPEndDisplayList(displayListHead); - gSPSegment(oGfxCtx->polyXlu.p++, 0x07, displayList); + gSPSegment(POLY_XLU_DISP++, 0x07, displayList); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 4439); } @@ -1892,7 +1892,7 @@ void func_8002FBAC(GlobalContext* globalCtx) { if ((globalCtx->csCtx.state == 0) && (gSaveContext.respawn[RESPAWN_MODE_TOP].entranceIndex == gSaveContext.entranceIndex) && (globalCtx->roomCtx.curRoom.num == gSaveContext.respawn[RESPAWN_MODE_TOP].roomIndex)) { - oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 0x19); + POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x19); Matrix_Translate(gSaveContext.respawn[RESPAWN_MODE_TOP].pos.x, gSaveContext.respawn[RESPAWN_MODE_TOP].pos.y + spD8, @@ -1901,24 +1901,24 @@ void func_8002FBAC(GlobalContext* globalCtx) { Matrix_Mult(&globalCtx->mf_11D60, MTXMODE_APPLY); Matrix_Push(); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x80, 0x80, 255, 255, 200, spD0); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 100, 200, 0, 255); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 200, spD0); + gDPSetEnvColor(POLY_XLU_DISP++, 100, 200, 0, 255); phi_f10 = (globalCtx->gameplayFrames * 1500) & 0xFFFF; Matrix_RotateZ((phi_f10 * M_PI) / 32768.0f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 5458), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 5458), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, &D_04010130); + gSPDisplayList(POLY_XLU_DISP++, &D_04010130); Matrix_Pull(); phi_f6 = ~((globalCtx->gameplayFrames * 1200) & 0xFFFF); Matrix_RotateZ((phi_f6 * M_PI) / 32768.0f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 5463), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 5463), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, &D_04010130); + gSPDisplayList(POLY_XLU_DISP++, &D_04010130); } lightPos.x = gSaveContext.respawn[RESPAWN_MODE_TOP].pos.x; @@ -2179,8 +2179,8 @@ void Actor_Draw(GlobalContext* globalCtx, Actor* actor) { Matrix_Scale(actor->scale.x, actor->scale.y, actor->scale.z, MTXMODE_APPLY); Actor_SetObjectDependency(globalCtx, actor); - gSPSegment(oGfxCtx->polyOpa.p++, 0x06, globalCtx->objectCtx.status[actor->objBankIndex].segment); - gSPSegment(oGfxCtx->polyXlu.p++, 0x06, globalCtx->objectCtx.status[actor->objBankIndex].segment); + gSPSegment(POLY_OPA_DISP++, 0x06, globalCtx->objectCtx.status[actor->objBankIndex].segment); + gSPSegment(POLY_XLU_DISP++, 0x06, globalCtx->objectCtx.status[actor->objBankIndex].segment); if (actor->dmgEffectTimer != 0) { Color_RGBA8 sp2C = { 0, 0, 0, 255 }; @@ -2236,12 +2236,12 @@ void func_80030ED8(Actor* actor) { void func_80030FA8(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_actor.c", 6161); - gDPLoadTextureBlock(oGfxCtx->polyXlu.p++, &D_0401E370, G_IM_FMT_I, G_IM_SIZ_8b, 64, 64, 0, G_TX_MIRROR | G_TX_CLAMP, + gDPLoadTextureBlock(POLY_XLU_DISP++, &D_0401E370, G_IM_FMT_I, G_IM_SIZ_8b, 64, 64, 0, G_TX_MIRROR | G_TX_CLAMP, G_TX_MIRROR | G_TX_CLAMP, 6, 6, G_TX_NOLOD, G_TX_NOLOD); - gDPSetTileSize(oGfxCtx->polyXlu.p++, G_TX_RENDERTILE, 384, 224, 892, 732); - gSPTextureRectangle(oGfxCtx->polyXlu.p++, 0, 0, 1280, 960, G_TX_RENDERTILE, 2240, 1600, 576, 597); - gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetTileSize(POLY_XLU_DISP++, G_TX_RENDERTILE, 384, 224, 892, 732); + gSPTextureRectangle(POLY_XLU_DISP++, 0, 0, 1280, 960, G_TX_RENDERTILE, 2240, 1600, 576, 597); + gDPPipeSync(POLY_XLU_DISP++); CLOSE_DISPS(gfxCtx, "../z_actor.c", 6183); } @@ -2256,67 +2256,67 @@ void func_8003115C(GlobalContext* globalCtx, s32 nbInvisibleActors, Actor** invi OPEN_DISPS(gfxCtx, "../z_actor.c", 6197); // Translates to: "MAGIC LENS START" - gDPNoOpString(oGfxCtx->polyOpa.p++, "魔法のメガネ START", 0); + gDPNoOpString(POLY_OPA_DISP++, "魔法のメガネ START", 0); - gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPPipeSync(POLY_XLU_DISP++); if (globalCtx->roomCtx.curRoom.showInvisActors == 0) { - gDPSetOtherMode(oGfxCtx->polyXlu.p++, + gDPSetOtherMode(POLY_XLU_DISP++, G_AD_DISABLE | G_CD_MAGICSQ | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE, G_AC_THRESHOLD | G_ZS_PRIM | Z_UPD | G_RM_CLD_SURF | G_RM_CLD_SURF2); - gDPSetCombineMode(oGfxCtx->polyXlu.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 0, 0, 255); + gDPSetCombineMode(POLY_XLU_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 0, 0, 255); } else { - gDPSetOtherMode(oGfxCtx->polyXlu.p++, + gDPSetOtherMode(POLY_XLU_DISP++, G_AD_DISABLE | G_CD_MAGICSQ | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE, G_AC_THRESHOLD | G_ZS_PRIM | Z_UPD | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | GBL_c1(G_BL_CLR_BL, G_BL_0, G_BL_CLR_MEM, G_BL_1MA) | GBL_c2(G_BL_CLR_BL, G_BL_0, G_BL_CLR_MEM, G_BL_1MA)); - gDPSetCombineLERP(oGfxCtx->polyXlu.p++, PRIMITIVE, TEXEL0, PRIM_LOD_FRAC, 0, PRIMITIVE, TEXEL0, PRIM_LOD_FRAC, + gDPSetCombineLERP(POLY_XLU_DISP++, PRIMITIVE, TEXEL0, PRIM_LOD_FRAC, 0, PRIMITIVE, TEXEL0, PRIM_LOD_FRAC, 0, PRIMITIVE, TEXEL0, PRIM_LOD_FRAC, 0, PRIMITIVE, TEXEL0, PRIM_LOD_FRAC, 0); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0xFF, 74, 74, 74, 74); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0xFF, 74, 74, 74, 74); } - gDPSetPrimDepth(oGfxCtx->polyXlu.p++, 0, 0); + gDPSetPrimDepth(POLY_XLU_DISP++, 0, 0); func_80030FA8(gfxCtx); // Translates to: "MAGIC LENS INVISIBLE ACTOR DISPLAY START" - gDPNoOpString(oGfxCtx->polyOpa.p++, "魔法のメガネ 見えないActor表示 START", nbInvisibleActors); + gDPNoOpString(POLY_OPA_DISP++, "魔法のメガネ 見えないActor表示 START", nbInvisibleActors); invisibleActor = &invisibleActors[0]; for (i = 0; i < nbInvisibleActors; i++) { // Translates to: "MAGIC LENS INVISIBLE ACTOR DISPLAY" - gDPNoOpString(oGfxCtx->polyOpa.p++, "魔法のメガネ 見えないActor表示", i); + gDPNoOpString(POLY_OPA_DISP++, "魔法のメガネ 見えないActor表示", i); Actor_Draw(globalCtx, *(invisibleActor++)); } // Translates to: "MAGIC LENS INVISIBLE ACTOR DISPLAY END" - gDPNoOpString(oGfxCtx->polyOpa.p++, "魔法のメガネ 見えないActor表示 END", nbInvisibleActors); + gDPNoOpString(POLY_OPA_DISP++, "魔法のメガネ 見えないActor表示 END", nbInvisibleActors); if (globalCtx->roomCtx.curRoom.showInvisActors != 0) { // Translates to: "BLUE SPECTACLES (EXTERIOR)" - gDPNoOpString(oGfxCtx->polyOpa.p++, "青い眼鏡(外側)", 0); + gDPNoOpString(POLY_OPA_DISP++, "青い眼鏡(外側)", 0); - gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPPipeSync(POLY_XLU_DISP++); - gDPSetOtherMode(oGfxCtx->polyXlu.p++, + gDPSetOtherMode(POLY_XLU_DISP++, G_AD_DISABLE | G_CD_MAGICSQ | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE, G_AC_THRESHOLD | G_ZS_PRIM | G_RM_CLD_SURF | G_RM_CLD_SURF2); - gDPSetCombineMode(oGfxCtx->polyXlu.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 0, 0, 255); + gDPSetCombineMode(POLY_XLU_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 0, 0, 255); func_80030FA8(gfxCtx); // Translates to: "BLUE SPECTACLES (EXTERIOR)" - gDPNoOpString(oGfxCtx->polyOpa.p++, "青い眼鏡(外側)", 1); + gDPNoOpString(POLY_OPA_DISP++, "青い眼鏡(外側)", 1); } // Translates to: "MAGIC LENS END" - gDPNoOpString(oGfxCtx->polyOpa.p++, "魔法のメガネ END", 0); + gDPNoOpString(POLY_OPA_DISP++, "魔法のメガネ END", 0); CLOSE_DISPS(gfxCtx, "../z_actor.c", 6284); } @@ -2361,8 +2361,8 @@ void func_800315AC(GlobalContext* globalCtx, ActorContext* actorCtx) { ActorOverlay* overlayEntry = actor->overlayEntry; char* actorName = overlayEntry->name != NULL ? overlayEntry->name : ""; - gDPNoOpString(oGfxCtx->polyOpa.p++, actorName, i); - gDPNoOpString(oGfxCtx->polyXlu.p++, actorName, i); + gDPNoOpString(POLY_OPA_DISP++, actorName, i); + gDPNoOpString(POLY_XLU_DISP++, actorName, i); HREG(66) = i; @@ -3426,9 +3426,9 @@ void func_80033C30(Vec3f* arg0, Vec3f* arg1, u8 alpha, GlobalContext* globalCtx) if (0) {} // Necessary to match - oGfxCtx->polyOpa.p = Gfx_CallSetupDL(oGfxCtx->polyOpa.p, 0x2C); + POLY_OPA_DISP = Gfx_CallSetupDL(POLY_OPA_DISP, 0x2C); - gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, 0, 0, 0, alpha); + gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0, alpha); sp50.x = arg0->x; sp50.y = arg0->y + 1.0f; @@ -3445,9 +3445,9 @@ void func_80033C30(Vec3f* arg0, Vec3f* arg1, u8 alpha, GlobalContext* globalCtx) Matrix_Scale(arg1->x, 1.0f, arg1->z, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 8149), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 8149), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, &D_04049210); + gSPDisplayList(POLY_OPA_DISP++, &D_04049210); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 8155); } @@ -3529,9 +3529,9 @@ void func_80033F54(GlobalContext* globalCtx, s32 arg1, s32 arg2) { Matrix_Scale(entry->unk_0C, entry->unk_0C, entry->unk_0C, MTXMODE_APPLY); } - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 8299), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 8299), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, entry->unk_14); + gSPDisplayList(POLY_OPA_DISP++, entry->unk_14); if (i % 2) { temp3 = entry->unk_00 + entry->unk_00; @@ -3545,9 +3545,9 @@ void func_80033F54(GlobalContext* globalCtx, s32 arg1, s32 arg2) { Matrix_Put(&spB0); Matrix_Scale(arg1 * 0.1f, arg1 * 0.1f, arg1 * 0.1f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 8314), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 8314), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, entry->unk_18); + gSPDisplayList(POLY_OPA_DISP++, entry->unk_18); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 8319); } @@ -3801,14 +3801,14 @@ void func_80034BA0(GlobalContext* globalCtx, SkelAnime* skelAnime, OverrideLimbD func_80093D18(globalCtx->state.gfxCtx); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 0, 0, 0, alpha); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0C, func_80034B28(globalCtx->state.gfxCtx)); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, alpha); + gDPPipeSync(POLY_OPA_DISP++); + gSPSegment(POLY_OPA_DISP++, 0x0C, func_80034B28(globalCtx->state.gfxCtx)); - oGfxCtx->polyOpa.p = + POLY_OPA_DISP = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, - overrideLimbDraw, postLimbDraw, actor, oGfxCtx->polyOpa.p); + overrideLimbDraw, postLimbDraw, actor, POLY_OPA_DISP); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 8860); } @@ -3819,13 +3819,13 @@ void func_80034CC4(GlobalContext* globalCtx, SkelAnime* skelAnime, OverrideLimbD func_80093D84(globalCtx->state.gfxCtx); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 0, 0, alpha); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0C, func_80034B54(globalCtx->state.gfxCtx)); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, alpha); + gSPSegment(POLY_XLU_DISP++, 0x0C, func_80034B54(globalCtx->state.gfxCtx)); - oGfxCtx->polyXlu.p = + POLY_XLU_DISP = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, - overrideLimbDraw, postLimbDraw, actor, oGfxCtx->polyXlu.p); + overrideLimbDraw, postLimbDraw, actor, POLY_XLU_DISP); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 8904); } diff --git a/src/code/z_cheap_proc.c b/src/code/z_cheap_proc.c index eb9ecfa53a..d611c08d2c 100644 --- a/src/code/z_cheap_proc.c +++ b/src/code/z_cheap_proc.c @@ -4,9 +4,9 @@ void Gfx_DrawDListOpa(GlobalContext* globalCtx, Gfx* dlist) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_cheap_proc.c", 214); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_cheap_proc.c", 216), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_cheap_proc.c", 216), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, dlist); + gSPDisplayList(POLY_OPA_DISP++, dlist); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_cheap_proc.c", 219); } @@ -15,9 +15,9 @@ void Gfx_DrawDListXlu(GlobalContext* globalCtx, Gfx* dlist) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_cheap_proc.c", 228); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_cheap_proc.c", 230), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_cheap_proc.c", 230), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, dlist); + gSPDisplayList(POLY_XLU_DISP++, dlist); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_cheap_proc.c", 233); } diff --git a/src/code/z_debug.c b/src/code/z_debug.c index 0ee403868b..91137e190e 100644 --- a/src/code/z_debug.c +++ b/src/code/z_debug.c @@ -223,9 +223,9 @@ void func_80063D7C(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_debug.c", 628); GfxPrint_Init(&gfxPrint); - sp78 = oGfxCtx->polyOpa.p; - tempRet = Graph_GfxPlusOne(oGfxCtx->polyOpa.p); - gSPDisplayList(oGfxCtx->overlay.p++, tempRet); + sp78 = POLY_OPA_DISP; + tempRet = Graph_GfxPlusOne(POLY_OPA_DISP); + gSPDisplayList(OVERLAY_DISP++, tempRet); GfxPrint_Open(&gfxPrint, tempRet); if ((OREG(0) == 1) || (OREG(0) == 8)) { @@ -240,7 +240,7 @@ void func_80063D7C(GraphicsContext* gfxCtx) { sp7C = GfxPrint_Close(&gfxPrint); gSPEndDisplayList(sp7C++); Graph_BranchDlist(sp78, sp7C); - oGfxCtx->polyOpa.p = sp7C; + POLY_OPA_DISP = sp7C; if (0) {} diff --git a/src/code/z_debug_display.c b/src/code/z_debug_display.c index 571bb82400..e802e9b8e3 100644 --- a/src/code/z_debug_display.c +++ b/src/code/z_debug_display.c @@ -74,19 +74,19 @@ void DebugDisplay_DrawSpriteI8(DebugDispObject* dispObj, u32 texture, GlobalCont func_80094678(globalCtx->state.gfxCtx); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, dispObj->color.r, dispObj->color.g, dispObj->color.b, dispObj->color.a); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, dispObj->color.r, dispObj->color.g, dispObj->color.b, dispObj->color.a); Matrix_Translate(dispObj->pos.x, dispObj->pos.y, dispObj->pos.z, MTXMODE_NEW); Matrix_Scale(dispObj->scale.x, dispObj->scale.y, dispObj->scale.z, MTXMODE_APPLY); Matrix_Mult(&globalCtx->mf_11DA0, MTXMODE_APPLY); Matrix_RotateRPY(dispObj->rot.x, dispObj->rot.y, dispObj->rot.z, MTXMODE_APPLY); - gDPLoadTextureBlock(oGfxCtx->polyXlu.p++, texture, G_IM_FMT_I, G_IM_SIZ_8b, 16, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, + gDPLoadTextureBlock(POLY_XLU_DISP++, texture, G_IM_FMT_I, G_IM_SIZ_8b, 16, 16, 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); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_debug_display.c", 189), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_debug_display.c", 189), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, &D_04004298); + gSPDisplayList(POLY_XLU_DISP++, &D_04004298); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_debug_display.c", 192); } @@ -96,16 +96,16 @@ void DebugDisplay_DrawPolygon(DebugDispObject* dispObj, u32 dlist, GlobalContext func_8009435C(globalCtx->state.gfxCtx); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, dispObj->color.r, dispObj->color.g, dispObj->color.b, dispObj->color.a); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, dispObj->color.r, dispObj->color.g, dispObj->color.b, dispObj->color.a); - gSPSetLights1(oGfxCtx->polyXlu.p++, sDebugObjectLights); + gSPSetLights1(POLY_XLU_DISP++, sDebugObjectLights); func_800D1694(dispObj->pos.x, dispObj->pos.y, dispObj->pos.z, &dispObj->rot); Matrix_Scale(dispObj->scale.x, dispObj->scale.y, dispObj->scale.z, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_debug_display.c", 228), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_debug_display.c", 228), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, dlist); + gSPDisplayList(POLY_XLU_DISP++, dlist); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_debug_display.c", 231); } diff --git a/src/code/z_demo.c b/src/code/z_demo.c index 23f257b3e9..944203ffbc 100644 --- a/src/code/z_demo.c +++ b/src/code/z_demo.c @@ -1861,13 +1861,13 @@ void func_80068C3C(GlobalContext* globalCtx, CutsceneContext* csCtx) { if (BREG(0) != 0) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo.c", 4101); - prevDisplayList = oGfxCtx->polyOpa.p; - displayList = Graph_GfxPlusOne(oGfxCtx->polyOpa.p); - gSPDisplayList(oGfxCtx->overlay.p++, displayList); + prevDisplayList = POLY_OPA_DISP; + displayList = Graph_GfxPlusOne(POLY_OPA_DISP); + gSPDisplayList(OVERLAY_DISP++, displayList); Cutscene_DrawDebugInfo(globalCtx, &displayList, csCtx); gSPEndDisplayList(displayList++); Graph_BranchDlist(prevDisplayList, displayList); - oGfxCtx->polyOpa.p = displayList; + POLY_OPA_DISP = displayList; CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_demo.c", 4108); } diff --git a/src/code/z_draw.c b/src/code/z_draw.c index 885a4674f4..c9ab4a2bf4 100644 --- a/src/code/z_draw.c +++ b/src/code/z_draw.c @@ -171,9 +171,9 @@ void func_800694E4(GlobalContext* globalCtx, s16 drawId) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 556); func_80093BA8(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 560), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 560), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 565); } @@ -183,10 +183,10 @@ void func_800695C0(GlobalContext* globalCtx, s16 drawId) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 572); - oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 5); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 576), + POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 5); + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 576), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 581); } @@ -197,21 +197,21 @@ void func_8006969C(GlobalContext* globalCtx, s16 drawId) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 588); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 592), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 592), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0 * (globalCtx->state.frames * 0), 0 * (globalCtx->state.frames * 0), 16, 32, 1, 1 * (globalCtx->state.frames * 1), 1 * -(globalCtx->state.frames * 8), 16, 32)); Matrix_Push(); Matrix_Translate(-8.0f, -2.0f, 0.0f, MTXMODE_APPLY); func_800D1FD4(&globalCtx->mf_11DA0); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 615), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 615), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]); Matrix_Pull(); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 621); @@ -223,24 +223,24 @@ void func_80069880(GlobalContext* globalCtx, s16 drawId) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 628); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 632), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 632), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 641), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 641), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]); + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0 * (globalCtx->state.frames * 0), 0 * (globalCtx->state.frames * 0), 16, 32, 1, 1 * (globalCtx->state.frames * 1), 1 * -(globalCtx->state.frames * 6), 16, 32)); Matrix_Push(); func_800D1FD4(&globalCtx->mf_11DA0); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 656), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 656), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[3]); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[2]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[3]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]); Matrix_Pull(); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 663); @@ -252,23 +252,23 @@ void func_80069AC8(GlobalContext* globalCtx, s16 drawId) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 670); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 674), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 674), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 683), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 683), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]); + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0 * (globalCtx->state.frames * 0), 0 * (globalCtx->state.frames * 0), 32, 32, 1, 1 * (globalCtx->state.frames * 1), 1 * -(globalCtx->state.frames * 6), 32, 32)); Matrix_Push(); func_800D1FD4(&globalCtx->mf_11DA0); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 698), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 698), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[2]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]); Matrix_Pull(); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 704); @@ -280,19 +280,19 @@ void func_80069CF0(GlobalContext* globalCtx, s16 drawId) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 712); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, + gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0 * (globalCtx->state.frames * 0) % 256, 1 * (globalCtx->state.frames * 2) % 256, 64, 64, 1, 0 * (globalCtx->state.frames * 0) % 128, 1 * (globalCtx->state.frames * 1) % 128, 32, 32)); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 723), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 723), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 730), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 730), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 735); } @@ -303,18 +303,18 @@ void func_80069EB0(GlobalContext* globalCtx, s16 drawId) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 742); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 746), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 746), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0 * (globalCtx->state.frames * 0), 1 * -(globalCtx->state.frames * 5), 32, 32, 1, 0 * (globalCtx->state.frames * 0), 0 * (globalCtx->state.frames * 0), 32, 64)); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 760), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 760), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 765); } @@ -325,10 +325,10 @@ void func_8006A060(GlobalContext* globalCtx, s16 drawId) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 772); func_80093BA8(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 776), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 776), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 783); } @@ -339,14 +339,14 @@ void func_8006A158(GlobalContext* globalCtx, s16 drawId) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 811); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 815), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 815), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); - oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 5); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 822), + POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 5); + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 822), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 827); } @@ -357,22 +357,22 @@ void func_8006A2A0(GlobalContext* globalCtx, s16 drawId) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 834); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, + gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, -1 * (globalCtx->state.frames * 1), 1 * (globalCtx->state.frames * 1), 32, 32, 1, -1 * (globalCtx->state.frames * 1), 1 * (globalCtx->state.frames * 1), 32, 32)); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 845), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 845), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[1]); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[2]); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[3]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[2]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[3]); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 855), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 855), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[4]); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[5]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[4]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[5]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 861); } @@ -383,13 +383,13 @@ void func_8006A4B0(GlobalContext* globalCtx, s16 drawId) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 868); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, + gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 1 * (globalCtx->state.frames * 1), 0 * (globalCtx->state.frames * 1), 32, 32, 1, 0 * (globalCtx->state.frames * 1), 0 * (globalCtx->state.frames * 1), 32, 32)); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 878), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 878), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 883); } @@ -400,13 +400,13 @@ void func_8006A5F0(GlobalContext* globalCtx, s16 drawId) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 890); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, + gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 1 * (globalCtx->state.frames * 6), 1 * (globalCtx->state.frames * 6), 32, 32, 1, 1 * (globalCtx->state.frames * 6), 1 * (globalCtx->state.frames * 6), 32, 32)); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 901), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 901), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 906); } @@ -417,13 +417,13 @@ void func_8006A73C(GlobalContext* globalCtx, s16 drawId) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 913); func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0 * (globalCtx->state.frames * 1), 1 * -(globalCtx->state.frames * 3), 32, 32, 1, 0 * (globalCtx->state.frames * 1), 1 * -(globalCtx->state.frames * 2), 32, 32)); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 924), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 924), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 929); } @@ -434,13 +434,13 @@ void func_8006A88C(GlobalContext* globalCtx, s16 drawId) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 936); func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0 * (globalCtx->state.frames * 0), 1 * (globalCtx->state.frames * 1), 32, 32, 1, 0 * (globalCtx->state.frames * 0), 1 * (globalCtx->state.frames * 1), 32, 32)); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 947), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 947), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 952); } @@ -451,9 +451,9 @@ void func_8006A9CC(GlobalContext* globalCtx, s16 drawId) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 959); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 963), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 963), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 968); } @@ -464,14 +464,14 @@ void func_8006AAA8(GlobalContext* globalCtx, s16 drawId) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 975); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 979), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 979), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 986), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 986), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 991); } @@ -482,10 +482,10 @@ void func_8006ABEC(GlobalContext* globalCtx, s16 drawId) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 998); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1002), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1002), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[0]); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1008); } @@ -496,15 +496,15 @@ void func_8006ACE4(GlobalContext* globalCtx, s16 drawId) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1015); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1019), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1019), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[1]); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1027), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1027), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[2]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1032); } @@ -515,15 +515,15 @@ void func_8006AE40(GlobalContext* globalCtx, s16 drawId) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1039); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1043), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1043), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1050), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1050), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[2]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1056); } @@ -534,15 +534,15 @@ void func_8006AF9C(GlobalContext* globalCtx, s16 drawId) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1063); func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 1 * (globalCtx->state.frames * 2), 1 * -(globalCtx->state.frames * 6), 32, 32, 1, 1 * (globalCtx->state.frames * 1), -1 * (globalCtx->state.frames * 2), 32, 32)); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1074), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1074), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[0]); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[2]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1081); } @@ -553,12 +553,12 @@ void func_8006B124(GlobalContext* globalCtx, s16 drawId) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1088); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1092), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1092), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[1]); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[2]); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[3]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[2]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[3]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1100); } @@ -569,16 +569,16 @@ void func_8006B24C(GlobalContext* globalCtx, s16 drawId) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1108); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1112), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1112), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[1]); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1120), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1120), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[3]); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[2]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[3]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1126); } @@ -591,16 +591,16 @@ void func_8006B3C0(GlobalContext* globalCtx, s16 drawId) { Matrix_Scale(0.7f, 0.7f, 0.7f, MTXMODE_APPLY); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1140), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1140), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[1]); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1148), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1148), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[3]); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[2]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[3]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1154); } @@ -611,16 +611,16 @@ void func_8006B54C(GlobalContext* globalCtx, s16 drawId) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1162); func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 1 * (globalCtx->state.frames * 2), -1 * (globalCtx->state.frames * 2), 64, 64, 1, 1 * (globalCtx->state.frames * 4), 1 * -(globalCtx->state.frames * 4), 32, 32)); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1173), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1173), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[2]); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[3]); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[3]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1181); } @@ -631,17 +631,17 @@ void func_8006B6E4(GlobalContext* globalCtx, s16 drawId) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1188); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1192), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1192), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[1]); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1200), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1200), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[2]); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[3]); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[4]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[3]); + gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[4]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1207); } @@ -652,16 +652,16 @@ void func_8006B870(GlobalContext* globalCtx, s16 drawId) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1214); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1218), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1218), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[1]); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[2]); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[3]); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[4]); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[5]); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[6]); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[7]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[2]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[3]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[4]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[5]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[6]); + gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[7]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1230); } diff --git a/src/code/z_eff_blure.c b/src/code/z_eff_blure.c index 3624a2c9f8..ecc0290c40 100644 --- a/src/code/z_eff_blure.c +++ b/src/code/z_eff_blure.c @@ -399,7 +399,7 @@ void EffectBlure_GetComputedValues(EffectBlure* this, s32 index, f32 ratio, Vec3 void EffectBlure_SetupSmooth(EffectBlure* this, GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_eff_blure.c", 809); - oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 0x26); + POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x26); CLOSE_DISPS(gfxCtx, "../z_eff_blure.c", 813); } @@ -494,8 +494,8 @@ void EffectBlure_DrawElemNoInterpolation(EffectBlure* this, EffectBlureElement* vtx[3].v.cn[2] = sp78.b; vtx[3].v.cn[3] = sp78.a; - gSPVertex(oGfxCtx->polyXlu.p++, vtx, 4, 0); - gSP2Triangles(oGfxCtx->polyXlu.p++, 0, 1, 2, 0, 0, 2, 3, 0); + gSPVertex(POLY_XLU_DISP++, vtx, 4, 0); + gSP2Triangles(POLY_XLU_DISP++, 0, 1, 2, 0, 0, 2, 3, 0); } CLOSE_DISPS(gfxCtx, "../z_eff_blure.c", 932); @@ -668,14 +668,14 @@ void EffectBlure_DrawElemHermiteInterpolation(EffectBlure* this, EffectBlureElem vtx[j2].v.cn[3] = func_80027E84(sp1A0.a, sp198.a, temp_f28); } - gSPVertex(oGfxCtx->polyXlu.p++, vtx, 16, 0); - gSP2Triangles(oGfxCtx->polyXlu.p++, 0, 1, 3, 0, 0, 3, 2, 0); - gSP2Triangles(oGfxCtx->polyXlu.p++, 2, 3, 5, 0, 2, 5, 4, 0); - gSP2Triangles(oGfxCtx->polyXlu.p++, 4, 5, 7, 0, 4, 7, 6, 0); - gSP2Triangles(oGfxCtx->polyXlu.p++, 6, 7, 9, 0, 6, 9, 8, 0); - gSP2Triangles(oGfxCtx->polyXlu.p++, 8, 9, 11, 0, 8, 11, 10, 0); - gSP2Triangles(oGfxCtx->polyXlu.p++, 10, 11, 13, 0, 10, 13, 12, 0); - gSP2Triangles(oGfxCtx->polyXlu.p++, 12, 13, 15, 0, 12, 15, 14, 0); + gSPVertex(POLY_XLU_DISP++, vtx, 16, 0); + gSP2Triangles(POLY_XLU_DISP++, 0, 1, 3, 0, 0, 3, 2, 0); + gSP2Triangles(POLY_XLU_DISP++, 2, 3, 5, 0, 2, 5, 4, 0); + gSP2Triangles(POLY_XLU_DISP++, 4, 5, 7, 0, 4, 7, 6, 0); + gSP2Triangles(POLY_XLU_DISP++, 6, 7, 9, 0, 6, 9, 8, 0); + gSP2Triangles(POLY_XLU_DISP++, 8, 9, 11, 0, 8, 11, 10, 0); + gSP2Triangles(POLY_XLU_DISP++, 10, 11, 13, 0, 10, 13, 12, 0); + gSP2Triangles(POLY_XLU_DISP++, 12, 13, 15, 0, 12, 15, 14, 0); } CLOSE_DISPS(gfxCtx, "../z_eff_blure.c", 1184); @@ -721,7 +721,7 @@ void EffectBlure_DrawSmooth(EffectBlure* this, GraphicsContext* gfxCtx) { return; } - gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); for (i = 0, elem = &this->elements[0]; elem < &this->elements[this->numElements - 1]; elem++, i++) { if ((elem->state == 0) || ((elem + 1)->state == 0)) { @@ -747,7 +747,7 @@ void EffectBlure_DrawSmooth(EffectBlure* this, GraphicsContext* gfxCtx) { void EffectBlure_SetupSimple(GraphicsContext* gfxCtx, EffectBlure* this, Vtx* vtx) { OPEN_DISPS(gfxCtx, "../z_eff_blure.c", 1280); - oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 0x26); + POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x26); CLOSE_DISPS(gfxCtx, "../z_eff_blure.c", 1285); } @@ -755,24 +755,24 @@ void EffectBlure_SetupSimple(GraphicsContext* gfxCtx, EffectBlure* this, Vtx* vt void EffectBlure_SetupSimpleAlt(GraphicsContext* gfxCtx, EffectBlure* this, Vtx* vtx) { OPEN_DISPS(gfxCtx, "../z_eff_blure.c", 1294); - gDPPipeSync(oGfxCtx->polyXlu.p++); - oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 0x26); + gDPPipeSync(POLY_XLU_DISP++); + POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x26); - gDPSetCycleType(oGfxCtx->polyXlu.p++, G_CYC_2CYCLE); - gDPSetTextureLUT(oGfxCtx->polyXlu.p++, G_TT_NONE); - gSPTexture(oGfxCtx->polyXlu.p++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); + gDPSetCycleType(POLY_XLU_DISP++, G_CYC_2CYCLE); + gDPSetTextureLUT(POLY_XLU_DISP++, G_TT_NONE); + gSPTexture(POLY_XLU_DISP++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); - gDPLoadTextureBlock(oGfxCtx->polyXlu.p++, D_04006020, G_IM_FMT_I, G_IM_SIZ_8b, 64, 32, 0, + gDPLoadTextureBlock(POLY_XLU_DISP++, D_04006020, G_IM_FMT_I, G_IM_SIZ_8b, 64, 32, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_WRAP, 6, 5, G_TX_NOLOD, G_TX_NOLOD); - gDPSetCombineLERP(oGfxCtx->polyXlu.p++, TEXEL0, PRIMITIVE, PRIM_LOD_FRAC, TEXEL0, TEXEL0, 0, PRIMITIVE, 0, + gDPSetCombineLERP(POLY_XLU_DISP++, TEXEL0, PRIMITIVE, PRIM_LOD_FRAC, TEXEL0, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, COMBINED, ENVIRONMENT, 0, 0, 0, COMBINED); - gDPSetRenderMode(oGfxCtx->polyXlu.p++, G_RM_PASS, G_RM_ZB_CLD_SURF2); - gSPClearGeometryMode(oGfxCtx->polyXlu.p++, G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR); - gSPSetGeometryMode(oGfxCtx->polyXlu.p++, G_ZBUFFER | G_SHADE | G_SHADING_SMOOTH); - gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetRenderMode(POLY_XLU_DISP++, G_RM_PASS, G_RM_ZB_CLD_SURF2); + gSPClearGeometryMode(POLY_XLU_DISP++, G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR); + gSPSetGeometryMode(POLY_XLU_DISP++, G_ZBUFFER | G_SHADE | G_SHADING_SMOOTH); + gDPPipeSync(POLY_XLU_DISP++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, this->altEnvColor.r, this->altEnvColor.g, this->altEnvColor.b, + gDPSetEnvColor(POLY_XLU_DISP++, this->altEnvColor.r, this->altEnvColor.g, this->altEnvColor.b, this->altEnvColor.a); CLOSE_DISPS(gfxCtx, "../z_eff_blure.c", 1329); @@ -792,7 +792,7 @@ void EffectBlure_DrawSimpleVertices(GraphicsContext* gfxCtx, EffectBlure* this, OPEN_DISPS(gfxCtx, "../z_eff_blure.c", 1356); sSetupHandlers[this->drawMode](gfxCtx, this, vtx); - gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPPipeSync(POLY_XLU_DISP++); { Vec3f sp1B0; @@ -812,15 +812,15 @@ void EffectBlure_DrawSimpleVertices(GraphicsContext* gfxCtx, EffectBlure* this, for (i = 0; i < this->numElements - 1; i++) { if (this->drawMode == 1) { alphaRatio = (f32)this->elements[i].timer / (f32)this->elemDuration; - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x00, 0x80, this->altPrimColor.r, this->altPrimColor.g, + gDPSetPrimColor(POLY_XLU_DISP++, 0x00, 0x80, this->altPrimColor.r, this->altPrimColor.g, this->altPrimColor.b, this->altPrimColor.a * (1.0f - alphaRatio)); - gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPPipeSync(POLY_XLU_DISP++); } if (1) {} // Necessary to match - gSPVertex(oGfxCtx->polyXlu.p++, &vtx[j], 4, 0); - gSP2Triangles(oGfxCtx->polyXlu.p++, 0, 1, 3, 0, 0, 3, 2, 0); + gSPVertex(POLY_XLU_DISP++, &vtx[j], 4, 0); + gSP2Triangles(POLY_XLU_DISP++, 0, 1, 3, 0, 0, 3, 2, 0); if (this->flags & 4) { sp1B0.x = ((f32)vtx[4 * i + 0].v.ob[0] + (f32)vtx[4 * i + 1].v.ob[0]) * 0.5f; @@ -850,10 +850,10 @@ void EffectBlure_DrawSimpleVertices(GraphicsContext* gfxCtx, EffectBlure* this, break; } - gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPVertex(oGfxCtx->polyXlu.p++, &vtx[j], 4, 0); - gSP2Triangles(oGfxCtx->polyXlu.p++, 0, 1, 3, 0, 0, 3, 2, 0); - gSPMatrix(oGfxCtx->polyXlu.p++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPVertex(POLY_XLU_DISP++, &vtx[j], 4, 0); + gSP2Triangles(POLY_XLU_DISP++, 0, 1, 3, 0, 0, 3, 2, 0); + gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); } } @@ -993,12 +993,12 @@ void EffectBlure_Draw(void* thisx, GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_eff_blure.c", 1596); - gSPMatrix(oGfxCtx->polyXlu.p++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (this->numElements != 0) { if (this->flags == 0) { func_800942F0(gfxCtx); - gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPPipeSync(POLY_XLU_DISP++); vtx = Graph_Alloc(gfxCtx, sizeof(Vtx[32])); if (vtx == NULL) { @@ -1072,7 +1072,7 @@ void EffectBlure_Draw(void* thisx, GraphicsContext* gfxCtx) { j = 0; - gSPVertex(oGfxCtx->polyXlu.p++, vtx, 32, 0); + gSPVertex(POLY_XLU_DISP++, vtx, 32, 0); phi_t2 = 0; for (i = 0; i < this->numElements; i++) { @@ -1084,7 +1084,7 @@ void EffectBlure_Draw(void* thisx, GraphicsContext* gfxCtx) { if (phi_t2 == 0) { phi_t2 = 1; } else { - gSP1Quadrangle(oGfxCtx->polyXlu.p++, j - 2, j - 1, j + 1, j, 0); + gSP1Quadrangle(POLY_XLU_DISP++, j - 2, j - 1, j + 1, j, 0); if (1) {} // Necessary to match diff --git a/src/code/z_eff_shield_particle.c b/src/code/z_eff_shield_particle.c index a68c765612..43e73f6c9f 100644 --- a/src/code/z_eff_shield_particle.c +++ b/src/code/z_eff_shield_particle.c @@ -158,29 +158,29 @@ void EffectShieldParticle_Draw(void* thisx, GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_eff_shield_particle.c", 272); if (this != NULL) { - oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 0x26); + POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x26); - gDPSetCycleType(oGfxCtx->polyXlu.p++, G_CYC_2CYCLE); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gSPTexture(oGfxCtx->polyXlu.p++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); + gDPSetCycleType(POLY_XLU_DISP++, G_CYC_2CYCLE); + gDPPipeSync(POLY_XLU_DISP++); + gSPTexture(POLY_XLU_DISP++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); - gDPLoadTextureBlock(oGfxCtx->polyXlu.p++, D_04038FB0, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0, + gDPLoadTextureBlock(POLY_XLU_DISP++, D_04038FB0, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); if (1) {} // Necessary to match - gDPSetCombineLERP(oGfxCtx->polyXlu.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0, 0, + gDPSetCombineLERP(POLY_XLU_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0, 0, 0, 0, COMBINED, 0, 0, 0, COMBINED); - gDPSetRenderMode(oGfxCtx->polyXlu.p++, G_RM_PASS, G_RM_ZB_CLD_SURF2); - gSPClearGeometryMode(oGfxCtx->polyXlu.p++, + gDPSetRenderMode(POLY_XLU_DISP++, G_RM_PASS, G_RM_ZB_CLD_SURF2); + gSPClearGeometryMode(POLY_XLU_DISP++, G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR); - gSPSetGeometryMode(oGfxCtx->polyXlu.p++, G_ZBUFFER | G_SHADE | G_SHADING_SMOOTH); + gSPSetGeometryMode(POLY_XLU_DISP++, G_ZBUFFER | G_SHADE | G_SHADING_SMOOTH); EffectShieldParticle_GetColors(this, &primColor, &envColor); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, primColor.r, primColor.g, primColor.b, primColor.a); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, envColor.r, envColor.g, envColor.b, envColor.a); - gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, primColor.r, primColor.g, primColor.b, primColor.a); + gDPSetEnvColor(POLY_XLU_DISP++, envColor.r, envColor.g, envColor.b, envColor.a); + gDPPipeSync(POLY_XLU_DISP++); for (elem = &this->elements[0]; elem < &this->elements[this->numElements]; elem++) { Mtx* mtx; @@ -214,9 +214,9 @@ void EffectShieldParticle_Draw(void* thisx, GraphicsContext* gfxCtx) { break; } - gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPVertex(oGfxCtx->polyXlu.p++, sVertices, 4, 0); - gSP2Triangles(oGfxCtx->polyXlu.p++, 0, 1, 2, 0, 0, 3, 1, 0); + gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPVertex(POLY_XLU_DISP++, sVertices, 4, 0); + gSP2Triangles(POLY_XLU_DISP++, 0, 1, 2, 0, 0, 3, 1, 0); } } diff --git a/src/code/z_eff_spark.c b/src/code/z_eff_spark.c index 6d4ef51ccc..7be59e286a 100644 --- a/src/code/z_eff_spark.c +++ b/src/code/z_eff_spark.c @@ -159,22 +159,22 @@ void EffectSpark_Draw(void* thisx, GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_eff_spark.c", 293); if (this != NULL) { - gSPMatrix(oGfxCtx->polyXlu.p++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 0x26); - gDPSetCycleType(oGfxCtx->polyXlu.p++, G_CYC_2CYCLE); - gDPPipeSync(oGfxCtx->polyXlu.p++); + POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x26); + gDPSetCycleType(POLY_XLU_DISP++, G_CYC_2CYCLE); + gDPPipeSync(POLY_XLU_DISP++); - gSPTexture(oGfxCtx->polyXlu.p++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); - gDPLoadTextureBlock(oGfxCtx->polyXlu.p++, D_04038FB0, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0, + gSPTexture(POLY_XLU_DISP++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); + gDPLoadTextureBlock(POLY_XLU_DISP++, D_04038FB0, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); - gDPSetCombineMode(oGfxCtx->polyXlu.p++, G_CC_SHADEDECALA, G_CC_PASS2); - gDPSetRenderMode(oGfxCtx->polyXlu.p++, G_RM_PASS, G_RM_ZB_CLD_SURF2); - gSPClearGeometryMode(oGfxCtx->polyXlu.p++, + gDPSetCombineMode(POLY_XLU_DISP++, G_CC_SHADEDECALA, G_CC_PASS2); + gDPSetRenderMode(POLY_XLU_DISP++, G_RM_PASS, G_RM_ZB_CLD_SURF2); + gSPClearGeometryMode(POLY_XLU_DISP++, G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR); - gSPSetGeometryMode(oGfxCtx->polyXlu.p++, G_ZBUFFER | G_SHADE | G_SHADING_SMOOTH); - gDPPipeSync(oGfxCtx->polyXlu.p++); + gSPSetGeometryMode(POLY_XLU_DISP++, G_ZBUFFER | G_SHADE | G_SHADING_SMOOTH); + gDPPipeSync(POLY_XLU_DISP++); vertices = Graph_Alloc(gfxCtx, this->numElements * sizeof(Vtx[4])); if (vertices == NULL) { @@ -271,12 +271,12 @@ void EffectSpark_Draw(void* thisx, GraphicsContext* gfxCtx) { goto end; } - gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPVertex(oGfxCtx->polyXlu.p++, &vertices[4 * i], 4, 0); - gSP2Triangles(oGfxCtx->polyXlu.p++, 2, 0, 3, 0, 2, 3, 1, 0); + gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPVertex(POLY_XLU_DISP++, &vertices[4 * i], 4, 0); + gSP2Triangles(POLY_XLU_DISP++, 2, 0, 3, 0, 2, 3, 1, 0); } - gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPPipeSync(POLY_XLU_DISP++); } end: diff --git a/src/code/z_eff_ss_dead.c b/src/code/z_eff_ss_dead.c index a6eeabeb86..9b5a552cb3 100644 --- a/src/code/z_eff_ss_dead.c +++ b/src/code/z_eff_ss_dead.c @@ -7,7 +7,7 @@ void func_80026230(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 a OPEN_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 113); - displayListHead = oGfxCtx->polyOpa.p; + displayListHead = POLY_OPA_DISP; cos = Math_Coss((0x8000 / arg3) * arg2); absCos = ABS(cos); @@ -21,7 +21,7 @@ void func_80026230(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 a gSPFogPosition(displayListHead++, 0, (s16)(absCos * 3000.0f) + 1500); - oGfxCtx->polyOpa.p = displayListHead; + POLY_OPA_DISP = displayListHead; if (1) {} // Necessary to match @@ -36,13 +36,13 @@ void func_80026400(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 a OPEN_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 141); cos = Math_Coss((0x4000 / arg3) * arg2); - displayListHead = oGfxCtx->polyOpa.p; + displayListHead = POLY_OPA_DISP; gDPPipeSync(displayListHead++); gDPSetFogColor(displayListHead++, color->r, color->g, color->b, color->a); gSPFogPosition(displayListHead++, 0, (s16)(2800.0f * ABS(cos)) + 1700); - oGfxCtx->polyOpa.p = displayListHead; + POLY_OPA_DISP = displayListHead; if (1) {} // Necessary to match @@ -55,8 +55,8 @@ void func_80026608(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 159); - gDPPipeSync(oGfxCtx->polyOpa.p++); - oGfxCtx->polyOpa.p = func_800BC8A0(globalCtx, oGfxCtx->polyOpa.p); + gDPPipeSync(POLY_OPA_DISP++); + POLY_OPA_DISP = func_800BC8A0(globalCtx, POLY_OPA_DISP); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 164); } @@ -68,7 +68,7 @@ void func_80026690(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 a OPEN_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 178); - displayListHead = oGfxCtx->polyXlu.p; + displayListHead = POLY_XLU_DISP; cos = Math_Coss((0x8000 / arg3) * arg2); absCos = ABS(cos); @@ -82,7 +82,7 @@ void func_80026690(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 a gSPFogPosition(displayListHead++, 0, (s16)(absCos * 3000.0f) + 1500); - oGfxCtx->polyXlu.p = displayListHead; + POLY_XLU_DISP = displayListHead; if (1) {} // Necessary to match @@ -95,14 +95,14 @@ void func_80026860(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 a OPEN_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 201); - displayListHead = oGfxCtx->polyXlu.p; + displayListHead = POLY_XLU_DISP; cos = Math_Coss((0x4000 / arg3) * arg2); gDPPipeSync(displayListHead++); gDPSetFogColor(displayListHead++, color->r, color->g, color->b, color->a); gSPFogPosition(displayListHead++, 0, (s16)(2800.0f * ABS(cos)) + 1700); - oGfxCtx->polyXlu.p = displayListHead; + POLY_XLU_DISP = displayListHead; if (1) {} // Necessary to match @@ -114,8 +114,8 @@ void func_80026A6C(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 217); - gDPPipeSync(oGfxCtx->polyXlu.p++); - oGfxCtx->polyXlu.p = func_800BC8A0(globalCtx, oGfxCtx->polyXlu.p); + gDPPipeSync(POLY_XLU_DISP++); + POLY_XLU_DISP = func_800BC8A0(globalCtx, POLY_XLU_DISP); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 222); } diff --git a/src/code/z_effect_soft_sprite_old_init.c b/src/code/z_effect_soft_sprite_old_init.c index 806ee878a0..c987ab8f64 100644 --- a/src/code/z_effect_soft_sprite_old_init.c +++ b/src/code/z_effect_soft_sprite_old_init.c @@ -61,19 +61,19 @@ void EffectSs_DrawGEffect(GlobalContext* globalCtx, EffectSs* this, void* textur SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->mf_11DA0, &mfTrans11DA0); SkinMatrix_MtxFMtxFMult(&mfTrans11DA0, &mfScale, &mfResult); gSegments[6] = VIRTUAL_TO_PHYSICAL(object); - gSPSegment(oGfxCtx->polyXlu.p++, 0x06, object); + gSPSegment(POLY_XLU_DISP++, 0x06, object); mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult); if (mtx != NULL) { - gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(texture)); + gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(texture)); func_80094C50(gfxCtx); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, this->rgPrimColorR, this->rgPrimColorG, this->rgPrimColorB, + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rgPrimColorR, this->rgPrimColorG, this->rgPrimColorB, this->rgPrimColorA); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, this->rgEnvColorR, this->rgEnvColorG, this->rgEnvColorB, + gDPSetEnvColor(POLY_XLU_DISP++, this->rgEnvColorR, this->rgEnvColorG, this->rgEnvColorB, this->rgEnvColorA); - gSPDisplayList(oGfxCtx->polyXlu.p++, this->gfx); + gSPDisplayList(POLY_XLU_DISP++, this->gfx); } CLOSE_DISPS(gfxCtx, "../z_effect_soft_sprite_old_init.c", 243); diff --git a/src/code/z_en_a_keep.c b/src/code/z_en_a_keep.c index 34ca02864a..c23701d19c 100644 --- a/src/code/z_en_a_keep.c +++ b/src/code/z_en_a_keep.c @@ -329,12 +329,12 @@ void EnAObj_Draw(Actor* thisx, GlobalContext* globalCtx) { } if (thisx->params == A_OBJ_KNOB) { - gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 1, 60, 60, 60, 50); + gDPSetPrimColor(POLY_OPA_DISP++, 0, 1, 60, 60, 60, 50); } - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_a_keep.c", 712), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_a_keep.c", 712), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_80115484[type]); + gSPDisplayList(POLY_OPA_DISP++, D_80115484[type]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_a_keep.c", 715); } diff --git a/src/code/z_en_item00.c b/src/code/z_en_item00.c index f94a453d3c..1ae9c71c43 100644 --- a/src/code/z_en_item00.c +++ b/src/code/z_en_item00.c @@ -750,12 +750,12 @@ void func_8001EF30(EnItem00* this, GlobalContext* globalCtx) { } } - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_item00.c", 1562), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_item00.c", 1562), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_80115530[iconNb])); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_80115530[iconNb])); - gSPDisplayList(oGfxCtx->polyOpa.p++, &D_04042440); + gSPDisplayList(POLY_OPA_DISP++, &D_04042440); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_item00.c", 1568); } @@ -770,7 +770,7 @@ void func_8001F080(EnItem00* this, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_item00.c", 1594); - oGfxCtx->polyOpa.p = func_800BC8A0(globalCtx, oGfxCtx->polyOpa.p); + POLY_OPA_DISP = func_800BC8A0(globalCtx, POLY_OPA_DISP); if (this->actor.params == ITEM00_BOMBS_SPECIAL) { iconNb = 1; @@ -778,13 +778,13 @@ void func_8001F080(EnItem00* this, GlobalContext* globalCtx) { iconNb -= 3; } - oGfxCtx->polyOpa.p = func_800946E4(oGfxCtx->polyOpa.p); + POLY_OPA_DISP = func_800946E4(POLY_OPA_DISP); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_80115544[iconNb])); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_80115544[iconNb])); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_item00.c", 1607), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_item00.c", 1607), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, &D_0403F070); + gSPDisplayList(POLY_OPA_DISP++, &D_0403F070); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_item00.c", 1611); } @@ -799,15 +799,15 @@ void func_8001F1F4(EnItem00* this, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); func_8002EBCC(&this->actor, globalCtx, 0); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_item00.c", 1634), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_item00.c", 1634), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, &D_0403BBA0); + gSPDisplayList(POLY_OPA_DISP++, &D_0403BBA0); func_80093D84(globalCtx->state.gfxCtx); func_8002ED80(&this->actor, globalCtx, 0); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_item00.c", 1644), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_item00.c", 1644), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, &D_0403BCD8); + gSPDisplayList(POLY_XLU_DISP++, &D_0403BCD8); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_item00.c", 1647); } @@ -822,9 +822,9 @@ void func_8001F334(EnItem00* this, GlobalContext* globalCtx) { func_80093D84(globalCtx->state.gfxCtx); func_8002ED80(&this->actor, globalCtx, 0); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_item00.c", 1670), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_item00.c", 1670), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, &D_0403B030); + gSPDisplayList(POLY_XLU_DISP++, &D_0403B030); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_item00.c", 1673); } diff --git a/src/code/z_fcurve_data_skelanime.c b/src/code/z_fcurve_data_skelanime.c index e5aa09dd9f..c868525aad 100644 --- a/src/code/z_fcurve_data_skelanime.c +++ b/src/code/z_fcurve_data_skelanime.c @@ -135,27 +135,27 @@ void SkelCurve_DrawLimb(GlobalContext* globalCtx, s32 limbIndex, SkelAnimeCurve* dList = limb->dList[0]; if (dList != NULL) { - gSPMatrix(oGfxCtx->polyOpa.p++, + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_fcurve_data_skelanime.c", 321), G_MTX_LOAD | G_MTX_NOPUSH | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, dList); + gSPDisplayList(POLY_OPA_DISP++, dList); } } else if (lod == 1) { s32 pad2; dList = limb->dList[0]; if (dList != NULL) { - gSPMatrix(oGfxCtx->polyOpa.p++, + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_fcurve_data_skelanime.c", 332), G_MTX_LOAD | G_MTX_NOPUSH | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, dList); + gSPDisplayList(POLY_OPA_DISP++, dList); } dList = limb->dList[1]; if (dList != NULL) { - gSPMatrix(oGfxCtx->polyXlu.p++, + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_fcurve_data_skelanime.c", 338), G_MTX_LOAD | G_MTX_NOPUSH | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, dList); + gSPDisplayList(POLY_XLU_DISP++, dList); } } else { // FcSkeletonInfo_draw_child (): Not supported diff --git a/src/code/z_lifemeter.c b/src/code/z_lifemeter.c index 63c5350088..b0c9db6199 100644 --- a/src/code/z_lifemeter.c +++ b/src/code/z_lifemeter.c @@ -221,37 +221,37 @@ void Health_Draw(GlobalContext* globalCtx) { if (i < fullHeartCount) { if (curColorSet != 0) { curColorSet = 0; - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, interfaceCtx->unk_20E[0], interfaceCtx->unk_20E[2], + gDPPipeSync(OVERLAY_DISP++); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, interfaceCtx->unk_20E[0], interfaceCtx->unk_20E[2], interfaceCtx->unk_20E[4], interfaceCtx->healthAlpha); - gDPSetEnvColor(oGfxCtx->overlay.p++, interfaceCtx->unk_21A[0], interfaceCtx->unk_21A[2], + gDPSetEnvColor(OVERLAY_DISP++, interfaceCtx->unk_21A[0], interfaceCtx->unk_21A[2], interfaceCtx->unk_21A[4], 0xFF); } } else if (i == fullHeartCount) { if (curColorSet != 1) { curColorSet = 1; - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, interfaceCtx->unk_202[0], interfaceCtx->unk_202[1], + gDPPipeSync(OVERLAY_DISP++); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, interfaceCtx->unk_202[0], interfaceCtx->unk_202[1], interfaceCtx->unk_202[2], interfaceCtx->healthAlpha); - gDPSetEnvColor(oGfxCtx->overlay.p++, interfaceCtx->unk_208[0], interfaceCtx->unk_208[1], + gDPSetEnvColor(OVERLAY_DISP++, interfaceCtx->unk_208[0], interfaceCtx->unk_208[1], interfaceCtx->unk_208[2], 0xFF); } } else if (i > fullHeartCount) { if (curColorSet != 2) { curColorSet = 2; - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, interfaceCtx->unk_20E[0], interfaceCtx->unk_20E[2], + gDPPipeSync(OVERLAY_DISP++); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, interfaceCtx->unk_20E[0], interfaceCtx->unk_20E[2], interfaceCtx->unk_20E[4], interfaceCtx->healthAlpha); - gDPSetEnvColor(oGfxCtx->overlay.p++, interfaceCtx->unk_21A[0], interfaceCtx->unk_21A[2], + gDPSetEnvColor(OVERLAY_DISP++, interfaceCtx->unk_21A[0], interfaceCtx->unk_21A[2], interfaceCtx->unk_21A[4], 0xFF); } } else { if (curColorSet != 3) { curColorSet = 3; - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, interfaceCtx->unk_20E[1], interfaceCtx->unk_20E[3], + gDPPipeSync(OVERLAY_DISP++); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, interfaceCtx->unk_20E[1], interfaceCtx->unk_20E[3], interfaceCtx->unk_20E[5], interfaceCtx->healthAlpha); - gDPSetEnvColor(oGfxCtx->overlay.p++, interfaceCtx->unk_21A[1], interfaceCtx->unk_21A[3], + gDPSetEnvColor(OVERLAY_DISP++, interfaceCtx->unk_21A[1], interfaceCtx->unk_21A[3], interfaceCtx->unk_21A[5], 0xFF); } } @@ -267,34 +267,34 @@ void Health_Draw(GlobalContext* globalCtx) { if (i < fullHeartCount) { if (curColorSet != 4) { curColorSet = 4; - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, D_8015FDD0[0], D_8015FDD0[1], D_8015FDD0[2], + gDPPipeSync(OVERLAY_DISP++); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, D_8015FDD0[0], D_8015FDD0[1], D_8015FDD0[2], interfaceCtx->healthAlpha); - gDPSetEnvColor(oGfxCtx->overlay.p++, D_8015FDE0[0], D_8015FDE0[1], D_8015FDE0[2], 0xFF); + gDPSetEnvColor(OVERLAY_DISP++, D_8015FDE0[0], D_8015FDE0[1], D_8015FDE0[2], 0xFF); } } else if (i == fullHeartCount) { if (curColorSet != 5) { curColorSet = 5; - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, D_8015FDC0[0], D_8015FDC0[1], D_8015FDC0[2], + gDPPipeSync(OVERLAY_DISP++); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, D_8015FDC0[0], D_8015FDC0[1], D_8015FDC0[2], interfaceCtx->healthAlpha); - gDPSetEnvColor(oGfxCtx->overlay.p++, D_8015FDC8[0], D_8015FDC8[1], D_8015FDC8[2], 0xFF); + gDPSetEnvColor(OVERLAY_DISP++, D_8015FDC8[0], D_8015FDC8[1], D_8015FDC8[2], 0xFF); } } else if (i > fullHeartCount) { if (curColorSet != 6) { curColorSet = 6; - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, D_8015FDD0[0], D_8015FDD0[1], D_8015FDD0[2], + gDPPipeSync(OVERLAY_DISP++); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, D_8015FDD0[0], D_8015FDD0[1], D_8015FDD0[2], interfaceCtx->healthAlpha); - gDPSetEnvColor(oGfxCtx->overlay.p++, D_8015FDE0[0], D_8015FDE0[1], D_8015FDE0[2], 0xFF); + gDPSetEnvColor(OVERLAY_DISP++, D_8015FDE0[0], D_8015FDE0[1], D_8015FDE0[2], 0xFF); } } else { if (curColorSet != 7) { curColorSet = 7; - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, D_8015FDD0[3], D_8015FDD0[4], D_8015FDD0[5], + gDPPipeSync(OVERLAY_DISP++); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, D_8015FDD0[3], D_8015FDD0[4], D_8015FDD0[5], interfaceCtx->healthAlpha); - gDPSetEnvColor(oGfxCtx->overlay.p++, D_8015FDE0[3], D_8015FDE0[4], D_8015FDE0[5], 0xFF); + gDPSetEnvColor(OVERLAY_DISP++, D_8015FDE0[3], D_8015FDE0[4], D_8015FDE0[5], 0xFF); } } @@ -309,7 +309,7 @@ void Health_Draw(GlobalContext* globalCtx) { if (curBgImgLoaded != heartBgImg) { curBgImgLoaded = heartBgImg; - gDPLoadTextureBlock(oGfxCtx->overlay.p++, heartBgImg, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 16, 0, + gDPLoadTextureBlock(OVERLAY_DISP++, heartBgImg, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 16, 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); } @@ -319,7 +319,7 @@ void Health_Draw(GlobalContext* globalCtx) { if (curCombineModeSet != 1) { curCombineModeSet = 1; func_80094520(gfxCtx); - gDPSetCombineLERP(oGfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, + gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); } @@ -327,7 +327,7 @@ void Health_Draw(GlobalContext* globalCtx) { if (curCombineModeSet != 3) { curCombineModeSet = 3; func_80094520(gfxCtx); - gDPSetCombineLERP(oGfxCtx->overlay.p++, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, + gDPSetCombineLERP(OVERLAY_DISP++, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0); } } @@ -339,7 +339,7 @@ void Health_Draw(GlobalContext* globalCtx) { temp4 *= 1024.0f; temp1 = 8.0f; temp1 *= 0.68f; - gSPTextureRectangle(oGfxCtx->overlay.p++, (s32)((temp2 - temp1) * 4), (s32)((temp3 - temp1) * 4), + gSPTextureRectangle(OVERLAY_DISP++, (s32)((temp2 - temp1) * 4), (s32)((temp3 - temp1) * 4), (s32)((temp2 + temp1) * 4), (s32)((temp3 + temp1) * 4), G_TX_RENDERTILE, 0, 0, (s32)temp4, (s32)temp4); } else { @@ -347,7 +347,7 @@ void Health_Draw(GlobalContext* globalCtx) { if (curCombineModeSet != 2) { curCombineModeSet = 2; func_80094A14(gfxCtx); - gDPSetCombineLERP(oGfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, + gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); } @@ -355,7 +355,7 @@ void Health_Draw(GlobalContext* globalCtx) { if (curCombineModeSet != 4) { curCombineModeSet = 4; func_80094A14(gfxCtx); - gDPSetCombineLERP(oGfxCtx->overlay.p++, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, + gDPSetCombineLERP(OVERLAY_DISP++, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0); } } @@ -364,9 +364,9 @@ void Health_Draw(GlobalContext* globalCtx) { Mtx* matrix = Graph_Alloc(gfxCtx, sizeof(Mtx)); func_800D2CEC(matrix, 1.0f - (0.32f * sp144), 1.0f - (0.32f * sp144), 1.0f - (0.32f * sp144), -130.0f + offsetX, 94.5f - offsetY, 0.0f); - gSPMatrix(oGfxCtx->overlay.p++, matrix, G_MTX_MODELVIEW | G_MTX_LOAD); - gSPVertex(oGfxCtx->overlay.p++, sp154, 4, 0); - gSP1Quadrangle(oGfxCtx->overlay.p++, 0, 2, 3, 1, 0); + gSPMatrix(OVERLAY_DISP++, matrix, G_MTX_MODELVIEW | G_MTX_LOAD); + gSPVertex(OVERLAY_DISP++, sp154, 4, 0); + gSP1Quadrangle(OVERLAY_DISP++, 0, 2, 3, 1, 0); } } diff --git a/src/code/z_lights.c b/src/code/z_lights.c index 2f6c06a62c..b140d8d579 100644 --- a/src/code/z_lights.c +++ b/src/code/z_lights.c @@ -60,24 +60,24 @@ void Lights_Draw(Lights* lights, GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_lights.c", 339); - gSPNumLights(oGfxCtx->polyOpa.p++, lights->numLights); - gSPNumLights(oGfxCtx->polyXlu.p++, lights->numLights); + gSPNumLights(POLY_OPA_DISP++, lights->numLights); + gSPNumLights(POLY_XLU_DISP++, lights->numLights); i = 0; light = &lights->l.l[0]; while (i < lights->numLights) { i++; - gSPLight(oGfxCtx->polyOpa.p++, light, i); - gSPLight(oGfxCtx->polyXlu.p++, light, i); + gSPLight(POLY_OPA_DISP++, light, i); + gSPLight(POLY_XLU_DISP++, light, i); light++; } if (0) {} i++; // abmient light is total number of lights + 1 - gSPLight(oGfxCtx->polyOpa.p++, &lights->l.a, i); - gSPLight(oGfxCtx->polyXlu.p++, &lights->l.a, i); + gSPLight(POLY_OPA_DISP++, &lights->l.a, i); + gSPLight(POLY_XLU_DISP++, &lights->l.a, i); CLOSE_DISPS(gfxCtx, "../z_lights.c", 352); } @@ -363,10 +363,10 @@ void Lights_DrawGlow(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_lights.c", 887); - oGfxCtx->polyXlu.p = func_800947AC(oGfxCtx->polyXlu.p++); - gDPSetAlphaDither(oGfxCtx->polyXlu.p++, G_AD_NOISE); - gDPSetColorDither(oGfxCtx->polyXlu.p++, G_CD_MAGICSQ); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_04015720); + POLY_XLU_DISP = func_800947AC(POLY_XLU_DISP++); + gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_NOISE); + gDPSetColorDither(POLY_XLU_DISP++, G_CD_MAGICSQ); + gSPDisplayList(POLY_XLU_DISP++, D_04015720); while (node != NULL) { LightInfo* info; @@ -380,12 +380,12 @@ void Lights_DrawGlow(GlobalContext* globalCtx) { if ((info->type == LIGHT_POINT_GLOW) && (params->drawGlow)) { scale = SQ(params->radius) * 0.0000026f; - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, params->color[0], params->color[1], params->color[2], 50); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, params->color[0], params->color[1], params->color[2], 50); Matrix_Translate(params->x, params->y, params->z, MTXMODE_NEW); Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_lights.c", 918), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_lights.c", 918), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_04015760); + gSPDisplayList(POLY_XLU_DISP++, D_04015760); } node = node->next; diff --git a/src/code/z_map_exp.c b/src/code/z_map_exp.c index 68e68e0f36..c9259e8da7 100644 --- a/src/code/z_map_exp.c +++ b/src/code/z_map_exp.c @@ -320,11 +320,11 @@ void Minimap_DrawCompassIcons(GlobalContext* globalCtx) { if (globalCtx->interfaceCtx.minimapAlpha >= 0xAA) { func_80094A14(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->overlay.p++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetCombineLERP(oGfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, + gSPMatrix(OVERLAY_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); - gDPSetEnvColor(oGfxCtx->overlay.p++, 0, 0, 0, 255); - gDPSetCombineMode(oGfxCtx->overlay.p++, G_CC_PRIMITIVE, G_CC_PRIMITIVE); + gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, 255); + gDPSetCombineMode(OVERLAY_DISP++, G_CC_PRIMITIVE, G_CC_PRIMITIVE); tempX = player->actor.posRot.pos.x; tempZ = player->actor.posRot.pos.z; @@ -335,11 +335,11 @@ void Minimap_DrawCompassIcons(GlobalContext* globalCtx) { Matrix_RotateX(-1.6f, MTXMODE_APPLY); tempX = (0x7FFF - player->actor.shape.rot.y) / 0x400; Matrix_RotateY(tempX / 10.0f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->overlay.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_map_exp.c", 585), + gSPMatrix(OVERLAY_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_map_exp.c", 585), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 200, 255, 0, 255); - gSPDisplayList(oGfxCtx->overlay.p++, D_0400C820); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 200, 255, 0, 255); + gSPDisplayList(OVERLAY_DISP++, D_0400C820); tempX = sPlayerInitialPosX; tempZ = sPlayerInitialPosZ; @@ -349,11 +349,11 @@ void Minimap_DrawCompassIcons(GlobalContext* globalCtx) { Matrix_Scale(VREG(9) / 100.0f, VREG(9) / 100.0f, VREG(9) / 100.0f, MTXMODE_APPLY); Matrix_RotateX(VREG(52) / 10.0f, MTXMODE_APPLY); Matrix_RotateY(sPlayerInitialDirection / 10.0f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->overlay.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_map_exp.c", 603), + gSPMatrix(OVERLAY_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_map_exp.c", 603), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0xFF, 200, 0, 0, 255); - gSPDisplayList(oGfxCtx->overlay.p++, D_0400C820); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0xFF, 200, 0, 0, 255); + gSPDisplayList(OVERLAY_DISP++, D_0400C820); } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_map_exp.c", 607); @@ -380,17 +380,17 @@ void Minimap_Draw(GlobalContext* globalCtx) { case SCENE_ICE_DOUKUTO: if (!R_MINIMAP_TOGGLED) { func_80094520(globalCtx->state.gfxCtx); - gDPSetCombineLERP(oGfxCtx->overlay.p++, 1, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, 1, 0, + gDPSetCombineLERP(OVERLAY_DISP++, 1, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, 1, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0); if (gSaveContext.inventory.dungeonItems[mapIndex] & gBitFlags[DUNGEON_MAP]) { - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 100, 255, 255, interfaceCtx->minimapAlpha); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 100, 255, 255, interfaceCtx->minimapAlpha); - gDPLoadTextureBlock_4b(oGfxCtx->overlay.p++, interfaceCtx->mapSegment, G_IM_FMT_I, 96, 85, 0, + gDPLoadTextureBlock_4b(OVERLAY_DISP++, interfaceCtx->mapSegment, G_IM_FMT_I, 96, 85, 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); - gSPTextureRectangle(oGfxCtx->overlay.p++, R_DGN_MINIMAP_X << 2, R_DGN_MINIMAP_Y << 2, + gSPTextureRectangle(OVERLAY_DISP++, R_DGN_MINIMAP_X << 2, R_DGN_MINIMAP_Y << 2, (R_DGN_MINIMAP_X + 96) << 2, (R_DGN_MINIMAP_Y + 85) << 2, G_TX_RENDERTILE, 0, 0, 1024, 1024); } @@ -437,16 +437,16 @@ void Minimap_Draw(GlobalContext* globalCtx) { if (!R_MINIMAP_TOGGLED) { func_80094520(globalCtx->state.gfxCtx); - gDPSetCombineMode(oGfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, R_MINIMAP_COLOR(0), R_MINIMAP_COLOR(1), + gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, R_MINIMAP_COLOR(0), R_MINIMAP_COLOR(1), R_MINIMAP_COLOR(2), interfaceCtx->minimapAlpha); - gDPLoadTextureBlock_4b(oGfxCtx->overlay.p++, interfaceCtx->mapSegment, G_IM_FMT_IA, + gDPLoadTextureBlock_4b(OVERLAY_DISP++, interfaceCtx->mapSegment, G_IM_FMT_IA, gMapData->owMinimapWidth[mapIndex], gMapData->owMinimapHeight[mapIndex], 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); - gSPTextureRectangle(oGfxCtx->overlay.p++, R_OW_MINIMAP_X << 2, R_OW_MINIMAP_Y << 2, + gSPTextureRectangle(OVERLAY_DISP++, R_OW_MINIMAP_X << 2, R_OW_MINIMAP_Y << 2, (R_OW_MINIMAP_X + gMapData->owMinimapWidth[mapIndex]) << 2, (R_OW_MINIMAP_Y + gMapData->owMinimapHeight[mapIndex]) << 2, G_TX_RENDERTILE, 0, 0, 1024, 1024); @@ -458,11 +458,11 @@ void Minimap_Draw(GlobalContext* globalCtx) { ((gMapData->owEntranceFlag[sEntranceIconMapIndex] != 0xFFFF) && (gSaveContext.infTable[26] & gBitFlags[gMapData->owEntranceFlag[mapIndex]]))) { - gDPLoadTextureBlock(oGfxCtx->overlay.p++, D_02002500, G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 8, 0, + gDPLoadTextureBlock(OVERLAY_DISP++, D_02002500, G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 8, 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); - gSPTextureRectangle(oGfxCtx->overlay.p++, + gSPTextureRectangle(OVERLAY_DISP++, gMapData->owEntranceIconPosX[sEntranceIconMapIndex] << 2, gMapData->owEntranceIconPosY[sEntranceIconMapIndex] << 2, (gMapData->owEntranceIconPosX[sEntranceIconMapIndex] + 8) << 2, @@ -472,11 +472,11 @@ void Minimap_Draw(GlobalContext* globalCtx) { } if ((globalCtx->sceneNum == SCENE_SPOT08) && (gSaveContext.infTable[26] & gBitFlags[9])) { - gDPLoadTextureBlock(oGfxCtx->overlay.p++, D_02002500, G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 8, 0, + gDPLoadTextureBlock(OVERLAY_DISP++, D_02002500, G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 8, 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); - gSPTextureRectangle(oGfxCtx->overlay.p++, 1080, 616, 1112, 648, G_TX_RENDERTILE, 0, 0, 1024, + gSPTextureRectangle(OVERLAY_DISP++, 1080, 616, 1112, 648, G_TX_RENDERTILE, 0, 0, 1024, 1024); } diff --git a/src/code/z_map_mark.c b/src/code/z_map_mark.c index c8e447f641..30752f531b 100644 --- a/src/code/z_map_mark.c +++ b/src/code/z_map_mark.c @@ -102,24 +102,24 @@ void MapMark_Draw(GlobalContext* globalCtx) { break; } - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetTextureLUT(oGfxCtx->overlay.p++, G_TT_NONE); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->minimapAlpha); - gDPSetEnvColor(oGfxCtx->overlay.p++, 0, 0, 0, interfaceCtx->minimapAlpha); + gDPPipeSync(OVERLAY_DISP++); + gDPSetTextureLUT(OVERLAY_DISP++, G_TT_NONE); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->minimapAlpha); + gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, interfaceCtx->minimapAlpha); markPoint = &mapMarkData->points[0]; for (i = 0; i < mapMarkData->count; i++) { if ((mapMarkData->markType != 0) || !Flags_GetTreasure(globalCtx, markPoint->chestFlag)) { markInfo = &sMapMarkInfoTable[mapMarkData->markType]; - gDPPipeSync(oGfxCtx->overlay.p++); - gDPLoadTextureBlock(oGfxCtx->overlay.p++, markInfo->texture, markInfo->imageFormat, G_IM_SIZ_MARK, + gDPPipeSync(OVERLAY_DISP++); + gDPLoadTextureBlock(OVERLAY_DISP++, markInfo->texture, markInfo->imageFormat, G_IM_SIZ_MARK, markInfo->textureWidth, markInfo->textureHeight, 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); rectLeft = (GREG(94) + markPoint->x + 204) << 2; rectTop = (GREG(95) + markPoint->y + 140) << 2; - gSPTextureRectangle(oGfxCtx->overlay.p++, rectLeft, rectTop, markInfo->rectWidth + rectLeft, + gSPTextureRectangle(OVERLAY_DISP++, rectLeft, rectTop, markInfo->rectWidth + rectLeft, rectTop + markInfo->rectHeight, G_TX_RENDERTILE, 0, 0, markInfo->dsdx, markInfo->dtdy); } diff --git a/src/code/z_moji.c b/src/code/z_moji.c index 42f5704bc8..3180c93774 100644 --- a/src/code/z_moji.c +++ b/src/code/z_moji.c @@ -45,11 +45,11 @@ void func_8007B9A4(GraphicsContext* gfxCtx, u8 arg1) { } if (D_8015FFC0 != (arg1 & 3)) { - gDPLoadTLUT(oGfxCtx->polyOpa.p++, 16, 256, &gLetterTLUT[arg1 & 3]); + gDPLoadTLUT(POLY_OPA_DISP++, 16, 256, &gLetterTLUT[arg1 & 3]); D_8015FFC0 = arg1 & 3; } - gSPTextureRectangle(oGfxCtx->polyOpa.p++, D_80120120 << 2, D_80120124 << 2, (D_80120120 + 8) << 2, + gSPTextureRectangle(POLY_OPA_DISP++, D_80120120 << 2, D_80120124 << 2, (D_80120120 + 8) << 2, (D_80120124 + 8) << 2, G_TX_RENDERTILE, (u16)(arg1 & 4) * 64, (u16)(arg1 >> 3) * 256, 1024, 1024); @@ -65,18 +65,18 @@ void func_8007BBA8(GraphicsContext* gfxCtx, u8* arg1) { osSyncPrintf("font_ff --> %X\n", gFontFF); } - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, sFontColorRed, sFontColorGreen, sFontColorBlue, sFontColorAlpha); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, sFontColorRed, sFontColorGreen, sFontColorBlue, sFontColorAlpha); - gDPSetTextureImage(oGfxCtx->polyOpa.p++, G_IM_FMT_CI, G_IM_SIZ_16b, 1, (s32)gFontFF); - gDPSetTile(oGfxCtx->polyOpa.p++, G_IM_FMT_CI, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, + gDPSetTextureImage(POLY_OPA_DISP++, G_IM_FMT_CI, G_IM_SIZ_16b, 1, (s32)gFontFF); + gDPSetTile(POLY_OPA_DISP++, G_IM_FMT_CI, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPLoadSync(oGfxCtx->polyOpa.p++); - gDPLoadBlock(oGfxCtx->polyOpa.p++, G_TX_LOADTILE, 0, 0, 511, 2048); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetTile(oGfxCtx->polyOpa.p++, G_IM_FMT_CI, G_IM_SIZ_4b, 1, 0, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, + gDPLoadSync(POLY_OPA_DISP++); + gDPLoadBlock(POLY_OPA_DISP++, G_TX_LOADTILE, 0, 0, 511, 2048); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetTile(POLY_OPA_DISP++, G_IM_FMT_CI, G_IM_SIZ_4b, 1, 0, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPSetTileSize(oGfxCtx->polyOpa.p++, G_TX_RENDERTILE, 0, 0, 60, 508); + gDPSetTileSize(POLY_OPA_DISP++, G_TX_RENDERTILE, 0, 0, 60, 508); D_8015FFC0 = -1; diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index ea5ce52a96..66e790bc8a 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -2560,65 +2560,65 @@ void Interface_DrawMagicBar(GlobalContext* globalCtx) { func_80094520(globalCtx->state.gfxCtx); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, sMagicBorderR, sMagicBorderG, sMagicBorderB, + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, sMagicBorderR, sMagicBorderG, sMagicBorderB, interfaceCtx->magicAlpha); - gDPSetEnvColor(oGfxCtx->overlay.p++, 100, 50, 50, 255); + gDPSetEnvColor(OVERLAY_DISP++, 100, 50, 50, 255); - oGfxCtx->overlay.p = - Gfx_TextureIA8(oGfxCtx->overlay.p, D_020038C0, 8, 16, R_MAGIC_BAR_X, magicBarY, 8, 16, 1024, 1024); + OVERLAY_DISP = + Gfx_TextureIA8(OVERLAY_DISP, D_020038C0, 8, 16, R_MAGIC_BAR_X, magicBarY, 8, 16, 1024, 1024); - oGfxCtx->overlay.p = Gfx_TextureIA8(oGfxCtx->overlay.p, D_02003940, 24, 16, R_MAGIC_BAR_X + 8, magicBarY, + OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, D_02003940, 24, 16, R_MAGIC_BAR_X + 8, magicBarY, gSaveContext.unk_13F4, 16, 1024, 1024); - gDPSetTextureImage(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, D_020038C0); - gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, + gDPSetTextureImage(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, D_020038C0); + gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_MIRROR | G_TX_WRAP, 3, G_TX_NOLOD); - gDPLoadSync(oGfxCtx->overlay.p++); - gDPLoadBlock(oGfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, 63, 2048); - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 1, 0, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, + gDPLoadSync(OVERLAY_DISP++); + gDPLoadBlock(OVERLAY_DISP++, G_TX_LOADTILE, 0, 0, 63, 2048); + gDPPipeSync(OVERLAY_DISP++); + gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_8b, 1, 0, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_MIRROR | G_TX_WRAP, 3, G_TX_NOLOD); - gDPSetTileSize(oGfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 28, 60); + gDPSetTileSize(OVERLAY_DISP++, G_TX_RENDERTILE, 0, 0, 28, 60); - gSPTextureRectangle(oGfxCtx->overlay.p++, ((R_MAGIC_BAR_X + gSaveContext.unk_13F4) + 8) << 2, magicBarY << 2, + gSPTextureRectangle(OVERLAY_DISP++, ((R_MAGIC_BAR_X + gSaveContext.unk_13F4) + 8) << 2, magicBarY << 2, ((R_MAGIC_BAR_X + gSaveContext.unk_13F4) + 16) << 2, (magicBarY + 16) << 2, G_TX_RENDERTILE, 256, 0, 1024, 1024); - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetCombineLERP(oGfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, 0, 0, 0, PRIMITIVE, + gDPPipeSync(OVERLAY_DISP++); + gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, 0, 0, 0, PRIMITIVE, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, 0, 0, 0, PRIMITIVE); - gDPSetEnvColor(oGfxCtx->overlay.p++, 0, 0, 0, 255); + gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, 255); if (gSaveContext.unk_13F0 == 4) { // Yellow part of the bar being used when casting a spell - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 250, 250, 0, interfaceCtx->magicAlpha); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 250, 250, 0, interfaceCtx->magicAlpha); - gDPLoadMultiBlock_4b(oGfxCtx->overlay.p++, D_02003AC0, 0, G_TX_RENDERTILE, G_IM_FMT_I, 16, 16, 0, + gDPLoadMultiBlock_4b(OVERLAY_DISP++, D_02003AC0, 0, G_TX_RENDERTILE, G_IM_FMT_I, 16, 16, 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); - gSPTextureRectangle(oGfxCtx->overlay.p++, R_MAGIC_FILL_X << 2, (magicBarY + 3) << 2, + gSPTextureRectangle(OVERLAY_DISP++, R_MAGIC_FILL_X << 2, (magicBarY + 3) << 2, (R_MAGIC_FILL_X + gSaveContext.magic) << 2, (magicBarY + 10) << 2, G_TX_RENDERTILE, 0, 0, 1024, 1024); // Fill the rest of the bar with the normal magic color - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, R_MAGIC_FILL_COLOR(0), R_MAGIC_FILL_COLOR(1), + gDPPipeSync(OVERLAY_DISP++); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, R_MAGIC_FILL_COLOR(0), R_MAGIC_FILL_COLOR(1), R_MAGIC_FILL_COLOR(2), interfaceCtx->magicAlpha); - gSPTextureRectangle(oGfxCtx->overlay.p++, R_MAGIC_FILL_X << 2, (magicBarY + 3) << 2, + gSPTextureRectangle(OVERLAY_DISP++, R_MAGIC_FILL_X << 2, (magicBarY + 3) << 2, (R_MAGIC_FILL_X + gSaveContext.unk_13F8) << 2, (magicBarY + 10) << 2, G_TX_RENDERTILE, 0, 0, 1024, 1024); } else { // Fill the whole bar with the normal magic color - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, R_MAGIC_FILL_COLOR(0), R_MAGIC_FILL_COLOR(1), + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, R_MAGIC_FILL_COLOR(0), R_MAGIC_FILL_COLOR(1), R_MAGIC_FILL_COLOR(2), interfaceCtx->magicAlpha); - gDPLoadMultiBlock_4b(oGfxCtx->overlay.p++, D_02003AC0, 0, G_TX_RENDERTILE, G_IM_FMT_I, 16, 16, 0, + gDPLoadMultiBlock_4b(OVERLAY_DISP++, D_02003AC0, 0, G_TX_RENDERTILE, G_IM_FMT_I, 16, 16, 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); - gSPTextureRectangle(oGfxCtx->overlay.p++, R_MAGIC_FILL_X << 2, (magicBarY + 3) << 2, + gSPTextureRectangle(OVERLAY_DISP++, R_MAGIC_FILL_X << 2, (magicBarY + 3) << 2, (R_MAGIC_FILL_X + gSaveContext.magic) << 2, (magicBarY + 10) << 2, G_TX_RENDERTILE, 0, 0, 1024, 1024); } @@ -2666,17 +2666,17 @@ void func_80088B34(s16 arg0) { void Interface_DrawActionLabel(GraphicsContext* gfxCtx, void* texture) { OPEN_DISPS(gfxCtx, "../z_parameter.c", 2820); - gDPSetTextureImage(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, texture); - gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, + gDPSetTextureImage(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, texture); + gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPLoadSync(oGfxCtx->overlay.p++); - gDPLoadBlock(oGfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, 191, 683); - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_4b, 3, 0, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, + gDPLoadSync(OVERLAY_DISP++); + gDPLoadBlock(OVERLAY_DISP++, G_TX_LOADTILE, 0, 0, 191, 683); + gDPPipeSync(OVERLAY_DISP++); + gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_4b, 3, 0, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPSetTileSize(oGfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 188, 60); + gDPSetTileSize(OVERLAY_DISP++, G_TX_RENDERTILE, 0, 0, 188, 60); - gSP1Quadrangle(oGfxCtx->overlay.p++, 0, 2, 3, 1, 0); + gSP1Quadrangle(OVERLAY_DISP++, 0, 2, 3, 1, 0); CLOSE_DISPS(gfxCtx, "../z_parameter.c", 2829); } @@ -2698,69 +2698,69 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) { // B Button Color & Texture // Also loads the Item Button Texture reused by other buttons afterwards - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetCombineMode(oGfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, R_B_BTN_COLOR(0), R_B_BTN_COLOR(1), R_B_BTN_COLOR(2), + gDPPipeSync(OVERLAY_DISP++); + gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, R_B_BTN_COLOR(0), R_B_BTN_COLOR(1), R_B_BTN_COLOR(2), interfaceCtx->bAlpha); - gDPSetEnvColor(oGfxCtx->overlay.p++, 0, 0, 0, 255); - oGfxCtx->overlay.p = - Gfx_TextureIA8(oGfxCtx->overlay.p, &D_02000A00[0], 32, 32, R_ITEM_BTN_X(0), R_ITEM_BTN_Y(0), + gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, 255); + OVERLAY_DISP = + Gfx_TextureIA8(OVERLAY_DISP, &D_02000A00[0], 32, 32, R_ITEM_BTN_X(0), R_ITEM_BTN_Y(0), R_ITEM_BTN_WIDTH(0), R_ITEM_BTN_WIDTH(0), R_ITEM_BTN_DD(0) * 2, R_ITEM_BTN_DD(0) * 2); // C-Left Button Color & Texture - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), + gDPPipeSync(OVERLAY_DISP++); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), interfaceCtx->cLeftAlpha); - gSPTextureRectangle(oGfxCtx->overlay.p++, R_ITEM_BTN_X(1) << 2, R_ITEM_BTN_Y(1) << 2, + gSPTextureRectangle(OVERLAY_DISP++, R_ITEM_BTN_X(1) << 2, R_ITEM_BTN_Y(1) << 2, (R_ITEM_BTN_X(1) + R_ITEM_BTN_WIDTH(1)) << 2, (R_ITEM_BTN_Y(1) + R_ITEM_BTN_WIDTH(1)) << 2, G_TX_RENDERTILE, 0, 0, R_ITEM_BTN_DD(1) * 2, R_ITEM_BTN_DD(1) * 2); // C-Down Button Color & Texture - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), interfaceCtx->cDownAlpha); - gSPTextureRectangle(oGfxCtx->overlay.p++, R_ITEM_BTN_X(2) << 2, R_ITEM_BTN_Y(2) << 2, + gSPTextureRectangle(OVERLAY_DISP++, R_ITEM_BTN_X(2) << 2, R_ITEM_BTN_Y(2) << 2, (R_ITEM_BTN_X(2) + R_ITEM_BTN_WIDTH(2)) << 2, (R_ITEM_BTN_Y(2) + R_ITEM_BTN_WIDTH(2)) << 2, G_TX_RENDERTILE, 0, 0, R_ITEM_BTN_DD(2) * 2, R_ITEM_BTN_DD(2) * 2); // C-Right Button Color & Texture - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), interfaceCtx->cRightAlpha); - gSPTextureRectangle(oGfxCtx->overlay.p++, R_ITEM_BTN_X(3) << 2, R_ITEM_BTN_Y(3) << 2, + gSPTextureRectangle(OVERLAY_DISP++, R_ITEM_BTN_X(3) << 2, R_ITEM_BTN_Y(3) << 2, (R_ITEM_BTN_X(3) + R_ITEM_BTN_WIDTH(3)) << 2, (R_ITEM_BTN_Y(3) + R_ITEM_BTN_WIDTH(3)) << 2, G_TX_RENDERTILE, 0, 0, R_ITEM_BTN_DD(3) * 2, R_ITEM_BTN_DD(3) * 2); if ((pauseCtx->state < 8) || (pauseCtx->state >= 18)) { if ((globalCtx->pauseCtx.state != 0) || (globalCtx->pauseCtx.flag != 0)) { // Start Button Texture, Color & Label - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 120, 120, 120, interfaceCtx->startAlpha); - gSPTextureRectangle(oGfxCtx->overlay.p++, sStartButtonLeftPos[gSaveContext.language] << 2, 68, + gDPPipeSync(OVERLAY_DISP++); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 120, 120, 120, interfaceCtx->startAlpha); + gSPTextureRectangle(OVERLAY_DISP++, sStartButtonLeftPos[gSaveContext.language] << 2, 68, (sStartButtonLeftPos[gSaveContext.language] + 22) << 2, 156, G_TX_RENDERTILE, 0, 0, 1462, 1462); - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->startAlpha); - gDPSetEnvColor(oGfxCtx->overlay.p++, 0, 0, 0, 0); - gDPSetCombineLERP(oGfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, + gDPPipeSync(OVERLAY_DISP++); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->startAlpha); + gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, 0); + gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); - gDPSetTextureImage(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, + gDPSetTextureImage(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, (u32)interfaceCtx->do_actionSegment + 0x300); - gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, + gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPLoadSync(oGfxCtx->overlay.p++); - gDPLoadBlock(oGfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, 191, 683); - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_4b, 3, 0, G_TX_RENDERTILE, 0, + gDPLoadSync(OVERLAY_DISP++); + gDPLoadBlock(OVERLAY_DISP++, G_TX_LOADTILE, 0, 0, 191, 683); + gDPPipeSync(OVERLAY_DISP++); + gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_4b, 3, 0, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPSetTileSize(oGfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 188, 60); + gDPSetTileSize(OVERLAY_DISP++, G_TX_RENDERTILE, 0, 0, 188, 60); dxdy = 1024.0f / (R_START_LABEL_DD(gSaveContext.language) / 100.0f); width = 48.0f / (R_START_LABEL_DD(gSaveContext.language) / 100.0f); height = 16.0f / (R_START_LABEL_DD(gSaveContext.language) / 100.0f); gSPTextureRectangle( - oGfxCtx->overlay.p++, R_START_LABEL_X(gSaveContext.language) << 2, + OVERLAY_DISP++, R_START_LABEL_X(gSaveContext.language) << 2, R_START_LABEL_Y(gSaveContext.language) << 2, (R_START_LABEL_X(gSaveContext.language) + width) << 2, (R_START_LABEL_Y(gSaveContext.language) + height) << 2, G_TX_RENDERTILE, 0, 0, dxdy, dxdy); } @@ -2770,7 +2770,7 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) { (globalCtx->csCtx.state == 0)) { if (!sCUpInvisible) { // C-Up Button Texture, Color & Label (Navi Text) - gDPPipeSync(oGfxCtx->overlay.p++); + gDPPipeSync(OVERLAY_DISP++); if ((gSaveContext.unk_13EA == 1) || (gSaveContext.unk_13EA == 2) || (gSaveContext.unk_13EA == 5)) { temp = 0; @@ -2781,30 +2781,30 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) { temp = interfaceCtx->healthAlpha; } - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), temp); - gDPSetCombineMode(oGfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); - gSPTextureRectangle(oGfxCtx->overlay.p++, R_C_UP_BTN_X << 2, R_C_UP_BTN_Y << 2, (R_C_UP_BTN_X + 16) << 2, + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), temp); + gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); + gSPTextureRectangle(OVERLAY_DISP++, R_C_UP_BTN_X << 2, R_C_UP_BTN_Y << 2, (R_C_UP_BTN_X + 16) << 2, (R_C_UP_BTN_Y + 16) << 2, G_TX_RENDERTILE, 0, 0, 2048, 2048); - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, temp); - gDPSetEnvColor(oGfxCtx->overlay.p++, 0, 0, 0, 0); - gDPSetCombineLERP(oGfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, + gDPPipeSync(OVERLAY_DISP++); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, temp); + gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, 0); + gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); - gDPSetTextureImage(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, + gDPSetTextureImage(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, sCUpLabelTextures[gSaveContext.language]); - gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, + gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPLoadSync(oGfxCtx->overlay.p++); - gDPLoadBlock(oGfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, 63, 1024); - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_4b, 2, 0, G_TX_RENDERTILE, 0, + gDPLoadSync(OVERLAY_DISP++); + gDPLoadBlock(OVERLAY_DISP++, G_TX_LOADTILE, 0, 0, 63, 1024); + gDPPipeSync(OVERLAY_DISP++); + gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_4b, 2, 0, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPSetTileSize(oGfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 124, 28); + gDPSetTileSize(OVERLAY_DISP++, G_TX_RENDERTILE, 0, 0, 124, 28); - gSPTextureRectangle(oGfxCtx->overlay.p++, R_C_UP_ICON_X << 2, R_C_UP_ICON_Y << 2, (R_C_UP_ICON_X + 32) << 2, + gSPTextureRectangle(OVERLAY_DISP++, R_C_UP_ICON_X << 2, R_C_UP_ICON_Y << 2, (R_C_UP_ICON_X + 32) << 2, (R_C_UP_ICON_Y + 8) << 2, G_TX_RENDERTILE, 0, 0, 1024, 1024); } @@ -2815,24 +2815,24 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) { } } - gDPPipeSync(oGfxCtx->overlay.p++); + gDPPipeSync(OVERLAY_DISP++); // Empty C Button Arrows for (temp = 1; temp < 4; temp++) { if (gSaveContext.equips.buttonItems[temp] > 0xF0) { if (temp == 1) { - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), interfaceCtx->cLeftAlpha); } else if (temp == 2) { - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), interfaceCtx->cDownAlpha); } else { - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), interfaceCtx->cRightAlpha); } - oGfxCtx->overlay.p = Gfx_TextureIA8( - oGfxCtx->overlay.p, &D_02000A00[temp + 1], 0x20, 0x20, R_ITEM_BTN_X(temp), R_ITEM_BTN_Y(temp), + OVERLAY_DISP = Gfx_TextureIA8( + OVERLAY_DISP, &D_02000A00[temp + 1], 0x20, 0x20, R_ITEM_BTN_X(temp), R_ITEM_BTN_Y(temp), R_ITEM_BTN_WIDTH(temp), R_ITEM_BTN_WIDTH(temp), R_ITEM_BTN_DD(temp) * 2, R_ITEM_BTN_DD(temp) * 2); } } @@ -2843,11 +2843,11 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) { void Interface_DrawItemIconTexture(GlobalContext* globalCtx, void* texture, s16 button) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_parameter.c", 3079); - gDPLoadTextureBlock(oGfxCtx->overlay.p++, texture, G_IM_FMT_RGBA, G_IM_SIZ_32b, 32, 32, 0, + gDPLoadTextureBlock(OVERLAY_DISP++, texture, G_IM_FMT_RGBA, G_IM_SIZ_32b, 32, 32, 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); - gSPTextureRectangle(oGfxCtx->overlay.p++, R_ITEM_ICON_X(button) << 2, R_ITEM_ICON_Y(button) << 2, + gSPTextureRectangle(OVERLAY_DISP++, R_ITEM_ICON_X(button) << 2, R_ITEM_ICON_Y(button) << 2, (R_ITEM_ICON_X(button) + R_ITEM_ICON_WIDTH(button)) << 2, (R_ITEM_ICON_Y(button) + R_ITEM_ICON_WIDTH(button)) << 2, G_TX_RENDERTILE, 0, 0, R_ITEM_ICON_DD(button) * 2, R_ITEM_ICON_DD(button) * 2); @@ -2873,7 +2873,7 @@ void Interface_DrawAmmoCount(GlobalContext* globalCtx, s16 button, s16 alpha) { ammo = AMMO(i); - gDPPipeSync(oGfxCtx->overlay.p++); + gDPPipeSync(OVERLAY_DISP++); if ((button == 0) && (gSaveContext.minigameState == 1)) { ammo = globalCtx->interfaceCtx.hbaAmmo; @@ -2890,11 +2890,11 @@ void Interface_DrawAmmoCount(GlobalContext* globalCtx, s16 button, s16 alpha) { ((i == ITEM_STICK) && (AMMO(i) == CUR_CAPACITY(UPG_STICKS))) || ((i == ITEM_NUT) && (AMMO(i) == CUR_CAPACITY(UPG_NUTS))) || ((i == ITEM_BOMBCHU) && (ammo == 50)) || ((i == ITEM_BEAN) && (ammo == 15))) { - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 120, 255, 0, alpha); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 120, 255, 0, alpha); } if (ammo == 0) { - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 100, 100, 100, alpha); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 100, 100, 100, alpha); } for (i = 0; ammo >= 10; i++) { @@ -2902,11 +2902,11 @@ void Interface_DrawAmmoCount(GlobalContext* globalCtx, s16 button, s16 alpha) { } if (i != 0) { - oGfxCtx->overlay.p = Gfx_TextureIA8(oGfxCtx->overlay.p, &D_020035C0[i], 8, 8, R_ITEM_AMMO_X(button), + OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, &D_020035C0[i], 8, 8, R_ITEM_AMMO_X(button), R_ITEM_AMMO_Y(button), 8, 8, 1024, 1024); } - oGfxCtx->overlay.p = Gfx_TextureIA8(oGfxCtx->overlay.p, &D_020035C0[ammo], 8, 8, R_ITEM_AMMO_X(button) + 6, + OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, &D_020035C0[ammo], 8, 8, R_ITEM_AMMO_X(button) + 6, R_ITEM_AMMO_Y(button), 8, 8, 1024, 1024); } @@ -2924,15 +2924,15 @@ void Interface_DrawActionButton(GlobalContext* globalCtx) { if (1) {} // Necessary to match - gSPMatrix(oGfxCtx->overlay.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_parameter.c", 3177), + gSPMatrix(OVERLAY_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_parameter.c", 3177), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPVertex(oGfxCtx->overlay.p++, interfaceCtx->vtx_128, 4, 0); + gSPVertex(OVERLAY_DISP++, interfaceCtx->vtx_128, 4, 0); - gDPLoadTextureBlock(oGfxCtx->overlay.p++, &D_02000A00[0], G_IM_FMT_IA, G_IM_SIZ_8b, 32, 32, 0, + gDPLoadTextureBlock(OVERLAY_DISP++, &D_02000A00[0], G_IM_FMT_IA, G_IM_SIZ_8b, 32, 32, 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); - gSP1Quadrangle(oGfxCtx->overlay.p++, 0, 2, 3, 1, 0); + gSP1Quadrangle(OVERLAY_DISP++, 0, 2, 3, 1, 0); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_parameter.c", 3187); } @@ -3087,10 +3087,10 @@ void Interface_Draw(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_parameter.c", 3405); - gSPSegment(oGfxCtx->overlay.p++, 0x02, interfaceCtx->parameterSegment); - gSPSegment(oGfxCtx->overlay.p++, 0x07, interfaceCtx->do_actionSegment); - gSPSegment(oGfxCtx->overlay.p++, 0x08, interfaceCtx->icon_itemSegment); - gSPSegment(oGfxCtx->overlay.p++, 0x0B, interfaceCtx->mapSegment); + gSPSegment(OVERLAY_DISP++, 0x02, interfaceCtx->parameterSegment); + gSPSegment(OVERLAY_DISP++, 0x07, interfaceCtx->do_actionSegment); + gSPSegment(OVERLAY_DISP++, 0x08, interfaceCtx->icon_itemSegment); + gSPSegment(OVERLAY_DISP++, 0x0B, interfaceCtx->mapSegment); if (pauseCtx->flag == 0) { Interface_InitVertices(globalCtx); @@ -3100,9 +3100,9 @@ void Interface_Draw(GlobalContext* globalCtx) { func_80094520(globalCtx->state.gfxCtx); // Rupee Icon - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 200, 255, 100, interfaceCtx->magicAlpha); - gDPSetEnvColor(oGfxCtx->overlay.p++, 0, 80, 0, 255); - oGfxCtx->overlay.p = Gfx_TextureIA8(oGfxCtx->overlay.p, D_02001F00, 16, 16, 26, 206, 16, 16, 1024, 1024); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 200, 255, 100, interfaceCtx->magicAlpha); + gDPSetEnvColor(OVERLAY_DISP++, 0, 80, 0, 255); + OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, D_02001F00, 16, 16, 26, 206, 16, 16, 1024, 1024); switch (globalCtx->sceneNum) { case SCENE_BMORI1: @@ -3121,16 +3121,16 @@ void Interface_Draw(GlobalContext* globalCtx) { case SCENE_TAKARAYA: if (gSaveContext.inventory.dungeonKeys[gSaveContext.mapIndex] >= 0) { // Small Key Icon - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 200, 230, 255, interfaceCtx->magicAlpha); - gDPSetEnvColor(oGfxCtx->overlay.p++, 0, 0, 20, 255); - oGfxCtx->overlay.p = - Gfx_TextureIA8(oGfxCtx->overlay.p, D_02001E00, 16, 16, 26, 190, 16, 16, 1024, 1024); + gDPPipeSync(OVERLAY_DISP++); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 200, 230, 255, interfaceCtx->magicAlpha); + gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 20, 255); + OVERLAY_DISP = + Gfx_TextureIA8(OVERLAY_DISP, D_02001E00, 16, 16, 26, 190, 16, 16, 1024, 1024); // Small Key Counter - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->magicAlpha); - gDPSetCombineLERP(oGfxCtx->overlay.p++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, + gDPPipeSync(OVERLAY_DISP++); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->magicAlpha); + gDPSetCombineLERP(OVERLAY_DISP++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0); interfaceCtx->counterDigits[2] = 0; @@ -3143,13 +3143,13 @@ void Interface_Draw(GlobalContext* globalCtx) { phi_s2 = 42; if (interfaceCtx->counterDigits[2] != 0) { - oGfxCtx->overlay.p = - Gfx_TextureI8(oGfxCtx->overlay.p, &D_02003040[interfaceCtx->counterDigits[2]], 8, 16, + OVERLAY_DISP = + Gfx_TextureI8(OVERLAY_DISP, &D_02003040[interfaceCtx->counterDigits[2]], 8, 16, phi_s2, 190, 8, 16, 1024, 1024); phi_s2 = 50; } - oGfxCtx->overlay.p = Gfx_TextureI8(oGfxCtx->overlay.p, &D_02003040[interfaceCtx->counterDigits[3]], + OVERLAY_DISP = Gfx_TextureI8(OVERLAY_DISP, &D_02003040[interfaceCtx->counterDigits[3]], 8, 16, phi_s2, 190, 8, 16, 1024, 1024); } @@ -3163,17 +3163,17 @@ void Interface_Draw(GlobalContext* globalCtx) { phi_s2 = 42; // Rupee Counter - gDPPipeSync(oGfxCtx->overlay.p++); + gDPPipeSync(OVERLAY_DISP++); if (gSaveContext.rupees == CUR_CAPACITY(UPG_WALLET)) { - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 120, 255, 0, interfaceCtx->magicAlpha); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 120, 255, 0, interfaceCtx->magicAlpha); } else if (gSaveContext.rupees != 0) { - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->magicAlpha); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->magicAlpha); } else { - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 100, 100, 100, interfaceCtx->magicAlpha); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 100, 100, 100, interfaceCtx->magicAlpha); } - gDPSetCombineLERP(oGfxCtx->overlay.p++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, + gDPSetCombineLERP(OVERLAY_DISP++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0); interfaceCtx->counterDigits[0] = interfaceCtx->counterDigits[1] = 0; @@ -3197,7 +3197,7 @@ void Interface_Draw(GlobalContext* globalCtx) { phi_s1 = sRupeeDigitsCount[CUR_UPG_VALUE(UPG_WALLET)]; for (phi_s3 = 0; phi_s3 < phi_s1; phi_s3++, phi_s0++, phi_s2 += 8) { - oGfxCtx->overlay.p = Gfx_TextureI8(oGfxCtx->overlay.p, &D_02003040[interfaceCtx->counterDigits[phi_s0]], 8, + OVERLAY_DISP = Gfx_TextureI8(OVERLAY_DISP, &D_02003040[interfaceCtx->counterDigits[phi_s0]], 8, 16, phi_s2, 206, 8, 16, 1024, 1024); } @@ -3212,9 +3212,9 @@ void Interface_Draw(GlobalContext* globalCtx) { Interface_DrawItemButtons(globalCtx); - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->bAlpha); - gDPSetCombineMode(oGfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); + gDPPipeSync(OVERLAY_DISP++); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->bAlpha); + gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); if (interfaceCtx->unk_1FA == 0) { // B Button Icon & possibly Ammo Count @@ -3223,8 +3223,8 @@ void Interface_Draw(GlobalContext* globalCtx) { if ((player->stateFlags1 & 0x00800000) || (globalCtx->unk_11E5C >= 2) || ((globalCtx->sceneNum == SCENE_BOWLING) && Flags_GetSwitch(globalCtx, 0x38))) { - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetCombineLERP(oGfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, + gDPPipeSync(OVERLAY_DISP++); + gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); Interface_DrawAmmoCount(globalCtx, 0, interfaceCtx->bAlpha); @@ -3232,66 +3232,66 @@ void Interface_Draw(GlobalContext* globalCtx) { } } else { // B Button Do Action Label - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetCombineLERP(oGfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, + gDPPipeSync(OVERLAY_DISP++); + gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->bAlpha); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->bAlpha); - gDPSetTextureImage(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, + gDPSetTextureImage(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, (u32)interfaceCtx->do_actionSegment + 0x180); - gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, + gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPLoadSync(oGfxCtx->overlay.p++); - gDPLoadBlock(oGfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, 191, 683); - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_4b, 3, 0x0000, G_TX_RENDERTILE, 0, + gDPLoadSync(OVERLAY_DISP++); + gDPLoadBlock(OVERLAY_DISP++, G_TX_LOADTILE, 0, 0, 191, 683); + gDPPipeSync(OVERLAY_DISP++); + gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_4b, 3, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPSetTileSize(oGfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 188, 60); + gDPSetTileSize(OVERLAY_DISP++, G_TX_RENDERTILE, 0, 0, 188, 60); R_B_LABEL_DD = 1024.0f / (WREG(37 + gSaveContext.language) / 100.0f); - gSPTextureRectangle(oGfxCtx->overlay.p++, R_B_LABEL_X(gSaveContext.language) << 2, + gSPTextureRectangle(OVERLAY_DISP++, R_B_LABEL_X(gSaveContext.language) << 2, R_B_LABEL_Y(gSaveContext.language) << 2, (R_B_LABEL_X(gSaveContext.language) + 48) << 2, (R_B_LABEL_Y(gSaveContext.language) + 16) << 2, G_TX_RENDERTILE, 0, 0, R_B_LABEL_DD, R_B_LABEL_DD); } - gDPPipeSync(oGfxCtx->overlay.p++); + gDPPipeSync(OVERLAY_DISP++); // C-Left Button Icon & Ammo Count if (gSaveContext.equips.buttonItems[1] < 0xF0) { - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->cLeftAlpha); - gDPSetCombineMode(oGfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->cLeftAlpha); + gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); Interface_DrawItemIconTexture(globalCtx, (void*)((u32)interfaceCtx->icon_itemSegment + 0x1000), 1); - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetCombineLERP(oGfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, + gDPPipeSync(OVERLAY_DISP++); + gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); Interface_DrawAmmoCount(globalCtx, 1, interfaceCtx->cLeftAlpha); } - gDPPipeSync(oGfxCtx->overlay.p++); + gDPPipeSync(OVERLAY_DISP++); // C-Down Button Icon & Ammo Count if (gSaveContext.equips.buttonItems[2] < 0xF0) { - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->cDownAlpha); - gDPSetCombineMode(oGfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->cDownAlpha); + gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); Interface_DrawItemIconTexture(globalCtx, (void*)((u32)interfaceCtx->icon_itemSegment + 0x2000), 2); - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetCombineLERP(oGfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, + gDPPipeSync(OVERLAY_DISP++); + gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); Interface_DrawAmmoCount(globalCtx, 2, interfaceCtx->cDownAlpha); } - gDPPipeSync(oGfxCtx->overlay.p++); + gDPPipeSync(OVERLAY_DISP++); // C-Right Button Icon & Ammo Count if (gSaveContext.equips.buttonItems[3] < 0xF0) { - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->cRightAlpha); - gDPSetCombineMode(oGfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->cRightAlpha); + gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); Interface_DrawItemIconTexture(globalCtx, (void*)((u32)interfaceCtx->icon_itemSegment + 0x3000), 3); - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetCombineLERP(oGfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, + gDPPipeSync(OVERLAY_DISP++); + gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); Interface_DrawAmmoCount(globalCtx, 3, interfaceCtx->cRightAlpha); } @@ -3299,24 +3299,24 @@ void Interface_Draw(GlobalContext* globalCtx) { // A Button func_80094A14(globalCtx->state.gfxCtx); func_8008A8B8(globalCtx, R_A_BTN_Y, R_A_BTN_Y + 45, R_A_BTN_X, R_A_BTN_X + 45); - gSPClearGeometryMode(oGfxCtx->overlay.p++, G_CULL_BOTH); - gDPSetCombineMode(oGfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, R_A_BTN_COLOR(0), R_A_BTN_COLOR(1), R_A_BTN_COLOR(2), + gSPClearGeometryMode(OVERLAY_DISP++, G_CULL_BOTH); + gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, R_A_BTN_COLOR(0), R_A_BTN_COLOR(1), R_A_BTN_COLOR(2), interfaceCtx->aAlpha); Interface_DrawActionButton(globalCtx); - gDPPipeSync(oGfxCtx->overlay.p++); + gDPPipeSync(OVERLAY_DISP++); func_8008A8B8(globalCtx, R_A_ICON_Y, R_A_ICON_Y + 45, R_A_ICON_X, R_A_ICON_X + 45); - gSPSetGeometryMode(oGfxCtx->overlay.p++, G_CULL_BACK); - gDPSetCombineLERP(oGfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, + gSPSetGeometryMode(OVERLAY_DISP++, G_CULL_BACK); + gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->aAlpha); - gDPSetEnvColor(oGfxCtx->overlay.p++, 0, 0, 0, 0); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->aAlpha); + gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, 0); Matrix_Translate(0.0f, 0.0f, WREG(46 + gSaveContext.language) / 10.0f, MTXMODE_NEW); Matrix_Scale(1.0f, 1.0f, 1.0f, MTXMODE_APPLY); Matrix_RotateX(interfaceCtx->unk_1F4 / 10000.0f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->overlay.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_parameter.c", 3701), + gSPMatrix(OVERLAY_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_parameter.c", 3701), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPVertex(oGfxCtx->overlay.p++, &interfaceCtx->vtx_128[4], 4, 0); + gSPVertex(OVERLAY_DISP++, &interfaceCtx->vtx_128[4], 4, 0); if ((interfaceCtx->unk_1EC < 2) || (interfaceCtx->unk_1EC == 3)) { Interface_DrawActionLabel(globalCtx->state.gfxCtx, (void*)(u32)interfaceCtx->do_actionSegment); @@ -3324,16 +3324,16 @@ void Interface_Draw(GlobalContext* globalCtx) { Interface_DrawActionLabel(globalCtx->state.gfxCtx, (void*)((u32)interfaceCtx->do_actionSegment + 0x180)); } - gDPPipeSync(oGfxCtx->overlay.p++); + gDPPipeSync(OVERLAY_DISP++); func_8008A994(interfaceCtx); if ((pauseCtx->state == 6) && (pauseCtx->unk_1E4 == 3)) { // Inventory Equip Effects - gSPSegment(oGfxCtx->overlay.p++, 0x08, pauseCtx->unk_128); + gSPSegment(OVERLAY_DISP++, 0x08, pauseCtx->unk_128); func_80094A14(globalCtx->state.gfxCtx); - gDPSetCombineMode(oGfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); - gSPMatrix(oGfxCtx->overlay.p++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); + gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); + gSPMatrix(OVERLAY_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); pauseCtx->vtx_168[16].v.ob[0] = pauseCtx->vtx_168[18].v.ob[0] = pauseCtx->unk_254 / 10; pauseCtx->vtx_168[17].v.ob[0] = pauseCtx->vtx_168[19].v.ob[0] = @@ -3344,24 +3344,24 @@ void Interface_Draw(GlobalContext* globalCtx) { if (pauseCtx->unk_24E < 0xBF) { // Normal Equip (icon goes from the inventory slot to the C button when equipping it) - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, pauseCtx->unk_258); - gSPVertex(oGfxCtx->overlay.p++, &pauseCtx->vtx_168[16], 4, 0); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, pauseCtx->unk_258); + gSPVertex(OVERLAY_DISP++, &pauseCtx->vtx_168[16], 4, 0); - gDPSetTextureImage(oGfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 1, gItemIcons[pauseCtx->unk_24E]); - gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 0, 0x0000, G_TX_LOADTILE, 0, + gDPSetTextureImage(OVERLAY_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 1, gItemIcons[pauseCtx->unk_24E]); + gDPSetTile(OVERLAY_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPLoadSync(oGfxCtx->overlay.p++); - gDPLoadBlock(oGfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, 1023, 128); - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 8, 0x0000, G_TX_RENDERTILE, 0, + gDPLoadSync(OVERLAY_DISP++); + gDPLoadBlock(OVERLAY_DISP++, G_TX_LOADTILE, 0, 0, 1023, 128); + gDPPipeSync(OVERLAY_DISP++); + gDPSetTile(OVERLAY_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 8, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPSetTileSize(oGfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 124, 124); + gDPSetTileSize(OVERLAY_DISP++, G_TX_RENDERTILE, 0, 0, 124, 124); } else { // Magic Arrow Equip Effect phi_s3_2 = pauseCtx->unk_24E - 0xBF; - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, sMagicArrowEffectsR[phi_s3_2], + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, sMagicArrowEffectsR[phi_s3_2], sMagicArrowEffectsG[phi_s3_2], sMagicArrowEffectsB[phi_s3_2], pauseCtx->unk_258); if ((pauseCtx->unk_258 > 0) && (pauseCtx->unk_258 < 0xFF)) { @@ -3376,21 +3376,21 @@ void Interface_Draw(GlobalContext* globalCtx) { pauseCtx->vtx_168[16].v.ob[1] - phi_s3_2 * 2 - 32; } - gSPVertex(oGfxCtx->overlay.p++, &pauseCtx->vtx_168[16], 4, 0); - gDPSetTextureImage(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, D_080895C0); - gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, + gSPVertex(OVERLAY_DISP++, &pauseCtx->vtx_168[16], 4, 0); + gDPSetTextureImage(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, D_080895C0); + gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPLoadSync(oGfxCtx->overlay.p++); - gDPLoadBlock(oGfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, 511, 512); - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 4, 0x0000, G_TX_RENDERTILE, 0, + gDPLoadSync(OVERLAY_DISP++); + gDPLoadBlock(OVERLAY_DISP++, G_TX_LOADTILE, 0, 0, 511, 512); + gDPPipeSync(OVERLAY_DISP++); + gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_8b, 4, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPSetTileSize(oGfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 124, 124); + gDPSetTileSize(OVERLAY_DISP++, G_TX_RENDERTILE, 0, 0, 124, 124); } - gSP1Quadrangle(oGfxCtx->overlay.p++, 0, 2, 3, 1, 0); + gSP1Quadrangle(OVERLAY_DISP++, 0, 2, 3, 1, 0); } func_80094520(globalCtx->state.gfxCtx); @@ -3400,29 +3400,29 @@ void Interface_Draw(GlobalContext* globalCtx) { // Carrots rendering if the action corresponds to riding a horse if (interfaceCtx->unk_1EE == 8) { // Load Carrot Icon - gDPSetTextureImage(oGfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 1, &D_02002100); - gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 0, 0x0000, G_TX_LOADTILE, 0, + gDPSetTextureImage(OVERLAY_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 1, &D_02002100); + gDPSetTile(OVERLAY_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPLoadSync(oGfxCtx->overlay.p++); - gDPLoadBlock(oGfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, 255, 256); - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 4, 0x0000, G_TX_RENDERTILE, 0, + gDPLoadSync(OVERLAY_DISP++); + gDPLoadBlock(OVERLAY_DISP++, G_TX_LOADTILE, 0, 0, 255, 256); + gDPPipeSync(OVERLAY_DISP++); + gDPSetTile(OVERLAY_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 4, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPSetTileSize(oGfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 60, 60); + gDPSetTileSize(OVERLAY_DISP++, G_TX_RENDERTILE, 0, 0, 60, 60); // Draw 6 carrots phi_s1 = ZREG(14); for (phi_s3 = 1; phi_s3 < 7; phi_s3++) { // Carrot Color (based on availability) if ((interfaceCtx->unk_23A == 0) || (interfaceCtx->unk_23A < phi_s3)) { - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 0, 150, 255, interfaceCtx->aAlpha); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 0, 150, 255, interfaceCtx->aAlpha); } else { - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->aAlpha); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->aAlpha); } - gSPTextureRectangle(oGfxCtx->overlay.p++, phi_s1 << 2, ZREG(15) << 2, (phi_s1 + 16) << 2, + gSPTextureRectangle(OVERLAY_DISP++, phi_s1 << 2, ZREG(15) << 2, (phi_s1 + 16) << 2, (ZREG(15) + 16) << 2, G_TX_RENDERTILE, 0, 0, 1024, 1024); phi_s1 += 16; @@ -3430,42 +3430,42 @@ void Interface_Draw(GlobalContext* globalCtx) { } } else { // Score for the Horseback Archery - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->bAlpha); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->bAlpha); // Target Icon - gDPSetTextureImage(oGfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, D_02002600); - gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, + gDPSetTextureImage(OVERLAY_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, D_02002600); + gDPSetTile(OVERLAY_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPLoadSync(oGfxCtx->overlay.p++); - gDPLoadBlock(oGfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, 383, 342); - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 6, 0x0000, G_TX_RENDERTILE, 0, + gDPLoadSync(OVERLAY_DISP++); + gDPLoadBlock(OVERLAY_DISP++, G_TX_LOADTILE, 0, 0, 383, 342); + gDPPipeSync(OVERLAY_DISP++); + gDPSetTile(OVERLAY_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 6, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPSetTileSize(oGfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 92, 60); + gDPSetTileSize(OVERLAY_DISP++, G_TX_RENDERTILE, 0, 0, 92, 60); - gSPTextureRectangle(oGfxCtx->overlay.p++, (WREG(32) + 28) << 2, ZREG(15) << 2, (WREG(32) + 52) << 2, + gSPTextureRectangle(OVERLAY_DISP++, (WREG(32) + 28) << 2, ZREG(15) << 2, (WREG(32) + 52) << 2, (ZREG(15) + 16) << 2, G_TX_RENDERTILE, 0, 0, 1024, 1024); // Score Counter - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetCombineMode(oGfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); + gDPPipeSync(OVERLAY_DISP++); + gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); phi_s0 = 0; phi_s1 = WREG(32) + 6 * 9; for (phi_s3 = 0; phi_s3 < 4; phi_s3++) { if (sHBAScoreDigits[phi_s3] != 0 || (phi_s0 != 0) || (phi_s3 >= 3)) { - oGfxCtx->overlay.p = - Gfx_TextureI8(oGfxCtx->overlay.p, &D_02003040[sHBAScoreDigits[phi_s3]], 8, 16, phi_s1, + OVERLAY_DISP = + Gfx_TextureI8(OVERLAY_DISP, &D_02003040[sHBAScoreDigits[phi_s3]], 8, 16, phi_s1, ZREG(15) - 2, sDigitWidth[0], VREG(42), VREG(43) * 2, VREG(43) * 2); phi_s1 += 9; phi_s0++; } } - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetCombineMode(oGfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); + gDPPipeSync(OVERLAY_DISP++); + gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); } } @@ -3846,32 +3846,32 @@ void Interface_Draw(GlobalContext* globalCtx) { } // Clock Icon - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, 255); - gDPSetEnvColor(oGfxCtx->overlay.p++, 0, 0, 0, 0); - oGfxCtx->overlay.p = Gfx_TextureIA8(oGfxCtx->overlay.p, D_02002000, 16, 16, gSaveContext.timerX[sp274], + gDPPipeSync(OVERLAY_DISP++); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, 255); + gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, 0); + OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, D_02002000, 16, 16, gSaveContext.timerX[sp274], gSaveContext.timerY[sp274] + 2, 16, 16, 1024, 1024); // Timer Counter - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetCombineMode(oGfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); + gDPPipeSync(OVERLAY_DISP++); + gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); if (gSaveContext.timer1State != 0) { if ((gSaveContext.timer1Value < 10) && (gSaveContext.timer1State < 11)) { - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 50, 0, 255); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 50, 0, 255); } else { - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, 255); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, 255); } } else { if ((gSaveContext.timer2Value < 10) && (gSaveContext.timer2State < 6)) { - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 50, 0, 255); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 50, 0, 255); } else { - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 0, 255); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 0, 255); } } for (phi_s3 = 0; phi_s3 < 5; phi_s3++) { - oGfxCtx->overlay.p = Gfx_TextureI8(oGfxCtx->overlay.p, &D_02003040[sTimerDigits[phi_s3]], 8, 16, + OVERLAY_DISP = Gfx_TextureI8(OVERLAY_DISP, &D_02003040[sTimerDigits[phi_s3]], 8, 16, gSaveContext.timerX[sp274] + sTimerDigitLeftPos[phi_s3], gSaveContext.timerY[sp274], sDigitWidth[phi_s3], VREG(42), VREG(43) * 2, VREG(43) * 2); @@ -3885,10 +3885,10 @@ void Interface_Draw(GlobalContext* globalCtx) { } if (interfaceCtx->unk_244 != 0) { - gDPPipeSync(oGfxCtx->overlay.p++); - gSPDisplayList(oGfxCtx->overlay.p++, sSetupDL_80125A60); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 0, 0, 0, interfaceCtx->unk_244); - gDPFillRectangle(oGfxCtx->overlay.p++, 0, 0, gScreenWidth - 1, gScreenHeight - 1); + gDPPipeSync(OVERLAY_DISP++); + gSPDisplayList(OVERLAY_DISP++, sSetupDL_80125A60); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 0, 0, 0, interfaceCtx->unk_244); + gDPFillRectangle(OVERLAY_DISP++, 0, 0, gScreenWidth - 1, gScreenHeight - 1); } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_parameter.c", 4269); diff --git a/src/code/z_play.c b/src/code/z_play.c index e9d964f7e0..87caa61b57 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -1080,27 +1080,27 @@ void Gameplay_Draw(GlobalContext* globalCtx) { gSegments[5] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[globalCtx->objectCtx.subKeepIndex].segment); gSegments[2] = VIRTUAL_TO_PHYSICAL(globalCtx->sceneSegment); - gSPSegment(oGfxCtx->polyOpa.p++, 0x00, NULL); - gSPSegment(oGfxCtx->polyXlu.p++, 0x00, NULL); - gSPSegment(oGfxCtx->overlay.p++, 0x00, NULL); + gSPSegment(POLY_OPA_DISP++, 0x00, NULL); + gSPSegment(POLY_XLU_DISP++, 0x00, NULL); + gSPSegment(OVERLAY_DISP++, 0x00, NULL); - gSPSegment(oGfxCtx->polyOpa.p++, 0x04, globalCtx->objectCtx.status[globalCtx->objectCtx.mainKeepIndex].segment); - gSPSegment(oGfxCtx->polyXlu.p++, 0x04, globalCtx->objectCtx.status[globalCtx->objectCtx.mainKeepIndex].segment); - gSPSegment(oGfxCtx->overlay.p++, 0x04, globalCtx->objectCtx.status[globalCtx->objectCtx.mainKeepIndex].segment); + gSPSegment(POLY_OPA_DISP++, 0x04, globalCtx->objectCtx.status[globalCtx->objectCtx.mainKeepIndex].segment); + gSPSegment(POLY_XLU_DISP++, 0x04, globalCtx->objectCtx.status[globalCtx->objectCtx.mainKeepIndex].segment); + gSPSegment(OVERLAY_DISP++, 0x04, globalCtx->objectCtx.status[globalCtx->objectCtx.mainKeepIndex].segment); - gSPSegment(oGfxCtx->polyOpa.p++, 0x05, globalCtx->objectCtx.status[globalCtx->objectCtx.subKeepIndex].segment); - gSPSegment(oGfxCtx->polyXlu.p++, 0x05, globalCtx->objectCtx.status[globalCtx->objectCtx.subKeepIndex].segment); - gSPSegment(oGfxCtx->overlay.p++, 0x05, globalCtx->objectCtx.status[globalCtx->objectCtx.subKeepIndex].segment); + gSPSegment(POLY_OPA_DISP++, 0x05, globalCtx->objectCtx.status[globalCtx->objectCtx.subKeepIndex].segment); + gSPSegment(POLY_XLU_DISP++, 0x05, globalCtx->objectCtx.status[globalCtx->objectCtx.subKeepIndex].segment); + gSPSegment(OVERLAY_DISP++, 0x05, globalCtx->objectCtx.status[globalCtx->objectCtx.subKeepIndex].segment); - gSPSegment(oGfxCtx->polyOpa.p++, 0x02, globalCtx->sceneSegment); - gSPSegment(oGfxCtx->polyXlu.p++, 0x02, globalCtx->sceneSegment); - gSPSegment(oGfxCtx->overlay.p++, 0x02, globalCtx->sceneSegment); + gSPSegment(POLY_OPA_DISP++, 0x02, globalCtx->sceneSegment); + gSPSegment(POLY_XLU_DISP++, 0x02, globalCtx->sceneSegment); + gSPSegment(OVERLAY_DISP++, 0x02, globalCtx->sceneSegment); func_80095248(gfxCtx, 0, 0, 0); if ((HREG(80) != 10) || (HREG(82) != 0)) { - oGfxCtx->polyOpa.p = func_800BC8A0(globalCtx, oGfxCtx->polyOpa.p); - oGfxCtx->polyXlu.p = func_800BC8A0(globalCtx, oGfxCtx->polyXlu.p); + POLY_OPA_DISP = func_800BC8A0(globalCtx, POLY_OPA_DISP); + POLY_XLU_DISP = func_800BC8A0(globalCtx, POLY_XLU_DISP); func_800AA460(&globalCtx->view, globalCtx->view.fovy, globalCtx->view.zNear, globalCtx->lightCtx.unk_0C); func_800AAA50(&globalCtx->view, 15); @@ -1120,12 +1120,12 @@ void Gameplay_Draw(GlobalContext* globalCtx) { globalCtx->unk_11DE0 = Matrix_MtxFToMtx(Matrix_CheckFloats(&globalCtx->mf_11DA0, "../z_play.c", 4005), Graph_Alloc(gfxCtx, sizeof(Mtx))); - gSPSegment(oGfxCtx->polyOpa.p++, 0x01, globalCtx->unk_11DE0); + gSPSegment(POLY_OPA_DISP++, 0x01, globalCtx->unk_11DE0); if ((HREG(80) != 10) || (HREG(92) != 0)) { - Gfx* sp1CC = oGfxCtx->polyOpa.p; - Gfx* gfxP = Graph_GfxPlusOne(oGfxCtx->polyOpa.p); - gSPDisplayList(oGfxCtx->overlay.p++, gfxP); + Gfx* sp1CC = POLY_OPA_DISP; + Gfx* gfxP = Graph_GfxPlusOne(POLY_OPA_DISP); + gSPDisplayList(OVERLAY_DISP++, gfxP); if ((globalCtx->transitionMode == 3) || (globalCtx->transitionMode == 11) || (globalCtx->transitionCtx.transitionType >= 56)) { @@ -1149,13 +1149,13 @@ void Gameplay_Draw(GlobalContext* globalCtx) { gSPEndDisplayList(gfxP++); Graph_BranchDlist(sp1CC, gfxP); - oGfxCtx->polyOpa.p = gfxP; + POLY_OPA_DISP = gfxP; } if (gTrnsnUnkState == 3) { - Gfx* sp88 = oGfxCtx->polyOpa.p; + Gfx* sp88 = POLY_OPA_DISP; TransitionUnk_Draw(&sTrnsnUnk, &sp88); - oGfxCtx->polyOpa.p = sp88; + POLY_OPA_DISP = sp88; goto Gameplay_Draw_DrawOverlayElements; } else { PreRender_SetValues(&globalCtx->preRenderCtx, SCREEN_WIDTH, SCREEN_HEIGHT, gfxCtx->curFrameBuffer, @@ -1170,9 +1170,9 @@ void Gameplay_Draw(GlobalContext* globalCtx) { } if (R_PAUSE_MENU_MODE == 3) { - Gfx* sp84 = oGfxCtx->polyOpa.p; + Gfx* sp84 = POLY_OPA_DISP; func_800C24BC(&globalCtx->preRenderCtx, &sp84); - oGfxCtx->polyOpa.p = sp84; + POLY_OPA_DISP = sp84; goto Gameplay_Draw_DrawOverlayElements; } else { s32 sp80; diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c index e5a87bb78b..ff187883c3 100644 --- a/src/code/z_player_lib.c +++ b/src/code/z_player_lib.c @@ -638,16 +638,16 @@ void func_8008F470(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDraw eyeIndex = sEyeMouthIndexes[face][0]; } - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[eyeIndex])); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[eyeIndex])); if (mouthIndex < 0) { mouthIndex = sEyeMouthIndexes[face][1]; } - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(sMouthTextures[mouthIndex])); + gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sMouthTextures[mouthIndex])); color = &sTunicColors[tunic]; - gDPSetEnvColor(oGfxCtx->polyOpa.p++, color->r, color->g, color->b, 0); + gDPSetEnvColor(POLY_OPA_DISP++, color->r, color->g, color->b, 0); sDListsLodOffset = lod * 2; @@ -658,25 +658,25 @@ void func_8008F470(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDraw s32 strengthUpgrade = CUR_UPG_VALUE(UPG_STRENGTH); if (strengthUpgrade >= PLAYER_STR_SILVER_G) { - gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPPipeSync(POLY_OPA_DISP++); color = &sGauntletColors[strengthUpgrade - PLAYER_STR_SILVER_G]; - gDPSetEnvColor(oGfxCtx->polyOpa.p++, color->r, color->g, color->b, 0); + gDPSetEnvColor(POLY_OPA_DISP++, color->r, color->g, color->b, 0); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06025218); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06025598); - gSPDisplayList(oGfxCtx->polyOpa.p++, (D_80160014 == 0) ? D_060252D8 : D_06025438); - gSPDisplayList(oGfxCtx->polyOpa.p++, (D_80160018 == 8) ? D_06025658 : D_060257B8); + gSPDisplayList(POLY_OPA_DISP++, D_06025218); + gSPDisplayList(POLY_OPA_DISP++, D_06025598); + gSPDisplayList(POLY_OPA_DISP++, (D_80160014 == 0) ? D_060252D8 : D_06025438); + gSPDisplayList(POLY_OPA_DISP++, (D_80160018 == 8) ? D_06025658 : D_060257B8); } if (boots != 0) { Gfx** bootDLists = sBootDListGroups[boots - 1]; - gSPDisplayList(oGfxCtx->polyOpa.p++, bootDLists[0]); - gSPDisplayList(oGfxCtx->polyOpa.p++, bootDLists[1]); + gSPDisplayList(POLY_OPA_DISP++, bootDLists[0]); + gSPDisplayList(POLY_OPA_DISP++, bootDLists[1]); } } else { if (Player_GetStrength() > PLAYER_STR_NONE) { - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06016118); + gSPDisplayList(POLY_OPA_DISP++, D_06016118); } } } @@ -1031,8 +1031,8 @@ void Player_DrawGetItemImpl(GlobalContext* globalCtx, Player* this, Vec3f* refPo gSegments[6] = VIRTUAL_TO_PHYSICAL(this->giObjectSegment); - gSPSegment(oGfxCtx->polyOpa.p++, 0x06, this->giObjectSegment); - gSPSegment(oGfxCtx->polyXlu.p++, 0x06, this->giObjectSegment); + gSPSegment(POLY_OPA_DISP++, 0x06, this->giObjectSegment); + gSPSegment(POLY_XLU_DISP++, 0x06, this->giObjectSegment); Matrix_Translate(refPos->x + (3.3f * Math_Sins(this->actor.shape.rot.y)), refPos->y + height, refPos->z + ((3.3f + (IREG(90) / 10.0f)) * Math_Coss(this->actor.shape.rot.y)), MTXMODE_NEW); @@ -1088,7 +1088,7 @@ void func_80090AFC(GlobalContext* globalCtx, Player* this, f32 arg2) { if (func_8003E188(&globalCtx->colCtx, &sp8C, &sp80, &sp74, &sp9C, 1, 1, 1, 1, &sp98) != 0) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_player_lib.c", 2572); - oGfxCtx->overlay.p = Gfx_CallSetupDL(oGfxCtx->overlay.p, 0x07); + OVERLAY_DISP = Gfx_CallSetupDL(OVERLAY_DISP, 0x07); SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, &sp74, &sp68, &sp64); @@ -1097,10 +1097,10 @@ void func_80090AFC(GlobalContext* globalCtx, Player* this, f32 arg2) { Matrix_Translate(sp74.x, sp74.y, sp74.z, MTXMODE_NEW); Matrix_Scale(sp60, sp60, sp60, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->overlay.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_player_lib.c", 2587), + gSPMatrix(OVERLAY_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_player_lib.c", 2587), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPSegment(oGfxCtx->overlay.p++, 0x06, globalCtx->objectCtx.status[this->actor.objBankIndex].segment); - gSPDisplayList(oGfxCtx->overlay.p++, D_0602CB48); + gSPSegment(OVERLAY_DISP++, 0x06, globalCtx->objectCtx.status[this->actor.objBankIndex].segment); + gSPDisplayList(OVERLAY_DISP++, D_0602CB48); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_player_lib.c", 2592); } @@ -1186,9 +1186,9 @@ void func_80090D20(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* Matrix_RotateRPY(-0x8000, 0, 0x4000, MTXMODE_APPLY); Matrix_Scale(1.0f, this->unk_85C, 1.0f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_player_lib.c", 2653), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_player_lib.c", 2653), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06006CC0); + gSPDisplayList(POLY_OPA_DISP++, D_06006CC0); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_player_lib.c", 2656); } else if ((this->actor.scale.y >= 0.0f) && (this->swordState != 0)) { @@ -1207,10 +1207,10 @@ void func_80090D20(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* OPEN_DISPS(globalCtx->state.gfxCtx, "../z_player_lib.c", 2710); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_player_lib.c", 2712), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_player_lib.c", 2712), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, bottleColor->r, bottleColor->g, bottleColor->b, 0); - gSPDisplayList(oGfxCtx->polyXlu.p++, sBottleDLists[gSaveContext.linkAge]); + gDPSetEnvColor(POLY_XLU_DISP++, bottleColor->r, bottleColor->g, bottleColor->b, 0); + gSPDisplayList(POLY_XLU_DISP++, sBottleDLists[gSaveContext.linkAge]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_player_lib.c", 2717); } @@ -1280,9 +1280,9 @@ void func_80090D20(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* Matrix_RotateZ(this->unk_858 * -0.2f, MTXMODE_APPLY); } - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_player_lib.c", 2804), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_player_lib.c", 2804), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, stringData->dList); + gSPDisplayList(POLY_XLU_DISP++, stringData->dList); Matrix_Pull(); @@ -1440,60 +1440,60 @@ void func_80091A24(GlobalContext* globalCtx, void* seg04, void* seg06, struct_80 { s32 pad[2]; } - opaRef = oGfxCtx->polyOpa.p; - oGfxCtx->polyOpa.p++; + opaRef = POLY_OPA_DISP; + POLY_OPA_DISP++; - xluRef = oGfxCtx->polyXlu.p; - oGfxCtx->polyXlu.p++; + xluRef = POLY_XLU_DISP; + POLY_XLU_DISP++; - gSPDisplayList(oGfxCtx->work.p++, oGfxCtx->polyOpa.p); - gSPDisplayList(oGfxCtx->work.p++, oGfxCtx->polyXlu.p); + gSPDisplayList(WORK_DISP++, POLY_OPA_DISP); + gSPDisplayList(WORK_DISP++, POLY_XLU_DISP); - gSPSegment(oGfxCtx->polyOpa.p++, 0x00, NULL); + gSPSegment(POLY_OPA_DISP++, 0x00, NULL); - gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPPipeSync(POLY_OPA_DISP++); - gSPLoadGeometryMode(oGfxCtx->polyOpa.p++, 0); - gSPTexture(oGfxCtx->polyOpa.p++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF); - gDPSetCombineMode(oGfxCtx->polyOpa.p++, G_CC_SHADE, G_CC_SHADE); - gDPSetOtherMode(oGfxCtx->polyOpa.p++, + gSPLoadGeometryMode(POLY_OPA_DISP++, 0); + gSPTexture(POLY_OPA_DISP++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF); + gDPSetCombineMode(POLY_OPA_DISP++, G_CC_SHADE, G_CC_SHADE); + gDPSetOtherMode(POLY_OPA_DISP++, G_AD_DISABLE | G_CD_MAGICSQ | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | G_TP_PERSP | G_CYC_FILL | G_PM_NPRIMITIVE, G_AC_NONE | G_ZS_PIXEL | G_RM_NOOP | G_RM_NOOP2); - gSPLoadGeometryMode(oGfxCtx->polyOpa.p++, G_ZBUFFER | G_SHADE | G_CULL_BACK | G_LIGHTING | G_SHADING_SMOOTH); - gDPSetScissorFrac(oGfxCtx->polyOpa.p++, G_SC_NON_INTERLACE, 0, 0, width * 4.0f, height * 4.0f); - gSPClipRatio(oGfxCtx->polyOpa.p++, FRUSTRATIO_1); + gSPLoadGeometryMode(POLY_OPA_DISP++, G_ZBUFFER | G_SHADE | G_CULL_BACK | G_LIGHTING | G_SHADING_SMOOTH); + gDPSetScissorFrac(POLY_OPA_DISP++, G_SC_NON_INTERLACE, 0, 0, width * 4.0f, height * 4.0f); + gSPClipRatio(POLY_OPA_DISP++, FRUSTRATIO_1); - gDPSetColorImage(oGfxCtx->polyOpa.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, img2); - gDPSetCycleType(oGfxCtx->polyOpa.p++, G_CYC_FILL); - gDPSetRenderMode(oGfxCtx->polyOpa.p++, G_RM_NOOP, G_RM_NOOP2); - gDPSetFillColor(oGfxCtx->polyOpa.p++, (GPACK_RGBA5551(255, 255, 240, 0) << 16) | GPACK_RGBA5551(255, 255, 240, 0)); - gDPFillRectangle(oGfxCtx->polyOpa.p++, 0, 0, width - 1, height - 1); + gDPSetColorImage(POLY_OPA_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, img2); + gDPSetCycleType(POLY_OPA_DISP++, G_CYC_FILL); + gDPSetRenderMode(POLY_OPA_DISP++, G_RM_NOOP, G_RM_NOOP2); + gDPSetFillColor(POLY_OPA_DISP++, (GPACK_RGBA5551(255, 255, 240, 0) << 16) | GPACK_RGBA5551(255, 255, 240, 0)); + gDPFillRectangle(POLY_OPA_DISP++, 0, 0, width - 1, height - 1); - gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPPipeSync(POLY_OPA_DISP++); - gDPSetColorImage(oGfxCtx->polyOpa.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, img1); - gDPSetCycleType(oGfxCtx->polyOpa.p++, G_CYC_FILL); - gDPSetRenderMode(oGfxCtx->polyOpa.p++, G_RM_NOOP, G_RM_NOOP2); - gDPSetFillColor(oGfxCtx->polyOpa.p++, (GPACK_RGBA5551(0, 0, 0, 1) << 16) | GPACK_RGBA5551(0, 0, 0, 1)); - gDPFillRectangle(oGfxCtx->polyOpa.p++, 0, 0, width - 1, height - 1); + gDPSetColorImage(POLY_OPA_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, img1); + gDPSetCycleType(POLY_OPA_DISP++, G_CYC_FILL); + gDPSetRenderMode(POLY_OPA_DISP++, G_RM_NOOP, G_RM_NOOP2); + gDPSetFillColor(POLY_OPA_DISP++, (GPACK_RGBA5551(0, 0, 0, 1) << 16) | GPACK_RGBA5551(0, 0, 0, 1)); + gDPFillRectangle(POLY_OPA_DISP++, 0, 0, width - 1, height - 1); - gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPPipeSync(POLY_OPA_DISP++); - gDPSetDepthImage(oGfxCtx->polyOpa.p++, img2); + gDPSetDepthImage(POLY_OPA_DISP++, img2); viewport.vp.vscale[0] = viewport.vp.vtrans[0] = width * 2; viewport.vp.vscale[1] = viewport.vp.vtrans[1] = height * 2; - gSPViewport(oGfxCtx->polyOpa.p++, &viewport); + gSPViewport(POLY_OPA_DISP++, &viewport); guPerspective(perspMtx, &perspNorm, fovy, (f32)width / (f32)height, 10.0f, 4000.0f, 1.0f); - gSPPerspNormalize(oGfxCtx->polyOpa.p++, perspNorm); - gSPMatrix(oGfxCtx->polyOpa.p++, perspMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); + gSPPerspNormalize(POLY_OPA_DISP++, perspNorm); + gSPMatrix(POLY_OPA_DISP++, perspMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); guLookAt(lookAtMtx, eye->x, eye->y, eye->z, at->x, at->y, at->z, 0.0f, 1.0f, 0.0f); - gSPMatrix(oGfxCtx->polyOpa.p++, lookAtMtx, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); + gSPMatrix(POLY_OPA_DISP++, lookAtMtx, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); sp12C[0] = sword; sp12C[1] = shield; @@ -1501,27 +1501,27 @@ void func_80091A24(GlobalContext* globalCtx, void* seg04, void* seg06, struct_80 func_800D1694(pos->x, pos->y, pos->z, rot); Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); - gSPSegment(oGfxCtx->polyOpa.p++, 0x04, seg04); - gSPSegment(oGfxCtx->polyOpa.p++, 0x06, seg06); + gSPSegment(POLY_OPA_DISP++, 0x04, seg04); + gSPSegment(POLY_OPA_DISP++, 0x06, seg06); - gSPSetLights1(oGfxCtx->polyOpa.p++, lights1); + gSPSetLights1(POLY_OPA_DISP++, lights1); func_80093C80(globalCtx); - oGfxCtx->polyOpa.p = Gfx_SetFog2(oGfxCtx->polyOpa.p++, 0, 0, 0, 0, 997, 1000); + POLY_OPA_DISP = Gfx_SetFog2(POLY_OPA_DISP++, 0, 0, 0, 0, 997, 1000); func_8002EABC(pos, &globalCtx->view.eye, &lightDir, globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0C, gCullBackDList); + gSPSegment(POLY_OPA_DISP++, 0x0C, gCullBackDList); func_8008F470(globalCtx, arg3->skeleton, arg3->limbDrawTable, arg3->dListCount, 0, tunic, boots, 0, func_80091880, NULL, &sp12C); - gSPEndDisplayList(oGfxCtx->polyOpa.p++); - gSPEndDisplayList(oGfxCtx->polyXlu.p++); + gSPEndDisplayList(POLY_OPA_DISP++); + gSPEndDisplayList(POLY_XLU_DISP++); - gSPBranchList(opaRef, oGfxCtx->polyOpa.p); - gSPBranchList(xluRef, oGfxCtx->polyXlu.p); + gSPBranchList(opaRef, POLY_OPA_DISP); + gSPBranchList(xluRef, POLY_XLU_DISP); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_player_lib.c", 3288); } diff --git a/src/code/z_prenmi.c b/src/code/z_prenmi.c index 985b1d3f2b..0a4ed75fbb 100644 --- a/src/code/z_prenmi.c +++ b/src/code/z_prenmi.c @@ -30,11 +30,11 @@ void PreNMI_Draw(PreNMIContext* this) { OPEN_DISPS(gfxCtx, "../z_prenmi.c", 96); - gSPSegment(oGfxCtx->polyOpa.p++, 0x00, NULL); + gSPSegment(POLY_OPA_DISP++, 0x00, NULL); func_80095248(gfxCtx, 0, 0, 0); func_800940B0(gfxCtx); - gDPSetFillColor(oGfxCtx->polyOpa.p++, (GPACK_RGBA5551(255, 255, 255, 1) << 16) | GPACK_RGBA5551(255, 255, 255, 1)); - gDPFillRectangle(oGfxCtx->polyOpa.p++, 0, this->timer + 100, SCREEN_WIDTH - 1, this->timer + 100); + gDPSetFillColor(POLY_OPA_DISP++, (GPACK_RGBA5551(255, 255, 255, 1) << 16) | GPACK_RGBA5551(255, 255, 255, 1)); + gDPFillRectangle(POLY_OPA_DISP++, 0, this->timer + 100, SCREEN_WIDTH - 1, this->timer + 100); CLOSE_DISPS(gfxCtx, "../z_prenmi.c", 112); } diff --git a/src/code/z_rcp.c b/src/code/z_rcp.c index 7af688f2e9..241b1596c9 100644 --- a/src/code/z_rcp.c +++ b/src/code/z_rcp.c @@ -858,7 +858,7 @@ Gfx* func_80093808(Gfx* gfx) { void func_80093848(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1293); - gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x3A]); + gSPDisplayList(POLY_OPA_DISP++, &sSetupDL[6 * 0x3A]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1297); } @@ -866,7 +866,7 @@ void func_80093848(GraphicsContext* gfxCtx) { void func_800938B4(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1309); - gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x39]); + gSPDisplayList(POLY_OPA_DISP++, &sSetupDL[6 * 0x39]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1313); } @@ -874,7 +874,7 @@ void func_800938B4(GraphicsContext* gfxCtx) { void func_80093920(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1325); - gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x32]); + gSPDisplayList(POLY_OPA_DISP++, &sSetupDL[6 * 0x32]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1329); } @@ -882,7 +882,7 @@ void func_80093920(GraphicsContext* gfxCtx) { void func_8009398C(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1341); - gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x33]); + gSPDisplayList(POLY_OPA_DISP++, &sSetupDL[6 * 0x33]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1345); } @@ -890,7 +890,7 @@ void func_8009398C(GraphicsContext* gfxCtx) { void func_800939F8(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1357); - gSPDisplayList(oGfxCtx->polyXlu.p++, &sSetupDL[6 * 0x34]); + gSPDisplayList(POLY_XLU_DISP++, &sSetupDL[6 * 0x34]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1361); } @@ -898,7 +898,7 @@ void func_800939F8(GraphicsContext* gfxCtx) { void func_80093A64(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1373); - gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x35]); + gSPDisplayList(POLY_OPA_DISP++, &sSetupDL[6 * 0x35]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1377); } @@ -906,7 +906,7 @@ void func_80093A64(GraphicsContext* gfxCtx) { void func_80093AD0(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1389); - gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x36]); + gSPDisplayList(POLY_OPA_DISP++, &sSetupDL[6 * 0x36]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1393); } @@ -914,7 +914,7 @@ void func_80093AD0(GraphicsContext* gfxCtx) { void func_80093B3C(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1405); - gSPDisplayList(oGfxCtx->polyXlu.p++, &sSetupDL[6 * 0x37]); + gSPDisplayList(POLY_XLU_DISP++, &sSetupDL[6 * 0x37]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1409); } @@ -922,7 +922,7 @@ void func_80093B3C(GraphicsContext* gfxCtx) { void func_80093BA8(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1421); - gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x1A]); + gSPDisplayList(POLY_OPA_DISP++, &sSetupDL[6 * 0x1A]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1425); } @@ -930,7 +930,7 @@ void func_80093BA8(GraphicsContext* gfxCtx) { void func_80093C14(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1439); - gSPDisplayList(oGfxCtx->polyXlu.p++, &sSetupDL[6 * 0x19]); + gSPDisplayList(POLY_XLU_DISP++, &sSetupDL[6 * 0x19]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1443); } @@ -943,7 +943,7 @@ void func_80093C80(GlobalContext* globalCtx) { if (globalCtx->roomCtx.curRoom.unk_03 == 3) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1460); - gDPSetColorDither(oGfxCtx->polyOpa.p++, G_CD_DISABLE); + gDPSetColorDither(POLY_OPA_DISP++, G_CD_DISABLE); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1462); } @@ -952,7 +952,7 @@ void func_80093C80(GlobalContext* globalCtx) { void func_80093D18(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1475); - gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x19]); + gSPDisplayList(POLY_OPA_DISP++, &sSetupDL[6 * 0x19]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1479); } @@ -960,7 +960,7 @@ void func_80093D18(GraphicsContext* gfxCtx) { void func_80093D84(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1491); - gSPDisplayList(oGfxCtx->polyXlu.p++, &sSetupDL[6 * 0x19]); + gSPDisplayList(POLY_XLU_DISP++, &sSetupDL[6 * 0x19]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1495); } @@ -968,7 +968,7 @@ void func_80093D84(GraphicsContext* gfxCtx) { void func_80093DF0(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1507); - gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x1F]); + gSPDisplayList(POLY_OPA_DISP++, &sSetupDL[6 * 0x1F]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1511); } @@ -976,7 +976,7 @@ void func_80093DF0(GraphicsContext* gfxCtx) { void func_80093E5C(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1523); - gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x20]); + gSPDisplayList(POLY_OPA_DISP++, &sSetupDL[6 * 0x20]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1527); } @@ -984,7 +984,7 @@ void func_80093E5C(GraphicsContext* gfxCtx) { void func_80093EC8(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1539); - gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x21]); + gSPDisplayList(POLY_OPA_DISP++, &sSetupDL[6 * 0x21]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1543); } @@ -1002,7 +1002,7 @@ Gfx* func_80093F58(Gfx* gfx) { void func_80093F7C(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1569); - oGfxCtx->polyOpa.p = func_80093F58(oGfxCtx->polyOpa.p); + POLY_OPA_DISP = func_80093F58(POLY_OPA_DISP); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1573); } @@ -1010,7 +1010,7 @@ void func_80093F7C(GraphicsContext* gfxCtx) { void func_80093FD8(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1585); - gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x23]); + gSPDisplayList(POLY_OPA_DISP++, &sSetupDL[6 * 0x23]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1589); } @@ -1018,7 +1018,7 @@ void func_80093FD8(GraphicsContext* gfxCtx) { void func_80094044(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1601); - gSPDisplayList(oGfxCtx->polyXlu.p++, &sSetupDL[6 * 0x2C]); + gSPDisplayList(POLY_XLU_DISP++, &sSetupDL[6 * 0x2C]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1605); } @@ -1026,7 +1026,7 @@ void func_80094044(GraphicsContext* gfxCtx) { void func_800940B0(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1617); - gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x24]); + gSPDisplayList(POLY_OPA_DISP++, &sSetupDL[6 * 0x24]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1621); } @@ -1039,7 +1039,7 @@ Gfx* func_8009411C(Gfx* gfx) { void func_80094140(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1640); - gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x1C]); + gSPDisplayList(POLY_OPA_DISP++, &sSetupDL[6 * 0x1C]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1644); } @@ -1047,7 +1047,7 @@ void func_80094140(GraphicsContext* gfxCtx) { void func_800941AC(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1651); - gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x2B]); + gSPDisplayList(POLY_OPA_DISP++, &sSetupDL[6 * 0x2B]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1655); } @@ -1055,7 +1055,7 @@ void func_800941AC(GraphicsContext* gfxCtx) { void func_80094218(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1670); - gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x2D]); + gSPDisplayList(POLY_OPA_DISP++, &sSetupDL[6 * 0x2D]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1674); } @@ -1063,7 +1063,7 @@ void func_80094218(GraphicsContext* gfxCtx) { void func_80094284(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1681); - gSPDisplayList(oGfxCtx->overlay.p++, &sSetupDL[6 * 0x2E]); + gSPDisplayList(OVERLAY_DISP++, &sSetupDL[6 * 0x2E]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1685); } @@ -1071,7 +1071,7 @@ void func_80094284(GraphicsContext* gfxCtx) { void func_800942F0(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1700); - gSPDisplayList(oGfxCtx->polyXlu.p++, &sSetupDL[6 * 0x26]); + gSPDisplayList(POLY_XLU_DISP++, &sSetupDL[6 * 0x26]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1704); } @@ -1079,7 +1079,7 @@ void func_800942F0(GraphicsContext* gfxCtx) { void func_8009435C(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1722); - gSPDisplayList(oGfxCtx->polyXlu.p++, &sSetupDL[6 * 0x04]); + gSPDisplayList(POLY_XLU_DISP++, &sSetupDL[6 * 0x04]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1726); } @@ -1087,7 +1087,7 @@ void func_8009435C(GraphicsContext* gfxCtx) { void func_800943C8(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1758); - gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x25]); + gSPDisplayList(POLY_OPA_DISP++, &sSetupDL[6 * 0x25]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1762); } @@ -1095,7 +1095,7 @@ void func_800943C8(GraphicsContext* gfxCtx) { void func_80094434(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1775); - gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x02]); + gSPDisplayList(POLY_OPA_DISP++, &sSetupDL[6 * 0x02]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1779); } @@ -1108,7 +1108,7 @@ Gfx* func_800944A0(Gfx* gfx) { void func_800944C4(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1799); - oGfxCtx->polyOpa.p = func_800944A0(oGfxCtx->polyOpa.p); + POLY_OPA_DISP = func_800944A0(POLY_OPA_DISP); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1801); } @@ -1116,7 +1116,7 @@ void func_800944C4(GraphicsContext* gfxCtx) { void func_80094520(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1809); - oGfxCtx->overlay.p = func_800944A0(oGfxCtx->overlay.p); + OVERLAY_DISP = func_800944A0(OVERLAY_DISP); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1811); } @@ -1130,7 +1130,7 @@ void func_8009457C(Gfx** gfxp) { void func_800945A0(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1837); - gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x28]); + gSPDisplayList(POLY_OPA_DISP++, &sSetupDL[6 * 0x28]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1841); } @@ -1138,7 +1138,7 @@ void func_800945A0(GraphicsContext* gfxCtx) { void func_8009460C(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1853); - gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x29]); + gSPDisplayList(POLY_OPA_DISP++, &sSetupDL[6 * 0x29]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1857); } @@ -1146,7 +1146,7 @@ void func_8009460C(GraphicsContext* gfxCtx) { void func_80094678(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1869); - gSPDisplayList(oGfxCtx->polyXlu.p++, &sSetupDL[6 * 0x2F]); + gSPDisplayList(POLY_XLU_DISP++, &sSetupDL[6 * 0x2F]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1873); } @@ -1210,7 +1210,7 @@ Gfx* func_80094968(Gfx* gfx) { void func_800949A8(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1953); - gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x2A]); + gSPDisplayList(POLY_OPA_DISP++, &sSetupDL[6 * 0x2A]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1957); } @@ -1218,7 +1218,7 @@ void func_800949A8(GraphicsContext* gfxCtx) { void func_80094A14(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1964); - gSPDisplayList(oGfxCtx->overlay.p++, &sSetupDL[6 * 0x2A]); + gSPDisplayList(OVERLAY_DISP++, &sSetupDL[6 * 0x2A]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1968); } @@ -1226,7 +1226,7 @@ void func_80094A14(GraphicsContext* gfxCtx) { void func_80094A80(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 1992); - gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x30]); + gSPDisplayList(POLY_OPA_DISP++, &sSetupDL[6 * 0x30]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1996); } @@ -1234,7 +1234,7 @@ void func_80094A80(GraphicsContext* gfxCtx) { void func_80094AEC(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 2008); - gSPDisplayList(oGfxCtx->polyXlu.p++, &sSetupDL[6 * 0x31]); + gSPDisplayList(POLY_XLU_DISP++, &sSetupDL[6 * 0x31]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 2012); } @@ -1242,7 +1242,7 @@ void func_80094AEC(GraphicsContext* gfxCtx) { void func_80094B58(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 2024); - gSPDisplayList(oGfxCtx->polyXlu.p++, &sSetupDL[6 * 0x1B]); + gSPDisplayList(POLY_XLU_DISP++, &sSetupDL[6 * 0x1B]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 2028); } @@ -1250,8 +1250,8 @@ void func_80094B58(GraphicsContext* gfxCtx) { void func_80094BC4(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 2040); - gSPDisplayList(oGfxCtx->polyXlu.p++, &sSetupDL[6 * 0x3C]); - gDPSetColorDither(oGfxCtx->polyXlu.p++, G_CD_DISABLE); + gSPDisplayList(POLY_XLU_DISP++, &sSetupDL[6 * 0x3C]); + gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 2043); } @@ -1259,7 +1259,7 @@ void func_80094BC4(GraphicsContext* gfxCtx) { void func_80094C50(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 2056); - gSPDisplayList(oGfxCtx->polyXlu.p++, &sSetupDL[6 * 0x3D]); + gSPDisplayList(POLY_XLU_DISP++, &sSetupDL[6 * 0x3D]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 2058); } @@ -1267,7 +1267,7 @@ void func_80094C50(GraphicsContext* gfxCtx) { void func_80094CBC(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 2086); - gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x38]); + gSPDisplayList(POLY_OPA_DISP++, &sSetupDL[6 * 0x38]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 2090); } @@ -1283,7 +1283,7 @@ void func_80094D28(Gfx** gfxp) { void func_80094D4C(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 2112); - gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x3B]); + gSPDisplayList(POLY_OPA_DISP++, &sSetupDL[6 * 0x3B]); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 2116); } @@ -1368,22 +1368,22 @@ Gfx* Gfx_EnvColor(GraphicsContext* gfxCtx, s32 r, s32 g, s32 b, s32 a) { void func_80095248(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 2386); - gSPDisplayList(oGfxCtx->polyOpa.p++, sFillSetupDL); - gSPDisplayList(oGfxCtx->polyXlu.p++, sFillSetupDL); - gSPDisplayList(oGfxCtx->overlay.p++, sFillSetupDL); + gSPDisplayList(POLY_OPA_DISP++, sFillSetupDL); + gSPDisplayList(POLY_XLU_DISP++, sFillSetupDL); + gSPDisplayList(OVERLAY_DISP++, sFillSetupDL); - gDPSetScissorFrac(oGfxCtx->polyOpa.p++, G_SC_NON_INTERLACE, 0, 0, gScreenWidth * 4.0f, gScreenHeight * 4.0f); - gDPSetScissorFrac(oGfxCtx->polyXlu.p++, G_SC_NON_INTERLACE, 0, 0, gScreenWidth * 4.0f, gScreenHeight * 4.0f); - gDPSetScissorFrac(oGfxCtx->overlay.p++, G_SC_NON_INTERLACE, 0, 0, gScreenWidth * 4.0f, gScreenHeight * 4.0f); + gDPSetScissorFrac(POLY_OPA_DISP++, G_SC_NON_INTERLACE, 0, 0, gScreenWidth * 4.0f, gScreenHeight * 4.0f); + gDPSetScissorFrac(POLY_XLU_DISP++, G_SC_NON_INTERLACE, 0, 0, gScreenWidth * 4.0f, gScreenHeight * 4.0f); + gDPSetScissorFrac(OVERLAY_DISP++, G_SC_NON_INTERLACE, 0, 0, gScreenWidth * 4.0f, gScreenHeight * 4.0f); - gDPSetColorImage(oGfxCtx->polyOpa.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gfxCtx->curFrameBuffer); - gDPSetColorImage(oGfxCtx->polyOpa.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gfxCtx->curFrameBuffer); - gDPSetColorImage(oGfxCtx->polyXlu.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gfxCtx->curFrameBuffer); - gDPSetColorImage(oGfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gfxCtx->curFrameBuffer); + gDPSetColorImage(POLY_OPA_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gfxCtx->curFrameBuffer); + gDPSetColorImage(POLY_OPA_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gfxCtx->curFrameBuffer); + gDPSetColorImage(POLY_XLU_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gfxCtx->curFrameBuffer); + gDPSetColorImage(OVERLAY_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gfxCtx->curFrameBuffer); - gDPSetDepthImage(oGfxCtx->polyOpa.p++, gZBuffer); - gDPSetDepthImage(oGfxCtx->polyXlu.p++, gZBuffer); - gDPSetDepthImage(oGfxCtx->overlay.p++, gZBuffer); + gDPSetDepthImage(POLY_OPA_DISP++, gZBuffer); + gDPSetDepthImage(POLY_XLU_DISP++, gZBuffer); + gDPSetDepthImage(OVERLAY_DISP++, gZBuffer); if ((R_PAUSE_MENU_MODE < 2) && (gTrnsnUnkState < 2)) { s32 ret = ShrinkWindow_GetCurrentVal(); @@ -1428,29 +1428,29 @@ void func_80095248(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b) { } } - gDPSetColorImage(oGfxCtx->polyOpa.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gZBuffer); - gDPSetCycleType(oGfxCtx->polyOpa.p++, G_CYC_FILL); - gDPSetRenderMode(oGfxCtx->polyOpa.p++, G_RM_NOOP, G_RM_NOOP2); - gDPSetFillColor(oGfxCtx->polyOpa.p++, + gDPSetColorImage(POLY_OPA_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gZBuffer); + gDPSetCycleType(POLY_OPA_DISP++, G_CYC_FILL); + gDPSetRenderMode(POLY_OPA_DISP++, G_RM_NOOP, G_RM_NOOP2); + gDPSetFillColor(POLY_OPA_DISP++, (GPACK_RGBA5551(255, 255, 240, 0) << 16) | GPACK_RGBA5551(255, 255, 240, 0)); - gDPFillRectangle(oGfxCtx->polyOpa.p++, 0, ret, gScreenWidth - 1, gScreenHeight - ret - 1); - gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPFillRectangle(POLY_OPA_DISP++, 0, ret, gScreenWidth - 1, gScreenHeight - ret - 1); + gDPPipeSync(POLY_OPA_DISP++); - gDPSetColorImage(oGfxCtx->polyOpa.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gfxCtx->curFrameBuffer); - gDPSetCycleType(oGfxCtx->polyOpa.p++, G_CYC_FILL); - gDPSetRenderMode(oGfxCtx->polyOpa.p++, G_RM_NOOP, G_RM_NOOP2); - gDPSetFillColor(oGfxCtx->polyOpa.p++, (GPACK_RGBA5551(r, g, b, 1) << 16) | GPACK_RGBA5551(r, g, b, 1)); - gDPFillRectangle(oGfxCtx->polyOpa.p++, 0, ret, gScreenWidth - 1, gScreenHeight - ret - 1); - gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetColorImage(POLY_OPA_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gfxCtx->curFrameBuffer); + gDPSetCycleType(POLY_OPA_DISP++, G_CYC_FILL); + gDPSetRenderMode(POLY_OPA_DISP++, G_RM_NOOP, G_RM_NOOP2); + gDPSetFillColor(POLY_OPA_DISP++, (GPACK_RGBA5551(r, g, b, 1) << 16) | GPACK_RGBA5551(r, g, b, 1)); + gDPFillRectangle(POLY_OPA_DISP++, 0, ret, gScreenWidth - 1, gScreenHeight - ret - 1); + gDPPipeSync(POLY_OPA_DISP++); if (ret > 0) { - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetCycleType(oGfxCtx->overlay.p++, G_CYC_FILL); - gDPSetRenderMode(oGfxCtx->overlay.p++, G_RM_NOOP, G_RM_NOOP2); - gDPSetFillColor(oGfxCtx->overlay.p++, (GPACK_RGBA5551(r, g, b, 1) << 16) | GPACK_RGBA5551(r, g, b, 1)); - gDPFillRectangle(oGfxCtx->overlay.p++, 0, 0, gScreenWidth - 1, ret - 1); - gDPFillRectangle(oGfxCtx->overlay.p++, 0, gScreenHeight - ret, gScreenWidth - 1, gScreenHeight - 1); - gDPPipeSync(oGfxCtx->overlay.p++); + gDPPipeSync(OVERLAY_DISP++); + gDPSetCycleType(OVERLAY_DISP++, G_CYC_FILL); + gDPSetRenderMode(OVERLAY_DISP++, G_RM_NOOP, G_RM_NOOP2); + gDPSetFillColor(OVERLAY_DISP++, (GPACK_RGBA5551(r, g, b, 1) << 16) | GPACK_RGBA5551(r, g, b, 1)); + gDPFillRectangle(OVERLAY_DISP++, 0, 0, gScreenWidth - 1, ret - 1); + gDPFillRectangle(OVERLAY_DISP++, 0, gScreenHeight - ret, gScreenWidth - 1, gScreenHeight - 1); + gDPPipeSync(OVERLAY_DISP++); } } @@ -1460,10 +1460,10 @@ void func_80095248(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b) { void func_80095974(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx, "../z_rcp.c", 2503); - gSPDisplayList(oGfxCtx->polyOpa.p++, sFillSetupDL); - gDPSetScissorFrac(oGfxCtx->polyOpa.p++, G_SC_NON_INTERLACE, 0, 0, gScreenWidth * 4.0f, gScreenHeight * 4.0f); - gDPSetDepthImage(oGfxCtx->polyOpa.p++, gZBuffer); - gDPSetColorImage(oGfxCtx->polyOpa.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gfxCtx->curFrameBuffer); + gSPDisplayList(POLY_OPA_DISP++, sFillSetupDL); + gDPSetScissorFrac(POLY_OPA_DISP++, G_SC_NON_INTERLACE, 0, 0, gScreenWidth * 4.0f, gScreenHeight * 4.0f); + gDPSetDepthImage(POLY_OPA_DISP++, gZBuffer); + gDPSetColorImage(POLY_OPA_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gfxCtx->curFrameBuffer); CLOSE_DISPS(gfxCtx, "../z_rcp.c", 2513); } diff --git a/src/code/z_room.c b/src/code/z_room.c index a959890136..2a18f9b9c3 100644 --- a/src/code/z_room.c +++ b/src/code/z_room.c @@ -41,27 +41,27 @@ void func_80095AB4(GlobalContext* globalCtx, Room* room, u32 flags) { if (flags & 1) { func_800342EC(&D_801270A0, globalCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x03, room->segment); + gSPSegment(POLY_OPA_DISP++, 0x03, room->segment); func_80093C80(globalCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); + gSPMatrix(POLY_OPA_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); } if (flags & 2) { func_8003435C(&D_801270A0, globalCtx); - gSPSegment(oGfxCtx->polyXlu.p++, 0x03, room->segment); + gSPSegment(POLY_XLU_DISP++, 0x03, room->segment); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); + gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); } polygon0 = &room->mesh->polygon0; polygonDlist = SEGMENTED_TO_VIRTUAL(polygon0->start); for (i = 0; i < polygon0->num; i++) { if ((flags & 1) && (polygonDlist->opa != NULL)) { - gSPDisplayList(oGfxCtx->polyOpa.p++, polygonDlist->opa); + gSPDisplayList(POLY_OPA_DISP++, polygonDlist->opa); } if ((flags & 2) && (polygonDlist->xlu != NULL)) { - gSPDisplayList(oGfxCtx->polyXlu.p++, polygonDlist->xlu); + gSPDisplayList(POLY_XLU_DISP++, polygonDlist->xlu); } polygonDlist++; @@ -108,16 +108,16 @@ void func_80095D04(GlobalContext* globalCtx, Room* room, u32 flags) { if (flags & 1) { func_800342EC(&D_801270A0, globalCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x03, room->segment); + gSPSegment(POLY_OPA_DISP++, 0x03, room->segment); func_80093C80(globalCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); + gSPMatrix(POLY_OPA_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); } if (flags & 2) { func_8003435C(&D_801270A0, globalCtx); - gSPSegment(oGfxCtx->polyXlu.p++, 0x03, room->segment); + gSPSegment(POLY_XLU_DISP++, 0x03, room->segment); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); + gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); } spA4 = &spB8[0]; @@ -193,20 +193,20 @@ void func_80095D04(GlobalContext* globalCtx, Room* room, u32 flags) { if (((iREG(86) == 1) && (iREG(89) > sp9C)) || ((iREG(86) == 2) && (iREG(89) == sp9C))) { if ((flags & 1) && (phi_s0->opa != NULL)) { - gSPDisplayList(oGfxCtx->polyOpa.p++, phi_s0->opa); + gSPDisplayList(POLY_OPA_DISP++, phi_s0->opa); } if ((flags & 2) && (phi_s0->xlu != NULL)) { - gSPDisplayList(oGfxCtx->polyXlu.p++, phi_s0->xlu); + gSPDisplayList(POLY_XLU_DISP++, phi_s0->xlu); } } } else { if ((flags & 1) && (phi_s0->opa != NULL)) { - gSPDisplayList(oGfxCtx->polyOpa.p++, phi_s0->opa); + gSPDisplayList(POLY_OPA_DISP++, phi_s0->opa); } if ((flags & 2) && (phi_s0->xlu != NULL)) { - gSPDisplayList(oGfxCtx->polyXlu.p++, phi_s0->xlu); + gSPDisplayList(POLY_XLU_DISP++, phi_s0->xlu); } } @@ -343,39 +343,39 @@ void func_80096680(GlobalContext* globalCtx, Room* room, u32 flags) { sp90 = (flags & 2) && polygonDlist->xlu && !(SREG(25) & 4); if (sp94 || sp98) { - gSPSegment(oGfxCtx->polyOpa.p++, 0x03, room->segment); + gSPSegment(POLY_OPA_DISP++, 0x03, room->segment); if (sp94) { func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, polygonDlist->opa); + gSPMatrix(POLY_OPA_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); + gSPDisplayList(POLY_OPA_DISP++, polygonDlist->opa); } if (sp98) { - // gSPLoadUcodeL(oGfxCtx->polyOpa.p++, rspS2DEX)? - gSPLoadUcodeEx(oGfxCtx->polyOpa.p++, OS_K0_TO_PHYSICAL(D_80113070), OS_K0_TO_PHYSICAL(D_801579A0), 0x800); + // gSPLoadUcodeL(POLY_OPA_DISP++, rspS2DEX)? + gSPLoadUcodeEx(POLY_OPA_DISP++, OS_K0_TO_PHYSICAL(D_80113070), OS_K0_TO_PHYSICAL(D_801579A0), 0x800); { Vec3f sp60; - spA8 = oGfxCtx->polyOpa.p; + spA8 = POLY_OPA_DISP; func_8005AFB4(&sp60, camera); func_8009638C(&spA8, polygon1->single.source, polygon1->single.tlut, polygon1->single.width, polygon1->single.height, polygon1->single.fmt, polygon1->single.siz, polygon1->single.mode0, polygon1->single.tlutCount, (sp60.x + sp60.z) * 1.2f + sp60.y * 0.6f, sp60.y * 2.4f + (sp60.x + sp60.z) * 0.3f); - oGfxCtx->polyOpa.p = spA8; + POLY_OPA_DISP = spA8; } - // gSPLoadUcode(oGfxCtx->polyOpa.p++, SysUcode_GetUCode(), SysUcode_GetUCodeData())? - gSPLoadUcodeEx(oGfxCtx->polyOpa.p++, SysUcode_GetUCode(), SysUcode_GetUCodeData(), 0x800); + // gSPLoadUcode(POLY_OPA_DISP++, SysUcode_GetUCode(), SysUcode_GetUCodeData())? + gSPLoadUcodeEx(POLY_OPA_DISP++, SysUcode_GetUCode(), SysUcode_GetUCodeData(), 0x800); } } if (sp90) { - gSPSegment(oGfxCtx->polyXlu.p++, 0x03, room->segment); + gSPSegment(POLY_XLU_DISP++, 0x03, room->segment); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, polygonDlist->xlu); + gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); + gSPDisplayList(POLY_XLU_DISP++, polygonDlist->xlu); } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_room.c", 691); @@ -438,38 +438,38 @@ void func_80096B6C(GlobalContext* globalCtx, Room* room, u32 flags) { sp8C = (flags & 2) && polygonDlist->xlu && !(SREG(25) & 4); if (sp90 || sp94) { - gSPSegment(oGfxCtx->polyOpa.p++, 0x03, room->segment); + gSPSegment(POLY_OPA_DISP++, 0x03, room->segment); if (sp90) { func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, polygonDlist->opa); + gSPMatrix(POLY_OPA_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); + gSPDisplayList(POLY_OPA_DISP++, polygonDlist->opa); } if (sp94) { - // gSPLoadUcodeL(oGfxCtx->polyOpa.p++, rspS2DEX)? - gSPLoadUcodeEx(oGfxCtx->polyOpa.p++, OS_K0_TO_PHYSICAL(D_80113070), OS_K0_TO_PHYSICAL(D_801579A0), 0x800); + // gSPLoadUcodeL(POLY_OPA_DISP++, rspS2DEX)? + gSPLoadUcodeEx(POLY_OPA_DISP++, OS_K0_TO_PHYSICAL(D_80113070), OS_K0_TO_PHYSICAL(D_801579A0), 0x800); { Vec3f sp5C; - spA8 = oGfxCtx->polyOpa.p; + spA8 = POLY_OPA_DISP; func_8005AFB4(&sp5C, camera); func_8009638C(&spA8, bgImage->source, bgImage->tlut, bgImage->width, bgImage->height, bgImage->fmt, bgImage->siz, bgImage->mode0, bgImage->tlutCount, (sp5C.x + sp5C.z) * 1.2f + sp5C.y * 0.6f, sp5C.y * 2.4f + (sp5C.x + sp5C.z) * 0.3f); - oGfxCtx->polyOpa.p = spA8; + POLY_OPA_DISP = spA8; } - // gSPLoadUcode(oGfxCtx->polyOpa.p++, SysUcode_GetUCode(), SysUcode_GetUCodeData())? - gSPLoadUcodeEx(oGfxCtx->polyOpa.p++, SysUcode_GetUCode(), SysUcode_GetUCodeData(), 0x800); + // gSPLoadUcode(POLY_OPA_DISP++, SysUcode_GetUCode(), SysUcode_GetUCodeData())? + gSPLoadUcodeEx(POLY_OPA_DISP++, SysUcode_GetUCode(), SysUcode_GetUCodeData(), 0x800); } } if (sp8C) { - gSPSegment(oGfxCtx->polyXlu.p++, 0x03, room->segment); + gSPSegment(POLY_XLU_DISP++, 0x03, room->segment); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, polygonDlist->xlu); + gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); + gSPDisplayList(POLY_XLU_DISP++, polygonDlist->xlu); } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_room.c", 819); diff --git a/src/code/z_sample.c b/src/code/z_sample.c index 65e3cee206..4adf07ba6c 100644 --- a/src/code/z_sample.c +++ b/src/code/z_sample.c @@ -13,8 +13,8 @@ void Sample_Draw(SampleContext* this) { OPEN_DISPS(gfxCtx, "../z_sample.c", 62); - gSPSegment(oGfxCtx->polyOpa.p++, 0x00, NULL); - gSPSegment(oGfxCtx->polyOpa.p++, 0x01, this->staticSegment); + gSPSegment(POLY_OPA_DISP++, 0x00, NULL); + gSPSegment(POLY_OPA_DISP++, 0x01, this->staticSegment); func_80095248(gfxCtx, 0, 0, 0); @@ -24,16 +24,16 @@ void Sample_Draw(SampleContext* this) { { Mtx* mtx = Graph_Alloc(gfxCtx, sizeof(Mtx)); guPosition(mtx, SREG(37), SREG(38), SREG(39), 1.0f, SREG(40), SREG(41), SREG(42)); - gSPMatrix(oGfxCtx->polyOpa.p++, mtx, G_MTX_LOAD); + gSPMatrix(POLY_OPA_DISP++, mtx, G_MTX_LOAD); } - oGfxCtx->polyOpa.p = Gfx_SetFog2(oGfxCtx->polyOpa.p, 0xFF, 0xFF, 0xFF, 0, 0, 0); + POLY_OPA_DISP = Gfx_SetFog2(POLY_OPA_DISP, 0xFF, 0xFF, 0xFF, 0, 0, 0); func_80093D18(gfxCtx); - gDPSetCycleType(oGfxCtx->polyOpa.p++, G_CYC_1CYCLE); - gDPSetRenderMode(oGfxCtx->polyOpa.p++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); - gDPSetCombineMode(oGfxCtx->polyOpa.p++, G_CC_PRIMITIVE, G_CC_PRIMITIVE); - gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, 255, 255, 0, 0); + gDPSetCycleType(POLY_OPA_DISP++, G_CYC_1CYCLE); + gDPSetRenderMode(POLY_OPA_DISP++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); + gDPSetCombineMode(POLY_OPA_DISP++, G_CC_PRIMITIVE, G_CC_PRIMITIVE); + gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 0, 0); CLOSE_DISPS(gfxCtx, "../z_sample.c", 111); } diff --git a/src/code/z_scene_table.c b/src/code/z_scene_table.c index 0ddb3ca5bd..ac3e24235a 100644 --- a/src/code/z_scene_table.c +++ b/src/code/z_scene_table.c @@ -947,8 +947,8 @@ void func_800994A0(GlobalContext* globalCtx) { void func_80099550(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 4725); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDefaultDisplayList); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDefaultDisplayList); + gSPDisplayList(POLY_OPA_DISP++, sDefaultDisplayList); + gSPDisplayList(POLY_XLU_DISP++, sDefaultDisplayList); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 4735); } @@ -963,16 +963,16 @@ void func_800995DC(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 4763); - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, + gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - (gameplayFrames % 128), (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); { s32 pad; } - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A2F8[gSaveContext.nightFlag])); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A2F8[gSaveContext.nightFlag])); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 4783); } @@ -984,12 +984,12 @@ void func_80099760(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 4845); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 2) % 256, 0, 64, 32, 1, 0, (gameplayFrames * 2) % 128, 64, 32)); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 4859); } @@ -1008,28 +1008,28 @@ void func_80099878(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 4905); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A300[gSaveContext.nightFlag])); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(D_8012A308[(s32)(gameplayFrames & 14) >> 1])); - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A300[gSaveContext.nightFlag])); + gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(D_8012A308[(s32)(gameplayFrames & 14) >> 1])); + gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 1) % 256, 0, 64, 32, 1, 0, (gameplayFrames * 1) % 128, 64, 32)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, + gSPSegment(POLY_OPA_DISP++, 0x0A, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 128, 32, 32, 1, 0, (gameplayFrames * 2) % 128, 32, 32)); { s32 pad2[2]; } - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0B, displayListHead); + gSPSegment(POLY_OPA_DISP++, 0x0B, displayListHead); gDPPipeSync(displayListHead++); gDPSetEnvColor(displayListHead++, 255, 255, 255, globalCtx->unk_11D30[0]); gSPEndDisplayList(displayListHead++); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0C, displayListHead); + gSPSegment(POLY_OPA_DISP++, 0x0C, displayListHead); gDPPipeSync(displayListHead++); gDPSetEnvColor(displayListHead++, 255, 255, 255, globalCtx->unk_11D30[1]); gSPEndDisplayList(displayListHead); @@ -1048,42 +1048,42 @@ void func_80099BD8(GlobalContext* globalCtx) { temp = globalCtx->unk_11D30[0] / 255.0f; - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, displayListHead); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, displayListHead); + gSPSegment(POLY_XLU_DISP++, 0x08, displayListHead); + gSPSegment(POLY_OPA_DISP++, 0x08, displayListHead); gDPSetPrimColor(displayListHead++, 0, 0, 255 - (u8)(185.0f * temp), 255 - (u8)(145.0f * temp), 255 - (u8)(105.0f * temp), 255); gSPEndDisplayList(displayListHead++); - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, displayListHead); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, displayListHead); + gSPSegment(POLY_XLU_DISP++, 0x09, displayListHead); + gSPSegment(POLY_OPA_DISP++, 0x09, displayListHead); gDPSetPrimColor(displayListHead++, 0, 0, 76 + (u8)(6.0f * temp), 76 + (u8)(34.0f * temp), 76 + (u8)(74.0f * temp), 255); gSPEndDisplayList(displayListHead++); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, displayListHead); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0A, displayListHead); + gSPSegment(POLY_OPA_DISP++, 0x0A, displayListHead); + gSPSegment(POLY_XLU_DISP++, 0x0A, displayListHead); gDPPipeSync(displayListHead++); gDPSetEnvColor(displayListHead++, 0, 0, 0, globalCtx->unk_11D30[0]); gSPEndDisplayList(displayListHead++); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0B, displayListHead); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0B, displayListHead); + gSPSegment(POLY_OPA_DISP++, 0x0B, displayListHead); + gSPSegment(POLY_XLU_DISP++, 0x0B, displayListHead); gDPSetPrimColor(displayListHead++, 0, 0, 89 + (u8)(166.0f * temp), 89 + (u8)(166.0f * temp), 89 + (u8)(166.0f * temp), 255); gDPPipeSync(displayListHead++); gDPSetEnvColor(displayListHead++, 0, 0, 0, globalCtx->unk_11D30[0]); gSPEndDisplayList(displayListHead++); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0C, displayListHead); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0C, displayListHead); + gSPSegment(POLY_OPA_DISP++, 0x0C, displayListHead); + gSPSegment(POLY_XLU_DISP++, 0x0C, displayListHead); gDPSetPrimColor(displayListHead++, 0, 0, 255 + (u8)(179.0f * temp), 255 + (u8)(179.0f * temp), 255 + (u8)(179.0f * temp), 255); gDPPipeSync(displayListHead++); gDPSetEnvColor(displayListHead++, 0, 0, 0, globalCtx->unk_11D30[0]); gSPEndDisplayList(displayListHead++); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0D, displayListHead); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0D, displayListHead); + gSPSegment(POLY_OPA_DISP++, 0x0D, displayListHead); + gSPSegment(POLY_XLU_DISP++, 0x0D, displayListHead); gDPPipeSync(displayListHead++); gDPSetEnvColor(displayListHead++, 0, 0, 0, globalCtx->unk_11D30[1]); gSPEndDisplayList(displayListHead); @@ -1108,27 +1108,27 @@ void func_8009A45C(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5171); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 1) % 64, 256, 16)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, + gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - (gameplayFrames % 128), (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); gSPSegment( - oGfxCtx->polyOpa.p++, 0x0A, + POLY_OPA_DISP++, 0x0A, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 32, 32, 1, 0, 127 - (gameplayFrames * 1) % 128, 32, 32)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0B, + gSPSegment(POLY_OPA_DISP++, 0x0B, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 1) % 128, 32, 32)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0C, + gSPSegment(POLY_XLU_DISP++, 0x0C, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (gameplayFrames * 50) % 2048, 8, 512, 1, 0, (gameplayFrames * 60) % 2048, 8, 512)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0D, + gSPSegment(POLY_OPA_DISP++, 0x0D, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, (gameplayFrames * 1) % 128, 32, 32)); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5212); } @@ -1140,24 +1140,24 @@ void func_8009A798(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5226); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 2) % 256, 64, 64)); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, + gSPSegment(POLY_OPA_DISP++, 0x0A, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, + gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - (gameplayFrames * 1) % 128, (gameplayFrames * 1) % 256, 32, 64, 1, 0, 0, 32, 128)); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5264); } @@ -1169,18 +1169,18 @@ void func_8009A9DC(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5278); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 256, 32, 64, 1, gameplayFrames % 128, (gameplayFrames * 3) % 256, 32, 64)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, + gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32)); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5301); } @@ -1192,13 +1192,13 @@ void func_8009AB98(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5317); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, gameplayFrames % 64, 256, 16)); + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, gameplayFrames % 64, 256, 16)); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5330); } @@ -1210,16 +1210,16 @@ void func_8009ACA8(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5346); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, gameplayFrames % 64, 256, 16)); + gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, gameplayFrames % 64, 256, 16)); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5367); } @@ -1233,20 +1233,20 @@ void func_8009AE30(GlobalContext* globalCtx) { gameplayFrames = globalCtx->gameplayFrames; if (globalCtx->sceneNum == SCENE_HAKADAN_BS) { - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, + gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 2) % 128, 0, 32, 32, 1, (gameplayFrames * 2) % 128, 0, 32, 32)); } else { - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 2) % 128, 0, 32, 32, 1, (gameplayFrames * 2) % 128, 0, 32, 32)); } - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5416); } @@ -1260,12 +1260,12 @@ void func_8009AFE0(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5490); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, + gSPSegment(POLY_OPA_DISP++, 0x09, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 3) % 128, 32, 32)); { s32 pad[2]; } - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A328[gSaveContext.nightFlag])); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A328[gSaveContext.nightFlag])); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5507); } @@ -1286,56 +1286,56 @@ void func_8009B0FC(GlobalContext* globalCtx) { spAC = globalCtx->unk_11D30[1] & 0xFF; gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A330[gSaveContext.nightFlag])); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A330[gSaveContext.nightFlag])); if (spB0 == 1) { - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, + gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, spAC)); } else if (spB0 < 1) { - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, + gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, 255)); } else { - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, + gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, 160)); } if (spB0 == 2) { - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, + gSPSegment(POLY_OPA_DISP++, 0x09, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, spAC)); } else if (spB0 < 2) { - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, + gSPSegment(POLY_OPA_DISP++, 0x09, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, 255)); } else { - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, + gSPSegment(POLY_OPA_DISP++, 0x09, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, 160)); } if (spB0 != 0) { - gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, + gSPSegment(POLY_OPA_DISP++, 0x0A, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, 160)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0B, + gSPSegment(POLY_OPA_DISP++, 0x0B, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 3, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, 180)); } else { - gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, + gSPSegment(POLY_OPA_DISP++, 0x0A, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, (gameplayFrames * 1) % 128, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, 160 + (s32)((spAC / 200.0f) * 95.0f))); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0B, + gSPSegment(POLY_OPA_DISP++, 0x0B, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 3, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, 185 + (s32)((spAC / 200.0f) * 70.0f))); } - gSPSegment(oGfxCtx->polyXlu.p++, 0x0C, + gSPSegment(POLY_XLU_DISP++, 0x0C, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 1, gameplayFrames * 1, 32, 32, 1, 0, 127 - (gameplayFrames * 1), 32, 32, 0, 0, 0, 128)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0D, + gSPSegment(POLY_XLU_DISP++, 0x0D, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 4, 0, 32, 32, 1, gameplayFrames * 4, 0, 32, 32, 0, 0, 0, 128)); @@ -1351,14 +1351,14 @@ void func_8009B86C(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5791); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, + gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32)); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, globalCtx->unk_11D30[0]); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, globalCtx->unk_11D30[0]); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 145); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 145); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5808); } @@ -1370,10 +1370,10 @@ void func_8009B9BC(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5822); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, gameplayFrames % 64, 4, 16)); + gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, gameplayFrames % 64, 4, 16)); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5836); } @@ -1385,20 +1385,20 @@ void func_8009BAA4(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5850); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32)); if (globalCtx->sceneNum == SCENE_HAIRAL_NIWA) { - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, + gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 10) % 256, 32, 64)); } - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5876); } @@ -1417,27 +1417,27 @@ void func_8009BC44(GlobalContext* globalCtx) { gameplayFrames = globalCtx->gameplayFrames; if (globalCtx->sceneNum == SCENE_GANON_TOU) { - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, + gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 1) % 256, 64, 64)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 255 - (gameplayFrames * 1) % 256, 64, 64, 1, 0, (gameplayFrames * 1) % 256, 64, 64)); } - gSPSegment(oGfxCtx->polyOpa.p++, 0x0B, + gSPSegment(POLY_OPA_DISP++, 0x0B, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 255 - (gameplayFrames * 1) % 128, (gameplayFrames * 1) % 128, 32, 32, 1, (gameplayFrames * 1) % 128, (gameplayFrames * 1) % 128, 32, 32)); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); sp83 = (sp83 >> 1) + 192; - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, sp83, sp83, sp83, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, sp83, sp83, sp83, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5930); } @@ -1473,25 +1473,25 @@ void func_8009C0AC(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5968); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, + gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 512, 64, 128, 1, 0, 511 - (gameplayFrames * 1) % 512, 64, 128)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, + gSPSegment(POLY_OPA_DISP++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 256, 32, 64, 1, 0, 255 - (gameplayFrames * 1) % 256, 32, 64)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0A, + gSPSegment(POLY_XLU_DISP++, 0x0A, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (gameplayFrames * 20) % 2048, 16, 512, 1, 0, (gameplayFrames * 30) % 2048, 16, 512)); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); sp7B = (sp7B >> 1) + 192; - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, sp7B, sp7B, sp7B, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, sp7B, sp7B, sp7B, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6004); @@ -1514,21 +1514,21 @@ void func_8009C3EC(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6042); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A338[gSaveContext.nightFlag])); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A338[gSaveContext.nightFlag])); + gSPSegment(POLY_OPA_DISP++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0A, + gSPSegment(POLY_XLU_DISP++, 0x0A, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); { s32 pad[2]; } - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6076); } @@ -1540,23 +1540,23 @@ void func_8009C608(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6151); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 1) % 64, 256, 16)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, + gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (gameplayFrames * 60) % 2048, 8, 512, 1, 0, (gameplayFrames * 50) % 2048, 8, 512)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, + gSPSegment(POLY_OPA_DISP++, 0x0A, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - (gameplayFrames * 1) % 128, 0, 32, 32, 1, (gameplayFrames * 1) % 128, 0, 32, 32)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0B, + gSPSegment(POLY_XLU_DISP++, 0x0B, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 1023 - (gameplayFrames * 6) % 1024, 16, 256, 1, 0, 1023 - (gameplayFrames * 3) % 1024, 16, 256)); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6187); } @@ -1568,19 +1568,19 @@ void func_8009C8B8(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6201); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, + gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 32, 32, 1, 0, (gameplayFrames * 1) % 128, 32, 32)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0A, + gSPSegment(POLY_XLU_DISP++, 0x0A, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, + gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, 255 - (gameplayFrames * 10) % 256, 32, 64)); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6232); } @@ -1592,15 +1592,15 @@ void func_8009CAC0(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6249); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6264); } @@ -1616,21 +1616,21 @@ void func_8009CC00(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6290); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A340[gSaveContext.nightFlag])); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A340[gSaveContext.nightFlag])); + gSPSegment(POLY_OPA_DISP++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0A, + gSPSegment(POLY_XLU_DISP++, 0x0A, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); { s32 pad[2]; } - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6320); } @@ -1661,17 +1661,17 @@ void func_8009CF84(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6433); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScrollPrimColor(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 255, 255, 255, globalCtx->unk_11D30[0] + 127)); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6449); } @@ -1683,21 +1683,21 @@ void func_8009D0E8(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6463); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TexScroll(globalCtx->state.gfxCtx, 127 - (gameplayFrames * 4) % 128, 0, 32, 32)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, + gSPSegment(POLY_OPA_DISP++, 0x09, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 5) % 64, 16, 16)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, + gSPSegment(POLY_OPA_DISP++, 0x0A, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, 63 - (gameplayFrames * 2) % 64, 16, 16)); gSPSegment( - oGfxCtx->polyXlu.p++, 0x0B, + POLY_XLU_DISP++, 0x0B, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 127 - (gameplayFrames * 3) % 128, 32, 32, 1, 0, 0, 32, 32)); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6491); } @@ -1710,13 +1710,13 @@ void func_8009D31C(GlobalContext* globalCtx) { { s32 pad[2]; } - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A348[gSaveContext.nightFlag])); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A348[gSaveContext.nightFlag])); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6528); } @@ -1736,14 +1736,14 @@ void func_8009D438(GlobalContext* globalCtx) { var = gSaveContext.nightFlag; } - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A358[var])); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(D_8012A350[var])); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A358[var])); + gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(D_8012A350[var])); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6581); } @@ -1755,17 +1755,17 @@ void func_8009D5B4(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6595); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, + gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 3) % 128, 32, 32)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, + gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 1023 - (gameplayFrames * 3) % 1024, 16, 256, 1, 0, 1023 - (gameplayFrames * 6) % 1024, 16, 256)); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6615); } @@ -1781,21 +1781,21 @@ void func_8009D758(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6640); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A360[gSaveContext.nightFlag])); - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A360[gSaveContext.nightFlag])); + gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, + gSPSegment(POLY_OPA_DISP++, 0x0A, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); { s32 pad[2]; } - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6671); } @@ -1808,7 +1808,7 @@ void func_8009D974(GlobalContext* globalCtx) { { s32 pad[2]; } - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A368[gSaveContext.nightFlag])); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A368[gSaveContext.nightFlag])); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6762); } @@ -1823,20 +1823,20 @@ void func_8009DA30(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6814); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, + gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32)); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0A, displayListHead); + gSPSegment(POLY_XLU_DISP++, 0x0A, displayListHead); if ((gSaveContext.dayTime >= 0x4AAC) && (gSaveContext.dayTime <= 0xC555)) { gSPEndDisplayList(displayListHead); @@ -1867,13 +1867,13 @@ void func_8009DD5C(GlobalContext* globalCtx) { { s32 pad[2]; } - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A370[gSaveContext.nightFlag])); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A370[gSaveContext.nightFlag])); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6903); } @@ -1885,21 +1885,21 @@ void func_8009DE78(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6917); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 6) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 6) % 128, 32, 32)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, + gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0A, + gSPSegment(POLY_XLU_DISP++, 0x0A, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6948); } @@ -1921,18 +1921,18 @@ void func_8009E0B8(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6965); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, + gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32)); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); if (gSaveContext.sceneSetupIndex == 4) { spA3 = 255 - (u8)globalCtx->unk_11D30[0]; @@ -1942,18 +1942,18 @@ void func_8009E0B8(GlobalContext* globalCtx) { spA0 = 2150; } - gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, displayListHead); + gSPSegment(POLY_OPA_DISP++, 0x0A, displayListHead); gDPPipeSync(displayListHead++); gDPSetEnvColor(displayListHead++, 128, 128, 128, spA3); gSPEndDisplayList(displayListHead++); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0B, displayListHead); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0B, displayListHead); + gSPSegment(POLY_XLU_DISP++, 0x0B, displayListHead); + gSPSegment(POLY_OPA_DISP++, 0x0B, displayListHead); gDPPipeSync(displayListHead++); gDPSetEnvColor(displayListHead++, 128, 128, 128, spA0 * 0.1f); gSPEndDisplayList(displayListHead); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0C, + gSPSegment(POLY_OPA_DISP++, 0x0C, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (s16)(-globalCtx->unk_11D30[0] * 0.02f), 32, 16, 1, 0, (s16)(-globalCtx->unk_11D30[0] * 0.02f), 32, 16)); @@ -1971,15 +1971,15 @@ void func_8009E54C(GlobalContext* globalCtx) { } gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, + gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames, gameplayFrames, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, globalCtx->unk_11D30[0] + 168)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, + gSPSegment(POLY_OPA_DISP++, 0x09, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, -gameplayFrames, -gameplayFrames, 32, 32, 1, 0, 0, 16, 64, 0, 0, 0, globalCtx->unk_11D30[0] + 168)); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 255, 255, 255, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 255, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7097); } @@ -1998,13 +1998,13 @@ void func_8009E730(GlobalContext* globalCtx) { if (LINK_IS_ADULT) { var = 0; } - gSPSegment(oGfxCtx->polyOpa.p++, 0x0C, + gSPSegment(POLY_OPA_DISP++, 0x0C, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 64, 32, 1, 0, var, 64, 32)); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A378[gSaveContext.nightFlag])); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A378[gSaveContext.nightFlag])); { s32 pad[2]; } @@ -2018,20 +2018,20 @@ void func_8009E8C0(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7161); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, + gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 1) % 128, 0, 32, 32, 1, 0, 0, 32, 32)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, + gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 255 - (gameplayFrames * 2) % 256, 64, 64, 1, 0, 255 - (gameplayFrames * 2) % 256, 64, 64)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0A, + gSPSegment(POLY_XLU_DISP++, 0x0A, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 128, 32, 32, 1, 0, (gameplayFrames * 1) % 128, 32, 32)); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7192); } @@ -2043,30 +2043,30 @@ void func_8009EAD8(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7206); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (gameplayFrames * 3) % 1024, 32, 256, 1, 0, (gameplayFrames * 3) % 1024, 32, 256)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, + gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 256, 64, 64, 1, 0, (gameplayFrames * 1) % 256, 64, 64)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0A, + gSPSegment(POLY_XLU_DISP++, 0x0A, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (gameplayFrames * 2) % 128, 32, 32, 1, 0, (gameplayFrames * 2) % 128, 32, 32)); gSPSegment( - oGfxCtx->polyOpa.p++, 0x0B, + POLY_OPA_DISP++, 0x0B, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 32, 32, 1, 0, 127 - (gameplayFrames * 3) % 128, 32, 32)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0C, + gSPSegment(POLY_XLU_DISP++, 0x0C, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 128, 32, 32, 1, 0, (gameplayFrames * 1) % 128, 32, 32)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0D, + gSPSegment(POLY_XLU_DISP++, 0x0D, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 64, 16, 16, 1, 0, (gameplayFrames * 1) % 64, 16, 16)); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7260); } @@ -2080,18 +2080,18 @@ void func_8009EE44(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7274); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, gameplayFrames % 128, 0, 32, 16, 1, gameplayFrames % 128, 0, 32, 16)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, + gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, gameplayFrames % 128, 32, 32, 1, gameplayFrames % 128, gameplayFrames % 128, 32, 32)); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); if ((globalCtx->unk_11D30[0] == 0) && (INV_CONTENT(ITEM_COJIRO) == ITEM_COJIRO)) { if (globalCtx->unk_11D30[1] == 50) { @@ -2111,14 +2111,14 @@ void func_8009F074(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7323); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, + gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 32, 32, 1, 0, 127 - gameplayFrames % 128, 32, 32)); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7339); } @@ -2131,7 +2131,7 @@ void func_8009F1B4(GlobalContext* globalCtx) { { s32 pad[2]; } - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A380[gSaveContext.nightFlag])); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A380[gSaveContext.nightFlag])); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7371); } @@ -2143,18 +2143,18 @@ void func_8009F270(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7385); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, + gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, gameplayFrames % 128, 32, 32, 1, 0, gameplayFrames % 128, 32, 32)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, + gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, gameplayFrames % 128, 32, 32, 1, 0, gameplayFrames % 128, 32, 32)); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7409); } @@ -2166,18 +2166,18 @@ void func_8009F40C(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7423); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, + gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32)); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7443); } @@ -2190,7 +2190,7 @@ void func_8009F5D4(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7461); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, displayListHead); + gSPSegment(POLY_XLU_DISP++, 0x08, displayListHead); if ((gSaveContext.dayTime >= 0x4AAC) && (gSaveContext.dayTime <= 0xC000)) { gSPEndDisplayList(displayListHead); @@ -2210,11 +2210,11 @@ void func_8009F5D4(GlobalContext* globalCtx) { gSPEndDisplayList(displayListHead); } - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7495); } @@ -2234,15 +2234,15 @@ void func_8009F7D4(GlobalContext* globalCtx) { sp6F = (sp6F >> 1) + 192; sp6E = (sp6E >> 1) + 192; - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, + gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, gameplayFrames % 128, 32, 32, 1, 0, gameplayFrames % 128, 32, 32)); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, sp6F, sp6E, 255, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, sp6F, sp6E, 255, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7530); } @@ -2256,17 +2256,17 @@ void func_8009F9D0(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7555); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, + gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 127 - gameplayFrames % 128, 32, 32, 1, gameplayFrames % 128, 0, 32, 32)); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A388[gSaveContext.nightFlag])); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A388[gSaveContext.nightFlag])); { s32 pad[2]; } @@ -2281,13 +2281,13 @@ void func_8009FB74(GlobalContext* globalCtx) { { s32 pad[2]; } - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A390[gSaveContext.nightFlag])); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A390[gSaveContext.nightFlag])); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7615); } @@ -2299,19 +2299,19 @@ void func_8009FC90(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7630); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, + gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 127 - gameplayFrames % 128, 32, 32, 1, 127 - gameplayFrames % 128, 0, 32, 32)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, + gSPSegment(POLY_OPA_DISP++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 3) % 128, 127 - (gameplayFrames * 6) % 128, 32, 32, 1, (gameplayFrames * 6) % 128, 127 - (gameplayFrames * 3) % 128, 32, 32)); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 64); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 64); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 64); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 64); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7653); } @@ -2331,23 +2331,23 @@ void func_8009FE58(GlobalContext* globalCtx) { gameplayFrames = globalCtx->gameplayFrames; if (globalCtx->sceneNum == SCENE_BDAN) { - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, + gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, gameplayFrames % 128, (gameplayFrames * 2) % 128, 32, 32, 1, 127 - gameplayFrames % 128, (gameplayFrames * 2) % 128, 32, 32)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0B, + gSPSegment(POLY_OPA_DISP++, 0x0B, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 255 - (gameplayFrames * 4) % 256, 32, 64, 1, 0, 255 - (gameplayFrames * 4) % 256, 32, 64)); } else { - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, + gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TexScroll(globalCtx->state.gfxCtx, (127 - (gameplayFrames * 1)) % 128, (gameplayFrames * 1) % 128, 32, 32)); } - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); if (func_800C0D28(globalCtx) != 1) { D_8012A39C += 1820; @@ -2390,7 +2390,7 @@ void func_8009FE58(GlobalContext* globalCtx) { Matrix_Scale(1.005f, sinf(D_8012A398) * 0.8f, 1.005f, MTXMODE_NEW); } - gSPSegment(oGfxCtx->polyOpa.p++, 0x0D, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_scene_table.c", 7809)); + gSPSegment(POLY_OPA_DISP++, 0x0D, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_scene_table.c", 7809)); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7811); } @@ -2408,21 +2408,21 @@ void func_800A0334(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7825); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 512, 32, 128, 1, gameplayFrames % 128, (gameplayFrames * 1) % 512, 32, 128)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, + gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, + gSPSegment(POLY_OPA_DISP++, 0x0A, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7852); } @@ -2444,16 +2444,16 @@ void func_800A059C(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7893); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, + gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TexScroll(globalCtx->state.gfxCtx, 127 - (gameplayFrames * 2) % 128, 0, 32, 64)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, + gSPSegment(POLY_OPA_DISP++, 0x09, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 2) % 512, 128, 128)); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7910); } @@ -2491,8 +2491,8 @@ void Scene_Draw(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 8104); if (HREG(81) == 1) { - gSPDisplayList(oGfxCtx->polyOpa.p++, sDefaultDisplayList); - gSPDisplayList(oGfxCtx->polyXlu.p++, sDefaultDisplayList); + gSPDisplayList(POLY_OPA_DISP++, sDefaultDisplayList); + gSPDisplayList(POLY_XLU_DISP++, sDefaultDisplayList); } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 8109); diff --git a/src/code/z_skelanime.c b/src/code/z_skelanime.c index a890c9a7f4..441dcef537 100644 --- a/src/code/z_skelanime.c +++ b/src/code/z_skelanime.c @@ -49,10 +49,10 @@ void SkelAnime_LodDrawLimb(GlobalContext* globalCtx, s32 limbIndex, Skeleton* sk if ((overrideLimbDraw == NULL) || (overrideLimbDraw(globalCtx, limbIndex, &dList, &pos, &rot, actor) == 0)) { Matrix_JointPosition(&pos, &rot); if (dList != NULL) { - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 805), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 805), G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, dList); + gSPDisplayList(POLY_OPA_DISP++, dList); } } @@ -110,10 +110,10 @@ void SkelAnime_LodDraw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limb if ((overrideLimbDraw == NULL) || (overrideLimbDraw(globalCtx, 1, &dList, &pos, &rot, actor) == 0)) { Matrix_JointPosition(&pos, &rot); if (dList != NULL) { - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 881), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 881), G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, dList); + gSPDisplayList(POLY_OPA_DISP++, dList); } } if (postLimbDraw != NULL) { @@ -161,8 +161,8 @@ void SkelAnime_LodDrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, Skeleton* if (dList[1] != NULL) { Matrix_ToMtx(*mtx, "../z_skelanime.c", 945); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_skelanime.c", 946); - gSPMatrix(oGfxCtx->polyOpa.p++, *mtx, G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, dList[1]); + gSPMatrix(POLY_OPA_DISP++, *mtx, G_MTX_LOAD); + gSPDisplayList(POLY_OPA_DISP++, dList[1]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_skelanime.c", 949); (*mtx)++; } else if (dList[0] != NULL) { @@ -211,7 +211,7 @@ void SkelAnime_LodDrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* li OPEN_DISPS(globalCtx->state.gfxCtx, "../z_skelanime.c", 1000); - gSPSegment(oGfxCtx->polyOpa.p++, 0xD, mtx); + gSPSegment(POLY_OPA_DISP++, 0xD, mtx); Matrix_Push(); limbEntry = SEGMENTED_TO_VIRTUAL(skeleton->limbs[0]); @@ -228,8 +228,8 @@ void SkelAnime_LodDrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* li Matrix_JointPosition(&pos, &rot); if (dList[1] != NULL) { Matrix_ToMtx(mtx, "../z_skelanime.c", 1033); - gSPMatrix(oGfxCtx->polyOpa.p++, mtx, G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, dList[1]); + gSPMatrix(POLY_OPA_DISP++, mtx, G_MTX_LOAD); + gSPDisplayList(POLY_OPA_DISP++, dList[1]); mtx++; } else if (dList[0] != NULL) { Matrix_ToMtx(mtx, "../z_skelanime.c", 1040); @@ -275,9 +275,9 @@ void SkelAnime_DrawLimb(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skele if ((overrideLimbDraw == NULL) || (overrideLimbDraw(globalCtx, limbIndex, &dList, &pos, &rot, actor) == 0)) { Matrix_JointPosition(&pos, &rot); if (dList != NULL) { - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 1103), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 1103), G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, dList); + gSPDisplayList(POLY_OPA_DISP++, dList); } } @@ -332,9 +332,9 @@ void SkelAnime_Draw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDra if ((overrideLimbDraw == NULL) || (overrideLimbDraw(globalCtx, 1, &dList, &pos, &rot, actor) == 0)) { Matrix_JointPosition(&pos, &rot); if (dList != NULL) { - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 1176), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 1176), G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, dList); + gSPDisplayList(POLY_OPA_DISP++, dList); } } @@ -379,8 +379,8 @@ void SkelAnime_DrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, Skeleton* ske Matrix_JointPosition(&pos, &rot); if (dList[1] != NULL) { Matrix_ToMtx(*limbMatricies, "../z_skelanime.c", 1242); - gSPMatrix(oGfxCtx->polyOpa.p++, *limbMatricies, G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, dList[1]); + gSPMatrix(POLY_OPA_DISP++, *limbMatricies, G_MTX_LOAD); + gSPDisplayList(POLY_OPA_DISP++, dList[1]); (*limbMatricies)++; } else if (dList[0] != NULL) { Matrix_ToMtx(*limbMatricies, "../z_skelanime.c", 1249); @@ -427,7 +427,7 @@ void SkelAnime_DrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbD OPEN_DISPS(globalCtx->state.gfxCtx, "../z_skelanime.c", 1294); - gSPSegment(oGfxCtx->polyOpa.p++, 0xD, mtx); + gSPSegment(POLY_OPA_DISP++, 0xD, mtx); Matrix_Push(); @@ -446,8 +446,8 @@ void SkelAnime_DrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbD Matrix_JointPosition(&pos, &rot); if (dList[1] != NULL) { Matrix_ToMtx(mtx, "../z_skelanime.c", 1327); - gSPMatrix(oGfxCtx->polyOpa.p++, mtx, G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, dList[1]); + gSPMatrix(POLY_OPA_DISP++, mtx, G_MTX_LOAD); + gSPDisplayList(POLY_OPA_DISP++, dList[1]); mtx++; } else { if (dList[0] != NULL) { diff --git a/src/code/z_view.c b/src/code/z_view.c index 5807cc0fb7..99666b3b8b 100644 --- a/src/code/z_view.c +++ b/src/code/z_view.c @@ -174,10 +174,10 @@ void func_800AA550(View* view) { OPEN_DISPS(gfxCtx, "../z_view.c", 459); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetScissor(oGfxCtx->polyOpa.p++, G_SC_NON_INTERLACE, ulx, uly, lrx, lry); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetScissor(oGfxCtx->polyXlu.p++, G_SC_NON_INTERLACE, ulx, uly, lrx, lry); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetScissor(POLY_OPA_DISP++, G_SC_NON_INTERLACE, ulx, uly, lrx, lry); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetScissor(POLY_XLU_DISP++, G_SC_NON_INTERLACE, ulx, uly, lrx, lry); CLOSE_DISPS(gfxCtx, "../z_view.c", 472); } @@ -289,8 +289,8 @@ s32 func_800AAA9C(View* view) { func_800AA550(view); - gSPViewport(oGfxCtx->polyOpa.p++, vp); - gSPViewport(oGfxCtx->polyXlu.p++, vp); + gSPViewport(POLY_OPA_DISP++, vp); + gSPViewport(POLY_XLU_DISP++, vp); projection = Graph_Alloc(gfxCtx, sizeof(Mtx)); LogUtils_CheckNullPointer("projection", projection, "../z_view.c", 616); @@ -333,10 +333,10 @@ s32 func_800AAA9C(View* view) { func_800AA890(view, projection); - gSPPerspNormalize(oGfxCtx->polyOpa.p++, view->normal); - gSPMatrix(oGfxCtx->polyOpa.p++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); - gSPPerspNormalize(oGfxCtx->polyXlu.p++, view->normal); - gSPMatrix(oGfxCtx->polyXlu.p++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); + gSPPerspNormalize(POLY_OPA_DISP++, view->normal); + gSPMatrix(POLY_OPA_DISP++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); + gSPPerspNormalize(POLY_XLU_DISP++, view->normal); + gSPMatrix(POLY_XLU_DISP++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); viewing = Graph_Alloc(gfxCtx, sizeof(Mtx)); LogUtils_CheckNullPointer("viewing", viewing, "../z_view.c", 667); @@ -366,8 +366,8 @@ s32 func_800AAA9C(View* view) { osSyncPrintf("\n"); } - gSPMatrix(oGfxCtx->polyOpa.p++, viewing, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); - gSPMatrix(oGfxCtx->polyXlu.p++, viewing, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); + gSPMatrix(POLY_OPA_DISP++, viewing, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); + gSPMatrix(POLY_XLU_DISP++, viewing, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); CLOSE_DISPS(gfxCtx, "../z_view.c", 711); @@ -390,9 +390,9 @@ s32 func_800AB0A8(View* view) { func_800AA550(view); - gSPViewport(oGfxCtx->polyOpa.p++, vp); - gSPViewport(oGfxCtx->polyXlu.p++, vp); - gSPViewport(oGfxCtx->overlay.p++, vp); + gSPViewport(POLY_OPA_DISP++, vp); + gSPViewport(POLY_XLU_DISP++, vp); + gSPViewport(OVERLAY_DISP++, vp); projection = Graph_Alloc(gfxCtx, sizeof(Mtx)); LogUtils_CheckNullPointer("projection", projection, "../z_view.c", 744); @@ -403,8 +403,8 @@ s32 func_800AB0A8(View* view) { view->projection = *projection; - gSPMatrix(oGfxCtx->polyOpa.p++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); - gSPMatrix(oGfxCtx->polyXlu.p++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); + gSPMatrix(POLY_OPA_DISP++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); + gSPMatrix(POLY_XLU_DISP++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); CLOSE_DISPS(gfxCtx, "../z_view.c", 762); @@ -427,10 +427,10 @@ s32 func_800AB2C4(View* view) { View_ViewportToVp(vp, &view->viewport); view->vp = *vp; - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetScissor(oGfxCtx->overlay.p++, G_SC_NON_INTERLACE, view->viewport.leftX, view->viewport.topY, + gDPPipeSync(OVERLAY_DISP++); + gDPSetScissor(OVERLAY_DISP++, G_SC_NON_INTERLACE, view->viewport.leftX, view->viewport.topY, view->viewport.rightX, view->viewport.bottomY); - gSPViewport(oGfxCtx->overlay.p++, vp); + gSPViewport(OVERLAY_DISP++, vp); projection = Graph_Alloc(gfxCtx, sizeof(Mtx)); LogUtils_CheckNullPointer("projection", projection, "../z_view.c", 791); @@ -441,7 +441,7 @@ s32 func_800AB2C4(View* view) { view->projection = *projection; - gSPMatrix(oGfxCtx->overlay.p++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); + gSPMatrix(OVERLAY_DISP++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); CLOSE_DISPS(gfxCtx, "../z_view.c", 801); @@ -467,10 +467,10 @@ s32 func_800AB560(View* view) { View_ViewportToVp(vp, &view->viewport); view->vp = *vp; - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetScissor(oGfxCtx->overlay.p++, G_SC_NON_INTERLACE, view->viewport.leftX, view->viewport.topY, + gDPPipeSync(OVERLAY_DISP++); + gDPSetScissor(OVERLAY_DISP++, G_SC_NON_INTERLACE, view->viewport.leftX, view->viewport.topY, view->viewport.rightX, view->viewport.bottomY); - gSPViewport(oGfxCtx->overlay.p++, vp); + gSPViewport(OVERLAY_DISP++, vp); projection = Graph_Alloc(gfxCtx, sizeof(Mtx)); LogUtils_CheckNullPointer("projection", projection, "../z_view.c", 833); @@ -484,8 +484,8 @@ s32 func_800AB560(View* view) { view->projection = *projection; - gSPPerspNormalize(oGfxCtx->overlay.p++, view->normal); - gSPMatrix(oGfxCtx->overlay.p++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); + gSPPerspNormalize(OVERLAY_DISP++, view->normal); + gSPMatrix(OVERLAY_DISP++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); viewing = Graph_Alloc(gfxCtx, sizeof(Mtx)); LogUtils_CheckNullPointer("viewing", viewing, "../z_view.c", 848); @@ -503,7 +503,7 @@ s32 func_800AB560(View* view) { view->viewing = *viewing; - gSPMatrix(oGfxCtx->overlay.p++, viewing, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); + gSPMatrix(OVERLAY_DISP++, viewing, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); CLOSE_DISPS(gfxCtx, "../z_view.c", 871); diff --git a/src/code/z_vr_box_draw.c b/src/code/z_vr_box_draw.c index f08feaf929..90b7b2d9b6 100644 --- a/src/code/z_vr_box_draw.c +++ b/src/code/z_vr_box_draw.c @@ -16,12 +16,12 @@ void SkyboxDraw_Draw(SkyboxContext* skyboxCtx, GraphicsContext* gfxCtx, s16 skyb func_800945A0(gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 7, skyboxCtx->staticSegments[0]); - gSPSegment(oGfxCtx->polyOpa.p++, 8, skyboxCtx->staticSegments[1]); - gSPSegment(oGfxCtx->polyOpa.p++, 9, skyboxCtx->staticSegments[2]); + gSPSegment(POLY_OPA_DISP++, 7, skyboxCtx->staticSegments[0]); + gSPSegment(POLY_OPA_DISP++, 8, skyboxCtx->staticSegments[1]); + gSPSegment(POLY_OPA_DISP++, 9, skyboxCtx->staticSegments[2]); - gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0x00, 0x00, 0, 0, 0, alpha); - gSPTexture(oGfxCtx->polyOpa.p++, 0x8000, 0x8000, 0, G_TX_RENDERTILE, G_ON); + gDPSetPrimColor(POLY_OPA_DISP++, 0x00, 0x00, 0, 0, 0, alpha); + gSPTexture(POLY_OPA_DISP++, 0x8000, 0x8000, 0, G_TX_RENDERTILE, G_ON); sSkyboxDrawMatrix = Graph_Alloc(gfxCtx, sizeof(Mtx)); @@ -31,53 +31,53 @@ void SkyboxDraw_Draw(SkyboxContext* skyboxCtx, GraphicsContext* gfxCtx, s16 skyb Matrix_RotateY(skyboxCtx->rot.y, MTXMODE_APPLY); Matrix_RotateZ(skyboxCtx->rot.z, MTXMODE_APPLY); Matrix_ToMtx(sSkyboxDrawMatrix, "../z_vr_box_draw.c", 76); - gSPMatrix(oGfxCtx->polyOpa.p++, sSkyboxDrawMatrix, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(POLY_OPA_DISP++, sSkyboxDrawMatrix, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetColorDither(oGfxCtx->polyOpa.p++, G_CD_MAGICSQ); - gDPSetTextureFilter(oGfxCtx->polyOpa.p++, G_TF_BILERP); + gDPSetColorDither(POLY_OPA_DISP++, G_CD_MAGICSQ); + gDPSetTextureFilter(POLY_OPA_DISP++, G_TF_BILERP); - gDPLoadTLUT_pal256(oGfxCtx->polyOpa.p++, skyboxCtx->staticSegments[2]); - gDPSetTextureLUT(oGfxCtx->polyOpa.p++, G_TT_RGBA16); - gDPSetTextureConvert(oGfxCtx->polyOpa.p++, G_TC_FILT); + gDPLoadTLUT_pal256(POLY_OPA_DISP++, skyboxCtx->staticSegments[2]); + gDPSetTextureLUT(POLY_OPA_DISP++, G_TT_RGBA16); + gDPSetTextureConvert(POLY_OPA_DISP++, G_TC_FILT); if (skyboxCtx->unk_140) { - gSPDisplayList(oGfxCtx->polyOpa.p++, skyboxCtx->dpList); - gSPDisplayList(oGfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 1); + gSPDisplayList(POLY_OPA_DISP++, skyboxCtx->dpList); + gSPDisplayList(POLY_OPA_DISP++, skyboxCtx->dpList + 150 * 1); - gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPPipeSync(POLY_OPA_DISP++); - gDPLoadTLUT_pal256(oGfxCtx->polyOpa.p++, (u16*)skyboxCtx->staticSegments[2] + 256 * 1); + gDPLoadTLUT_pal256(POLY_OPA_DISP++, (u16*)skyboxCtx->staticSegments[2] + 256 * 1); - gSPDisplayList(oGfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 2); - gSPDisplayList(oGfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 3); + gSPDisplayList(POLY_OPA_DISP++, skyboxCtx->dpList + 150 * 2); + gSPDisplayList(POLY_OPA_DISP++, skyboxCtx->dpList + 150 * 3); if (skyboxId != 2) { if (skyboxId <= 0x10 || skyboxId >= 0x19) { - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPLoadTLUT_pal256(oGfxCtx->polyOpa.p++, (u16*)skyboxCtx->staticSegments[2] + 256 * 2); - gSPDisplayList(oGfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 4); - gSPDisplayList(oGfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 5); - gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPPipeSync(POLY_OPA_DISP++); + gDPLoadTLUT_pal256(POLY_OPA_DISP++, (u16*)skyboxCtx->staticSegments[2] + 256 * 2); + gSPDisplayList(POLY_OPA_DISP++, skyboxCtx->dpList + 150 * 4); + gSPDisplayList(POLY_OPA_DISP++, skyboxCtx->dpList + 150 * 5); + gDPPipeSync(POLY_OPA_DISP++); if (skyboxCtx->unk_140 != 2) { - gDPLoadTLUT_pal256(oGfxCtx->polyOpa.p++, (u16*)skyboxCtx->staticSegments[2] + 256 * 3); - gSPDisplayList(oGfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 6); - gSPDisplayList(oGfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 7); + gDPLoadTLUT_pal256(POLY_OPA_DISP++, (u16*)skyboxCtx->staticSegments[2] + 256 * 3); + gSPDisplayList(POLY_OPA_DISP++, skyboxCtx->dpList + 150 * 6); + gSPDisplayList(POLY_OPA_DISP++, skyboxCtx->dpList + 150 * 7); } } } } else { - gSPDisplayList(oGfxCtx->polyOpa.p++, skyboxCtx->dpList); - gSPDisplayList(oGfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 2); - gSPDisplayList(oGfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 4); - gSPDisplayList(oGfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 6); - gSPDisplayList(oGfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 8); + gSPDisplayList(POLY_OPA_DISP++, skyboxCtx->dpList); + gSPDisplayList(POLY_OPA_DISP++, skyboxCtx->dpList + 150 * 2); + gSPDisplayList(POLY_OPA_DISP++, skyboxCtx->dpList + 150 * 4); + gSPDisplayList(POLY_OPA_DISP++, skyboxCtx->dpList + 150 * 6); + gSPDisplayList(POLY_OPA_DISP++, skyboxCtx->dpList + 150 * 8); if (skyboxId == 5) { - gSPDisplayList(oGfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 10); + gSPDisplayList(POLY_OPA_DISP++, skyboxCtx->dpList + 150 * 10); } } - gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPPipeSync(POLY_OPA_DISP++); CLOSE_DISPS(gfxCtx, "../z_vr_box_draw.c", 125); } diff --git a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c index 88c1aa326c..775fe35ca5 100644 --- a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c +++ b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c @@ -325,9 +325,9 @@ void ArmsHook_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80090480(globalCtx, &this->collider, &this->hookInfo, &sp6C, &sp60); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arms_hook.c", 895), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arms_hook.c", 895), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_0602B288); + gSPDisplayList(POLY_OPA_DISP++, D_0602B288); Matrix_Translate(this->actor.posRot.pos.x, this->actor.posRot.pos.y, this->actor.posRot.pos.z, MTXMODE_NEW); Math_Vec3f_Diff(&player->unk_3C8, &this->actor.posRot.pos, &sp78); sp58 = SQ(sp78.x) + SQ(sp78.z); @@ -335,9 +335,9 @@ void ArmsHook_Draw(Actor* thisx, GlobalContext* globalCtx) { Matrix_RotateY(Math_atan2f(sp78.x, sp78.z), MTXMODE_APPLY); Matrix_RotateX(Math_atan2f(-sp78.y, sp5C), MTXMODE_APPLY); Matrix_Scale(0.015f, 0.015f, sqrtf(SQ(sp78.y) + sp58) * 0.01f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arms_hook.c", 910), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arms_hook.c", 910), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_0602AFF0); + gSPDisplayList(POLY_OPA_DISP++, D_0602AFF0); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_arms_hook.c", 913); } diff --git a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c index 375acb4ec1..ca8e3475c8 100644 --- a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c +++ b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c @@ -215,18 +215,18 @@ void ArrowFire_Draw(Actor* thisx, GlobalContext* globalCtx) { // Draw red effect over the screen when arrow hits if (this->unk_15C > 0) { - oGfxCtx->polyXlu.p = func_800937C0(oGfxCtx->polyXlu.p); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, (s32)(40.0f * this->unk_15C) & 0xFF, 0, 0, + POLY_XLU_DISP = func_800937C0(POLY_XLU_DISP); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, (s32)(40.0f * this->unk_15C) & 0xFF, 0, 0, (s32)(150.0f * this->unk_15C) & 0xFF); - gDPSetAlphaDither(oGfxCtx->polyXlu.p++, G_AD_DISABLE); - gDPSetColorDither(oGfxCtx->polyXlu.p++, G_CD_DISABLE); - gDPFillRectangle(oGfxCtx->polyXlu.p++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1); + gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_DISABLE); + gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE); + gDPFillRectangle(POLY_XLU_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1); } // Draw fire on the arrow func_80093D84(globalCtx->state.gfxCtx); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x80, 0x80, 255, 200, 0, this->alpha); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 255, 0, 0, 128); + gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 200, 0, this->alpha); + gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 128); Matrix_RotateRPY(0x4000, 0x0, 0x0, MTXMODE_APPLY); if (this->timer != 0) { Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY); @@ -235,13 +235,13 @@ void ArrowFire_Draw(Actor* thisx, GlobalContext* globalCtx) { } Matrix_Scale(this->radius * 0.2f, this->unk_158 * 4.0f, this->radius * 0.2f, MTXMODE_APPLY); Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arrow_fire.c", 666), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arrow_fire.c", 666), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, sTextureDL); - gSPDisplayList(oGfxCtx->polyXlu.p++, + gSPDisplayList(POLY_XLU_DISP++, sTextureDL); + gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 255 - (stateFrames * 2) % 256, 0, 64, 32, 1, 255 - stateFrames % 256, 511 - (stateFrames * 10) % 512, 64, 64)); - gSPDisplayList(oGfxCtx->polyXlu.p++, sVertexDL); + gSPDisplayList(POLY_XLU_DISP++, sVertexDL); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_arrow_fire.c", 682); } diff --git a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c index 78ab62bacd..e34b68c11f 100644 --- a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c +++ b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c @@ -216,18 +216,18 @@ void ArrowIce_Draw(Actor* thisx, GlobalContext* globalCtx) { // Draw blue effect over the screen when arrow hits if (this->unk_164 > 0) { - oGfxCtx->polyXlu.p = func_800937C0(oGfxCtx->polyXlu.p); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 0, (s32)(10.0f * this->unk_164) & 0xFF, + POLY_XLU_DISP = func_800937C0(POLY_XLU_DISP); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 0, (s32)(10.0f * this->unk_164) & 0xFF, (s32)(50.0f * this->unk_164) & 0xFF, (s32)(150.0f * this->unk_164) & 0xFF); - gDPSetAlphaDither(oGfxCtx->polyXlu.p++, G_AD_DISABLE); - gDPSetColorDither(oGfxCtx->polyXlu.p++, G_CD_DISABLE); - gDPFillRectangle(oGfxCtx->polyXlu.p++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1); + gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_DISABLE); + gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE); + gDPFillRectangle(POLY_XLU_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1); } // Draw ice on the arrow func_80093D84(globalCtx->state.gfxCtx); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x80, 0x80, 170, 255, 255, this->alpha); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 128); + gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 170, 255, 255, this->alpha); + gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 255, 128); Matrix_RotateRPY(0x4000, 0x0, 0x0, MTXMODE_APPLY); if (this->timer != 0) { Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY); @@ -236,13 +236,13 @@ void ArrowIce_Draw(Actor* thisx, GlobalContext* globalCtx) { } Matrix_Scale(this->radius * 0.2f, this->unk_160 * 3.0f, this->radius * 0.2f, MTXMODE_APPLY); Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arrow_ice.c", 660), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arrow_ice.c", 660), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, sTextureDL); - gSPDisplayList(oGfxCtx->polyXlu.p++, + gSPDisplayList(POLY_XLU_DISP++, sTextureDL); + gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 511 - (stateFrames * 5) % 512, 0, 128, 32, 1, 511 - (stateFrames * 10) % 512, 511 - (stateFrames * 10) % 512, 4, 16)); - gSPDisplayList(oGfxCtx->polyXlu.p++, sVertexDL); + gSPDisplayList(POLY_XLU_DISP++, sVertexDL); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_arrow_ice.c", 676); } diff --git a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c index 1e59f5eb7d..02feaaf5e4 100644 --- a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c +++ b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c @@ -216,18 +216,18 @@ void ArrowLight_Draw(Actor* thisx, GlobalContext* globalCtx) { // Draw yellow effect over the screen when arrow hits if (this->unk_164 > 0) { - oGfxCtx->polyXlu.p = func_800937C0(oGfxCtx->polyXlu.p); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, (s32)(30.0f * this->unk_164) & 0xFF, + POLY_XLU_DISP = func_800937C0(POLY_XLU_DISP); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, (s32)(30.0f * this->unk_164) & 0xFF, (s32)(40.0f * this->unk_164) & 0xFF, 0, (s32)(150.0f * this->unk_164) & 0xFF); - gDPSetAlphaDither(oGfxCtx->polyXlu.p++, G_AD_DISABLE); - gDPSetColorDither(oGfxCtx->polyXlu.p++, G_CD_DISABLE); - gDPFillRectangle(oGfxCtx->polyXlu.p++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1); + gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_DISABLE); + gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE); + gDPFillRectangle(POLY_XLU_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1); } // Draw light on the arrow func_80093D84(globalCtx->state.gfxCtx); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x80, 0x80, 255, 255, 170, this->alpha); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 255, 255, 0, 128); + gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 170, this->alpha); + gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 0, 128); Matrix_RotateRPY(0x4000, 0x0, 0x0, MTXMODE_APPLY); if (this->timer != 0) { Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY); @@ -236,13 +236,13 @@ void ArrowLight_Draw(Actor* thisx, GlobalContext* globalCtx) { } Matrix_Scale(this->radius * 0.2f, this->unk_160 * 4.0f, this->radius * 0.2f, MTXMODE_APPLY); Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arrow_light.c", 648), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arrow_light.c", 648), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, sTextureDL); - gSPDisplayList(oGfxCtx->polyXlu.p++, + gSPDisplayList(POLY_XLU_DISP++, sTextureDL); + gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 511 - (stateFrames * 5) % 512, 0, 4, 32, 1, 511 - (stateFrames * 10) % 512, 511 - (stateFrames * 30) % 512, 8, 16)); - gSPDisplayList(oGfxCtx->polyXlu.p++, sVertexDL); + gSPDisplayList(POLY_XLU_DISP++, sVertexDL); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_arrow_light.c", 664); } diff --git a/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c b/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c index 07178bf96d..c4685dd570 100644 --- a/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c +++ b/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c @@ -274,9 +274,9 @@ void BgDodoago_Draw(Actor* thisx, GlobalContext* globalCtx) { if (Flags_GetEventChkInf(0xB0)) { func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_dodoago.c", 677), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_dodoago.c", 677), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_60013500); + gSPDisplayList(POLY_OPA_DISP++, D_60013500); } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_dodoago.c", 681); diff --git a/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c b/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c index 27de2b09bc..f6aa35d6f9 100644 --- a/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c +++ b/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c @@ -131,9 +131,9 @@ void BgGateShutter_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_gate_shutter.c", 328), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_gate_shutter.c", 328), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06001CD0); + gSPDisplayList(POLY_OPA_DISP++, D_06001CD0); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_gate_shutter.c", 333); } diff --git a/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c b/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c index dfd138731c..3340e59d0c 100644 --- a/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c +++ b/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c @@ -107,18 +107,18 @@ void BgGjyoBridge_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyXlu.p++, 8, + gSPSegment(POLY_XLU_DISP++, 8, Gfx_TexScroll(globalCtx->state.gfxCtx, globalCtx->gameplayFrames & 127, globalCtx->gameplayFrames * -3 & 127, 32, 32)); - gSPSegment(oGfxCtx->polyXlu.p++, 9, + gSPSegment(POLY_XLU_DISP++, 9, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, -globalCtx->gameplayFrames & 127, 32, 32, 1, 0, globalCtx->gameplayFrames & 127, 32, 32)); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_gjyo_bridge.c", 281), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_gjyo_bridge.c", 281), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_06000600); + gSPDisplayList(POLY_XLU_DISP++, D_06000600); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_gjyo_bridge.c", 285); } diff --git a/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c b/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c index 1acdce8353..e7bc8124fe 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c +++ b/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c @@ -204,7 +204,7 @@ void BgGndDarkmeiro_DrawSwitchBlock(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_gnd_darkmeiro.c", 378); //@bug Due to a bug in the display list, the transparency data is not used. - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 198, 202, 208, this->timer2); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 198, 202, 208, this->timer2); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_gnd_darkmeiro.c", 380); Gfx_DrawDListXlu(globalCtx, D_0600BEC0); @@ -213,7 +213,7 @@ void BgGndDarkmeiro_DrawSwitchBlock(Actor* thisx, GlobalContext* globalCtx) { void BgGndDarkmeiro_DrawStaticBlock(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_gnd_darkmeiro.c", 391); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 198, 202, 208, 255); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 198, 202, 208, 255); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_gnd_darkmeiro.c", 393); Gfx_DrawDListXlu(globalCtx, D_0600BEC0); diff --git a/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c b/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c index 0dd69cefbd..4c476b7894 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c +++ b/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c @@ -197,10 +197,10 @@ void BgGndSoulmeiro_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_gnd_soulmeiro.c", 398); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_gnd_soulmeiro.c", 400), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_gnd_soulmeiro.c", 400), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_8087B578[params]); + gSPDisplayList(POLY_XLU_DISP++, D_8087B578[params]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_gnd_soulmeiro.c", 403); break; case 1: diff --git a/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c b/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c index efd5baf7cb..53854ef5a2 100644 --- a/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c +++ b/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c @@ -157,13 +157,13 @@ void BgHaka_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_haka.c", 406), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_haka.c", 406), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_060001B0); + gSPDisplayList(POLY_OPA_DISP++, D_060001B0); Matrix_Translate(0.0f, 0.0f, thisx->minVelocityY * 10.0f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_haka.c", 416), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_haka.c", 416), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_060002A8); + gSPDisplayList(POLY_XLU_DISP++, D_060002A8); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_haka.c", 421); } diff --git a/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c b/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c index 5598b79358..cb44f51940 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c +++ b/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c @@ -205,14 +205,14 @@ void BgHakaTubo_DrawFlameCircle(BgHakaTubo* this, GlobalContext* globalCtx) { Matrix_RotateY(this->dyna.actor.shape.rot.y * 0.0000958738f, MTXMODE_APPLY); Matrix_Scale(0.07f, 0.04f, 0.07f, MTXMODE_APPLY); if (1) {} - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x80, 0x80, 0, 170, 255, 255); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 255); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 0, 170, 255, 255); + gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 255, 255); + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, this->fireScroll & 127, 0, 32, 64, 1, 0, (this->fireScroll * -15) & 0xFF, 32, 64)); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_haka_tubo.c", 497), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_haka_tubo.c", 497), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_040184B0); + gSPDisplayList(POLY_XLU_DISP++, D_040184B0); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_haka_tubo.c", 501); } diff --git a/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c b/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c index 1af709622d..98e09a5091 100644 --- a/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c +++ b/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c @@ -510,9 +510,9 @@ void BgHeavyBlock_Draw(Actor* thisx, GlobalContext* globalCtx) { Matrix_MultVec3f(&D_80884ED4, &thisx->initPosRot); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_heavy_block.c", 931), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_heavy_block.c", 931), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_060013C0); + gSPDisplayList(POLY_OPA_DISP++, D_060013C0); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_heavy_block.c", 935); } diff --git a/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c b/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c index 385f555138..ee52113355 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c @@ -236,18 +236,18 @@ void BgHidanCurtain_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_hidan_curtain.c", 685); func_80093D84(globalCtx->state.gfxCtx); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x80, 0x80, 255, 220, 0, this->alpha); + gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 220, 0, this->alpha); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 255, 0, 0, 0); + gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, this->texScroll & 0x7F, 0, 0x20, 0x40, 1, 0, (this->texScroll * -0xF) & 0xFF, 0x20, 0x40)); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_hidan_curtain.c", 698), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_hidan_curtain.c", 698), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_040184B0); + gSPDisplayList(POLY_XLU_DISP++, D_040184B0); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_hidan_curtain.c", 702); } diff --git a/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c b/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c index 0d4273c77e..1925ef8551 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c @@ -195,14 +195,14 @@ void BgHidanFirewall_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_hidan_firewall.c", 448); - oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 0x14); + POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x14); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_80886D04[this->unk_150])); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0x01, 255, 255, 0, 150); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 255, 0, 0, 255); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_hidan_firewall.c", 458), + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_80886D04[this->unk_150])); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x01, 255, 255, 0, 150); + gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 255); + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_hidan_firewall.c", 458), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_0600DA80); + gSPDisplayList(POLY_XLU_DISP++, D_0600DA80); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_hidan_firewall.c", 463); } diff --git a/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c b/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c index 7eeecd4234..91ba4f00bc 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c @@ -238,24 +238,24 @@ void BgHidanFwbig_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_hidan_fwbig.c", 630); func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, SEGMENTED_TO_VIRTUAL(D_040173D0)); + gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(D_040173D0)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0A, SEGMENTED_TO_VIRTUAL(D_04017BD0)); + gSPSegment(POLY_XLU_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(D_04017BD0)); height = thisx->scale.y * 2400.0f; - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x80, 0x80, 255, 220, 0, + gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 220, 0, ((height - (thisx->initPosRot.pos.y - thisx->posRot.pos.y)) * 255.0f) / height); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 255, 0, 0, 0); + gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, globalCtx->gameplayFrames % 0x80, 0, 0x20, 0x40, 1, 0, (u8)(globalCtx->gameplayFrames * -15), 0x20, 0x40)); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_hidan_fwbig.c", 660), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_hidan_fwbig.c", 660), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_0600DB20); + gSPDisplayList(POLY_XLU_DISP++, D_0600DB20); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_hidan_fwbig.c", 664); } diff --git a/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c b/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c index d499a18df4..2147886e15 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c @@ -156,9 +156,9 @@ void BgHidanKousi_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_hidan_kousi.c", 354), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_hidan_kousi.c", 354), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_80889E84[thisx->params & 0xFF]); + gSPDisplayList(POLY_OPA_DISP++, D_80889E84[thisx->params & 0xFF]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_hidan_kousi.c", 359); } diff --git a/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c b/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c index 1a7e37485e..76e9587c60 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c @@ -182,28 +182,28 @@ void BgHidanRsekizou_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_hidan_rsekizou.c", 568), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_hidan_rsekizou.c", 568), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_0600AD00); + gSPDisplayList(POLY_OPA_DISP++, D_0600AD00); Matrix_MtxFCopy(&mf, &gMtxFClear); - oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 0x14); + POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x14); if ((s16)((func_8005A9F4(ACTIVE_CAM) - this->dyna.actor.shape.rot.y) - 0x2E6C) >= 0) { for (i = 3; i >= 0; i--) { - oGfxCtx->polyXlu.p = BgHidanRsekizou_DrawFireball(globalCtx, this, i, &mf, 0, oGfxCtx->polyXlu.p); + POLY_XLU_DISP = BgHidanRsekizou_DrawFireball(globalCtx, this, i, &mf, 0, POLY_XLU_DISP); } for (i = 0; i < 4; i++) { - oGfxCtx->polyXlu.p = BgHidanRsekizou_DrawFireball(globalCtx, this, i, &mf, 1, oGfxCtx->polyXlu.p); + POLY_XLU_DISP = BgHidanRsekizou_DrawFireball(globalCtx, this, i, &mf, 1, POLY_XLU_DISP); } } else { for (i = 3; i >= 0; i--) { - oGfxCtx->polyXlu.p = BgHidanRsekizou_DrawFireball(globalCtx, this, i, &mf, 1, oGfxCtx->polyXlu.p); + POLY_XLU_DISP = BgHidanRsekizou_DrawFireball(globalCtx, this, i, &mf, 1, POLY_XLU_DISP); } for (i = 0; i < 4; i++) { - oGfxCtx->polyXlu.p = BgHidanRsekizou_DrawFireball(globalCtx, this, i, &mf, 0, oGfxCtx->polyXlu.p); + POLY_XLU_DISP = BgHidanRsekizou_DrawFireball(globalCtx, this, i, &mf, 0, POLY_XLU_DISP); } } diff --git a/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c b/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c index 5492efb411..e79dc0218f 100644 --- a/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c +++ b/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c @@ -111,10 +111,10 @@ void BgIngate_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_ingate.c", 245), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_ingate.c", 245), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06001040); + gSPDisplayList(POLY_OPA_DISP++, D_06001040); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_ingate.c", 250); } diff --git a/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.c b/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.c index 4469ad10a0..55ad7cbb02 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.c +++ b/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.c @@ -72,11 +72,11 @@ void BgJyaBlock_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(&D_05004350)); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_jya_block.c", 153), + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(&D_05004350)); + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_jya_block.c", 153), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 232, 210, 176, 255); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_05004CD0); + gDPSetEnvColor(POLY_OPA_DISP++, 232, 210, 176, 255); + gSPDisplayList(POLY_OPA_DISP++, D_05004CD0); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_block.c", 158); } diff --git a/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c b/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c index 4d16fafbe5..4b9b92e0a7 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c +++ b/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c @@ -189,9 +189,9 @@ void BgJyaBombchuiwa_Update(Actor* thisx, GlobalContext* globalCtx) { void BgJyaBombchuiwa_DrawRock(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_bombchuiwa.c", 436); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_jya_bombchuiwa.c", 439), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_jya_bombchuiwa.c", 439), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_060119B0); + gSPDisplayList(POLY_XLU_DISP++, D_060119B0); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_bombchuiwa.c", 443); } @@ -200,13 +200,13 @@ void BgJyaBombchuiwa_DrawLight(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_bombchuiwa.c", 453); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_jya_bombchuiwa.c", 457), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_jya_bombchuiwa.c", 457), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 255, 255, CLAMP_MAX((u32)(this->lightRayIntensity * 153.0f), 153)); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_0600DC40); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 255, 255, CLAMP_MAX((u32)(this->lightRayIntensity * 255.0f), 255)); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_0600DB60); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, CLAMP_MAX((u32)(this->lightRayIntensity * 153.0f), 153)); + gSPDisplayList(POLY_XLU_DISP++, D_0600DC40); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, CLAMP_MAX((u32)(this->lightRayIntensity * 255.0f), 255)); + gSPDisplayList(POLY_XLU_DISP++, D_0600DB60); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_bombchuiwa.c", 472); } diff --git a/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c b/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c index e2d3308c32..35a5d5e3ea 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c +++ b/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c @@ -295,11 +295,11 @@ void BgJyaMegami_DrawFace(BgJyaMegami* this, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_megami.c", 706); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sRightSideCrumbles[this->crumbleIndex])); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(sLeftSideCrumbles[this->crumbleIndex])); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_jya_megami.c", 716), + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sRightSideCrumbles[this->crumbleIndex])); + gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sLeftSideCrumbles[this->crumbleIndex])); + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_jya_megami.c", 716), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06005780); + gSPDisplayList(POLY_OPA_DISP++, D_06005780); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_megami.c", 720); } @@ -323,9 +323,9 @@ void BgJyaMegami_DrawExplode(BgJyaMegami* this, GlobalContext* globalCtx) { Matrix_Translate(sPiecesInit[i].unk_00.x * -10.0f, sPiecesInit[i].unk_00.y * -10.0f, sPiecesInit[i].unk_00.z * -10.0f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_jya_megami.c", 778), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_jya_megami.c", 778), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDLists[i]); + gSPDisplayList(POLY_OPA_DISP++, sDLists[i]); } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_megami.c", 783); diff --git a/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c b/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c index 1958590907..fa149001a4 100644 --- a/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c +++ b/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c @@ -112,18 +112,18 @@ void BgMenkuriEye_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_menkuri_eye.c", 292); func_80093D84(globalCtx->state.gfxCtx); if (Flags_GetSwitch(globalCtx, this->actor.params)) { - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 200, 0, 0, 255); + gDPSetEnvColor(POLY_XLU_DISP++, 200, 0, 0, 255); } else if (this->framesUntilDisable == -1) { - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 200, 0, 0, 0); + gDPSetEnvColor(POLY_XLU_DISP++, 200, 0, 0, 0); } else { - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 200, 0, 0, 255); + gDPSetEnvColor(POLY_XLU_DISP++, 200, 0, 0, 255); } Matrix_Translate(this->actor.posRot.pos.x, this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0); Matrix_RotateRPY(this->actor.posRot.rot.x, this->actor.posRot.rot.y, this->actor.posRot.rot.z, 1); Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, 1); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_menkuri_eye.c", 331), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_menkuri_eye.c", 331), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_06002D20); + gSPDisplayList(POLY_XLU_DISP++, D_06002D20); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_menkuri_eye.c", 335); } diff --git a/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c b/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c index e498b4c711..d626c9264c 100644 --- a/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c +++ b/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c @@ -332,18 +332,18 @@ void BgMizuWater_Draw(Actor* thisx, GlobalContext* globalCtx) { gameplayFrames = globalCtx->gameplayFrames; func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0C, + gSPSegment(POLY_XLU_DISP++, 0x0C, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, -gameplayFrames * 1, gameplayFrames * 1, 32, 32, 1, 0, -gameplayFrames * 1, 32, 32)); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mizu_water.c", 749), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mizu_water.c", 749), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 255, 255, 255, 128); + gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 255, 128); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 255, 255, 102); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 102); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_06004B20); + gSPDisplayList(POLY_XLU_DISP++, D_06004B20); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_mizu_water.c", 756); } diff --git a/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c b/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c index c7b424313b..0fdc7414d0 100644 --- a/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c +++ b/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c @@ -109,15 +109,15 @@ void BgMjin_Draw(Actor* thisx, GlobalContext* globalCtx) { if (objBankIndex >= 0) { gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[objBankIndex].segment); } - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(&D_06000000)); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(&D_06000000)); dlist = D_06000330; } else { dlist = D_06000140; } func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mjin.c", 285), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mjin.c", 285), G_MTX_NOPUSH | G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, dlist); + gSPDisplayList(POLY_OPA_DISP++, dlist); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_mjin.c", 288); } diff --git a/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c b/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c index cef037edc1..e4ae646b7b 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c +++ b/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c @@ -251,11 +251,11 @@ void BgMoriBigst_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_bigst.c", 541); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, globalCtx->objectCtx.status[this->moriTexObjIndex].segment); + gSPSegment(POLY_OPA_DISP++, 0x08, globalCtx->objectCtx.status[this->moriTexObjIndex].segment); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_bigst.c", 548), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_bigst.c", 548), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06001E50); + gSPDisplayList(POLY_OPA_DISP++, D_06001E50); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_bigst.c", 553); } diff --git a/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c b/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c index 508ddaf87b..5cc513f853 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c +++ b/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c @@ -260,10 +260,10 @@ void BgMoriElevator_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_elevator.c", 575); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, globalCtx->objectCtx.status[this->moriTexObjIndex].segment); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_elevator.c", 580), + gSPSegment(POLY_OPA_DISP++, 0x08, globalCtx->objectCtx.status[this->moriTexObjIndex].segment); + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_elevator.c", 580), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06002AD0); + gSPDisplayList(POLY_OPA_DISP++, D_06002AD0); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_elevator.c", 584); } diff --git a/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c b/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c index 1cc010c078..5561c50767 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c +++ b/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c @@ -278,17 +278,17 @@ void BgMoriHashigo_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_hashigo.c", 516); func_80093D18(globalCtx->state.gfxCtx); if (1) {} - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, globalCtx->objectCtx.status[this->moriTexObjIndex].segment); + gSPSegment(POLY_OPA_DISP++, 0x08, globalCtx->objectCtx.status[this->moriTexObjIndex].segment); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_hashigo.c", 521), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_hashigo.c", 521), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); switch (this->dyna.actor.params) { case -1: - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06004770); + gSPDisplayList(POLY_OPA_DISP++, D_06004770); break; case 0: - gSPDisplayList(oGfxCtx->polyOpa.p++, D_060036B0); + gSPDisplayList(POLY_OPA_DISP++, D_060036B0); break; } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_hashigo.c", 531); diff --git a/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c b/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c index 2d7f3dfd7a..d7d7bf83f2 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c +++ b/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c @@ -168,11 +168,11 @@ void BgMoriHashira4_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_hashira4.c", 339); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, globalCtx->objectCtx.status[this->moriTexObjIndex].segment); + gSPSegment(POLY_OPA_DISP++, 0x08, globalCtx->objectCtx.status[this->moriTexObjIndex].segment); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_hashira4.c", 344), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_hashira4.c", 344), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDisplayLists[this->dyna.actor.params]); + gSPDisplayList(POLY_OPA_DISP++, sDisplayLists[this->dyna.actor.params]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_hashira4.c", 348); } diff --git a/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c b/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c index 4fd3f2ce12..fbe3ab01e0 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c +++ b/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c @@ -235,10 +235,10 @@ void BgMoriHineri_DrawHallAndRoom(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_hineri.c", 611); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, globalCtx->objectCtx.status[this->moriTexObjIdx].segment); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_hineri.c", 618), + gSPSegment(POLY_OPA_DISP++, 0x08, globalCtx->objectCtx.status[this->moriTexObjIdx].segment); + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_hineri.c", 618), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDLists[this->dyna.actor.params]); + gSPDisplayList(POLY_OPA_DISP++, sDLists[this->dyna.actor.params]); if (this->boxObjIdx > 0) { Matrix_Get(&mtx); } @@ -251,21 +251,21 @@ void BgMoriHineri_DrawHallAndRoom(Actor* thisx, GlobalContext* globalCtx) { } Matrix_RotateRPY(0, -0x8000, this->dyna.actor.shape.rot.z, MTXMODE_APPLY); Matrix_Translate(0.0f, -50.0f, 0.0f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_hineri.c", 652), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_hineri.c", 652), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_04049FE0); + gSPDisplayList(POLY_OPA_DISP++, D_04049FE0); } if ((this->boxObjIdx > 0) && ((this->boxObjIdx = Object_GetIndex(&globalCtx->objectCtx, OBJECT_BOX)) > 0) && (Object_IsLoaded(&globalCtx->objectCtx, this->boxObjIdx))) { - gSPSegment(oGfxCtx->polyOpa.p++, 0x06, globalCtx->objectCtx.status[this->boxObjIdx].segment); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, &D_80116280[2]); + gSPSegment(POLY_OPA_DISP++, 0x06, globalCtx->objectCtx.status[this->boxObjIdx].segment); + gSPSegment(POLY_OPA_DISP++, 0x08, &D_80116280[2]); Matrix_Put(&mtx); Matrix_Translate(147.0f, -245.0f, -453.0f, MTXMODE_APPLY); Matrix_RotateY(1.5707964f, MTXMODE_APPLY); Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_hineri.c", 689), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_hineri.c", 689), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06000AE8); + gSPDisplayList(POLY_OPA_DISP++, D_06000AE8); Matrix_Put(&mtx); Matrix_Translate(167.0f, -218.0f, -453.0f, MTXMODE_APPLY); if (Flags_GetTreasure(globalCtx, 0xE)) { @@ -274,9 +274,9 @@ void BgMoriHineri_DrawHallAndRoom(Actor* thisx, GlobalContext* globalCtx) { Matrix_RotateZ(M_PI, MTXMODE_APPLY); } Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_hineri.c", 703), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_hineri.c", 703), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06001678); + gSPDisplayList(POLY_OPA_DISP++, D_06001678); } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_hineri.c", 709); diff --git a/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c b/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c index fdb4c03342..2e6fdded9c 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c +++ b/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c @@ -169,18 +169,18 @@ void BgMoriIdomizu_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_idomizu.c", 360), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_idomizu.c", 360), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, globalCtx->objectCtx.status[this->moriTexObjIndex].segment); + gSPSegment(POLY_XLU_DISP++, 0x08, globalCtx->objectCtx.status[this->moriTexObjIndex].segment); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 0, 0, 128); + gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, 128); - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, + gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0x7F - (gameplayFrames & 0x7F), gameplayFrames % 0x80, 0x20, 0x20, 1, gameplayFrames & 0x7F, gameplayFrames % 0x80, 0x20, 0x20)); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_060049D0); + gSPDisplayList(POLY_XLU_DISP++, D_060049D0); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_idomizu.c", 382); } diff --git a/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c b/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c index be091d9faa..5b676eb098 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c +++ b/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c @@ -168,12 +168,12 @@ void BgMoriKaitenkabe_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_kaitenkabe.c", 347); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, globalCtx->objectCtx.status[this->moriTexObjIndex].segment); + gSPSegment(POLY_OPA_DISP++, 0x08, globalCtx->objectCtx.status[this->moriTexObjIndex].segment); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_kaitenkabe.c", 352), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_kaitenkabe.c", 352), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_060056B0); + gSPDisplayList(POLY_OPA_DISP++, D_060056B0); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_kaitenkabe.c", 356); } diff --git a/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c b/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c index 812fba0ff3..4c32aa6395 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c +++ b/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c @@ -229,12 +229,12 @@ void BgMoriRakkatenjo_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_rakkatenjo.c", 497); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, globalCtx->objectCtx.status[this->moriTexObjIndex].segment); + gSPSegment(POLY_OPA_DISP++, 0x08, globalCtx->objectCtx.status[this->moriTexObjIndex].segment); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_rakkatenjo.c", 502), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_rakkatenjo.c", 502), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06007690); + gSPDisplayList(POLY_OPA_DISP++, D_06007690); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_rakkatenjo.c", 506); } diff --git a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c index cbf23f1937..08c5aaa041 100644 --- a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c +++ b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c @@ -598,11 +598,11 @@ void BgPoEvent_Draw(Actor* thisx, GlobalContext* globalCtx) { } else { alpha = this->timer; } - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 255, 255, 255, alpha); + gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 255, alpha); } - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_po_event.c", 1501), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_po_event.c", 1501), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, displayLists[this->type]); + gSPDisplayList(POLY_OPA_DISP++, displayLists[this->type]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_po_event.c", 1508); if ((this->type == 0) || (this->type == 1)) { diff --git a/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c b/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c index 1d84919ee0..abce92f52b 100644 --- a/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c +++ b/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c @@ -141,9 +141,9 @@ void BgPoSyokudai_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_po_syokudai.c", 315); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_po_syokudai.c", 319), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_po_syokudai.c", 319), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_060003A0); + gSPDisplayList(POLY_OPA_DISP++, D_060003A0); if (Flags_GetSwitch(globalCtx, this->actor.params)) { Color_RGBA8* primColor = &sPrimColors[this->flameColor]; @@ -158,21 +158,21 @@ void BgPoSyokudai_Draw(Actor* thisx, GlobalContext* globalCtx) { Lights_PointSetColorAndRadius(&this->lightInfo, red, green, blue, 200); func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, (this->flameTextureScroll * -20) & 0x1FF, 32, 128)); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x80, 0x80, primColor->r, primColor->g, primColor->b, 255); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, envColor->r, envColor->g, envColor->b, 255); + gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, primColor->r, primColor->g, primColor->b, 255); + gDPSetEnvColor(POLY_XLU_DISP++, envColor->r, envColor->g, envColor->b, 255); Matrix_Translate(0.0f, 52.0f, 0.0f, MTXMODE_APPLY); Matrix_RotateY((s16)(func_8005A9F4(ACTIVE_CAM) - this->actor.shape.rot.y + 0x8000) * (M_PI / 0x8000), MTXMODE_APPLY); Matrix_Scale(0.0027f, 0.0027f, 0.0027f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_po_syokudai.c", 368), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_po_syokudai.c", 368), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_0404D4E0); + gSPDisplayList(POLY_XLU_DISP++, D_0404D4E0); } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_po_syokudai.c", 373); } diff --git a/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.c b/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.c index ed101fd6d6..07cdf29c27 100644 --- a/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.c +++ b/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.c @@ -84,9 +84,9 @@ void BgPushbox_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_pushbox.c", 263); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_pushbox.c", 269), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_pushbox.c", 269), G_MTX_NOPUSH | G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, &D_06000000); + gSPDisplayList(POLY_OPA_DISP++, &D_06000000); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_pushbox.c", 272); } diff --git a/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c b/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c index cf08b33ebf..fad63612c9 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c +++ b/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c @@ -82,9 +82,9 @@ void BgSpot01Fusya_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot01_fusya.c", 214), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot01_fusya.c", 214), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06000100); + gSPDisplayList(POLY_OPA_DISP++, D_06000100); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot01_fusya.c", 219); } diff --git a/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c b/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c index 3e16fabfd7..bace776630 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c +++ b/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c @@ -329,10 +329,10 @@ void func_808AB700(BgSpot01Idohashira* this, GlobalContext* globalCtx) { func_80093D18(localGfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(localGfxCtx, "../z_bg_spot01_idohashira.c", 699), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(localGfxCtx, "../z_bg_spot01_idohashira.c", 699), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); func_808AAF34(this, globalCtx); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06000420); + gSPDisplayList(POLY_OPA_DISP++, D_06000420); CLOSE_DISPS(localGfxCtx, "../z_bg_spot01_idohashira.c", 708); } diff --git a/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c b/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c index 7d424c55c8..22fa4dc354 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c +++ b/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c @@ -76,15 +76,15 @@ void BgSpot01Idomizu_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot01_idomizu.c", 232), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot01_idomizu.c", 232), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); frames = globalCtx->state.frames; - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - frames % 128, frames & 0x7F, 32, 32, 1, frames % 128, frames & 0x7F, 32, 32)); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_060007D0); + gSPDisplayList(POLY_XLU_DISP++, D_060007D0); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot01_idomizu.c", 244); } diff --git a/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c b/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c index 5b584161ef..9a87e8f6bd 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c +++ b/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c @@ -78,9 +78,9 @@ void BgSpot01Idosoko_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot01_idosoko.c", 166), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot01_idosoko.c", 166), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, &D_06003B20); + gSPDisplayList(POLY_OPA_DISP++, &D_06003B20); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot01_idosoko.c", 171); } diff --git a/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c b/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c index ec01d4ddd4..36fe102fe7 100644 --- a/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c +++ b/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c @@ -132,30 +132,30 @@ void BgSpot03Taki_Draw(Actor* thisx, GlobalContext* globalCtx) { gameplayFrames = globalCtx->gameplayFrames; - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot03_taki.c", 325), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot03_taki.c", 325), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); func_80093D84(globalCtx->state.gfxCtx); gSPSegment( - oGfxCtx->polyXlu.p++, 0x08, + POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, gameplayFrames * 5, 64, 64, 1, 0, gameplayFrames * 5, 64, 64)); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_06000B20); + gSPDisplayList(POLY_XLU_DISP++, D_06000B20); if (this->bufferIndex == 0) { - gSPVertex(oGfxCtx->polyXlu.p++, D_06000800, 25, 0); + gSPVertex(POLY_XLU_DISP++, D_06000800, 25, 0); } else { - gSPVertex(oGfxCtx->polyXlu.p++, D_06000990, 25, 0); + gSPVertex(POLY_XLU_DISP++, D_06000990, 25, 0); } - gSPDisplayList(oGfxCtx->polyXlu.p++, D_06000BC0); + gSPDisplayList(POLY_XLU_DISP++, D_06000BC0); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, gameplayFrames * 1, gameplayFrames * 3, 64, 64, 1, -gameplayFrames, gameplayFrames * 3, 64, 64)); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_06001580); + gSPDisplayList(POLY_XLU_DISP++, D_06001580); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot03_taki.c", 358); diff --git a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c index 60623e86da..482f3e37a8 100644 --- a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c +++ b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c @@ -174,9 +174,9 @@ void BgSpot09Obj_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot09_obj.c", 391), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot09_obj.c", 391), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_06008010); + gSPDisplayList(POLY_XLU_DISP++, D_06008010); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot09_obj.c", 396); } diff --git a/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c b/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c index 06d8ff9943..00f15da908 100644 --- a/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c +++ b/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c @@ -150,11 +150,11 @@ void BgSpot11Oasis_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot11_oasis.c", 327); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot11_oasis.c", 331), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot11_oasis.c", 331), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - (gameplayFrames % 128), (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_06000870); + gSPDisplayList(POLY_XLU_DISP++, D_06000870); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot11_oasis.c", 346); } diff --git a/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c b/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c index cc81638051..6d959072fd 100644 --- a/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c +++ b/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c @@ -99,9 +99,9 @@ void BgSpot15Saku_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot15_saku.c", 263), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot15_saku.c", 263), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_060003C0); + gSPDisplayList(POLY_XLU_DISP++, D_060003C0); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot15_saku.c", 268); } diff --git a/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c b/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c index 707b898e6a..3c73b7a09d 100644 --- a/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c +++ b/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c @@ -512,16 +512,16 @@ void BgSpot16Bombstone_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot16_bombstone.c", 1257), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot16_bombstone.c", 1257), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (this->actor.params == 0xFF) { // The boulder is intact - gSPDisplayList(oGfxCtx->polyOpa.p++, this->unk_150); + gSPDisplayList(POLY_OPA_DISP++, this->unk_150); } else { // The boulder is debris - gSPSegment(oGfxCtx->polyOpa.p++, 0x06, globalCtx->objectCtx.status[this->bombiwaBankIndex].segment); - gSPDisplayList(oGfxCtx->polyOpa.p++, this->unk_150); + gSPSegment(POLY_OPA_DISP++, 0x06, globalCtx->objectCtx.status[this->bombiwaBankIndex].segment); + gSPDisplayList(POLY_OPA_DISP++, this->unk_150); } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot16_bombstone.c", 1274); diff --git a/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c b/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c index 3f38bc6b94..afde11bf87 100644 --- a/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c +++ b/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c @@ -131,18 +131,18 @@ void BgSpot16Doughnut_Draw(Actor* thisx, GlobalContext* globalCtx) { if (1) {} - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot16_doughnut.c", 213), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot16_doughnut.c", 213), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (this->fireFlag & 1) { gSPSegment( - oGfxCtx->polyXlu.p++, 0x08, + POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * (-1), 0, 16, 32, 1, scroll, scroll * (-2), 16, 32)); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 255, 0, 0, this->envColorAlpha); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_06000660); + gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, this->envColorAlpha); + gSPDisplayList(POLY_XLU_DISP++, D_06000660); } else { - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 255, 255, 255, this->envColorAlpha); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 255, 255, 255); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_06000FC0); + gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 255, this->envColorAlpha); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 255); + gSPDisplayList(POLY_XLU_DISP++, D_06000FC0); } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot16_doughnut.c", 238); @@ -156,11 +156,11 @@ void BgSpot16Doughnut_DrawExpanding(Actor* thisx, GlobalContext* globalCtx) { func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot16_doughnut.c", 248), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot16_doughnut.c", 248), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 255, 255, 255, this->envColorAlpha); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 255, 255, 255); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_06000FC0); + gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 255, this->envColorAlpha); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 255); + gSPDisplayList(POLY_XLU_DISP++, D_06000FC0); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot16_doughnut.c", 256); } diff --git a/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c b/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c index 5b7545557f..ce61789534 100644 --- a/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c +++ b/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c @@ -135,15 +135,15 @@ void BgSpot17Bakudankabe_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot17_bakudankabe.c", 273), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot17_bakudankabe.c", 273), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); r = (r >> 1) + 0xC0; g = (g >> 1) + 0xC0; - gDPSetEnvColor(oGfxCtx->polyOpa.p++, r, g, 255, 128); + gDPSetEnvColor(POLY_OPA_DISP++, r, g, 255, 128); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_060008A0); + gSPDisplayList(POLY_OPA_DISP++, D_060008A0); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot17_bakudankabe.c", 283); @@ -151,9 +151,9 @@ void BgSpot17Bakudankabe_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot17_bakudankabe.c", 290), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot17_bakudankabe.c", 290), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_06000960); + gSPDisplayList(POLY_XLU_DISP++, D_06000960); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot17_bakudankabe.c", 295); } diff --git a/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c b/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c index c6cc434fb3..79ec52af9d 100644 --- a/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c +++ b/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c @@ -62,12 +62,12 @@ void func_808B7478(Actor* thisx, GlobalContext* globalCtx) { func_80093D84(globalCtx->state.gfxCtx); Matrix_RotateY((s16)(func_8005A9F4(ACTIVE_CAM) - thisx->shape.rot.y + 0x8000) * 9.58738019108e-05f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot17_funen.c", 161), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot17_funen.c", 161), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (0 - globalCtx->gameplayFrames) & 0x7F, 0x20, 0x20, 1, 0, (0 - globalCtx->gameplayFrames) & 0x7F, 0x20, 0x20)); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_06000B40); + gSPDisplayList(POLY_XLU_DISP++, D_06000B40); if (1) {} diff --git a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c index fe33a54894..5a4cebe0be 100644 --- a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c +++ b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c @@ -163,11 +163,11 @@ void BgTokiSwd_Draw(Actor* thisx, GlobalContext* globalCtx) { func_8002EBCC(&this->actor, globalCtx2, 0); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, + gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TexScroll(globalCtx2->state.gfxCtx, 0, -(globalCtx2->gameplayFrames % 0x80), 32, 32)); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx2->state.gfxCtx, "../z_bg_toki_swd.c", 742), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx2->state.gfxCtx, "../z_bg_toki_swd.c", 742), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06001BD0); + gSPDisplayList(POLY_OPA_DISP++, D_06001BD0); CLOSE_DISPS(globalCtx2->state.gfxCtx, "../z_bg_toki_swd.c", 776); } diff --git a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c index 616c64a9db..5768be9f9a 100644 --- a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c +++ b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c @@ -243,10 +243,10 @@ void BgTreemouth_Draw(Actor* thisx, GlobalContext* globalCtx) { alpha = (globalCtx->unk_11D30[0] + 0x1F4); } - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, alpha * 0.1f); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_treemouth.c", 932), + gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, alpha * 0.1f); + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_treemouth.c", 932), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, &D_060009D0); + gSPDisplayList(POLY_OPA_DISP++, &D_060009D0); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_treemouth.c", 937); } diff --git a/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c b/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c index c970724bed..938ce8457d 100644 --- a/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c +++ b/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c @@ -198,13 +198,13 @@ void BgYdanHasi_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_ydan_hasi.c", 577); func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (0 - globalCtx->gameplayFrames & 0x7F), globalCtx->gameplayFrames & 0x7F, 0x20, 0x20, 1, globalCtx->gameplayFrames & 0x7F, globalCtx->gameplayFrames & 0x7F, 0x20, 0x20)); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_ydan_hasi.c", 592), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_ydan_hasi.c", 592), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, &D_06005DE0); + gSPDisplayList(POLY_XLU_DISP++, &D_06005DE0); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_ydan_hasi.c", 597); } diff --git a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c index f0090ba1f5..15a1b133f0 100644 --- a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c +++ b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c @@ -132,9 +132,9 @@ void func_808C0EEC(BgZg* this, GlobalContext* globalCtx) { OPEN_DISPS(localGfxCtx, "../z_bg_zg.c", 311); func_80093D18(localGfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(localGfxCtx, "../z_bg_zg.c", 315), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(localGfxCtx, "../z_bg_zg.c", 315), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06001080); + gSPDisplayList(POLY_OPA_DISP++, D_06001080); CLOSE_DISPS(localGfxCtx, "../z_bg_zg.c", 320); } diff --git a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c index 2b9eda1388..2a35e075d5 100644 --- a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c +++ b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c @@ -79,10 +79,10 @@ void func_80977EA8(GlobalContext* globalCtx, Gfx* dlist) { func_80093D18(gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(gfxCtx, "../z_demo_geff.c", 183), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gfxCtx, "../z_demo_geff.c", 183), G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, dlist); - gSPPopMatrix(oGfxCtx->polyOpa.p++, G_MTX_MODELVIEW); + gSPDisplayList(POLY_OPA_DISP++, dlist); + gSPPopMatrix(POLY_OPA_DISP++, G_MTX_MODELVIEW); CLOSE_DISPS(gfxCtx, "../z_demo_geff.c", 188); } @@ -94,7 +94,7 @@ void func_80977F80(DemoGeff* this, GlobalContext* globalCtx) { OPEN_DISPS(gfxCtx, "../z_demo_geff.c", 204); - gSPSegment(oGfxCtx->polyOpa.p++, 0x06, globalCtx->objectCtx.status[objBankIndex].segment); + gSPSegment(POLY_OPA_DISP++, 0x06, globalCtx->objectCtx.status[objBankIndex].segment); gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[objBankIndex].segment); // Necessary to match diff --git a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c index 0fdba9cf02..4a39e3313f 100644 --- a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c +++ b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c @@ -338,8 +338,8 @@ void func_8097D29C(DemoGo* this, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_go.c", 732); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(srcSegment8)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(srcSegment9)); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(srcSegment8)); + gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(srcSegment9)); SkelAnime_DrawSV(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, NULL, NULL, &this->actor); diff --git a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c index 919cd22d40..7bae32f442 100644 --- a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c +++ b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c @@ -531,13 +531,13 @@ void func_80985CE8(DemoIm* this, GlobalContext* globalCtx) { func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(sp68)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, SEGMENTED_TO_VIRTUAL(sp68)); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 0, 0, this->unk_26C); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0C, &D_80116280[0]); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sp68)); + gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sp68)); + gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->unk_26C); + gSPSegment(POLY_XLU_DISP++, 0x0C, &D_80116280[0]); - oGfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, - skelAnime->dListCount, NULL, NULL, NULL, oGfxCtx->polyXlu.p); + POLY_XLU_DISP = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, + skelAnime->dListCount, NULL, NULL, NULL, POLY_XLU_DISP); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_demo_im_inKenjyanomaDemo02.c", 308); } @@ -1193,10 +1193,10 @@ void func_80987658(DemoIm* this, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sp68)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(sp68)); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 0, 0, 0, 255); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0C, &D_80116280[2]); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sp68)); + gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sp68)); + gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255); + gSPSegment(POLY_OPA_DISP++, 0x0C, &D_80116280[2]); SkelAnime_DrawSV(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, func_80987514, func_809875C0, &this->actor); diff --git a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c index b34887708f..fb044f31a0 100644 --- a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c +++ b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c @@ -463,14 +463,14 @@ void func_8098F1C0(DemoSa* this, GlobalContext* globalCtx) { func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(sp78)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, SEGMENTED_TO_VIRTUAL(sp78)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0A, SEGMENTED_TO_VIRTUAL(sp6C)); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 0, 0, this->alpha); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0C, D_80116280); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sp78)); + gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sp78)); + gSPSegment(POLY_XLU_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(sp6C)); + gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->alpha); + gSPSegment(POLY_XLU_DISP++, 0x0C, D_80116280); - oGfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, - skelAnime->dListCount, NULL, NULL, NULL, oGfxCtx->polyXlu.p); + POLY_XLU_DISP = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, + skelAnime->dListCount, NULL, NULL, NULL, POLY_XLU_DISP); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_demo_sa_inKenjyanomaDemo02.c", 325); } @@ -802,11 +802,11 @@ void func_8098FEB4(DemoSa* this, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sp70)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(sp70)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, SEGMENTED_TO_VIRTUAL(sp64)); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 0, 0, 0, 255); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0C, &D_80116280[2]); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sp70)); + gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sp70)); + gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(sp64)); + gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255); + gSPSegment(POLY_OPA_DISP++, 0x0C, &D_80116280[2]); SkelAnime_DrawSV(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, DemoSa_OverrideLimbDraw, NULL, &this->actor); diff --git a/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c b/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c index 518284760e..909c4fe72f 100644 --- a/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c +++ b/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c @@ -109,20 +109,20 @@ void DemoShd_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_demo_shd.c", 729), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_demo_shd.c", 729), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_809932D0); + gSPDisplayList(POLY_XLU_DISP++, D_809932D0); if (this->unk_14C & 1) { - gSPDisplayList(oGfxCtx->polyXlu.p++, + gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0x3FF - ((unk_14E * 5) & 0x3FF), 16, 256, 1, 0, 255 - ((unk_14E * 5) & 255), 32, 32)); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_80993390); + gSPDisplayList(POLY_XLU_DISP++, D_80993390); } else if (this->unk_14C & 2) { - gSPDisplayList(oGfxCtx->polyXlu.p++, + gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0x3FF - ((unk_14E * 5) & 0x3FF), 16, 256, 1, 0, 255 - ((unk_14E * 5) & 255), 32, 32)); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_809934B8); + gSPDisplayList(POLY_XLU_DISP++, D_809934B8); } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_demo_shd.c", 762); diff --git a/src/overlays/actors/ovl_Door_Ana/z_door_ana.c b/src/overlays/actors/ovl_Door_Ana/z_door_ana.c index f2277a98e2..872b07c9d7 100644 --- a/src/overlays/actors/ovl_Door_Ana/z_door_ana.c +++ b/src/overlays/actors/ovl_Door_Ana/z_door_ana.c @@ -164,9 +164,9 @@ void DoorAna_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_door_ana.c", 440); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_door_ana.c", 446), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_door_ana.c", 446), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_05001390); + gSPDisplayList(POLY_XLU_DISP++, D_05001390); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_door_ana.c", 449); } diff --git a/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c b/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c index 0ca77b24ce..b670003581 100644 --- a/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c +++ b/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c @@ -153,9 +153,9 @@ void DoorGerudo_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_door_gerudo.c", 365), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_door_gerudo.c", 365), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06000040); + gSPDisplayList(POLY_OPA_DISP++, D_06000040); if (this->unk_166 != 0) { Matrix_Scale(0.01f, 0.01f, 0.025f, MTXMODE_APPLY); diff --git a/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c b/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c index da18da52ab..fd5e8ec43b 100644 --- a/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c +++ b/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c @@ -227,19 +227,19 @@ void ElfMsg_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); if (thisx->params & 0x8000) { - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 100, 100, R_NAVI_MSG_REGION_ALPHA); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 100, 100, R_NAVI_MSG_REGION_ALPHA); } else { - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 255, 255, R_NAVI_MSG_REGION_ALPHA); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, R_NAVI_MSG_REGION_ALPHA); } - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_elf_msg.c", 448), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_elf_msg.c", 448), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_809AD278); + gSPDisplayList(POLY_XLU_DISP++, D_809AD278); if (thisx->params & 0x4000) { - gSPDisplayList(oGfxCtx->polyXlu.p++, D_809AD4B8); + gSPDisplayList(POLY_XLU_DISP++, D_809AD4B8); } else { - gSPDisplayList(oGfxCtx->polyXlu.p++, D_809AD3B8); + gSPDisplayList(POLY_XLU_DISP++, D_809AD3B8); } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_elf_msg.c", 457); diff --git a/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c b/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c index 3167138b41..bceb2ff91f 100644 --- a/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c +++ b/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c @@ -187,11 +187,11 @@ void ElfMsg2_Draw(Actor* thisx, GlobalContext* globalCtx) { } func_80093D18(globalCtx->state.gfxCtx); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 100, 100, 255, R_NAVI_MSG_REGION_ALPHA); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_elf_msg2.c", 362), + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 100, 100, 255, R_NAVI_MSG_REGION_ALPHA); + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_elf_msg2.c", 362), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_809ADC38); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_809ADCF8); + gSPDisplayList(POLY_XLU_DISP++, D_809ADC38); + gSPDisplayList(POLY_XLU_DISP++, D_809ADCF8); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_elf_msg2.c", 367); } diff --git a/src/overlays/actors/ovl_En_Ani/z_en_ani.c b/src/overlays/actors/ovl_En_Ani/z_en_ani.c index 0ce750ef04..fc4da1ebb4 100644 --- a/src/overlays/actors/ovl_En_Ani/z_en_ani.c +++ b/src/overlays/actors/ovl_En_Ani/z_en_ani.c @@ -319,7 +319,7 @@ void EnAni_Draw(Actor* thisx, GlobalContext* globalCtx) { func_800943C8(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_809B0F80[this->unk_2AC])); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_809B0F80[this->unk_2AC])); SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, EnAni_OverrideLimbDraw, EnAni_PostLimbDraw, &this->actor); diff --git a/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c b/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c index 5129b1a23f..9c6e0b945f 100644 --- a/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c +++ b/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c @@ -144,9 +144,9 @@ void func_809C2324(GlobalContext* globalCtx, Gfx* dList, s32 alpha) { segment = D_809C25A0; } - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, segment); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 0, 0, alpha); - gSPDisplayList(oGfxCtx->polyXlu.p++, dList); + gSPSegment(POLY_XLU_DISP++, 0x08, segment); + gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, alpha); + gSPDisplayList(POLY_XLU_DISP++, dList); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_blkobj.c", 330); } @@ -163,9 +163,9 @@ void EnBlkobj_Draw(Actor* thisx, GlobalContext* globalCtx) { gameplayFrames = globalCtx->gameplayFrames % 128; - gSPSegment(oGfxCtx->polyXlu.p++, 0x0D, + gSPSegment(POLY_XLU_DISP++, 0x0D, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, gameplayFrames, 0, 32, 32, 1, gameplayFrames, 0, 32, 32)); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_blkobj.c", 363), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_blkobj.c", 363), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (this->unk_164 != 0) { diff --git a/src/overlays/actors/ovl_En_Bom/z_en_bom.c b/src/overlays/actors/ovl_En_Bom/z_en_bom.c index 1f44c3508e..23367ccd95 100644 --- a/src/overlays/actors/ovl_En_Bom/z_en_bom.c +++ b/src/overlays/actors/ovl_En_Bom/z_en_bom.c @@ -340,16 +340,16 @@ void EnBom_Draw(Actor* thisx, GlobalContext* globalCtx) { func_800D1FD4(&globalCtx->mf_11DA0); func_8002EBCC(thisx, globalCtx, 0); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_bom.c", 928), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_bom.c", 928), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_04007A50); + gSPDisplayList(POLY_OPA_DISP++, D_04007A50); Matrix_RotateRPY(0x4000, 0, 0, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_bom.c", 934), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_bom.c", 934), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, (s16)this->flashIntensity, 0, 40, 255); - gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, (s16)this->flashIntensity, 0, 40, 255); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_04007860); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, (s16)this->flashIntensity, 0, 40, 255); + gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, (s16)this->flashIntensity, 0, 40, 255); + gSPDisplayList(POLY_OPA_DISP++, D_04007860); func_800628A4(0, &this->explosionCollider); } diff --git a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c index 088e1385a8..e1c7288696 100644 --- a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c +++ b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c @@ -464,23 +464,23 @@ void EnBombf_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); if (thisx->params != BOMBFLOWER_BODY) { - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_bombf.c", 1041), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_bombf.c", 1041), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06000340); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06000530); + gSPDisplayList(POLY_OPA_DISP++, D_06000340); + gSPDisplayList(POLY_OPA_DISP++, D_06000530); Matrix_Translate(0.0f, 1000.0f, 0.0f, MTXMODE_APPLY); Matrix_Scale(this->flowerBombScale, this->flowerBombScale, this->flowerBombScale, MTXMODE_APPLY); } - gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, 200, 255, 200, 255); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, (s16)this->flashIntensity, 20, 10, 0); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_bombf.c", 1054), + gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 200, 255, 200, 255); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, (s16)this->flashIntensity, 20, 10, 0); + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_bombf.c", 1054), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(EnBombf_NewMtxDList(globalCtx->state.gfxCtx, globalCtx))); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06000408); + gSPDisplayList(POLY_OPA_DISP++, D_06000408); } else { func_800628A4(0, &this->explosionCollider); } diff --git a/src/overlays/actors/ovl_En_Boom/z_en_boom.c b/src/overlays/actors/ovl_En_Boom/z_en_boom.c index 246660c8fe..711a7c56b1 100644 --- a/src/overlays/actors/ovl_En_Boom/z_en_boom.c +++ b/src/overlays/actors/ovl_En_Boom/z_en_boom.c @@ -258,9 +258,9 @@ void EnBoom_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); Matrix_RotateY((this->activeTimer * 12000) * 0.0000958738f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_boom.c", 601), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_boom.c", 601), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_0400C808); + gSPDisplayList(POLY_OPA_DISP++, D_0400C808); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_boom.c", 604); } diff --git a/src/overlays/actors/ovl_En_Box/z_en_box.c b/src/overlays/actors/ovl_En_Box/z_en_box.c index c18292c2c7..f8756882fb 100644 --- a/src/overlays/actors/ovl_En_Box/z_en_box.c +++ b/src/overlays/actors/ovl_En_Box/z_en_box.c @@ -641,23 +641,23 @@ void EnBox_Draw(Actor* thisx, GlobalContext* globalCtx) { */ if ((this->alpha == 255 && !(this->type == ENBOX_TYPE_4 || this->type == ENBOX_TYPE_6)) || ((this->dyna.actor.flags & 0x80) != 0x80 && (this->type == ENBOX_TYPE_4 || this->type == ENBOX_TYPE_6))) { - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 0, 0, 0, 255); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, EnBox_EmptyDList(globalCtx->state.gfxCtx)); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255); + gSPSegment(POLY_OPA_DISP++, 0x08, EnBox_EmptyDList(globalCtx->state.gfxCtx)); func_80093D18(globalCtx->state.gfxCtx); - oGfxCtx->polyOpa.p = SkelAnime_Draw2(globalCtx, this->skelanime.skeleton, this->skelanime.limbDrawTbl, NULL, - EnBox_PostLimbDraw, &this->dyna.actor, oGfxCtx->polyOpa.p); + POLY_OPA_DISP = SkelAnime_Draw2(globalCtx, this->skelanime.skeleton, this->skelanime.limbDrawTbl, NULL, + EnBox_PostLimbDraw, &this->dyna.actor, POLY_OPA_DISP); } else if (this->alpha != 0) { - gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPPipeSync(POLY_XLU_DISP++); func_80093D84(globalCtx->state.gfxCtx); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 0, 0, this->alpha); + gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->alpha); if (this->type == ENBOX_TYPE_4 || this->type == ENBOX_TYPE_6) { - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, func_809CA518(globalCtx->state.gfxCtx)); + gSPSegment(POLY_XLU_DISP++, 0x08, func_809CA518(globalCtx->state.gfxCtx)); } else { - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, func_809CA4A0(globalCtx->state.gfxCtx)); + gSPSegment(POLY_XLU_DISP++, 0x08, func_809CA4A0(globalCtx->state.gfxCtx)); } - oGfxCtx->polyXlu.p = SkelAnime_Draw2(globalCtx, this->skelanime.skeleton, this->skelanime.limbDrawTbl, NULL, - EnBox_PostLimbDraw, &this->dyna.actor, oGfxCtx->polyXlu.p); + POLY_XLU_DISP = SkelAnime_Draw2(globalCtx, this->skelanime.skeleton, this->skelanime.limbDrawTbl, NULL, + EnBox_PostLimbDraw, &this->dyna.actor, POLY_XLU_DISP); } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_box.c", 1639); diff --git a/src/overlays/actors/ovl_En_Butte/z_en_butte.c b/src/overlays/actors/ovl_En_Butte/z_en_butte.c index 2fc65c009a..e80c259741 100644 --- a/src/overlays/actors/ovl_En_Butte/z_en_butte.c +++ b/src/overlays/actors/ovl_En_Butte/z_en_butte.c @@ -118,11 +118,11 @@ void EnButte_DrawTransformationEffect(EnButte* this, GlobalContext* globalCtx) { func_800D1694(this->actor.posRot2.pos.x + sp5C.x, this->actor.posRot2.pos.y + sp5C.y, this->actor.posRot2.pos.z + sp5C.z, &camDir); Matrix_Scale(sTransformationEffectScale, sTransformationEffectScale, sTransformationEffectScale, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_choo.c", 317), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_choo.c", 317), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x80, 0x80, 200, 200, 180, alpha); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 200, 200, 210, 255); - gSPDisplayList(oGfxCtx->polyXlu.p++, SEGMENTED_TO_VIRTUAL(&D_04010130)); + gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 200, 200, 180, alpha); + gDPSetEnvColor(POLY_XLU_DISP++, 200, 200, 210, 255); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(&D_04010130)); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_choo.c", 326); } diff --git a/src/overlays/actors/ovl_En_Bx/z_en_bx.c b/src/overlays/actors/ovl_En_Bx/z_en_bx.c index b70a929248..be6f53b71f 100644 --- a/src/overlays/actors/ovl_En_Bx/z_en_bx.c +++ b/src/overlays/actors/ovl_En_Bx/z_en_bx.c @@ -179,12 +179,12 @@ void EnBx_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0C, mtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_809D2560[this->actor.params & 0x7F])); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, + gSPSegment(POLY_OPA_DISP++, 0x0C, mtx); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_809D2560[this->actor.params & 0x7F])); + gSPSegment(POLY_OPA_DISP++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 16, 16, 1, 0, (globalCtx->gameplayFrames * -10) % 128, 32, 32)); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_bx.c", 478), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_bx.c", 478), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (this->actor.params & 0x80) { @@ -209,7 +209,7 @@ void EnBx_Draw(Actor* thisx, GlobalContext* globalCtx) { Matrix_ToMtx(mtx, "../z_en_bx.c", 507); } - gSPDisplayList(oGfxCtx->polyOpa.p++, D_060022F0); + gSPDisplayList(POLY_OPA_DISP++, D_060022F0); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_bx.c", 511); } diff --git a/src/overlays/actors/ovl_En_Dog/z_en_dog.c b/src/overlays/actors/ovl_En_Dog/z_en_dog.c index ddae36cb9b..509004750d 100644 --- a/src/overlays/actors/ovl_En_Dog/z_en_dog.c +++ b/src/overlays/actors/ovl_En_Dog/z_en_dog.c @@ -456,8 +456,8 @@ void EnDog_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, colors[this->actor.params & 0xF].r, colors[this->actor.params & 0xF].g, + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, colors[this->actor.params & 0xF].r, colors[this->actor.params & 0xF].g, colors[this->actor.params & 0xF].b, colors[this->actor.params & 0xF].a); SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, diff --git a/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c b/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c index 98e8b88822..3c366c4657 100644 --- a/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c +++ b/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c @@ -114,17 +114,17 @@ void EnDyExtra_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(gfxCtx, "../z_en_dy_extra.c", 294); func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, globalCtx->state.frames * 2, 0, 0x20, 0x40, 1, globalCtx->state.frames, globalCtx->state.frames * -8, 0x10, 0x10)); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_dy_extra.c", 307), + gDPPipeSync(POLY_XLU_DISP++); + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_dy_extra.c", 307), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0x80, primColors[this->type].r, primColors[this->type].g, + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, primColors[this->type].r, primColors[this->type].g, primColors[this->type].b, 255); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, envColors[this->type].r, envColors[this->type].g, envColors[this->type].b, + gDPSetEnvColor(POLY_XLU_DISP++, envColors[this->type].r, envColors[this->type].g, envColors[this->type].b, 128); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_0601C160); + gSPDisplayList(POLY_XLU_DISP++, D_0601C160); CLOSE_DISPS(gfxCtx, "../z_en_dy_extra.c", 325); } diff --git a/src/overlays/actors/ovl_En_Elf/z_en_elf.c b/src/overlays/actors/ovl_En_Elf/z_en_elf.c index 5e031706c7..bb928f7daa 100644 --- a/src/overlays/actors/ovl_En_Elf/z_en_elf.c +++ b/src/overlays/actors/ovl_En_Elf/z_en_elf.c @@ -1525,7 +1525,7 @@ void EnElf_Draw(Actor* thisx, GlobalContext* globalCtx) { alphaScale = this->disappearTimer < 0 ? (this->disappearTimer * (7.0f / 6000.0f)) + 1.0f : 1.0f; - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, dListHead); + gSPSegment(POLY_XLU_DISP++, 0x08, dListHead); gDPPipeSync(dListHead++); gDPSetPrimColor(dListHead++, 0, 0x01, (u8)this->innerColor.r, (u8)this->innerColor.g, (u8)this->innerColor.b, (u8)(this->innerColor.a * alphaScale)); @@ -1537,10 +1537,10 @@ void EnElf_Draw(Actor* thisx, GlobalContext* globalCtx) { } gSPEndDisplayList(dListHead++); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, (u8)this->outerColor.r, (u8)this->outerColor.g, (u8)this->outerColor.b, + gDPSetEnvColor(POLY_XLU_DISP++, (u8)this->outerColor.r, (u8)this->outerColor.g, (u8)this->outerColor.b, (u8)(envAlpha * alphaScale)); - oGfxCtx->polyXlu.p = SkelAnime_Draw2(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, - EnElf_OverrideLimbDraw, NULL, &this->actor, oGfxCtx->polyXlu.p); + POLY_XLU_DISP = SkelAnime_Draw2(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, + EnElf_OverrideLimbDraw, NULL, &this->actor, POLY_XLU_DISP); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_elf.c", 2793); } diff --git a/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c b/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c index 454a8d76a6..bac7151df8 100644 --- a/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c +++ b/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c @@ -376,10 +376,10 @@ void EnExRuppy_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); func_8002EBCC(thisx, globalCtx, 0); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_ex_ruppy.c", 780), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_ex_ruppy.c", 780), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_80A0B3B8[this->unk_150])); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_04042440); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_80A0B3B8[this->unk_150])); + gSPDisplayList(POLY_OPA_DISP++, D_04042440); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ex_ruppy.c", 784); } diff --git a/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c b/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c index 8a259e5209..b21560a13d 100644 --- a/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c +++ b/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c @@ -472,49 +472,49 @@ void EnFhgFire_Draw(Actor* thisx, GlobalContext* globalCtx) { if (thisx->params == 0x24) { func_80093D84(globalCtx->state.gfxCtx); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 255, 255, (s8)this->unk_160); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 165, 255, 75, 0); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fhg_fire.c", 1745), + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, (s8)this->unk_160); + gDPSetEnvColor(POLY_XLU_DISP++, 165, 255, 75, 0); + gDPPipeSync(POLY_XLU_DISP++); + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fhg_fire.c", 1745), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, SEGMENTED_TO_VIRTUAL(D_0600FCF8)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(D_0600FCF8)); } else if ((thisx->params == 0x26) || (thisx->params == 0x32)) { osSyncPrintf("yari hikari draw 1\n"); func_800D1FD4(&globalCtx->mf_11DA0); func_80093D84(globalCtx->state.gfxCtx); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 255, 255, (s8)this->unk_160); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, (s8)this->unk_160); if (this->fireMode > 0) { - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 255, 255, 0); + gDPSetEnvColor(POLY_XLU_DISP++, 0, 255, 255, 0); } else { - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 165, 255, 75, 0); + gDPSetEnvColor(POLY_XLU_DISP++, 165, 255, 75, 0); } - gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPPipeSync(POLY_XLU_DISP++); Matrix_RotateZ((thisx->shape.rot.z / 32768.0f) * 3.1416f, 1); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fhg_fire.c", 1801), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fhg_fire.c", 1801), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_06012160); + gSPDisplayList(POLY_XLU_DISP++, D_06012160); } else if ((thisx->params == 0x27) || (thisx->params == 0x28) || (thisx->params == 0x29)) { func_80093D84(globalCtx->state.gfxCtx); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 0, 0, 0, (u8)this->unk_188); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 90, 50, 95, (s8)(this->unk_188 * 0.5f)); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fhg_fire.c", 1833), + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 0, 0, 0, (u8)this->unk_188); + gDPSetEnvColor(POLY_XLU_DISP++, 90, 50, 95, (s8)(this->unk_188 * 0.5f)); + gDPPipeSync(POLY_XLU_DISP++); + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fhg_fire.c", 1833), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (s16)this->unk_174, (s16)this->unk_178, 0x40, 0x40, 1, (s16)this->unk_17C, (s16)this->unk_180, 0x40, 0x40)); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_0600FAA0); + gSPDisplayList(POLY_XLU_DISP++, D_0600FAA0); } else { osSyncPrintf("FF DRAW 1\n"); Matrix_Translate(0.0f, -100.0f, 0.0f, 1); func_80093D84(globalCtx->state.gfxCtx); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 255, 255, (s8)this->unk_160); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 255, 30, 0); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fhg_fire.c", 1892), + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, (s8)this->unk_160); + gDPSetEnvColor(POLY_XLU_DISP++, 0, 255, 30, 0); + gDPPipeSync(POLY_XLU_DISP++); + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fhg_fire.c", 1892), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_060105E0); + gSPDisplayList(POLY_XLU_DISP++, D_060105E0); osSyncPrintf("FF DRAW 2\n"); } diff --git a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c index 972d1834de..84fbd626a3 100644 --- a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c +++ b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c @@ -1083,9 +1083,9 @@ void EnFloormas_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80026230(globalCtx, &sMergeColor, this->actionTarget % 0x28, 0x28); } - oGfxCtx->polyOpa.p = + POLY_OPA_DISP = SkelAnime_DrawSV2(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, - EnFloormas_OverrideLimbDraw, EnFloormas_PostLimbDraw, &this->actor, oGfxCtx->polyOpa.p); + EnFloormas_OverrideLimbDraw, EnFloormas_PostLimbDraw, &this->actor, POLY_OPA_DISP); if (this->collider.base.type == COLTYPE_UNK12) { func_80026608(globalCtx); } @@ -1102,9 +1102,9 @@ void EnFloormas_DrawHighlighted(Actor* thisx, GlobalContext* globalCtx) { if (this->collider.base.type == COLTYPE_UNK12) { func_80026690(globalCtx, &sMergeColor, this->actionTarget % 0x28, 0x28); } - oGfxCtx->polyXlu.p = + POLY_XLU_DISP = SkelAnime_DrawSV2(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, - EnFloormas_OverrideLimbDraw, EnFloormas_PostLimbDraw, &this->actor, oGfxCtx->polyXlu.p); + EnFloormas_OverrideLimbDraw, EnFloormas_PostLimbDraw, &this->actor, POLY_XLU_DISP); if (this->collider.base.type == COLTYPE_UNK12) { func_80026A6C(globalCtx); } diff --git a/src/overlays/actors/ovl_En_Fu/z_en_fu.c b/src/overlays/actors/ovl_En_Fu/z_en_fu.c index 7eba25741c..31be7854be 100644 --- a/src/overlays/actors/ovl_En_Fu/z_en_fu.c +++ b/src/overlays/actors/ovl_En_Fu/z_en_fu.c @@ -302,8 +302,8 @@ void EnFu_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_fu.c", 773); func_800943C8(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sEyesSegments[this->facialExpression])); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(sMouthSegments[this->facialExpression])); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyesSegments[this->facialExpression])); + gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sMouthSegments[this->facialExpression])); SkelAnime_DrawSV(globalCtx, this->skelanime.skeleton, this->skelanime.limbDrawTbl, this->skelanime.dListCount, EnFu_OverrideLimbDraw, EnFu_PostLimbDraw, &this->actor); diff --git a/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c b/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c index 657ddb2f0b..48295a5a2e 100644 --- a/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c +++ b/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c @@ -100,18 +100,18 @@ void EnGanonOrgan_Draw(Actor* thisx, GlobalContext* globalCtx) { osSyncPrintf("ORGAN DRAW 1\n"); func_80093D18(globalCtx->state.gfxCtx); if ((thisx->params == 1) && (dorf->organFadeTimer != 0xff)) { - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, func_80A280BC(globalCtx->state.gfxCtx, dorf)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, func_80A28148(globalCtx->state.gfxCtx, dorf)); + gSPSegment(POLY_OPA_DISP++, 0x08, func_80A280BC(globalCtx->state.gfxCtx, dorf)); + gSPSegment(POLY_OPA_DISP++, 0x09, func_80A28148(globalCtx->state.gfxCtx, dorf)); } else { - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, EnGanonOrgan_EmptyDList(globalCtx->state.gfxCtx)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, EnGanonOrgan_EmptyDList(globalCtx->state.gfxCtx)); + gSPSegment(POLY_OPA_DISP++, 0x08, EnGanonOrgan_EmptyDList(globalCtx->state.gfxCtx)); + gSPSegment(POLY_OPA_DISP++, 0x09, EnGanonOrgan_EmptyDList(globalCtx->state.gfxCtx)); } Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_NEW); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_ganon_organ.c", 221), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_ganon_organ.c", 221), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_80A2CCA8); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_80A2EAB0); + gSPDisplayList(POLY_OPA_DISP++, D_80A2CCA8); + gSPDisplayList(POLY_OPA_DISP++, D_80A2EAB0); osSyncPrintf("ORGAN DRAW 2\n"); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ganon_organ.c", 230); diff --git a/src/overlays/actors/ovl_En_Gs/z_en_gs.c b/src/overlays/actors/ovl_En_Gs/z_en_gs.c index 267b0525bf..d1b9c005ed 100644 --- a/src/overlays/actors/ovl_En_Gs/z_en_gs.c +++ b/src/overlays/actors/ovl_En_Gs/z_en_gs.c @@ -542,19 +542,19 @@ void EnGs_Draw(Actor* thisx, GlobalContext* globalCtx) { Matrix_RotateZ(this->unk_1A0[1].z * 0.0000958738f, MTXMODE_APPLY); } - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_gs.c", 1064), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_gs.c", 1064), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06000950); + gSPDisplayList(POLY_OPA_DISP++, D_06000950); if (this->unk_19E & 4) { - gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, this->flashColor.r, this->flashColor.g, this->flashColor.b, + gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->flashColor.r, this->flashColor.g, this->flashColor.b, this->flashColor.a); } else { - gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, 255, 255, 255, 255); + gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, 255); } - gSPDisplayList(oGfxCtx->polyOpa.p++, D_060009D0); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06000A60); + gSPDisplayList(POLY_OPA_DISP++, D_060009D0); + gSPDisplayList(POLY_OPA_DISP++, D_06000A60); Matrix_Pull(); if (this->unk_19E & 2) { @@ -562,14 +562,14 @@ void EnGs_Draw(Actor* thisx, GlobalContext* globalCtx) { func_800D1FD4(&globalCtx->mf_11DA0); Matrix_Scale(0.05f, -0.05f, 1.0f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_gs.c", 1087), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_gs.c", 1087), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment( - oGfxCtx->polyXlu.p++, 0x08, + POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, -frames * 0x14, 0x20, 0x80)); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 128, 128, 255, 255, 0, 255); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 255, 0, 0, 0); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_0404D4E0); + gDPSetPrimColor(POLY_XLU_DISP++, 128, 128, 255, 255, 0, 255); + gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0); + gSPDisplayList(POLY_XLU_DISP++, D_0404D4E0); } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_gs.c", 1101); diff --git a/src/overlays/actors/ovl_En_Guest/z_en_guest.c b/src/overlays/actors/ovl_En_Guest/z_en_guest.c index 2225c36d2e..2250486be3 100644 --- a/src/overlays/actors/ovl_En_Guest/z_en_guest.c +++ b/src/overlays/actors/ovl_En_Guest/z_en_guest.c @@ -225,9 +225,9 @@ void EnGuest_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, func_80A50708(globalCtx->state.gfxCtx, 0xFF, 0xFF, 0xFF, 0xFF)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, func_80A50708(globalCtx->state.gfxCtx, 0xA0, 0x3C, 0xDC, 0xFF)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, SEGMENTED_TO_VIRTUAL(D_80A50BA4[this->unk_30E])); + gSPSegment(POLY_OPA_DISP++, 0x08, func_80A50708(globalCtx->state.gfxCtx, 0xFF, 0xFF, 0xFF, 0xFF)); + gSPSegment(POLY_OPA_DISP++, 0x09, func_80A50708(globalCtx->state.gfxCtx, 0xA0, 0x3C, 0xDC, 0xFF)); + gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(D_80A50BA4[this->unk_30E])); SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, EnGuest_OverrideLimbDraw, NULL, &this->actor); diff --git a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c index da7958dffe..2cdd224cb4 100644 --- a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c +++ b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c @@ -832,9 +832,9 @@ void EnHeishi2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList void func_80A54C6C(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_heishi2.c", 1772); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_heishi2.c", 1774), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_heishi2.c", 1774), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, &D_06002C10); + gSPDisplayList(POLY_OPA_DISP++, &D_06002C10); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_heishi2.c", 1777); } @@ -858,10 +858,10 @@ void EnHeishi2_Draw(Actor* thisx, GlobalContext* globalCtx) { Matrix_RotateZ(DEGTORAD(70.0), MTXMODE_APPLY); mtx = Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_heishi2.c", 1820) - 7; - gSPSegment(oGfxCtx->polyOpa.p++, 0x06, globalCtx->objectCtx.status[linkObjBankIndex].segment); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0D, mtx); - gSPDisplayList(oGfxCtx->polyOpa.p++, &D_0602B060); - gSPSegment(oGfxCtx->polyOpa.p++, 0x06, globalCtx->objectCtx.status[this->actor.objBankIndex].segment); + gSPSegment(POLY_OPA_DISP++, 0x06, globalCtx->objectCtx.status[linkObjBankIndex].segment); + gSPSegment(POLY_OPA_DISP++, 0x0D, mtx); + gSPDisplayList(POLY_OPA_DISP++, &D_0602B060); + gSPSegment(POLY_OPA_DISP++, 0x06, globalCtx->objectCtx.status[this->actor.objBankIndex].segment); } } diff --git a/src/overlays/actors/ovl_En_Holl/z_en_holl.c b/src/overlays/actors/ovl_En_Holl/z_en_holl.c index ab905325bd..7d3cb4519c 100644 --- a/src/overlays/actors/ovl_En_Holl/z_en_holl.c +++ b/src/overlays/actors/ovl_En_Holl/z_en_holl.c @@ -347,10 +347,10 @@ void EnHoll_Draw(Actor* thisx, GlobalContext* globalCtx) { if (this->planeAlpha != 0) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_holl.c", 805); if (this->planeAlpha == 255) { - gfxP = oGfxCtx->polyOpa.p; + gfxP = POLY_OPA_DISP; setupDLIdx = 37; } else { - gfxP = oGfxCtx->polyXlu.p; + gfxP = POLY_XLU_DISP; setupDLIdx = 0; } gfxP = Gfx_CallSetupDL(gfxP, setupDLIdx); @@ -364,9 +364,9 @@ void EnHoll_Draw(Actor* thisx, GlobalContext* globalCtx) { gSPDisplayList(gfxP++, sPlaneDlist); if (this->planeAlpha == 255) { - oGfxCtx->polyOpa.p = gfxP; + POLY_OPA_DISP = gfxP; } else { - oGfxCtx->polyXlu.p = gfxP; + POLY_XLU_DISP = gfxP; } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_holl.c", 831); } diff --git a/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c b/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c index e7dc6549f0..fda3836a52 100644 --- a/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c +++ b/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c @@ -658,23 +658,23 @@ void EnHorseNormal_Draw(Actor* thisx, GlobalContext* globalCtx) { if (mtx1 == NULL) { return; } - gSPMatrix(oGfxCtx->polyOpa.p++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPMatrix(oGfxCtx->polyOpa.p++, mtx1, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(POLY_OPA_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(POLY_OPA_DISP++, mtx1, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); func_800A63CC(&this->actor, globalCtx, &this->skin, 0, 0, 1, 0, 3); this->cloneCollider.dim.pos.x = clonePos.x; this->cloneCollider.dim.pos.y = clonePos.y; this->cloneCollider.dim.pos.z = clonePos.z; CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->cloneCollider.base); func_80094044(globalCtx->state.gfxCtx); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 0, 0, 0, 255); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 0, 0, 0, 255); Matrix_Translate(clonePos.x, clonePos.y, clonePos.z, MTXMODE_NEW); temp_f0_4 = (1.0f - (distFromGround * 0.01f)) * this->actor.shape.unk_10; Matrix_Scale(this->actor.scale.x * temp_f0_4, 1.0f, this->actor.scale.z * temp_f0_4, MTXMODE_APPLY); Matrix_RotateY(cloneRotY * (2.0f * M_PI / 0x10000), MTXMODE_APPLY); mtx2 = Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_horse_normal.c", 2329); if (mtx2 != NULL) { - gSPMatrix(oGfxCtx->polyXlu.p++, mtx2, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_04049AD0); + gSPMatrix(POLY_XLU_DISP++, mtx2, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPDisplayList(POLY_XLU_DISP++, D_04049AD0); } } diff --git a/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c b/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c index 1d08efb605..775a9d8b3d 100644 --- a/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c +++ b/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c @@ -346,20 +346,20 @@ void EnIceHono_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ice_hono.c", 695); func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, (globalCtx->state.frames * -20) % 512, 32, 128)); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x80, 0x80, 170, 255, 255, this->alpha); + gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 170, 255, 255, this->alpha); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 150, 255, 0); + gDPSetEnvColor(POLY_XLU_DISP++, 0, 150, 255, 0); Matrix_RotateY((s16)(func_8005A9F4(ACTIVE_CAM) - this->actor.shape.rot.y + 0x8000) * (M_PI / 0x8000), MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_ice_hono.c", 718), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_ice_hono.c", 718), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_0404D4E0); + gSPDisplayList(POLY_XLU_DISP++, D_0404D4E0); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ice_hono.c", 722); } diff --git a/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c b/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c index 4e8d84a607..0b6f39153b 100644 --- a/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c +++ b/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c @@ -459,10 +459,10 @@ void EnIshi_DrawLarge(EnIshi* this, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ishi.c", 1050); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_ishi.c", 1055), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_ishi.c", 1055), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, 255, 255, 255, 255); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_0500A3B8); + gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, 255); + gSPDisplayList(POLY_OPA_DISP++, D_0500A3B8); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ishi.c", 1062); } diff --git a/src/overlays/actors/ovl_En_Kz/z_en_kz.c b/src/overlays/actors/ovl_En_Kz/z_en_kz.c index a404fbd2ed..fac7a11ff9 100644 --- a/src/overlays/actors/ovl_En_Kz/z_en_kz.c +++ b/src/overlays/actors/ovl_En_Kz/z_en_kz.c @@ -482,7 +482,7 @@ void EnKz_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_kz.c", 1259); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeSegments[this->eyeIdx])); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeSegments[this->eyeIdx])); func_800943C8(globalCtx->state.gfxCtx); SkelAnime_DrawSV(globalCtx, this->skelanime.skeleton, this->skelanime.limbDrawTbl, this->skelanime.dListCount, EnKz_OverrideLimbDraw, EnKz_PostLimbDraw, &this->actor); diff --git a/src/overlays/actors/ovl_En_Light/z_en_light.c b/src/overlays/actors/ovl_En_Light/z_en_light.c index 531af5facb..0ac8109e4e 100644 --- a/src/overlays/actors/ovl_En_Light/z_en_light.c +++ b/src/overlays/actors/ovl_En_Light/z_en_light.c @@ -168,22 +168,22 @@ void EnLight_Draw(Actor* thisx, GlobalContext* globalCtx) { if (this->actor.params >= 0) { gSPSegment( - oGfxCtx->polyXlu.p++, 0x08, + POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, (this->timer * -20) & 511, 32, 128)); dList = D_0404D4E0; - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x80, 0x80, flameParams->primColor.r, flameParams->primColor.g, + gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, flameParams->primColor.r, flameParams->primColor.g, flameParams->primColor.b, flameParams->primColor.a); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, flameParams->envColor.r, flameParams->envColor.g, flameParams->envColor.b, + gDPSetEnvColor(POLY_XLU_DISP++, flameParams->envColor.r, flameParams->envColor.g, flameParams->envColor.b, 0); } else { - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 16, 32, 1, ((this->timer * 2) & 63), (this->timer * -6) & 127 * 1, 16, 32)); dList = D_05000440; - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0xC0, 0xC0, 255, 200, 0, 0); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 255, 0, 0, 0); + gDPSetPrimColor(POLY_XLU_DISP++, 0xC0, 0xC0, 255, 200, 0, 0); + gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0); } Matrix_RotateY((s16)((func_8005A9F4(ACTIVE_CAM) - this->actor.shape.rot.y) + 0x8000) * (M_PI / 32768.0f), @@ -194,9 +194,9 @@ void EnLight_Draw(Actor* thisx, GlobalContext* globalCtx) { } Matrix_Scale(1.0f, 1.0f, 1.0f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_light.c", 488), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_light.c", 488), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, dList); + gSPDisplayList(POLY_XLU_DISP++, dList); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_light.c", 491); } diff --git a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c index e70c062146..fbe62c2d76 100644 --- a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c +++ b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c @@ -441,8 +441,8 @@ void EnMa1_Draw(Actor* thisx, GlobalContext* globalCtx) { func_800F6268(someFloat, 0x2F); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(D_80AA16C4[this->unk_1E6])); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_80AA16D0[this->unk_1E4])); + gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(D_80AA16C4[this->unk_1E6])); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_80AA16D0[this->unk_1E4])); SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, EnMa1_OverrideLimbDraw, EnMa1_PostLimbDraw, &this->actor); diff --git a/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c b/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c index 134eff97c4..81415ee498 100644 --- a/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c +++ b/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c @@ -358,7 +358,7 @@ void EnMa2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve Matrix_MultVec3f(&vec, &this->actor.posRot2.pos); } if ((limbIndex == 14) && (this->skelAnime.animCurrentSeg == &D_060093BC)) { - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06005420); + gSPDisplayList(POLY_OPA_DISP++, D_06005420); } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ma2.c", 927); @@ -377,8 +377,8 @@ void EnMa2_Draw(Actor* thisx, GlobalContext* globalCtx) { func_800F6268(someFloat, 0x2F); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(D_80AA28B4[this->unk_210])); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_80AA28C0[this->unk_20E])); + gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(D_80AA28B4[this->unk_210])); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_80AA28C0[this->unk_20E])); SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, EnMa2_OverrideLimbDraw, EnMa2_PostLimbDraw, &this->actor); diff --git a/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c b/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c index 2423df6535..826f5ca1cf 100644 --- a/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c +++ b/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c @@ -338,7 +338,7 @@ void EnMa3_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve Matrix_MultVec3f(&vec, &thisx->posRot2.pos); } if ((limbIndex == 14) && (this->skelAnime.animCurrentSeg == &D_060093BC)) { - gSPDisplayList(oGfxCtx->polyOpa.p++, &D_06005420); + gSPDisplayList(POLY_OPA_DISP++, &D_06005420); } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ma3.c", 950); @@ -357,8 +357,8 @@ void EnMa3_Draw(Actor* thisx, GlobalContext* globalCtx) { func_800F6268(someFloat, 0x2F); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(D_80AA38A4[this->unk_210])); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_80AA38B0[this->unk_20E])); + gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(D_80AA38A4[this->unk_210])); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_80AA38B0[this->unk_20E])); SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, EnMa3_OverrideLimbDraw, EnMa3_PostLimbDraw, &this->actor); diff --git a/src/overlays/actors/ovl_En_Mag/z_en_mag.c b/src/overlays/actors/ovl_En_Mag/z_en_mag.c index 2484df44a1..2710a351cc 100644 --- a/src/overlays/actors/ovl_En_Mag/z_en_mag.c +++ b/src/overlays/actors/ovl_En_Mag/z_en_mag.c @@ -575,15 +575,15 @@ void EnMag_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_mag.c", 1151); - gfxRef = oGfxCtx->polyOpa.p; + gfxRef = POLY_OPA_DISP; gfx = Graph_GfxPlusOne(gfxRef); - gSPDisplayList(oGfxCtx->overlay.p++, gfx); + gSPDisplayList(OVERLAY_DISP++, gfx); EnMag_DrawInner(thisx, globalCtx, &gfx); gSPEndDisplayList(gfx++); Graph_BranchDlist(gfxRef, gfx); - oGfxCtx->polyOpa.p = gfx; + POLY_OPA_DISP = gfx; CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_mag.c", 1161); } diff --git a/src/overlays/actors/ovl_En_Md/z_en_md.c b/src/overlays/actors/ovl_En_Md/z_en_md.c index 1d863dcd15..479ee6004d 100644 --- a/src/overlays/actors/ovl_En_Md/z_en_md.c +++ b/src/overlays/actors/ovl_En_Md/z_en_md.c @@ -818,10 +818,10 @@ void EnMd_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_md.c", 1280); if (this->alpha == 255) { - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sEyesSegments[this->eyeIdx])); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyesSegments[this->eyeIdx])); func_80034BA0(globalCtx, &this->skelAnime, EnMd_OverrideLimbDraw, EnMd_PostLimbDraw, &this->actor, this->alpha); } else if (this->alpha != 0) { - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(sEyesSegments[this->eyeIdx])); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyesSegments[this->eyeIdx])); func_80034CC4(globalCtx, &this->skelAnime, EnMd_OverrideLimbDraw, EnMd_PostLimbDraw, &this->actor, this->alpha); } diff --git a/src/overlays/actors/ovl_En_Niw/z_en_niw.c b/src/overlays/actors/ovl_En_Niw/z_en_niw.c index 797019d6a5..3a8088dd42 100644 --- a/src/overlays/actors/ovl_En_Niw/z_en_niw.c +++ b/src/overlays/actors/ovl_En_Niw/z_en_niw.c @@ -1188,7 +1188,7 @@ void EnNiw_FeatherDraw(EnNiw* this, GlobalContext* globalCtx) { for (i = 0; i < ARRAY_COUNT(this->feathers); i++, feather++) { if (feather->type == 1) { if (!flag) { - gSPDisplayList(oGfxCtx->polyXlu.p++, D_060023B0); + gSPDisplayList(POLY_XLU_DISP++, D_060023B0); flag++; } Matrix_Translate(feather->pos.x, feather->pos.y, feather->pos.z, MTXMODE_NEW); @@ -1196,9 +1196,9 @@ void EnNiw_FeatherDraw(EnNiw* this, GlobalContext* globalCtx) { Matrix_Scale(feather->scale, feather->scale, 1.0f, MTXMODE_APPLY); Matrix_RotateZ(feather->unk_30, MTXMODE_APPLY); Matrix_Translate(0.0f, -1000.0f, 0.0f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(gfxCtx, "../z_en_niw.c", 1913), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_en_niw.c", 1913), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_06002428); + gSPDisplayList(POLY_XLU_DISP++, D_06002428); } } diff --git a/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c b/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c index 779f5ad1da..f3f9eb853f 100644 --- a/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c +++ b/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c @@ -244,7 +244,7 @@ void EnNiwGirl_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_niw_girl.c", 573); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_80AB99D8[this->unk_272])); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_80AB99D8[this->unk_272])); SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, EnNiwGirlOverrideLimbDraw, 0, &this->actor); func_80033C30(&this->actor.posRot.pos, &sp4C, 255, globalCtx); diff --git a/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c b/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c index 480dbbd28d..96687e3681 100644 --- a/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c +++ b/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c @@ -148,9 +148,9 @@ void EnNutsball_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); Matrix_Mult(&globalCtx->mf_11DA0, MTXMODE_APPLY); Matrix_RotateZ(thisx->initPosRot.rot.z * 9.58738e-05f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_nutsball.c", 333), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_nutsball.c", 333), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDLists[thisx->params]); + gSPDisplayList(POLY_OPA_DISP++, sDLists[thisx->params]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_nutsball.c", 337); } diff --git a/src/overlays/actors/ovl_En_Part/z_en_part.c b/src/overlays/actors/ovl_En_Part/z_en_part.c index 5284ab76ac..5783d63e13 100644 --- a/src/overlays/actors/ovl_En_Part/z_en_part.c +++ b/src/overlays/actors/ovl_En_Part/z_en_part.c @@ -293,31 +293,31 @@ void EnPart_Draw(Actor* thisx, GlobalContext* globalCtx) { func_8002EBCC(thisx, globalCtx, 0); if (thisx->params == 5) { - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, func_80ACEAC0(globalCtx->state.gfxCtx, 245, 255, 205, 30, 35, 0)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, func_80ACEAC0(globalCtx->state.gfxCtx, 185, 135, 25, 20, 20, 0)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, func_80ACEAC0(globalCtx->state.gfxCtx, 255, 255, 255, 30, 40, 20)); + gSPSegment(POLY_OPA_DISP++, 0x08, func_80ACEAC0(globalCtx->state.gfxCtx, 245, 255, 205, 30, 35, 0)); + gSPSegment(POLY_OPA_DISP++, 0x09, func_80ACEAC0(globalCtx->state.gfxCtx, 185, 135, 25, 20, 20, 0)); + gSPSegment(POLY_OPA_DISP++, 0x0A, func_80ACEAC0(globalCtx->state.gfxCtx, 255, 255, 255, 30, 40, 20)); } else if (thisx->params == 6) { - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, func_80ACEAC0(globalCtx->state.gfxCtx, 55, 65, 55, 0, 0, 0)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, func_80ACEAC0(globalCtx->state.gfxCtx, 205, 165, 75, 25, 20, 0)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, func_80ACEAC0(globalCtx->state.gfxCtx, 205, 165, 75, 25, 20, 0)); + gSPSegment(POLY_OPA_DISP++, 0x08, func_80ACEAC0(globalCtx->state.gfxCtx, 55, 65, 55, 0, 0, 0)); + gSPSegment(POLY_OPA_DISP++, 0x09, func_80ACEAC0(globalCtx->state.gfxCtx, 205, 165, 75, 25, 20, 0)); + gSPSegment(POLY_OPA_DISP++, 0x0A, func_80ACEAC0(globalCtx->state.gfxCtx, 205, 165, 75, 25, 20, 0)); } else if (thisx->params == 7) { - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, func_80ACEAC0(globalCtx->state.gfxCtx, 255, 255, 255, 180, 180, 180)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, func_80ACEAC0(globalCtx->state.gfxCtx, 225, 205, 115, 25, 20, 0)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, func_80ACEAC0(globalCtx->state.gfxCtx, 225, 205, 115, 25, 20, 0)); + gSPSegment(POLY_OPA_DISP++, 0x08, func_80ACEAC0(globalCtx->state.gfxCtx, 255, 255, 255, 180, 180, 180)); + gSPSegment(POLY_OPA_DISP++, 0x09, func_80ACEAC0(globalCtx->state.gfxCtx, 225, 205, 115, 25, 20, 0)); + gSPSegment(POLY_OPA_DISP++, 0x0A, func_80ACEAC0(globalCtx->state.gfxCtx, 225, 205, 115, 25, 20, 0)); } else if ((thisx->params == 9) && (this->displayList == D_06002FF0)) { - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_06001300)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(D_06001700)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, SEGMENTED_TO_VIRTUAL(D_06001900)); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_06001300)); + gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(D_06001700)); + gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(D_06001900)); } else if ((thisx->params == 10) && (this->displayList == D_06002FF0)) { - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_06001B00)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(D_06001F00)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, SEGMENTED_TO_VIRTUAL(D_06002100)); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_06001B00)); + gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(D_06001F00)); + gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(D_06002100)); } if (this->displayList != NULL) { - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_part.c", 696), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_part.c", 696), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, this->displayList); + gSPDisplayList(POLY_OPA_DISP++, this->displayList); } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_part.c", 700); diff --git a/src/overlays/actors/ovl_En_Rd/z_en_rd.c b/src/overlays/actors/ovl_En_Rd/z_en_rd.c index bf40c59e65..50d764d733 100644 --- a/src/overlays/actors/ovl_En_Rd/z_en_rd.c +++ b/src/overlays/actors/ovl_En_Rd/z_en_rd.c @@ -868,11 +868,11 @@ void EnRd_Draw(Actor* thisx, GlobalContext* globalCtx) { if (this->unk_314 == 0xFF) { func_80093D18(globalCtx->state.gfxCtx); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 0, 0, 0, this->unk_314); - gSPSegment(oGfxCtx->polyOpa.p++, 8, &D_80116280[2]); - oGfxCtx->polyOpa.p = SkelAnime_DrawSV2(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, + gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, this->unk_314); + gSPSegment(POLY_OPA_DISP++, 8, &D_80116280[2]); + POLY_OPA_DISP = SkelAnime_DrawSV2(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, EnRd_OverrideLimbDraw, EnRd_PostLimbDraw, - &this->actor, oGfxCtx->polyOpa.p); + &this->actor, POLY_OPA_DISP); func_80033C30(&thisPos, &D_80AE4958, 255, globalCtx); if (this->unk_31A != 0) { this->actor.dmgEffectTimer++; @@ -884,11 +884,11 @@ void EnRd_Draw(Actor* thisx, GlobalContext* globalCtx) { } } else { func_80093D84(globalCtx->state.gfxCtx); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 0, 0, this->unk_314); - gSPSegment(oGfxCtx->polyXlu.p++, 8, &D_80116280[0]); - oGfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, + gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->unk_314); + gSPSegment(POLY_XLU_DISP++, 8, &D_80116280[0]); + POLY_XLU_DISP = SkelAnime_DrawSV2(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, EnRd_OverrideLimbDraw, NULL, &this->actor, - oGfxCtx->polyXlu.p); + POLY_XLU_DISP); func_80033C30(&thisPos, &D_80AE4958, this->unk_314, globalCtx); } diff --git a/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c b/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c index 9d34370265..1b0792c913 100644 --- a/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c +++ b/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c @@ -635,9 +635,9 @@ void EnReeba_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); if (this->isBig) { - gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0x0, 0x01, 155, 55, 255, 255); + gDPSetPrimColor(POLY_OPA_DISP++, 0x0, 0x01, 155, 55, 255, 255); } else { - gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0x0, 0x01, 255, 255, 255, 255); + gDPSetPrimColor(POLY_OPA_DISP++, 0x0, 0x01, 255, 255, 255, 255); } SkelAnime_Draw(globalCtx, this->skelanime.skeleton, this->skelanime.limbDrawTbl, NULL, NULL, &this->actor); diff --git a/src/overlays/actors/ovl_En_Rl/z_en_rl.c b/src/overlays/actors/ovl_En_Rl/z_en_rl.c index f72590aabb..1c1d105c45 100644 --- a/src/overlays/actors/ovl_En_Rl/z_en_rl.c +++ b/src/overlays/actors/ovl_En_Rl/z_en_rl.c @@ -311,13 +311,13 @@ void func_80AE7D94(EnRl* this, GlobalContext* globalCtx) { func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(addr)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr)); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 0, 0, this->alpha); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0C, D_80116280); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(addr)); + gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(addr)); + gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->alpha); + gSPSegment(POLY_XLU_DISP++, 0x0C, D_80116280); - oGfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, - skelAnime->dListCount, NULL, NULL, NULL, oGfxCtx->polyXlu.p); + POLY_XLU_DISP = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, + skelAnime->dListCount, NULL, NULL, NULL, POLY_XLU_DISP); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_rl_inKenjyanomaDemo02.c", 331); } @@ -360,10 +360,10 @@ void func_80AE7FDC(EnRl* this, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(addr)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr)); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 0, 0, 0, 255); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0C, &D_80116280[2]); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(addr)); + gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(addr)); + gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255); + gSPSegment(POLY_OPA_DISP++, 0x0C, &D_80116280[2]); SkelAnime_DrawSV(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, NULL, NULL, &this->actor); diff --git a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c index 676d93c4d9..75b28e63ba 100644 --- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c +++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c @@ -2360,15 +2360,15 @@ void func_80AF0400(EnRu1* this, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(addr1)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr1)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr2)); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 0, 0, 0, 255); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0C, &D_80116280[2]); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(addr1)); + gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(addr1)); + gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(addr2)); + gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255); + gSPSegment(POLY_OPA_DISP++, 0x0C, &D_80116280[2]); - oGfxCtx->polyOpa.p = + POLY_OPA_DISP = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, - EnRu1_OverrideLimbDraw, EnRu1_PostLimbDraw, &this->actor, oGfxCtx->polyOpa.p); + EnRu1_OverrideLimbDraw, EnRu1_PostLimbDraw, &this->actor, POLY_OPA_DISP); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ru1.c", 1309); } @@ -2386,15 +2386,15 @@ void func_80AF05D4(EnRu1* this, GlobalContext* globalCtx) { func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(addr1)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr1)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr2)); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 0, 0, this->unk_2A8); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0C, &D_80116280[0]); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(addr1)); + gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(addr1)); + gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(addr2)); + gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->unk_2A8); + gSPSegment(POLY_XLU_DISP++, 0x0C, &D_80116280[0]); - oGfxCtx->polyXlu.p = + POLY_XLU_DISP = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, - EnRu1_OverrideLimbDraw, NULL, &this->actor, oGfxCtx->polyXlu.p); + EnRu1_OverrideLimbDraw, NULL, &this->actor, POLY_XLU_DISP); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ru1.c", 1353); } diff --git a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c index d92fbb4799..d4a3dfdff4 100644 --- a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c +++ b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c @@ -480,13 +480,13 @@ void func_80AF321C(EnRu2* this, GlobalContext* globalCtx) { func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(addr)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr)); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 0, 0, this->alpha); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0C, &D_80116280[0]); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(addr)); + gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(addr)); + gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->alpha); + gSPSegment(POLY_XLU_DISP++, 0x0C, &D_80116280[0]); - oGfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, - skelAnime->dListCount, NULL, NULL, NULL, oGfxCtx->polyXlu.p); + POLY_XLU_DISP = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, + skelAnime->dListCount, NULL, NULL, NULL, POLY_XLU_DISP); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ru2_inKenjyanomaDemo02.c", 291); } @@ -805,10 +805,10 @@ void func_80AF3F20(EnRu2* this, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(addr)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr)); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 0, 0, 0, 255); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0C, &D_80116280[2]); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(addr)); + gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(addr)); + gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255); + gSPSegment(POLY_OPA_DISP++, 0x0C, &D_80116280[2]); SkelAnime_DrawSV(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, NULL, NULL, &this->actor); diff --git a/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.c b/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.c index 48b1f362d9..f0b6da1a4f 100644 --- a/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.c +++ b/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.c @@ -62,7 +62,7 @@ void EnSceneChange_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_scene_change.c", 290); displayListHead = displayList; - gSPSegment(oGfxCtx->polyOpa.p++, 0x0C, displayListHead); + gSPSegment(POLY_OPA_DISP++, 0x0C, displayListHead); func_80093D18(globalCtx->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c b/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c index e83fa7527d..90e8fb8b2b 100644 --- a/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c +++ b/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c @@ -94,9 +94,9 @@ void EnSkjneedle_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_skj_needle.c", 200); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_skj_needle.c", 205), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_skj_needle.c", 205), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, &D_06000EB0); + gSPDisplayList(POLY_OPA_DISP++, &D_06000EB0); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_skj_needle.c", 210); } diff --git a/src/overlays/actors/ovl_En_St/z_en_st.c b/src/overlays/actors/ovl_En_St/z_en_st.c index 2356f10ec7..b6b61feb9e 100644 --- a/src/overlays/actors/ovl_En_St/z_en_st.c +++ b/src/overlays/actors/ovl_En_St/z_en_st.c @@ -1026,8 +1026,8 @@ s32 EnSt_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dListP, break; case 4: // teeth - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, this->teethR, this->teethG, this->teethB, 0); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, this->teethR, this->teethG, this->teethB, 0); break; } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_st.c", 2295); diff --git a/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c b/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c index 4768bfb045..b49dd2dcdd 100644 --- a/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c +++ b/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c @@ -765,7 +765,7 @@ void func_80B13464(EnSyatekiNiw* this, GlobalContext* globalCtx) { for (i = 0; i < 5; i++, ptr++) { if (ptr->unk_00 == 1) { if (flag == 0) { - gSPDisplayList(oGfxCtx->polyXlu.p++, D_060023B0); + gSPDisplayList(POLY_XLU_DISP++, D_060023B0); flag++; } @@ -775,9 +775,9 @@ void func_80B13464(EnSyatekiNiw* this, GlobalContext* globalCtx) { Matrix_RotateZ(ptr->unk_30, MTXMODE_APPLY); Matrix_Translate(0.0f, -1000.0f, 0.0f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(gfxCtx, "../z_en_syateki_niw.c", 1251), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_en_syateki_niw.c", 1251), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_06002428); + gSPDisplayList(POLY_XLU_DISP++, D_06002428); } } diff --git a/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c b/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c index 552133f83b..990394db35 100644 --- a/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c +++ b/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c @@ -226,7 +226,7 @@ void EnTakaraMan_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_takara_man.c", 528); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sTakaraEyeTextures[this->eyeTextureIdx])); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sTakaraEyeTextures[this->eyeTextureIdx])); SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, EnTakaraMan_OverrideLimbDraw, NULL, &this->actor); diff --git a/src/overlays/actors/ovl_En_Tana/z_en_tana.c b/src/overlays/actors/ovl_En_Tana/z_en_tana.c index c10f1f7752..aef58d5b72 100644 --- a/src/overlays/actors/ovl_En_Tana/z_en_tana.c +++ b/src/overlays/actors/ovl_En_Tana/z_en_tana.c @@ -72,9 +72,9 @@ void func_80B17FC4(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_tana.c", 148); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_tana.c", 152), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_tana.c", 152), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDLists1[thisx->params]); + gSPDisplayList(POLY_OPA_DISP++, sDLists1[thisx->params]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_tana.c", 157); } @@ -85,10 +85,10 @@ void func_80B1809C(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_tana.c", 163); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sUnkSegments[thisx->params])); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_tana.c", 169), + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sUnkSegments[thisx->params])); + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_tana.c", 169), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDLists1[thisx->params]); + gSPDisplayList(POLY_OPA_DISP++, sDLists1[thisx->params]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_tana.c", 174); } diff --git a/src/overlays/actors/ovl_En_Tk/z_en_tk.c b/src/overlays/actors/ovl_En_Tk/z_en_tk.c index 89428b04dd..83c131e658 100644 --- a/src/overlays/actors/ovl_En_Tk/z_en_tk.c +++ b/src/overlays/actors/ovl_En_Tk/z_en_tk.c @@ -117,26 +117,26 @@ void EnTkEff_Draw(EnTk* this, GlobalContext* globalCtx) { for (i = 0; i < ARRAY_COUNT(this->eff); i++) { if (eff->active != 0) { if (gfxSetup == 0) { - oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 0); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_0600BC90); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 100, 60, 20, 0); + POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0); + gSPDisplayList(POLY_XLU_DISP++, D_0600BC90); + gDPSetEnvColor(POLY_XLU_DISP++, 100, 60, 20, 0); gfxSetup = 1; } alpha = eff->timeLeft * (255.f / eff->timeTotal); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 170, 130, 90, alpha); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 170, 130, 90, alpha); - gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPPipeSync(POLY_XLU_DISP++); Matrix_Translate(eff->pos.x, eff->pos.y, eff->pos.z, MTXMODE_NEW); func_800D1FD4(&globalCtx->mf_11DA0); Matrix_Scale(eff->size, eff->size, 1.f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_tk_eff.c", 140), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_tk_eff.c", 140), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); imageIdx = eff->timeLeft * ((f32)ARRAY_COUNT(images) / eff->timeTotal); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(images[imageIdx])); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(images[imageIdx])); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_0600BCA0); + gSPDisplayList(POLY_XLU_DISP++, D_0600BCA0); } eff++; } @@ -683,7 +683,7 @@ void EnTk_Update(Actor* thisx, GlobalContext* globalCtx) { void func_80B1D200(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_tk.c", 1188); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_0600ACE0); + gSPDisplayList(POLY_OPA_DISP++, D_0600ACE0); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_tk.c", 1190); } @@ -739,7 +739,7 @@ void EnTk_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sEyesSegments[this->eyeImageIdx])); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyesSegments[this->eyeImageIdx])); SkelAnime_DrawSV(globalCtx, this->skelAnim.skeleton, this->skelAnim.limbDrawTbl, this->skelAnim.dListCount, EnTk_OverrideLimbDraw, EnTk_PostLimbDraw, &this->actor); diff --git a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c index a8a164bae3..ee88735ce8 100644 --- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c +++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c @@ -561,7 +561,7 @@ void EnWallmas_DrawXlu(EnWallmas* this, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1386); func_80094044(globalCtx->state.gfxCtx); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 0, 0, 0, 255); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 0, 0, 0, 255); func_80038A28(this->actor.floorPoly, this->actor.posRot.pos.x, this->actor.groundY, this->actor.posRot.pos.z, &mf); Matrix_Mult(&mf, MTXMODE_NEW); @@ -574,8 +574,8 @@ void EnWallmas_DrawXlu(EnWallmas* this, GlobalContext* globalCtx) { } Matrix_Scale(xzScale, 1.0f, xzScale, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1421), G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, &D_04049210); + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1421), G_MTX_LOAD); + gSPDisplayList(POLY_XLU_DISP++, &D_04049210); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1426); } @@ -605,8 +605,8 @@ void EnWallMas_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList Matrix_RotateZ(DEGREE_15_RAD, MTXMODE_APPLY); Matrix_Scale(2.0f, 2.0f, 2.0f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1489), G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06008688); + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1489), G_MTX_LOAD); + gSPDisplayList(POLY_OPA_DISP++, D_06008688); Matrix_Pull(); diff --git a/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c b/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c index 670ef8c9aa..2cb37c5e49 100644 --- a/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c +++ b/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c @@ -139,10 +139,10 @@ void EnYukabyun_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_yukabyun.c", 366); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_80B43F64[this->unk_152])); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_yukabyun.c", 373), + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_80B43F64[this->unk_152])); + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_yukabyun.c", 373), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06000970); + gSPDisplayList(POLY_OPA_DISP++, D_06000970); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_yukabyun.c", 378); } diff --git a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c index d1f93f4301..3f1a74974b 100644 --- a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c +++ b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c @@ -596,9 +596,9 @@ void EnZl1_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_girlB.c", 2011); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(this->unk_1F4)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(this->unk_1F8)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, SEGMENTED_TO_VIRTUAL(this->unk_1EC)); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(this->unk_1F4)); + gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(this->unk_1F8)); + gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(this->unk_1EC)); func_80093D18(globalCtx->state.gfxCtx); SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, diff --git a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c index b3d59cd962..af34297b90 100644 --- a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c +++ b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c @@ -1688,15 +1688,15 @@ void func_80B523C8(EnZl2* this, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sp74)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(sp70)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, SEGMENTED_TO_VIRTUAL(sp64)); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 0, 0, 0, 255); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0B, &D_80116280[2]); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sp74)); + gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sp70)); + gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(sp64)); + gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255); + gSPSegment(POLY_OPA_DISP++, 0x0B, &D_80116280[2]); - oGfxCtx->polyOpa.p = + POLY_OPA_DISP = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, - EnZl2_OverrideLimbDraw, EnZl2_PostLimbDraw, &this->actor, oGfxCtx->polyOpa.p); + EnZl2_OverrideLimbDraw, EnZl2_PostLimbDraw, &this->actor, POLY_OPA_DISP); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_zl2.c", 1648); } @@ -1714,15 +1714,15 @@ void func_80B525D4(EnZl2* this, GlobalContext* globalCtx) { func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(sp78)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, SEGMENTED_TO_VIRTUAL(sp78)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0A, SEGMENTED_TO_VIRTUAL(sp6C)); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 0, 0, this->alpha); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0B, &D_80116280[0]); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sp78)); + gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sp78)); + gSPSegment(POLY_XLU_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(sp6C)); + gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->alpha); + gSPSegment(POLY_XLU_DISP++, 0x0B, &D_80116280[0]); - oGfxCtx->polyXlu.p = + POLY_XLU_DISP = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, - EnZl2_OverrideLimbDraw, NULL, &this->actor, oGfxCtx->polyXlu.p); + EnZl2_OverrideLimbDraw, NULL, &this->actor, POLY_XLU_DISP); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_zl2.c", 1692); } diff --git a/src/overlays/actors/ovl_End_Title/z_end_title.c b/src/overlays/actors/ovl_End_Title/z_end_title.c index a65a95c6ef..1b7979ac76 100644 --- a/src/overlays/actors/ovl_End_Title/z_end_title.c +++ b/src/overlays/actors/ovl_End_Title/z_end_title.c @@ -65,8 +65,8 @@ void EndTitle_Draw(Actor* thisx, GlobalContext* globalCtx) { Matrix_RotateX(0.287621408700943f, MTXMODE_APPLY); Matrix_RotateY(0.0f, MTXMODE_APPLY); Matrix_RotateZ(0.0f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_end_title.c", 412), G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyXlu.p++, sTriforceDList); + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_end_title.c", 412), G_MTX_LOAD); + gSPDisplayList(POLY_XLU_DISP++, sTriforceDList); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_end_title.c", 417); @@ -83,51 +83,51 @@ void EndTitle_Draw(Actor* thisx, GlobalContext* globalCtx) { this->ootAlpha += 15; } - oGfxCtx->overlay.p = func_80093F34(oGfxCtx->overlay.p); - gDPSetTextureLUT(oGfxCtx->overlay.p++, G_TT_NONE); - gDPSetEnvColor(oGfxCtx->overlay.p++, 255, 120, 30, 0); - gDPSetRenderMode(oGfxCtx->overlay.p++, G_RM_PASS, G_RM_XLU_SURF2); - gSPClearGeometryMode(oGfxCtx->overlay.p++, + OVERLAY_DISP = func_80093F34(OVERLAY_DISP); + gDPSetTextureLUT(OVERLAY_DISP++, G_TT_NONE); + gDPSetEnvColor(OVERLAY_DISP++, 255, 120, 30, 0); + gDPSetRenderMode(OVERLAY_DISP++, G_RM_PASS, G_RM_XLU_SURF2); + gSPClearGeometryMode(OVERLAY_DISP++, G_TEXTURE_ENABLE | G_CULL_BACK | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR); - gDPSetCombineLERP(oGfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, 0, 0, + gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, COMBINED, 0, 0, 0, COMBINED); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0x00, 0x80, 0, 0, 0, this->endAlpha); - gDPSetTextureImage(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 80, D_80B670E0); - gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 11, 0x0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, + gDPSetPrimColor(OVERLAY_DISP++, 0x00, 0x80, 0, 0, 0, this->endAlpha); + gDPSetTextureImage(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_8b, 80, D_80B670E0); + gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_8b, 11, 0x0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0); - gDPLoadSync(oGfxCtx->overlay.p++); - gDPLoadTile(oGfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, (80 << 2), (24 << 2)); - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 11, 0x0, G_TX_RENDERTILE, 0, + gDPLoadSync(OVERLAY_DISP++); + gDPLoadTile(OVERLAY_DISP++, G_TX_LOADTILE, 0, 0, (80 << 2), (24 << 2)); + gDPPipeSync(OVERLAY_DISP++); + gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_8b, 11, 0x0, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0); - gDPSetTileSize(oGfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, (80 << 2), (24 << 2)); - gSPTextureRectangle(oGfxCtx->overlay.p++, (120 << 2), (90 << 2), (200 << 2), (113 << 2), G_TX_RENDERTILE, 0, 0, + gDPSetTileSize(OVERLAY_DISP++, G_TX_RENDERTILE, 0, 0, (80 << 2), (24 << 2)); + gSPTextureRectangle(OVERLAY_DISP++, (120 << 2), (90 << 2), (200 << 2), (113 << 2), G_TX_RENDERTILE, 0, 0, (32 << 5), (32 << 5)); - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0x00, 0x80, 0, 0, 0, this->tlozAlpha); - gDPSetTextureImage(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 120, D_80B65EA0); - gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 0x0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, + gDPPipeSync(OVERLAY_DISP++); + gDPSetPrimColor(OVERLAY_DISP++, 0x00, 0x80, 0, 0, 0, this->tlozAlpha); + gDPSetTextureImage(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_8b, 120, D_80B65EA0); + gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 0x0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0); - gDPLoadSync(oGfxCtx->overlay.p++); - gDPLoadTile(oGfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, (120 << 2), (24 << 2)); - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 0x0, G_TX_RENDERTILE, 0, + gDPLoadSync(OVERLAY_DISP++); + gDPLoadTile(OVERLAY_DISP++, G_TX_LOADTILE, 0, 0, (120 << 2), (24 << 2)); + gDPPipeSync(OVERLAY_DISP++); + gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 0x0, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0); - gDPSetTileSize(oGfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, (120 << 2), (24 << 2)); - gSPTextureRectangle(oGfxCtx->overlay.p++, (100 << 2), (160 << 2), (220 << 2), (183 << 2), G_TX_RENDERTILE, 0, 0, + gDPSetTileSize(OVERLAY_DISP++, G_TX_RENDERTILE, 0, 0, (120 << 2), (24 << 2)); + gSPTextureRectangle(OVERLAY_DISP++, (100 << 2), (160 << 2), (220 << 2), (183 << 2), G_TX_RENDERTILE, 0, 0, (32 << 5), (32 << 5)); - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0x00, 0x80, 0, 0, 0, this->ootAlpha); - gDPSetTextureImage(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 112, D_80B669E0); - gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 15, 0x0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, + gDPPipeSync(OVERLAY_DISP++); + gDPSetPrimColor(OVERLAY_DISP++, 0x00, 0x80, 0, 0, 0, this->ootAlpha); + gDPSetTextureImage(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_8b, 112, D_80B669E0); + gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_8b, 15, 0x0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0); - gDPLoadSync(oGfxCtx->overlay.p++); - gDPLoadTile(oGfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, (112 << 2), (16 << 2)); - gDPPipeSync(oGfxCtx->overlay.p++); - gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 15, 0x0, G_TX_RENDERTILE, 0, + gDPLoadSync(OVERLAY_DISP++); + gDPLoadTile(OVERLAY_DISP++, G_TX_LOADTILE, 0, 0, (112 << 2), (16 << 2)); + gDPPipeSync(OVERLAY_DISP++); + gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_8b, 15, 0x0, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0); - gDPSetTileSize(oGfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, (112 << 2), (16 << 2)); - gSPTextureRectangle(oGfxCtx->overlay.p++, (104 << 2), (177 << 2), (216 << 2), (192 << 2), G_TX_RENDERTILE, 0, 0, + gDPSetTileSize(OVERLAY_DISP++, G_TX_RENDERTILE, 0, 0, (112 << 2), (16 << 2)); + gSPTextureRectangle(OVERLAY_DISP++, (104 << 2), (177 << 2), (216 << 2), (192 << 2), G_TX_RENDERTILE, 0, 0, (32 << 5), (32 << 5)); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_end_title.c", 515); @@ -148,9 +148,9 @@ void func_80B65DA8(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_end_title.c", 594); - oGfxCtx->overlay.p = func_80093F34(oGfxCtx->overlay.p); - gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0x80, 0, 0, 0, this->endAlpha); - gSPDisplayList(oGfxCtx->overlay.p++, dList_80B69720); + OVERLAY_DISP = func_80093F34(OVERLAY_DISP); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0x80, 0, 0, 0, this->endAlpha); + gSPDisplayList(OVERLAY_DISP++, dList_80B69720); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_end_title.c", 600); } diff --git a/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c b/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c index 2c8f807c80..abec30a5ea 100644 --- a/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c +++ b/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c @@ -99,16 +99,16 @@ void ItemBHeart_Draw(Actor* thisx, GlobalContext* globalCtx) { if (flag) { func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_item_b_heart.c", 551), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_item_b_heart.c", 551), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_06001290); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_06001470); + gSPDisplayList(POLY_XLU_DISP++, D_06001290); + gSPDisplayList(POLY_XLU_DISP++, D_06001470); } else { func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_item_b_heart.c", 557), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_item_b_heart.c", 557), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06001290); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06001470); + gSPDisplayList(POLY_OPA_DISP++, D_06001290); + gSPDisplayList(POLY_OPA_DISP++, D_06001470); } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_item_b_heart.c", 561); diff --git a/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c b/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c index 32ae0ea2da..c2c4fc3cdf 100644 --- a/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c +++ b/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c @@ -229,14 +229,14 @@ s32 MagicWind_OverrideLimbDraw(GlobalContext* globalCtx, SkelAnimeCurve* skelCur OPEN_DISPS(globalCtx->state.gfxCtx, "../z_magic_wind.c", 615); if (limbIndex == 1) { - gSPSegment(oGfxCtx->polyXlu.p++, 8, + gSPSegment(POLY_XLU_DISP++, 8, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (globalCtx->state.frames * 9) & 0xFF, 0xFF - ((globalCtx->state.frames * 0xF) & 0xFF), 0x40, 0x40, 1, (globalCtx->state.frames * 0xF) & 0xFF, 0xFF - ((globalCtx->state.frames * 0x1E) & 0xFF), 0x40, 0x40)); } else if (limbIndex == 2) { - gSPSegment(oGfxCtx->polyXlu.p++, 9, + gSPSegment(POLY_XLU_DISP++, 9, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (globalCtx->state.frames * 3) & 0xFF, 0xFF - ((globalCtx->state.frames * 5) & 0xFF), 0x40, 0x40, 1, (globalCtx->state.frames * 6) & 0xFF, @@ -255,7 +255,7 @@ void MagicWind_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(gfxCtx, "../z_magic_wind.c", 661); if (this->actionFunc != MagicWind_WaitForTimer) { - oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 25); + POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 25); SkelCurve_Draw(thisx, globalCtx, &this->skelCurve, MagicWind_OverrideLimbDraw, NULL, 1, NULL); } diff --git a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c index e07a96fb43..4a4a758bb3 100644 --- a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c +++ b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c @@ -203,10 +203,10 @@ void ObjComb_Draw(Actor* thisx, GlobalContext* globalCtx) { Matrix_Translate(0, -(this->actor.scale.y * 118.0f), 0, 1); Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, 1); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_comb.c", 394), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_comb.c", 394), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_050095B0); + gSPDisplayList(POLY_OPA_DISP++, D_050095B0); func_800628A4(0, &this->collider); diff --git a/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c b/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c index 9cde524913..8f54370d02 100644 --- a/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c +++ b/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c @@ -152,17 +152,17 @@ void ObjDekujr_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_dekujr.c", 379), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_dekujr.c", 379), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_060030D0); + gSPDisplayList(POLY_OPA_DISP++, D_060030D0); frameCount = globalCtx->state.frames; gSPSegment( - oGfxCtx->polyXlu.p++, 0x08, + POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, frameCount % 128, 0, 32, 32, 1, frameCount % 128, 0, 32, 32)); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_dekujr.c", 399), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_dekujr.c", 399), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_060032D8); + gSPDisplayList(POLY_XLU_DISP++, D_060032D8); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_obj_dekujr.c", 409); } diff --git a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c index ac6411614f..b92ae1d210 100644 --- a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c +++ b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c @@ -153,7 +153,7 @@ void ObjHsblock_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_hsblock.c", 369), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_hsblock.c", 369), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (globalCtx->sceneNum == SCENE_HIDAN) { @@ -165,8 +165,8 @@ void ObjHsblock_Draw(Actor* thisx, GlobalContext* globalCtx) { color = &defaultColor; } - gDPSetEnvColor(oGfxCtx->polyOpa.p++, color->r, color->g, color->b, 255); - gSPDisplayList(oGfxCtx->polyOpa.p++, sDLists[thisx->params & 3]); + gDPSetEnvColor(POLY_OPA_DISP++, color->r, color->g, color->b, 255); + gSPDisplayList(POLY_OPA_DISP++, sDLists[thisx->params & 3]); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_obj_hsblock.c", 399); } diff --git a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c index 3cb89a9d49..f216970f8f 100644 --- a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c +++ b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c @@ -393,9 +393,9 @@ void ObjLightswitch_DrawOpa(ObjLightswitch* this, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 809); func_80093D18(globalCtx->state.gfxCtx); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, (u8)(this->color[0] >> 6), (u8)(this->color[1] >> 6), + gDPSetEnvColor(POLY_OPA_DISP++, (u8)(this->color[0] >> 6), (u8)(this->color[1] >> 6), (u8)(this->color[2] >> 6), (u8)(this->alpha >> 6)); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, &D_80116280[2]); + gSPSegment(POLY_OPA_DISP++, 0x09, &D_80116280[2]); if ((this->actor.params & 1) == 1) { child = this->actor.child; @@ -411,26 +411,26 @@ void ObjLightswitch_DrawOpa(ObjLightswitch* this, GlobalContext* globalCtx) { pos.z = this->actor.posRot.pos.z; } - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 841), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 841), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(faceTextures[this->faceTextureIndex])); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06000260); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(faceTextures[this->faceTextureIndex])); + gSPDisplayList(POLY_OPA_DISP++, D_06000260); rot.x = this->actor.shape.rot.x; rot.y = this->actor.shape.rot.y; rot.z = this->actor.shape.rot.z + this->flameRingRot; func_800D1694(pos.x, pos.y, pos.z, &rot); Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 859), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 859), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06000398); + gSPDisplayList(POLY_OPA_DISP++, D_06000398); rot.z = this->actor.shape.rot.z - this->flameRingRot; func_800D1694(pos.x, pos.y, pos.z, &rot); Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 873), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 873), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, D_06000408); + gSPDisplayList(POLY_OPA_DISP++, D_06000408); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 878); } @@ -443,18 +443,18 @@ void ObjLightswitch_DrawXlu(ObjLightswitch* this, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 890); func_80093D84(globalCtx->state.gfxCtx); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, (u8)(this->color[0] >> 6), (u8)(this->color[1] >> 6), + gDPSetEnvColor(POLY_XLU_DISP++, (u8)(this->color[0] >> 6), (u8)(this->color[1] >> 6), (u8)(this->color[2] >> 6), (u8)(this->alpha >> 6)); - gSPSegment(oGfxCtx->polyXlu.p++, 0x09, D_80116280); + gSPSegment(POLY_XLU_DISP++, 0x09, D_80116280); sp68.x = this->actor.posRot.pos.x; sp68.y = this->actor.posRot.pos.y + (this->actor.shape.unk_08 * this->actor.scale.y); sp68.z = this->actor.posRot.pos.z; - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 912), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 912), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(faceTextures[this->faceTextureIndex])); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_06000260); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(faceTextures[this->faceTextureIndex])); + gSPDisplayList(POLY_XLU_DISP++, D_06000260); sp60.x = this->actor.shape.rot.x; sp60.y = this->actor.shape.rot.y; @@ -462,16 +462,16 @@ void ObjLightswitch_DrawXlu(ObjLightswitch* this, GlobalContext* globalCtx) { func_800D1694(sp68.x, sp68.y, sp68.z, &sp60); Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 930), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 930), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_06000398); + gSPDisplayList(POLY_XLU_DISP++, D_06000398); sp60.z = this->actor.shape.rot.z - this->flameRingRot; func_800D1694(sp68.x, sp68.y, sp68.z, &sp60); Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 944), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 944), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_06000408); + gSPDisplayList(POLY_XLU_DISP++, D_06000408); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 949); } diff --git a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c index 01eb272e5c..6d75456ed9 100644 --- a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c +++ b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c @@ -669,9 +669,9 @@ void ObjOshihiki_Draw(Actor* thisx, GlobalContext* globalCtx) { } this->stateFlags &= ~PUSHBLOCK_MOVE_UNDER; func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(this->texture)); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(this->texture)); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_oshihiki.c", 1308), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_oshihiki.c", 1308), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); switch (globalCtx->sceneNum) { @@ -683,13 +683,13 @@ void ObjOshihiki_Draw(Actor* thisx, GlobalContext* globalCtx) { case SCENE_JYASINZOU: case SCENE_HAKADAN: case SCENE_MEN: - gDPSetEnvColor(oGfxCtx->polyOpa.p++, this->color.r, this->color.g, this->color.b, 255); + gDPSetEnvColor(POLY_OPA_DISP++, this->color.r, this->color.g, this->color.b, 255); break; default: - gDPSetEnvColor(oGfxCtx->polyOpa.p++, mREG(13), mREG(14), mREG(15), 255); + gDPSetEnvColor(POLY_OPA_DISP++, mREG(13), mREG(14), mREG(15), 255); break; } - gSPDisplayList(oGfxCtx->polyOpa.p++, &D_05004CD0); + gSPDisplayList(POLY_OPA_DISP++, &D_05004CD0); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_obj_oshihiki.c", 1334); } diff --git a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c index ca2271722c..7e1aba115d 100644 --- a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c +++ b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c @@ -242,10 +242,10 @@ void ObjSyokudai_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_obj_syokudai.c", 707); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_syokudai.c", 714), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_syokudai.c", 714), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyOpa.p++, displayLists[(u16)this->actor.params >> 0xC]); + gSPDisplayList(POLY_OPA_DISP++, displayLists[(u16)this->actor.params >> 0xC]); if (this->litTimer != 0) { f32 flameScale = 1.0f; @@ -259,23 +259,23 @@ void ObjSyokudai_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, (this->flameTexScroll * -20) & 0x1FF, 0x20, 0x80)); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x80, 0x80, 255, 255, 0, 255); + gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 0, 255); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 255, 0, 0, 0); + gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0); Matrix_Translate(0.0f, 52.0f, 0.0f, MTXMODE_APPLY); Matrix_RotateY((s16)(func_8005A9F4(ACTIVE_CAM) - this->actor.shape.rot.y + 0x8000) * (M_PI / 0x8000), MTXMODE_APPLY); Matrix_Scale(flameScale, flameScale, flameScale, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_syokudai.c", 745), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_syokudai.c", 745), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_0404D4E0); + gSPDisplayList(POLY_XLU_DISP++, D_0404D4E0); } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_obj_syokudai.c", 749); } diff --git a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c index 040ffc1569..ebc2bfe6eb 100644 --- a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c +++ b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c @@ -154,12 +154,12 @@ void OceffSpot_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_spot.c", 469), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_spot.c", 469), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, sTextureDL); - gSPDisplayList(oGfxCtx->polyXlu.p++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 2, scroll * (-2), 32, 32, + gSPDisplayList(POLY_XLU_DISP++, sTextureDL); + gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 2, scroll * (-2), 32, 32, 1, 0, scroll * (-8), 32, 32)); - gSPDisplayList(oGfxCtx->polyXlu.p++, sCylinderDl); + gSPDisplayList(POLY_XLU_DISP++, sCylinderDl); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_oceff_spot.c", 485); } diff --git a/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c b/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c index f45981a59e..8103a05af8 100644 --- a/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c +++ b/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c @@ -130,18 +130,18 @@ void OceffStorm_Draw2(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_oceff_storm.c", 449); - gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPPipeSync(POLY_XLU_DISP++); if (1) {} - oGfxCtx->polyXlu.p = func_80093F34(oGfxCtx->polyXlu.p); - gDPSetAlphaDither(oGfxCtx->polyXlu.p++, G_AD_NOISE); - gDPSetColorDither(oGfxCtx->polyXlu.p++, G_CD_NOISE); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x80, 0x80, 200, 200, 150, this->primColorAlpha); - gSPDisplayList(oGfxCtx->polyXlu.p++, sTextureDL); - gSPDisplayList(oGfxCtx->polyXlu.p++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 8, scroll * 4, 64, 64, 1, + POLY_XLU_DISP = func_80093F34(POLY_XLU_DISP); + gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_NOISE); + gDPSetColorDither(POLY_XLU_DISP++, G_CD_NOISE); + gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 200, 200, 150, this->primColorAlpha); + gSPDisplayList(POLY_XLU_DISP++, sTextureDL); + gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 8, scroll * 4, 64, 64, 1, scroll * 4, scroll * 4, 64, 64)); - gSPTextureRectangle(oGfxCtx->polyXlu.p++, 0, 0, (SCREEN_WIDTH << 2), (SCREEN_HEIGHT << 2), G_TX_RENDERTILE, 0, 0, + gSPTextureRectangle(POLY_XLU_DISP++, 0, 0, (SCREEN_WIDTH << 2), (SCREEN_HEIGHT << 2), G_TX_RENDERTILE, 0, 0, 140, (1 << 15) | (31 << 10) | 884); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_oceff_storm.c", 477); @@ -156,21 +156,21 @@ void OceffStorm_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D84(globalCtx->state.gfxCtx); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x80, 0x80, 255, 255, 200, 255); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 150, 150, 0, 128); - gDPSetAlphaDither(oGfxCtx->polyXlu.p++, G_AD_NOISE); - gDPSetColorDither(oGfxCtx->polyXlu.p++, G_CD_NOISE); + gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 200, 255); + gDPSetEnvColor(POLY_XLU_DISP++, 150, 150, 0, 128); + gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_NOISE); + gDPSetColorDither(POLY_XLU_DISP++, G_CD_NOISE); vtxPtr[0].v.cn[3] = vtxPtr[6].v.cn[3] = vtxPtr[16].v.cn[3] = vtxPtr[25].v.cn[3] = this->vtxAlpha >> 1; vtxPtr[10].v.cn[3] = vtxPtr[22].v.cn[3] = this->vtxAlpha; - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_storm.c", 498), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_storm.c", 498), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, sCylinderTexDl); - gSPDisplayList(oGfxCtx->polyXlu.p++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 4, (0 - scroll) * 8, 32, + gSPDisplayList(POLY_XLU_DISP++, sCylinderTexDl); + gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 4, (0 - scroll) * 8, 32, 32, 1, scroll * 8, (0 - scroll) * 12, 32, 32)); - gSPDisplayList(oGfxCtx->polyXlu.p++, sCylinderDl); + gSPDisplayList(POLY_XLU_DISP++, sCylinderDl); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_oceff_storm.c", 512); diff --git a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c index 92468a9f0c..5f8bdb90e3 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c +++ b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c @@ -108,21 +108,21 @@ void OceffWipe_Draw(Actor* thisx, GlobalContext* globalCtx) { func_800D1FD4(&globalCtx->mf_11DA0); Matrix_Translate(0.0f, 0.0f, -z, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_wipe.c", 375), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_wipe.c", 375), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (this->actor.params) { - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 170, 255, 255, 255); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 150, 255, 128); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 170, 255, 255, 255); + gDPSetEnvColor(POLY_XLU_DISP++, 0, 150, 255, 128); } else { - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 255, 200, 255); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 100, 0, 255, 128); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 200, 255); + gDPSetEnvColor(POLY_XLU_DISP++, 100, 0, 255, 128); } - gSPDisplayList(oGfxCtx->polyXlu.p++, sTextureDL); - gSPDisplayList(oGfxCtx->polyXlu.p++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0 - scroll, scroll * (-2), 32, 32, + gSPDisplayList(POLY_XLU_DISP++, sTextureDL); + gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0 - scroll, scroll * (-2), 32, 32, 1, 0 - scroll, scroll * (-2), 32, 32)); - gSPDisplayList(oGfxCtx->polyXlu.p++, sFrustrumDl); + gSPDisplayList(POLY_XLU_DISP++, sFrustrumDl); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_oceff_wipe.c", 398); } diff --git a/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c b/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c index 7e8b3b818b..8eb698681a 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c +++ b/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c @@ -96,15 +96,15 @@ void OceffWipe2_Draw(Actor* thisx, GlobalContext* globalCtx) { func_800D1FD4(&globalCtx->mf_11DA0); Matrix_Translate(0.0f, 0.0f, -z, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_wipe2.c", 400), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_wipe2.c", 400), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 255, 170, 255); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 255, 100, 0, 128); - gSPDisplayList(oGfxCtx->polyXlu.p++, sTextureDL); - gSPDisplayList(oGfxCtx->polyXlu.p++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 6, scroll * (-6), 64, 64, + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 170, 255); + gDPSetEnvColor(POLY_XLU_DISP++, 255, 100, 0, 128); + gSPDisplayList(POLY_XLU_DISP++, sTextureDL); + gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 6, scroll * (-6), 64, 64, 1, scroll * (-6), 0, 64, 64)); - gSPDisplayList(oGfxCtx->polyXlu.p++, sFrustrumDl); + gSPDisplayList(POLY_XLU_DISP++, sFrustrumDl); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_oceff_wipe2.c", 417); } diff --git a/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c b/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c index eb26284df2..ad8f7f94a7 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c +++ b/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c @@ -97,15 +97,15 @@ void OceffWipe3_Draw(Actor* thisx, GlobalContext* globalCtx) { func_800D1FD4(&globalCtx->mf_11DA0); Matrix_Translate(0.0f, 0.0f, -z, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_wipe3.c", 353), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_wipe3.c", 353), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 255, 170, 255); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 100, 200, 0, 128); - gSPDisplayList(oGfxCtx->polyXlu.p++, sTextureDL); - gSPDisplayList(oGfxCtx->polyXlu.p++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 12, scroll * (-12), 64, + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 170, 255); + gDPSetEnvColor(POLY_XLU_DISP++, 100, 200, 0, 128); + gSPDisplayList(POLY_XLU_DISP++, sTextureDL); + gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 12, scroll * (-12), 64, 64, 1, scroll * 8, scroll * (-8), 64, 64)); - gSPDisplayList(oGfxCtx->polyXlu.p++, sFrustrumDl); + gSPDisplayList(POLY_XLU_DISP++, sFrustrumDl); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_oceff_wipe3.c", 370); } diff --git a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c index d3449f812e..027b6bf647 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c +++ b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c @@ -91,19 +91,19 @@ void OceffWipe4_Draw(Actor* thisx, GlobalContext* globalCtx) { func_800D1FD4(&globalCtx->mf_11DA0); Matrix_Translate(0.0f, 0.0f, -z, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_wipe4.c", 324), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_wipe4.c", 324), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (this->actor.params == 1) { - gSPDisplayList(oGfxCtx->polyXlu.p++, sTextureDL1); + gSPDisplayList(POLY_XLU_DISP++, sTextureDL1); } else { - gSPDisplayList(oGfxCtx->polyXlu.p++, sTextureDL0); + gSPDisplayList(POLY_XLU_DISP++, sTextureDL0); } - gSPDisplayList(oGfxCtx->polyXlu.p++, sTextureDL2); - gSPDisplayList(oGfxCtx->polyXlu.p++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 2, scroll * (-2), 32, 64, + gSPDisplayList(POLY_XLU_DISP++, sTextureDL2); + gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 2, scroll * (-2), 32, 64, 1, scroll * (-1), scroll, 32, 32)); - gSPDisplayList(oGfxCtx->polyXlu.p++, sFrustrumDl); + gSPDisplayList(POLY_XLU_DISP++, sFrustrumDl); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_oceff_wipe4.c", 344); } diff --git a/src/overlays/actors/ovl_kaleido_scope/z_kaleido_scope_PAL.c b/src/overlays/actors/ovl_kaleido_scope/z_kaleido_scope_PAL.c index 2e7edd60ff..20b780598f 100644 --- a/src/overlays/actors/ovl_kaleido_scope/z_kaleido_scope_PAL.c +++ b/src/overlays/actors/ovl_kaleido_scope/z_kaleido_scope_PAL.c @@ -50,13 +50,13 @@ void KaleidoScope_Draw(GlobalContext* globalCtx) { pauseCtx->inputX = input->rel.stick_x; pauseCtx->inputY = input->rel.stick_y; - gSPSegment(oGfxCtx->polyOpa.p++, 0x02, interfaceCtx->parameterSegment); - gSPSegment(oGfxCtx->polyOpa.p++, 0x07, pauseCtx->unk_13C); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, pauseCtx->unk_128); - gSPSegment(oGfxCtx->polyOpa.p++, 0x09, pauseCtx->unk_12C); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, pauseCtx->unk_138); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0C, pauseCtx->unk_130); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0D, pauseCtx->unk_134); + gSPSegment(POLY_OPA_DISP++, 0x02, interfaceCtx->parameterSegment); + gSPSegment(POLY_OPA_DISP++, 0x07, pauseCtx->unk_13C); + gSPSegment(POLY_OPA_DISP++, 0x08, pauseCtx->unk_128); + gSPSegment(POLY_OPA_DISP++, 0x09, pauseCtx->unk_12C); + gSPSegment(POLY_OPA_DISP++, 0x0A, pauseCtx->unk_138); + gSPSegment(POLY_OPA_DISP++, 0x0C, pauseCtx->unk_130); + gSPSegment(POLY_OPA_DISP++, 0x0D, pauseCtx->unk_134); if (pauseCtx->flag == 0) { func_80823994(pauseCtx, pauseCtx->eye.x, pauseCtx->eye.y, pauseCtx->eye.z); @@ -65,7 +65,7 @@ void KaleidoScope_Draw(GlobalContext* globalCtx) { func_80820434(globalCtx, globalCtx->state.gfxCtx); func_800949A8(globalCtx->state.gfxCtx); - gDPSetCombineLERP(oGfxCtx->polyOpa.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, + gDPSetCombineLERP(POLY_OPA_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); func_80823994(pauseCtx, 0.0f, 0.0f, 64.0f); diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index 8e3551d890..e0070f1ebc 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -10350,8 +10350,8 @@ void func_8084A0E8(GlobalContext* globalCtx, Player* this, s32 lod, Gfx* cullDLi OPEN_DISPS(globalCtx->state.gfxCtx, "../z_player.c", 19228); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0C, cullDList); - gSPSegment(oGfxCtx->polyXlu.p++, 0x0C, cullDList); + gSPSegment(POLY_OPA_DISP++, 0x0C, cullDList); + gSPSegment(POLY_XLU_DISP++, 0x0C, cullDList); func_8008F470(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, lod, this->currentTunic, this->currentBoots, this->actor.shape.unk_06, overrideLimbDraw, func_80090D20, @@ -10363,7 +10363,7 @@ void func_8084A0E8(GlobalContext* globalCtx, Player* this, s32 lod, Gfx* cullDLi if (this->currentMask == PLAYER_MASK_BUNNY) { Vec3s sp68; - gSPSegment(oGfxCtx->polyOpa.p++, 0x0B, sp70); + gSPSegment(POLY_OPA_DISP++, 0x0B, sp70); sp68.x = D_80858AC8[1] + 0x3E2; sp68.y = D_80858AC8[2] + 0xDBE; @@ -10378,7 +10378,7 @@ void func_8084A0E8(GlobalContext* globalCtx, Player* this, s32 lod, Gfx* cullDLi Matrix_ToMtx(sp70, "../z_player.c", 19279); } - gSPDisplayList(oGfxCtx->polyOpa.p++, D_80854844[this->currentMask - 1]); + gSPDisplayList(POLY_OPA_DISP++, D_80854844[this->currentMask - 1]); } if ((this->currentBoots == PLAYER_BOOTS_HOVER) && !(this->actor.bgCheckFlags & 1) && @@ -10406,14 +10406,14 @@ void func_8084A0E8(GlobalContext* globalCtx, Player* this, s32 lod, Gfx* cullDLi &D_80854864); Matrix_Scale(4.0f, 4.0f, 4.0f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_player.c", 19317), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_player.c", 19317), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 16, 32, 1, 0, (globalCtx->gameplayFrames * -15) % 128, 16, 32)); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x80, 0x80, 255, 255, 255, D_8085486C); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 120, 90, 30, 128); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_04037E30); + gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 255, D_8085486C); + gDPSetEnvColor(POLY_XLU_DISP++, 120, 90, 30, 128); + gSPDisplayList(POLY_XLU_DISP++, D_04037E30); } } @@ -10444,7 +10444,7 @@ void Player_Draw(Actor* thisx, GlobalContext* globalCtx) { if (this->invincibilityTimer > 0) { this->unk_88F += CLAMP(50 - this->invincibilityTimer, 8, 40); - oGfxCtx->polyOpa.p = Gfx_SetFog2(oGfxCtx->polyOpa.p, 255, 0, 0, 0, 0, + POLY_OPA_DISP = Gfx_SetFog2(POLY_OPA_DISP, 255, 0, 0, 0, 0, 4000 - (s32)(Math_Coss(this->unk_88F * 256) * 2000.0f)); } @@ -10485,27 +10485,27 @@ void Player_Draw(Actor* thisx, GlobalContext* globalCtx) { Matrix_Pull(); } - gSPClearGeometryMode(oGfxCtx->polyOpa.p++, G_CULL_BOTH); - gSPClearGeometryMode(oGfxCtx->polyXlu.p++, G_CULL_BOTH); + gSPClearGeometryMode(POLY_OPA_DISP++, G_CULL_BOTH); + gSPClearGeometryMode(POLY_XLU_DISP++, G_CULL_BOTH); func_8084A0E8(globalCtx, this, lod, gCullBackDList, overrideLimbDraw); if (this->invincibilityTimer > 0) { - oGfxCtx->polyOpa.p = func_800BC8A0(globalCtx, oGfxCtx->polyOpa.p); + POLY_OPA_DISP = func_800BC8A0(globalCtx, POLY_OPA_DISP); } if (this->stateFlags2 & 0x4000) { f32 scale = (this->unk_84F >> 1) * 22.0f; - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (0 - globalCtx->gameplayFrames) % 128, 32, 32, 1, 0, (globalCtx->gameplayFrames * -2) % 128, 32, 32)); Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_player.c", 19459), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_player.c", 19459), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 50, 100, 255); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_04033EE0); + gDPSetEnvColor(POLY_XLU_DISP++, 0, 50, 100, 255); + gSPDisplayList(POLY_XLU_DISP++, D_04033EE0); } if (this->unk_862 > 0) { diff --git a/src/overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.c b/src/overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.c index 02d838cb3e..ab9c8fb543 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.c +++ b/src/overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.c @@ -67,15 +67,15 @@ void EffectSsBlast_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { radius = this->rScale * 0.0025f; func_80093D84(globalCtx->state.gfxCtx); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA); + gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA); func_800BFCB8(globalCtx, &mf, &this->pos); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, this->rPrimColorA); Matrix_Put(&mf); Matrix_Scale(radius, radius, radius, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(gfxCtx, "../z_eff_ss_blast.c", 199), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_ss_blast.c", 199), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, this->gfx); + gSPDisplayList(POLY_XLU_DISP++, this->gfx); CLOSE_DISPS(gfxCtx, "../z_eff_ss_blast.c", 204); } diff --git a/src/overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.c b/src/overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.c index 0a25635f9c..03d0707386 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.c +++ b/src/overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.c @@ -65,20 +65,20 @@ void EffectSsBomb_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->mf_11DA0, &mfTrans11DA0); SkinMatrix_MtxFMtxFMult(&mfTrans11DA0, &mfScale, &mfResult); - gSPMatrix(oGfxCtx->polyXlu.p++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult); if (mtx != NULL) { - gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rTexIdx])); - gDPPipeSync(oGfxCtx->polyXlu.p++); + gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rTexIdx])); + gDPPipeSync(POLY_XLU_DISP++); func_80094C50(gfxCtx); color = this->life * 12.75f; - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, color, color, color, color); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gSPDisplayList(oGfxCtx->polyXlu.p++, this->gfx); - gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, color, color, color, color); + gDPPipeSync(POLY_XLU_DISP++); + gSPDisplayList(POLY_XLU_DISP++, this->gfx); + gDPPipeSync(POLY_XLU_DISP++); } CLOSE_DISPS(gfxCtx, "../z_eff_ss_bomb.c", 214); diff --git a/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.c b/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.c index 50df0e4265..06b3e18829 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.c +++ b/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.c @@ -86,13 +86,13 @@ void EffectSsBomb2_DrawFade(GlobalContext* globalCtx, u32 index, EffectSs* this) mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult); if (mtx != NULL) { - gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); func_80094BC4(gfxCtx); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, this->rPrimColorA); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, 0); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(textures[this->rTexIdx])); - gSPDisplayList(oGfxCtx->polyXlu.p++, this->gfx); + gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, 0); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(textures[this->rTexIdx])); + gSPDisplayList(POLY_XLU_DISP++, this->gfx); } if (1) {} @@ -131,18 +131,18 @@ void EffectSsBomb2_DrawLayered(GlobalContext* globalCtx, u32 index, EffectSs* th mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult); if (mtx != NULL) { - gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); mtx2 = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult); if (mtx2 != NULL) { func_80094BC4(gfxCtx); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, this->rPrimColorA); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, 0); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(textures[this->rTexIdx])); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_0400BFE8); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_0400C040); + gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, 0); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(textures[this->rTexIdx])); + gSPDisplayList(POLY_XLU_DISP++, D_0400BFE8); + gSPDisplayList(POLY_XLU_DISP++, D_0400C040); Matrix_MtxToMtxF(mtx2, &mtx2F); Matrix_Put(&mtx2F); @@ -151,9 +151,9 @@ void EffectSsBomb2_DrawLayered(GlobalContext* globalCtx, u32 index, EffectSs* th Matrix_Translate(0.0f, 0.0f, depth, MTXMODE_APPLY); Matrix_RotateZ((this->life * 0.02f) + 180.0f, MTXMODE_APPLY); Matrix_Scale(layer2Scale, layer2Scale, layer2Scale, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_eff_ss_bomb2.c", 448), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_eff_ss_bomb2.c", 448), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_0400C040); + gSPDisplayList(POLY_XLU_DISP++, D_0400C040); layer2Scale -= 0.15f; } } diff --git a/src/overlays/effects/ovl_Effect_Ss_Bubble/z_eff_ss_bubble.c b/src/overlays/effects/ovl_Effect_Ss_Bubble/z_eff_ss_bubble.c index 88b9edd2a6..ad56cb8b72 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Bubble/z_eff_ss_bubble.c +++ b/src/overlays/effects/ovl_Effect_Ss_Bubble/z_eff_ss_bubble.c @@ -49,13 +49,13 @@ void EffectSsBubble_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW); Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(gfxCtx, "../z_eff_ss_bubble.c", 167), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_ss_bubble.c", 167), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); func_80093D18(gfxCtx); - gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, 255, 255, 255, 255); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 150, 150, 150, 0); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, this->gfx); - gSPDisplayList(oGfxCtx->polyOpa.p++, SEGMENTED_TO_VIRTUAL(D_0401A160)); + gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, 255); + gDPSetEnvColor(POLY_OPA_DISP++, 150, 150, 150, 0); + gSPSegment(POLY_OPA_DISP++, 0x08, this->gfx); + gSPDisplayList(POLY_OPA_DISP++, SEGMENTED_TO_VIRTUAL(D_0401A160)); CLOSE_DISPS(gfxCtx, "../z_eff_ss_bubble.c", 179); } diff --git a/src/overlays/effects/ovl_Effect_Ss_D_Fire/z_eff_ss_d_fire.c b/src/overlays/effects/ovl_Effect_Ss_D_Fire/z_eff_ss_d_fire.c index 3ca719a40d..daf253b872 100644 --- a/src/overlays/effects/ovl_Effect_Ss_D_Fire/z_eff_ss_d_fire.c +++ b/src/overlays/effects/ovl_Effect_Ss_D_Fire/z_eff_ss_d_fire.c @@ -76,7 +76,7 @@ void EffectSsDFire_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { if (Object_GetIndex(&globalCtx->objectCtx, OBJECT_DODONGO) > -1) { gSegments[6] = VIRTUAL_TO_PHYSICAL(object); - gSPSegment(oGfxCtx->polyXlu.p++, 0x06, object); + gSPSegment(POLY_XLU_DISP++, 0x06, object); scale = this->rScale / 100.0f; SkinMatrix_SetTranslate(&mfTrans, this->pos.x, this->pos.y, this->pos.z); SkinMatrix_SetScale(&mfScale, scale, scale, 1.0f); @@ -86,14 +86,14 @@ void EffectSsDFire_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult); if (mtx != NULL) { - gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); func_80094BC4(gfxCtx); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 255, 0, 0, 0); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, + gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, this->rPrimColorA); gSegments[6] = VIRTUAL_TO_PHYSICAL(object); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rTexIdx])); - gSPDisplayList(oGfxCtx->polyXlu.p++, this->gfx); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rTexIdx])); + gSPDisplayList(POLY_XLU_DISP++, this->gfx); } } diff --git a/src/overlays/effects/ovl_Effect_Ss_Dead_Db/z_eff_ss_dead_db.c b/src/overlays/effects/ovl_Effect_Ss_Dead_Db/z_eff_ss_dead_db.c index f51cbaede0..06fd3fc9fe 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Dead_Db/z_eff_ss_dead_db.c +++ b/src/overlays/effects/ovl_Effect_Ss_Dead_Db/z_eff_ss_dead_db.c @@ -81,13 +81,13 @@ void EffectSsDeadDb_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult); if (mtx != NULL) { - gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); func_80094BC4(gfxCtx); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, 0); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, + gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, 0); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, this->rPrimColorA); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rTextIdx])); - gSPDisplayList(oGfxCtx->polyXlu.p++, this->gfx); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rTextIdx])); + gSPDisplayList(POLY_XLU_DISP++, this->gfx); } CLOSE_DISPS(gfxCtx, "../z_eff_ss_dead_db.c", 247); diff --git a/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.c b/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.c index 7c518d2904..1148bf09f2 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.c +++ b/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.c @@ -109,14 +109,14 @@ void EffectSsDeadDd_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { if (mtx != NULL) { func_80094BC4(gfxCtx); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, this->rAlpha); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rAlpha); - gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPMatrix(oGfxCtx->polyXlu.p++, &D_01000000, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); - gDPSetCombineLERP(oGfxCtx->polyXlu.p++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, + gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rAlpha); + gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(POLY_XLU_DISP++, &D_01000000, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); + gDPSetCombineLERP(POLY_XLU_DISP++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_04037730); + gSPDisplayList(POLY_XLU_DISP++, D_04037730); } CLOSE_DISPS(gfxCtx, "../z_eff_ss_dead_dd.c", 259); diff --git a/src/overlays/effects/ovl_Effect_Ss_Dead_Ds/z_eff_ss_dead_ds.c b/src/overlays/effects/ovl_Effect_Ss_Dead_Ds/z_eff_ss_dead_ds.c index c7bf7d1bf7..f61bebc1f6 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Dead_Ds/z_eff_ss_dead_ds.c +++ b/src/overlays/effects/ovl_Effect_Ss_Dead_Ds/z_eff_ss_dead_ds.c @@ -60,8 +60,8 @@ void EffectSsDeadDs_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { scale = this->rScale * 0.01f; func_80094BC4(globalCtx->state.gfxCtx); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 0, 0, 0, this->rAlpha); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 0, 0, 0); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 0, 0, 0, this->rAlpha); + gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, 0); pos = this->pos; if (this->rTimer == 0) { @@ -100,11 +100,11 @@ void EffectSsDeadDs_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { Matrix_RotateRPY(this->rRoll, this->rPitch, this->rYaw, MTXMODE_APPLY); Matrix_RotateX(1.57f, MTXMODE_APPLY); Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_eff_ss_dead_ds.c", 246), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_eff_ss_dead_ds.c", 246), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetCombineLERP(oGfxCtx->polyXlu.p++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, + gDPSetCombineLERP(POLY_XLU_DISP++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_04037730); + gSPDisplayList(POLY_XLU_DISP++, D_04037730); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead_ds.c", 255); } diff --git a/src/overlays/effects/ovl_Effect_Ss_Dt_Bubble/z_eff_ss_dt_bubble.c b/src/overlays/effects/ovl_Effect_Ss_Dt_Bubble/z_eff_ss_dt_bubble.c index fb4946774b..e044635384 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Dt_Bubble/z_eff_ss_dt_bubble.c +++ b/src/overlays/effects/ovl_Effect_Ss_Dt_Bubble/z_eff_ss_dt_bubble.c @@ -84,15 +84,15 @@ void EffectSsDtBubble_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) scale = this->rScale * 0.004f; Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW); Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(gfxCtx, "../z_eff_ss_dt_bubble.c", 213), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_ss_dt_bubble.c", 213), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); func_80093C14(gfxCtx); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, (this->rPrimColorA * this->life) / this->rLifespan); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, + gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, (this->rEnvColorA * this->life) / this->rLifespan); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, this->gfx); - gSPDisplayList(oGfxCtx->polyXlu.p++, SEGMENTED_TO_VIRTUAL(D_0401A160)); + gSPSegment(POLY_XLU_DISP++, 0x08, this->gfx); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(D_0401A160)); CLOSE_DISPS(gfxCtx, "../z_eff_ss_dt_bubble.c", 236); } diff --git a/src/overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.c b/src/overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.c index 20a442dc64..aad1dd137e 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.c +++ b/src/overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.c @@ -98,33 +98,33 @@ void EffectSsDust_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { SkinMatrix_SetScale(&mfScale, scale, scale, 1.0f); SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->mf_11DA0, &mfTrans11DA0); SkinMatrix_MtxFMtxFMult(&mfTrans11DA0, &mfScale, &mfResult); - gSPMatrix(oGfxCtx->polyXlu.p++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult); if (mtx != NULL) { - gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rTexIdx])); - oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 0); - gDPPipeSync(oGfxCtx->polyXlu.p++); + gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gDPPipeSync(POLY_XLU_DISP++); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rTexIdx])); + POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0); + gDPPipeSync(POLY_XLU_DISP++); if (this->rDrawFlags & 1) { - gDPSetCombineLERP(oGfxCtx->polyXlu.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, + gDPSetCombineLERP(POLY_XLU_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0, COMBINED, 0, SHADE, 0, 0, 0, 0, COMBINED); - gDPSetRenderMode(oGfxCtx->polyXlu.p++, G_RM_FOG_SHADE_A, G_RM_ZB_CLD_SURF2); - gSPSetGeometryMode(oGfxCtx->polyXlu.p++, G_FOG | G_LIGHTING); + gDPSetRenderMode(POLY_XLU_DISP++, G_RM_FOG_SHADE_A, G_RM_ZB_CLD_SURF2); + gSPSetGeometryMode(POLY_XLU_DISP++, G_FOG | G_LIGHTING); } else if (this->rDrawFlags & 2) { - gDPSetRenderMode(oGfxCtx->polyXlu.p++, G_RM_PASS, G_RM_ZB_CLD_SURF2); - gSPClearGeometryMode(oGfxCtx->polyXlu.p++, G_FOG | G_LIGHTING); + gDPSetRenderMode(POLY_XLU_DISP++, G_RM_PASS, G_RM_ZB_CLD_SURF2); + gSPClearGeometryMode(POLY_XLU_DISP++, G_FOG | G_LIGHTING); } else { - gSPClearGeometryMode(oGfxCtx->polyXlu.p++, G_LIGHTING); + gSPClearGeometryMode(POLY_XLU_DISP++, G_LIGHTING); } - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, 255); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA); - gSPDisplayList(oGfxCtx->polyXlu.p++, this->gfx); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, 255); + gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA); + gSPDisplayList(POLY_XLU_DISP++, this->gfx); } CLOSE_DISPS(gfxCtx, "../z_eff_ss_dust.c", 389); diff --git a/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.c b/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.c index b5713057d6..89bcf1a35d 100644 --- a/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.c +++ b/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.c @@ -80,7 +80,7 @@ void EffectSsEnFire_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { scale = Math_Sins(this->life * 0x333) * (this->rScale * 0.00005f); Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_eff_en_fire.c", 180), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_eff_en_fire.c", 180), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); redGreen = this->life - 5; @@ -90,16 +90,16 @@ void EffectSsEnFire_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { } func_80093D84(globalCtx->state.gfxCtx); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, redGreen * 12.7f, 0, 0, 0); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x0, 0x80, redGreen * 12.7f, redGreen * 12.7f, 0, 255); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gDPSetEnvColor(POLY_XLU_DISP++, redGreen * 12.7f, 0, 0, 0); + gDPSetPrimColor(POLY_XLU_DISP++, 0x0, 0x80, redGreen * 12.7f, redGreen * 12.7f, 0, 255); + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, (this->rScroll * -0x14) & 0x1FF, 0x20, 0x80)); if (((this->rFlags & 0x7FFF) != 0) || (this->life < 18)) { - gSPDisplayList(oGfxCtx->polyXlu.p++, D_0404D5A0); + gSPDisplayList(POLY_XLU_DISP++, D_0404D5A0); } else { - gSPDisplayList(oGfxCtx->polyXlu.p++, D_0404D4E0); + gSPDisplayList(POLY_XLU_DISP++, D_0404D4E0); } CLOSE_DISPS(gfxCtx, "../z_eff_en_fire.c", 213); diff --git a/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.c b/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.c index 96efce864b..8bc45ff012 100644 --- a/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.c +++ b/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.c @@ -114,7 +114,7 @@ void EffectSsEnIce_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); Matrix_RotateY(this->rYaw * 0.0000958738f, MTXMODE_APPLY); Matrix_RotateX(this->rPitch * 0.0000958738f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(gfxCtx, "../z_eff_en_ice.c", 261), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_en_ice.c", 261), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); hiliteLightDir.x = 89.8f; @@ -123,13 +123,13 @@ void EffectSsEnIce_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { func_80093D84(globalCtx->state.gfxCtx); func_8002EB44(&this->pos, &globalCtx->view.eye, &hiliteLightDir, globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, gameplayFrames & 0xFF, 0x20, 0x10, 1, 0, (gameplayFrames * 2) & 0xFF, 0x40, 0x20)); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0x80, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, this->rPrimColorA); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, (u32)alpha); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_04033818); + gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, (u32)alpha); + gSPDisplayList(POLY_XLU_DISP++, D_04033818); CLOSE_DISPS(gfxCtx, "../z_eff_en_ice.c", 294); } diff --git a/src/overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.c b/src/overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.c index 6700549c94..24e0a84170 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.c +++ b/src/overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.c @@ -63,15 +63,15 @@ void EffectSsExtra_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_extra.c", 168); gSegments[6] = VIRTUAL_TO_PHYSICAL(object); - gSPSegment(oGfxCtx->polyXlu.p++, 0x06, object); + gSPSegment(POLY_XLU_DISP++, 0x06, object); Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW); Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); func_80093D84(globalCtx->state.gfxCtx); func_800D1FD4(&globalCtx->mf_11DA0); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_eff_ss_extra.c", 186), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_eff_ss_extra.c", 186), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rScoreIdx])); - gSPDisplayList(oGfxCtx->polyXlu.p++, SEGMENTED_TO_VIRTUAL(D_06000DC0)); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rScoreIdx])); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(D_06000DC0)); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_extra.c", 194); } diff --git a/src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.c b/src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.c index 023702c69e..59b7f97d3f 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.c +++ b/src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.c @@ -59,15 +59,15 @@ void EffectSsFcircle_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW); Matrix_Scale(xzScale, yScale, xzScale, MTXMODE_APPLY); Matrix_RotateY(this->rYaw * 0.0000958738f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(gfxCtx, "../z_eff_fcircle.c", 163), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_fcircle.c", 163), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, globalCtx->gameplayFrames % 128, 0, 32, 64, 1, 0, ((globalCtx->gameplayFrames) * -0xF) % 256, 32, 64)); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x80, 0x80, 255, 220, 0, (this->life * 12.75f)); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 255, 0, 0, 0); - gSPDisplayList(oGfxCtx->polyXlu.p++, this->gfx); + gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 220, 0, (this->life * 12.75f)); + gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0); + gSPDisplayList(POLY_XLU_DISP++, this->gfx); CLOSE_DISPS(gfxCtx, "../z_eff_fcircle.c", 186); } diff --git a/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.c b/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.c index 7c81621502..2d0ab28433 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.c +++ b/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.c @@ -98,16 +98,16 @@ void EffectSsFhgFlash_DrawLightBall(GlobalContext* globalCtx, u32 index, EffectS Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, 0); Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); gSegments[6] = VIRTUAL_TO_PHYSICAL(object); - gSPSegment(oGfxCtx->polyXlu.p++, 0x06, object); + gSPSegment(POLY_XLU_DISP++, 0x06, object); func_80093D84(globalCtx->state.gfxCtx); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 255, 255, this->rAlpha); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, sColors[this->rParam].r, sColors[this->rParam].g, sColors[this->rParam].b, 0); - gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, this->rAlpha); + gDPSetEnvColor(POLY_XLU_DISP++, sColors[this->rParam].r, sColors[this->rParam].g, sColors[this->rParam].b, 0); + gDPPipeSync(POLY_XLU_DISP++); func_800D1FD4(&globalCtx->mf_11DA0); Matrix_RotateZ((this->rXZRot / 32768.0f) * 3.1416f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(gfxCtx, "../z_eff_fhg_flash.c", 326), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_fhg_flash.c", 326), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, this->gfx); + gSPDisplayList(POLY_XLU_DISP++, this->gfx); CLOSE_DISPS(gfxCtx, "../z_eff_fhg_flash.c", 330); } @@ -127,20 +127,20 @@ void EffectSsFhgFlash_DrawShock(GlobalContext* globalCtx, u32 index, EffectSs* t if (this->rParam != FHGFLASH_SHOCK_NO_ACTOR) { func_80094044(globalCtx->state.gfxCtx); Matrix_RotateX((this->rXZRot / 32768.0f) * 1.1416f, MTXMODE_APPLY); - gDPSetRenderMode(oGfxCtx->polyXlu.p++, G_RM_PASS, G_RM_AA_ZB_XLU_DECAL2); + gDPSetRenderMode(POLY_XLU_DISP++, G_RM_PASS, G_RM_AA_ZB_XLU_DECAL2); } else { func_80093D84(globalCtx->state.gfxCtx); func_800D1FD4(&globalCtx->mf_11DA0); - gDPSetRenderMode(oGfxCtx->polyXlu.p++, G_RM_PASS, G_RM_AA_ZB_XLU_SURF2); + gDPSetRenderMode(POLY_XLU_DISP++, G_RM_PASS, G_RM_AA_ZB_XLU_SURF2); } - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 255, 255, this->rAlpha); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 255, 155, 0); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, this->rAlpha); + gDPSetEnvColor(POLY_XLU_DISP++, 0, 255, 155, 0); Matrix_RotateZ((this->rXZRot / 32768.0f) * 3.1416f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(gfxCtx, "../z_eff_fhg_flash.c", 395), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_fhg_flash.c", 395), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, this->gfx); + gSPDisplayList(POLY_XLU_DISP++, this->gfx); CLOSE_DISPS(gfxCtx, "../z_eff_fhg_flash.c", 399); } diff --git a/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.c b/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.c index fe1d8222db..08d8765583 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.c +++ b/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.c @@ -119,19 +119,19 @@ void EffectSsFireTail_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) Matrix_Scale(1.0f, temp1, 1.0f / temp1, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_eff_fire_tail.c", 238), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_eff_fire_tail.c", 238), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); func_80093D84(globalCtx->state.gfxCtx); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0x80, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, 255); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, 0); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, 255); + gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, 0); + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, (globalCtx->state.frames * -0x14) & 0x1FF, 32, 128)); if (this->rType != 0) { - gSPDisplayList(oGfxCtx->polyXlu.p++, D_0404D5A0); + gSPDisplayList(POLY_XLU_DISP++, D_0404D5A0); } else { - gSPDisplayList(oGfxCtx->polyXlu.p++, D_0404D4E0); + gSPDisplayList(POLY_XLU_DISP++, D_0404D4E0); } CLOSE_DISPS(gfxCtx, "../z_eff_fire_tail.c", 273); diff --git a/src/overlays/effects/ovl_Effect_Ss_G_Magma2/z_eff_ss_g_magma2.c b/src/overlays/effects/ovl_Effect_Ss_G_Magma2/z_eff_ss_g_magma2.c index e1b769f37c..af3b10294c 100644 --- a/src/overlays/effects/ovl_Effect_Ss_G_Magma2/z_eff_ss_g_magma2.c +++ b/src/overlays/effects/ovl_Effect_Ss_G_Magma2/z_eff_ss_g_magma2.c @@ -83,20 +83,20 @@ void EffectSsGMagma2_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW); Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); gSegments[6] = VIRTUAL_TO_PHYSICAL(object); - gSPSegment(oGfxCtx->polyXlu.p++, 0x06, object); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(gfxCtx, "../z_eff_ss_g_magma2.c", 282), + gSPSegment(POLY_XLU_DISP++, 0x06, object); + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_ss_g_magma2.c", 282), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (this->rDrawMode == 0) { - oGfxCtx->polyXlu.p = Gfx_CallSetupDL(gfxCtx->polyXlu.p, 0x3D); + POLY_XLU_DISP = Gfx_CallSetupDL(gfxCtx->polyXlu.p, 0x3D); } else { - oGfxCtx->polyXlu.p = Gfx_CallSetupDL(gfxCtx->polyXlu.p, 0); + POLY_XLU_DISP = Gfx_CallSetupDL(gfxCtx->polyXlu.p, 0); } - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, this->rPrimColorR, this->rPrimColorG, 0, this->rPrimColorA); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, this->rEnvColorR, this->rEnvColorG, 0, this->rEnvColorA); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rTexIdx])); - gSPDisplayList(oGfxCtx->polyXlu.p++, this->gfx); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, 0, this->rPrimColorA); + gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, 0, this->rEnvColorA); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rTexIdx])); + gSPDisplayList(POLY_XLU_DISP++, this->gfx); CLOSE_DISPS(gfxCtx, "../z_eff_ss_g_magma2.c", 311); } diff --git a/src/overlays/effects/ovl_Effect_Ss_G_Ripple/z_eff_ss_g_ripple.c b/src/overlays/effects/ovl_Effect_Ss_G_Ripple/z_eff_ss_g_ripple.c index 82db2da224..5836daf7c2 100644 --- a/src/overlays/effects/ovl_Effect_Ss_G_Ripple/z_eff_ss_g_ripple.c +++ b/src/overlays/effects/ovl_Effect_Ss_G_Ripple/z_eff_ss_g_ripple.c @@ -90,14 +90,14 @@ void EffectSsGRipple_DrawRipple(GlobalContext* globalCtx, EffectSs* this, UNK_PT mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult); if (mtx != NULL) { - gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); func_80094BC4(gfxCtx); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, this->rPrimColorA); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA); - gDPSetAlphaDither(oGfxCtx->polyXlu.p++, G_AD_NOISE); - gDPSetColorDither(oGfxCtx->polyXlu.p++, G_CD_NOISE); - gSPDisplayList(oGfxCtx->polyXlu.p++, this->gfx); + gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA); + gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_NOISE); + gDPSetColorDither(POLY_XLU_DISP++, G_CD_NOISE); + gSPDisplayList(POLY_XLU_DISP++, this->gfx); } CLOSE_DISPS(gfxCtx, "../z_eff_ss_g_ripple.c", 247); diff --git a/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c b/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c index 50e9035d51..5af3a96934 100644 --- a/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c +++ b/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c @@ -94,12 +94,12 @@ void EffectSsGSpk_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult); if (mtx != NULL) { - gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rTexIdx])); + gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rTexIdx])); func_80094BC4(gfxCtx); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, 255); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA); - gSPDisplayList(oGfxCtx->polyXlu.p++, this->gfx); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, 255); + gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA); + gSPDisplayList(POLY_XLU_DISP++, this->gfx); } if (1) {} diff --git a/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.c b/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.c index 1f69376fe1..5be471fb30 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.c +++ b/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.c @@ -76,17 +76,17 @@ void EffectSsHahen_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { OPEN_DISPS(gfxCtx, "../z_eff_hahen.c", 208); if (this->rObjId != -1) { - gSPSegment(oGfxCtx->polyOpa.p++, 0x06, globalCtx->objectCtx.status[this->rObjBankIdx].segment); + gSPSegment(POLY_OPA_DISP++, 0x06, globalCtx->objectCtx.status[this->rObjBankIdx].segment); } Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW); Matrix_RotateY(this->rYaw * 0.01f, MTXMODE_APPLY); Matrix_RotateX(this->rPitch * 0.01f, MTXMODE_APPLY); Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(gfxCtx, "../z_eff_hahen.c", 228), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_hahen.c", 228), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); func_80093D18(globalCtx->state.gfxCtx); - gSPDisplayList(oGfxCtx->polyOpa.p++, this->gfx); + gSPDisplayList(POLY_OPA_DISP++, this->gfx); CLOSE_DISPS(gfxCtx, "../z_eff_hahen.c", 236); } @@ -100,20 +100,20 @@ void EffectSsHahen_DrawGray(GlobalContext* globalCtx, u32 index, EffectSs* this) OPEN_DISPS(gfxCtx, "../z_eff_hahen.c", 253); if (this->rObjId != -1) { - gSPSegment(oGfxCtx->polyOpa.p++, 0x06, globalCtx->objectCtx.status[this->rObjBankIdx].segment); + gSPSegment(POLY_OPA_DISP++, 0x06, globalCtx->objectCtx.status[this->rObjBankIdx].segment); } Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW); Matrix_RotateY(this->rYaw * 0.01f, MTXMODE_APPLY); Matrix_RotateX(this->rPitch * 0.01f, MTXMODE_APPLY); Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(gfxCtx, "../z_eff_hahen.c", 271), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_hahen.c", 271), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); func_80093D18(globalCtx->state.gfxCtx); - gDPSetCombineLERP(oGfxCtx->polyOpa.p++, SHADE, 0, PRIMITIVE, 0, SHADE, 0, PRIMITIVE, 0, SHADE, 0, PRIMITIVE, 0, + gDPSetCombineLERP(POLY_OPA_DISP++, SHADE, 0, PRIMITIVE, 0, SHADE, 0, PRIMITIVE, 0, SHADE, 0, PRIMITIVE, 0, SHADE, 0, PRIMITIVE, 0); - gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0x0, 0x01, 100, 100, 120, 255); - gSPDisplayList(oGfxCtx->polyOpa.p++, this->gfx); + gDPSetPrimColor(POLY_OPA_DISP++, 0x0, 0x01, 100, 100, 120, 255); + gSPDisplayList(POLY_OPA_DISP++, this->gfx); CLOSE_DISPS(gfxCtx, "../z_eff_hahen.c", 288); } diff --git a/src/overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.c b/src/overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.c index 3e5cebd09f..c6dac726f2 100644 --- a/src/overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.c +++ b/src/overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.c @@ -83,17 +83,17 @@ void EffectSsHitMark_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { SkinMatrix_SetScale(&mfScale, scale, scale, 1.0f); SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->mf_11DA0, &mfTrans11DA0); SkinMatrix_MtxFMtxFMult(&mfTrans11DA0, &mfScale, &mfResult); - gSPMatrix(oGfxCtx->polyXlu.p++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult); if (mtx != NULL) { - gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[(this->rType * 8) + (this->rTexIdx)])); + gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[(this->rType * 8) + (this->rTexIdx)])); func_80094C50(gfxCtx); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, 255); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, 0); - gSPDisplayList(oGfxCtx->polyXlu.p++, this->gfx); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, 255); + gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, 0); + gSPDisplayList(POLY_XLU_DISP++, this->gfx); } CLOSE_DISPS(gfxCtx, "../z_eff_ss_hitmark.c", 341); } diff --git a/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.c b/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.c index d3b69f287e..c863949a57 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.c +++ b/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.c @@ -66,15 +66,15 @@ void EffectSsIcePiece_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); Matrix_RotateY(this->rYaw * 0.0000958738f, MTXMODE_APPLY); Matrix_RotateX(this->rPitch * 0.0000958738f, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(gfxCtx, "../z_eff_ice_piece.c", 185), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_ice_piece.c", 185), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); func_80093D84(globalCtx->state.gfxCtx); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 50, 100, (s32)alpha & 0xFF); + gDPSetEnvColor(POLY_XLU_DISP++, 0, 50, 100, (s32)alpha & 0xFF); func_8003435C(&this->pos, globalCtx); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (1 * frames) % 256, 0x20, 0x10, 1, 0, (2 * frames) % 256, 0x40, 0x20)); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_04033720); + gSPDisplayList(POLY_XLU_DISP++, D_04033720); CLOSE_DISPS(gfxCtx, "../z_eff_ice_piece.c", 209); } diff --git a/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/z_eff_ss_ice_smoke.c b/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/z_eff_ss_ice_smoke.c index e2bf275a6f..8f20bc8073 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/z_eff_ss_ice_smoke.c +++ b/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/z_eff_ss_ice_smoke.c @@ -66,15 +66,15 @@ void EffectSsIceSmoke_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) objBankIdx = Object_GetIndex(&globalCtx->objectCtx, OBJECT_FZ); if ((objBankIdx > -1) && Object_IsLoaded(&globalCtx->objectCtx, objBankIdx)) { - gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPPipeSync(POLY_XLU_DISP++); func_80093D84(globalCtx->state.gfxCtx); gSegments[6] = VIRTUAL_TO_PHYSICAL(object); - gSPSegment(oGfxCtx->polyXlu.p++, 0x06, object); - gSPDisplayList(oGfxCtx->polyXlu.p++, SEGMENTED_TO_VIRTUAL(D_060030A0)); - gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 195, 235, 235, this->rAlpha); + gSPSegment(POLY_XLU_DISP++, 0x06, object); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(D_060030A0)); + gDPPipeSync(POLY_XLU_DISP++); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 195, 235, 235, this->rAlpha); gSPSegment( - oGfxCtx->polyXlu.p++, 0x08, + POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, this->life * 3, this->life * 15, 32, 64, 1, 0, 0, 32, 32)); Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW); func_800D1FD4(&globalCtx->mf_11DA0); @@ -84,8 +84,8 @@ void EffectSsIceSmoke_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) mtx = Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_eff_ss_ice_smoke.c", 196); if (mtx != NULL) { - gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, SEGMENTED_TO_VIRTUAL(D_06003158)); + gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(D_06003158)); } } else { this->life = -1; diff --git a/src/overlays/effects/ovl_Effect_Ss_K_Fire/z_eff_ss_k_fire.c b/src/overlays/effects/ovl_Effect_Ss_K_Fire/z_eff_ss_k_fire.c index bafc33b8bd..b5fbb7fd05 100644 --- a/src/overlays/effects/ovl_Effect_Ss_K_Fire/z_eff_ss_k_fire.c +++ b/src/overlays/effects/ovl_Effect_Ss_K_Fire/z_eff_ss_k_fire.c @@ -55,30 +55,30 @@ void EffectSsKFire_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW); Matrix_Scale(xzScale, yScale, xzScale, MTXMODE_APPLY); func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, globalCtx->state.frames * this->rScroll, 0x20, 0x80)); if (this->rType >= 100) { - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x80, 0x80, 255, 255, 0, this->rAlpha); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 255, 10, 0, 0); + gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 0, this->rAlpha); + gDPSetEnvColor(POLY_XLU_DISP++, 255, 10, 0, 0); } else { - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x80, 0x80, 255, 255, 255, this->rAlpha); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 255, 255, 0); + gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 255, this->rAlpha); + gDPSetEnvColor(POLY_XLU_DISP++, 0, 255, 255, 0); } if (1) {} - gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPPipeSync(POLY_XLU_DISP++); func_800D1FD4(&globalCtx->mf_11DA0); if ((index & 1) != 0) { Matrix_RotateY(M_PI, MTXMODE_APPLY); } - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_eff_k_fire.c", 215), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_eff_k_fire.c", 215), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_0404D4E0); + gSPDisplayList(POLY_XLU_DISP++, D_0404D4E0); CLOSE_DISPS(gfxCtx, "../z_eff_k_fire.c", 220); } diff --git a/src/overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.c b/src/overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.c index b82e71b404..881d7ec15c 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.c +++ b/src/overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.c @@ -100,9 +100,9 @@ void EffectSsKakera_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { if (this->rObjId != KAKERA_OBJECT_DEFAULT) { if ((((this->rReg4 >> 7) & 1) << 7) == 0x80) { - gSPSegment(oGfxCtx->polyXlu.p++, 0x06, globalCtx->objectCtx.status[this->rObjBankIdx].segment); + gSPSegment(POLY_XLU_DISP++, 0x06, globalCtx->objectCtx.status[this->rObjBankIdx].segment); } else { - gSPSegment(oGfxCtx->polyOpa.p++, 0x06, globalCtx->objectCtx.status[this->rObjBankIdx].segment); + gSPSegment(POLY_OPA_DISP++, 0x06, globalCtx->objectCtx.status[this->rObjBankIdx].segment); } } @@ -112,27 +112,27 @@ void EffectSsKakera_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); if ((((this->rReg4 >> 7) & 1) << 7) == 0x80) { - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(gfxCtx, "../z_eff_kakera.c", 268), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_kakera.c", 268), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); func_80093D84(globalCtx->state.gfxCtx); if (colorIdx >= 0) { - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, colors[colorIdx].r, colors[colorIdx].g, colors[colorIdx].b, + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, colors[colorIdx].r, colors[colorIdx].g, colors[colorIdx].b, 255); } - gSPDisplayList(oGfxCtx->polyXlu.p++, this->gfx); + gSPDisplayList(POLY_XLU_DISP++, this->gfx); } else { - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(gfxCtx, "../z_eff_kakera.c", 286), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_kakera.c", 286), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); func_80093D18(globalCtx->state.gfxCtx); if (colorIdx >= 0) { - gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, colors[colorIdx].r, colors[colorIdx].g, colors[colorIdx].b, + gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, colors[colorIdx].r, colors[colorIdx].g, colors[colorIdx].b, 255); } - gSPDisplayList(oGfxCtx->polyOpa.p++, this->gfx); + gSPDisplayList(POLY_OPA_DISP++, this->gfx); } CLOSE_DISPS(gfxCtx, "../z_eff_kakera.c", 302); diff --git a/src/overlays/effects/ovl_Effect_Ss_KiraKira/z_eff_ss_kirakira.c b/src/overlays/effects/ovl_Effect_Ss_KiraKira/z_eff_ss_kirakira.c index 6458987b1f..d0cb0971e2 100644 --- a/src/overlays/effects/ovl_Effect_Ss_KiraKira/z_eff_ss_kirakira.c +++ b/src/overlays/effects/ovl_Effect_Ss_KiraKira/z_eff_ss_kirakira.c @@ -98,17 +98,17 @@ void EffectSsKiraKira_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->mf_11DA0, &mfTrans11DA0); SkinMatrix_MtxFMtxFMult(&mfTrans11DA0, &mfRotY, &mfTrans11DA0RotY); SkinMatrix_MtxFMtxFMult(&mfTrans11DA0RotY, &mfScale, &mfResult); - gSPMatrix(oGfxCtx->polyXlu.p++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult); if (mtx != NULL) { - gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); func_80093C14(gfxCtx); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x80, 0x80, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, + gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, (((s8)((55.0f / this->rLifespan) * this->life) + 200))); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA); - gSPDisplayList(oGfxCtx->polyXlu.p++, this->gfx); + gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA); + gSPDisplayList(POLY_XLU_DISP++, this->gfx); } CLOSE_DISPS(gfxCtx, "../z_eff_ss_kirakira.c", 301); diff --git a/src/overlays/effects/ovl_Effect_Ss_Lightning/z_eff_ss_lightning.c b/src/overlays/effects/ovl_Effect_Ss_Lightning/z_eff_ss_lightning.c index 573857d672..69daf2ac58 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Lightning/z_eff_ss_lightning.c +++ b/src/overlays/effects/ovl_Effect_Ss_Lightning/z_eff_ss_lightning.c @@ -101,18 +101,18 @@ void EffectSsLightning_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) SkinMatrix_MtxFMtxFMult(&mfTrans11DA0, &mfRotate, &mfTrans11DA0Rotate); SkinMatrix_MtxFMtxFMult(&mfTrans11DA0Rotate, &mfScale, &mfResult); - gSPMatrix(oGfxCtx->polyXlu.p++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult); if (mtx != NULL) { - gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); func_80094C50(gfxCtx); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[texIdx])); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[texIdx])); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, this->rPrimColorA); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA); - gSPDisplayList(oGfxCtx->polyXlu.p++, this->gfx); + gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA); + gSPDisplayList(POLY_XLU_DISP++, this->gfx); } CLOSE_DISPS(gfxCtx, "../z_eff_ss_lightning.c", 281); diff --git a/src/overlays/effects/ovl_Effect_Ss_Sibuki/z_eff_ss_sibuki.c b/src/overlays/effects/ovl_Effect_Ss_Sibuki/z_eff_ss_sibuki.c index e9370732ec..163a341b89 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Sibuki/z_eff_ss_sibuki.c +++ b/src/overlays/effects/ovl_Effect_Ss_Sibuki/z_eff_ss_sibuki.c @@ -70,14 +70,14 @@ void EffectSsSibuki_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW); Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(gfxCtx, "../z_eff_ss_sibuki.c", 176), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_ss_sibuki.c", 176), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); func_80093D18(gfxCtx); - gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, + gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, this->rPrimColorA); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA); - gSPSegment(oGfxCtx->polyOpa.p++, 0x08, this->gfx); - gSPDisplayList(oGfxCtx->polyOpa.p++, SEGMENTED_TO_VIRTUAL(D_0401A160)); + gDPSetEnvColor(POLY_OPA_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA); + gSPSegment(POLY_OPA_DISP++, 0x08, this->gfx); + gSPDisplayList(POLY_OPA_DISP++, SEGMENTED_TO_VIRTUAL(D_0401A160)); CLOSE_DISPS(gfxCtx, "../z_eff_ss_sibuki.c", 198); } diff --git a/src/overlays/effects/ovl_Effect_Ss_Sibuki2/z_eff_ss_sibuki2.c b/src/overlays/effects/ovl_Effect_Ss_Sibuki2/z_eff_ss_sibuki2.c index a3bba3b6af..d7d75eb806 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Sibuki2/z_eff_ss_sibuki2.c +++ b/src/overlays/effects/ovl_Effect_Ss_Sibuki2/z_eff_ss_sibuki2.c @@ -63,14 +63,14 @@ void EffectSsSibuki2_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW); Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(gfxCtx, "../z_eff_ss_sibuki2.c", 171), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_ss_sibuki2.c", 171), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); func_80093D18(gfxCtx); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, this->rPrimColorA); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rTexIdx])); - gSPDisplayList(oGfxCtx->polyXlu.p++, SEGMENTED_TO_VIRTUAL(D_0401E2C0)); + gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rTexIdx])); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(D_0401E2C0)); CLOSE_DISPS(gfxCtx, "../z_eff_ss_sibuki2.c", 198); } diff --git a/src/overlays/effects/ovl_Effect_Ss_Stick/z_eff_ss_stick.c b/src/overlays/effects/ovl_Effect_Ss_Stick/z_eff_ss_stick.c index 137768b36f..dc17cdfbef 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Stick/z_eff_ss_stick.c +++ b/src/overlays/effects/ovl_Effect_Ss_Stick/z_eff_ss_stick.c @@ -62,12 +62,12 @@ void EffectSsStick_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { Matrix_RotateRPY(0, this->rYaw, globalCtx->state.frames * 10000, MTXMODE_APPLY); } - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(gfxCtx, "../z_eff_ss_stick.c", 176), + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_ss_stick.c", 176), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); func_80093D18(gfxCtx); - gSPSegment(oGfxCtx->polyOpa.p++, 0x06, globalCtx->objectCtx.status[this->rObjBankIdx].segment); - gSPSegment(oGfxCtx->polyOpa.p++, 0x0C, gCullBackDList); - gSPDisplayList(oGfxCtx->polyOpa.p++, this->gfx); + gSPSegment(POLY_OPA_DISP++, 0x06, globalCtx->objectCtx.status[this->rObjBankIdx].segment); + gSPSegment(POLY_OPA_DISP++, 0x0C, gCullBackDList); + gSPDisplayList(POLY_OPA_DISP++, this->gfx); CLOSE_DISPS(gfxCtx, "../z_eff_ss_stick.c", 188); } diff --git a/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.c b/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.c index 91d9c491b9..62c4e6836f 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.c +++ b/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.c @@ -63,14 +63,14 @@ void EffectSsStone1_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { scale = (mfW < 1500.0f) ? 3.0f : (mfW / 1500.0f) * 3.0f; Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW); Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(gfxCtx, "../z_eff_ss_stone1.c", 168), + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_ss_stone1.c", 168), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); func_80094C50(gfxCtx); - gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(drawParams->texture)); - gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, drawParams->primColor.r, drawParams->primColor.g, + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(drawParams->texture)); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, drawParams->primColor.r, drawParams->primColor.g, drawParams->primColor.b, 255); - gDPSetEnvColor(oGfxCtx->polyXlu.p++, drawParams->envColor.r, drawParams->envColor.g, drawParams->envColor.b, 255); - gSPDisplayList(oGfxCtx->polyXlu.p++, D_04029E90); + gDPSetEnvColor(POLY_XLU_DISP++, drawParams->envColor.r, drawParams->envColor.g, drawParams->envColor.b, 255); + gSPDisplayList(POLY_XLU_DISP++, D_04029E90); CLOSE_DISPS(gfxCtx, "../z_eff_ss_stone1.c", 183); } diff --git a/src/overlays/gamestates/ovl_select/z_select.c b/src/overlays/gamestates/ovl_select/z_select.c index 6e34499cb8..1ac0a799d8 100644 --- a/src/overlays/gamestates/ovl_select/z_select.c +++ b/src/overlays/gamestates/ovl_select/z_select.c @@ -509,18 +509,18 @@ void Select_DrawMenu(SelectContext* this) { OPEN_DISPS(gfxCtx, "../z_select.c", 930); - gSPSegment(oGfxCtx->polyOpa.p++, 0x00, NULL); + gSPSegment(POLY_OPA_DISP++, 0x00, NULL); func_80095248(gfxCtx, 0, 0, 0); SET_FULLSCREEN_VIEWPORT(&this->view); func_800AAA50(&this->view, 0xF); func_80094140(gfxCtx); printer = alloca(sizeof(GfxPrint)); GfxPrint_Init(printer); - GfxPrint_Open(printer, oGfxCtx->polyOpa.p); + GfxPrint_Open(printer, POLY_OPA_DISP); Select_PrintMenu(this, printer); Select_PrintAgeSetting(this, printer, ((void)0, gSaveContext.linkAge)); Select_PrintCutsceneSetting(this, printer, ((void)0, gSaveContext.cutsceneIndex)); - oGfxCtx->polyOpa.p = GfxPrint_Close(printer); + POLY_OPA_DISP = GfxPrint_Close(printer); GfxPrint_Destroy(printer); CLOSE_DISPS(gfxCtx, "../z_select.c", 966); @@ -532,16 +532,16 @@ void Select_DrawLoadingScreen(SelectContext* this) { OPEN_DISPS(gfxCtx, "../z_select.c", 977); - gSPSegment(oGfxCtx->polyOpa.p++, 0x00, NULL); + gSPSegment(POLY_OPA_DISP++, 0x00, NULL); func_80095248(gfxCtx, 0, 0, 0); SET_FULLSCREEN_VIEWPORT(&this->view); func_800AAA50(&this->view, 0xF); func_80094140(gfxCtx); printer = alloca(sizeof(GfxPrint)); GfxPrint_Init(printer); - GfxPrint_Open(printer, oGfxCtx->polyOpa.p); + GfxPrint_Open(printer, POLY_OPA_DISP); Select_PrintLoadingMessage(this, printer); - oGfxCtx->polyOpa.p = GfxPrint_Close(printer); + POLY_OPA_DISP = GfxPrint_Close(printer); GfxPrint_Destroy(printer); CLOSE_DISPS(gfxCtx, "../z_select.c", 1006); @@ -552,7 +552,7 @@ void Select_Draw(SelectContext* this) { OPEN_DISPS(gfxCtx, "../z_select.c", 1013); - gSPSegment(oGfxCtx->polyOpa.p++, 0x00, NULL); + gSPSegment(POLY_OPA_DISP++, 0x00, NULL); func_80095248(gfxCtx, 0, 0, 0); SET_FULLSCREEN_VIEWPORT(&this->view); func_800AAA50(&this->view, 0xF); diff --git a/src/overlays/gamestates/ovl_title/z_title.c b/src/overlays/gamestates/ovl_title/z_title.c index d93d4b343f..8a1c6ddfca 100644 --- a/src/overlays/gamestates/ovl_title/z_title.c +++ b/src/overlays/gamestates/ovl_title/z_title.c @@ -86,34 +86,34 @@ void Title_Draw(TitleContext* this) { v2.z = 1119.0837; func_8002EABC(&v1, &v2, &v3, this->state.gfxCtx); - gSPSetLights1(oGfxCtx->polyOpa.p++, sTitleLights); + gSPSetLights1(POLY_OPA_DISP++, sTitleLights); Title_SetupView(this, 0, 150.0, 300.0); func_80093D18(this->state.gfxCtx); Matrix_Translate(-53.0, -5.0, 0, MTXMODE_NEW); Matrix_Scale(1.0, 1.0, 1.0, MTXMODE_APPLY); Matrix_RotateRPY(0, sTitleRotY, 0, MTXMODE_APPLY); - gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(this->state.gfxCtx, "../z_title.c", 424), G_MTX_LOAD); - gSPDisplayList(oGfxCtx->polyOpa.p++, &D_01002720); + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(this->state.gfxCtx, "../z_title.c", 424), G_MTX_LOAD); + gSPDisplayList(POLY_OPA_DISP++, &D_01002720); func_800944C4(this->state.gfxCtx); - gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetCycleType(oGfxCtx->polyOpa.p++, G_CYC_2CYCLE); - gDPSetRenderMode(oGfxCtx->polyOpa.p++, G_RM_XLU_SURF2, G_RM_OPA_CI | CVG_DST_WRAP); - gDPSetCombineLERP(oGfxCtx->polyOpa.p++, TEXEL1, PRIMITIVE, ENV_ALPHA, TEXEL0, 0, 0, 0, TEXEL0, PRIMITIVE, + gDPPipeSync(POLY_OPA_DISP++); + gDPSetCycleType(POLY_OPA_DISP++, G_CYC_2CYCLE); + gDPSetRenderMode(POLY_OPA_DISP++, G_RM_XLU_SURF2, G_RM_OPA_CI | CVG_DST_WRAP); + gDPSetCombineLERP(POLY_OPA_DISP++, TEXEL1, PRIMITIVE, ENV_ALPHA, TEXEL0, 0, 0, 0, TEXEL0, PRIMITIVE, ENVIRONMENT, COMBINED, ENVIRONMENT, COMBINED, 0, PRIMITIVE, 0); - gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, 170, 255, 255, 255); - gDPSetEnvColor(oGfxCtx->polyOpa.p++, 0, 0, 255, 128); + gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 170, 255, 255, 255); + gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 255, 128); - gDPLoadMultiBlock(oGfxCtx->polyOpa.p++, &D_01001800, 0x100, 1, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0, + gDPLoadMultiBlock(POLY_OPA_DISP++, &D_01001800, 0x100, 1, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, 2, 11); for (idx = 0, y = 94; idx < 16; idx++, y += 2) { - gDPLoadTextureBlock(oGfxCtx->polyOpa.p++, &D_01000000[0x180 * idx], G_IM_FMT_I, G_IM_SIZ_8b, 192, 2, 0, + gDPLoadTextureBlock(POLY_OPA_DISP++, &D_01000000[0x180 * idx], G_IM_FMT_I, G_IM_SIZ_8b, 192, 2, 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); - gDPSetTileSize(oGfxCtx->polyOpa.p++, 1, this->uls, (this->ult & 0x7F) - idx * 4, 0, 0); - gSPTextureRectangle(oGfxCtx->polyOpa.p++, 388, y << 2, 1156, (y + 2) << 2, G_TX_RENDERTILE, 0, 0, 1024, 1024); + gDPSetTileSize(POLY_OPA_DISP++, 1, this->uls, (this->ult & 0x7F) - idx * 4, 0, 0); + gSPTextureRectangle(POLY_OPA_DISP++, 388, y << 2, 1156, (y + 2) << 2, G_TX_RENDERTILE, 0, 0, 1024, 1024); } func_8007672C(this->state.gfxCtx, 0, 0, 0, (s16)this->coverAlpha, 2); @@ -128,18 +128,18 @@ void Title_Main(GameState* thisx) { OPEN_DISPS(this->state.gfxCtx, "../z_title.c", 494); - gSPSegment(oGfxCtx->polyOpa.p++, 0, NULL); - gSPSegment(oGfxCtx->polyOpa.p++, 1, this->staticSegment); + gSPSegment(POLY_OPA_DISP++, 0, NULL); + gSPSegment(POLY_OPA_DISP++, 1, this->staticSegment); func_80095248(this->state.gfxCtx, 0, 0, 0); Title_Calc(this); Title_Draw(this); if (D_8012DBC0) { - Gfx* gfx = oGfxCtx->polyOpa.p; + Gfx* gfx = POLY_OPA_DISP; s32 pad; Title_PrintBuildInfo(&gfx); - oGfxCtx->polyOpa.p = gfx; + POLY_OPA_DISP = gfx; } if (this->exit) {