gReservedSpritePaletteCount using MAX_BATTLERS_COUNT for battles

This commit is contained in:
Eduardo Quezada 2022-09-14 12:20:59 -03:00
parent c1dfd3c9ec
commit 492380bd24
2 changed files with 4 additions and 4 deletions

View File

@ -665,7 +665,7 @@ static void CB2_InitBattleInternal(void)
ResetTasks(); ResetTasks();
DrawBattleEntryBackground(); DrawBattleEntryBackground();
FreeAllSpritePalettes(); FreeAllSpritePalettes();
gReservedSpritePaletteCount = 4; gReservedSpritePaletteCount = MAX_BATTLERS_COUNT;
SetVBlankCallback(VBlankCB_Battle); SetVBlankCallback(VBlankCB_Battle);
SetUpBattleVarsAndBirchZigzagoon(); SetUpBattleVarsAndBirchZigzagoon();
@ -2221,7 +2221,7 @@ void CB2_InitEndLinkBattle(void)
DrawBattleEntryBackground(); DrawBattleEntryBackground();
SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WIN01_BG0 | WINOUT_WIN01_BG1 | WINOUT_WIN01_BG2 | WINOUT_WIN01_OBJ | WINOUT_WIN01_CLR); SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WIN01_BG0 | WINOUT_WIN01_BG1 | WINOUT_WIN01_BG2 | WINOUT_WIN01_OBJ | WINOUT_WIN01_CLR);
FreeAllSpritePalettes(); FreeAllSpritePalettes();
gReservedSpritePaletteCount = 4; gReservedSpritePaletteCount = MAX_BATTLERS_COUNT;
SetVBlankCallback(VBlankCB_Battle); SetVBlankCallback(VBlankCB_Battle);
// Show end Vs screen with battle results // Show end Vs screen with battle results
@ -2425,7 +2425,7 @@ static void CB2_InitAskRecordBattle(void)
ResetSpriteData(); ResetSpriteData();
ResetTasks(); ResetTasks();
FreeAllSpritePalettes(); FreeAllSpritePalettes();
gReservedSpritePaletteCount = 4; gReservedSpritePaletteCount = MAX_BATTLERS_COUNT;
SetVBlankCallback(VBlankCB_Battle); SetVBlankCallback(VBlankCB_Battle);
SetMainCallback2(CB2_AskRecordBattle); SetMainCallback2(CB2_AskRecordBattle);
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK); BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);

View File

@ -73,7 +73,7 @@ static void CB2_ReshowBattleScreenAfterMenu(void)
break; break;
case 4: case 4:
FreeAllSpritePalettes(); FreeAllSpritePalettes();
gReservedSpritePaletteCount = 4; gReservedSpritePaletteCount = MAX_BATTLERS_COUNT;
break; break;
case 5: case 5:
ClearSpritesHealthboxAnimData(); ClearSpritesHealthboxAnimData();