Paper Mario DX
Paper Mario (N64) modding
Loading...
Searching...
No Matches
UnkActorPosFunc.inc.c
Go to the documentation of this file.
1
#include "
battle/battle.h
"
2
3
API_CALLABLE(N(
UnkActorPosFunc
)) {
4
Actor
* actor =
get_actor
(
script
->owner1.actorID);
5
ActorState
*
actorState
= &actor->
state
;
6
7
if
(
isInitialCall
) {
8
actor->
state
.
curPos
.
x
= actor->
curPos
.
x
;
9
actor->
state
.
curPos
.
y
= actor->
curPos
.
y
;
10
actor->
state
.
curPos
.
z
= actor->
curPos
.
z
;
11
}
12
13
add_xz_vec3f
(&
actorState
->curPos, actor->
state
.
speed
, actor->
state
.
angle
);
14
if
(actor->
state
.
speed
< 4.0f) {
15
play_movement_dust_effects
(0, actor->
state
.
curPos
.
x
, actor->
state
.
curPos
.
y
, actor->
state
.
curPos
.
z
, actor->
state
.
angle
);
16
}
else
{
17
play_movement_dust_effects
(1, actor->
state
.
curPos
.
x
, actor->
state
.
curPos
.
y
, actor->
state
.
curPos
.
z
, actor->
state
.
angle
);
18
}
19
20
actorState
->speed /= 1.5;
21
actor->
curPos
.
x
=
actorState
->curPos.x;
22
actor->
curPos
.
y
=
actorState
->curPos.y;
23
actor->
curPos
.
z
=
actorState
->curPos.z;
24
25
if
(
actorState
->speed < 1.0) {
26
return
ApiStatus_DONE2
;
27
}
28
return
ApiStatus_BLOCK
;
29
}
PopupMenu_SelectedIndex
BSS s32 PopupMenu_SelectedIndex
Definition
8a860_len_3f30.c:84
Actor::state
ActorState state
Definition
common_structs.h:1859
Vec3f::z
f32 z
Definition
common_structs.h:103
Actor::curPos
Vec3f curPos
Definition
common_structs.h:1867
ActorState::speed
f32 speed
Definition
common_structs.h:1830
ActorState::curPos
Vec3f curPos
Definition
common_structs.h:1822
Vec3f::x
f32 x
Definition
common_structs.h:101
Vec3f::y
f32 y
Definition
common_structs.h:102
ActorState::angle
f32 angle
Definition
common_structs.h:1832
Actor
Definition
common_structs.h:1855
ActorState
Definition
common_structs.h:1821
ApiStatus_DONE2
#define ApiStatus_DONE2
Definition
evt.h:118
ApiStatus_BLOCK
#define ApiStatus_BLOCK
Definition
evt.h:116
add_xz_vec3f
void add_xz_vec3f(Vec3f *vector, f32 speed, f32 angleDeg)
Definition
190B20.c:1139
get_actor
Actor * get_actor(s32 actorID)
Definition
actor_api.c:155
play_movement_dust_effects
void play_movement_dust_effects(s32 var0, f32 xPos, f32 yPos, f32 zPos, f32 angleDeg)
Definition
190B20.c:1166
battle.h
src
common
UnkActorPosFunc.inc.c
Generated by
1.10.0