diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/battle.h | 2 | ||||
-rw-r--r-- | include/battle_anim.h | 33 | ||||
-rw-r--r-- | include/gba/defines.h | 2 | ||||
-rw-r--r-- | include/gba/io_reg.h | 35 | ||||
-rw-r--r-- | include/graphics.h | 15 |
5 files changed, 73 insertions, 14 deletions
diff --git a/include/battle.h b/include/battle.h index 1f7fc5bf6..64283de20 100644 --- a/include/battle.h +++ b/include/battle.h @@ -836,7 +836,7 @@ struct MonSpritesGfx u8 field_F4[0x80]; u8 *barFontGfx; void *field_178; - void *field_17C; + u16 *field_17C; }; extern u16 gBattle_BG0_X; diff --git a/include/battle_anim.h b/include/battle_anim.h index e1cdc1c13..d04464f36 100644 --- a/include/battle_anim.h +++ b/include/battle_anim.h @@ -9,14 +9,6 @@ enum { - ANIM_BANK_ATTACKER, - ANIM_BANK_TARGET, - ANIM_BANK_ATK_PARTNER, - ANIM_BANK_DEF_PARTNER, -}; - -enum -{ BG_ANIM_SCREEN_SIZE, BG_ANIM_AREA_OVERFLOW_MODE, BG_ANIM_MOSAIC, @@ -83,6 +75,7 @@ s16 sub_80A52EC(s16 a); s16 CalculatePanIncrement(s16 sourcePan, s16 targetPan, s16 incrementPan); bool8 IsBattlerSpriteVisible(u8 battlerId); s16 KeepPanInRange(s16 a, s32 oldPan); +void sub_80730C0(u16, const u16 *, u16 *, u8); // battle_anim_80FE840.s void SetAnimBgAttribute(u8 bgId, u8 attributeId, u8 value); @@ -126,7 +119,7 @@ u8 GetBattlerSpriteCoord(u8 bank, u8 attributeId); bool8 IsBankSpritePresent(u8 bank); void sub_80A6C68(u8 arg0); -u8 GetAnimBankSpriteId(u8 wantedBank); +u8 GetAnimBattlerSpriteId(u8 wantedBank); bool8 IsDoubleBattle(void); u8 sub_80A6D94(void); u8 sub_80A8364(u8); @@ -139,7 +132,7 @@ u8 GetGhostSpriteDefault_Y(u8 battlerId); void sub_8072E48(u8 battlerId, u8); void sub_8073128(u8); -// battle_anim_80A9C70.s +// battle_anim_status_effects.s #define STAT_ANIM_PLUS1 15 #define STAT_ANIM_PLUS2 39 #define STAT_ANIM_MINUS1 22 @@ -150,7 +143,7 @@ void sub_8073128(u8); #define STAT_ANIM_MULTIPLE_MINUS2 58 void LaunchStatusAnimation(u8 bank, u8 statusAnimId); -// battle_anim_8170478.s +// battle_anim_special.s u8 ItemIdToBallId(u16 itemId); u8 LaunchBallStarsTask(u8 x, u8 y, u8 kindOfStars, u8 arg3, u8 ballId); u8 LaunchBallFadeMonTask(bool8 unFadeLater, u8 bank, u32 arg2, u8 ballId); @@ -169,6 +162,17 @@ u8 GetBattlerSpriteSubpriority(u8 battlerId); void StartAnimLinearTranslation(struct Sprite *sprite); void sub_80755B8(struct Sprite *sprite); u8 sub_80768B0(u8 battlerId); +u32 sub_8075CB8(u8 a1, u8 a2, u8 a3, u8 a4); +u8 sub_8075D80(u8 battlerId); +s16 CloneBattlerSpriteWithBlend(u8 animBattler); +void obj_delete_but_dont_free_vram(struct Sprite *sprite); +void sub_807543C(u8 bgId, const u32 *); +void AnimLoadCompressedBgGfx(u32, const u32 *, u32); +void sub_80752A0(struct BattleAnimBgData *); +u8 sub_8076E34(s32, u8, s32); +void sub_8075358(u8 bgId); +u32 sub_8075BE8(u8, u8, u8, u8, u8, u8, u8); +void sub_8075458(bool8); // battle_anim_mon_movement.c void AnimTask_ShakeMon(u8 taskId); @@ -185,4 +189,11 @@ void sub_8099980(u8 taskId); void sub_8099A78(u8 taskId); void sub_8099BD4(u8 taskId); +// normal.s +u32 UnpackSelectedBattleAnimPalettes(s16 selector); + +// battle_anim_utility_funcs.c +void sub_80BB088(u8 taskId); +void sub_80BBA20(u8 taskId, s32 unused, u16 arg2, u8 battler1, u8 arg4, u8 arg5, u8 arg6, u8 arg7, const u32 *gfx, const u32 *tilemap, const u32 *palette); + #endif // GUARD_BATTLE_ANIM_H diff --git a/include/gba/defines.h b/include/gba/defines.h index c0eec12b1..65561f10a 100644 --- a/include/gba/defines.h +++ b/include/gba/defines.h @@ -77,8 +77,6 @@ #define RGB_BLACK RGB(0, 0, 0) #define RGB_WHITE RGB(31, 31, 31) -#define WIN_RANGE(a, b) (((a) << 8) | (b)) - #define NAKED __attribute__((naked)) #define UNUSED __attribute__((unused)) diff --git a/include/gba/io_reg.h b/include/gba/io_reg.h index 6dbe5e8ed..2eefb2482 100644 --- a/include/gba/io_reg.h +++ b/include/gba/io_reg.h @@ -538,6 +538,40 @@ #define BGCNT_AFF512x512 0x8000 #define BGCNT_AFF1024x1024 0xC000 +// WININ/OUT +#define WININ_WIN0_BG0 (1 << 0) +#define WININ_WIN0_BG1 (1 << 1) +#define WININ_WIN0_BG2 (1 << 2) +#define WININ_WIN0_BG3 (1 << 3) +#define WININ_WIN0_BG_ALL (WININ_WIN0_BG0 | WININ_WIN0_BG1 | WININ_WIN0_BG2 | WININ_WIN0_BG3) +#define WININ_WIN0_OBJ (1 << 4) +#define WININ_WIN0_CLR (1 << 5) +#define WININ_WIN1_BG0 (1 << 8) +#define WININ_WIN1_BG1 (1 << 9) +#define WININ_WIN1_BG2 (1 << 10) +#define WININ_WIN1_BG3 (1 << 11) +#define WININ_WIN1_BG_ALL (WININ_WIN1_BG0 | WININ_WIN1_BG1 | WININ_WIN1_BG2 | WININ_WIN1_BG3) +#define WININ_WIN1_OBJ (1 << 12) +#define WININ_WIN1_CLR (1 << 13) + +#define WINOUT_WIN01_BG0 (1 << 0) +#define WINOUT_WIN01_BG1 (1 << 1) +#define WINOUT_WIN01_BG2 (1 << 2) +#define WINOUT_WIN01_BG3 (1 << 3) +#define WINOUT_WIN01_BG_ALL (WINOUT_WIN01_BG0 | WINOUT_WIN01_BG1 | WINOUT_WIN01_BG2 | WINOUT_WIN01_BG3) +#define WINOUT_WIN01_OBJ (1 << 4) +#define WINOUT_WIN01_CLR (1 << 5) +#define WINOUT_WINOBJ_BG0 (1 << 8) +#define WINOUT_WINOBJ_BG1 (1 << 9) +#define WINOUT_WINOBJ_BG2 (1 << 10) +#define WINOUT_WINOBJ_BG3 (1 << 11) +#define WINOUT_WINOBJ_BG_ALL (WINOUT_WINOBJ_BG0 | WINOUT_WINOBJ_BG1 | WINOUT_WINOBJ_BG2 | WINOUT_WINOBJ_BG3) +#define WINOUT_WINOBJ_OBJ (1 << 12) +#define WINOUT_WINOBJ_CLR (1 << 13) + +#define WIN_RANGE(a, b) (((a) << 8) | (b)) +#define WIN_RANGE2(a, b) ((b) | ((a) << 8)) + // BLDCNT // Bits 0-5 select layers for the 1st target #define BLDCNT_TGT1_BG0 (1 << 0) @@ -558,6 +592,7 @@ #define BLDCNT_TGT2_BG3 (1 << 11) #define BLDCNT_TGT2_OBJ (1 << 12) #define BLDCNT_TGT2_BD (1 << 13) +#define BLDCNT_TGT2_ALL (BLDCNT_TGT2_BG0 | BLDCNT_TGT2_BG1 | BLDCNT_TGT2_BG2 | BLDCNT_TGT2_BG3 | BLDCNT_TGT2_OBJ | BLDCNT_TGT2_BD) // BLDALPHA #define BLDALPHA_BLEND(target1, target2) (((target2) << 8) | (target1)) diff --git a/include/graphics.h b/include/graphics.h index 5e133ee01..1113eedd0 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -961,6 +961,21 @@ extern const u8 gFile_graphics_items_icon_palettes_sapphire_palette[]; extern const u8 gFile_graphics_items_icons_return_to_field_arrow_sheet[]; extern const u8 gFile_graphics_items_icon_palettes_return_to_field_arrow_palette[]; +// battle_anim_utility_funcs +extern const u32 gFile_graphics_battle_anims_masks_curse_sheet[]; +extern const u32 gFile_graphics_battle_anims_masks_curse_tilemap[]; +extern const u32 gBattleStatMask_Gfx[]; +extern const u32 gBattleStatMask1_Pal[]; +extern const u32 gBattleStatMask2_Pal[]; +extern const u32 gBattleStatMask3_Pal[]; +extern const u32 gBattleStatMask4_Pal[]; +extern const u32 gBattleStatMask5_Pal[]; +extern const u32 gBattleStatMask6_Pal[]; +extern const u32 gBattleStatMask7_Pal[]; +extern const u32 gBattleStatMask8_Pal[]; +extern const u32 gBattleStatMask1_Tilemap[]; +extern const u32 gBattleStatMask2_Tilemap[]; + // title_screen extern const u16 gGraphics_TitleScreen_PokemonFireRedLogoPals[]; extern const u8 gGraphics_TitleScreen_PokemonFireRedLogoTiles[]; |