Standardize on $ff ^ X for bitwise negating 8-bit values

This commit is contained in:
Rangi
2019-02-16 13:52:19 -05:00
parent 96bcf72d96
commit 7c42452748
5 changed files with 6 additions and 6 deletions

View File

@@ -350,7 +350,7 @@ GetSpriteOAMAttr:
and PRIORITY | Y_FLIP | X_FLIP
ld b, a
ld a, [hl]
and (PRIORITY | Y_FLIP | X_FLIP) ^ $ff
and $ff ^ (PRIORITY | Y_FLIP | X_FLIP)
or b
ret
@@ -436,7 +436,7 @@ GetSpriteAnimFrame:
push af
ld a, [hl]
push hl
and (Y_FLIP << 1 | X_FLIP << 1) ^ $ff
and $ff ^ (Y_FLIP << 1 | X_FLIP << 1)
ld hl, SPRITEANIMSTRUCT_DURATIONOFFSET
add hl, bc
add [hl]