summaryrefslogtreecommitdiff
path: root/asm/macros/map.inc
diff options
context:
space:
mode:
Diffstat (limited to 'asm/macros/map.inc')
-rw-r--r--asm/macros/map.inc80
1 files changed, 34 insertions, 46 deletions
diff --git a/asm/macros/map.inc b/asm/macros/map.inc
index 5367ad712..23806b4cc 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
@@ -44,37 +14,47 @@
.4byte \address
.endm
- .macro object_event index, gfx, replacement, filler1, x, y, elevation, movement_type, radius, filler2, trainer_type, sight_radius_tree_etc, script, event_flag, filler3, filler4
- .byte \index, \gfx, \replacement, \filler1
+ .macro object_event index, gfx, replacement, x, y, elevation, movement_type, x_radius, y_radius, trainer_type, sight_radius_tree_etc, script, event_flag
+ .byte \index, \gfx, \replacement, 0
.2byte \x
.2byte \y
- .byte \elevation, \movement_type, \radius, \filler2
+ .byte \elevation, \movement_type, ((\y_radius << 4) | \x_radius), 0
.2byte \trainer_type, \sight_radius_tree_etc
.4byte \script
.2byte \event_flag
- .byte \filler3, \filler4
+ .2byte 0
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
- .macro coord_event x, y, byte1, byte2, word1, word2, word3, script
+ .macro coord_event x, y, elevation, trigger, index, script
.2byte \x, \y
- .byte \byte1, \byte2
- .2byte \word1, \word2, \word3
+ .byte \elevation, 0
+ .2byte \trigger, \index, 0
.4byte \script
inc _num_traps
.endm
- .macro bg_event x, y, byte, kind, word, arg6, arg7, arg8
+ .macro coord_weather_event x, y, elevation, weather
+ .2byte \x, \y
+ .byte \elevation, 0
+ .2byte \weather
+ .2byte 0, 0
+ .4byte 0
+ inc _num_traps
+ .endm
+
+ .macro bg_event x, y, elevation, kind, arg6, arg7, arg8
.2byte \x, \y
- .byte \byte, \kind
- .2byte \word
+ .byte \elevation, \kind
+ .2byte 0
.if \kind < 5
.4byte \arg6
.else
@@ -84,6 +64,14 @@
inc _num_signs
.endm
+ .macro bg_hidden_item_event x, y, height, item, flag
+ bg_event \x, \y, \height, 7, \item, \flag, 0
+ .endm
+
+ .macro bg_secret_base_event x, y, height, secret_base_id
+ bg_event \x, \y, \height, 8, \secret_base_id, 0, 0
+ .endm
+
.macro map_events npcs, warps, traps, signs
.byte _num_npcs, _num_warps, _num_traps, _num_signs
.4byte \npcs, \warps, \traps, \signs
@@ -107,7 +95,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