From e737f1f924930e8511ac81b2e82f52c54073c1c3 Mon Sep 17 00:00:00 2001 From: Kurausukun Date: Sun, 9 May 2021 01:38:57 -0400 Subject: [PATCH] fix main_menu goto --- src/main_menu.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/main_menu.c b/src/main_menu.c index 38859b860..38e7648d0 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -1387,11 +1387,9 @@ static void Task_NewGameBirchSpeechSub_WaitForLotad(u8 taskId) switch (tState) { case 0: - if (sprite->callback == SpriteCallbackDummy) - { - sprite->oam.affineMode = ST_OAM_AFFINE_OFF; - goto incrementStateAndTimer; - } + if (sprite->callback != SpriteCallbackDummy) + return; + sprite->oam.affineMode = ST_OAM_AFFINE_OFF; break; case 1: if (gTasks[sBirchSpeechMainTaskId].tTimer >= 96) @@ -1400,14 +1398,11 @@ static void Task_NewGameBirchSpeechSub_WaitForLotad(u8 taskId) if (gTasks[sBirchSpeechMainTaskId].tTimer < 0x4000) gTasks[sBirchSpeechMainTaskId].tTimer++; } - break; - incrementStateAndTimer: - default: - tState++; - if (gTasks[sBirchSpeechMainTaskId].tTimer < 0x4000) - gTasks[sBirchSpeechMainTaskId].tTimer++; - break; + return; } + tState++; + if (gTasks[sBirchSpeechMainTaskId].tTimer < 0x4000) + gTasks[sBirchSpeechMainTaskId].tTimer++; } #undef tState