mirror of
https://github.com/pret/pokered.git
synced 2024-10-23 06:58:24 +00:00
Use wOverworldMap in macros.
This commit is contained in:
parent
ea05c44163
commit
619a4ea8a1
1 changed files with 10 additions and 9 deletions
19
macros.asm
19
macros.asm
|
@ -45,7 +45,7 @@ Coord = $C3A0 + 20 * \2 + \1
|
|||
;\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 @@ endchannel: MACRO
|
|||
db $FF
|
||||
ENDM
|
||||
|
||||
|
||||
;\1 (byte) = connected map id
|
||||
;\2 (byte) = connected map width
|
||||
;\3 (byte) = connected map height
|
||||
|
@ -321,12 +322,12 @@ ENDM
|
|||
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 @@ ENDM
|
|||
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 @@ ENDM
|
|||
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 @@ ENDM
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue