diff options
| author | Garrett Cox <garrettjcox@gmail.com> | 2022-11-29 17:29:36 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-30 00:29:36 +0100 |
| commit | 3cb9f93ff47fa1483de997d667c0f7b8318cd081 (patch) | |
| tree | 754c27405935ec97fdbacadb342c4bdb939eeea1 /soh/src/code | |
| parent | d7c35221421bf712b5ead56a360f81f624aca4bc (diff) | |
[docs] Pull upstream updates: SetupDL (#2048)
Diffstat (limited to 'soh/src/code')
| -rw-r--r-- | soh/src/code/z_actor.c | 18 | ||||
| -rw-r--r-- | soh/src/code/z_cheap_proc.c | 4 | ||||
| -rw-r--r-- | soh/src/code/z_debug_display.c | 4 | ||||
| -rw-r--r-- | soh/src/code/z_draw.c | 84 | ||||
| -rw-r--r-- | soh/src/code/z_eff_blure.c | 8 | ||||
| -rw-r--r-- | soh/src/code/z_eff_shield_particle.c | 2 | ||||
| -rw-r--r-- | soh/src/code/z_eff_spark.c | 2 | ||||
| -rw-r--r-- | soh/src/code/z_effect_soft_sprite_old_init.c | 2 | ||||
| -rw-r--r-- | soh/src/code/z_en_a_keep.c | 2 | ||||
| -rw-r--r-- | soh/src/code/z_en_item00.c | 10 | ||||
| -rw-r--r-- | soh/src/code/z_kankyo.c | 24 | ||||
| -rw-r--r-- | soh/src/code/z_lifemeter.c | 8 | ||||
| -rw-r--r-- | soh/src/code/z_map_exp.c | 8 | ||||
| -rw-r--r-- | soh/src/code/z_message_PAL.c | 6 | ||||
| -rw-r--r-- | soh/src/code/z_parameter.c | 14 | ||||
| -rw-r--r-- | soh/src/code/z_play.c | 2 | ||||
| -rw-r--r-- | soh/src/code/z_player_lib.c | 2 | ||||
| -rw-r--r-- | soh/src/code/z_prenmi.c | 4 | ||||
| -rw-r--r-- | soh/src/code/z_rcp.c | 459 | ||||
| -rw-r--r-- | soh/src/code/z_room.c | 12 | ||||
| -rw-r--r-- | soh/src/code/z_sample.c | 4 | ||||
| -rw-r--r-- | soh/src/code/z_vr_box_draw.c | 2 |
22 files changed, 349 insertions, 332 deletions
diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c index cc475f1c5..2e17eeacc 100644 --- a/soh/src/code/z_actor.c +++ b/soh/src/code/z_actor.c @@ -95,7 +95,7 @@ void ActorShadow_Draw(Actor* actor, Lights* lights, PlayState* play, Gfx* dlist, if (temp1 >= -50.0f && temp1 < 500.0f) { OPEN_DISPS(play->state.gfxCtx); - POLY_OPA_DISP = Gfx_CallSetupDL(POLY_OPA_DISP, 0x2C); + POLY_OPA_DISP = Gfx_SetupDL(POLY_OPA_DISP, 0x2C); gDPSetCombineLERP(POLY_OPA_DISP++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, COMBINED, 0, 0, 0, COMBINED); @@ -202,7 +202,7 @@ void ActorShadow_DrawFeet(Actor* actor, Lights* lights, PlayState* play) { OPEN_DISPS(play->state.gfxCtx); - POLY_OPA_DISP = Gfx_CallSetupDL(POLY_OPA_DISP, 0x2C); + POLY_OPA_DISP = Gfx_SetupDL(POLY_OPA_DISP, 0x2C); actor->shape.feetFloorFlags = 0; @@ -465,7 +465,7 @@ void func_8002C124(TargetContext* targetCtx, PlayState* play) { func_8002BE64(targetCtx, targetCtx->unk_4C, spBC.x, spBC.y, spBC.z); if ((!(player->stateFlags1 & 0x40)) || (actor != player->unk_664)) { - OVERLAY_DISP = Gfx_CallSetupDL(OVERLAY_DISP, 0x39); + OVERLAY_DISP = Gfx_SetupDL(OVERLAY_DISP, 0x39); for (spB0 = 0, spAC = targetCtx->unk_4C; spB0 < spB8; spB0++, spAC = (spAC + 1) % 3) { entry = &targetCtx->arr_50[spAC]; @@ -509,7 +509,7 @@ void func_8002C124(TargetContext* targetCtx, PlayState* play) { FrameInterpolation_RecordOpenChild(actor, 1); NaviColor* naviColor = &sNaviColorList[actor->category]; - POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x7); + POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, 0x7); Matrix_Translate(actor->focus.pos.x, actor->focus.pos.y + (actor->targetArrowOffset * actor->scale.y) + 17.0f, actor->focus.pos.z, MTXMODE_NEW); @@ -1105,7 +1105,7 @@ void TitleCard_Draw(PlayState* play, TitleCardContext* titleCtx) { } // WORLD_OVERLAY_DISP Goes over POLY_XLU_DISP but under POLY_KAL_DISP - WORLD_OVERLAY_DISP = func_80093808(WORLD_OVERLAY_DISP); + WORLD_OVERLAY_DISP = Gfx_SetupDL_52NoCD(WORLD_OVERLAY_DISP); gDPSetPrimColor(WORLD_OVERLAY_DISP++, 0, 0, (u8)titleCtx->intensityR, (u8)titleCtx->intensityG, (u8)titleCtx->intensityB, (u8)titleCtx->alpha); @@ -2384,7 +2384,7 @@ void Actor_DrawFaroresWindPointer(PlayState* play) { (((void)0, gSaveContext.respawn[RESPAWN_MODE_TOP].roomIndex) == play->roomCtx.curRoom.num)) { f32 scale = 0.025f * ratio; - POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x19); + POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, 0x19); Matrix_Translate(((void)0, gSaveContext.respawn[RESPAWN_MODE_TOP].pos.x), ((void)0, gSaveContext.respawn[RESPAWN_MODE_TOP].pos.y) + yOffset, @@ -3969,7 +3969,7 @@ void func_80033C30(Vec3f* arg0, Vec3f* arg1, u8 alpha, PlayState* play) { OPEN_DISPS(play->state.gfxCtx); - POLY_OPA_DISP = Gfx_CallSetupDL(POLY_OPA_DISP, 0x2C); + POLY_OPA_DISP = Gfx_SetupDL(POLY_OPA_DISP, 0x2C); gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0, alpha); @@ -4344,7 +4344,7 @@ void func_80034BA0(PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overr PostLimbDraw postLimbDraw, Actor* actor, s16 alpha) { OPEN_DISPS(play->state.gfxCtx); - func_80093D18(play->state.gfxCtx); + Gfx_SetupDL_25Opa(play->state.gfxCtx); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, alpha); @@ -4361,7 +4361,7 @@ void func_80034CC4(PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overr PostLimbDraw postLimbDraw, Actor* actor, s16 alpha) { OPEN_DISPS(play->state.gfxCtx); - func_80093D84(play->state.gfxCtx); + Gfx_SetupDL_25Xlu(play->state.gfxCtx); gDPPipeSync(POLY_XLU_DISP++); gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, alpha); diff --git a/soh/src/code/z_cheap_proc.c b/soh/src/code/z_cheap_proc.c index 73afef668..a5d0a8bc9 100644 --- a/soh/src/code/z_cheap_proc.c +++ b/soh/src/code/z_cheap_proc.c @@ -3,7 +3,7 @@ void Gfx_DrawDListOpa(PlayState* play, Gfx* dlist) { OPEN_DISPS(play->state.gfxCtx); - func_80093D18(play->state.gfxCtx); + Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_OPA_DISP++, dlist); @@ -14,7 +14,7 @@ void Gfx_DrawDListOpa(PlayState* play, Gfx* dlist) { void Gfx_DrawDListXlu(PlayState* play, Gfx* dlist) { OPEN_DISPS(play->state.gfxCtx); - func_80093D84(play->state.gfxCtx); + Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_XLU_DISP++, dlist); diff --git a/soh/src/code/z_debug_display.c b/soh/src/code/z_debug_display.c index 48cca9149..e6f3764c8 100644 --- a/soh/src/code/z_debug_display.c +++ b/soh/src/code/z_debug_display.c @@ -69,7 +69,7 @@ void DebugDisplay_DrawObjects(PlayState* play) { void DebugDisplay_DrawSpriteI8(DebugDispObject* dispObj, void* texture, PlayState* play) { OPEN_DISPS(play->state.gfxCtx); - func_80094678(play->state.gfxCtx); + Gfx_SetupDL_47Xlu(play->state.gfxCtx); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, dispObj->color.r, dispObj->color.g, dispObj->color.b, dispObj->color.a); @@ -91,7 +91,7 @@ void DebugDisplay_DrawSpriteI8(DebugDispObject* dispObj, void* texture, PlayStat void DebugDisplay_DrawPolygon(DebugDispObject* dispObj, void* dlist, PlayState* play) { OPEN_DISPS(play->state.gfxCtx); - func_8009435C(play->state.gfxCtx); + Gfx_SetupDL_4Xlu(play->state.gfxCtx); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, dispObj->color.r, dispObj->color.g, dispObj->color.b, dispObj->color.a); diff --git a/soh/src/code/z_draw.c b/soh/src/code/z_draw.c index bae750100..9a2de4b46 100644 --- a/soh/src/code/z_draw.c +++ b/soh/src/code/z_draw.c @@ -484,13 +484,13 @@ void GetItem_DrawJewel(PlayState* play, s16 drawId) { gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_demo_effect.c", 2599), G_MTX_NOPUSH | G_MTX_LOAD); - func_80093D84(play->state.gfxCtx); + Gfx_SetupDL_25Xlu(play->state.gfxCtx); // func_8002ED80(&this->actor, play, 0); gDPSetPrimColor(POLY_XLU_DISP++, 0, 128, primXluColor[0], primXluColor[1], primXluColor[2], 255); gDPSetEnvColor(POLY_XLU_DISP++, envXluColor[0], envXluColor[1], envXluColor[2], 255); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]); - func_80093D18(play->state.gfxCtx); + Gfx_SetupDL_25Opa(play->state.gfxCtx); // func_8002EBCC(&this->actor, play, 0); gDPSetPrimColor(POLY_OPA_DISP++, 0, 128, primOpaColor[0], primOpaColor[1], primOpaColor[2], 255); gDPSetEnvColor(POLY_OPA_DISP++, envOpaColor[0], envOpaColor[1], envOpaColor[2], 255); @@ -506,7 +506,7 @@ void GetItem_DrawMaskOrBombchu(PlayState* play, s16 drawId) { OPEN_DISPS(play->state.gfxCtx); - func_80093BA8(play->state.gfxCtx); + Gfx_SetupDL_26Opa(play->state.gfxCtx); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); @@ -519,7 +519,7 @@ void GetItem_DrawSoldOut(PlayState* play, s16 drawId) { OPEN_DISPS(play->state.gfxCtx); - POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 5); + POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, 5); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]); @@ -532,12 +532,12 @@ void GetItem_DrawBlueFire(PlayState* play, s16 drawId) { OPEN_DISPS(play->state.gfxCtx); - func_80093D18(play->state.gfxCtx); + Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); - func_80093D84(play->state.gfxCtx); + Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0), 0 * (play->state.frames * 0), 16, 32, 1, 1 * (play->state.frames * 1), @@ -558,12 +558,12 @@ void GetItem_DrawPoes(PlayState* play, s16 drawId) { OPEN_DISPS(play->state.gfxCtx); - func_80093D18(play->state.gfxCtx); + Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); - func_80093D84(play->state.gfxCtx); + Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]); @@ -587,12 +587,12 @@ void GetItem_DrawFairy(PlayState* play, s16 drawId) { OPEN_DISPS(play->state.gfxCtx); - func_80093D18(play->state.gfxCtx); + Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); - func_80093D84(play->state.gfxCtx); + Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]); @@ -615,7 +615,7 @@ void GetItem_DrawMirrorShield(PlayState* play, s16 drawId) { OPEN_DISPS(play->state.gfxCtx); - func_80093D18(play->state.gfxCtx); + Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0) % 256, 1 * (play->state.frames * 2) % 256, 64, 64, 1, @@ -625,7 +625,7 @@ void GetItem_DrawMirrorShield(PlayState* play, s16 drawId) { G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); - func_80093D84(play->state.gfxCtx); + Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]); @@ -638,12 +638,12 @@ void GetItem_DrawSkullToken(PlayState* play, s16 drawId) { OPEN_DISPS(play->state.gfxCtx); - func_80093D18(play->state.gfxCtx); + Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); - func_80093D84(play->state.gfxCtx); + Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0), 1 * -(play->state.frames * 5), 32, 32, 1, 0 * (play->state.frames * 0), @@ -660,7 +660,7 @@ void GetItem_DrawEggOrMedallion(PlayState* play, s16 drawId) { OPEN_DISPS(play->state.gfxCtx); - func_80093BA8(play->state.gfxCtx); + Gfx_SetupDL_26Opa(play->state.gfxCtx); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); @@ -674,12 +674,12 @@ void GetItem_DrawCompass(PlayState* play, s16 drawId) { OPEN_DISPS(play->state.gfxCtx); - func_80093D18(play->state.gfxCtx); + Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); - POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 5); + POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, 5); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]); @@ -692,7 +692,7 @@ void GetItem_DrawPotion(PlayState* play, s16 drawId) { OPEN_DISPS(play->state.gfxCtx); - func_80093D18(play->state.gfxCtx); + Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TwoTexScroll(play->state.gfxCtx, 0, -1 * (play->state.frames * 1), 1 * (play->state.frames * 1), 32, 32, 1, -1 * (play->state.frames * 1), @@ -704,7 +704,7 @@ void GetItem_DrawPotion(PlayState* play, s16 drawId) { gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[2]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[3]); - func_80093D84(play->state.gfxCtx); + Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[4]); @@ -718,7 +718,7 @@ void GetItem_DrawGoronSword(PlayState* play, s16 drawId) { OPEN_DISPS(play->state.gfxCtx); - func_80093D18(play->state.gfxCtx); + Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 1), 0 * (play->state.frames * 1), 32, 32, 1, 0 * (play->state.frames * 1), @@ -735,7 +735,7 @@ void GetItem_DrawDekuNuts(PlayState* play, s16 drawId) { OPEN_DISPS(play->state.gfxCtx); - func_80093D18(play->state.gfxCtx); + Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 6), 1 * (play->state.frames * 6), 32, 32, 1, 1 * (play->state.frames * 6), @@ -752,7 +752,7 @@ void GetItem_DrawRecoveryHeart(PlayState* play, s16 drawId) { OPEN_DISPS(play->state.gfxCtx); - func_80093D84(play->state.gfxCtx); + Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 1), 1 * -(play->state.frames * 3), 32, 32, 1, 0 * (play->state.frames * 1), @@ -769,7 +769,7 @@ void GetItem_DrawFish(PlayState* play, s16 drawId) { OPEN_DISPS(play->state.gfxCtx); - func_80093D84(play->state.gfxCtx); + Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0), 1 * (play->state.frames * 1), 32, 32, 1, 0 * (play->state.frames * 0), @@ -786,7 +786,7 @@ void GetItem_DrawOpa0(PlayState* play, s16 drawId) { OPEN_DISPS(play->state.gfxCtx); - func_80093D18(play->state.gfxCtx); + Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); @@ -799,12 +799,12 @@ void GetItem_DrawOpa0Xlu1(PlayState* play, s16 drawId) { OPEN_DISPS(play->state.gfxCtx); - func_80093D18(play->state.gfxCtx); + Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); - func_80093D84(play->state.gfxCtx); + Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]); @@ -830,7 +830,7 @@ void GetItem_DrawGenericMusicNote(PlayState* play, s16 drawId) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, __FILE__, __LINE__), G_MTX_MODELVIEW | G_MTX_LOAD); gDPSetGrayscaleColor(POLY_XLU_DISP++, colors[color_slot][0], colors[color_slot][1], colors[color_slot][2], 255); gSPGrayscale(POLY_XLU_DISP++, true); - func_80093D18(play->state.gfxCtx); + Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]); gSPGrayscale(POLY_XLU_DISP++, false); @@ -842,7 +842,7 @@ void GetItem_DrawXlu01(PlayState* play, s16 drawId) { OPEN_DISPS(play->state.gfxCtx); - func_80093D84(play->state.gfxCtx); + Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]); @@ -856,13 +856,13 @@ void GetItem_DrawOpa10Xlu2(PlayState* play, s16 drawId) { OPEN_DISPS(play->state.gfxCtx); - func_80093D18(play->state.gfxCtx); + Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); - func_80093D84(play->state.gfxCtx); + Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]); @@ -875,12 +875,12 @@ void GetItem_DrawMagicArrow(PlayState* play, s16 drawId) { OPEN_DISPS(play->state.gfxCtx); - func_80093D18(play->state.gfxCtx); + Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); - func_80093D84(play->state.gfxCtx); + Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]); @@ -894,7 +894,7 @@ void GetItem_DrawMagicSpell(PlayState* play, s16 drawId) { OPEN_DISPS(play->state.gfxCtx); - func_80093D84(play->state.gfxCtx); + Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 2), 1 * -(play->state.frames * 6), 32, 32, 1, 1 * (play->state.frames * 1), @@ -913,7 +913,7 @@ void GetItem_DrawOpa1023(PlayState* play, s16 drawId) { OPEN_DISPS(play->state.gfxCtx); - func_80093D18(play->state.gfxCtx); + Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]); @@ -929,13 +929,13 @@ void GetItem_DrawOpa10Xlu32(PlayState* play, s16 drawId) { OPEN_DISPS(play->state.gfxCtx); - func_80093D18(play->state.gfxCtx); + Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); - func_80093D84(play->state.gfxCtx); + Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[3]); @@ -951,13 +951,13 @@ void GetItem_DrawSmallRupee(PlayState* play, s16 drawId) { Matrix_Scale(0.7f, 0.7f, 0.7f, MTXMODE_APPLY); - func_80093D18(play->state.gfxCtx); + Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); - func_80093D84(play->state.gfxCtx); + Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[3]); @@ -971,7 +971,7 @@ void GetItem_DrawScale(PlayState* play, s16 drawId) { OPEN_DISPS(play->state.gfxCtx); - func_80093D84(play->state.gfxCtx); + Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 2), -1 * (play->state.frames * 2), 64, 64, 1, 1 * (play->state.frames * 4), @@ -991,13 +991,13 @@ void GetItem_DrawBulletBag(PlayState* play, s16 drawId) { OPEN_DISPS(play->state.gfxCtx); - func_80093D18(play->state.gfxCtx); + Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); - func_80093D84(play->state.gfxCtx); + Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]); @@ -1012,7 +1012,7 @@ void GetItem_DrawWallet(PlayState* play, s16 drawId) { OPEN_DISPS(play->state.gfxCtx); - func_80093D18(play->state.gfxCtx); + Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]); diff --git a/soh/src/code/z_eff_blure.c b/soh/src/code/z_eff_blure.c index 440b0bbd0..8bccb04c9 100644 --- a/soh/src/code/z_eff_blure.c +++ b/soh/src/code/z_eff_blure.c @@ -589,7 +589,7 @@ void EffectBlure_GetComputedValues(EffectBlure* this, s32 index, f32 ratio, Vec3 void EffectBlure_SetupSmooth(EffectBlure* this, GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x26); + POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, 0x26); CLOSE_DISPS(gfxCtx); } @@ -923,7 +923,7 @@ void EffectBlure_DrawSmooth(EffectBlure* this2, GraphicsContext* gfxCtx) { void EffectBlure_SetupSimple(GraphicsContext* gfxCtx, EffectBlure* this, Vtx* vtx) { OPEN_DISPS(gfxCtx); - POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x26); + POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, 0x26); CLOSE_DISPS(gfxCtx); } @@ -932,7 +932,7 @@ void EffectBlure_SetupSimpleAlt(GraphicsContext* gfxCtx, EffectBlure* this, Vtx* OPEN_DISPS(gfxCtx); gDPPipeSync(POLY_XLU_DISP++); - POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x26); + POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, 0x26); gDPSetCycleType(POLY_XLU_DISP++, G_CYC_2CYCLE); gDPSetTextureLUT(POLY_XLU_DISP++, G_TT_NONE); @@ -1162,7 +1162,7 @@ void EffectBlure_Draw(void* thisx, GraphicsContext* gfxCtx) { if (this->numElements != 0) { if (this->flags == 0) { - func_800942F0(gfxCtx); + Gfx_SetupDL_38Xlu(gfxCtx); gDPPipeSync(POLY_XLU_DISP++); vtx = Graph_Alloc(gfxCtx, sizeof(Vtx[32])); diff --git a/soh/src/code/z_eff_shield_particle.c b/soh/src/code/z_eff_shield_particle.c index 43934f4e0..ecc3099f5 100644 --- a/soh/src/code/z_eff_shield_particle.c +++ b/soh/src/code/z_eff_shield_particle.c @@ -160,7 +160,7 @@ void EffectShieldParticle_Draw(void* thisx, GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); if (this != NULL) { - POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x26); + POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, 0x26); gDPSetCycleType(POLY_XLU_DISP++, G_CYC_2CYCLE); gDPPipeSync(POLY_XLU_DISP++); diff --git a/soh/src/code/z_eff_spark.c b/soh/src/code/z_eff_spark.c index c96bffa55..67c9575c9 100644 --- a/soh/src/code/z_eff_spark.c +++ b/soh/src/code/z_eff_spark.c @@ -161,7 +161,7 @@ void EffectSpark_Draw(void* thisx, GraphicsContext* gfxCtx) { if (this != NULL) { gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x26); + POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, 0x26); gDPSetCycleType(POLY_XLU_DISP++, G_CYC_2CYCLE); gDPPipeSync(POLY_XLU_DISP++); diff --git a/soh/src/code/z_effect_soft_sprite_old_init.c b/soh/src/code/z_effect_soft_sprite_old_init.c index 965e3a1f9..7b740bbcd 100644 --- a/soh/src/code/z_effect_soft_sprite_old_init.c +++ b/soh/src/code/z_effect_soft_sprite_old_init.c @@ -66,7 +66,7 @@ void EffectSs_DrawGEffect(PlayState* play, EffectSs* this, void* texture) { if (mtx != NULL) { 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); + Gfx_SetupDL_61Xlu(gfxCtx); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rgPrimColorR, this->rgPrimColorG, this->rgPrimColorB, this->rgPrimColorA); gDPSetEnvColor(POLY_XLU_DISP++, this->rgEnvColorR, this->rgEnvColorG, this->rgEnvColorB, this->rgEnvColorA); diff --git a/soh/src/code/z_en_a_keep.c b/soh/src/code/z_en_a_keep.c index d340422ca..abdc07ecc 100644 --- a/soh/src/code/z_en_a_keep.c +++ b/soh/src/code/z_en_a_keep.c @@ -349,7 +349,7 @@ void EnAObj_Draw(Actor* thisx, PlayState* play) { OPEN_DISPS(play->state.gfxCtx); - func_80093D18(play->state.gfxCtx); + Gfx_SetupDL_25Opa(play->state.gfxCtx); if (type >= A_OBJ_MAX) { type = A_OBJ_BOULDER_FRAGMENT; diff --git a/soh/src/code/z_en_item00.c b/soh/src/code/z_en_item00.c index 8bdf4e3a6..cbc8f7607 100644 --- a/soh/src/code/z_en_item00.c +++ b/soh/src/code/z_en_item00.c @@ -1363,7 +1363,7 @@ void EnItem00_DrawRupee(EnItem00* this, PlayState* play) { OPEN_DISPS(play->state.gfxCtx); - func_80093D18(play->state.gfxCtx); + Gfx_SetupDL_25Opa(play->state.gfxCtx); func_8002EBCC(&this->actor, play, 0); if (this->actor.params <= ITEM00_RUPEE_RED) { @@ -1407,7 +1407,7 @@ void EnItem00_DrawCollectible(EnItem00* this, PlayState* play) { texIndex -= 3; } - POLY_OPA_DISP = func_800946E4(POLY_OPA_DISP); + POLY_OPA_DISP = Gfx_SetupDL_66(POLY_OPA_DISP); gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sItemDropTex[texIndex])); @@ -1427,13 +1427,13 @@ void EnItem00_DrawHeartContainer(EnItem00* this, PlayState* play) { OPEN_DISPS(play->state.gfxCtx); - func_80093D18(play->state.gfxCtx); + Gfx_SetupDL_25Opa(play->state.gfxCtx); func_8002EBCC(&this->actor, play, 0); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_OPA_DISP++, gHeartPieceExteriorDL); - func_80093D84(play->state.gfxCtx); + Gfx_SetupDL_25Xlu(play->state.gfxCtx); func_8002ED80(&this->actor, play, 0); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); @@ -1456,7 +1456,7 @@ void EnItem00_DrawHeartPiece(EnItem00* this, PlayState* play) { OPEN_DISPS(play->state.gfxCtx); - func_80093D84(play->state.gfxCtx); + Gfx_SetupDL_25Xlu(play->state.gfxCtx); func_8002ED80(&this->actor, play, 0); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); diff --git a/soh/src/code/z_kankyo.c b/soh/src/code/z_kankyo.c index 37e7e2c67..48bc922e3 100644 --- a/soh/src/code/z_kankyo.c +++ b/soh/src/code/z_kankyo.c @@ -1350,7 +1350,7 @@ void Environment_DrawSunAndMoon(PlayState* play) { scale = (color * 2.0f) + 10.0f; Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_LOAD); - func_80093AD0(play->state.gfxCtx); + Gfx_SetupDL_54Opa(play->state.gfxCtx); static Vtx vertices[] = { VTX(-31, -31, 0, 0, 0, 255, 255, 255, 255), @@ -1388,7 +1388,7 @@ void Environment_DrawSunAndMoon(PlayState* play) { if (alpha > 0.0f) { gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_LOAD); - func_8009398C(play->state.gfxCtx); + Gfx_SetupDL_51Opa(play->state.gfxCtx); gDPPipeSync(POLY_OPA_DISP++); gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 240, 255, 180, alpha); gDPSetEnvColor(POLY_OPA_DISP++, 80, 70, 20, alpha); @@ -1581,7 +1581,7 @@ void Environment_DrawLensFlare(PlayState* play, EnvironmentContext* envCtx, View if (screenFillAlpha != 0) { if (alphaScale > 0.0f) { - POLY_XLU_DISP = func_800937C0(POLY_XLU_DISP); + POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP); alpha = colorIntensity / 10.0f; alpha = CLAMP_MAX(alpha, 1.0f); @@ -1664,7 +1664,7 @@ void Environment_DrawRain(PlayState* play, View* view, GraphicsContext* gfxCtx) if (play->envCtx.unk_EE[1]) { gDPPipeSync(POLY_XLU_DISP++); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 150, 255, 255, 30); - POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 20); + POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, 20); } // draw rain drops @@ -1708,7 +1708,7 @@ void Environment_DrawRain(PlayState* play, View* view, GraphicsContext* gfxCtx) FrameInterpolation_RecordOpenChild("Droplet Ring", i); if (!firstDone) { - func_80093D84(gfxCtx); + Gfx_SetupDL_25Xlu(gfxCtx); gDPSetEnvColor(POLY_XLU_DISP++, 155, 155, 155, 0); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 120); firstDone++; @@ -1768,7 +1768,7 @@ void Environment_DrawSkyboxFilters(PlayState* play) { OPEN_DISPS(play->state.gfxCtx); - func_800938B4(play->state.gfxCtx); + Gfx_SetupDL_57Opa(play->state.gfxCtx); alpha = (1000 - play->lightCtx.fogNear) * 0.02f; @@ -1790,7 +1790,7 @@ void Environment_DrawSkyboxFilters(PlayState* play) { if (play->envCtx.customSkyboxFilter) { OPEN_DISPS(play->state.gfxCtx); - func_800938B4(play->state.gfxCtx); + Gfx_SetupDL_57Opa(play->state.gfxCtx); gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, play->envCtx.skyboxFilterColor[0], play->envCtx.skyboxFilterColor[1], play->envCtx.skyboxFilterColor[2], play->envCtx.skyboxFilterColor[3]); @@ -1803,7 +1803,7 @@ void Environment_DrawSkyboxFilters(PlayState* play) { void Environment_DrawLightningFlash(PlayState* play, u8 red, u8 green, u8 blue, u8 alpha) { OPEN_DISPS(play->state.gfxCtx); - func_800938B4(play->state.gfxCtx); + Gfx_SetupDL_57Opa(play->state.gfxCtx); gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, red, green, blue, alpha); gDPFillRectangle(POLY_OPA_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1); @@ -1977,7 +1977,7 @@ void Environment_DrawLightning(PlayState* play, s32 unused) { gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(lightningTextures[sLightningBolts[i].textureIndex])); - func_80094C50(play->state.gfxCtx); + Gfx_SetupDL_61Xlu(play->state.gfxCtx); gSPMatrix(POLY_XLU_DISP++, SEG_ADDR(1, 0), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gEffLightningDL); } @@ -2252,7 +2252,7 @@ void Environment_FillScreen(GraphicsContext* gfxCtx, u8 red, u8 green, u8 blue, OPEN_DISPS(gfxCtx); if (drawFlags & FILL_SCREEN_OPA) { - POLY_OPA_DISP = func_800937C0(POLY_OPA_DISP); + POLY_OPA_DISP = Gfx_SetupDL_57(POLY_OPA_DISP); gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, red, green, blue, alpha); gDPSetAlphaDither(POLY_OPA_DISP++, G_AD_DISABLE); gDPSetColorDither(POLY_OPA_DISP++, G_CD_DISABLE); @@ -2260,7 +2260,7 @@ void Environment_FillScreen(GraphicsContext* gfxCtx, u8 red, u8 green, u8 blue, } if (drawFlags & FILL_SCREEN_XLU) { - POLY_XLU_DISP = func_800937C0(POLY_XLU_DISP); + POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, red, green, blue, alpha); if ((u32)alpha == 255) { @@ -2420,7 +2420,7 @@ void Environment_DrawSandstorm(PlayState* play, u8 sandstormState) { OPEN_DISPS(play->state.gfxCtx); - POLY_XLU_DISP = func_80093F34(POLY_XLU_DISP); + POLY_XLU_DISP = Gfx_SetupDL_64(POLY_XLU_DISP); gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_NOISE); gDPSetColorDither(POLY_XLU_DISP++, G_CD_NOISE); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, primColor.r, primColor.g, primColor.b, play->envCtx.sandstormPrimA); diff --git a/soh/src/code/z_lifemeter.c b/soh/src/code/z_lifemeter.c index be093af73..26bb03d52 100644 --- a/soh/src/code/z_lifemeter.c +++ b/soh/src/code/z_lifemeter.c @@ -594,14 +594,14 @@ void HealthMeter_Draw(PlayState* play) { if ((ddHeartCountMinusOne < 0) || (i > ddHeartCountMinusOne)) { if (curCombineModeSet != 1) { curCombineModeSet = 1; - func_80094520(gfxCtx); + Gfx_SetupDL_39Overlay(gfxCtx); gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); } } else { if (curCombineModeSet != 3) { curCombineModeSet = 3; - func_80094520(gfxCtx); + Gfx_SetupDL_39Overlay(gfxCtx); gDPSetCombineLERP(OVERLAY_DISP++, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0); } @@ -632,14 +632,14 @@ void HealthMeter_Draw(PlayState* play) { if ((ddHeartCountMinusOne < 0) || (i > ddHeartCountMinusOne)) { if (curCombineModeSet != 2) { curCombineModeSet = 2; - func_80094A14(gfxCtx); + Gfx_SetupDL_42Overlay(gfxCtx); gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); } } else { if (curCombineModeSet != 4) { curCombineModeSet = 4; - func_80094A14(gfxCtx); + Gfx_SetupDL_42Overlay(gfxCtx); gDPSetCombineLERP(OVERLAY_DISP++, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0); } diff --git a/soh/src/code/z_map_exp.c b/soh/src/code/z_map_exp.c index 33075e3fd..a2d7b8e2a 100644 --- a/soh/src/code/z_map_exp.c +++ b/soh/src/code/z_map_exp.c @@ -616,7 +616,7 @@ void Minimap_DrawCompassIcons(PlayState* play) { OPEN_DISPS(play->state.gfxCtx); if (play->interfaceCtx.minimapAlpha >= 0xAA) { - func_80094A14(play->state.gfxCtx); + Gfx_SetupDL_42Overlay(play->state.gfxCtx); //Player current position (yellow arrow) gSPMatrix(OVERLAY_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); @@ -749,7 +749,7 @@ void Minimap_Draw(PlayState* play) { case SCENE_HAKADANCH: case SCENE_ICE_DOUKUTO: if (!R_MINIMAP_DISABLED) { - func_80094520(play->state.gfxCtx); + Gfx_SetupDL_39Overlay(play->state.gfxCtx); gDPSetCombineLERP(OVERLAY_DISP++, 1, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, 1, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0); @@ -788,7 +788,7 @@ void Minimap_Draw(PlayState* play) { if (CHECK_DUNGEON_ITEM(DUNGEON_COMPASS, mapIndex)) { Minimap_DrawCompassIcons(play); // Draw icons for the player spawn and current position - func_80094520(play->state.gfxCtx); + Gfx_SetupDL_39Overlay(play->state.gfxCtx); MapMark_Draw(play); } } @@ -826,7 +826,7 @@ void Minimap_Draw(PlayState* play) { case SCENE_SPOT20: case SCENE_GANON_TOU: if (!R_MINIMAP_DISABLED) { - func_80094520(play->state.gfxCtx); + Gfx_SetupDL_39Overlay(play->state.gfxCtx); gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); if (CVar_GetS32("gHudColors", 1) == 2) {//Overworld minimap diff --git a/soh/src/code/z_message_PAL.c b/soh/src/code/z_message_PAL.c index 14acf64a1..1495a9102 100644 --- a/soh/src/code/z_message_PAL.c +++ b/soh/src/code/z_message_PAL.c @@ -2210,11 +2210,11 @@ void Message_DrawMain(PlayState* play, Gfx** p) { msgCtx->msgMode >= MSGMODE_TEXT_BOX_GROWING && msgCtx->msgMode < MSGMODE_TEXT_CLOSING && msgCtx->textBoxType < TEXTBOX_TYPE_NONE_BOTTOM) { Message_SetView(&msgCtx->view); - func_8009457C(&gfx); + Gfx_SetupDL_39Ptr(&gfx); Message_DrawTextBox(play, &gfx); } - func_8009457C(&gfx); + Gfx_SetupDL_39Ptr(&gfx); gDPSetAlphaCompare(gfx++, G_AC_NONE); gDPSetCombineLERP(gfx++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, @@ -3176,7 +3176,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) { if (msgCtx->msgMode >= MSGMODE_OCARINA_PLAYING && msgCtx->msgMode < MSGMODE_TEXT_AWAIT_NEXT && msgCtx->ocarinaAction != OCARINA_ACTION_FREE_PLAY && msgCtx->ocarinaAction != OCARINA_ACTION_CHECK_NOWARP) { - func_8009457C(&gfx); + Gfx_SetupDL_39Ptr(&gfx); gDPSetCombineLERP(gfx++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c index c23e2565f..1bd7c239c 100644 --- a/soh/src/code/z_parameter.c +++ b/soh/src/code/z_parameter.c @@ -3557,7 +3557,7 @@ void Interface_DrawLineupTick(PlayState* play) { OPEN_DISPS(play->state.gfxCtx); - func_80094520(play->state.gfxCtx); + Gfx_SetupDL_39Overlay(play->state.gfxCtx); gDPSetEnvColor(OVERLAY_DISP++, 255, 255, 255, 255); gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, 255); @@ -3652,7 +3652,7 @@ void Interface_DrawMagicBar(PlayState* play) { rMagicFillX = rMagicFillX_original; } - func_80094520(play->state.gfxCtx); + Gfx_SetupDL_39Overlay(play->state.gfxCtx); if (CVar_GetS32("gHudColors", 1) == 2) {//Original game add color there so to prevent miss match we make it all white :) gDPSetEnvColor(OVERLAY_DISP++, 255, 255, 255, 255); @@ -4995,7 +4995,7 @@ void Interface_Draw(PlayState* play) { HealthMeter_Draw(play); } - func_80094520(play->state.gfxCtx); + Gfx_SetupDL_39Overlay(play->state.gfxCtx); if (fullUi) { // Rupee Icon @@ -5204,7 +5204,7 @@ void Interface_Draw(PlayState* play) { func_8002C124(&play->actorCtx.targetCtx, play); // Draw Z-Target } - func_80094520(play->state.gfxCtx); + Gfx_SetupDL_39Overlay(play->state.gfxCtx); if (fullUi) { Interface_DrawItemButtons(play); @@ -5431,7 +5431,7 @@ void Interface_Draw(PlayState* play) { } // A Button - func_80094A14(play->state.gfxCtx); + Gfx_SetupDL_42Overlay(play->state.gfxCtx); const Color_RGB8 A_Button_Colors = {R_A_BTN_COLOR(0), R_A_BTN_COLOR(1), R_A_BTN_COLOR(2)}; s16 X_Margins_BtnA; s16 Y_Margins_BtnA; @@ -5513,7 +5513,7 @@ void Interface_Draw(PlayState* play) { if ((pauseCtx->state == 6) && (pauseCtx->unk_1E4 == 3)) { // Inventory Equip Effects gSPSegment(OVERLAY_DISP++, 0x08, pauseCtx->iconItemSegment); - func_80094A14(play->state.gfxCtx); + Gfx_SetupDL_42Overlay(play->state.gfxCtx); gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATERGBA_PRIM, G_CC_MODULATERGBA_PRIM); gSPMatrix(OVERLAY_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); @@ -5559,7 +5559,7 @@ void Interface_Draw(PlayState* play) { gSP1Quadrangle(OVERLAY_DISP++, 0, 2, 3, 1, 0); } - func_80094520(play->state.gfxCtx); + Gfx_SetupDL_39Overlay(play->state.gfxCtx); if ((play->pauseCtx.state == 0) && (play->pauseCtx.debugState == 0)) { if (gSaveContext.minigameState != 1) { diff --git a/soh/src/code/z_play.c b/soh/src/code/z_play.c index 9d35a528c..8282fef01 100644 --- a/soh/src/code/z_play.c +++ b/soh/src/code/z_play.c @@ -1369,7 +1369,7 @@ void Play_Draw(PlayState* play) { gSPSegment(POLY_XLU_DISP++, 0x02, play->sceneSegment); gSPSegment(OVERLAY_DISP++, 0x02, play->sceneSegment); - func_80095248(gfxCtx, 0, 0, 0); + Gfx_SetupFrame(gfxCtx, 0, 0, 0); if ((HREG(80) != 10) || (HREG(82) != 0)) { POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP); diff --git a/soh/src/code/z_player_lib.c b/soh/src/code/z_player_lib.c index 6e9e9df80..181bdd676 100644 --- a/soh/src/code/z_player_lib.c +++ b/soh/src/code/z_player_lib.c @@ -1240,7 +1240,7 @@ void Player_DrawHookshotReticle(PlayState* play, Player* this, f32 arg2) { if (BgCheck_AnyLineTest3(&play->colCtx, &sp8C, &sp80, &sp74, &sp9C, 1, 1, 1, 1, &bgId)) { OPEN_DISPS(play->state.gfxCtx); - WORLD_OVERLAY_DISP = Gfx_CallSetupDL(WORLD_OVERLAY_DISP, 0x07); + WORLD_OVERLAY_DISP = Gfx_SetupDL(WORLD_OVERLAY_DISP, 0x07); SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, &sp74, &sp68, &sp64); diff --git a/soh/src/code/z_prenmi.c b/soh/src/code/z_prenmi.c index f76255b23..4a6f777ae 100644 --- a/soh/src/code/z_prenmi.c +++ b/soh/src/code/z_prenmi.c @@ -33,8 +33,8 @@ void PreNMI_Draw(PreNMIContext* this) { OPEN_DISPS(gfxCtx); gSPSegment(POLY_OPA_DISP++, 0x00, NULL); - func_80095248(gfxCtx, 0, 0, 0); - func_800940B0(gfxCtx); + Gfx_SetupFrame(gfxCtx, 0, 0, 0); + Gfx_SetupDL_36Opa(gfxCtx); 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); diff --git a/soh/src/code/z_rcp.c b/soh/src/code/z_rcp.c index fa7fd71ad..d74bd8975 100644 --- a/soh/src/code/z_rcp.c +++ b/soh/src/code/z_rcp.c @@ -1,8 +1,8 @@ #include "global.h" -Gfx sSetupDL[][6] = { +Gfx sSetupDL[SETUPDL_MAX][6] = { { - /* 0x00 */ + /* SETUPDL_0 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineLERP(PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0, 0, 0, 0, COMBINED, 0, @@ -14,7 +14,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x01 */ + /* SETUPDL_1 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPSetCombineMode(G_CC_SHADE, G_CC_PASS2), @@ -25,7 +25,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x02 */ + /* SETUPDL_2 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE), @@ -36,7 +36,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x03 */ + /* SETUPDL_3 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPSetCombineMode(G_CC_SHADE, G_CC_PASS2), @@ -47,7 +47,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x04 */ + /* SETUPDL_4 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPSetCombineLERP(PRIMITIVE, 0, SHADE, 0, 0, 0, 0, PRIMITIVE, PRIMITIVE, 0, SHADE, 0, 0, 0, 0, PRIMITIVE), @@ -58,7 +58,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x05 */ + /* SETUPDL_5 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEI_PRIM, G_CC_MODULATEI_PRIM), @@ -69,7 +69,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x06 */ + /* SETUPDL_6 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_PASS2), @@ -80,7 +80,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x07 */ + /* SETUPDL_7 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM), @@ -91,7 +91,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x08 */ + /* SETUPDL_8 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE), @@ -102,7 +102,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x09 */ + /* SETUPDL_9 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA2), @@ -113,7 +113,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x0A */ + /* SETUPDL_10 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA), @@ -124,7 +124,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x0B */ + /* SETUPDL_11 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIDECALA, G_CC_MODULATEIA_PRIM2), @@ -135,7 +135,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x0C */ + /* SETUPDL_12 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEI_PRIM, G_CC_MODULATEI_PRIM), @@ -146,7 +146,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x0D */ + /* SETUPDL_13 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM), @@ -157,7 +157,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x0E */ + /* SETUPDL_14 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA), @@ -168,7 +168,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x0F */ + /* SETUPDL_15 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_PASS2), @@ -179,7 +179,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x10 */ + /* SETUPDL_16 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM2), @@ -190,7 +190,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x11 */ + /* SETUPDL_17 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA), @@ -201,7 +201,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x12 */ + /* SETUPDL_18 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIDECALA, G_CC_PASS2), @@ -212,7 +212,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x13 */ + /* SETUPDL_19 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM), @@ -225,7 +225,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x14 */ + /* SETUPDL_20 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM), @@ -236,7 +236,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x15 */ + /* SETUPDL_21 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA), @@ -247,7 +247,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x16 */ + /* SETUPDL_22 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA2), @@ -258,7 +258,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x17 */ + /* SETUPDL_23 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA), @@ -269,7 +269,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x18 */ + /* SETUPDL_24 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIDECALA, G_CC_MODULATEIA2), @@ -280,7 +280,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x19 */ + /* SETUPDL_25 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIDECALA, G_CC_MODULATEIA_PRIM2), @@ -291,7 +291,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x1A */ + /* SETUPDL_26 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEI_PRIM, G_CC_MODULATEI_PRIM), @@ -302,7 +302,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x1B */ + /* SETUPDL_27 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEI_PRIM, G_CC_MODULATEI_PRIM), @@ -313,7 +313,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x1C */ + /* SETUPDL_28 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIDECALA_PRIM, G_CC_MODULATEIDECALA_PRIM), @@ -324,7 +324,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x1D */ + /* SETUPDL_29 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, TEXEL0, 0, SHADE, 0, NOISE, 0, COMBINED, 0, 0, 0, 0, COMBINED), @@ -335,7 +335,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x1E */ + /* SETUPDL_30 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPSetCombineMode(G_CC_PRIMITIVE, G_CC_PRIMITIVE), @@ -346,7 +346,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x1F */ + /* SETUPDL_31 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_HILITERGBA, G_CC_HILITERGBA), @@ -357,7 +357,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x20 */ + /* SETUPDL_32 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_HILITERGBA, G_CC_HILITERGBA), @@ -369,7 +369,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x21 */ + /* SETUPDL_33 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineLERP(TEXEL0, 0, PRIMITIVE, SHADE, 1, 0, TEXEL0, SHADE, ENVIRONMENT, COMBINED, TEXEL0, COMBINED, @@ -382,7 +382,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x22 */ + /* SETUPDL_34 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_DECALRGB, G_CC_DECALRGB), @@ -393,7 +393,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x23 */ + /* SETUPDL_35 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA), @@ -404,7 +404,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x24 */ + /* SETUPDL_36 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE), @@ -415,7 +415,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x25 */ + /* SETUPDL_37 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPSetCombineLERP(PRIMITIVE, 0, SHADE, 0, 0, 0, 0, PRIMITIVE, 0, 0, 0, COMBINED, 0, 0, 0, COMBINED), @@ -426,7 +426,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x26 */ + /* SETUPDL_38 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE), @@ -437,7 +437,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x27 */ + /* SETUPDL_39 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM), @@ -448,7 +448,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x28 */ + /* SETUPDL_40 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineLERP(TEXEL1, TEXEL0, PRIMITIVE_ALPHA, TEXEL0, TEXEL1, TEXEL0, PRIMITIVE, TEXEL0, 0, 0, 0, @@ -460,7 +460,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x29 */ + /* SETUPDL_41 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA), @@ -471,7 +471,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x2A */ + /* SETUPDL_42 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA), @@ -482,7 +482,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x2B */ + /* SETUPDL_43 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIDECALA_PRIM, G_CC_MODULATEIDECALA_PRIM), @@ -493,7 +493,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x2C */ + /* SETUPDL_44 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIA_PRIM, G_CC_PASS2), @@ -504,7 +504,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x2D */ + /* SETUPDL_45 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineLERP(0, 0, 0, PRIMITIVE, 0, 0, 0, TEXEL0, 0, 0, 0, PRIMITIVE, 0, 0, 0, TEXEL0), @@ -515,7 +515,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x2E */ + /* SETUPDL_46 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineLERP(0, 0, 0, PRIMITIVE, 0, 0, 0, TEXEL0, 0, 0, 0, PRIMITIVE, 0, 0, 0, TEXEL0), @@ -526,7 +526,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x2F */ + /* SETUPDL_47 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEI_PRIM, G_CC_MODULATEI_PRIM), @@ -537,7 +537,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x30 */ + /* SETUPDL_48 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPSetCombineMode(G_CC_PRIMITIVE, G_CC_PRIMITIVE), @@ -548,7 +548,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x31 */ + /* SETUPDL_49 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPSetCombineLERP(PRIMITIVE, 0, SHADE, 0, 0, 0, 0, PRIMITIVE, PRIMITIVE, 0, SHADE, 0, 0, 0, 0, PRIMITIVE), @@ -559,7 +559,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x32 */ + /* SETUPDL_50 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM), @@ -570,7 +570,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x33 */ + /* SETUPDL_51 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM), @@ -581,7 +581,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x34 */ + /* SETUPDL_52 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM), @@ -592,7 +592,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x35 */ + /* SETUPDL_53 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineLERP(TEXEL1, TEXEL0, ENV_ALPHA, TEXEL0, TEXEL1, TEXEL0, ENVIRONMENT, TEXEL0, PRIMITIVE, @@ -604,7 +604,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x36 */ + /* SETUPDL_54 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineLERP(TEXEL1, TEXEL0, ENV_ALPHA, TEXEL0, TEXEL1, TEXEL0, ENVIRONMENT, TEXEL0, PRIMITIVE, @@ -616,7 +616,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x37 */ + /* SETUPDL_55 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineLERP(TEXEL1, TEXEL0, ENV_ALPHA, TEXEL0, TEXEL1, TEXEL0, ENVIRONMENT, TEXEL0, PRIMITIVE, @@ -628,7 +628,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x38 */ + /* SETUPDL_56 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM), @@ -639,7 +639,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x39 */ + /* SETUPDL_57 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPSetCombineMode(G_CC_PRIMITIVE, G_CC_PRIMITIVE), @@ -650,7 +650,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x3A */ + /* SETUPDL_58 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPSetCombineLERP(PRIMITIVE, 0, SHADE, 0, PRIMITIVE, 0, SHADE, 0, PRIMITIVE, 0, SHADE, 0, PRIMITIVE, 0, SHADE, @@ -662,7 +662,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x3B */ + /* SETUPDL_59 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineLERP(TEXEL0, 0, PRIMITIVE, SHADE, 1, 0, TEXEL0, SHADE, ENVIRONMENT, COMBINED, TEXEL0, COMBINED, @@ -675,7 +675,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x3C */ + /* SETUPDL_60 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineLERP(PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, ENVIRONMENT, @@ -687,7 +687,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x3D */ + /* SETUPDL_61 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineLERP(PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, ENVIRONMENT, @@ -699,7 +699,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x3E */ + /* SETUPDL_62 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIDECALA, G_CC_MODULATEIA_PRIM2), @@ -710,7 +710,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x3F */ + /* SETUPDL_63 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM), @@ -723,7 +723,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x40 */ + /* SETUPDL_64 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_PASS2), @@ -734,7 +734,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x41 */ + /* SETUPDL_65 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM), @@ -745,7 +745,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x42 */ + /* SETUPDL_66 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA), @@ -757,7 +757,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x43 */ + /* SETUPDL_67 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM), @@ -769,7 +769,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x44 */ + /* SETUPDL_68 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA), @@ -782,7 +782,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x45 */ + /* SETUPDL_69 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM), @@ -795,7 +795,7 @@ Gfx sSetupDL[][6] = { gsSPEndDisplayList(), }, { - /* 0x46 */ + /* SETUPDL_70 */ gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA), @@ -895,7 +895,7 @@ Gfx* Gfx_SetFog2(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 near, s32 far) { return Gfx_SetFog(gfx, r, g, b, a, near, far); } -Gfx* Gfx_CallSetupDLImpl(Gfx* gfx, u32 i) { +Gfx* Gfx_SetupDLImpl(Gfx* gfx, u32 i) { s32 dListIndex = 6 * i; gSPDisplayList(gfx++, &((Gfx*)sSetupDL)[dListIndex]); @@ -903,106 +903,106 @@ Gfx* Gfx_CallSetupDLImpl(Gfx* gfx, u32 i) { return gfx; } -Gfx* Gfx_CallSetupDL(Gfx* gfx, u32 i) { - return Gfx_CallSetupDLImpl(gfx, i); +Gfx* Gfx_SetupDL(Gfx* gfx, u32 i) { + return Gfx_SetupDLImpl(gfx, i); } -void Gfx_CallSetupDLAtPtr(Gfx** gfxp, u32 i) { - *gfxp = Gfx_CallSetupDL(*gfxp, i); +void Gfx_SetupDLAtPtr(Gfx** gfxp, u32 i) { + *gfxp = Gfx_SetupDL(*gfxp, i); } -Gfx* func_800937C0(Gfx* gfx) { - gSPDisplayList(gfx++, sSetupDL[0x39]); +Gfx* Gfx_SetupDL_57(Gfx* gfx) { + gSPDisplayList(gfx++, sSetupDL[SETUPDL_57]); return gfx; } -Gfx* func_800937E4(Gfx* gfx) { - gSPDisplayList(gfx++, sSetupDL[0x39]); +Gfx* Gfx_SetupDL_57b(Gfx* gfx) { + gSPDisplayList(gfx++, sSetupDL[SETUPDL_57]); return gfx; } -Gfx* func_80093808(Gfx* gfx) { - gSPDisplayList(gfx++, sSetupDL[0x34]); +Gfx* Gfx_SetupDL_52NoCD(Gfx* gfx) { + gSPDisplayList(gfx++, sSetupDL[SETUPDL_52]); gDPSetColorDither(gfx++, G_CD_DISABLE); return gfx; } -void func_80093848(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_58Opa(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_OPA_DISP++, sSetupDL[0x3A]); + gSPDisplayList(POLY_OPA_DISP++, sSetupDL[SETUPDL_58]); CLOSE_DISPS(gfxCtx); } -void func_800938B4(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_57Opa(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_OPA_DISP++, sSetupDL[0x39]); + gSPDisplayList(POLY_OPA_DISP++, sSetupDL[SETUPDL_57]); CLOSE_DISPS(gfxCtx); } -void func_80093920(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_50Opa(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_OPA_DISP++, sSetupDL[0x32]); + gSPDisplayList(POLY_OPA_DISP++, sSetupDL[SETUPDL_50]); CLOSE_DISPS(gfxCtx); } -void func_8009398C(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_51Opa(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_OPA_DISP++, sSetupDL[0x33]); + gSPDisplayList(POLY_OPA_DISP++, sSetupDL[SETUPDL_51]); CLOSE_DISPS(gfxCtx); } -void func_800939F8(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_52Xlu(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_XLU_DISP++, sSetupDL[0x34]); + gSPDisplayList(POLY_XLU_DISP++, sSetupDL[SETUPDL_52]); CLOSE_DISPS(gfxCtx); } -void func_80093A64(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_53Opa(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_OPA_DISP++, sSetupDL[0x35]); + gSPDisplayList(POLY_OPA_DISP++, sSetupDL[SETUPDL_53]); CLOSE_DISPS(gfxCtx); } -void func_80093AD0(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_54Opa(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_OPA_DISP++, sSetupDL[0x36]); + gSPDisplayList(POLY_OPA_DISP++, sSetupDL[SETUPDL_54]); CLOSE_DISPS(gfxCtx); } -void func_80093B3C(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_55Xlu(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_XLU_DISP++, sSetupDL[0x37]); + gSPDisplayList(POLY_XLU_DISP++, sSetupDL[SETUPDL_55]); CLOSE_DISPS(gfxCtx); } -void func_80093BA8(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_26Opa(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_OPA_DISP++, sSetupDL[0x1A]); + gSPDisplayList(POLY_OPA_DISP++, sSetupDL[SETUPDL_26]); CLOSE_DISPS(gfxCtx); } -void func_80093C14(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_25Xlu2(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_XLU_DISP++, sSetupDL[0x19]); + gSPDisplayList(POLY_XLU_DISP++, sSetupDL[SETUPDL_25]); CLOSE_DISPS(gfxCtx); } @@ -1010,7 +1010,7 @@ void func_80093C14(GraphicsContext* gfxCtx) { void func_80093C80(PlayState* play) { GraphicsContext* gfxCtx = play->state.gfxCtx; - func_80093D18(gfxCtx); + Gfx_SetupDL_25Opa(gfxCtx); if (play->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_3) { OPEN_DISPS(gfxCtx); @@ -1021,240 +1021,241 @@ void func_80093C80(PlayState* play) { } } -void func_80093D18(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_25Opa(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_OPA_DISP++, sSetupDL[0x19]); + gSPDisplayList(POLY_OPA_DISP++, sSetupDL[SETUPDL_25]); CLOSE_DISPS(gfxCtx); } -void func_80093D84(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_25Xlu(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_XLU_DISP++, sSetupDL[0x19]); + gSPDisplayList(POLY_XLU_DISP++, sSetupDL[SETUPDL_25]); CLOSE_DISPS(gfxCtx); } -void func_80093DF0(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_31Opa(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_OPA_DISP++, sSetupDL[0x1F]); + gSPDisplayList(POLY_OPA_DISP++, sSetupDL[SETUPDL_31]); CLOSE_DISPS(gfxCtx); } -void func_80093E5C(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_32Opa(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_OPA_DISP++, sSetupDL[0x20]); + gSPDisplayList(POLY_OPA_DISP++, sSetupDL[SETUPDL_32]); CLOSE_DISPS(gfxCtx); } -void func_80093EC8(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_33Opa(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_OPA_DISP++, sSetupDL[0x21]); + gSPDisplayList(POLY_OPA_DISP++, sSetupDL[SETUPDL_33]); CLOSE_DISPS(gfxCtx); } -Gfx* func_80093F34(Gfx* gfx) { - gSPDisplayList(gfx++, sSetupDL[0x40]); +Gfx* Gfx_SetupDL_64(Gfx* gfx) { + gSPDisplayList(gfx++, sSetupDL[SETUPDL_64]); return gfx; } -Gfx* func_80093F58(Gfx* gfx) { - gSPDisplayList(gfx++, sSetupDL[0x22]); +Gfx* Gfx_SetupDL_34(Gfx* gfx) { + gSPDisplayList(gfx++, sSetupDL[SETUPDL_34]); return gfx; } -void func_80093F7C(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_34Opa(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - POLY_OPA_DISP = func_80093F58(POLY_OPA_DISP); + POLY_OPA_DISP = Gfx_SetupDL_34(POLY_OPA_DISP); CLOSE_DISPS(gfxCtx); } -void func_80093FD8(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_35Opa(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_OPA_DISP++, sSetupDL[0x23]); + gSPDisplayList(POLY_OPA_DISP++, sSetupDL[SETUPDL_35]); CLOSE_DISPS(gfxCtx); } -void func_80094044(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_44Xlu(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_XLU_DISP++, sSetupDL[0x2C]); + gSPDisplayList(POLY_XLU_DISP++, sSetupDL[SETUPDL_44]); CLOSE_DISPS(gfxCtx); } -void func_800940B0(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_36Opa(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_OPA_DISP++, sSetupDL[0x24]); + gSPDisplayList(POLY_OPA_DISP++, sSetupDL[SETUPDL_36]); CLOSE_DISPS(gfxCtx); } -Gfx* func_8009411C(Gfx* gfx) { - gSPDisplayList(gfx++, sSetupDL[0x1C]); +Gfx* Gfx_SetupDL_28(Gfx* gfx) { + gSPDisplayList(gfx++, sSetupDL[SETUPDL_28]); return gfx; } -void func_80094140(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_28Opa(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_OPA_DISP++, sSetupDL[0x1C]); + gSPDisplayList(POLY_OPA_DISP++, sSetupDL[SETUPDL_28]); CLOSE_DISPS(gfxCtx); } -void func_800941AC(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_43Opa(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_OPA_DISP++, sSetupDL[0x2B]); + gSPDisplayList(POLY_OPA_DISP++, sSetupDL[SETUPDL_43]); CLOSE_DISPS(gfxCtx); } -void func_80094218(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_45Opa(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_OPA_DISP++, sSetupDL[0x2D]); + gSPDisplayList(POLY_OPA_DISP++, sSetupDL[SETUPDL_45]); CLOSE_DISPS(gfxCtx); } -void func_80094284(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_46Overlay(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(OVERLAY_DISP++, sSetupDL[0x2E]); + gSPDisplayList(OVERLAY_DISP++, sSetupDL[SETUPDL_46]); CLOSE_DISPS(gfxCtx); } -void func_800942F0(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_38Xlu(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_XLU_DISP++, sSetupDL[0x26]); + gSPDisplayList(POLY_XLU_DISP++, sSetupDL[SETUPDL_38]); CLOSE_DISPS(gfxCtx); } -void func_8009435C(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_4Xlu(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_XLU_DISP++, sSetupDL[0x04]); + gSPDisplayList(POLY_XLU_DISP++, sSetupDL[SETUPDL_4]); CLOSE_DISPS(gfxCtx); } -void func_800943C8(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_37Opa(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_OPA_DISP++, sSetupDL[0x25]); + gSPDisplayList(POLY_OPA_DISP++, sSetupDL[SETUPDL_37]); CLOSE_DISPS(gfxCtx); } -void func_80094434(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_2Opa(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_OPA_DISP++, sSetupDL[0x02]); + gSPDisplayList(POLY_OPA_DISP++, sSetupDL[SETUPDL_2]); CLOSE_DISPS(gfxCtx); } -Gfx* func_800944A0(Gfx* gfx) { - gSPDisplayList(gfx++, sSetupDL[0x27]); +Gfx* Gfx_SetupDL_39(Gfx* gfx) { + gSPDisplayList(gfx++, sSetupDL[SETUPDL_39]); return gfx; } -void func_800944C4(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_39Opa(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - POLY_OPA_DISP = func_800944A0(POLY_OPA_DISP); + POLY_OPA_DISP = Gfx_SetupDL_39(POLY_OPA_DISP); CLOSE_DISPS(gfxCtx); } -void func_800944C4_KAL(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_39Kal(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - POLY_KAL_DISP = func_800944A0(POLY_KAL_DISP); + POLY_KAL_DISP = Gfx_SetupDL_39(POLY_KAL_DISP); CLOSE_DISPS(gfxCtx); } -void func_80094520(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_39Overlay(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - OVERLAY_DISP = func_800944A0(OVERLAY_DISP); + OVERLAY_DISP = Gfx_SetupDL_39(OVERLAY_DISP); CLOSE_DISPS(gfxCtx); } -void func_8009457C(Gfx** gfxp) { +void Gfx_SetupDL_39Ptr(Gfx** gfxp) { Gfx* gfx = *gfxp; - gSPDisplayList(gfx++, sSetupDL[0x27]); + + gSPDisplayList(gfx++, sSetupDL[SETUPDL_39]); *gfxp = gfx; } -void func_800945A0(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_40Opa(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_OPA_DISP++, sSetupDL[0x28]); + gSPDisplayList(POLY_OPA_DISP++, sSetupDL[SETUPDL_40]); CLOSE_DISPS(gfxCtx); } -void func_8009460C(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_41Opa(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_OPA_DISP++, sSetupDL[0x29]); + gSPDisplayList(POLY_OPA_DISP++, sSetupDL[SETUPDL_41]); CLOSE_DISPS(gfxCtx); } -void func_80094678(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_47Xlu(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_XLU_DISP++, sSetupDL[0x2F]); + gSPDisplayList(POLY_XLU_DISP++, sSetupDL[SETUPDL_47]); CLOSE_DISPS(gfxCtx); } -Gfx* func_800946E4(Gfx* gfx) { - gSPDisplayList(gfx++, sSetupDL[0x42]); +Gfx* Gfx_SetupDL_66(Gfx* gfx) { + gSPDisplayList(gfx++, sSetupDL[SETUPDL_66]); return gfx; } -Gfx* func_80094708(Gfx* gfx) { - gSPDisplayList(gfx++, sSetupDL[0x43]); +Gfx* Gfx_SetupDL_67(Gfx* gfx) { + gSPDisplayList(gfx++, sSetupDL[SETUPDL_67]); return gfx; } -Gfx* func_8009472C(Gfx* gfx) { - gSPDisplayList(gfx++, sSetupDL[0x44]); +Gfx* Gfx_SetupDL_68NoCD(Gfx* gfx) { + gSPDisplayList(gfx++, sSetupDL[SETUPDL_68]); gDPSetColorDither(gfx++, G_CD_DISABLE); return gfx; } -Gfx* func_8009476C(Gfx* gfx) { - gSPDisplayList(gfx++, sSetupDL[0x45]); +Gfx* Gfx_SetupDL_69NoCD(Gfx* gfx) { + gSPDisplayList(gfx++, sSetupDL[SETUPDL_69]); gDPSetColorDither(gfx++, G_CD_DISABLE); return gfx; } Gfx* func_800947AC(Gfx* gfx) { - gSPDisplayList(gfx++, sSetupDL[0x41]); + gSPDisplayList(gfx++, sSetupDL[SETUPDL_65]); gDPSetColorDither(gfx++, G_CD_DISABLE); // clang-format off @@ -1276,102 +1277,102 @@ Gfx* func_800947AC(Gfx* gfx) { return gfx; } -Gfx* func_80094944(Gfx* gfx) { - gSPDisplayList(gfx++, sSetupDL[0x46]); +Gfx* Gfx_SetupDL_70(Gfx* gfx) { + gSPDisplayList(gfx++, sSetupDL[SETUPDL_70]); return gfx; } -Gfx* func_80094968(Gfx* gfx) { - gSPDisplayList(gfx++, sSetupDL[0x14]); +Gfx* Gfx_SetupDL_20NoCD(Gfx* gfx) { + gSPDisplayList(gfx++, sSetupDL[SETUPDL_20]); gDPSetColorDither(gfx++, G_CD_DISABLE); return gfx; } -void func_800949A8(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_42Opa(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_OPA_DISP++, sSetupDL[0x2A]); + gSPDisplayList(POLY_OPA_DISP++, sSetupDL[SETUPDL_42]); CLOSE_DISPS(gfxCtx); } -void func_800949A8_KAL(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_42Kal(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_KAL_DISP++, sSetupDL[0x2A]); + gSPDisplayList(POLY_KAL_DISP++, sSetupDL[SETUPDL_42]); CLOSE_DISPS(gfxCtx); } -void func_80094A14(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_42Overlay(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(OVERLAY_DISP++, sSetupDL[0x2A]); + gSPDisplayList(OVERLAY_DISP++, sSetupDL[SETUPDL_42]); CLOSE_DISPS(gfxCtx); } -void func_80094A80(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_48Opa(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_OPA_DISP++, sSetupDL[0x30]); + gSPDisplayList(POLY_OPA_DISP++, sSetupDL[SETUPDL_48]); CLOSE_DISPS(gfxCtx); } -void func_80094AEC(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_49Xlu(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_XLU_DISP++, sSetupDL[0x31]); + gSPDisplayList(POLY_XLU_DISP++, sSetupDL[SETUPDL_49]); CLOSE_DISPS(gfxCtx); } -void func_80094B58(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_27Xlu(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_XLU_DISP++, sSetupDL[0x1B]); + gSPDisplayList(POLY_XLU_DISP++, sSetupDL[SETUPDL_27]); CLOSE_DISPS(gfxCtx); } -void func_80094BC4(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_60NoCDXlu(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_XLU_DISP++, sSetupDL[0x3C]); + gSPDisplayList(POLY_XLU_DISP++, sSetupDL[SETUPDL_60]); gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE); CLOSE_DISPS(gfxCtx); } -void func_80094C50(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_61Xlu(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_XLU_DISP++, sSetupDL[0x3D]); + gSPDisplayList(POLY_XLU_DISP++, sSetupDL[SETUPDL_61]); CLOSE_DISPS(gfxCtx); } -void func_80094CBC(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_56Opa(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_OPA_DISP++, sSetupDL[0x38]); + gSPDisplayList(POLY_OPA_DISP++, sSetupDL[SETUPDL_56]); CLOSE_DISPS(gfxCtx); } -void func_80094D28(Gfx** gfxp) { +void Gfx_SetupDL_56Ptr(Gfx** gfxp) { Gfx* gfx = *gfxp; - gSPDisplayList(gfx++, sSetupDL[0x38]); + gSPDisplayList(gfx++, sSetupDL[SETUPDL_56]); *gfxp = gfx; } -void func_80094D4C(GraphicsContext* gfxCtx) { +void Gfx_SetupDL_59Opa(GraphicsContext* gfxCtx) { OPEN_DISPS(gfxCtx); - gSPDisplayList(POLY_OPA_DISP++, sSetupDL[0x3B]); + gSPDisplayList(POLY_OPA_DISP++, sSetupDL[SETUPDL_59]); CLOSE_DISPS(gfxCtx); } @@ -1380,7 +1381,7 @@ Gfx* Gfx_BranchTexScroll(Gfx** gfxp, u32 x, u32 y, s32 width, s32 height) { Gfx* displayList = Graph_DlistAlloc(gfxp, 3 * sizeof(Gfx)); gDPTileSync(displayList); - gDPSetTileSize(displayList + 1, 0, x, y, (x + ((width - 1) << 2)), (y + ((height - 1) << 2))); + gDPSetTileSize(displayList + 1, G_TX_RENDERTILE, x, y, x + ((width - 1) << 2), y + ((height - 1) << 2)); gSPEndDisplayList(displayList + 2); return displayList; @@ -1397,11 +1398,11 @@ Gfx* func_80094E78(GraphicsContext* gfxCtx, u32 x, u32 y) { Gfx* Gfx_TexScroll(GraphicsContext* gfxCtx, u32 x, u32 y, s32 width, s32 height) { Gfx* displayList = Graph_Alloc(gfxCtx, 3 * sizeof(Gfx)); - x %= 2048; - y %= 2048; + x %= 512 << 2; + y %= 512 << 2; gDPTileSync(displayList); - gDPSetTileSize(displayList + 1, 0, x, y, (x + ((width - 1) << 2)), (y + ((height - 1) << 2))); + gDPSetTileSize(displayList + 1, G_TX_RENDERTILE, x, y, x + ((width - 1) << 2), y + ((height - 1) << 2)); gSPEndDisplayList(displayList + 2); return displayList; @@ -1411,15 +1412,15 @@ Gfx* Gfx_TwoTexScroll(GraphicsContext* gfxCtx, s32 tile1, u32 x1, u32 y1, s32 wi u32 y2, s32 width2, s32 height2) { Gfx* displayList = Graph_Alloc(gfxCtx, 5 * sizeof(Gfx)); - x1 %= 2048; - y1 %= 2048; - x2 %= 2048; - y2 %= 2048; + x1 %= 512 << 2; + y1 %= 512 << 2; + x2 %= 512 << 2; + y2 %= 512 << 2; gDPTileSync(displayList); - gDPSetTileSize(displayList + 1, tile1, x1, y1, (x1 + ((width1 - 1) << 2)), (y1 + ((height1 - 1) << 2))); + gDPSetTileSize(displayList + 1, tile1, x1, y1, x1 + ((width1 - 1) << 2), y1 + ((height1 - 1) << 2)); gDPTileSync(displayList + 2); - gDPSetTileSize(displayList + 3, tile2, x2, y2, (x2 + ((width2 - 1) << 2)), (y2 + ((height2 - 1) << 2))); + gDPSetTileSize(displayList + 3, tile2, x2, y2, x2 + ((width2 - 1) << 2), y2 + ((height2 - 1) << 2)); gSPEndDisplayList(displayList + 4); return displayList; @@ -1429,15 +1430,15 @@ Gfx* Gfx_TwoTexScrollEnvColor(GraphicsContext* gfxCtx, s32 tile1, u32 x1, u32 y1 u32 x2, u32 y2, s32 width2, s32 height2, s32 r, s32 g, s32 b, s32 a) { Gfx* displayList = Graph_Alloc(gfxCtx, 6 * sizeof(Gfx)); - x1 %= 2048; - y1 %= 2048; - x2 %= 2048; - y2 %= 2048; + x1 %= 512 << 2; + y1 %= 512 << 2; + x2 %= 512 << 2; + y2 %= 512 << 2; gDPTileSync(displayList); - gDPSetTileSize(displayList + 1, tile1, x1, y1, (x1 + ((width1 - 1) << 2)), (y1 + ((height1 - 1) << 2))); + gDPSetTileSize(displayList + 1, tile1, x1, y1, x1 + ((width1 - 1) << 2), y1 + ((height1 - 1) << 2)); gDPTileSync(displayList + 2); - gDPSetTileSize(displayList + 3, tile2, x2, y2, (x2 + ((width2 - 1) << 2)), (y2 + ((height2 - 1) << 2))); + gDPSetTileSize(displayList + 3, tile2, x2, y2, x2 + ((width2 - 1) << 2), y2 + ((height2 - 1) << 2)); gDPSetEnvColor(displayList + 4, r, g, b, a); gSPEndDisplayList(displayList + 5); @@ -1453,32 +1454,43 @@ Gfx* Gfx_EnvColor(GraphicsContext* gfxCtx, s32 r, s32 g, s32 b, s32 a) { return displayList; } -void func_80095248(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b) { +/** + * Sets up the frame for drawing. + * Initializes the scissor region to full screen. + * Set up the framebuffer and z-buffer. + * The whole screen is filled with the color supplied as arguments. + * Letterbox is also applied here, and will share the color of the screen base. + */ +void Gfx_SetupFrame(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b) { OPEN_DISPS(gfxCtx); + // Set up the RDP render state for rectangles in FILL mode gSPDisplayList(POLY_OPA_DISP++, sFillSetupDL); gSPDisplayList(POLY_XLU_DISP++, sFillSetupDL); gSPDisplayList(POLY_KAL_DISP++, sFillSetupDL); gSPDisplayList(OVERLAY_DISP++, sFillSetupDL); + // Set the scissor region to the full screen gDPSetScissor(POLY_OPA_DISP++, G_SC_NON_INTERLACE, 0, 0, gScreenWidth, gScreenHeight); gDPSetScissor(POLY_XLU_DISP++, G_SC_NON_INTERLACE, 0, 0, gScreenWidth, gScreenHeight); gDPSetScissor(POLY_KAL_DISP++, G_SC_NON_INTERLACE, 0, 0, gScreenWidth, gScreenHeight); gDPSetScissor(OVERLAY_DISP++, G_SC_NON_INTERLACE, 0, 0, gScreenWidth, gScreenHeight); + // Set up the framebuffer, primitives will be drawn here 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(POLY_KAL_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); + // Set up the z-buffer gDPSetDepthImage(POLY_OPA_DISP++, gZBuffer); gDPSetDepthImage(POLY_XLU_DISP++, gZBuffer); gDPSetDepthImage(POLY_KAL_DISP++, gZBuffer); gDPSetDepthImage(OVERLAY_DISP++, gZBuffer); if ((R_PAUSE_MENU_MODE < 2) && (gTrnsnUnkState < 2)) { - s32 ret = ShrinkWindow_GetCurrentVal(); + s32 letterboxSize = ShrinkWindow_GetCurrentVal(); // Upstream TODO: Letterbox if (HREG(80) == 16) { if (HREG(95) != 16) { @@ -1500,7 +1512,7 @@ void func_80095248(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b) { } if (HREG(81) & 1) { - HREG(83) = ret; + HREG(83) = letterboxSize; } if (HREG(81) & 2) { @@ -1510,7 +1522,7 @@ void func_80095248(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b) { } if (HREG(82) & 1) { - ret = HREG(83); + letterboxSize = HREG(83); } if (HREG(82) & 2) { @@ -1520,27 +1532,32 @@ void func_80095248(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b) { } } + // Set the whole z buffer to maximum depth + // Don't bother with pixels that are being covered by the letterbox 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(POLY_OPA_DISP++, 0, ret, gScreenWidth - 1, gScreenHeight - ret - 1); + gDPSetFillColor(POLY_OPA_DISP++, (GPACK_ZDZ(G_MAXFBZ, 0) << 16) | GPACK_ZDZ(G_MAXFBZ, 0)); + gDPFillRectangle(POLY_OPA_DISP++, 0, letterboxSize, gScreenWidth - 1, gScreenHeight - letterboxSize - 1); gDPPipeSync(POLY_OPA_DISP++); + // Fill the whole screen with the base color + // Don't bother with pixels that are being covered by the letterbox 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); + gDPFillRectangle(POLY_OPA_DISP++, 0, letterboxSize, gScreenWidth - 1, gScreenHeight - letterboxSize - 1); gDPPipeSync(POLY_OPA_DISP++); - if (ret > 0) { + // Draw the letterbox if applicable (uses the same color as the screen base) + if (letterboxSize > 0) { 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); + gDPFillRectangle(OVERLAY_DISP++, 0, 0, gScreenWidth - 1, letterboxSize - 1); + gDPFillRectangle(OVERLAY_DISP++, 0, gScreenHeight - letterboxSize, gScreenWidth - 1, gScreenHeight - 1); gDPPipeSync(OVERLAY_DISP++); } } diff --git a/soh/src/code/z_room.c b/soh/src/code/z_room.c index e1a3ca1aa..17f810c55 100644 --- a/soh/src/code/z_room.c +++ b/soh/src/code/z_room.c @@ -49,7 +49,7 @@ void func_80095AB4(PlayState* play, Room* room, u32 flags) { if (flags & 2) { func_8003435C(&D_801270A0, play); gSPSegment(POLY_XLU_DISP++, 0x03, room->segment); - func_80093D84(play->state.gfxCtx); + Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); } @@ -109,7 +109,7 @@ void func_80095D04(PlayState* play, Room* room, u32 flags) { if (flags & 2) { func_8003435C(&D_801270A0, play); //gSPSegment(POLY_XLU_DISP++, 0x03, room->segment); - func_80093D84(play->state.gfxCtx); + Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); } @@ -356,7 +356,7 @@ void func_80096680(PlayState* play, Room* room, u32 flags) { gSPSegment(POLY_OPA_DISP++, 0x03, room->segment); if (sp94) { - func_80093D18(play->state.gfxCtx); + Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPMatrix(POLY_OPA_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_OPA_DISP++, polygonDlist->opa); } @@ -383,7 +383,7 @@ void func_80096680(PlayState* play, Room* room, u32 flags) { if (sp90) { gSPSegment(POLY_XLU_DISP++, 0x03, room->segment); - func_80093D84(play->state.gfxCtx); + Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_XLU_DISP++, polygonDlist->xlu); } @@ -458,7 +458,7 @@ void func_80096B6C(PlayState* play, Room* room, u32 flags) { gSPSegment(POLY_OPA_DISP++, 0x03, room->segment); if (sp90) { - func_80093D18(play->state.gfxCtx); + Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPMatrix(POLY_OPA_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_OPA_DISP++, polygonDlist->opa); } @@ -484,7 +484,7 @@ void func_80096B6C(PlayState* play, Room* room, u32 flags) { if (sp8C) { gSPSegment(POLY_XLU_DISP++, 0x03, room->segment); - func_80093D84(play->state.gfxCtx); + Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_XLU_DISP++, polygonDlist->xlu); } diff --git a/soh/src/code/z_sample.c b/soh/src/code/z_sample.c index 0387d986b..ecd379443 100644 --- a/soh/src/code/z_sample.c +++ b/soh/src/code/z_sample.c @@ -16,7 +16,7 @@ void Sample_Draw(SampleContext* this) { gSPSegment(POLY_OPA_DISP++, 0x00, NULL); gSPSegment(POLY_OPA_DISP++, 0x01, this->staticSegment); - func_80095248(gfxCtx, 0, 0, 0); + Gfx_SetupFrame(gfxCtx, 0, 0, 0); view->flags = 1 | 2 | 4; func_800AAA50(view, 15); @@ -29,7 +29,7 @@ void Sample_Draw(SampleContext* this) { } POLY_OPA_DISP = Gfx_SetFog2(POLY_OPA_DISP, 255, 255, 255, 0, 0, 0); - func_80093D18(gfxCtx); + Gfx_SetupDL_25Opa(gfxCtx); gDPSetCycleType(POLY_OPA_DISP++, G_CYC_1CYCLE); gDPSetRenderMode(POLY_OPA_DISP++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); diff --git a/soh/src/code/z_vr_box_draw.c b/soh/src/code/z_vr_box_draw.c index 6e66df903..8eb97573e 100644 --- a/soh/src/code/z_vr_box_draw.c +++ b/soh/src/code/z_vr_box_draw.c @@ -17,7 +17,7 @@ void SkyboxDraw_Draw(SkyboxContext* skyboxCtx, GraphicsContext* gfxCtx, s16 skyb OPEN_DISPS(gfxCtx); FrameInterpolation_RecordOpenChild(NULL, FrameInterpolation_GetCameraEpoch()); - func_800945A0(gfxCtx); + Gfx_SetupDL_40Opa(gfxCtx); //gsSPShaderTest(POLY_OPA_DISP++); |
