From b60da57d8aad9b025e867900e55ccb83947e383a Mon Sep 17 00:00:00 2001 From: Lactozilla Date: Tue, 12 Nov 2024 14:28:33 -0300 Subject: [PATCH] Remove usage of gHeap in sSpritePalettes_ContestantsTurnBlinkEffect Those offsets into gHeap are actually just inside of eContestTempSave. --- src/contest.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/contest.c b/src/contest.c index 5b9560faf5..40a42a3529 100644 --- a/src/contest.c +++ b/src/contest.c @@ -858,23 +858,22 @@ static const struct CompressedSpriteSheet sSpriteSheets_ContestantsTurnBlinkEffe } }; -// Yup this is super dangerous but that's how it is here static const struct SpritePalette sSpritePalettes_ContestantsTurnBlinkEffect[CONTESTANT_COUNT] = { { - .data = (u16 *)(gHeap + 0x1A0A4), + .data = eContestTempSave.cachedWindowPalettes[5], .tag = TAG_BLINK_EFFECT_CONTESTANT0 }, { - .data = (u16 *)(gHeap + 0x1A0C4), + .data = eContestTempSave.cachedWindowPalettes[6], .tag = TAG_BLINK_EFFECT_CONTESTANT1 }, { - .data = (u16 *)(gHeap + 0x1A0E4), + .data = eContestTempSave.cachedWindowPalettes[7], .tag = TAG_BLINK_EFFECT_CONTESTANT2 }, { - .data = (u16 *)(gHeap + 0x1A104), + .data = eContestTempSave.cachedWindowPalettes[8], .tag = TAG_BLINK_EFFECT_CONTESTANT3 } };