diff --git a/asm/macros/event.inc b/asm/macros/event.inc index ac008119ef..7b4bca1170 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -2328,16 +2328,25 @@ .2byte \itemId .endm - CURRENT_POSITION = FALSE - TEMPLATE_POSITION = TRUE - - @ Stores the CURRENT / TEMPLATE position of the given object in VAR_0x8007 (x) and VAR_0x8008 (y) + @ Stores the position of the given object in VAR_0x8007 (x) and VAR_0x8008 (y). Mode CURRENT_POSITION will take the object's current position. Mode TEMPLATE_POSITION will takje the object's template position. .macro getobjectxy localId:req, posType:req setvar VAR_0x8000, \localId setvar VAR_0x8001, \posType special GetObjectPosition .endm + .macro getobjecttemplatexy localId:req + setvar VAR_0x8000, \localId + setvar VAR_0x8001, TEMPLATE_POSITION + special GetObjectPosition + .endm + + .macro getobjectcurrentxy localId:req + setvar VAR_0x8000, \localId + setvar VAR_0x8001, CURRENT_POSITION + special GetObjectPosition + .endm + @ checks if there is any object at a given position .macro checkobjectat x:req, y:req setorcopyvar VAR_0x8005, \x diff --git a/include/constants/field_specials.h b/include/constants/field_specials.h index 35769ba3b1..64a105a5fd 100644 --- a/include/constants/field_specials.h +++ b/include/constants/field_specials.h @@ -91,4 +91,9 @@ enum { NO_PARTY_SCREEN }; +enum { + CURRENT_POSITION, + TEMPLATE_POSITION +}; + #endif // GUARD_CONSTANTS_FIELD_SPECIALS_H