Incremental improvement of getobjectfacing
This commit is contained in:
parent
f0d5b68f70
commit
881e54a52b
2 changed files with 4 additions and 4 deletions
|
@ -2408,6 +2408,7 @@
|
||||||
|
|
||||||
@ Gets the facing direction of a given event object and stores it in the variable \dest.
|
@ Gets the facing direction of a given event object and stores it in the variable \dest.
|
||||||
.macro getobjectfacingdirection evObjId:req, dest:req
|
.macro getobjectfacingdirection evObjId:req, dest:req
|
||||||
setvar VAR_TEMP_1, \evObjId
|
setvar VAR_0x8005, \evObjId
|
||||||
specialvar \dest, Script_GetObjectFacingDirection
|
specialvar \dest, Script_GetObjectFacingDirection
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
|
|
@ -10633,9 +10633,8 @@ void GetDaycareGraphics(struct ScriptContext *ctx)
|
||||||
gSpecialVar_Result = i;
|
gSpecialVar_Result = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 Script_GetObjectFacingDirection(void)
|
u32 Script_GetObjectFacingDirection(void)
|
||||||
{
|
{
|
||||||
u8 objId = GetObjectEventIdByLocalId(VarGet(VAR_TEMP_1));
|
return gObjectEvents[GetObjectEventIdByLocalId(gSpecialVar_0x8005)].facingDirection;
|
||||||
return gObjectEvents[objId].facingDirection;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue