summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2018-07-18 00:02:47 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2018-07-18 00:02:47 -0400
commit817eebe12ddb905fae814a8c88ba609e480094d1 (patch)
treea834752b7b62f67ebb07352256131ecf512364c8
parent9a95b1e9e88f2f38280a5b364f59c6938ff7f4d5 (diff)
New landmark macro
-rw-r--r--Edit-the-Town-Map.md28
-rw-r--r--Tutorials.md10
2 files changed, 30 insertions, 8 deletions
diff --git a/Edit-the-Town-Map.md b/Edit-the-Town-Map.md
index 0b72163..de601e1 100644
--- a/Edit-the-Town-Map.md
+++ b/Edit-the-Town-Map.md
@@ -52,17 +52,39 @@ Clearly, those bytes represent these Town Maps:
## 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:
+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 of the 160x140-pixel screen. For example:
```
- landmark 148, 116, NewBarkTownName
+ landmark 140, 100, NewBarkTownName
...
NewBarkTownName: db "NEW BARK¯TOWN@"
```
-148 − 8 = 140 and 116 − 16 = 100; and if you look at pixel coordinates (140, 100) in the Johto map above, you'll see it's in the middle of the New Bark Town icon.
+If you look at pixel coordinates (140, 100) in the Johto map above, you'll see it's in the middle of the New Bark Town icon.
+
+Be careful, though! Currently pokecrystal defines the `landmark` macro like this:
+
+```
+landmark: MACRO
+; x, y, name
+ db \1 + 8, \2 + 16
+ dw \3
+ENDM
+```
+
+But versions older than July 18, 2018 define it like this:
+
+```
+landmark: MACRO
+; x, y, name
+ db \1, \2
+ dw \3
+ENDM
+```
+
+This means that older versions of pokecrystal have their landmark X coordinates increased by 8 and their Y coordinates by 16. For example, New Bark Town used to be at (148, 116).
If you're wondering why those offsets exist, it's because of how the GameBoy hardware works. From the [Pan Docs](http://bgb.bircd.org/pandocs.htm#vramspriteattributetableoam):
diff --git a/Tutorials.md b/Tutorials.md
index 007c28c..f82c077 100644
--- a/Tutorials.md
+++ b/Tutorials.md
@@ -7,11 +7,6 @@ Tutorials may use diff syntax to show edits:
```
-**How to edit the…**
-
-- [Town Map](Edit-the-Town-Map)
-- [Male and female player colors](Recolor-the-male-and-female-players) (*TODO*)
-
**How to add a new…**
- [Map and landmark](Add-a-new-map-and-landmark)
@@ -33,6 +28,11 @@ Tutorials may use diff syntax to show edits:
- [Wild Pokémon slot](Add-a-new-wild-Pokémon-slot)
- [Fishing rod](Add-a-new-fishing-rod)
+**How to edit the…**
+
+- [Town Map](Edit-the-Town-Map)
+- [Male and female player colors](Recolor-the-male-and-female-players) (*TODO*)
+
**Upgrades to existing features:**
- [Expand tilesets from 192 to 255 tiles](Expand-tilesets-from-192-to-255-tiles)