mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-14 07:33:44 +01:00
Revert to original battle factory gcc 10 fix
This commit is contained in:
parent
c3080a5a2a
commit
1220f0655c
@ -1145,7 +1145,11 @@ static void CB2_InitSelectScreen(void)
|
|||||||
LoadPalette(gFrontierFactorySelectMenu_Pal, 0, 0x40);
|
LoadPalette(gFrontierFactorySelectMenu_Pal, 0, 0x40);
|
||||||
LoadPalette(gUnknown_0861046C, 0xF0, 8);
|
LoadPalette(gUnknown_0861046C, 0xF0, 8);
|
||||||
LoadPalette(gUnknown_0861046C, 0xE0, 10);
|
LoadPalette(gUnknown_0861046C, 0xE0, 10);
|
||||||
|
#if MODERN
|
||||||
|
if (sFactorySelectScreen && sFactorySelectScreen->fromSummaryScreen)
|
||||||
|
#else
|
||||||
if (sFactorySelectScreen->fromSummaryScreen == TRUE)
|
if (sFactorySelectScreen->fromSummaryScreen == TRUE)
|
||||||
|
#endif
|
||||||
gPlttBufferUnfaded[228] = sFactorySelectScreen->unk2A4;
|
gPlttBufferUnfaded[228] = sFactorySelectScreen->unk2A4;
|
||||||
LoadPalette(gUnknown_0861039C, 0x20, 4);
|
LoadPalette(gUnknown_0861039C, 0x20, 4);
|
||||||
gMain.state++;
|
gMain.state++;
|
||||||
@ -1167,7 +1171,11 @@ static void CB2_InitSelectScreen(void)
|
|||||||
SetVBlankCallback(Select_VblankCb);
|
SetVBlankCallback(Select_VblankCb);
|
||||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_BG0_ON | DISPCNT_BG1_ON | DISPCNT_OBJ_1D_MAP);
|
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_BG0_ON | DISPCNT_BG1_ON | DISPCNT_OBJ_1D_MAP);
|
||||||
|
#if MODERN
|
||||||
|
if (sFactorySelectScreen && sFactorySelectScreen->fromSummaryScreen)
|
||||||
|
#else
|
||||||
if (sFactorySelectScreen->fromSummaryScreen == TRUE)
|
if (sFactorySelectScreen->fromSummaryScreen == TRUE)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
Select_SetWinRegs(88, 152, 32, 96);
|
Select_SetWinRegs(88, 152, 32, 96);
|
||||||
ShowBg(3);
|
ShowBg(3);
|
||||||
@ -1181,7 +1189,11 @@ static void CB2_InitSelectScreen(void)
|
|||||||
gMain.state++;
|
gMain.state++;
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
|
#if MODERN
|
||||||
|
if (sFactorySelectScreen && sFactorySelectScreen->fromSummaryScreen)
|
||||||
|
#else
|
||||||
if (sFactorySelectScreen->fromSummaryScreen == TRUE)
|
if (sFactorySelectScreen->fromSummaryScreen == TRUE)
|
||||||
|
#endif
|
||||||
sFactorySelectScreen->cursorPos = gLastViewedMonIndex;
|
sFactorySelectScreen->cursorPos = gLastViewedMonIndex;
|
||||||
Select_InitMonsData();
|
Select_InitMonsData();
|
||||||
Select_InitAllSprites();
|
Select_InitAllSprites();
|
||||||
@ -1229,9 +1241,7 @@ static void CB2_InitSelectScreen(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// This should be called at the top of CB2_InitSelectScreen
|
static void Select_InitMonsData(void)
|
||||||
// sFactorySelectScreen is dereferenced prior to being allocated otherwise
|
|
||||||
static NOINLINE void Select_InitMonsData(void)
|
|
||||||
{
|
{
|
||||||
u8 i;
|
u8 i;
|
||||||
|
|
||||||
@ -3084,9 +3094,7 @@ static void sub_819D9EC(u8 taskId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// This should be called at the top of CB2_InitSwapScreen
|
static void Swap_InitStruct(void)
|
||||||
// sFactorySwapScreen is dereferenced prior to being allocated otherwise
|
|
||||||
static NOINLINE void Swap_InitStruct(void)
|
|
||||||
{
|
{
|
||||||
if (sFactorySwapScreen == NULL)
|
if (sFactorySwapScreen == NULL)
|
||||||
{
|
{
|
||||||
@ -3174,7 +3182,11 @@ static void CB2_InitSwapScreen(void)
|
|||||||
gMain.state++;
|
gMain.state++;
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
|
#if MODERN
|
||||||
|
if (sFactorySwapScreen && sFactorySwapScreen->fromSummaryScreen)
|
||||||
|
#else
|
||||||
if (sFactorySwapScreen->fromSummaryScreen == TRUE)
|
if (sFactorySwapScreen->fromSummaryScreen == TRUE)
|
||||||
|
#endif
|
||||||
sFactorySwapScreen->cursorPos = gLastViewedMonIndex;
|
sFactorySwapScreen->cursorPos = gLastViewedMonIndex;
|
||||||
gMain.state++;
|
gMain.state++;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user