From 4154f191e09404748de4faa3a63bcb51faf42c98 Mon Sep 17 00:00:00 2001 From: mid-kid Date: Fri, 15 Feb 2019 02:56:24 +0100 Subject: Anotate more of the battle anim subsystem The X and Y flip flags can be applied through the stack consisting of: - Object attributes - Animation frame attributes - OAM Data Each of these negate eachother. Confused yet? The same stack is traversed to obtain the final tile ID, with an added layer on top for the base GFX offset and the offset for the dynamically loaded GFX requested by the object! wBattleAnimDelay is populated with the values passed to `anim_wait`. --- engine/battle_anims/anim_commands.asm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'engine/battle_anims/anim_commands.asm') diff --git a/engine/battle_anims/anim_commands.asm b/engine/battle_anims/anim_commands.asm index f6c6b06a6..6c30ab51d 100644 --- a/engine/battle_anims/anim_commands.asm +++ b/engine/battle_anims/anim_commands.asm @@ -267,12 +267,12 @@ RunBattleAnimCommand: ret .CheckTimer: - ld a, [wBattleAnimDuration] + ld a, [wBattleAnimDelay] and a jr z, .done dec a - ld [wBattleAnimDuration], a + ld [wBattleAnimDelay], a and a ret @@ -296,10 +296,10 @@ RunBattleAnimCommand: ret .not_done_with_anim - cp $d0 + cp anim_obj_command jr nc, .do_anim - ld [wBattleAnimDuration], a + ld [wBattleAnimDelay], a ret .do_anim @@ -310,7 +310,7 @@ RunBattleAnimCommand: .DoCommand: ; Execute battle animation command in [wBattleAnimByte]. ld a, [wBattleAnimByte] - sub $d0 + sub anim_obj_command ld e, a ld d, 0 -- cgit v1.2.3