summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Add-a-fourth-stats-page.md38
1 files changed, 19 insertions, 19 deletions
diff --git a/Add-a-fourth-stats-page.md b/Add-a-fourth-stats-page.md
index 577e0a2..b67373d 100644
--- a/Add-a-fourth-stats-page.md
+++ b/Add-a-fourth-stats-page.md
@@ -159,12 +159,12 @@ Instead of three constants from 1 to 3, we'll use four constants from 0 to 3. We
xor a
ld [wJumptableIndex], a
-; ???
-- ld [wcf64], a
-- ld a, [wcf64]
-- and %11111100
-- or 1
-- ld [wcf64], a
-+ ld [wcf64], a ; PINK_PAGE
+- ld [wStatsScreenFlags], a
+- ld a, [wStatsScreenFlags]
+- and $ff ^ STAT_PAGE_MASK
+- or PINK_PAGE ; first_page
+- ld [wStatsScreenFlags], a
++ ld [wStatsScreenFlags], a ; PINK_PAGE
.loop
ld a, [wJumptableIndex]
and $ff ^ (1 << 7)
@@ -179,13 +179,13 @@ Instead of three constants from 1 to 3, we'll use four constants from 0 to 3. We
StatsScreenMobile:
xor a
ld [wJumptableIndex], a
--; ???
-- ld [wcf64], a
-- ld a, [wcf64]
-- and %11111100
-- or 1
-- ld [wcf64], a
-+ ld [wcf64], a ; PINK_PAGE
+- ???
+- ld [wStatsScreenFlags], a
+- ld a, [wStatsScreenFlags]
+- and $ff ^ STAT_PAGE_MASK
+- or PINK_PAGE ; first_page
+- ld [wStatsScreenFlags], a
++ ld [wStatsScreenFlags], a ; PINK_PAGE
.loop
farcall Mobile_SetOverworldDelay
ld a, [wJumptableIndex]
@@ -264,7 +264,7 @@ The arrow left of the page icons needs shifting further left to make room for a
...
.PageTilemap:
- ld a, [wcf64]
+ ld a, [wStatsScreenFlags]
maskbits NUM_STAT_PAGES
- dec a
ld hl, .Jumptable
@@ -273,14 +273,14 @@ The arrow left of the page icons needs shifting further left to make room for a
.Jumptable:
; entries correspond to *_PAGE constants
- dw .PinkPage
- dw .GreenPage
- dw .BluePage
-+ dw .OrangePage
+ dw LoadPinkPage
+ dw LoadGreenPage
+ dw LoadBluePage
++ dw LoadOrangePage
...
-+.OrangePage:
++LoadOrangePage:
+ ld de, HelloWorldString
+ hlcoord 1, 9
+ call PlaceString