summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Expand-tilesets-from-192-to-255-tiles.md55
1 files changed, 37 insertions, 18 deletions
diff --git a/Expand-tilesets-from-192-to-255-tiles.md b/Expand-tilesets-from-192-to-255-tiles.md
index 2b200a5..6f76166 100644
--- a/Expand-tilesets-from-192-to-255-tiles.md
+++ b/Expand-tilesets-from-192-to-255-tiles.md
@@ -34,7 +34,7 @@ Of the 32 tiles in the $60–$7F range, only 18 are actually used:
- The "PO", "Ké", “curly quotes”, and ellipsis in the bottom row of [gfx/font/font_extra.png](../blob/master/gfx/font/font_extra.png)
- The six textbox frame characters and space character in the bottom row of [gfx/font/font_extra.png](../blob/master/gfx/font/font_extra.png) (actually loaded from [gfx/frames/\*.png](../tree/master/gfx/frames/))
-The prime marks in [gfx/font/feet_inches.png](../blob/master/gfx/font/feet_inches.png) are also used. Meanwhile, the six ümläuted letters in [gfx/font/font.png](../blob/master/gfx/font/font.png) are unused, and the decimal point character is identical to the period. So replace them like this:
+The prime marks in [gfx/font/feet_inches.png](../blob/master/gfx/font/feet_inches.png), and the 14 tiles in [gfx/frames/map_entry_sign.png](../blob/master/gfx/frames/map_entry_sign.png), are also used. Meanwhile, the six ümläuted letters in [gfx/font/font.png](../blob/master/gfx/font/font.png) are unused, and the decimal point character is identical to the period. So replace them like this:
![gfx/font/font.png](screenshots/255-tiles_gfx-font-font.png)
@@ -46,7 +46,7 @@ And [gfx/font/overworld.png](../blob/master/gfx/font/overworld.png):
![gfx/font/overworld.png](screenshots/255-tiles_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.
+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. Furthermore, the map entry sign frame is only present in the overworld font, since that's the only one where it's needed.
## 2. Update the character set
@@ -259,7 +259,7 @@ And edit [mobile/mobile_41.asm](../blob/master/mobile/mobile_41.asm):
## 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), [gfx/font/up_arrow.png](../blob/master/gfx/font/up_arrow.png), and [gfx/font/feet_inches.png](../blob/master/gfx/font/feet_inches.png).
+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), [gfx/font/up_arrow.png](../blob/master/gfx/font/up_arrow.png), [gfx/font/feet_inches.png](../blob/master/gfx/font/feet_inches.png), and [gfx/frames/map_entry_sign.png](../blob/master/gfx/frames/map_entry_sign.png).
Edit [gfx/font.asm](../blob/master/gfx/font.asm):
@@ -281,6 +281,11 @@ Edit [gfx/font.asm](../blob/master/gfx/font.asm):
-FontsExtra2_UpArrowGFX:
-INCBIN "gfx/font/up_arrow.2bpp"
+
+ ...
+
+-MapEntryFrameGFX:
+-INCBIN "gfx/frames/map_entry_sign.2bpp"
```
Edit [engine/events/magikarp.asm](../blob/master/engine/events/magikarp.asm):
@@ -313,6 +318,30 @@ Edit [engine/events/magikarp.asm](../blob/master/engine/events/magikarp.asm):
ret
```
+And edit [engine/events/map_name_sign.asm](../blob/master/engine/events/map_name_sign.asm):
+
+```diff
+ ReturnFromMapSetupScript::
+ ...
+
+ ; Display for 60 frames
+ ld a, 60
+ ld [wLandmarkSignTimer], a
+- call LoadMapNameSignGFX
+ call InitMapNameFrame
+ farcall HDMATransfer_OnlyTopFourRows
+ ret
+
+ ...
+
+-LoadMapNameSignGFX:
+- ld de, MapEntryFrameGFX
+- ld hl, vTiles0 tile MAP_NAME_SIGN_START
+- lb bc, BANK(MapEntryFrameGFX), 14
+- call Get2bpp
+- ret
+```
+
## 5. Load tile graphics into $60–$7F and $E0–$FF
@@ -576,21 +605,11 @@ Edit [engine/menus/naming_screen.asm](../blob/master/engine/menus/naming_screen.
(Older versions of pokecrystal before rgbds 0.3.8 can't understand constants like `X_VALUE EQU "X"`, so they have to use `X_VALUE EQUS "\"X\""` instead.)
-Edit [engine/events/map_name_sign.asm](../blob/master/engine/events/map_name_sign.asm):
+Edit [engine/events/map_name_sign.asm](../blob/master/engine/events/map_name_sign.asm) again:
```diff
-MAP_NAME_SIGN_START EQU $60
+MAP_NAME_SIGN_START EQU $c0
-
- ...
-
- LoadMapNameSignGFX:
- ld de, MapEntryFrameGFX
-- ld hl, vTiles2 tile MAP_NAME_SIGN_START
-+ ld hl, vTiles0 tile MAP_NAME_SIGN_START
- lb bc, BANK(MapEntryFrameGFX), 14
- call Get2bpp
- ret
```
Edit [engine/events/halloffame.asm](../blob/master/engine/events/halloffame.asm):
@@ -668,7 +687,7 @@ And edit [engine/link/link_2.asm](../blob/master/engine/link/link_2.asm):
```diff
LinkTextbox2:
...
-
+
.PlaceBorder:
push hl
ld a, $76
@@ -694,7 +713,7 @@ And edit [engine/link/link_2.asm](../blob/master/engine/link/link_2.asm):
add hl, de
dec b
jr nz, .loop
-
+
- ld a, "┐"
+ ld a, $7b
ld [hli], a
@@ -704,7 +723,7 @@ And edit [engine/link/link_2.asm](../blob/master/engine/link/link_2.asm):
- ld [hl], "└"
+ ld [hl], $7d
ret
-
+
.PlaceRow:
ld d, c
.row_loop
@@ -730,7 +749,7 @@ Remember, tile $7F is reserved for the space character, so don't use it for a ma
This entire change is compatible with [adding `PRIORITY` colors so NPCs can walk behind tiles](Allow-map-tiles-to-appear-above-sprites-\(so-NPCs-can-walk-behind-tiles\)-with-PRIORITY-colors); in [step 7](#7-update-the-tilesets-palette-maps-to-not-skip-607f), you'll just be removing a `rept 32` instead of a `rept 16`.
-Note that tiles $C0–$CD are blank in the font graphics, but get overwritten by the popup map name sign tiles. It's still okay to use them for your own text characters ("É", "¿", "♪", "♥", etc), just don't use those tiles in any map names.
+Note that tiles $C0–$CD are blank in the standard font graphic, but contain the map entry sign frame in the overworld font. It's still okay to use those tiles for your own text characters ("É", "¿", "♪", "♥", etc), as long as they're not used in any map names.
You can also easily get rid of some rarely-used characters if you need more font space: