diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2021-11-23 20:50:17 -0500 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2021-11-23 20:50:17 -0500 |
commit | 14a21880a0fad34c946beab55182b338a7be9a9d (patch) | |
tree | d576085115ad1e318d8cd50fc3bbc7912301c37c | |
parent | ddb01660dd5ef8844986e70e7d12b1e66aab4926 (diff) |
Use ~X instead of $ff ^ X
-rw-r--r-- | audio/engine.asm | 2 | ||||
-rw-r--r-- | engine/battle/effect_commands.asm | 2 | ||||
-rw-r--r-- | engine/battle_anims/anim_commands.asm | 2 | ||||
-rw-r--r-- | engine/battle_anims/helpers.asm | 2 | ||||
-rw-r--r-- | engine/events/catch_tutorial.asm | 2 | ||||
-rw-r--r-- | engine/gfx/sprites.asm | 4 | ||||
-rw-r--r-- | engine/items/item_effects.asm | 2 | ||||
-rw-r--r-- | engine/link/mystery_gift.asm | 2 | ||||
-rw-r--r-- | engine/menus/save.asm | 4 | ||||
-rw-r--r-- | engine/menus/trainer_card.asm | 2 | ||||
-rw-r--r-- | engine/overworld/scripting.asm | 6 | ||||
-rw-r--r-- | engine/overworld/variables.asm | 2 | ||||
-rw-r--r-- | home/lcd.asm | 2 |
13 files changed, 17 insertions, 17 deletions
diff --git a/audio/engine.asm b/audio/engine.asm index db175b7d..7d9f7b45 100644 --- a/audio/engine.asm +++ b/audio/engine.asm @@ -533,7 +533,7 @@ PlayDanger: ret z ; Don't do anything if SFX is being played - and $ff ^ (1 << DANGER_ON_F) + and ~(1 << DANGER_ON_F) ld d, a call _CheckSFX jr c, .increment diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm index e73582ca..361eb06d 100644 --- a/engine/battle/effect_commands.asm +++ b/engine/battle/effect_commands.asm @@ -351,7 +351,7 @@ CantMove: ld a, BATTLE_VARS_SUBSTATUS3 call GetBattleVarAddr ld a, [hl] - and $ff ^ (1 << SUBSTATUS_BIDE | 1 << SUBSTATUS_RAMPAGE | 1 << SUBSTATUS_CHARGED) + and ~(1 << SUBSTATUS_BIDE | 1 << SUBSTATUS_RAMPAGE | 1 << SUBSTATUS_CHARGED) ld [hl], a call ResetFuryCutterCount diff --git a/engine/battle_anims/anim_commands.asm b/engine/battle_anims/anim_commands.asm index 52245d6a..a16c076a 100644 --- a/engine/battle_anims/anim_commands.asm +++ b/engine/battle_anims/anim_commands.asm @@ -218,7 +218,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 diff --git a/engine/battle_anims/helpers.asm b/engine/battle_anims/helpers.asm index b533988e..6685ab73 100644 --- a/engine/battle_anims/helpers.asm +++ b/engine/battle_anims/helpers.asm @@ -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 diff --git a/engine/events/catch_tutorial.asm b/engine/events/catch_tutorial.asm index 5c12a02f..3539ceab 100644 --- a/engine/events/catch_tutorial.asm +++ b/engine/events/catch_tutorial.asm @@ -35,7 +35,7 @@ CatchTutorial:: ldh [hJoyPressed], a ld a, [wOptions] push af - and $ff ^ TEXT_DELAY_MASK + and ~TEXT_DELAY_MASK add TEXT_DELAY_MED ld [wOptions], a ld hl, .AutoInput diff --git a/engine/gfx/sprites.asm b/engine/gfx/sprites.asm index 94213946..b13d407a 100644 --- a/engine/gfx/sprites.asm +++ b/engine/gfx/sprites.asm @@ -338,7 +338,7 @@ GetSpriteOAMAttr: and PRIORITY | Y_FLIP | X_FLIP ld b, a ld a, [hl] - and $ff ^ (PRIORITY | Y_FLIP | X_FLIP) + and ~(PRIORITY | Y_FLIP | X_FLIP) or b ret @@ -423,7 +423,7 @@ GetSpriteAnimFrame: push af ld a, [hl] push hl - and $ff ^ (Y_FLIP << 1 | X_FLIP << 1) + and ~(Y_FLIP << 1 | X_FLIP << 1) ld hl, SPRITEANIMSTRUCT_DURATIONOFFSET add hl, bc add [hl] diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index 1be54c68..1b75811d 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -2155,7 +2155,7 @@ PokeFluteEffect: xor a ld [wPokeFluteCuredSleep], a - ld b, $ff ^ SLP + ld b, ~SLP ld hl, wPartyMon1Status call .CureSleep diff --git a/engine/link/mystery_gift.asm b/engine/link/mystery_gift.asm index c4cf3613..08d7f060 100644 --- a/engine/link/mystery_gift.asm +++ b/engine/link/mystery_gift.asm @@ -14,7 +14,7 @@ MG_TIMED_OUT EQU 1 << MG_TIMED_OUT_F MG_CANCELED EQU 1 << MG_CANCELED_F MG_WRONG_PREFIX EQU 1 << MG_WRONG_PREFIX_F MG_NOT_OKAY EQU MG_WRONG_CHECKSUM | MG_TIMED_OUT | MG_CANCELED | MG_WRONG_PREFIX -MG_OKAY EQU $ff ^ MG_NOT_OKAY +MG_OKAY EQU ~MG_NOT_OKAY MG_START_END EQU %11111111 REGION_PREFIX EQU $96 diff --git a/engine/menus/save.asm b/engine/menus/save.asm index b7565d35..ae89d028 100644 --- a/engine/menus/save.asm +++ b/engine/menus/save.asm @@ -389,7 +389,7 @@ SaveOptions: ld bc, wOptionsEnd - wOptions call CopyBytes ld a, [wOptions] - and $ff ^ (1 << NO_TEXT_SCROLL) + and ~(1 << NO_TEXT_SCROLL) ld [sOptions], a jp CloseSRAM @@ -677,7 +677,7 @@ CheckTextDelay: cp TEXT_DELAY_SLOW ret z ld a, [wOptions] - and $ff ^ TEXT_DELAY_MASK + and ~TEXT_DELAY_MASK or (1 << FAST_TEXT_DELAY_F) | (1 << NO_TEXT_DELAY_F) ld [wOptions], a ret diff --git a/engine/menus/trainer_card.asm b/engine/menus/trainer_card.asm index 1610749c..0ac9ee70 100644 --- a/engine/menus/trainer_card.asm +++ b/engine/menus/trainer_card.asm @@ -543,7 +543,7 @@ TrainerCard_Page2_3_OAMUpdate: inc de ld a, [wTrainerCardBadgeTileID] - and $ff ^ (1 << 7) + and ~(1 << 7) add [hl] ld [de], a ; tile id inc hl diff --git a/engine/overworld/scripting.asm b/engine/overworld/scripting.asm index 28506813..c29961cf 100644 --- a/engine/overworld/scripting.asm +++ b/engine/overworld/scripting.asm @@ -705,7 +705,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 @@ -1065,7 +1065,7 @@ Script_startbattle: call BufferScreen predef StartBattle ld a, [wBattleResult] - and $ff ^ BATTLERESULT_BITMASK + and ~BATTLERESULT_BITMASK ld [wScriptVar], a ret @@ -1081,7 +1081,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 406cf715..880dda38 100644 --- a/engine/overworld/variables.asm +++ b/engine/overworld/variables.asm @@ -118,5 +118,5 @@ _GetVarAction:: .BattleResult: ld a, [wBattleResult] - and $ff ^ BATTLERESULT_BITMASK + and ~BATTLERESULT_BITMASK jp .loadstringbuffer2 diff --git a/home/lcd.asm b/home/lcd.asm index 3d95bb59..bca40ba8 100644 --- a/home/lcd.asm +++ b/home/lcd.asm @@ -46,7 +46,7 @@ DisableLCD:: jr nz, .wait ldh a, [rLCDC] - and $ff ^ (1 << rLCDC_ENABLE) + and ~(1 << rLCDC_ENABLE) ldh [rLCDC], a xor a |