summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Add-a-new-text-scrolling-speed.md29
-rw-r--r--Custom-order-for-the-Old-Pokédex-mode.md8
2 files changed, 32 insertions, 5 deletions
diff --git a/Add-a-new-text-scrolling-speed.md b/Add-a-new-text-scrolling-speed.md
index bce5b11..b69d657 100644
--- a/Add-a-new-text-scrolling-speed.md
+++ b/Add-a-new-text-scrolling-speed.md
@@ -6,6 +6,7 @@ This tutorial details how to add an additional text speed option to the options
1. [Define wram constant](#1-define-wram-constant)
2. [Add instant text to options](#2-add-instant-text-to-options)
3. [Fix text speed while holding A or B](#3-fix-text-speed-while-holding-a-or-b)
+4. [Fix `<SCROLL>` command](#4-fix-scroll-command)
## 1. Define wram constant
@@ -120,7 +121,7 @@ Note how `lb de, <previous>, <next>` correspond to the order defined with the `O
## 3. Fix text speed while holding A or B
-There is one last quirk that needs fixing. When you hold the A or B buttons while text is scrolling it does so at `TEXT_DELAY_FAST`. Since our custom text speed is faster than that we need to make sure this doesn't happen.
+There are a few extra quirks to fix. When you hold the A or B buttons while text is scrolling it does so at `TEXT_DELAY_FAST`. Since our custom text speed is faster than that we need to make sure this doesn't happen.
Edit [home/print_text.asm](../blob/master/home/print_text.asm):
@@ -135,4 +136,30 @@ Edit [home/print_text.asm](../blob/master/home/print_text.asm):
jr .updatedelay
```
+## 4. Fix `<SCROLL>` command
+
+Lastly, the `<SCROLL>` command, which is used when a stat is sharply raised or lowered (among a couple other cases), will cause the line to skip instantly, giving you no time to read it. We'll force a delay into it.
+
+`_ContText` fallsthrough into `_ContTextNoPause` but it doesn't need the delay, so we'll replace the fallthrough with a jump
+
+Edit [home/text.asm](../blob/master/home/text.asm):
+
+```diff
+_ContText::
+ ...
+ call z, UnloadBlinkingCursor
+- ; fallthrough
++ jr _ContTextNoPause.not_instant
+
+_ContTextNoPause::
++ ld a, [wOptions]
++ and TEXT_DELAY_MASK
++ cp TEXT_DELAY_FAST
++ jr nz, .not_instant
++ ld c, 15
++ call DelayFrames
++.not_instant
+ push de
+```
+
And there you go. \ No newline at end of file
diff --git a/Custom-order-for-the-Old-Pokédex-mode.md b/Custom-order-for-the-Old-Pokédex-mode.md
index a91059c..69ffd2d 100644
--- a/Custom-order-for-the-Old-Pokédex-mode.md
+++ b/Custom-order-for-the-Old-Pokédex-mode.md
@@ -115,7 +115,7 @@ Pokedex_PrintNumberIfOldMode:
ld de, -SCREEN_WIDTH
add hl, de
call Pokedex_GetDexNumber
- ld de, wc296
+ ld de, wUnusedBCDNumber
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
call PrintNum
@@ -141,12 +141,12 @@ Pokedex_GetDexNumber:
cp b
jr nz, .loop
ld a, c
- ld [wc296], a
+ ld [wUnusedBCDNumber], a
pop hl
pop bc
ret
```
-Before we move on, please note "wc296". This is a point in wRAM where the correct Pokedex number is stored. This variable is read from in some unused code, but never written too or read from otherwise, so it is safe to use in Crystal vanilla.
+Before we move on, please note "wUnusedBCDNumber". This is a point in wRAM where the correct Pokedex number is stored. This variable is read from in some unused code, but never written too or read from otherwise, so it is safe to use in Crystal vanilla.
Edit [pokedex_2.asm](../blob/master/engine/pokedex/pokedex_2.asm):
```diff
@@ -158,7 +158,7 @@ Edit [pokedex_2.asm](../blob/master/engine/pokedex/pokedex_2.asm):
ld [hli], a
;ld de, wTempSpecies
call Pokedex_GetDexNumber
- ld de, wc296
+ ld de, wUnusedBCDNumber
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
call PrintNum