Paper Mario DX
Paper Mario (N64) modding
Loading...
Searching...
No Matches
MediGuySpriteRotationFunc.inc.c
Go to the documentation of this file.
1
// outputs z sprite rotation
2
API_CALLABLE(N(MediGuySpriteRotationFunc)) {
3
Bytecode
* args = script->ptrReadPos;
4
5
s32 angle =
evt_get_variable
(script, *args++);
6
s32 outPos = *(args++);
7
s32 temp_s3 =
evt_get_variable
(script, *args++);
8
s32 temp_s0_5 =
evt_get_variable
(script, *args++);
9
f32 temp_f20 =
evt_get_float_variable
(script, *args++) * (1.0f - (angle / (f32) temp_s0_5));
10
11
evt_set_variable
(script, outPos, temp_f20 *
cos_rad
((angle * 6.283184f) / temp_s3));
12
return
ApiStatus_DONE2
;
13
}
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_set_variable
s32 evt_set_variable(Evt *script, Bytecode var, s32 value)
Definition
evt.c:1847
cos_rad
f32 cos_rad(f32 x)
Definition
43F0.c:717
evt_get_float_variable
f32 evt_get_float_variable(Evt *script, Bytecode var)
Definition
evt.c:1930
src
common
MediGuySpriteRotationFunc.inc.c
Generated by
1.10.0