diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2018-06-23 23:56:53 -0400 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2018-06-23 23:56:53 -0400 |
commit | 05f0eab3034bb8781bc59fb65eac91a1c9019ff1 (patch) | |
tree | db3cceea5fc57b2d56cab8e242015b9f08baf960 | |
parent | b239c446a96daea82b5da61f9c665cd70df6bbc2 (diff) |
Reorganize
-rw-r--r-- | Expand-tilesets-from-192-to-255-tiles.md | 264 |
1 files changed, 132 insertions, 132 deletions
diff --git a/Expand-tilesets-from-192-to-255-tiles.md b/Expand-tilesets-from-192-to-255-tiles.md index f4812b3..bd9d2b6 100644 --- a/Expand-tilesets-from-192-to-255-tiles.md +++ b/Expand-tilesets-from-192-to-255-tiles.md @@ -10,9 +10,9 @@ It's fairly simple to use $E0β$FF for 32 more map tiles. We can also use $60β ## Contents 1. [Move necessary text tiles to the main font graphics](#1-move-necessary-text-tiles-to-the-main-font-graphics) -2. [Load the updated font graphics](#2-load-the-updated-font-graphics) -3. [Delete the unused font graphics](#3-delete-the-unused-font-graphics) -4. [Update the character set](#4-update-the-character-set) +2. [Update the character set](#2-update-the-character-set) +3. [Load the updated font graphics](#3-load-the-updated-font-graphics) +4. [Delete the unused font graphics](#4-delete-the-unused-font-graphics) 5. [Load tile graphics into $60β$7F and $E0β$FF](#5-load-tile-graphics-into-607f-and-e0ff) 6. [Update the tilesets' graphics to not skip $60β$7F](#6-update-the-tilesets-graphics-to-not-skip-607f) 7. [Update the tilesets' palette maps to not skip $60β$7F](#7-update-the-tilesets-palette-maps-to-not-skip-607f) @@ -47,7 +47,131 @@ And [gfx/font/overworld.png](../blob/master/gfx/font/overworld.png): Note that the textbox frames aren't present in these graphics. That's because they would be overwritten by whichever frame is actually chosen, so it would waste space to replicate them here. -## 2. Load the updated font graphics +## 2. Update the character set + +Edit [charmap.asm](../blob/master/charmap.asm): + +```diff +-; Actual characters (from gfx/font/font_extra.png) +- +- charmap "<BOLD_A>", $60 ; unused +- charmap "<BOLD_B>", $61 ; unused +- charmap "<BOLD_C>", $62 ; unused +- charmap "<BOLD_D>", $63 ; unused +- charmap "<BOLD_E>", $64 ; unused +- charmap "<BOLD_F>", $65 ; unused +- charmap "<BOLD_G>", $66 ; unused +- charmap "<BOLD_H>", $67 ; unused +- charmap "<BOLD_I>", $68 ; unused +- charmap "<BOLD_V>", $69 +- charmap "<BOLD_S>", $6a +- charmap "<BOLD_L>", $6b ; unused +- charmap "<BOLD_M>", $6c ; unused +- charmap "<COLON>", $6d ; colon with tinier dots than ":" +- charmap "γ", $6e ; hiragana small i, unused +- charmap "γ
", $6f ; hiragana small u, unused +- charmap "<PO>", $70 +- charmap "<KE>", $71 +- charmap "β", $72 ; opening quote +- charmap "β", $73 ; closing quote +- charmap "Β·", $74 ; middle dot, unused +- charmap "β¦", $75 ; ellipsis +- charmap "γ", $76 ; hiragana small a, unused +- charmap "γ", $77 ; hiragana small e, unused +- charmap "γ", $78 ; hiragana small o, unused +- +- charmap "β", $79 +- charmap "β", $7a +- charmap "β", $7b +- charmap "β", $7c +- charmap "β", $7d +- charmap "β", $7e +- charmap " ", $7f + + ... + + ; Actual characters (from other graphics files) + ++ charmap " ", $7f ; gfx/frames/space.png ++ +- ; needed for _LoadFontsExtra1 (see engine/load_font.asm) +- charmap "β ", $60 ; gfx/font/black.2bpp +- charmap "β²", $61 ; gfx/font/up_arrow.png +- charmap "β", $62 ; gfx/font/phone_icon.2bpp +- + ; needed for MagikarpHouseSign (see engine/events/magikarp.asm) +- charmap "β²", $6e ; gfx/font/feet_inches.png +- charmap "β³", $6f ; gfx/font/feet_inches.png ++ charmap "β²", $da ; gfx/font/feet_inches.png ++ charmap "β³", $db ; gfx/font/feet_inches.png + + ; needed for StatsScreen_PlaceShinyIcon and PrintPartyMonPage1 + charmap "β", $3f ; gfx/stats/stats_tiles.png, tile 14 + + ... + +- charmap "Γ", $c0 +- charmap "Γ", $c1 +- charmap "Γ", $c2 +- charmap "Γ€", $c3 +- charmap "ΓΆ", $c4 +- charmap "ΓΌ", $c5 ++ charmap "β", $ba ++ charmap "β", $bb ++ charmap "β", $bc ++ charmap "β", $bd ++ charmap "β", $be ++ charmap "β", $bf + + charmap "'d", $d0 + charmap "'l", $d1 + charmap "'m", $d2 + charmap "'r", $d3 + charmap "'s", $d4 + charmap "'t", $d5 + charmap "'v", $d6 ++ ++ charmap "β ", $d7 ++ charmap "β²", $d8 ++ charmap "β", $d9 ++ charmap "<BOLD_V>", $da ++ charmap "<BOLD_S>", $db ++ charmap "<COLON>", $dc ; colon with tinier dots than ":" ++ charmap "β", $dd ; opening quote ++ charmap "β", $de ; closing quote + + charmap "β", $df + charmap "'", $e0 + charmap "<PK>", $e1 + charmap "<MN>", $e2 + charmap "-", $e3 ++ ++ charmap "<PO>", $e4 ++ charmap "<KE>", $e5 + + charmap "?", $e6 + charmap "!", $e7 + charmap ".", $e8 ++ charmap "<DOT>", $e8 ; decimal point; same as "." + charmap "&", $e9 + + charmap "Γ©", $ea + charmap "β", $eb + charmap "β·", $ec + charmap "βΆ", $ed + charmap "βΌ", $ee + charmap "β", $ef + charmap "Β₯", $f0 + charmap "Γ", $f1 +- charmap "<DOT>", $f2 ; decimal point; same as "." in English ++ charmap "β¦", $f2 ; ellipsis + charmap "/", $f3 + charmap ",", $f4 + charmap "β", $f5 +``` + + +## 3. Load the updated font graphics Edit [engine/gfx/load_font.asm](../blob/master/engine/gfx/load_font.asm): @@ -176,7 +300,7 @@ And edit [mobile/mobile_41.asm](../blob/master/mobile/mobile_41.asm): ``` -## 3. Delete the unused font graphics +## 4. Delete the unused font graphics Delete [gfx/font/font_extra.png](../blob/master/gfx/font/font_extra.png), [gfx/font/phone_icon.png](../blob/master/gfx/font/phone_icon.png), [gfx/font/black.png](../blob/master/gfx/font/black.png), and [gfx/font/up_arrow.png](../blob/master/gfx/font/up_arrow.png). @@ -208,130 +332,6 @@ Edit [gfx/font.asm](../blob/master/gfx/font.asm): This is not strictly necessary, but it will save space in the ROM, and avoid confusion from wondering why changes to those files don't affect the game. -## 4. Update the character set - -Edit [charmap.asm](../blob/master/charmap.asm): - -```diff --; Actual characters (from gfx/font/font_extra.png) -- -- charmap "<BOLD_A>", $60 ; unused -- charmap "<BOLD_B>", $61 ; unused -- charmap "<BOLD_C>", $62 ; unused -- charmap "<BOLD_D>", $63 ; unused -- charmap "<BOLD_E>", $64 ; unused -- charmap "<BOLD_F>", $65 ; unused -- charmap "<BOLD_G>", $66 ; unused -- charmap "<BOLD_H>", $67 ; unused -- charmap "<BOLD_I>", $68 ; unused -- charmap "<BOLD_V>", $69 -- charmap "<BOLD_S>", $6a -- charmap "<BOLD_L>", $6b ; unused -- charmap "<BOLD_M>", $6c ; unused -- charmap "<COLON>", $6d ; colon with tinier dots than ":" -- charmap "γ", $6e ; hiragana small i, unused -- charmap "γ
", $6f ; hiragana small u, unused -- charmap "<PO>", $70 -- charmap "<KE>", $71 -- charmap "β", $72 ; opening quote -- charmap "β", $73 ; closing quote -- charmap "Β·", $74 ; middle dot, unused -- charmap "β¦", $75 ; ellipsis -- charmap "γ", $76 ; hiragana small a, unused -- charmap "γ", $77 ; hiragana small e, unused -- charmap "γ", $78 ; hiragana small o, unused -- -- charmap "β", $79 -- charmap "β", $7a -- charmap "β", $7b -- charmap "β", $7c -- charmap "β", $7d -- charmap "β", $7e -- charmap " ", $7f - - ... - - ; Actual characters (from other graphics files) - -+ charmap " ", $7f ; gfx/frames/space.png -+ -- ; needed for _LoadFontsExtra1 (see engine/load_font.asm) -- charmap "β ", $60 ; gfx/font/black.2bpp -- charmap "β²", $61 ; gfx/font/up_arrow.png -- charmap "β", $62 ; gfx/font/phone_icon.2bpp -- - ; needed for MagikarpHouseSign (see engine/events/magikarp.asm) -- charmap "β²", $6e ; gfx/font/feet_inches.png -- charmap "β³", $6f ; gfx/font/feet_inches.png -+ charmap "β²", $da ; gfx/font/feet_inches.png -+ charmap "β³", $db ; gfx/font/feet_inches.png - - ; needed for StatsScreen_PlaceShinyIcon and PrintPartyMonPage1 - charmap "β", $3f ; gfx/stats/stats_tiles.png, tile 14 - - ... - -- charmap "Γ", $c0 -- charmap "Γ", $c1 -- charmap "Γ", $c2 -- charmap "Γ€", $c3 -- charmap "ΓΆ", $c4 -- charmap "ΓΌ", $c5 -+ charmap "β", $ba -+ charmap "β", $bb -+ charmap "β", $bc -+ charmap "β", $bd -+ charmap "β", $be -+ charmap "β", $bf - - charmap "'d", $d0 - charmap "'l", $d1 - charmap "'m", $d2 - charmap "'r", $d3 - charmap "'s", $d4 - charmap "'t", $d5 - charmap "'v", $d6 -+ -+ charmap "β ", $d7 -+ charmap "β²", $d8 -+ charmap "β", $d9 -+ charmap "<BOLD_V>", $da -+ charmap "<BOLD_S>", $db -+ charmap "<COLON>", $dc ; colon with tinier dots than ":" -+ charmap "β", $dd ; opening quote -+ charmap "β", $de ; closing quote - - charmap "β", $df - charmap "'", $e0 - charmap "<PK>", $e1 - charmap "<MN>", $e2 - charmap "-", $e3 -+ -+ charmap "<PO>", $e4 -+ charmap "<KE>", $e5 - - charmap "?", $e6 - charmap "!", $e7 - charmap ".", $e8 -+ charmap "<DOT>", $e8 ; decimal point; same as "." - charmap "&", $e9 - - charmap "Γ©", $ea - charmap "β", $eb - charmap "β·", $ec - charmap "βΆ", $ed - charmap "βΌ", $ee - charmap "β", $ef - charmap "Β₯", $f0 - charmap "Γ", $f1 -- charmap "<DOT>", $f2 ; decimal point; same as "." in English -+ charmap "β¦", $f2 ; ellipsis - charmap "/", $f3 - charmap ",", $f4 - charmap "β", $f5 -``` - - ## 5. Load tile graphics into $60β$7F and $E0β$FF Edit [home/map.asm](../blob/master/home/map.asm). @@ -468,9 +468,7 @@ Edit [engine/overworld/map_objects.asm](../blob/master/engine/overworld/map_obje ## 9. Change some hard-coded tile placements -Some parts of the code use "<code>vTiles2 tile <i>N</i></code>" to hard-code the data for a tile from $00 to $7F. When such a tile is moved to the range $80β$FF, the offset is invalid, so it has to become "<code>vTiles0 tile <i>N</i></code>". (We already did this in [step 2](#2-load-the-updated-font-graphics) for `LoadFrame` and `Function10649b`.) - -(If it's unclear to you why, take a look at the VRAM screenshot again, noting that `Tiles0` is the top-left sixth, `vTiles1` is the middle-left, and `vTiles2` is the bottom-left, with all three being sequential in memory.) +Some parts of the code use "<code>vTiles2 tile <i>N</i></code>" to hard-code the data for a tile from $00 to $7F. When such a tile is moved to the range $80β$FF, the offset is invalid, so it has to become "<code>vTiles0 tile <i>N</i></code>". (We already did this in [step 3](#4-load-the-updated-font-graphics) for `LoadFrame` and `Function10649b`.) Edit [engine/menus/naming_screen.asm](../blob/master/engine/menus/naming_screen.asm): @@ -546,6 +544,8 @@ Edit [engine/events/halloffame.asm](../blob/master/engine/events/halloffame.asm) ... ``` +(If it's unclear to you why we have to do this, take a look at the VRAM screenshot again, noting that `Tiles0` is the top-left sixth, `vTiles1` is the middle-left, and `vTiles2` is the bottom-left, with all three being sequential in memory.) + ## 10. Correct other implicit assumptions about tiles |