diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2019-02-16 13:52:19 -0500 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2019-02-16 13:52:19 -0500 |
commit | 7c424527481af985a7b3157c274506ab9c2c2712 (patch) | |
tree | fe30fefdc9847a92b2038f112540fa0635cf662a | |
parent | 96bcf72d96cf59e3e1f5aaefb9b62b5e9b154e18 (diff) |
Standardize on $ff ^ X for bitwise negating 8-bit values
-rw-r--r-- | engine/battle_anims/anim_commands.asm | 2 | ||||
-rw-r--r-- | engine/battle_anims/core.asm | 2 | ||||
-rw-r--r-- | engine/battle_anims/helpers.asm | 2 | ||||
-rw-r--r-- | engine/gfx/sprites.asm | 4 | ||||
-rw-r--r-- | mobile/mobile_5f.asm | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/engine/battle_anims/anim_commands.asm b/engine/battle_anims/anim_commands.asm index b003ab4b4..b528239ee 100644 --- a/engine/battle_anims/anim_commands.asm +++ b/engine/battle_anims/anim_commands.asm @@ -242,7 +242,7 @@ BattleAnim_ClearOAM: ld c, NUM_SPRITE_OAM_STRUCTS .loop ld a, [hl] - and ~PALETTE_MASK & ~VRAM_BANK_1 + and $ff ^ (PALETTE_MASK | VRAM_BANK_1) ld [hli], a rept SPRITEOAMSTRUCT_LENGTH + -1 inc hl diff --git a/engine/battle_anims/core.asm b/engine/battle_anims/core.asm index 171816f38..fcde1be6b 100644 --- a/engine/battle_anims/core.asm +++ b/engine/battle_anims/core.asm @@ -171,7 +171,7 @@ BattleAnimOAMUpdate: or b ld b, a ld a, [wBattleAnimTempPalette] - and (PRIORITY | Y_FLIP | X_FLIP | OBP_NUM) ^ $ff + and PALETTE_MASK | VRAM_BANK_1 or b ld [de], a diff --git a/engine/battle_anims/helpers.asm b/engine/battle_anims/helpers.asm index 64d43f032..208ab6140 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 (Y_FLIP << 1 | X_FLIP << 1) ^ $ff + and $ff ^ (Y_FLIP << 1 | X_FLIP << 1) ld hl, BATTLEANIMSTRUCT_DURATION add hl, bc ld [hl], a diff --git a/engine/gfx/sprites.asm b/engine/gfx/sprites.asm index 79cd71671..395ff1830 100644 --- a/engine/gfx/sprites.asm +++ b/engine/gfx/sprites.asm @@ -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] diff --git a/mobile/mobile_5f.asm b/mobile/mobile_5f.asm index 9008f60c2..a2668fa89 100644 --- a/mobile/mobile_5f.asm +++ b/mobile/mobile_5f.asm @@ -1610,7 +1610,7 @@ endr Unknown_17da94: x = 0 rept 8 - db (1 << x) ^ $ff + db $ff ^ (1 << x) x = x + 1 endr |