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

@@ -2530,7 +2530,7 @@ _SetPlayerPalette:
ld hl, OBJECT_PALETTE
add hl, bc
ld a, [hl]
and $ff ^ PALETTE_MASK
and ~PALETTE_MASK
or d
ld [hl], a
ret
@@ -2895,7 +2895,7 @@ InitSprites:
ld hl, OBJECT_SPRITE_TILE
add hl, bc
ld a, [hl]
and $ff ^ (1 << 7)
and ~(1 << 7)
ldh [hCurSpriteTile], a
xor a
bit 7, [hl]

View File

@@ -759,7 +759,7 @@ Script_musicfadeout:
call GetScriptByte
ld [wMusicFadeID + 1], a
call GetScriptByte
and $ff ^ (1 << MUSIC_FADE_IN_F)
and ~(1 << MUSIC_FADE_IN_F)
ld [wMusicFade], a
ret
@@ -1159,7 +1159,7 @@ Script_startbattle:
call BufferScreen
predef StartBattle
ld a, [wBattleResult]
and $ff ^ BATTLERESULT_BITMASK
and ~BATTLERESULT_BITMASK
ld [wScriptVar], a
ret
@@ -1175,7 +1175,7 @@ Script_reloadmapafterbattle:
ld d, [hl]
ld [hl], 0
ld a, [wBattleResult]
and $ff ^ BATTLERESULT_BITMASK
and ~BATTLERESULT_BITMASK
cp LOSE
jr nz, .notblackedout
ld b, BANK(Script_BattleWhiteout)

View File

@@ -137,5 +137,5 @@ _GetVarAction::
.BattleResult:
ld a, [wBattleResult]
and $ff ^ BATTLERESULT_BITMASK
and ~BATTLERESULT_BITMASK
jp .loadstringbuffer2