Fix issues in review

This commit is contained in:
mid-kid
2019-02-16 19:08:34 +01:00
parent 80ece33e3e
commit 7d6befa181
6 changed files with 22 additions and 18 deletions

View File

@@ -89,7 +89,7 @@ BattleAnimOAMUpdate:
ld hl, wBattleAnimTempOAMFlags
ld a, [wBattleAnimTempFrameOAMFlags]
xor [hl]
and $e0 ; Keep priority, x flip and y flip flags.
and PRIORITY | Y_FLIP | X_FLIP
ld [hl], a
pop af
@@ -171,7 +171,7 @@ BattleAnimOAMUpdate:
or b
ld b, a
ld a, [wBattleAnimTempPalette]
and $f
and (PRIORITY | Y_FLIP | X_FLIP | OBP_NUM) ^ $ff
or b
ld [de], a
@@ -203,7 +203,7 @@ InitBattleAnimBuffer:
add hl, bc
ld a, [hl]
and %10000000
and PRIORITY
ld [wBattleAnimTempOAMFlags], a
xor a
ld [wBattleAnimTempFrameOAMFlags], a

View File

@@ -37,7 +37,7 @@ GetBattleAnimFrame:
push af
ld a, [hl]
push hl
and %00111111
and (Y_FLIP << 1 | X_FLIP << 1) ^ $ff
ld hl, BATTLEANIMSTRUCT_DURATION
add hl, bc
ld [hl], a
@@ -55,6 +55,7 @@ GetBattleAnimFrame:
ld hl, BATTLEANIMSTRUCT_DURATION
add hl, bc
ld [hl], a
ld hl, BATTLEANIMSTRUCT_FRAME
add hl, bc
dec [hl]