Merge pull request #1783 from AsparagusEduardo/pret/pr/battlerReservedPalettes

gReservedSpritePaletteCount using MAX_BATTLERS_COUNT for battles
This commit is contained in:
GriffinR 2022-09-14 12:14:33 -04:00 committed by GitHub
commit 36494c1c1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

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

View File

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