summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Add-a-new-Unown-form.md28
1 files changed, 27 insertions, 1 deletions
diff --git a/Add-a-new-Unown-form.md b/Add-a-new-Unown-form.md
index 7c04863..67ed7a5 100644
--- a/Add-a-new-Unown-form.md
+++ b/Add-a-new-Unown-form.md
@@ -471,11 +471,37 @@ Edit [engine/pokedex/pokedex.asm](../blob/master/engine/pokedex/pokedex.asm):
+ dwcoord 15, 9, 16, 9 ; Z
+ dwcoord 15,10, 16,10 ; !
+ dwcoord 15,11, 16,11 ; ?
+
+...
+
+ Pokedex_LoadUnownFont:
+ ld a, BANK(sScratch)
+ call GetSRAMBank
+ ld hl, UnownFont
+ ld de, sScratch + $188
+ ld bc, 39 tiles
+ ld a, BANK(UnownFont)
+ call FarCopyBytes
+ ld hl, sScratch + $188
+- ld bc, 27 tiles
++ ld bc, (NUM_UNOWN + 1) tiles
+ call Pokedex_InvertTiles
+ ld de, sScratch + $188
+ ld hl, vTiles2 tile $40
+- lb bc, BANK(Pokedex_LoadUnownFont), 29
++ lb bc, BANK(Pokedex_LoadUnownFont), NUM_UNOWN + 1
+ call Request2bpp
+ call CloseSRAM
+ ret
```
First of all, notice that we had to add 2 to the value of the "diamond cursor" tile because we added two characters in front of it in [gfx/font/unown_font.png](../blob/master/gfx/font/unown_font.png).
-As for `Pokedex_DrawUnownModeBG`, our edits do two things: one, widen the interface; and two, define coordinates for the letter and cursor at new positions for **!** and **?**. (We also had to adjust the positions for S to Z to accomodate the wider interface.)
+As for `Pokedex_DrawUnownModeBG`, our edits do three things:
+
+- one, widen the interface;
+- two, define coordinates for the letter and cursor at new positions for **!** and **?** (and adjust the positions for S to Z to accomodate the wider interface);
+- three, change some hard-coded constants to depend on `NUM_UNOWN` (this may already be done in newer versions of pokecrystal).
## 9. Allow the new form to be unlocked in the wild