diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2018-07-04 12:25:30 -0400 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2018-07-04 12:25:30 -0400 |
commit | c4f47abcb8a931b8d7d1fadf0976ce06be3f3a42 (patch) | |
tree | 391c64eee2430202d86a9f6c2c2b82af5d33f604 | |
parent | 8c8082574f7929be1515a35c3c12c9337525a3a1 (diff) |
Explain the palettes
-rw-r--r-- | Edit-the-Town-Map.md | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/Edit-the-Town-Map.md b/Edit-the-Town-Map.md index 3d6e120..e01a48f 100644 --- a/Edit-the-Town-Map.md +++ b/Edit-the-Town-Map.md @@ -4,8 +4,9 @@ The Town Map is a bit tricky to edit: it's one of the only things in pokecrystal ## Contents 1. [The tileset](#1-the-tileset) -2. [The Johto and Kanto tilemaps](#2-the-johto-and-kanto-tilemaps) -3. [The landmarks](#3-the-landmarks) +2. [The color palettes](#2-the-color-palettes) +3. [The Johto and Kanto tilemaps](#3-the-johto-and-kanto-tilemaps) +4. [The landmarks](#4-the-landmarks) ## 1. The tileset @@ -21,7 +22,14 @@ You can freely edit this image to change the tiles, but you can't make it larger (For adding more tiles, there *are* those three unused blank ones on the right side of the tileset.) -## 2. The Johto and Kanto tilemaps +## 2. The color palettes + +The tileset image is grayscale, but it's colorful in-game. The colors are defined in [gfx/pokegear/pokegear.pal](../blob/master/gfx/pokegear/pokegear.pal) and [gfx/pokegear/pokegear_f.pal](../blob/master/gfx/pokegear/pokegear_f.pal). Each file defines six palettes: for the gray border, the green-on-blue earth, the brown-on-green mountains, etc. + +[gfx/pokegear/town_map_palette_map.asm](../blob/master/gfx/pokegear/town_map_palette_map.asm) defines the correspondence between tiles and colors. For example, notice how the nine `MOUNTAIN` colors correspond with the nine mountain tiles. + + +## 3. The Johto and Kanto tilemaps The two regions' maps are actually defined by [gfx/pokegear/johto.bin](../blob/master/gfx/pokegear/johto.bin) and [gfx/pokegear/kanto.bin](../blob/master/gfx/pokegear/kanto.bin). Each of those is a 361-byte binary tilemap: 20x18 bytes covering the entire screen, from top-left to bottom-right, with a $FF at the very end. The bytes are tile IDs, starting at 0. For example, $0A (10 in decimal) is the eleventh tile in the tilemap, the town or city icon. And if you look at where the $0A bytes are in johto.bin and kanto.bin, you'll notice they correspond to the locations of towns and cities. @@ -38,7 +46,7 @@ Clearly, those bytes represent these Town Maps:  -## 3. The landmarks +## 4. The landmarks Landmarks are defined in [data/maps/landmarks.asm](../blob/master/data/maps/landmarks.asm). Each one has an X coordinate, Y coordinate, and name. The coordinates are in pixels from the top-left corner, but with 8 added to X and 16 added to Y. For example: |