Paper Mario DX
Paper Mario (N64) modding
Loading...
Searching...
No Matches
GetLeftRightPoints.inc.c
Go to the documentation of this file.
1
#include "common.h"
2
#include "
npc.h
"
3
4
API_CALLABLE(N(GetLeftRightPoints)) {
5
Bytecode
* args = script->ptrReadPos;
6
s32 posX =
evt_get_variable
(script, *args++);
7
s32 posZ =
evt_get_variable
(script, *args++);
8
f32 dist =
evt_get_variable
(script, *args++);
9
10
script->varTable[0] = posX + (
sin_deg
(
gCameras
[
CAM_DEFAULT
].curYaw + 270.0f + dist) * 100.0f);
11
script->varTable[1] = posZ - (
cos_deg
(
gCameras
[
CAM_DEFAULT
].curYaw + 270.0f + dist) * 100.0f);
12
script->varTable[2] = posX + (
sin_deg
(
gCameras
[
CAM_DEFAULT
].curYaw + 90.0f + dist) * 100.0f);
13
script->varTable[3] = posZ - (
cos_deg
(
gCameras
[
CAM_DEFAULT
].curYaw + 90.0f + dist) * 100.0f);
14
return
ApiStatus_DONE2
;
15
}
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
Bytecode
s32 Bytecode
Definition
evt.h:7
evt_get_variable
s32 evt_get_variable(Evt *script, Bytecode var)
Definition
evt.c:1690
npc.h
gCameras
Camera gCameras[4]
Definition
cam_main.c:17
src
world
common
todo
GetLeftRightPoints.inc.c
Generated by
1.10.0