Paper Mario DX
Paper Mario (N64) modding
Loading...
Searching...
No Matches
GetKammyBroomEmitterPos.inc.c
Go to the documentation of this file.
1
#include "common.h"
2
#include "
npc.h
"
3
4
#ifndef KAMMY_NPC
5
#error KAMMY_NPC must be defined
6
#define KAMMY_NPC 0
7
#endif
8
9
API_CALLABLE(N(GetKammyBroomEmitterPos)) {
10
Npc
* npc =
get_npc_unsafe
(
KAMMY_NPC
);
11
12
script->varTable[0] = npc->
pos
.
x
+ (
sin_deg
(npc->
yaw
+
gCameras
[
CAM_DEFAULT
].
curYaw
+ 180.0f) * 40.0f);
13
script->varTable[1] = npc->
pos
.
y
+ 8.0f;
14
script->varTable[2] = npc->
pos
.
z
- (
cos_deg
(npc->
yaw
+
gCameras
[
CAM_DEFAULT
].
curYaw
+ 180.0f) * 40.0f);
15
return
ApiStatus_DONE2
;
16
}
KAMMY_NPC
#define KAMMY_NPC
Definition
GetKammyBroomEmitterPos.inc.c:6
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
sin_deg
#define sin_deg
Definition
effect_shims.h:55
cos_deg
#define cos_deg
Definition
effect_shims.h:56
CAM_DEFAULT
@ CAM_DEFAULT
Definition
enums.h:1800
ApiStatus_DONE2
#define ApiStatus_DONE2
Definition
evt.h:118
npc.h
get_npc_unsafe
Npc * get_npc_unsafe(s32 npcID)
Definition
npc.c:995
Camera::curYaw
f32 curYaw
Definition
common_structs.h:800
Npc
Definition
common_structs.h:213
Npc::yaw
f32 yaw
Definition
common_structs.h:217
Npc::pos
Vec3f pos
Definition
common_structs.h:236
gCameras
Camera gCameras[4]
Definition
cam_main.c:17
src
world
common
util
GetKammyBroomEmitterPos.inc.c
Generated by
1.10.0