Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
SetAngleClamped.inc.c
Go to the documentation of this file.
1#include "common.h"
2
3API_CALLABLE(N(SetAngleClamped)) {
4 Bytecode* args = script->ptrReadPos;
5 s32 var = *args++;
6 f32 x1 = evt_get_float_variable(script, *args++);
7 f32 z1 = evt_get_float_variable(script, *args++);
8 f32 x2 = evt_get_float_variable(script, *args++);
9 f32 z2 = evt_get_float_variable(script, *args++);
10 f32 angle = clamp_angle(atan2(x1, z1, x2, z2));
11
12 evt_set_float_variable(script, var, angle);
13 return ApiStatus_DONE2;
14}
#define clamp_angle
#define atan2
#define ApiStatus_DONE2
Definition evt.h:118
s32 Bytecode
Definition evt.h:7
f32 evt_set_float_variable(Evt *script, Bytecode var, f32 value)
Definition evt.c:1977
f32 evt_get_float_variable(Evt *script, Bytecode var)
Definition evt.c:1930