summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDGamers64 <61130022+DGamers-64@users.noreply.github.com>2021-10-19 17:40:52 +0200
committerDGamers64 <61130022+DGamers-64@users.noreply.github.com>2021-10-19 17:40:52 +0200
commit8eb2dcb5fc75bbab4f07389dc0a6acf2c7bbbc93 (patch)
tree49ecbf9191558467940f5c7dceabceb594ea67d9
parent9b24f0d207f3eb07a5e3acbe285edf9bf231f2c1 (diff)
The tutorial was outdated and I fix them
-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