Use wOverworldMap in macros.

This commit is contained in:
yenatch 2014-05-27 12:03:30 -07:00
parent ea05c44163
commit 619a4ea8a1

View file

@ -45,7 +45,7 @@ Coord = $C3A0 + 20 * \2 + \1
;\2 = Rows above (Y-blocks) ;\2 = Rows above (Y-blocks)
;\3 = X movement (X-blocks) ;\3 = X movement (X-blocks)
EVENT_DISP: MACRO 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 db \2,\3 ;Y,X
ENDM ENDM
@ -311,6 +311,7 @@ endchannel: MACRO
db $FF db $FF
ENDM ENDM
;\1 (byte) = connected map id ;\1 (byte) = connected map id
;\2 (byte) = connected map width ;\2 (byte) = connected map width
;\3 (byte) = connected map height ;\3 (byte) = connected map height
@ -321,12 +322,12 @@ ENDM
NORTH_MAP_CONNECTION: MACRO NORTH_MAP_CONNECTION: MACRO
db \1 ; map id db \1 ; map id
dw \7 + (\2 * (\3 - 3)) + \5; "Connection Strip" location 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 \6 ; width of connection strip
db \2 ; map width db \2 ; map width
db (\3 * 2) - 1 ; y alignment (y coordinate of player when entering map) 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) 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 ENDM
;\1 (byte) = connected map id ;\1 (byte) = connected map id
@ -340,12 +341,12 @@ ENDM
SOUTH_MAP_CONNECTION: MACRO SOUTH_MAP_CONNECTION: MACRO
db \1 ; map id db \1 ; map id
dw \6 + \4 ; "Conection Strip" location 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 \5 ; width of connection strip
db \2 ; map width db \2 ; map width
db 0 ; y alignment (y coordinate of player when entering map) db 0 ; y alignment (y coordinate of player when entering map)
db (\3 - \4) * -2 ; x alignment (x 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 ENDM
;\1 (byte) = connected map id ;\1 (byte) = connected map id
@ -358,12 +359,12 @@ ENDM
EAST_MAP_CONNECTION: MACRO EAST_MAP_CONNECTION: MACRO
db \1 ; map id db \1 ; map id
dw \6 + (\2 * \4) ; "Connection Strip" location 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 \5 ; height of connection strip
db \2 ; map width db \2 ; map width
db (\3 - \4) * -2 ; y alignment db (\3 - \4) * -2 ; y alignment
db 0 ; x 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 ENDM
;\1 (byte) = connected map id ;\1 (byte) = connected map id
@ -376,10 +377,10 @@ ENDM
WEST_MAP_CONNECTION: MACRO WEST_MAP_CONNECTION: MACRO
db \1 ; map id db \1 ; map id
dw \6 + (\2 * \4) + \2 - 3 ; "Connection Strip" location 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 \5 ; height of connection strip
db \2 ; map width db \2 ; map width
db (\3 - \4) * -2 ; y alignment db (\3 - \4) * -2 ; y alignment
db (\2 * 2) - 1 ; x 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 ENDM