Moved current and template positions to headers
This commit is contained in:
parent
dc06321054
commit
67f8a61eef
2 changed files with 18 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -91,4 +91,9 @@ enum {
|
|||
NO_PARTY_SCREEN
|
||||
};
|
||||
|
||||
enum {
|
||||
CURRENT_POSITION,
|
||||
TEMPLATE_POSITION
|
||||
};
|
||||
|
||||
#endif // GUARD_CONSTANTS_FIELD_SPECIALS_H
|
||||
|
|
Loading…
Reference in a new issue