ref: 619a4ea8a1e6f087d9ae00a3f209b3ef648b2e50
parent: ea05c44163f753b9f507535d8ee549a4d43a4410
author: yenatch <yenatch@gmail.com>
date: Tue May 27 08:03:30 EDT 2014
Use wOverworldMap in macros.
--- a/macros.asm
+++ b/macros.asm
@@ -45,7 +45,7 @@
;\2 = Rows above (Y-blocks)
;\3 = X movement (X-blocks)
EVENT_DISP: MACRO
- dw ($C6EF + (\1) + ((\1) + 6) * ((\2) >> 1) + ((\3) >> 1)) ; Ev.Disp
+ dw (wOverworldMap + 7 + (\1) + ((\1) + 6) * ((\2) >> 1) + ((\3) >> 1)) ; Ev.Disp
db \2,\3 ;Y,X
ENDM
@@ -311,6 +311,7 @@
db $FF
ENDM
+
;\1 (byte) = connected map id
;\2 (byte) = connected map width
;\3 (byte) = connected map height
@@ -321,12 +322,12 @@
NORTH_MAP_CONNECTION: MACRO
db \1 ; map id
dw \7 + (\2 * (\3 - 3)) + \5; "Connection Strip" location
- dw $C6EB + \4 ; current map position
+ dw wOverworldMap + 3 + \4 ; current map position
db \6 ; width of connection strip
db \2 ; map width
db (\3 * 2) - 1 ; y alignment (y coordinate of player when entering map)
db (\4 - \5) * -2 ; x alignment (x coordinate of player when entering map)
- dw $C6E9 + (\3 * (\2 + 6)) ; window (position of the upper left block after entering the map)
+ dw wOverworldMap + 1 + (\3 * (\2 + 6)) ; window (position of the upper left block after entering the map)
ENDM
;\1 (byte) = connected map id
@@ -340,12 +341,12 @@
SOUTH_MAP_CONNECTION: MACRO
db \1 ; map id
dw \6 + \4 ; "Conection Strip" location
- dw $C6EB + (\8 + 3) * (\7 + 6) + \3 ; current map positoin
+ dw wOverworldMap + 3 + (\8 + 3) * (\7 + 6) + \3 ; current map positoin
db \5 ; width of connection strip
db \2 ; map width
db 0 ; y alignment (y coordinate of player when entering map)
db (\3 - \4) * -2 ; x alignment (x coordinate of player when entering map)
- dw $C6EF + \2 ; window (position of the upper left block after entering the map)
+ dw wOverworldMap + 7 + \2 ; window (position of the upper left block after entering the map)
ENDM
;\1 (byte) = connected map id
@@ -358,12 +359,12 @@
EAST_MAP_CONNECTION: MACRO
db \1 ; map id
dw \6 + (\2 * \4) ; "Connection Strip" location
- dw $C6E5 + (\7 + 6) * (\3 + 4) ; current map position
+ dw wOverworldMap - 3 + (\7 + 6) * (\3 + 4) ; current map position
db \5 ; height of connection strip
db \2 ; map width
db (\3 - \4) * -2 ; y alignment
db 0 ; x alignment
- dw $C6EF + \2 ; window (position of the upper left block after entering the map)
+ dw wOverworldMap + 7 + \2 ; window (position of the upper left block after entering the map)
ENDM
;\1 (byte) = connected map id
@@ -376,10 +377,10 @@
WEST_MAP_CONNECTION: MACRO
db \1 ; map id
dw \6 + (\2 * \4) + \2 - 3 ; "Connection Strip" location
- dw $C6E8 + (\7 + 6) * (\3 + 3) ; current map position
+ dw wOverworldMap + (\7 + 6) * (\3 + 3) ; current map position
db \5 ; height of connection strip
db \2 ; map width
db (\3 - \4) * -2 ; y alignment
db (\2 * 2) - 1 ; x alignment
- dw $C6EE + (2 * \2) ; window (position of the upper left block after entring the map)
+ dw wOverworldMap + 6 + (2 * \2) ; window (position of the upper left block after entring the map)
ENDM