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
3
API_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
}
PopupMenu_SelectedIndex
BSS s32 PopupMenu_SelectedIndex
Definition
8a860_len_3f30.c:84
clamp_angle
#define clamp_angle
Definition
effect_shims.h:54
atan2
#define atan2
Definition
effect_shims.h:57
ApiStatus_DONE2
#define ApiStatus_DONE2
Definition
evt.h:118
Bytecode
s32 Bytecode
Definition
evt.h:7
evt_set_float_variable
f32 evt_set_float_variable(Evt *script, Bytecode var, f32 value)
Definition
evt.c:1976
evt_get_float_variable
f32 evt_get_float_variable(Evt *script, Bytecode var)
Definition
evt.c:1929
src
common
SetAngleClamped.inc.c
Generated by
1.10.0