Use ~X instead of $ff ^ X

This commit is contained in:
Rangi
2021-11-23 20:37:18 -05:00
parent ab0f9c287a
commit e706b878d9
16 changed files with 23 additions and 23 deletions

View File

@@ -245,7 +245,7 @@ BattleAnim_ClearOAM:
ld c, NUM_SPRITE_OAM_STRUCTS
.loop
ld a, [hl]
and $ff ^ (PALETTE_MASK | VRAM_BANK_1) ; zeros out the palette bits
and ~(PALETTE_MASK | VRAM_BANK_1) ; zeros out the palette bits
assert PAL_BATTLE_OB_ENEMY == 0
ld [hli], a
rept SPRITEOAMSTRUCT_LENGTH - 1

View File

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