Skip to content

Commit

Permalink
Merge pull request #1783 from AsparagusEduardo/pret/pr/battlerReserve…
Browse files Browse the repository at this point in the history
…dPalettes

gReservedSpritePaletteCount using MAX_BATTLERS_COUNT for battles
  • Loading branch information
GriffinRichards authored Sep 14, 2022
2 parents c1dfd3c + 492380b commit 36494c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/battle_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ static void CB2_InitBattleInternal(void)
ResetTasks();
DrawBattleEntryBackground();
FreeAllSpritePalettes();
gReservedSpritePaletteCount = 4;
gReservedSpritePaletteCount = MAX_BATTLERS_COUNT;
SetVBlankCallback(VBlankCB_Battle);
SetUpBattleVarsAndBirchZigzagoon();

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/reshow_battle_screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static void CB2_ReshowBattleScreenAfterMenu(void)
break;
case 4:
FreeAllSpritePalettes();
gReservedSpritePaletteCount = 4;
gReservedSpritePaletteCount = MAX_BATTLERS_COUNT;
break;
case 5:
ClearSpritesHealthboxAnimData();
Expand Down

0 comments on commit 36494c1

Please sign in to comment.