From 8eb2dcb5fc75bbab4f07389dc0a6acf2c7bbbc93 Mon Sep 17 00:00:00 2001 From: DGamers64 <61130022+DGamers-64@users.noreply.github.com> Date: Tue, 19 Oct 2021 17:40:52 +0200 Subject: The tutorial was outdated and I fix them --- Add-a-fourth-stats-page.md | 38 +++++++++++++++++++------------------- 1 file 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 -- cgit v1.2.3