Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
GetEntityPosition.inc.c
Go to the documentation of this file.
1#include "common.h"
2#include "npc.h"
3
4API_CALLABLE(N(GetEntityPosition)) {
5 Bytecode* args = script->ptrReadPos;
6 Entity* entity = get_entity_by_index(evt_get_variable(script, *args++));
7
8 evt_set_variable(script, *args++, entity->pos.x);
9 evt_set_variable(script, *args++, entity->pos.y);
10 evt_set_variable(script, *args++, entity->pos.z);
11 return ApiStatus_DONE2;
12}
#define ApiStatus_DONE2
Definition evt.h:118
s32 Bytecode
Definition evt.h:7
Entity * get_entity_by_index(s32 index)
Definition entity.c:530
s32 evt_get_variable(Evt *script, Bytecode var)
Definition evt.c:1690
s32 evt_set_variable(Evt *script, Bytecode var, s32 value)
Definition evt.c:1847