summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2021-11-25 11:11:16 -0500
committerRangi <remy.oukaour+rangi42@gmail.com>2021-11-25 11:11:16 -0500
commita498c40c960e6d208b2a11b40aef2b38db9be57b (patch)
tree23b9918092529d61f9c4e96f2b91dfc7b6cdadf5
parent66d66c1b68307a00085ca7e7a6bb0b1ad153e514 (diff)
Use ~X instead of $ff ^ X
-rw-r--r--Add-a-fourth-stats-page.md8
-rw-r--r--Physical-Special-split.md2
-rw-r--r--Short-beeping-noise-for-low-HP.md2
3 files changed, 6 insertions, 6 deletions
diff --git a/Add-a-fourth-stats-page.md b/Add-a-fourth-stats-page.md
index d1547e9..a6bf58c 100644
--- a/Add-a-fourth-stats-page.md
+++ b/Add-a-fourth-stats-page.md
@@ -162,13 +162,13 @@ Instead of three constants from 1 to 3, we'll use four constants from 0 to 3. We
-; ???
- ld [wStatsScreenFlags], a
- ld a, [wStatsScreenFlags]
-- and $ff ^ STAT_PAGE_MASK
+- and ~STAT_PAGE_MASK
- or PINK_PAGE ; first_page
- ld [wStatsScreenFlags], a
+ ld [wStatsScreenFlags], a ; PINK_PAGE
.loop
ld a, [wJumptableIndex]
- and $ff ^ (1 << 7)
+ and ~(1 << 7)
ld hl, StatsScreenPointerTable
rst JumpTable
call StatsScreen_WaitAnim ; check for keys?
@@ -183,14 +183,14 @@ Instead of three constants from 1 to 3, we'll use four constants from 0 to 3. We
- ???
- ld [wStatsScreenFlags], a
- ld a, [wStatsScreenFlags]
-- and $ff ^ STAT_PAGE_MASK
+- and ~STAT_PAGE_MASK
- or PINK_PAGE ; first_page
- ld [wStatsScreenFlags], a
+ ld [wStatsScreenFlags], a ; PINK_PAGE
.loop
farcall Mobile_SetOverworldDelay
ld a, [wJumptableIndex]
- and $ff ^ (1 << 7)
+ and ~(1 << 7)
ld hl, StatsScreenPointerTable
rst JumpTable
call StatsScreen_WaitAnim
diff --git a/Physical-Special-split.md b/Physical-Special-split.md
index 6beb09c..5729bfd 100644
--- a/Physical-Special-split.md
+++ b/Physical-Special-split.md
@@ -335,7 +335,7 @@ Create **engine/pokemon/categories.asm**:
+ call GetFarByte
+
+; Mask out the type
-+ and $ff ^ TYPE_MASK
++ and ~TYPE_MASK
+; Shift the category bits into the range 0-2
+ rlc a
+ rlc a
diff --git a/Short-beeping-noise-for-low-HP.md b/Short-beeping-noise-for-low-HP.md
index 962869d..f793b4d 100644
--- a/Short-beeping-noise-for-low-HP.md
+++ b/Short-beeping-noise-for-low-HP.md
@@ -25,7 +25,7 @@ Edit [audio/engine.asm](../blob/master/audio/engine.asm):
+ 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