diff options
author | i0brendan0 <19826742+i0brendan0@users.noreply.github.com> | 2019-05-14 03:26:45 -0500 |
---|---|---|
committer | i0brendan0 <19826742+i0brendan0@users.noreply.github.com> | 2019-05-14 03:26:45 -0500 |
commit | 9fe3efa08b6808d5ddedccd1adc43cfb9ad8b70c (patch) | |
tree | a1837d2e57dcd1a9d318146ff8b57f434e2bd4a1 | |
parent | 50e66f942f13982a16ff9373dc15b43c74fcb82b (diff) |
add a way to remove the borders
-rw-r--r-- | Edit-the-Town-Map.md | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/Edit-the-Town-Map.md b/Edit-the-Town-Map.md index 1ff2499..acd9251 100644 --- a/Edit-the-Town-Map.md +++ b/Edit-the-Town-Map.md @@ -8,6 +8,7 @@ The Town Map is a bit tricky to edit: it's one of the only things in pokecrystal 3. [The Johto and Kanto tilemaps](#3-the-johto-and-kanto-tilemaps) 4. [The landmarks](#4-the-landmarks) 5. [GSC Town Map Editor](#5-gsc-town-map-editor) +6. [Remove the Border Tiles](#6-remove-the-border-tiles) ## 1. The tileset @@ -132,3 +133,81 @@ When you're done making edits, go to File→Export Map and overwrite johto.bin o Now your edited map will show up when you rebuild the project! Note that GSC Town Map Editor, like most old binary hacking tools, makes assumptions about the exact addresses of various content in the ROM. If you make extensive edits to the disassembly project, the addresses could change. Then you'll get an "Access violation" error when you try to pick a region. If that happens, you'll just have to use a hex editor. + +## 6. Remove the Border Tiles + +When making the map, be aware that the top 3 rows of tiles get covered from the Pokegear icons, the map name, and a row of border tiles. You can decide to work around this by leaving the top 3 rows, including the border, free of landmarks. Or, you can remove the border completely, giving you more room to plan your town map. + +This section will show you how to remove the border tiles from being placed in the Pokegear and any form of the Town Map. + +The only file you'll need to edit is [engine/pokegear/pokegear.asm](../blob/master/engine/pokegear/pokegear.asm). + +```InitPokegearTilemap: + +... + +.Map: + ld a, [wPokegearMapPlayerIconLandmark] + cp FAST_SHIP + jr z, .johto + cp KANTO_LANDMARK + jr nc, .kanto +.johto + ld e, 0 + jr .ok + +.kanto + ld e, 1 +.ok + farcall PokegearMap +- ld a, $07 +- ld bc, $12 +- hlcoord 1, 2 +- call ByteFill +- hlcoord 0, 2 +- ld [hl], $06 +- hlcoord 19, 2 +- ld [hl], $17 + ld a, [wPokegearMapCursorLandmark] + jp PokegearMap_UpdateLandmarkName +``` +and +```_TownMap: + +... + +.InitTilemap: + ld a, [wTownMapPlayerIconLandmark] + cp KANTO_LANDMARK + jr nc, .kanto2 + ld e, JOHTO_REGION + jr .okay_tilemap + +.kanto2 + ld e, KANTO_REGION +.okay_tilemap + farcall PokegearMap +- ld a, $07 +- ld bc, 6 +- hlcoord 1, 0 +- call ByteFill +- hlcoord 0, 0 +- ld [hl], $06 +- hlcoord 7, 0 +- ld [hl], $17 +- hlcoord 7, 1 +- ld [hl], $16 +- hlcoord 7, 2 +- ld [hl], $26 +- ld a, $07 +- ld bc, NAME_LENGTH +- hlcoord 8, 2 +- call ByteFill +- hlcoord 19, 2 +- ld [hl], $17 + ld a, [wTownMapCursorLandmark] + call PokegearMap_UpdateLandmarkName + farcall TownMapPals + ret +``` +What you'll be removing is code telling the Game Boy to place certain tiles at certain coordinates. The first set deals with the Pokegear map, and the second set deals with any way a player can see the town map outside of the Pokegear. That includes if you make the Town Map item work.
\ No newline at end of file |