fix mystery_gift gotos

This commit is contained in:
Kurausukun
2021-05-09 01:03:39 -04:00
committed by huderlem
parent f0453871a2
commit 0c7773ad75
+9 -15
View File
@@ -558,14 +558,12 @@ bool32 MG_PrintTextOnWindow1AndWaitButton(u8 *textState, const u8 *str)
{ {
case 0: case 0:
AddTextPrinterToWindow1(str); AddTextPrinterToWindow1(str);
goto inc; (*textState)++;
break;
case 1: case 1:
DrawDownArrow(1, 0xD0, 0x14, 1, FALSE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); DrawDownArrow(1, 0xD0, 0x14, 1, FALSE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]);
if (({JOY_NEW(A_BUTTON | B_BUTTON);})) if (({JOY_NEW(A_BUTTON | B_BUTTON);}))
{
inc:
(*textState)++; (*textState)++;
}
break; break;
case 2: case 2:
DrawDownArrow(1, 0xD0, 0x14, 1, TRUE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); DrawDownArrow(1, 0xD0, 0x14, 1, TRUE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]);
@@ -574,7 +572,7 @@ bool32 MG_PrintTextOnWindow1AndWaitButton(u8 *textState, const u8 *str)
return TRUE; return TRUE;
case 0xFF: case 0xFF:
*textState = 2; *textState = 2;
break; return FALSE;
} }
return FALSE; return FALSE;
} }
@@ -809,8 +807,6 @@ static bool32 ValidateCardOrNews(bool32 cardOrNews)
static bool32 HandleLoadWonderCardOrNews(u8 * state, bool32 cardOrNews) static bool32 HandleLoadWonderCardOrNews(u8 * state, bool32 cardOrNews)
{ {
s32 v0;
switch (*state) switch (*state)
{ {
case 0: case 0:
@@ -827,20 +823,18 @@ static bool32 HandleLoadWonderCardOrNews(u8 * state, bool32 cardOrNews)
case 1: case 1:
if (cardOrNews == 0) if (cardOrNews == 0)
{ {
v0 = FadeToWonderCardMenu(); if (!FadeToWonderCardMenu())
check:
if (v0 != 0)
{ {
goto done; return FALSE;
} }
break;
} }
else else
{ {
v0 = FadeToWonderNewsMenu(); if (!FadeToWonderNewsMenu())
goto check; {
return FALSE;
}
} }
done:
*state = 0; *state = 0;
return TRUE; return TRUE;
} }