diff --git a/src/constants/animation_constants.asm b/src/constants/animation_constants.asm index f4a225b..f17e1c9 100644 --- a/src/constants/animation_constants.asm +++ b/src/constants/animation_constants.asm @@ -1,11 +1,11 @@ ; Animation constants - const_def - const ANIM_SPRITE_ID - const ANIM_PALETTE_ID - const ANIM_SPRITE_ANIM_ID - const ANIM_SPRITE_ANIM_FLAGS - const ANIM_SOUND_FX_ID - const ANIM_HANDLER_FUNCTION +RSRESET +DEF ANIM_SPRITE_ID RB +DEF ANIM_PALETTE_ID RB +DEF ANIM_SPRITE_ANIM_ID RB +DEF ANIM_SPRITE_ANIM_FLAGS RB +DEF ANIM_SOUND_FX_ID RB +DEF ANIM_HANDLER_FUNCTION RW ; Sprite animation IDs const_def @@ -348,16 +348,20 @@ DEF DUEL_SCREEN_ANIMS EQU const_value const DUEL_ANIM_FLASH ; $65 const DUEL_ANIM_DISTORT ; $66 + ; this animation is only played within DUEL_ANIM_PRINT_DAMAGE + const_def $8c + const DUEL_ANIM_DAMAGE_HUD ; $8c + const_def $96 - const DUEL_ANIM_150 ; $96 + const DUEL_ANIM_SET_SCREEN ; $96 const DUEL_ANIM_PRINT_DAMAGE ; $97 const DUEL_ANIM_UPDATE_HUD ; $98 - const DUEL_ANIM_153 ; $99 - const DUEL_ANIM_154 ; $9a - const DUEL_ANIM_155 ; $9b - const DUEL_ANIM_156 ; $9c - const DUEL_ANIM_157 ; $9d - const DUEL_ANIM_158 ; $9e + const DUEL_ANIM_153_UNUSED ; $99 + const DUEL_ANIM_154_UNUSED ; $9a + const DUEL_ANIM_155_UNUSED ; $9b + const DUEL_ANIM_156_UNUSED ; $9c + const DUEL_ANIM_157_UNUSED ; $9d + const DUEL_ANIM_158_UNUSED ; $9e ; Special animations const_def $fa @@ -366,28 +370,25 @@ DEF DUEL_SCREEN_ANIMS EQU const_value const DUEL_ANIM_SHAKE3 ; $fc ; Duel Anim Struct constants - const_def - const DUEL_ANIM_STRUCT_ID ; $0 - const DUEL_ANIM_STRUCT_SCREEN ; $1 - const DUEL_ANIM_STRUCT_DUELIST_SIDE ; $2 - const DUEL_ANIM_STRUCT_LOCATION_PARAM ; $3 - const DUEL_ANIM_STRUCT_DAMAGE ; $4 - const_skip - const DUEL_ANIM_STRUCT_UNKNOWN_2 ; $6 - const DUEL_ANIM_STRUCT_BANK ; $7 -DEF DUEL_ANIM_STRUCT_SIZE EQU const_value +RSRESET +DEF DUEL_ANIM_STRUCT_ID RB ; $0 +DEF DUEL_ANIM_STRUCT_SCREEN RB ; $1 +DEF DUEL_ANIM_STRUCT_DUELIST_SIDE RB ; $2 +DEF DUEL_ANIM_STRUCT_LOCATION_PARAM RB ; $3 +DEF DUEL_ANIM_STRUCT_DAMAGE RW ; $4 +DEF DUEL_ANIM_STRUCT_UNKNOWN_2 RB ; $6 +DEF DUEL_ANIM_STRUCT_BANK RB ; $7 +DEF DUEL_ANIM_STRUCT_SIZE EQU _RS ; ow_frame struct constants - const_def - const OW_FRAME_STRUCT_DURATION ; $0 - const OW_FRAME_STRUCT_VRAM_TILE_OFFSET ; $1 - const OW_FRAME_STRUCT_VRAM_BANK ; $2 - const OW_FRAME_STRUCT_TILESET_BANK ; $3 - const OW_FRAME_STRUCT_TILESET ; $4 - const_skip - const OW_FRAME_STRUCT_TILESET_OFFSET ; $6 - const_skip -DEF OW_FRAME_STRUCT_SIZE EQU const_value +RSRESET +DEF OW_FRAME_STRUCT_DURATION RB ; $0 +DEF OW_FRAME_STRUCT_VRAM_TILE_OFFSET RB ; $1 +DEF OW_FRAME_STRUCT_VRAM_BANK RB ; $2 +DEF OW_FRAME_STRUCT_TILESET_BANK RB ; $3 +DEF OW_FRAME_STRUCT_TILESET RW ; $4 +DEF OW_FRAME_STRUCT_TILESET_OFFSET RW ; $6 +DEF OW_FRAME_STRUCT_SIZE EQU _RS DEF NUM_OW_FRAMESET_SUBGROUPS EQU 3 diff --git a/src/constants/sprite_constants.asm b/src/constants/sprite_constants.asm index 1094aec..6946772 100644 --- a/src/constants/sprite_constants.asm +++ b/src/constants/sprite_constants.asm @@ -23,14 +23,22 @@ DEF SPRITE_ANIM_LENGTH EQU const_value ; SPRITE_ANIM_FLAGS values const_def - const SPRITE_ANIM_FLAG_X_SUBTRACT - const SPRITE_ANIM_FLAG_Y_SUBTRACT - const SPRITE_ANIM_FLAG_SPEED - const SPRITE_ANIM_FLAG_3 - const SPRITE_ANIM_FLAG_4 - const SPRITE_ANIM_FLAG_5 - const SPRITE_ANIM_FLAG_6 - const SPRITE_ANIM_FLAG_UNSKIPPABLE + const SPRITE_ANIM_FLAG_X_INVERTED_F ; $0 + const SPRITE_ANIM_FLAG_Y_INVERTED_F ; $1 + const SPRITE_ANIM_FLAG_CENTERED_F ; $2 + const SPRITE_ANIM_FLAG_3_F ; $3 + const_skip + const SPRITE_ANIM_FLAG_X_FLIP_F ; $5 + const SPRITE_ANIM_FLAG_Y_FLIP_F ; $6 + const SPRITE_ANIM_FLAG_UNSKIPPABLE_F ; $7 + +DEF SPRITE_ANIM_FLAG_X_INVERTED EQU 1 << SPRITE_ANIM_FLAG_X_INVERTED_F +DEF SPRITE_ANIM_FLAG_Y_INVERTED EQU 1 << SPRITE_ANIM_FLAG_Y_INVERTED_F +DEF SPRITE_ANIM_FLAG_CENTERED EQU 1 << SPRITE_ANIM_FLAG_CENTERED_F +DEF SPRITE_ANIM_FLAG_3 EQU 1 << SPRITE_ANIM_FLAG_3_F +DEF SPRITE_ANIM_FLAG_X_FLIP EQU 1 << SPRITE_ANIM_FLAG_X_FLIP_F +DEF SPRITE_ANIM_FLAG_Y_FLIP EQU 1 << SPRITE_ANIM_FLAG_Y_FLIP_F +DEF SPRITE_ANIM_FLAG_UNSKIPPABLE EQU 1 << SPRITE_ANIM_FLAG_UNSKIPPABLE_F DEF SPRITE_FRAME_OFFSET_SIZE EQU 4 diff --git a/src/data/duel/animations/attack_animations.asm b/src/data/duel/animations/attack_animations.asm index c53a668..46b2fe8 100644 --- a/src/data/duel/animations/attack_animations.asm +++ b/src/data/duel/animations/attack_animations.asm @@ -1,25 +1,3 @@ -MACRO anim_end - db $00 -ENDM -MACRO anim_normal - db $01, \1 -ENDM -MACRO anim_player - db $02, \1 -ENDM -MACRO anim_opponent - db $03, \1 -ENDM -MACRO anim_screen - db $04, \1 -ENDM -MACRO anim_play_area - db $05, \1 -ENDM -MACRO anim_end2 - db $06 -ENDM - PointerTable_AttackAnimation: table_width 2, PointerTable_AttackAnimation dw NULL ; ATK_ANIM_NONE diff --git a/src/data/duel/animations/duel_animations.asm b/src/data/duel/animations/duel_animations.asm index ed5126c..9ba1ac8 100644 --- a/src/data/duel/animations/duel_animations.asm +++ b/src/data/duel/animations/duel_animations.asm @@ -2,778 +2,778 @@ Animations: table_width 6, Animations ; DUEL_ANIM_NONE - db $00 ; sprite ID - db $00 ; palette ID - db $00 ; anim ID - db $00 ; anim flags - db $00 ; sfx id - db $00 ; handler function + db NONE ; sprite ID + db NONE ; palette ID + db NONE ; anim ID + db NONE ; anim flags + db NONE ; sfx id + db NONE ; handler function ; DUEL_ANIM_GLOW db SPRITE_DUEL_GLOW ; sprite ID db PALETTE_31 ; palette ID db SPRITE_ANIM_71 ; anim ID - db (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) ; anim flags + db SPRITE_ANIM_FLAG_UNSKIPPABLE ; anim flags db SFX_GLOW ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_PARALYSIS db SPRITE_DUEL_PARALYSIS ; sprite ID db PALETTE_32 ; palette ID db SPRITE_ANIM_72 ; anim ID - db (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) ; anim flags + db SPRITE_ANIM_FLAG_UNSKIPPABLE ; anim flags db SFX_PARALYSIS ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_SLEEP db SPRITE_DUEL_SLEEP ; sprite ID db PALETTE_33 ; palette ID db SPRITE_ANIM_73 ; anim ID - db (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) ; anim flags + db SPRITE_ANIM_FLAG_UNSKIPPABLE ; anim flags db SFX_SLEEP ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_CONFUSION db SPRITE_DUEL_STAR ; sprite ID db PALETTE_34 ; palette ID db SPRITE_ANIM_74 ; anim ID - db (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) ; anim flags + db SPRITE_ANIM_FLAG_UNSKIPPABLE ; anim flags db SFX_CONFUSION ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_POISON db SPRITE_DUEL_POISON ; sprite ID db PALETTE_35 ; palette ID db SPRITE_ANIM_75 ; anim ID - db (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) ; anim flags + db SPRITE_ANIM_FLAG_UNSKIPPABLE ; anim flags db SFX_POISON ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_SINGLE_HIT db SPRITE_DUEL_HIT ; sprite ID db PALETTE_36 ; palette ID db SPRITE_ANIM_76 ; anim ID - db (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) ; anim flags + db SPRITE_ANIM_FLAG_UNSKIPPABLE ; anim flags db SFX_SINGLE_HIT ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_HIT db SPRITE_DUEL_HIT ; sprite ID db PALETTE_36 ; palette ID db SPRITE_ANIM_77 ; anim ID - db (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) ; anim flags + db SPRITE_ANIM_FLAG_UNSKIPPABLE ; anim flags db SFX_SINGLE_HIT ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_BIG_HIT db SPRITE_DUEL_HIT ; sprite ID db PALETTE_36 ; palette ID db SPRITE_ANIM_78 ; anim ID - db (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) ; anim flags + db SPRITE_ANIM_FLAG_UNSKIPPABLE ; anim flags db SFX_BIG_HIT ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_SHOW_DAMAGE db SPRITE_DUEL_DAMAGE ; sprite ID db PALETTE_37 ; palette ID - db $00 ; anim ID - db $00 ; anim flags + db NONE ; anim ID + db NONE ; anim flags db SFX_STOP ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_THUNDER_SHOCK db SPRITE_DUEL_THUNDER ; sprite ID db PALETTE_38 ; palette ID db SPRITE_ANIM_92 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_THUNDER_SHOCK ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_LIGHTNING db SPRITE_DUEL_LIGHTNING ; sprite ID db PALETTE_39 ; palette ID db SPRITE_ANIM_94 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_LIGHTNING ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_BORDER_SPARK db SPRITE_DUEL_SPARK ; sprite ID db PALETTE_40 ; palette ID db SPRITE_ANIM_95 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_BORDER_SPARK ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_BIG_LIGHTNING db SPRITE_DUEL_BIG_LIGHTNING ; sprite ID db PALETTE_41 ; palette ID db SPRITE_ANIM_96 ; anim ID - db (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_BIG_LIGHTNING ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_SMALL_FLAME db SPRITE_DUEL_FLAME ; sprite ID db PALETTE_42 ; palette ID db SPRITE_ANIM_97 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_SMALL_FLAME ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_BIG_FLAME db SPRITE_DUEL_FLAME ; sprite ID db PALETTE_42 ; palette ID db SPRITE_ANIM_98 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_BIG_FLAME ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_FIRE_SPIN db SPRITE_DUEL_FIRE_SPIN ; sprite ID db PALETTE_43 ; palette ID db SPRITE_ANIM_99 ; anim ID - db (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_FIRE_SPIN ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_DIVE_BOMB db SPRITE_DUEL_FIRE_BIRD ; sprite ID db PALETTE_44 ; palette ID db SPRITE_ANIM_100 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_DIVE_BOMB ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_WATER_JETS db SPRITE_DUEL_WATER_DROP ; sprite ID db PALETTE_45 ; palette ID db SPRITE_ANIM_105 ; anim ID - db (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_WATER_JETS ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_WATER_GUN db SPRITE_DUEL_WATER_GUN ; sprite ID db PALETTE_46 ; palette ID db SPRITE_ANIM_106 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_WATER_GUN ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_WHIRLPOOL db SPRITE_DUEL_WHIRLPOOL ; sprite ID db PALETTE_47 ; palette ID db SPRITE_ANIM_107 ; anim ID - db (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_WHIRLPOOL ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_HYDRO_PUMP db SPRITE_DUEL_HYDRO_PUMP ; sprite ID db PALETTE_48 ; palette ID db SPRITE_ANIM_108 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_HYDRO_PUMP ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_BLIZZARD db SPRITE_DUEL_SNOW ; sprite ID db PALETTE_49 ; palette ID db SPRITE_ANIM_109 ; anim ID - db (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_BLIZZARD ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_PSYCHIC db SPRITE_DUEL_PSYCHIC ; sprite ID db PALETTE_50 ; palette ID db SPRITE_ANIM_110 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_PSYCHIC ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_LEER db SPRITE_DUEL_LEER ; sprite ID db PALETTE_51 ; palette ID db SPRITE_ANIM_111 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_LEER ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_BEAM db SPRITE_DUEL_BEAM ; sprite ID db PALETTE_52 ; palette ID db SPRITE_ANIM_112 ; anim ID - db (1 << SPRITE_ANIM_FLAG_6) | (1 << SPRITE_ANIM_FLAG_Y_SUBTRACT) ; anim flags + db SPRITE_ANIM_FLAG_Y_FLIP | SPRITE_ANIM_FLAG_Y_INVERTED ; anim flags db SFX_BEAM ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_HYPER_BEAM db SPRITE_DUEL_HYPER_BEAM ; sprite ID db PALETTE_53 ; palette ID db SPRITE_ANIM_113 ; anim ID - db (1 << SPRITE_ANIM_FLAG_6) | (1 << SPRITE_ANIM_FLAG_Y_SUBTRACT) ; anim flags + db SPRITE_ANIM_FLAG_Y_FLIP | SPRITE_ANIM_FLAG_Y_INVERTED ; anim flags db SFX_HYPER_BEAM ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_ROCK_THROW db SPRITE_DUEL_ROCK_THROW ; sprite ID db PALETTE_54 ; palette ID db SPRITE_ANIM_114 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_ROCK_THROW ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_STONE_BARRAGE db SPRITE_DUEL_ROCK_THROW ; sprite ID db PALETTE_54 ; palette ID db SPRITE_ANIM_115 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_STONE_BARRAGE ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_PUNCH db SPRITE_DUEL_PUNCH ; sprite ID db PALETTE_55 ; palette ID db SPRITE_ANIM_116 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_PUNCH ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_THUNDERPUNCH db SPRITE_DUEL_PUNCH ; sprite ID db PALETTE_55 ; palette ID db SPRITE_ANIM_117 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_THUNDERPUNCH ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_FIRE_PUNCH db SPRITE_DUEL_PUNCH ; sprite ID db PALETTE_55 ; palette ID db SPRITE_ANIM_118 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_FIRE_PUNCH ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_STRETCH_KICK db SPRITE_DUEL_STRETCH_KICK ; sprite ID db PALETTE_56 ; palette ID db SPRITE_ANIM_119 ; anim ID - db (1 << SPRITE_ANIM_FLAG_5) | (1 << SPRITE_ANIM_FLAG_X_SUBTRACT) ; anim flags + db SPRITE_ANIM_FLAG_X_FLIP | SPRITE_ANIM_FLAG_X_INVERTED ; anim flags db SFX_STRETCH_KICK ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_SLASH db SPRITE_DUEL_SLASH ; sprite ID db PALETTE_57 ; palette ID db SPRITE_ANIM_120 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_SLASH ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_WHIP db SPRITE_DUEL_WHIP ; sprite ID db PALETTE_58 ; palette ID db SPRITE_ANIM_122 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_SLASH ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_SONICBOOM db SPRITE_DUEL_SONICBOOM ; sprite ID db PALETTE_59 ; palette ID db SPRITE_ANIM_123 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_SONICBOOM ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_FURY_SWIPES db SPRITE_DUEL_SLASH ; sprite ID db PALETTE_57 ; palette ID db SPRITE_ANIM_121 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_FURY_SWIPES ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_DRILL db SPRITE_DUEL_DRILL ; sprite ID db PALETTE_60 ; palette ID db SPRITE_ANIM_124 ; anim ID - db (1 << SPRITE_ANIM_FLAG_5) | (1 << SPRITE_ANIM_FLAG_X_SUBTRACT) ; anim flags + db SPRITE_ANIM_FLAG_X_FLIP | SPRITE_ANIM_FLAG_X_INVERTED ; anim flags db SFX_DRILL ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_POT_SMASH db SPRITE_DUEL_POT ; sprite ID db PALETTE_61 ; palette ID db SPRITE_ANIM_125 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_POT_SMASH ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_BONEMERANG db SPRITE_DUEL_BONE ; sprite ID db PALETTE_62 ; palette ID db SPRITE_ANIM_126 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_BONEMERANG ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_SEISMIC_TOSS db SPRITE_DUEL_PLANET ; sprite ID db PALETTE_63 ; palette ID db SPRITE_ANIM_127 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_SEISMIC_TOSS ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_NEEDLES db SPRITE_DUEL_NEEDLES ; sprite ID db PALETTE_64 ; palette ID db SPRITE_ANIM_128 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_NEEDLES; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_WHITE_GAS db SPRITE_DUEL_GAS ; sprite ID db PALETTE_65 ; palette ID db SPRITE_ANIM_129 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_WHITE_GAS ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_POWDER db SPRITE_DUEL_POWDER ; sprite ID db PALETTE_66 ; palette ID db SPRITE_ANIM_130 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_POWDER ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_GOO db SPRITE_DUEL_GOO ; sprite ID db PALETTE_67 ; palette ID db SPRITE_ANIM_131 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_GOO ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_BUBBLES db SPRITE_DUEL_BUBBLE ; sprite ID db PALETTE_68 ; palette ID db SPRITE_ANIM_132 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_BUBBLES ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_STRING_SHOT db SPRITE_DUEL_STRING ; sprite ID db PALETTE_69 ; palette ID db SPRITE_ANIM_133 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_STRING_SHOT ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_BOYFRIENDS db SPRITE_DUEL_HEART ; sprite ID db PALETTE_70 ; palette ID db SPRITE_ANIM_134 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_BOYFRIENDS ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_LURE db SPRITE_DUEL_LURE ; sprite ID db PALETTE_71 ; palette ID db SPRITE_ANIM_135 ; anim ID - db (1 << SPRITE_ANIM_FLAG_5) | (1 << SPRITE_ANIM_FLAG_X_SUBTRACT) ; anim flags + db SPRITE_ANIM_FLAG_X_FLIP | SPRITE_ANIM_FLAG_X_INVERTED ; anim flags db SFX_LURE ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_TOXIC db SPRITE_DUEL_SKULL ; sprite ID db PALETTE_72 ; palette ID db SPRITE_ANIM_136 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_TOXIC ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_CONFUSE_RAY db SPRITE_DUEL_SMALL_STAR ; sprite ID db PALETTE_73 ; palette ID db SPRITE_ANIM_137 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_CONFUSE_RAY ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_SING db SPRITE_DUEL_NOTE ; sprite ID db PALETTE_74 ; palette ID db SPRITE_ANIM_138 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_SING ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_SUPERSONIC db SPRITE_DUEL_SOUND ; sprite ID db PALETTE_75 ; palette ID db SPRITE_ANIM_139 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_SUPERSONIC ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_PETAL_DANCE db SPRITE_DUEL_PETAL ; sprite ID db PALETTE_76 ; palette ID db SPRITE_ANIM_140 ; anim ID - db (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_PETAL_DANCE ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_PROTECT db SPRITE_DUEL_PROTECT ; sprite ID db PALETTE_77 ; palette ID db SPRITE_ANIM_141 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_PROTECT ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_BARRIER db SPRITE_DUEL_BARRIER ; sprite ID db PALETTE_78 ; palette ID db SPRITE_ANIM_142 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_BARRIER ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_SPEED db SPRITE_DUEL_SPEED ; sprite ID db PALETTE_79 ; palette ID db SPRITE_ANIM_143 ; anim ID - db (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_SPEED ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_WHIRLWIND db SPRITE_DUEL_WHIRLWIND ; sprite ID db PALETTE_80 ; palette ID db SPRITE_ANIM_144 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_WHIRLWIND ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_CRY db SPRITE_DUEL_CRY ; sprite ID db PALETTE_81 ; palette ID db SPRITE_ANIM_146 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_CRY ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_QUESTION_MARK db SPRITE_DUEL_QUESTION_MARK ; sprite ID db PALETTE_82 ; palette ID db SPRITE_ANIM_147 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_QUESTION_MARK ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_SELFDESTRUCT db SPRITE_DUEL_EXPLOSION ; sprite ID db PALETTE_83 ; palette ID db SPRITE_ANIM_148 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_SELFDESTRUCT ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_BIG_SELFDESTRUCT_1 db SPRITE_DUEL_EXPLOSION ; sprite ID db PALETTE_83 ; palette ID db SPRITE_ANIM_149 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_BIG_SELFDESTRUCT ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_HEAL db SPRITE_DUEL_HEAL ; sprite ID db PALETTE_84 ; palette ID db SPRITE_ANIM_151 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_HEAL ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_DRAIN db SPRITE_DUEL_DRAIN ; sprite ID db PALETTE_85 ; palette ID db SPRITE_ANIM_153 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_DRAIN ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_DARK_GAS db SPRITE_DUEL_GAS ; sprite ID db PALETTE_86 ; palette ID db SPRITE_ANIM_129 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_DARK_GAS ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_BIG_SELFDESTRUCT_2 db SPRITE_DUEL_EXPLOSION ; sprite ID db PALETTE_83 ; palette ID db SPRITE_ANIM_150 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_SELFDESTRUCT ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_UNUSED_42 db SPRITE_DUEL_HIT ; sprite ID db PALETTE_36 ; palette ID db SPRITE_ANIM_77 ; anim ID - db (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) ; anim flags + db SPRITE_ANIM_FLAG_UNSKIPPABLE ; anim flags db SFX_SINGLE_HIT ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_UNUSED_43 db SPRITE_DUEL_HIT ; sprite ID db PALETTE_36 ; palette ID db SPRITE_ANIM_78 ; anim ID - db (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) ; anim flags + db SPRITE_ANIM_FLAG_UNSKIPPABLE ; anim flags db SFX_BIG_HIT ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_BENCH_THUNDER db SPRITE_DUEL_THUNDER ; sprite ID db PALETTE_38 ; palette ID db SPRITE_ANIM_92 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_THUNDER_SHOCK ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_QUICKFREEZE db SPRITE_DUEL_SNOW ; sprite ID db PALETTE_49 ; palette ID db SPRITE_ANIM_109 ; anim ID - db (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_BLIZZARD ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_BENCH_GLOW db SPRITE_DUEL_SMALL_GLOW ; sprite ID db PALETTE_87 ; palette ID db SPRITE_ANIM_154 ; anim ID - db (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) ; anim flags + db SPRITE_ANIM_FLAG_UNSKIPPABLE ; anim flags db SFX_GLOW ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_FIREGIVER_START db SPRITE_DUEL_FIRE_BIRD ; sprite ID db PALETTE_44 ; palette ID db SPRITE_ANIM_101 ; anim ID - db (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_FIREGIVER_START ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_UNUSED_48 db SPRITE_DUEL_FIRE_BIRD ; sprite ID db PALETTE_44 ; palette ID db SPRITE_ANIM_102 ; anim ID - db (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_STOP ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_HEALING_WIND db SPRITE_DUEL_HEAL ; sprite ID db PALETTE_84 ; palette ID db SPRITE_ANIM_152 ; anim ID - db (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_HEALING_WIND ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_BENCH_WHIRLWIND db SPRITE_DUEL_WHIRLWIND ; sprite ID db PALETTE_80 ; palette ID db SPRITE_ANIM_145 ; anim ID - db (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_BENCH_WHIRLWIND ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_EXPAND db SPRITE_DUEL_BALL ; sprite ID db PALETTE_88 ; palette ID db SPRITE_ANIM_155 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_EXPAND ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_CAT_PUNCH db SPRITE_DUEL_CAT_POW ; sprite ID db PALETTE_89 ; palette ID db SPRITE_ANIM_156 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_CAT_PUNCH ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_THUNDER_WAVE db SPRITE_DUEL_WAVE ; sprite ID db PALETTE_90 ; palette ID db SPRITE_ANIM_157 ; anim ID - db $00 ; anim flags + db NONE ; anim flags db SFX_THUNDER_WAVE ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_FIREGIVER_PLAYER db SPRITE_DUEL_FIRE_BIRD ; sprite ID db PALETTE_44 ; palette ID db SPRITE_ANIM_103 ; anim ID - db (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_FIREGIVER ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_FIREGIVER_OPP db SPRITE_DUEL_FIRE_BIRD ; sprite ID db PALETTE_44 ; palette ID db SPRITE_ANIM_104 ; anim ID - db (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_FIREGIVER ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_UNUSED_50 db SPRITE_DUEL_CARD ; sprite ID db PALETTE_91 ; palette ID db SPRITE_ANIM_158 ; anim ID - db (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) | (1 << SPRITE_ANIM_FLAG_3) | (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_UNSKIPPABLE | SPRITE_ANIM_FLAG_3 | SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_STOP ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_PLAYER_SHUFFLE db SPRITE_DUEL_CARD ; sprite ID db PALETTE_91 ; palette ID db SPRITE_ANIM_159 ; anim ID - db (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) | (1 << SPRITE_ANIM_FLAG_3) | (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_UNSKIPPABLE | SPRITE_ANIM_FLAG_3 | SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_CARD_SHUFFLE ; sfx ID - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_OPP_SHUFFLE db SPRITE_DUEL_CARD ; sprite ID db PALETTE_91 ; palette ID db SPRITE_ANIM_160 ; anim ID - db (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) | (1 << SPRITE_ANIM_FLAG_3) | (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_UNSKIPPABLE | SPRITE_ANIM_FLAG_3 | SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_CARD_SHUFFLE ; sfx ID - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_BOTH_SHUFFLE db SPRITE_DUEL_CARD ; sprite ID db PALETTE_91 ; palette ID db SPRITE_ANIM_161 ; anim ID - db (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) | (1 << SPRITE_ANIM_FLAG_3) | (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_UNSKIPPABLE | SPRITE_ANIM_FLAG_3 | SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_CARD_SHUFFLE ; sfx ID - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_UNUSED_54 db SPRITE_DUEL_CARD ; sprite ID db PALETTE_91 ; palette ID db SPRITE_ANIM_162 ; anim ID - db (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) | (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_UNSKIPPABLE | SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_STOP ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_BOTH_DRAW db SPRITE_DUEL_CARD ; sprite ID db PALETTE_91 ; palette ID db SPRITE_ANIM_163 ; anim ID - db (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) | (1 << SPRITE_ANIM_FLAG_3) | (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_UNSKIPPABLE | SPRITE_ANIM_FLAG_3 | SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_STOP ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_PLAYER_DRAW db SPRITE_DUEL_CARD ; sprite ID db PALETTE_91 ; palette ID db SPRITE_ANIM_164 ; anim ID - db (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) | (1 << SPRITE_ANIM_FLAG_3) | (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_UNSKIPPABLE | SPRITE_ANIM_FLAG_3 | SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_STOP ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_OPP_DRAW db SPRITE_DUEL_CARD ; sprite ID db PALETTE_91 ; palette ID db SPRITE_ANIM_165 ; anim ID - db (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) | (1 << SPRITE_ANIM_FLAG_3) | (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_UNSKIPPABLE | SPRITE_ANIM_FLAG_3 | SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_STOP ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_COIN_SPIN db SPRITE_DUEL_COIN ; sprite ID db PALETTE_92 ; palette ID db SPRITE_ANIM_167 ; anim ID - db (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) | (1 << SPRITE_ANIM_FLAG_3) | (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_UNSKIPPABLE | SPRITE_ANIM_FLAG_3 | SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_STOP ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_COIN_TOSS1 db SPRITE_DUEL_COIN ; sprite ID db PALETTE_92 ; palette ID db SPRITE_ANIM_168 ; anim ID - db (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) | (1 << SPRITE_ANIM_FLAG_3) | (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_UNSKIPPABLE | SPRITE_ANIM_FLAG_3 | SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_COIN_TOSS ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_COIN_TOSS2 db SPRITE_DUEL_COIN ; sprite ID db PALETTE_92 ; palette ID db SPRITE_ANIM_169 ; anim ID - db (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) | (1 << SPRITE_ANIM_FLAG_3) | (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_UNSKIPPABLE | SPRITE_ANIM_FLAG_3 | SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_COIN_TOSS ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_COIN_TAILS db SPRITE_DUEL_COIN ; sprite ID db PALETTE_92 ; palette ID db SPRITE_ANIM_170 ; anim ID - db (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) | (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_UNSKIPPABLE | SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_STOP ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_COIN_HEADS db SPRITE_DUEL_COIN ; sprite ID db PALETTE_92 ; palette ID db SPRITE_ANIM_171 ; anim ID - db (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) | (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_UNSKIPPABLE | SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_STOP ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_DUEL_WIN db SPRITE_DUEL_RESULT ; sprite ID db PALETTE_93 ; palette ID db SPRITE_ANIM_172 ; anim ID - db (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) | (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_UNSKIPPABLE | SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_STOP ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_DUEL_LOSS db SPRITE_DUEL_RESULT ; sprite ID db PALETTE_93 ; palette ID db SPRITE_ANIM_173 ; anim ID - db (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) | (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_UNSKIPPABLE | SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_STOP ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_DUEL_DRAW db SPRITE_DUEL_RESULT ; sprite ID db PALETTE_93 ; palette ID db SPRITE_ANIM_174 ; anim ID - db (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) | (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_UNSKIPPABLE | SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_STOP ; sfx id - db $00 ; handler function + db NONE ; handler function ; DUEL_ANIM_UNUSED_60 db SPRITE_DUEL_CARD ; sprite ID db PALETTE_91 ; palette ID db SPRITE_ANIM_166 ; anim ID - db (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) | (1 << SPRITE_ANIM_FLAG_SPEED) ; anim flags + db SPRITE_ANIM_FLAG_UNSKIPPABLE | SPRITE_ANIM_FLAG_CENTERED ; anim flags db SFX_STOP ; sfx id - db $00 ; handler function + db NONE ; handler function assert_table_length NUM_REGULAR_DUEL_ANIMS diff --git a/src/engine/debug_sprites.asm b/src/engine/debug_sprites.asm index b6f0343..1b1a416 100644 --- a/src/engine/debug_sprites.asm +++ b/src/engine/debug_sprites.asm @@ -57,11 +57,11 @@ Func_1c890: ; unreferenced ld c, SPRITE_ANIM_FLAGS call GetSpriteAnimBufferProperty call UpdateRNGSources - and (1 << SPRITE_ANIM_FLAG_X_SUBTRACT) + and SPRITE_ANIM_FLAG_X_INVERTED jr nz, .asm_1c8b9 - res SPRITE_ANIM_FLAG_SPEED, [hl] + res SPRITE_ANIM_FLAG_CENTERED_F, [hl] jr .asm_1c8bb .asm_1c8b9 - set SPRITE_ANIM_FLAG_SPEED, [hl] + set SPRITE_ANIM_FLAG_CENTERED_F, [hl] .asm_1c8bb ret diff --git a/src/engine/duel/animations/commands.asm b/src/engine/duel/animations/commands.asm index 9221625..da67fce 100644 --- a/src/engine/duel/animations/commands.asm +++ b/src/engine/duel/animations/commands.asm @@ -15,11 +15,11 @@ PlayAttackAnimationCommands: ld d, [hl] push de - ld hl, wce7e + ld hl, wAttackAnimationIsPlaying ld a, [hl] or a jr nz, .read_command - ld [hl], $01 ; wce7e + ld [hl], TRUE ; wAttackAnimationIsPlaying call ResetAnimationQueue pop de push de @@ -30,9 +30,9 @@ PlayAttackAnimationCommands: xor a ld [wDuelAnimLocationParam], a ld a, [de] - cp $04 + cp ANIMCMD_SET_SCREEN jr z, .read_command - ld a, DUEL_ANIM_150 + ld a, DUEL_ANIM_SET_SCREEN call PlayDuelAnimation .read_command pop de @@ -110,7 +110,7 @@ AnimationCommand_AnimNormal: ld [de], a pop de - ld a, $8c + ld a, DUEL_ANIM_DAMAGE_HUD call PlayDuelAnimation ld a, [wDuelDisplayedScreen] cp DUEL_MAIN_SCENE @@ -154,24 +154,26 @@ AnimationCommand_AnimScreen: ld [wDuelAnimSetScreen], a ld a, [wDamageAnimPlayAreaLocation] ld [wDuelAnimLocationParam], a - call SetDuelAnimationScreen - ld a, DUEL_ANIM_150 + call UpdateDuelAnimationScreen + ld a, DUEL_ANIM_SET_SCREEN call PlayDuelAnimation jp PlayAttackAnimationCommands_NextCommand AnimationCommandPointerTable: - dw AnimationCommand_AnimEnd ; anim_end - dw AnimationCommand_AnimNormal ; anim_normal - dw AnimationCommand_AnimPlayer ; anim_player - dw AnimationCommand_AnimOpponent ; anim_opponent - dw AnimationCommand_AnimScreen ; anim_screen - dw AnimationCommand_AnimPlayArea ; anim_play_area - dw AnimationCommand_AnimEnd2 ; anim_end2 (unused) + table_width 2, AnimationCommandPointerTable + dw AnimationCommand_AnimEnd ; ANIMCMD_END + dw AnimationCommand_AnimNormal ; ANIMCMD_NORMAL + dw AnimationCommand_AnimPlayer ; ANIMCMD_PLAYER_SIDE + dw AnimationCommand_AnimOpponent ; ANIMCMD_OPP_SIDE + dw AnimationCommand_AnimScreen ; ANIMCMD_SET_SCREEN + dw AnimationCommand_AnimPlayArea ; ANIMCMD_PLAY_AREA + dw AnimationCommand_AnimEnd2 ; ANIMCMD_END_UNUSED + assert_table_length NUM_ANIM_COMMANDS ; sets wDuelAnimationScreen according to wDuelAnimSetScreen ; if SET_ANIM_SCREEN_MAIN, set it to Main Scene ; if SET_ANIM_SCREEN_PLAY_AREA, set it to Play Area scene -SetDuelAnimationScreen: +UpdateDuelAnimationScreen: ld a, [wDuelAnimSetScreen] cp SET_ANIM_SCREEN_PLAY_AREA jr z, .set_play_area_screen @@ -187,24 +189,22 @@ SetDuelAnimationScreen: ld a, [wWhoseTurn] ld h, a cp PLAYER_TURN - jr z, .player + jr z, .players_turn -; opponent +; opponent's turn ld a, [wDuelType] cp $00 jr z, .asm_50c6 - ; link duel or vs. AI bit 7, l jr z, .asm_50e2 jr .asm_50d2 - .asm_50c6 bit 7, l jr z, .asm_50da jr .asm_50ea -.player +.players_turn bit 7, l jr z, .asm_50d2 jr .asm_50e2 @@ -233,26 +233,25 @@ SetDuelAnimationScreen: ld [wDuelAnimationScreen], a ret -Func_190f4: +SetScreenForDuelAnimation: ld a, [wDuelAnimSetScreen] cp SET_ANIM_SCREEN_PLAY_AREA - jr z, Func_1910f - ; fallthrough - -Func_190fb: + jr z, .set_play_area_screen cp SET_ANIM_SCREEN_MAIN jr nz, .done +; set duel main screen ld a, DUEL_ANIM_SCREEN_MAIN_SCENE ld [wDuelAnimationScreen], a ld a, [wDuelDisplayedScreen] - cp $01 + cp DUEL_MAIN_SCENE jr z, .done bank1call DrawDuelMainScene .done ret -Func_1910f: - call SetDuelAnimationScreen +.set_play_area_screen + call UpdateDuelAnimationScreen + ld a, [wDuelDisplayedScreen] cp l jr z, .skip_change_screen @@ -347,7 +346,11 @@ UpdateMainSceneHUD: bank1call DrawDuelHUDs ret -Func_191a3: +DuelAnim153: +DuelAnim154: +DuelAnim155: +DuelAnim156: +DuelAnim157: ret INCLUDE "data/duel/animations/attack_animations.asm" diff --git a/src/engine/duel/animations/core.asm b/src/engine/duel/animations/core.asm index 5afcae6..34b497e 100644 --- a/src/engine/duel/animations/core.asm +++ b/src/engine/duel/animations/core.asm @@ -57,7 +57,7 @@ PlayLoadedDuelAnimation:: add hl, bc ld a, [hl] ; if flag is set, play animation anyway - and (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) + and SPRITE_ANIM_FLAG_UNSKIPPABLE pop hl jr z, .return @@ -155,7 +155,7 @@ LoadAnimCoordsAndFlags: call GetAnimCoordsAndFlags push af - and (1 << SPRITE_ANIM_FLAG_6) | (1 << SPRITE_ANIM_FLAG_5) + and SPRITE_ANIM_FLAG_Y_FLIP | SPRITE_ANIM_FLAG_X_FLIP or [hl] ld [hli], a ld a, b @@ -166,7 +166,7 @@ LoadAnimCoordsAndFlags: ld bc, SPRITE_ANIM_FLAGS - SPRITE_ANIM_COORD_Y add hl, bc ld c, a ; useless - and (1 << SPRITE_ANIM_FLAG_Y_SUBTRACT) | (1 << SPRITE_ANIM_FLAG_X_SUBTRACT) + and SPRITE_ANIM_FLAG_Y_INVERTED | SPRITE_ANIM_FLAG_X_INVERTED or [hl] ld [hl], a pop bc @@ -178,14 +178,14 @@ LoadAnimCoordsAndFlags: ; also returns in a the allowed animation flags of ; the configuration that is selected. ; output: -; a = anim flags -; b = x coordinate -; c = y coordinate +; - a = anim flags +; - b = x coordinate +; - c = y coordinate GetAnimCoordsAndFlags: push hl ld c, 0 ld a, [wAnimFlags] - and (1 << SPRITE_ANIM_FLAG_SPEED) + and SPRITE_ANIM_FLAG_CENTERED jr nz, .calc_addr ld a, [wDuelAnimationScreen] @@ -242,35 +242,30 @@ AnimationCoordinatesIndex: db $09, $0a, $0b, $0c, $0d, $0e ; player db $09, $0a, $0b, $0c, $0d, $0e ; opponent -MACRO anim_coords - db \1 - db \2 - db \3 -ENDM AnimationCoordinates: ; x coord, y coord, animation flags - anim_coords 88, 88, (1 << SPRITE_ANIM_FLAG_3) + db 88, 88, SPRITE_ANIM_FLAG_3 ; animations in the Duel Main Scene - anim_coords 40, 80, $00 - anim_coords 136, 48, (1 << SPRITE_ANIM_FLAG_6) | (1 << SPRITE_ANIM_FLAG_5) | (1 << SPRITE_ANIM_FLAG_Y_SUBTRACT) | (1 << SPRITE_ANIM_FLAG_X_SUBTRACT) + db 40, 80, NONE + db 136, 48, SPRITE_ANIM_FLAG_Y_FLIP | SPRITE_ANIM_FLAG_X_FLIP | SPRITE_ANIM_FLAG_Y_INVERTED | SPRITE_ANIM_FLAG_X_INVERTED ; animations in the Player's Play Area, for each Play Area Pokemon - anim_coords 88, 72, $00 - anim_coords 24, 96, $00 - anim_coords 56, 96, $00 - anim_coords 88, 96, $00 - anim_coords 120, 96, $00 - anim_coords 152, 96, $00 + db 88, 72, NONE + db 24, 96, NONE + db 56, 96, NONE + db 88, 96, NONE + db 120, 96, NONE + db 152, 96, NONE ; animations in the Opponent's Play Area, for each Play Area Pokemon - anim_coords 88, 80, $00 - anim_coords 152, 40, $00 - anim_coords 120, 40, $00 - anim_coords 88, 40, $00 - anim_coords 56, 40, $00 - anim_coords 24, 40, $00 + db 88, 80, NONE + db 152, 40, NONE + db 120, 40, NONE + db 88, 40, NONE + db 56, 40, NONE + db 24, 40, NONE ; appends to end of wDuelAnimBuffer ; the current duel animation @@ -285,7 +280,7 @@ LoadDuelAnimationToBuffer:: add DUEL_ANIM_STRUCT_SIZE and %01111111 cp b - jp z, .skip + jp z, .skip ; can be jr ld [hl], a ld b, $00 @@ -489,7 +484,7 @@ ClearAndDisableQueuedAnimations:: Func_1cb5e: cp $96 jp nc, Func_1ce03 - cp $8c + cp DUEL_ANIM_DAMAGE_HUD jp nz, InitScreenAnimation jr .damage ; redundant .damage @@ -561,7 +556,7 @@ CreateDamageCharSprite: farcall CreateSpriteAndAnimBufferEntry ld a, [wWhichSprite] ld [de], a - ld a, (1 << SPRITE_ANIM_FLAG_UNSKIPPABLE) + ld a, SPRITE_ANIM_FLAG_UNSKIPPABLE ld [wAnimFlags], a ld c, SPRITE_ANIM_COORD_X call GetSpriteAnimBufferProperty diff --git a/src/engine/duel/animations/screen_effects.asm b/src/engine/duel/animations/screen_effects.asm index be4bdf0..44d9b1b 100644 --- a/src/engine/duel/animations/screen_effects.asm +++ b/src/engine/duel/animations/screen_effects.asm @@ -12,7 +12,7 @@ InitScreenAnimation: add a ld c, a ld b, $00 - ld hl, Data_1cc9f + ld hl, ScreenAnimationFunctions add hl, bc ld a, [hli] ld [wScreenAnimUpdatePtr], a @@ -39,7 +39,7 @@ MACRO screen_effect db $00 ; padding ENDM -Data_1cc9f: +ScreenAnimationFunctions: ; function pointer, duration screen_effect ShakeScreenX_Small, 24 ; DUEL_ANIM_SMALL_SHAKE_X screen_effect ShakeScreenX_Big, 32 ; DUEL_ANIM_BIG_SHAKE_X @@ -96,12 +96,12 @@ ShakeScreenX: ld a, h ld [wScreenShakeOffsetsPtr + 1], a ld hl, wScreenAnimUpdatePtr - ld [hl], LOW(.Update) + ld [hl], LOW(.UpdateFunc) inc hl - ld [hl], HIGH(.Update) + ld [hl], HIGH(.UpdateFunc) ret -.Update +.UpdateFunc: call DecrementScreenAnimDuration call UpdateShakeOffset jp nc, LoadDefaultScreenAnimationUpdateWhenFinished @@ -124,12 +124,12 @@ ShakeScreenY: ld a, h ld [wScreenShakeOffsetsPtr + 1], a ld hl, wScreenAnimUpdatePtr - ld [hl], LOW(.Update) + ld [hl], LOW(.UpdateFunc) inc hl - ld [hl], HIGH(.Update) + ld [hl], HIGH(.UpdateFunc) ret -.Update +.UpdateFunc: call DecrementScreenAnimDuration call UpdateShakeOffset jp nc, LoadDefaultScreenAnimationUpdateWhenFinished @@ -187,9 +187,9 @@ DecrementScreenAnimDuration: WhiteFlashScreen: ld hl, wScreenAnimUpdatePtr - ld [hl], LOW(.Update) + ld [hl], LOW(.UpdateFunc) inc hl - ld [hl], HIGH(.Update) + ld [hl], HIGH(.UpdateFunc) ld a, [wBGP] ld [wTempWhiteFlashBGP], a ; backup the current background pals @@ -205,7 +205,7 @@ WhiteFlashScreen: call SetBGP call FlushAllPalettes -.Update +.UpdateFunc: call DecrementScreenAnimDuration ld a, [wScreenAnimDuration] or a @@ -222,9 +222,9 @@ WhiteFlashScreen: DistortScreen: ld hl, wScreenAnimUpdatePtr - ld [hl], LOW(.Update) + ld [hl], LOW(.UpdateFunc) inc hl - ld [hl], HIGH(.Update) + ld [hl], HIGH(.UpdateFunc) xor a ld [wApplyBGScroll], a ld hl, wLCDCFunctionTrampoline + 1 @@ -235,7 +235,7 @@ DistortScreen: ld [wBGScrollMod], a call EnableInt_LYCoincidence -.Update +.UpdateFunc: ld a, [wScreenAnimDuration] srl a srl a @@ -252,11 +252,11 @@ DistortScreen: ; each value is applied for 8 "ticks" of wScreenAnimDuration ; starting from the last and running backwards -.BGScrollModData +.BGScrollModData: db 4, 3, 2, 1, 1, 1, 1, 2 Func_1ce03: - cp DUEL_ANIM_158 + cp DUEL_ANIM_158_UNUSED jr z, .asm_1ce17 sub $96 add a @@ -277,11 +277,11 @@ Func_1ce03: jp Func_3bb5 .pointer_table - dw Func_190f4 ; DUEL_ANIM_150 + dw SetScreenForDuelAnimation ; DUEL_ANIM_SET_SCREEN dw PrintDamageText ; DUEL_ANIM_PRINT_DAMAGE dw UpdateMainSceneHUD ; DUEL_ANIM_UPDATE_HUD - dw Func_191a3 ; DUEL_ANIM_153 - dw Func_191a3 ; DUEL_ANIM_154 - dw Func_191a3 ; DUEL_ANIM_155 - dw Func_191a3 ; DUEL_ANIM_156 - dw Func_191a3 ; DUEL_ANIM_157 + dw DuelAnim153 ; DUEL_ANIM_153_UNUSED + dw DuelAnim154 ; DUEL_ANIM_154_UNUSED + dw DuelAnim155 ; DUEL_ANIM_155_UNUSED + dw DuelAnim156 ; DUEL_ANIM_156_UNUSED + dw DuelAnim157 ; DUEL_ANIM_157_UNUSED diff --git a/src/engine/duel/core.asm b/src/engine/duel/core.asm index 647e73a..1b123f8 100644 --- a/src/engine/duel/core.asm +++ b/src/engine/duel/core.asm @@ -6720,7 +6720,7 @@ OppAction_UsePokemonPower: ; execute the EFFECTCMDTYPE_BEFORE_DAMAGE command of the used Pokemon Power OppAction_ExecutePokemonPowerEffect: - call Func_7415 + call ResetAttackAnimationIsPlaying ld a, EFFECTCMDTYPE_BEFORE_DAMAGE call TryExecuteEffectCommandFunction ld a, $01 @@ -7102,7 +7102,7 @@ HandlePoisonDamage: call GetTurnDuelistVariable call SubtractHP push hl - ld a, $8c + ld a, DUEL_ANIM_DAMAGE_HUD call PlayBetweenTurnsAnimation pop hl @@ -8231,9 +8231,9 @@ SelectComputerOpponentData: textitem 3, 14, SelectComputerOpponentText db $ff -Func_7415:: - xor a - ld [wce7e], a +ResetAttackAnimationIsPlaying:: + xor a ; FALSE + ld [wAttackAnimationIsPlaying], a ret ; plays all animations that are queued in wStatusConditionQueue @@ -8328,6 +8328,7 @@ WaitAttackAnimation:: ; - de: damage dealt by the attack (to display the animation with the number) ; - b: PLAY_AREA_* location, if applicable ; - c: a wDamageEffectiveness constant (to print WEAK or RESIST if necessary) +; - h: which duelist side to play animation PlayAttackAnimation:: ldh a, [hWhoseTurn] push af @@ -8341,6 +8342,7 @@ PlayAttackAnimation:: ldh a, [hWhoseTurn] cp h jr z, .got_location + ; on the non-turn duelist's side set 7, b .got_location ld a, b diff --git a/src/engine/duel/effect_functions.asm b/src/engine/duel/effect_functions.asm index 0eb4b87..3811849 100644 --- a/src/engine/duel/effect_functions.asm +++ b/src/engine/duel/effect_functions.asm @@ -473,6 +473,7 @@ ApplyAndAnimateHPRecovery: ld a, ATK_ANIM_HEAL ld [wLoadedAttackAnimation], a lb bc, PLAY_AREA_ARENA, $1 ; arrow + ; bug, h needs to be set to hWhoseTurn bank1call PlayAttackAnimation ; compare HP to be restored with max HP @@ -2693,7 +2694,7 @@ SolarPower_CheckUse: SolarPower_RemoveStatusEffect: ld a, ATK_ANIM_HEAL_BOTH_SIDES ld [wLoadedAttackAnimation], a - bank1call Func_7415 + bank1call ResetAttackAnimationIsPlaying ldh a, [hTempPlayAreaLocation_ff9d] ld b, a ld c, $00 @@ -11134,7 +11135,7 @@ GustOfWind_SwitchEffect: ; a = attack animation to play PlayTrainerEffectAnimation: ld [wLoadedAttackAnimation], a - bank1call Func_7415 + bank1call ResetAttackAnimationIsPlaying lb bc, PLAY_AREA_ARENA, $0 ldh a, [hWhoseTurn] ld h, a @@ -11154,7 +11155,7 @@ HealPlayAreaCardHP: ; play heal animation push de - bank1call Func_7415 + bank1call ResetAttackAnimationIsPlaying ld a, ATK_ANIM_HEALING_WIND_PLAY_AREA ld [wLoadedAttackAnimation], a ldh a, [hTempPlayAreaLocation_ff9d] diff --git a/src/engine/gfx/sprite_animations.asm b/src/engine/gfx/sprite_animations.asm index 8ce8ea4..3919ce6 100644 --- a/src/engine/gfx/sprite_animations.asm +++ b/src/engine/gfx/sprite_animations.asm @@ -191,7 +191,7 @@ LoadSpriteDataForAnimationFrame: ld bc, SPRITE_ANIM_FLAGS - SPRITE_ANIM_TILE_ID add hl, bc ld a, [hl] - and 1 << SPRITE_ANIM_FLAG_UNSKIPPABLE + and SPRITE_ANIM_FLAG_UNSKIPPABLE jr nz, .quit ld bc, SPRITE_ANIM_FRAME_BANK - SPRITE_ANIM_FLAGS add hl, bc @@ -208,7 +208,7 @@ LoadSpriteDataForAnimationFrame: pop hl ret -; decrements the given sprite's movement counter (2x if SPRITE_ANIM_FLAG_SPEED is set) +; decrements the given sprite's movement counter (2x if SPRITE_ANIM_FLAG_CENTERED_F is set) ; moves to the next animation frame if necessary TryHandleSpriteAnimationFrame: push hl @@ -218,10 +218,10 @@ TryHandleSpriteAnimationFrame: ld d, 1 ld bc, SPRITE_ANIM_FLAGS add hl, bc - bit SPRITE_ANIM_FLAG_SPEED, [hl] - jr z, .skipSpeedIncrease + bit SPRITE_ANIM_FLAG_CENTERED_F, [hl] + jr z, .got_decrement inc d -.skipSpeedIncrease +.got_decrement pop hl ld bc, SPRITE_ANIM_COUNTER add hl, bc @@ -230,9 +230,9 @@ TryHandleSpriteAnimationFrame: jr z, .exit sub d ld [hl], a - jr z, .doNextAnimationFrame + jr z, .next_animation_frame jr nc, .exit -.doNextAnimationFrame +.next_animation_frame ld bc, SPRITE_ANIM_ENABLED - SPRITE_ANIM_COUNTER add hl, bc call HandleAnimationFrame @@ -324,7 +324,7 @@ HandleAnimationFrame: push bc push de push hl -.tryHandlingFrame +.try_handle_frame push hl ld bc, SPRITE_ANIM_BANK add hl, bc @@ -352,7 +352,7 @@ HandleAnimationFrame: inc de ld a, [de] call SetAnimationCounterAndLoop - jr c, .tryHandlingFrame + jr c, .try_handle_frame inc de ld bc, SPRITE_ANIM_COORD_X add hl, bc @@ -362,20 +362,20 @@ HandleAnimationFrame: ld b, [hl] pop hl ld a, [de] - bit SPRITE_ANIM_FLAG_X_SUBTRACT, b - jr z, .addXOffset + bit SPRITE_ANIM_FLAG_X_INVERTED_F, b + jr z, .got_x_offset cpl inc a -.addXOffset +.got_x_offset add [hl] ld [hli], a inc de ld a, [de] - bit SPRITE_ANIM_FLAG_Y_SUBTRACT, b - jr z, .addYOffset + bit SPRITE_ANIM_FLAG_Y_INVERTED_F, b + jr z, .got_y_offset cpl inc a -.addYOffset +.got_y_offset add [hl] ld [hl], a pop hl diff --git a/src/engine/menus/unknown.asm b/src/engine/menus/unknown.asm index 3d53185..a5b8c5b 100644 --- a/src/engine/menus/unknown.asm +++ b/src/engine/menus/unknown.asm @@ -50,7 +50,9 @@ Func_18661: ; unreferenced ; b button ld a, -1 - call Func_190fb + ; bug, the following routine is in another bank, + ; should use PlaySFXConfirmOrCancel_Bank6 instead + call PlaySFXConfirmOrCancel scf ret @@ -58,7 +60,9 @@ Func_18661: ; unreferenced .a_button call .draw_cursor ld a, 1 - call Func_190fb + ; bug, the following routine is in another bank, + ; should use PlaySFXConfirmOrCancel_Bank6 instead + call PlaySFXConfirmOrCancel scf ret diff --git a/src/engine/overworld/npc_core.asm b/src/engine/overworld/npc_core.asm index 428f05a..f5386ec 100644 --- a/src/engine/overworld/npc_core.asm +++ b/src/engine/overworld/npc_core.asm @@ -373,10 +373,10 @@ HandleAllNPCMovement:: pop af ld a, [hl] jr z, .reset_flag - set SPRITE_ANIM_FLAG_UNSKIPPABLE, [hl] + set SPRITE_ANIM_FLAG_UNSKIPPABLE_F, [hl] jr .done .reset_flag - res SPRITE_ANIM_FLAG_UNSKIPPABLE, [hl] + res SPRITE_ANIM_FLAG_UNSKIPPABLE_F, [hl] .done pop bc pop hl diff --git a/src/engine/overworld/overworld.asm b/src/engine/overworld/overworld.asm index 552f699..ec0b8a3 100644 --- a/src/engine/overworld/overworld.asm +++ b/src/engine/overworld/overworld.asm @@ -822,10 +822,10 @@ Func_c58b: pop af ld a, [hl] jr z, .asm_c5a7 - or $80 + or SPRITE_ANIM_FLAG_UNSKIPPABLE jr .asm_c5a9 .asm_c5a7 - and $7f + and $ff ^ SPRITE_ANIM_FLAG_UNSKIPPABLE .asm_c5a9 ld [hl], a pop hl @@ -928,7 +928,7 @@ AttemptPlayerMovement: ld [wd338], a ld c, SPRITE_ANIM_FLAGS call GetSpriteAnimBufferProperty - set 2, [hl] + set SPRITE_ANIM_FLAG_CENTERED_F, [hl] ld c, SPRITE_ANIM_COUNTER call GetSpriteAnimBufferProperty ld a, $4 @@ -1058,7 +1058,7 @@ Func_c6f7: ld [wWhichSprite], a ld c, SPRITE_ANIM_FLAGS call GetSpriteAnimBufferProperty - res 2, [hl] + res SPRITE_ANIM_FLAG_CENTERED_F, [hl] ld c, SPRITE_ANIM_COUNTER call GetSpriteAnimBufferProperty ld a, $ff diff --git a/src/engine/overworld_map.asm b/src/engine/overworld_map.asm index 0f0c119..16236b0 100644 --- a/src/engine/overworld_map.asm +++ b/src/engine/overworld_map.asm @@ -247,7 +247,7 @@ OverworldMap_InitCursorSprite: jr nz, .visited_lab ld c, SPRITE_ANIM_FLAGS call GetSpriteAnimBufferProperty - set SPRITE_ANIM_FLAG_UNSKIPPABLE, [hl] + set SPRITE_ANIM_FLAG_UNSKIPPABLE_F, [hl] .visited_lab ret @@ -270,7 +270,7 @@ OverworldMap_BeginPlayerMovement: ld [wWhichSprite], a ld c, SPRITE_ANIM_FLAGS call GetSpriteAnimBufferProperty - set SPRITE_ANIM_FLAG_SPEED, [hl] + set SPRITE_ANIM_FLAG_CENTERED_F, [hl] ; get pointer table for starting map ld hl, OverworldMap_PlayerMovementPaths diff --git a/src/engine/sequences/intro_sequence_commands.asm b/src/engine/sequences/intro_sequence_commands.asm index 8a432a3..f89be83 100644 --- a/src/engine/sequences/intro_sequence_commands.asm +++ b/src/engine/sequences/intro_sequence_commands.asm @@ -354,7 +354,7 @@ AnimateRandomTitleScreenOrb: ld a, [wConsole] cp CONSOLE_CGB jr nz, .set_coords - set SPRITE_ANIM_FLAG_UNSKIPPABLE, [hl] + set SPRITE_ANIM_FLAG_UNSKIPPABLE_F, [hl] .set_coords inc hl @@ -383,7 +383,7 @@ AnimateRandomTitleScreenOrb: ld a, [hld] cp 152 jr nz, .skip - res SPRITE_ANIM_FLAG_UNSKIPPABLE, [hl] + res SPRITE_ANIM_FLAG_UNSKIPPABLE_F, [hl] .skip pop bc inc de diff --git a/src/home/duel.asm b/src/home/duel.asm index fe2eb5a..13c107a 100644 --- a/src/home/duel.asm +++ b/src/home/duel.asm @@ -1403,7 +1403,7 @@ ProcessPlayedPokemonCard:: ldtx hl, WillUseThePokemonPowerText call DrawWideTextBox_WaitForInput call ExchangeRNG - call Func_7415 + call ResetAttackAnimationIsPlaying ld a, EFFECTCMDTYPE_PKMN_POWER_TRIGGER call TryExecuteEffectCommandFunction ret @@ -1542,7 +1542,7 @@ UseAttackOrPokemonPower:: ; fallthrough PlayAttackAnimation_DealAttackDamage:: - call Func_7415 + call ResetAttackAnimationIsPlaying ld a, [wLoadedAttackCategory] and RESIDUAL jr nz, .deal_damage @@ -1648,7 +1648,7 @@ HandleConfusionDamageToSelf:: ; use Pokemon Power UsePokemonPower:: - call Func_7415 + call ResetAttackAnimationIsPlaying ld a, EFFECTCMDTYPE_INITIAL_EFFECT_2 call TryExecuteEffectCommandFunction jr c, DisplayUsePokemonPowerScreen_WaitForInput @@ -1822,7 +1822,7 @@ DealConfusionDamageToSelf:: push af xor a ld [wNoDamageOrEffect], a - bank1call Func_7415 + bank1call ResetAttackAnimationIsPlaying ld a, [wTempNonTurnDuelistCardID] push af ld a, [wTempTurnDuelistCardID] diff --git a/src/home/load_animation.asm b/src/home/load_animation.asm index 466e3cc..5f901d3 100644 --- a/src/home/load_animation.asm +++ b/src/home/load_animation.asm @@ -230,7 +230,7 @@ Func_3ddb:: push bc ld c, SPRITE_ANIM_FLAGS call GetSpriteAnimBufferProperty_SpriteInA - res 2, [hl] + res SPRITE_ANIM_FLAG_CENTERED_F, [hl] pop bc pop hl ret @@ -240,7 +240,7 @@ Func_3de7:: push bc ld c, SPRITE_ANIM_FLAGS call GetSpriteAnimBufferProperty_SpriteInA - set 2, [hl] + set SPRITE_ANIM_FLAG_CENTERED_F, [hl] pop bc pop hl ret diff --git a/src/macros.asm b/src/macros.asm index c41d2ef..ee30d9a 100644 --- a/src/macros.asm +++ b/src/macros.asm @@ -3,6 +3,7 @@ INCLUDE "macros/asserts.asm" INCLUDE "macros/constants.asm" INCLUDE "macros/code.asm" INCLUDE "macros/data.asm" +INCLUDE "macros/animations.asm" INCLUDE "macros/scripts.asm" INCLUDE "macros/text.asm" INCLUDE "macros/wram.asm" diff --git a/src/macros/animations.asm b/src/macros/animations.asm new file mode 100644 index 0000000..cf05b55 --- /dev/null +++ b/src/macros/animations.asm @@ -0,0 +1,38 @@ + const_def + + const ANIMCMD_END ; $0 +MACRO anim_end + db ANIMCMD_END +ENDM + + const ANIMCMD_NORMAL ; $1 +MACRO anim_normal + db ANIMCMD_NORMAL, \1 +ENDM + + const ANIMCMD_PLAYER_SIDE ; $2 +MACRO anim_player + db ANIMCMD_PLAYER_SIDE, \1 +ENDM + + const ANIMCMD_OPP_SIDE ; $3 +MACRO anim_opponent + db ANIMCMD_OPP_SIDE, \1 +ENDM + + const ANIMCMD_SET_SCREEN ; $4 +MACRO anim_screen + db ANIMCMD_SET_SCREEN, \1 +ENDM + + const ANIMCMD_PLAY_AREA ; $5 +MACRO anim_play_area + db ANIMCMD_PLAY_AREA, \1 +ENDM + + const ANIMCMD_END_UNUSED ; $6 +MACRO anim_end2 + db ANIMCMD_END_UNUSED +ENDM + +DEF NUM_ANIM_COMMANDS EQU const_value diff --git a/src/wram.asm b/src/wram.asm index caea6b7..a78a735 100644 --- a/src/wram.asm +++ b/src/wram.asm @@ -740,6 +740,7 @@ wAIMinDamage:: ; ccbb wAIMaxDamage:: ; ccbc ds $1 +; only written, never read wccbd:: ; ccbd ds $2 @@ -1542,7 +1543,7 @@ wTempPokemonID_ce7c:: ; ce7c ds $1 -wce7e:: ; ce7e +wAttackAnimationIsPlaying:: ; ce7e ds $1 wDamageAnimAmount:: ; ce7f @@ -2524,7 +2525,7 @@ wd420:: ; d420 ds $1 ; store settings for animation enabled/disabled -; 0 means enabled, 1 means disabled +; FALSE means enabled, TRUE means disabled wAnimationsDisabled:: ; d421 ds $1