diff --git a/include/battle_anim.h b/include/battle_anim.h index d9d1d6420..c3019a5cf 100644 --- a/include/battle_anim.h +++ b/include/battle_anim.h @@ -185,7 +185,7 @@ bool8 IsBattlerSpritePresent(u8 battlerId); void sub_80A6C68(u32 arg0); u8 GetAnimBattlerSpriteId(u8 wantedBattler); bool8 IsDoubleBattle(void); -u8 GetPaletteOffset(void); +u8 GetBattleBgPaletteNum(void); u8 GetBattlerSpriteBGPriorityRank(u8 battlerId); void StoreSpriteCallbackInData6(struct Sprite *sprite, void (*spriteCallback)(struct Sprite*)); void SetSpritePrimaryCoordsFromSecondaryCoords(struct Sprite *sprite); diff --git a/include/constants/battle_anim.h b/include/constants/battle_anim.h index 5a62f65ae..0fe231cdc 100644 --- a/include/constants/battle_anim.h +++ b/include/constants/battle_anim.h @@ -237,7 +237,7 @@ #define ANIM_TAG_SPOTLIGHT (ANIM_SPRITES_START + 227) #define ANIM_TAG_LETTER_Z (ANIM_SPRITES_START + 228) #define ANIM_TAG_RAPID_SPIN (ANIM_SPRITES_START + 229) -#define ANIM_TAG_TRI_ATTACK_TRIANGLE (ANIM_SPRITES_START + 230) +#define ANIM_TAG_TRI_ATTACK_TRIANGLE (ANIM_SPRITES_START + 230) #define ANIM_TAG_WISP_ORB (ANIM_SPRITES_START + 231) #define ANIM_TAG_WISP_FIRE (ANIM_SPRITES_START + 232) #define ANIM_TAG_GOLD_STARS (ANIM_SPRITES_START + 233) diff --git a/src/battle_anim.c b/src/battle_anim.c index 5cba4a6e4..becc12d56 100644 --- a/src/battle_anim.c +++ b/src/battle_anim.c @@ -2808,12 +2808,12 @@ static void LoadMoveBg(u16 bgId) void *dmaDest; LZDecompressWram(tilemap, gDecompressionBuffer); - sub_80A4720(GetPaletteOffset(), (void*)(gDecompressionBuffer), 0x100, 0); + sub_80A4720(GetBattleBgPaletteNum(), (void*)(gDecompressionBuffer), 0x100, 0); dmaSrc = gDecompressionBuffer; dmaDest = (void *)(BG_SCREEN_ADDR(26)); DmaCopy32(3, dmaSrc, dmaDest, 0x800); LZDecompressVram(gBattleAnimBackgroundTable[bgId].image, (void *)(BG_SCREEN_ADDR(4))); - LoadCompressedPalette(gBattleAnimBackgroundTable[bgId].palette, GetPaletteOffset() * 16, 32); + LoadCompressedPalette(gBattleAnimBackgroundTable[bgId].palette, GetBattleBgPaletteNum() * 16, 32); } else { diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index b55a4c3ed..248228847 100755 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -1379,7 +1379,7 @@ static void SetPsychicBackground_Step(u8 taskId) { int i; u16 lastColor; - u8 paletteIndex = GetPaletteOffset(); + u8 paletteIndex = GetBattleBgPaletteNum(); if (++gTasks[taskId].data[5] == 4) { @@ -1405,7 +1405,7 @@ static void FadeScreenToWhite_Step(u8 taskId) { int i; u16 lastColor; - u8 paletteIndex = GetPaletteOffset(); + u8 paletteIndex = GetBattleBgPaletteNum(); if (++gTasks[taskId].data[5] == 4) { diff --git a/src/battle_anim_mons.c b/src/battle_anim_mons.c index 0eaa4b01d..43890f24a 100644 --- a/src/battle_anim_mons.c +++ b/src/battle_anim_mons.c @@ -966,7 +966,7 @@ void sub_80A6D60(struct BattleAnimBgData *unk, const void *src, u32 arg2) CopyBgTilemapBufferToVram(unk->bgId); } -u8 GetPaletteOffset(void) +u8 GetBattleBgPaletteNum(void) { if (IsContest()) return 1; @@ -1353,7 +1353,7 @@ u32 sub_80A75AC(u8 battleBackground, u8 attacker, u8 target, u8 attackerPartner, if (!IsContest()) selectedPalettes = 0xe; else - selectedPalettes = 1 << GetPaletteOffset(); + selectedPalettes = 1 << GetBattleBgPaletteNum(); } if (attacker) {