diff options
-rw-r--r-- | Expand-tilesets-from-192-to-255-tiles.md | 78 |
1 files changed, 41 insertions, 37 deletions
diff --git a/Expand-tilesets-from-192-to-255-tiles.md b/Expand-tilesets-from-192-to-255-tiles.md index ab8a5c4..2b200a5 100644 --- a/Expand-tilesets-from-192-to-255-tiles.md +++ b/Expand-tilesets-from-192-to-255-tiles.md @@ -445,60 +445,64 @@ 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): +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.) + +There's one problem with this: some code still assumes that $60-$7F are all text characters, like the function that draws the copyright screen at the start of the game. Changing the starting point from $60 to $7F interferes with other code to print [dakuten](https://en.wikipedia.org/wiki/Dakuten_and_handakuten), part of Japanese characters. An efficient solution is to just remove all the dakuten-handling code, since nothing in English Pokémon Crystal requires it. + +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 - + ... + 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 +- ld b, a +- call Diacritic +- jp NextChar - -.not_diacritic -- cp FIRST_REGULAR_TEXT_CHAR -- jr nc, .place +- cp FIRST_REGULAR_TEXT_CHAR +- jr nc, .place - -- cp "パ" -- jr nc, .handakuten +- cp "パ" +- jr nc, .handakuten - -.dakuten -- cp FIRST_HIRAGANA_DAKUTEN_CHAR -- jr nc, .hiragana_dakuten -- add "カ" - "ガ" -- jr .katakana_dakuten +- cp FIRST_HIRAGANA_DAKUTEN_CHAR +- jr nc, .hiragana_dakuten +- add "カ" - "ガ" +- jr .katakana_dakuten -.hiragana_dakuten -- add "か" - "が" +- add "か" - "が" -.katakana_dakuten -- ld b, "゙" ; dakuten -- call Diacritic -- jr .place +- ld b, "゙" ; dakuten +- call Diacritic +- jr .place - -.handakuten -- cp "ぱ" -- jr nc, .hiragana_handakuten -- add "ハ" - "パ" -- jr .katakana_handakuten +- cp "ぱ" +- jr nc, .hiragana_handakuten +- add "ハ" - "パ" +- jr .katakana_handakuten -.hiragana_handakuten -- add "は" - "ぱ" +- add "は" - "ぱ" -.katakana_handakuten -- ld b, "゚" ; handakuten -- call Diacritic +- ld b, "゚" ; handakuten +- call Diacritic - -.place - ld [hli], a - call PrintLetterDelay - jp NextChar + 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.) - ## 9. Change some hard-coded tile placements |