diff options
author | Deokishisu <edsaletto@gmail.com> | 2018-12-19 12:20:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-19 12:20:38 -0500 |
commit | 8edbad78e5787ffd5632a30cb8d38f5bf88dce5e (patch) | |
tree | d05995222089ac1278f3c4f1b18ac265944dbb4c | |
parent | b2ac3b6d6f06ed4a2d64af90e97796c66bcdeb5f (diff) |
Add requirements to the fields of the object_event macro
With these changes, the compiler will yell at you if you screw up the number of fields for your event objects while manually editing a map's events.inc. Making these fields required will prevent event corruption of all map events that are included after the map with the messed up fields.
-rw-r--r-- | asm/macros/map.inc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/asm/macros/map.inc b/asm/macros/map.inc index 9a028b2e5..aabcc1bd5 100644 --- a/asm/macros/map.inc +++ b/asm/macros/map.inc @@ -14,8 +14,7 @@ .4byte \address .endm - .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 + .macro object_event index:req, gfx:req, replacement:req, x:req, y:req, elevation:req, movement_type:req, x_radius:req, y_radius:req, trainer_type:req, sight_radius_tree_etc:req, script:req, event_flag:req .2byte \x .2byte \y .byte \elevation, \movement_type, ((\y_radius << 4) | \x_radius), 0 |