summaryrefslogtreecommitdiff
path: root/asm/macros
diff options
context:
space:
mode:
authorMarcus Huderle <huderlem@gmail.com>2018-06-14 22:00:09 -0500
committerMarcus Huderle <huderlem@gmail.com>2018-06-15 07:49:21 -0500
commitacc1a5d4461476567facf08ee0fa64e28cdd3c76 (patch)
tree0a99ff1bf3836d2d39c2a0f380cff21fc8359d67 /asm/macros
parent0c8cfc2297a0fd7fb3b9ff3c422e871d8b14595a (diff)
Get all map constants from include/ rather than constants/
Diffstat (limited to 'asm/macros')
-rw-r--r--asm/macros/map.inc43
1 files changed, 7 insertions, 36 deletions
diff --git a/asm/macros/map.inc b/asm/macros/map.inc
index 5367ad712..a6f9f2dae 100644
--- a/asm/macros/map.inc
+++ b/asm/macros/map.inc
@@ -1,38 +1,8 @@
- .macro new_map_group
- inc cur_map_group
- .set cur_map_num, 0
+ .macro map map_id
+ .byte \map_id >> 8 @ map group
+ .byte \map_id & 0xFF @ map num
.endm
- .macro map_group map_name
- .set GROUP_\map_name, cur_map_group
- .set MAP_\map_name, cur_map_num
- inc cur_map_num
- .endm
-
- .macro map map_name
- .byte GROUP_\map_name
- .byte MAP_\map_name
- .endm
-
- .macro warp_map map_name
- .byte MAP_\map_name
- .byte GROUP_\map_name
- .endm
-
- .macro heal_location map_name, x, y
- .byte GROUP_\map_name
- .byte MAP_\map_name
- .2byte \x
- .2byte \y
- .space 2
- .endm
-
- .equiv GROUP_NONE, 0x7f
- .equiv MAP_NONE, 0x7f
-
- .equiv GROUP_UNDEFINED, 0xff
- .equiv MAP_UNDEFINED, 0xff
-
.macro map_script type, address
.byte \type
.4byte \address
@@ -56,10 +26,11 @@
inc _num_npcs
.endm
- .macro warp_def x, y, byte, warp, map
+ .macro warp_def x, y, byte, warp, map_id
.2byte \x, \y
.byte \byte, \warp
- warp_map \map
+ .byte \map_id & 0xFF @ map num
+ .byte \map_id >> 8 @ map group
inc _num_warps
.endm
@@ -107,7 +78,7 @@
.equiv connection_dive, 5
.equiv connection_emerge, 6
- .macro connection direction, offset, map, filler
+ .macro connection direction, offset, map
.4byte connection_\direction
.4byte \offset
map \map