diff options
| author | fig02 <fig02srl@gmail.com> | 2020-10-29 17:31:09 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-29 17:31:09 -0400 |
| commit | 3c5fe66dcd45cd5cb100c02196021d8d13341991 (patch) | |
| tree | 8de26c4588a0d2e41661fb381a1d1796d6b9bd49 /src/code | |
| parent | 92bb1fb21006189ced43ab28753a12adc9aa21fc (diff) | |
Use macros for oGfxCtx accesses (#465)
* fix colliderinit typo
* fix initchain
* reloc
* add defines
* add defines
* missed some on merge
* rename gfxCtx and add comment
* remove space
Diffstat (limited to 'src/code')
34 files changed, 1298 insertions, 1298 deletions
diff --git a/src/code/flg_set.c b/src/code/flg_set.c index 44707957a..a2bef505a 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 bafc50469..ce0d91c9e 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 3ba23f9ff..9d568068c 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 b1ee055a3..1dc6d5495 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 24176a48f..ab3123788 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 eb9ecfa53..d611c08d2 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 0ee403868..91137e190 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 571bb8240..e802e9b8e 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 23f257b3e..944203ffb 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 885a4674f..c9ab4a2bf 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), - 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]); + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1218), + G_MTX_MODELVIEW | G_MTX_LOAD); + 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 3624a2c9f..ecc0290c4 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 a68c76561..43e73f6c9 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 6d4ef51cc..7be59e286 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 a6eeabeb8..9b5a552cb 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 806ee878a..c987ab8f6 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 34ca02864..c23701d19 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 f94a453d3..1ae9c71c4 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 e5aa09dd9..c868525aa 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 63c535008..b0c9db619 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 2f6c06a62..b140d8d57 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 68e68e0f3..c9259e8da 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 c8e447f64..30752f531 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 42f5704bc..3180c9377 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 ea5ce52a9..66e790bc8 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 e9d964f7e..87caa61b5 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 e5a87bb78..ff187883c 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 985b1d3f2..0a4ed75fb 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 7af688f2e..241b1596c 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 a95989013..2a18f9b9c 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 65e3cee20..4adf07ba6 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 0ddb3ca5b..ac3e24235 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 a890c9a7f..441dcef53 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 5807cc0fb..99666b3b8 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 f08feaf92..90b7b2d9b 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); } |
