diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2021-11-23 20:37:18 -0500 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2021-11-23 20:37:18 -0500 |
commit | e706b878d9f78466e6cc9eda184e14a798cc4a0d (patch) | |
tree | a5625f28a4d5af1358727b54772659cee892b031 /engine/overworld | |
parent | ab0f9c287a45d1986985545d7ec6a2cd862e26fc (diff) |
Use ~X instead of $ff ^ X
Diffstat (limited to 'engine/overworld')
-rw-r--r-- | engine/overworld/map_objects.asm | 4 | ||||
-rw-r--r-- | engine/overworld/scripting.asm | 6 | ||||
-rw-r--r-- | engine/overworld/variables.asm | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/engine/overworld/map_objects.asm b/engine/overworld/map_objects.asm index b1041ed69..814e763f1 100644 --- a/engine/overworld/map_objects.asm +++ b/engine/overworld/map_objects.asm @@ -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] diff --git a/engine/overworld/scripting.asm b/engine/overworld/scripting.asm index 05e0f95e5..b53ba3911 100644 --- a/engine/overworld/scripting.asm +++ b/engine/overworld/scripting.asm @@ -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) diff --git a/engine/overworld/variables.asm b/engine/overworld/variables.asm index 321665ad5..65ad1ec74 100644 --- a/engine/overworld/variables.asm +++ b/engine/overworld/variables.asm @@ -137,5 +137,5 @@ _GetVarAction:: .BattleResult: ld a, [wBattleResult] - and $ff ^ BATTLERESULT_BITMASK + and ~BATTLERESULT_BITMASK jp .loadstringbuffer2 |