Document generic argument names in battle anim palettes

This commit is contained in:
GriffinR
2022-05-31 15:08:34 -04:00
parent 5e6d8a77e4
commit a8437493c1
10 changed files with 335 additions and 314 deletions

View File

@@ -118,7 +118,7 @@ void SetSpriteRotScale(u8 spriteId, s16 xScale, s16 yScale, u16 rotation);
void InitSpriteDataForLinearTranslation(struct Sprite *sprite);
void PrepareBattlerSpriteForRotScale(u8 spriteId, u8 objMode);
void SetBattlerSpriteYOffsetFromRotation(u8 spriteId);
u32 GetBattleBgPalettesMask(u8 battleBackground, u8 attacker, u8 target, u8 attackerPartner, u8 targetPartner, u8 a6, u8 a7);
u32 GetBattlePalettesMask(bool8 battleBackground, bool8 attacker, bool8 target, bool8 attackerPartner, bool8 targetPartner, bool8 anim1, bool8 anim2);
u32 GetBattleMonSpritePalettesMask(u8 playerLeft, u8 playerRight, u8 opponentLeft, u8 opponentRight);
u8 AnimDummyReturnArg(u8 battler);
s16 CloneBattlerSpriteWithBlend(u8);
@@ -229,7 +229,7 @@ void DestroyAnimSpriteAfterTimer(struct Sprite *sprite);
// battle_anim_smokescreen.c
u8 SmokescreenImpact(s16 x, s16 y, u8 a3);
u32 UnpackSelectedBattleBgPalettes(s16);
u32 UnpackSelectedBattlePalettes(s16);
u8 GetBattlerSpriteFinal_Y(u8, u16, u8);

View File

@@ -413,4 +413,21 @@
#define ANIM_WEATHER_SANDSTORM 3
#define ANIM_WEATHER_HAIL 4
// Flags given to various functions to indicate which palettes to consider.
// Handled by UnpackSelectedBattlePalettes
#define F_PAL_BG (1 << 0)
#define F_PAL_ATTACKER (1 << 1)
#define F_PAL_TARGET (1 << 2)
#define F_PAL_ATK_PARTNER (1 << 3)
#define F_PAL_DEF_PARTNER (1 << 4)
#define F_PAL_ANIM_1 (1 << 5) // Palette set for GetBattleAnimBg1Data/GetBgDataForTransform. Only used (ineffectually?) by Aromatherapy.
#define F_PAL_ANIM_2 (1 << 6) // Palette set for GetBattleAnimBgData/GetBgDataForTransform. Unused.
#define F_PAL_ATK_SIDE (F_PAL_ATTACKER | F_PAL_ATK_PARTNER)
#define F_PAL_DEF_SIDE (F_PAL_TARGET | F_PAL_DEF_PARTNER)
#define F_PAL_BATTLERS (F_PAL_ATK_SIDE | F_PAL_DEF_SIDE)
// The below are only used by AnimTask_BlendBattleAnimPal to get battler sprite palettes by position rather than by role.
// It's redundant with F_PAL_BATTLERS, because they're only ever used together to refer to all the battlers at once.
#define F_PAL_BATTLERS_2 (1 << 7 | 1 << 8 | 1 << 9 | 1 << 10)
#endif // GUARD_CONSTANTS_BATTLE_ANIM_H