Paper Mario DX
Paper Mario (N64) modding
Loading...
Searching...
No Matches
SetNpcPosYaw.inc.c
Go to the documentation of this file.
1
#include "common.h"
2
3
API_CALLABLE(N(SetNpcPosYaw)) {
4
Bytecode
* args = script->ptrReadPos;
5
s32 npcID =
evt_get_variable
(script, *args++);
6
f32 x =
evt_get_float_variable
(script, *args++);
7
f32 y =
evt_get_float_variable
(script, *args++);
8
f32 z =
evt_get_float_variable
(script, *args++);
9
f32 yaw =
evt_get_float_variable
(script, *args++);
10
Npc
* npc =
get_npc_safe
(npcID);
11
12
npc->
pos
.
x
= x;
13
npc->
pos
.
y
= y;
14
npc->
pos
.
z
= z;
15
npc->
yaw
= yaw;
16
npc->
colliderPos
.
x
= npc->
pos
.
x
;
17
npc->
colliderPos
.
y
= npc->
pos
.
y
;
18
npc->
colliderPos
.
z
= npc->
pos
.
z
;
19
npc->
flags
|=
NPC_FLAG_DIRTY_SHADOW
;
20
return
ApiStatus_DONE2
;
21
}
Vec3f::z
f32 z
Definition
common_structs.h:102
Vec3f::x
f32 x
Definition
common_structs.h:100
Vec3f::y
f32 y
Definition
common_structs.h:101
NPC_FLAG_DIRTY_SHADOW
@ NPC_FLAG_DIRTY_SHADOW
Definition
enums.h:3014
ApiStatus_DONE2
#define ApiStatus_DONE2
Definition
evt.h:118
Bytecode
s32 Bytecode
Definition
evt.h:7
evt_get_variable
s32 evt_get_variable(Evt *script, Bytecode var)
Definition
evt.c:1690
evt_get_float_variable
f32 evt_get_float_variable(Evt *script, Bytecode var)
Definition
evt.c:1930
get_npc_safe
Npc * get_npc_safe(s32 npcID)
Definition
npc.c:1010
Npc
Definition
common_structs.h:213
Npc::flags
s32 flags
Definition
common_structs.h:214
Npc::yaw
f32 yaw
Definition
common_structs.h:217
Npc::colliderPos
Vec3f colliderPos
Definition
common_structs.h:241
Npc::pos
Vec3f pos
Definition
common_structs.h:236
src
common
SetNpcPosYaw.inc.c
Generated by
1.10.0