summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Expand-tilesets-from-192-to-255-tiles.md50
1 files changed, 50 insertions, 0 deletions
diff --git a/Expand-tilesets-from-192-to-255-tiles.md b/Expand-tilesets-from-192-to-255-tiles.md
index ded253e..ab8a5c4 100644
--- a/Expand-tilesets-from-192-to-255-tiles.md
+++ b/Expand-tilesets-from-192-to-255-tiles.md
@@ -445,6 +445,56 @@ Edit [constants/text_constants.asm](../blob/master/constants/text_constants.asm)
+FIRST_REGULAR_TEXT_CHAR EQU $7f
```
+Additionally, to avoid breaking functions that assume the $60-$7f area is treated as printable characters, such as `Copyright`, edit [home/text.asm](../blob/master/home/text.asm):
+```diff
+ dict "<USER>", PlaceMoveUsersName
+ dict "<ENEMY>", PlaceEnemysName
+ dict "<PLAY_G>", PlaceGenderedPlayerName
+- dict "゚", .place ; should be .diacritic
+- dict "゙", .place ; should be .diacritic
+- jr .not_diacritic
+
+-.diacritic
+- ld b, a
+- call Diacritic
+- jp NextChar
+-
+-.not_diacritic
+- cp FIRST_REGULAR_TEXT_CHAR
+- jr nc, .place
+-
+- cp "パ"
+- jr nc, .handakuten
+-
+-.dakuten
+- cp FIRST_HIRAGANA_DAKUTEN_CHAR
+- jr nc, .hiragana_dakuten
+- add "カ" - "ガ"
+- jr .katakana_dakuten
+-.hiragana_dakuten
+- add "か" - "が"
+-.katakana_dakuten
+- ld b, "゙" ; dakuten
+- call Diacritic
+- jr .place
+-
+-.handakuten
+- cp "ぱ"
+- jr nc, .hiragana_handakuten
+- add "ハ" - "パ"
+- jr .katakana_handakuten
+-.hiragana_handakuten
+- add "は" - "ぱ"
+-.katakana_handakuten
+- ld b, "゚" ; handakuten
+- call Diacritic
+-
+-.place
+ ld [hli], a
+ call PrintLetterDelay
+ jp NextChar
+```
+
Now tiles $60–$7E and $E0–$FE can safely have NPCs on top of them, but tiles $7F and $FF cannot. Tile $7F is the space character, so that's appropriate, but you'll have to remember not to place any sprites on tile $FF either.
(Until September 23, 2018, this step recommended that you edit `Function56cd` to call `Coord2Attr` instead of `Coord2Tile`, and check for the `PAL_BG_TEXT` color attribute instead of the `FIRST_REGULAR_TEXT_CHAR` tile ID. However, as ShinyDragonHunter noticed, this failed under certain circumstances involving the popup map name signs and automatic cutscenes—such as the Tin Tower scene where you battle Suicune.)