summaryrefslogtreecommitdiff
path: root/engine/battle_anims/helpers.asm
diff options
context:
space:
mode:
authormid-kid <esteve.varela@gmail.com>2019-02-15 02:56:24 +0100
committermid-kid <esteve.varela@gmail.com>2019-02-15 03:01:59 +0100
commit4154f191e09404748de4faa3a63bcb51faf42c98 (patch)
tree118efe338996d328190ce432aac26c6d8b6fa0cc /engine/battle_anims/helpers.asm
parent469c51d08637dc9951e4068ecb3700a363294b54 (diff)
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`.
Diffstat (limited to 'engine/battle_anims/helpers.asm')
-rw-r--r--engine/battle_anims/helpers.asm6
1 files changed, 3 insertions, 3 deletions
diff --git a/engine/battle_anims/helpers.asm b/engine/battle_anims/helpers.asm
index 4a7f2950c..127fe5412 100644
--- a/engine/battle_anims/helpers.asm
+++ b/engine/battle_anims/helpers.asm
@@ -37,16 +37,16 @@ GetBattleAnimFrame:
push af
ld a, [hl]
push hl
- and $3f
+ and %00111111
ld hl, BATTLEANIMSTRUCT_DURATION
add hl, bc
ld [hl], a
pop hl
.okay
ld a, [hl]
- and $c0
+ and Y_FLIP << 1 | X_FLIP << 1 ; The << 1 is compensated in the "frame" macro
srl a
- ld [wBattleAnimTempAddSubFlags], a
+ ld [wBattleAnimTempFrameOAMFlags], a
pop af
ret