Sync clone object macro

This commit is contained in:
GriffinR
2023-02-08 13:11:10 -05:00
parent 118a9701c9
commit de56e400ff
5 changed files with 28 additions and 9 deletions

View File

@@ -19,11 +19,11 @@
.4byte \script
.endm
@ Defines an object event template for map data. Mirrors the struct layout of ObjectEventTemplate in include/global.fieldmap.h
.macro object_event index:req, gfx:req, inConnection: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
@ Defines an object event template for map data, to be used by a normal object. Mirrors the struct layout of ObjectEventTemplate in include/global.fieldmap.h
.macro object_event index:req, gfx: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
.byte \gfx
.byte \inConnection
.byte OBJ_KIND_NORMAL
.space 1 @ Padding
.2byte \x, \y
.byte \elevation
@@ -38,6 +38,22 @@
inc _num_npcs
.endm
@ Defines an object event template for map data, to be used by a clone object. Mirrors the struct layout of ObjectEventTemplate in include/global.fieldmap.h
@ NOTE: The handling for this type of event does not exist in Emerald by default; it is exclusive to FRLG.
.macro clone_event index:req, gfx:req, x:req, y:req, target_local_id:req, target_map_id:req
.byte \index
.byte \gfx
.byte OBJ_KIND_CLONE
.space 1 @ Padding
.2byte \x, \y
.byte \target_local_id
.space 3 @ Padding
.2byte \target_map_id & 0xFF @ map num
.2byte \target_map_id >> 8 @ map group
.space 8 @ Padding
inc _num_npcs
.endm
@ Defines a warp event for map data. Mirrors the struct layout of WarpEvent in include/global.fieldmap.h
.macro warp_def x:req, y:req, elevation:req, warpId:req, map_id:req
.2byte \x, \y
@@ -49,12 +65,12 @@
.endm
@ Defines a coord event for map data. Mirrors the struct layout of CoordEvent in include/global.fieldmap.h
.macro coord_event x:req, y:req, elevation:req, trigger:req, index:req, script:req
.macro coord_event x:req, y:req, elevation:req, var:req, varValue:req, script:req
.2byte \x, \y
.byte \elevation
.space 1 @ Padding
.2byte \trigger
.2byte \index
.2byte \var
.2byte \varValue
.space 2 @ Padding
.4byte \script
inc _num_traps