From 8edbad78e5787ffd5632a30cb8d38f5bf88dce5e Mon Sep 17 00:00:00 2001 From: Deokishisu Date: Wed, 19 Dec 2018 12:20:38 -0500 Subject: 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. --- asm/macros/map.inc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'asm/macros') 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 -- cgit v1.2.3 From e15c7fc7cf770231548de57ef55f0747e6d63fd7 Mon Sep 17 00:00:00 2001 From: Deokishisu Date: Wed, 19 Dec 2018 12:28:37 -0500 Subject: Fix deleted line --- asm/macros/map.inc | 1 + 1 file changed, 1 insertion(+) (limited to 'asm/macros') diff --git a/asm/macros/map.inc b/asm/macros/map.inc index aabcc1bd5..94caeb697 100644 --- a/asm/macros/map.inc +++ b/asm/macros/map.inc @@ -15,6 +15,7 @@ .endm .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 + .byte \index, \gfx, \replacement, 0 .2byte \x .2byte \y .byte \elevation, \movement_type, ((\y_radius << 4) | \x_radius), 0 -- cgit v1.2.3