1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 22:44:30 +00:00

Add "do {} while (0);" to CLOSE_DISPS (#2025)

This commit is contained in:
cadmic 2024-08-10 15:48:27 -07:00 committed by GitHub
parent d495436190
commit 9eec8af498
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
58 changed files with 37 additions and 159 deletions

View file

@ -197,8 +197,6 @@ void GameState_Draw(GameState* gameState, GraphicsContext* gfxCtx) {
Gfx_Close(polyOpaP, newDList);
POLY_OPA_DISP = newDList;
if (1) {}
CLOSE_DISPS(gfxCtx, "../game.c", 800);
Debug_DrawText(gfxCtx);
@ -238,8 +236,6 @@ void func_800C49F4(GraphicsContext* gfxCtx) {
Gfx_Close(polyOpaP, newDlist);
POLY_OPA_DISP = newDlist;
if (1) {}
CLOSE_DISPS(gfxCtx, "../game.c", 865);
}

View file

@ -246,8 +246,6 @@ void Graph_TaskSet00(GraphicsContext* gfxCtx) {
task->yield_data_ptr = gGfxSPTaskYieldBuffer;
if (1) {}
task->yield_data_size = sizeof(gGfxSPTaskYieldBuffer);
scTask->next = NULL;

View file

@ -308,8 +308,6 @@ void Debug_DrawText(GraphicsContext* gfxCtx) {
Gfx_Close(opaStart, gfx);
POLY_OPA_DISP = gfx;
if (1) {}
CLOSE_DISPS(gfxCtx, "../z_debug.c", 664);
GfxPrint_Destroy(&printer);

View file

@ -2222,7 +2222,6 @@ void CutsceneHandler_RunScript(PlayState* play, CutsceneContext* csCtx) {
Gfx_Close(prevDisplayList, displayList);
POLY_OPA_DISP = displayList;
if (1) {}
CLOSE_DISPS(play->state.gfxCtx, "../z_demo.c", 4108);
}
#endif

View file

@ -768,8 +768,6 @@ void GetItem_DrawSmallRupee(PlayState* play, s16 drawId) {
Matrix_Scale(0.7f, 0.7f, 0.7f, MTXMODE_APPLY);
if (1) {}
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 1140), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]);

View file

@ -452,8 +452,6 @@ void EffectBlure_DrawElemNoInterpolation(EffectBlure* this, EffectBlureElement*
vtx[2].v.cn[2] = sp7C.b;
vtx[2].v.cn[3] = sp7C.a;
if (1) {} // Necessary to match
sp60.x = sp84.x;
sp60.y = sp84.y;
sp60.z = sp84.z;

View file

@ -23,8 +23,6 @@ void func_80026230(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3) {
POLY_OPA_DISP = displayListHead;
if (1) {} // Necessary to match
CLOSE_DISPS(play->state.gfxCtx, "../z_eff_ss_dead.c", 129);
}
@ -44,8 +42,6 @@ void func_80026400(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3) {
POLY_OPA_DISP = displayListHead;
if (1) {} // Necessary to match
CLOSE_DISPS(play->state.gfxCtx, "../z_eff_ss_dead.c", 153);
}
}
@ -84,8 +80,6 @@ void func_80026690(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3) {
POLY_XLU_DISP = displayListHead;
if (1) {} // Necessary to match
CLOSE_DISPS(play->state.gfxCtx, "../z_eff_ss_dead.c", 194);
}

View file

@ -162,8 +162,6 @@ void SkelCurve_DrawLimb(PlayState* play, s32 limbIndex, SkelCurve* skelCurve, Ov
OPEN_DISPS(play->state.gfxCtx, "../z_fcurve_data_skelanime.c", 279);
if (1) {}
Matrix_Push();
if ((overrideLimbDraw == NULL) ||

View file

@ -984,7 +984,6 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
gSPEndDisplayList(displayList++);
Gfx_Close(prevDisplayList, displayList);
POLY_OPA_DISP = displayList;
if (1) {}
CLOSE_DISPS(play->state.gfxCtx, "../z_kankyo.c", 1690);
}
#endif

View file

@ -3870,7 +3870,6 @@ void Message_Draw(PlayState* play) {
Gfx_Close(polyOpaP, plusOne);
POLY_OPA_DISP = plusOne;
}
if (1) {}
#endif
plusOne = Gfx_Open(polyOpaP = POLY_OPA_DISP);

View file

@ -415,8 +415,6 @@ void Scene_DrawConfigWaterTemple(PlayState* play) {
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5535);
if (1) {} // Necessary to match
spB0 = (play->roomCtx.unk_74[1] >> 8) & 0xFF;
spAC = play->roomCtx.unk_74[1] & 0xFF;
gameplayFrames = play->gameplayFrames;
@ -709,8 +707,6 @@ void Scene_DrawConfigLakesideLaboratory(PlayState* play) {
32, 32));
gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TexScroll(play->state.gfxCtx, 0, 255 - (gameplayFrames * 10) % 256, 32, 64));
if (1) {}
gDPPipeSync(POLY_OPA_DISP++);
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
@ -748,8 +744,6 @@ void* sGTGEntranceTextures[] = {
void Scene_DrawConfigGerudoTrainingGround(PlayState* play) {
u32 gameplayFrames;
if (0) {} // Necessary to match
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6290);
gameplayFrames = play->gameplayFrames;
@ -914,8 +908,6 @@ void* sForestTempleEntranceTextures[] = {
void Scene_DrawConfigForestTemple(PlayState* play) {
u32 gameplayFrames;
if (0) {} // Necessary to match
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6640);
gameplayFrames = play->gameplayFrames;
@ -1042,8 +1034,6 @@ void Scene_DrawConfigZorasRiver(PlayState* play) {
(gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128,
32, 32));
if (1) {}
gDPPipeSync(POLY_OPA_DISP++);
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
@ -1177,8 +1167,6 @@ void Scene_DrawConfigZorasFountain(PlayState* play) {
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (gameplayFrames * 1) % 128, 32, 32, 1, 0,
(gameplayFrames * 1) % 128, 32, 32));
if (1) {}
gDPPipeSync(POLY_OPA_DISP++);
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
@ -1552,8 +1540,6 @@ void Scene_DrawConfigInsideGanonsCastle(PlayState* play) {
gameplayFrames = play->gameplayFrames;
if (1) {}
gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128,
(gameplayFrames * 1) % 512, 32, 128, 1, gameplayFrames % 128,
@ -1659,7 +1645,8 @@ void (*sSceneDrawConfigs[SDC_MAX])(PlayState*) = {
};
void Scene_Draw(PlayState* play) {
if ((R_HREG_MODE == HREG_MODE_SCENE_CONFIG) && OOT_DEBUG) {
#if OOT_DEBUG
if (R_HREG_MODE == HREG_MODE_SCENE_CONFIG) {
if (R_SCENE_CONFIG_INIT != HREG_MODE_SCENE_CONFIG) {
R_SCENE_CONFIG_INIT = HREG_MODE_SCENE_CONFIG;
R_SCENE_CONFIG_DRAW_DEFAULT_DLIST = 1;
@ -1694,4 +1681,7 @@ void Scene_Draw(PlayState* play) {
} else {
sSceneDrawConfigs[play->sceneDrawConfig](play);
}
#else
sSceneDrawConfigs[play->sceneDrawConfig](play);
#endif
}