From 9eec8af4981ec7a6b75b1850713c061d83099e6b Mon Sep 17 00:00:00 2001 From: cadmic Date: Sat, 10 Aug 2024 15:48:27 -0700 Subject: [PATCH] Add "do {} while (0);" to CLOSE_DISPS (#2025) --- include/macros.h | 10 +++++--- src/code/game.c | 4 --- src/code/graph.c | 2 -- src/code/z_debug.c | 2 -- src/code/z_demo.c | 1 - src/code/z_draw.c | 2 -- src/code/z_eff_blure.c | 2 -- src/code/z_eff_ss_dead.c | 6 ----- src/code/z_fcurve_data_skelanime.c | 2 -- src/code/z_kankyo.c | 1 - src/code/z_message.c | 1 - src/code/z_scene_table.c | 20 ++++----------- .../actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c | 2 -- .../actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c | 1 - .../ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c | 1 - .../ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c | 1 - .../ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c | 2 -- .../ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c | 2 -- .../z_bg_spot16_doughnut.c | 2 -- .../z_bg_spot17_bakudankabe.c | 6 ++--- .../ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c | 2 -- .../actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c | 2 -- .../actors/ovl_Boss_Ganon/z_boss_ganon.c | 4 --- .../actors/ovl_Boss_Ganon2/z_boss_ganon2.c | 3 --- .../ovl_Boss_Ganondrof/z_boss_ganondrof.c | 1 - src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c | 1 - src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c | 4 --- src/overlays/actors/ovl_Boss_Va/z_boss_va.c | 2 -- .../actors/ovl_Demo_Kankyo/z_demo_kankyo.c | 25 +++++++++---------- src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c | 2 -- .../actors/ovl_Door_Shutter/z_door_shutter.c | 1 - .../actors/ovl_En_Bigokuta/z_en_bigokuta.c | 2 -- src/overlays/actors/ovl_En_Bom/z_en_bom.c | 4 --- src/overlays/actors/ovl_En_Bombf/z_en_bombf.c | 2 -- src/overlays/actors/ovl_En_Boom/z_en_boom.c | 2 -- .../actors/ovl_En_Bubble/z_en_bubble.c | 2 -- src/overlays/actors/ovl_En_Bw/z_en_bw.c | 2 -- src/overlays/actors/ovl_En_Daiku/z_en_daiku.c | 2 -- .../z_en_daiku_kakariko.c | 2 -- .../actors/ovl_En_Dekubaba/z_en_dekubaba.c | 1 - .../actors/ovl_En_Fd_Fire/z_en_fd_fire.c | 1 - src/overlays/actors/ovl_En_Fz/z_en_fz.c | 2 -- src/overlays/actors/ovl_En_GeldB/z_en_geldb.c | 1 - src/overlays/actors/ovl_En_Hy/z_en_hy.c | 2 -- src/overlays/actors/ovl_En_Mm/z_en_mm.c | 2 -- .../actors/ovl_En_Po_Field/z_en_po_field.c | 4 --- .../actors/ovl_En_Po_Relay/z_en_po_relay.c | 1 - src/overlays/actors/ovl_En_Rd/z_en_rd.c | 2 -- src/overlays/actors/ovl_En_Rr/z_en_rr.c | 24 ++++++++---------- .../actors/ovl_En_Siofuki/z_en_siofuki.c | 2 -- .../actors/ovl_En_Wallmas/z_en_wallmas.c | 2 -- src/overlays/actors/ovl_Fishing/z_fishing.c | 2 -- .../actors/ovl_Obj_Syokudai/z_obj_syokudai.c | 2 -- .../ovl_Object_Kankyo/z_object_kankyo.c | 3 --- .../actors/ovl_Oceff_Wipe/z_oceff_wipe.c | 2 -- .../actors/ovl_player_actor/z_player.c | 2 -- .../ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.c | 4 --- .../ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c | 2 -- 58 files changed, 37 insertions(+), 159 deletions(-) diff --git a/include/macros.h b/include/macros.h index 37eb4fc9eb..ed55509b6b 100644 --- a/include/macros.h +++ b/include/macros.h @@ -187,9 +187,11 @@ extern struct GraphicsContext* __gfxCtx; (void)__gfxCtx; \ Graph_OpenDisps(dispRefs, gfxCtx, file, line) -#define CLOSE_DISPS(gfxCtx, file, line) \ - Graph_CloseDisps(dispRefs, gfxCtx, file, line); \ - } \ +#define CLOSE_DISPS(gfxCtx, file, line) \ + do { \ + Graph_CloseDisps(dispRefs, gfxCtx, file, line); \ + } while (0); \ + } \ (void)0 #define GRAPH_ALLOC(gfxCtx, size) Graph_Alloc(gfxCtx, size) @@ -221,7 +223,7 @@ extern struct GraphicsContext* __gfxCtx; s32 __dispPad #define CLOSE_DISPS(gfxCtx, file, line) \ - (void)0; \ + do {} while (0); \ } \ (void)0 diff --git a/src/code/game.c b/src/code/game.c index 7d290e3329..ec67cde03e 100644 --- a/src/code/game.c +++ b/src/code/game.c @@ -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); } diff --git a/src/code/graph.c b/src/code/graph.c index 92df90d8ff..3e5df91458 100644 --- a/src/code/graph.c +++ b/src/code/graph.c @@ -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; diff --git a/src/code/z_debug.c b/src/code/z_debug.c index 652b6f643a..7a38b3dedb 100644 --- a/src/code/z_debug.c +++ b/src/code/z_debug.c @@ -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); diff --git a/src/code/z_demo.c b/src/code/z_demo.c index efecba8dea..f86e32dcc5 100644 --- a/src/code/z_demo.c +++ b/src/code/z_demo.c @@ -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 diff --git a/src/code/z_draw.c b/src/code/z_draw.c index f890804eb3..671b8d0e2a 100644 --- a/src/code/z_draw.c +++ b/src/code/z_draw.c @@ -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]); diff --git a/src/code/z_eff_blure.c b/src/code/z_eff_blure.c index 47722faaf8..09715288aa 100644 --- a/src/code/z_eff_blure.c +++ b/src/code/z_eff_blure.c @@ -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; diff --git a/src/code/z_eff_ss_dead.c b/src/code/z_eff_ss_dead.c index be283f773c..c77b7f2153 100644 --- a/src/code/z_eff_ss_dead.c +++ b/src/code/z_eff_ss_dead.c @@ -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); } diff --git a/src/code/z_fcurve_data_skelanime.c b/src/code/z_fcurve_data_skelanime.c index e4d4b8a772..2348fa13a4 100644 --- a/src/code/z_fcurve_data_skelanime.c +++ b/src/code/z_fcurve_data_skelanime.c @@ -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) || diff --git a/src/code/z_kankyo.c b/src/code/z_kankyo.c index aeef9228c0..f0f36341d6 100644 --- a/src/code/z_kankyo.c +++ b/src/code/z_kankyo.c @@ -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 diff --git a/src/code/z_message.c b/src/code/z_message.c index 2aa9a3ff84..620a6d0868 100644 --- a/src/code/z_message.c +++ b/src/code/z_message.c @@ -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); diff --git a/src/code/z_scene_table.c b/src/code/z_scene_table.c index b38aa2c8e2..d1cd007abd 100644 --- a/src/code/z_scene_table.c +++ b/src/code/z_scene_table.c @@ -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 } diff --git a/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c b/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c index 759c3ce0f0..b83921bf6c 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c +++ b/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c @@ -326,8 +326,6 @@ void BgHakaGate_DrawFlame(BgHakaGate* this, PlayState* play) { Matrix_RotateY(BINANG_TO_RAD(Camera_GetCamDirYaw(GET_ACTIVE_CAM(play))), MTXMODE_APPLY); scale = this->vFlameScale * 0.00001f; - if (1) {} - Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_bg_haka_gate.c", 744), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c b/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c index bd3c656424..74ec4f9998 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c +++ b/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c @@ -228,7 +228,6 @@ void BgHakaTubo_DrawFlameCircle(BgHakaTubo* this, PlayState* play) { MTXMODE_NEW); Matrix_RotateY(BINANG_TO_RAD(this->dyna.actor.shape.rot.y), MTXMODE_APPLY); Matrix_Scale(0.07f, 0.04f, 0.07f, MTXMODE_APPLY); - if (1) {} gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 0, 170, 255, 255); gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 255, 255); gSPSegment(POLY_XLU_DISP++, 0x08, diff --git a/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c b/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c index e801488785..e0f0b78213 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c +++ b/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c @@ -225,7 +225,6 @@ void BgJyaBigmirror_DrawLightBeam(Actor* thisx, PlayState* play) { gSPDisplayList(POLY_XLU_DISP++, gBigMirror1DL); if (lift != NULL) { - if (1) {} Matrix_SetTranslateRotateYXZ(lift->world.pos.x, lift->world.pos.y, lift->world.pos.z, &D_80893F4C); Matrix_Scale(0.1f, 0.1f, 0.1f, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_bg_jya_bigmirror.c", 467), diff --git a/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c b/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c index 558931bc9d..3123b1ea5b 100644 --- a/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c +++ b/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c @@ -522,7 +522,6 @@ void BgMizuBwall_Draw(Actor* thisx, PlayState* play2) { u32 frames; OPEN_DISPS(play->state.gfxCtx, "../z_bg_mizu_bwall.c", 1095); - if (1) {} frames = play->gameplayFrames; Gfx_SetupDL_25Opa(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c b/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c index 92c9389ceb..302d72a68c 100644 --- a/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c +++ b/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c @@ -382,8 +382,6 @@ void BgMizuMovebg_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; u32 frames; - if (1) {} - OPEN_DISPS(play->state.gfxCtx, "../z_bg_mizu_movebg.c", 754); frames = play->gameplayFrames; diff --git a/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c b/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c index cbeb926fa5..39bd576873 100644 --- a/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c +++ b/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c @@ -147,8 +147,6 @@ void BgSpot03Taki_Draw(Actor* thisx, PlayState* play) { gSPDisplayList(POLY_XLU_DISP++, object_spot03_object_DL_001580); - if (1) {} - CLOSE_DISPS(play->state.gfxCtx, "../z_bg_spot03_taki.c", 358); this->bufferIndex = this->bufferIndex == 0; diff --git a/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c b/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c index 4dceef1ed7..23c3cb1692 100644 --- a/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c +++ b/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c @@ -125,8 +125,6 @@ void BgSpot16Doughnut_Draw(Actor* thisx, PlayState* play) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); - if (1) {} - gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_bg_spot16_doughnut.c", 213), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (this->fireFlag & 1) { diff --git a/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c b/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c index 7c59bfe393..ddb0b0f26b 100644 --- a/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c +++ b/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c @@ -123,9 +123,9 @@ void BgSpot17Bakudankabe_Update(Actor* thisx, PlayState* play) { } void BgSpot17Bakudankabe_Draw(Actor* thisx, PlayState* play) { - s32 pad; - s8 r = coss(play->gameplayFrames * 1500) >> 8; - s8 g = coss(play->gameplayFrames * 1500) >> 8; + PlayState* play2 = (PlayState*)play; + s8 r = coss(play2->gameplayFrames * 1500) >> 8; + s8 g = coss(play2->gameplayFrames * 1500) >> 8; OPEN_DISPS(play->state.gfxCtx, "../z_bg_spot17_bakudankabe.c", 269); diff --git a/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c b/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c index 75900983a4..9c5134bb0f 100644 --- a/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c +++ b/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c @@ -67,7 +67,5 @@ void func_808B7478(Actor* thisx, PlayState* play) { 1, 0, (0 - play->gameplayFrames) & 0x7F, 0x20, 0x20)); gSPDisplayList(POLY_XLU_DISP++, gCraterSmokeConeDL); - if (1) {} - CLOSE_DISPS(play->state.gfxCtx, "../z_bg_spot17_funen.c", 176); } diff --git a/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c b/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c index 6c3594de12..f679c9705c 100644 --- a/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c +++ b/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c @@ -418,8 +418,6 @@ void BgYdanSp_Draw(Actor* thisx, PlayState* play) { OPEN_DISPS(play->state.gfxCtx, "../z_bg_ydan_sp.c", 781); - if (1) {} - Gfx_SetupDL_25Xlu(play->state.gfxCtx); if (thisx->params == WEB_WALL) { gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_bg_ydan_sp.c", 787), diff --git a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c index 0f453078a0..f4d050ac1a 100644 --- a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c +++ b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c @@ -3519,8 +3519,6 @@ void BossGanon_DrawBigMagicCharge(BossGanon* this, PlayState* play) { Matrix_Pop(); } - if (1) {} - CLOSE_DISPS(gfxCtx, "../z_boss_ganon.c", 7721); } } @@ -4177,8 +4175,6 @@ void BossGanon_LightBall_Draw(Actor* thisx, PlayState* play) { gSPDisplayList(POLY_XLU_DISP++, gGanondorfSquareDL); } - if (1) {} - CLOSE_DISPS(play->state.gfxCtx, "../z_boss_ganon.c", 9911); } diff --git a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c index 8d812e072b..904dc40b5f 100644 --- a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c +++ b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c @@ -2486,7 +2486,6 @@ void func_80904340(BossGanon2* this, PlayState* play) { } Matrix_Pop(); - if (1) {} CLOSE_DISPS(gameState->gfxCtx, "../z_boss_ganon2.c", 5255); } @@ -2640,8 +2639,6 @@ void func_80904D88(BossGanon2* this, PlayState* play) { } } - if (1) {} - CLOSE_DISPS(gameState->gfxCtx, "../z_boss_ganon2.c", 5622); } diff --git a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c index 5424ee7031..98aa721bb0 100644 --- a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c +++ b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c @@ -1520,7 +1520,6 @@ void BossGanondrof_Draw(Actor* thisx, PlayState* play) { BossGanondrof_PostLimbDraw, this); PRINTF("DRAW 22\n"); POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP); - if (1) {} CLOSE_DISPS(play->state.gfxCtx, "../z_boss_ganondrof.c", 3814); PRINTF("DRAW END %d\n", this->actor.params); } diff --git a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c index 7e9555ac5e..1f5dc938fe 100644 --- a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c +++ b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c @@ -2753,7 +2753,6 @@ void BossMo_DrawTent(Actor* thisx, PlayState* play) { if (this->drawActor) { BossMo_DrawTentacle(this, play); } - if (1) {} CLOSE_DISPS(play->state.gfxCtx, "../z_boss_mo.c", 7023); } diff --git a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c index be2c9c21ab..ebd911e99d 100644 --- a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c +++ b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c @@ -3299,8 +3299,6 @@ void func_80941BC0(BossTw* this, PlayState* play) { gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaEffectHaloDL)); Matrix_Pop(); - if (1) {} - CLOSE_DISPS(play->state.gfxCtx, "../z_boss_tw.c", 6461); } @@ -3565,8 +3563,6 @@ void BossTw_Draw(Actor* thisx, PlayState* play2) { } } - if (1) {} - CLOSE_DISPS(play->state.gfxCtx, "../z_boss_tw.c", 7123); } diff --git a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c index 634d855003..c84328b57c 100644 --- a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c +++ b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c @@ -3149,8 +3149,6 @@ void BossVa_BariPostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* gSPDisplayList(POLY_XLU_DISP++, *dList); } - if (1) {} - CLOSE_DISPS(play->state.gfxCtx, "../z_boss_va.c", 4517); } diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c index 2c5e6ccefc..cd106c8519 100644 --- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c +++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c @@ -764,11 +764,11 @@ void DemoKankyo_DrawWarpSparkles(Actor* thisx, PlayState* play) { static u32 D_8098CF94; static Vec3f D_8098CF98; + PlayState* play2 = (PlayState*)play; s16 i; f32 temp_f22; DemoKankyo* this = (DemoKankyo*)thisx; - Gfx* disp; - Player* player = GET_PLAYER(play); + Player* player = GET_PLAYER(play2); Vec3f camPos; f32 translateX; f32 translateY; @@ -800,7 +800,7 @@ void DemoKankyo_DrawWarpSparkles(Actor* thisx, PlayState* play) { &this->unk_150[i].unk_1C) != 0) { this->unk_150[i].unk_22++; } - if (play->sceneId == SCENE_TEMPLE_OF_TIME && play->csCtx.curFrame == 25) { + if (play2->sceneId == SCENE_TEMPLE_OF_TIME && play2->csCtx.curFrame == 25) { this->unk_150[i].unk_22++; } } else { @@ -810,7 +810,7 @@ void DemoKankyo_DrawWarpSparkles(Actor* thisx, PlayState* play) { &this->unk_150[i].unk_1C) != 0) { this->unk_150[i].unk_22++; } - if (D_8098CF84 < play->csCtx.curFrame && this->actor.params == DEMOKANKYO_WARP_OUT) { + if (D_8098CF84 < play2->csCtx.curFrame && this->actor.params == DEMOKANKYO_WARP_OUT) { this->unk_150[i].unk_22++; } } @@ -820,11 +820,11 @@ void DemoKankyo_DrawWarpSparkles(Actor* thisx, PlayState* play) { case 2: if (this->actor.params == DEMOKANKYO_WARP_OUT) { if (i == 0) { - Environment_WarpSongLeave(play); + Environment_WarpSongLeave(play2); this->unk_150[i].unk_22++; } - } else if (i + 1 == this->sparkleCounter && play->csCtx.state == CS_STATE_IDLE) { - Interface_SetSubTimerToFinalSecond(play); + } else if (i + 1 == this->sparkleCounter && play2->csCtx.state == CS_STATE_IDLE) { + Interface_SetSubTimerToFinalSecond(play2); Actor_Kill(&this->actor); } break; @@ -862,7 +862,6 @@ void DemoKankyo_DrawWarpSparkles(Actor* thisx, PlayState* play) { translateZ = this->unk_150[i].unk_C.z + this->unk_150[i].unk_0.z; if (this->unk_150[i].unk_22 < 2) { - disp = (Gfx*)(uintptr_t)gEffFlash1DL; // necessary to match but probably fake if (linkAge != LINK_AGE_ADULT) { Matrix_Translate(translateX, translateY, translateZ, MTXMODE_NEW); } else { @@ -873,9 +872,9 @@ void DemoKankyo_DrawWarpSparkles(Actor* thisx, PlayState* play) { this->unk_150[i].unk_18 * (0.018f * temp_f22), MTXMODE_APPLY); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 255, 255, 255, 255); if (this->actor.params == DEMOKANKYO_WARP_OUT) { - gDPSetEnvColor(POLY_XLU_DISP++, sWarpSparkleEnvColors[play->msgCtx.lastPlayedSong].r, - sWarpSparkleEnvColors[play->msgCtx.lastPlayedSong].g, - sWarpSparkleEnvColors[play->msgCtx.lastPlayedSong].b, 255); + gDPSetEnvColor(POLY_XLU_DISP++, sWarpSparkleEnvColors[play2->msgCtx.lastPlayedSong].r, + sWarpSparkleEnvColors[play2->msgCtx.lastPlayedSong].g, + sWarpSparkleEnvColors[play2->msgCtx.lastPlayedSong].b, 255); } else { s8 respawnData = gSaveContext.respawn[RESPAWN_MODE_RETURN].data; @@ -883,11 +882,11 @@ void DemoKankyo_DrawWarpSparkles(Actor* thisx, PlayState* play) { sWarpSparkleEnvColors[respawnData].g, sWarpSparkleEnvColors[respawnData].b, 255); } Gfx_SetupDL_25Xlu(play->state.gfxCtx); - Matrix_Mult(&play->billboardMtxF, MTXMODE_APPLY); + Matrix_Mult(&play2->billboardMtxF, MTXMODE_APPLY); Matrix_RotateZ(DEG_TO_RAD(this->unk_150[i].unk_24), MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_demo_kankyo.c", 2011), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, disp); + gSPDisplayList(POLY_XLU_DISP++, gEffFlash1DL); this->unk_150[i].unk_24 += 0x190; } } diff --git a/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c b/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c index 980bdd800d..0e1fce9315 100644 --- a/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c +++ b/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c @@ -117,7 +117,5 @@ void DemoShd_Draw(Actor* thisx, PlayState* play) { gSPDisplayList(POLY_XLU_DISP++, D_809934B8); } - if (1) {} // Necessary to match - CLOSE_DISPS(play->state.gfxCtx, "../z_demo_shd.c", 762); } diff --git a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c index 11baa1f380..fc1ca4ec71 100644 --- a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c +++ b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c @@ -973,7 +973,6 @@ s32 DoorShutter_ShouldDraw(DoorShutter* this, PlayState* play) { void DoorShutter_Draw(Actor* thisx, PlayState* play) { DoorShutter* this = (DoorShutter*)thisx; - if (1) {} if (1) {} //! @bug This actor is not fully initialized until the required object dependency is loaded. diff --git a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c index 9cb4514e4e..664ca1bd7f 100644 --- a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c +++ b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c @@ -837,7 +837,6 @@ s32 EnBigokuta_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, temp_f0, temp_f0, temp_f0, 255); - if (1) {} CLOSE_DISPS(play->state.gfxCtx, "../z_en_bigokuta.c", 1945); } } else if (limbIndex == 10) { @@ -849,7 +848,6 @@ s32 EnBigokuta_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec } gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, intensity, intensity, intensity, intensity); - if (1) {} CLOSE_DISPS(play->state.gfxCtx, "../z_en_bigokuta.c", 1972); } else if (limbIndex == 17 && this->actionFunc == func_809BE26C) { if (this->unk_198 < 5) { diff --git a/src/overlays/actors/ovl_En_Bom/z_en_bom.c b/src/overlays/actors/ovl_En_Bom/z_en_bom.c index 62f532021b..0bb4ffc2d9 100644 --- a/src/overlays/actors/ovl_En_Bom/z_en_bom.c +++ b/src/overlays/actors/ovl_En_Bom/z_en_bom.c @@ -359,10 +359,6 @@ void EnBom_Draw(Actor* thisx, PlayState* play) { s32 pad; EnBom* this = (EnBom*)thisx; -#if OOT_DEBUG - if (1) {} -#endif - OPEN_DISPS(play->state.gfxCtx, "../z_en_bom.c", 913); if (thisx->params == BOMB_BODY) { diff --git a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c index 093aefd71d..d1c6bf379c 100644 --- a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c +++ b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c @@ -508,7 +508,5 @@ void EnBombf_Draw(Actor* thisx, PlayState* play) { Collider_UpdateSpheres(0, &this->explosionCollider); } - if (1) {} - CLOSE_DISPS(play->state.gfxCtx, "../z_en_bombf.c", 1063); } diff --git a/src/overlays/actors/ovl_En_Boom/z_en_boom.c b/src/overlays/actors/ovl_En_Boom/z_en_boom.c index d64acac796..4450db093a 100644 --- a/src/overlays/actors/ovl_En_Boom/z_en_boom.c +++ b/src/overlays/actors/ovl_En_Boom/z_en_boom.c @@ -272,7 +272,5 @@ void EnBoom_Draw(Actor* thisx, PlayState* play) { G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, gBoomerangRefDL); - if (1) {} - CLOSE_DISPS(play->state.gfxCtx, "../z_en_boom.c", 604); } diff --git a/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c b/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c index faaaaa2936..093e9aa1b0 100644 --- a/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c +++ b/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c @@ -425,8 +425,6 @@ void EnBubble_Draw(Actor* thisx, PlayState* play) { gSPDisplayList(POLY_XLU_DISP++, gBubbleDL); } - if (1) {} - CLOSE_DISPS(play->state.gfxCtx, "../z_en_bubble.c", 1226); if (this->actionFunc != EnBubble_Disappear) { diff --git a/src/overlays/actors/ovl_En_Bw/z_en_bw.c b/src/overlays/actors/ovl_En_Bw/z_en_bw.c index a93135cd4a..e9f062e153 100644 --- a/src/overlays/actors/ovl_En_Bw/z_en_bw.c +++ b/src/overlays/actors/ovl_En_Bw/z_en_bw.c @@ -907,7 +907,5 @@ void EnBw_Draw(Actor* thisx, PlayState* play2) { } } - if (1) {} - CLOSE_DISPS(play->state.gfxCtx, "../z_en_bw.c", 1521); } diff --git a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c index bd18562849..6a497d3185 100644 --- a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c +++ b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c @@ -607,8 +607,6 @@ void EnDaiku_Draw(Actor* thisx, PlayState* play) { SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, EnDaiku_OverrideLimbDraw, EnDaiku_PostLimbDraw, this); - if (1) {} - CLOSE_DISPS(play->state.gfxCtx, "../z_en_daiku.c", 1255); } diff --git a/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c b/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c index 4475138a27..787551cf77 100644 --- a/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c +++ b/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c @@ -562,7 +562,5 @@ void EnDaikuKakariko_Draw(Actor* thisx, PlayState* play) { SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, EnDaikuKakariko_OverrideLimbDraw, EnDaikuKakariko_PostLimbDraw, thisx); - if (1) {} - CLOSE_DISPS(play->state.gfxCtx, "../z_en_daiku_kakariko.c", 1151); } diff --git a/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c b/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c index 3060562f3c..11f2d0e94d 100644 --- a/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c +++ b/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c @@ -1278,7 +1278,6 @@ void EnDekubaba_Draw(Actor* thisx, PlayState* play) { EnDekubaba* this = (EnDekubaba*)thisx; f32 scale; - if (1) {} OPEN_DISPS(play->state.gfxCtx, "../z_en_dekubaba.c", 2752); Gfx_SetupDL_25Opa(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c b/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c index 83da31b513..942a8de3a0 100644 --- a/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c +++ b/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c @@ -255,7 +255,6 @@ void EnFdFire_Draw(Actor* thisx, PlayState* play) { sp80 = Math_Vec3f_DistXZ(&scale, &this->actor.velocity) / 1.5f; if (1) {} if (1) {} - if (1) {} Matrix_RotateY(BINANG_TO_RAD((s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) + 0x8000)), MTXMODE_APPLY); Matrix_RotateZ(DEG_TO_RAD((sp88 * -10.0f) * sp80), MTXMODE_APPLY); scale.x = scale.y = scale.z = this->scale * 0.001f; diff --git a/src/overlays/actors/ovl_En_Fz/z_en_fz.c b/src/overlays/actors/ovl_En_Fz/z_en_fz.c index aef5196772..158daf3687 100644 --- a/src/overlays/actors/ovl_En_Fz/z_en_fz.c +++ b/src/overlays/actors/ovl_En_Fz/z_en_fz.c @@ -722,8 +722,6 @@ void EnFz_Draw(Actor* thisx, PlayState* play) { OPEN_DISPS(play->state.gfxCtx, "../z_en_fz.c", 1167); - if (1) {} - if (this->actor.colChkInfo.health == 0) { index = 2; } diff --git a/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c b/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c index 575623fdd0..ea99032f46 100644 --- a/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c +++ b/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c @@ -1567,7 +1567,6 @@ void EnGeldB_Draw(Actor* thisx, PlayState* play) { EnGeldB* this = (EnGeldB*)thisx; OPEN_DISPS(play->state.gfxCtx, "../z_en_geldB.c", 2672); - if (1) {} if ((this->spinAttackState >= 2) && SkelAnime_Update(&this->skelAnime)) { if (this->spinAttackState == 2) { diff --git a/src/overlays/actors/ovl_En_Hy/z_en_hy.c b/src/overlays/actors/ovl_En_Hy/z_en_hy.c index a36946bec8..6b9cd5b1d4 100644 --- a/src/overlays/actors/ovl_En_Hy/z_en_hy.c +++ b/src/overlays/actors/ovl_En_Hy/z_en_hy.c @@ -1141,8 +1141,6 @@ s32 EnHy_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po rot->z += Math_CosS(this->unk_23C[limbIndex]) * 200.0f; } - if (1) {} - CLOSE_DISPS(play->state.gfxCtx, "../z_en_hy.c", 2228); return false; diff --git a/src/overlays/actors/ovl_En_Mm/z_en_mm.c b/src/overlays/actors/ovl_En_Mm/z_en_mm.c index 6813a3fcb6..48771d5490 100644 --- a/src/overlays/actors/ovl_En_Mm/z_en_mm.c +++ b/src/overlays/actors/ovl_En_Mm/z_en_mm.c @@ -558,8 +558,6 @@ void EnMm_Draw(Actor* thisx, PlayState* play) { } } - if (1) {} - CLOSE_DISPS(play->state.gfxCtx, "../z_en_mm.c", 1141); } diff --git a/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c b/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c index 56d53d4dd5..88542082e9 100644 --- a/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c +++ b/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c @@ -796,8 +796,6 @@ void EnPoField_DrawFlame(EnPoField* this, PlayState* play) { G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gEffFire1DL); - if (1) {} - CLOSE_DISPS(play->state.gfxCtx, "../z_en_po_field.c", 1712); } } @@ -1000,8 +998,6 @@ void EnPoField_DrawSoul(Actor* thisx, PlayState* play) { gSPDisplayList(POLY_XLU_DISP++, gPoeFieldSoulDL); } - if (1) {} - CLOSE_DISPS(play->state.gfxCtx, "../z_en_po_field.c", 2149); EnPoField_DrawFlame(this, play); } diff --git a/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c b/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c index da5bfd4b60..681770d82d 100644 --- a/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c +++ b/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c @@ -385,7 +385,6 @@ void EnPoRelay_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, this->lightColor.r, this->lightColor.g, this->lightColor.b, 128); gSPDisplayList(POLY_OPA_DISP++, gDampeLanternDL); - if (1) {} CLOSE_DISPS(play->state.gfxCtx, "../z_en_po_relay.c", 901); Matrix_MultVec3f(&D_80AD8D48, &vec); Lights_PointNoGlowSetInfo(&this->lightInfo, vec.x, vec.y, vec.z, this->lightColor.r, this->lightColor.g, diff --git a/src/overlays/actors/ovl_En_Rd/z_en_rd.c b/src/overlays/actors/ovl_En_Rd/z_en_rd.c index 2280d6ee1b..b20ed63dd3 100644 --- a/src/overlays/actors/ovl_En_Rd/z_en_rd.c +++ b/src/overlays/actors/ovl_En_Rd/z_en_rd.c @@ -994,7 +994,5 @@ void EnRd_Draw(Actor* thisx, PlayState* play) { func_80033C30(&thisPos, &sShadowScale, this->alpha, play); } - if (1) {} - CLOSE_DISPS(play->state.gfxCtx, "../z_en_rd.c", 1735); } diff --git a/src/overlays/actors/ovl_En_Rr/z_en_rr.c b/src/overlays/actors/ovl_En_Rr/z_en_rr.c index 21e032474f..34e1bd21c8 100644 --- a/src/overlays/actors/ovl_En_Rr/z_en_rr.c +++ b/src/overlays/actors/ovl_En_Rr/z_en_rr.c @@ -901,20 +901,18 @@ void EnRr_Draw(Actor* thisx, PlayState* play) { s32 offIndex; this->actor.colorFilterTimer++; - if ((effectTimer & 1) != 0) { - return; - } + if ((effectTimer & 1) == 0) { + segIndex = 4 - (effectTimer >> 2); + offIndex = (effectTimer >> 1) & 3; - segIndex = 4 - (effectTimer >> 2); - offIndex = (effectTimer >> 1) & 3; - - effectPos.x = this->effectPos[segIndex].x + sEffectOffsets[offIndex].x + Rand_CenteredFloat(10.0f); - effectPos.y = this->effectPos[segIndex].y + sEffectOffsets[offIndex].y + Rand_CenteredFloat(10.0f); - effectPos.z = this->effectPos[segIndex].z + sEffectOffsets[offIndex].z + Rand_CenteredFloat(10.0f); - if (this->actor.colorFilterParams & 0x4000) { - EffectSsEnFire_SpawnVec3f(play, &this->actor, &effectPos, 100, 0, 0, -1); - } else { - EffectSsEnIce_SpawnFlyingVec3f(play, &this->actor, &effectPos, 150, 150, 150, 250, 235, 245, 255, 3.0f); + effectPos.x = this->effectPos[segIndex].x + sEffectOffsets[offIndex].x + Rand_CenteredFloat(10.0f); + effectPos.y = this->effectPos[segIndex].y + sEffectOffsets[offIndex].y + Rand_CenteredFloat(10.0f); + effectPos.z = this->effectPos[segIndex].z + sEffectOffsets[offIndex].z + Rand_CenteredFloat(10.0f); + if (this->actor.colorFilterParams & 0x4000) { + EffectSsEnFire_SpawnVec3f(play, &this->actor, &effectPos, 100, 0, 0, -1); + } else { + EffectSsEnIce_SpawnFlyingVec3f(play, &this->actor, &effectPos, 150, 150, 150, 250, 235, 245, 255, 3.0f); + } } } } diff --git a/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c b/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c index 08cb1a9985..1335c1b7ad 100644 --- a/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c +++ b/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c @@ -294,8 +294,6 @@ void EnSiofuki_Draw(Actor* thisx, PlayState* play) { Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, x, y, 64, 64, 1, x, y, 64, 64)); gSPDisplayList(POLY_XLU_DISP++, object_siofuki_DL_000B70); - if (1) {} - CLOSE_DISPS(play->state.gfxCtx, "../z_en_siofuki.c", 674); if (this->sfxFlags & 1) { diff --git a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c index e6083208e1..9e56239051 100644 --- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c +++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c @@ -609,8 +609,6 @@ void EnWallmas_DrawXlu(EnWallmas* this, PlayState* play) { gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_en_wallmas.c", 1421), G_MTX_LOAD); gSPDisplayList(POLY_XLU_DISP++, gCircleShadowDL); - if (1) {} - CLOSE_DISPS(play->state.gfxCtx, "../z_en_wallmas.c", 1426); } diff --git a/src/overlays/actors/ovl_Fishing/z_fishing.c b/src/overlays/actors/ovl_Fishing/z_fishing.c index 1e87a5add9..e2df751b53 100644 --- a/src/overlays/actors/ovl_Fishing/z_fishing.c +++ b/src/overlays/actors/ovl_Fishing/z_fishing.c @@ -4555,8 +4555,6 @@ void Fishing_DrawPondProps(PlayState* play) { Matrix_Pop(); - if (1) {} - CLOSE_DISPS(play->state.gfxCtx, "../z_fishing.c", 7805); } diff --git a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c index 70f473ec77..81b969a328 100644 --- a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c +++ b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c @@ -283,8 +283,6 @@ void ObjSyokudai_Draw(Actor* thisx, PlayState* play) { } flameScale *= 0.0027f; - if (1) {} - Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, diff --git a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c index 7e664db828..2bf024ec2b 100644 --- a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c +++ b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c @@ -692,7 +692,6 @@ void ObjectKankyo_DrawSnow(Actor* thisx, PlayState* play2) { break; } - if (1) {} if (1) {} Matrix_Translate(this->effects[i].base.x + this->effects[i].pos.x, this->effects[i].base.y + this->effects[i].pos.y, @@ -860,8 +859,6 @@ void ObjectKankyo_DrawSunGraveSpark(Actor* thisx, PlayState* play2) { (u8)(255 * this->effects[0].amplitude), 255 - (u8)(255 * this->effects[0].amplitude), this->effects[0].alpha); - if (1) {} - Matrix_Mult(&play->billboardMtxF, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_object_kankyo.c", 1416), G_MTX_LOAD); diff --git a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c index 600a41414d..c717123538 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c +++ b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c @@ -124,7 +124,5 @@ void OceffWipe_Draw(Actor* thisx, PlayState* play) { 32, 1, 0 - scroll, scroll * (-2), 32, 32)); gSPDisplayList(POLY_XLU_DISP++, sFrustumDL); - if (1) {} - CLOSE_DISPS(play->state.gfxCtx, "../z_oceff_wipe.c", 398); } diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index e0c31c3df0..373f8ad9d0 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -11610,8 +11610,6 @@ void Player_DrawGameplay(PlayState* play, Player* this, s32 lod, Gfx* cullDList, } } - if (1) {} - CLOSE_DISPS(play->state.gfxCtx, "../z_player.c", 19328); } diff --git a/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.c b/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.c index ce187a990a..34b9546fce 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.c +++ b/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.c @@ -94,8 +94,6 @@ void EffectSsBomb2_DrawFade(PlayState* play, u32 index, EffectSs* this) { } if (1) {} - if (1) {} - CLOSE_DISPS(gfxCtx, "../z_eff_ss_bomb2.c", 345); } @@ -160,8 +158,6 @@ void EffectSsBomb2_DrawLayered(PlayState* play, u32 index, EffectSs* this) { } if (1) {} - if (1) {} - CLOSE_DISPS(gfxCtx, "../z_eff_ss_bomb2.c", 456); } diff --git a/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c b/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c index 8f82e2ce0a..f43f4f3a52 100644 --- a/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c +++ b/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c @@ -101,8 +101,6 @@ void EffectSsGSpk_Draw(PlayState* play, u32 index, EffectSs* this) { } if (1) {} - if (1) {} - CLOSE_DISPS(gfxCtx, "../z_eff_ss_g_spk.c", 255); }