Paper Mario DX
Paper Mario (N64) modding
Loading...
Searching...
No Matches
SetAbsoluteStatusOffsets.inc.c
Go to the documentation of this file.
1
#include "
battle/battle.h
"
2
3
API_CALLABLE(N(SetAbsoluteStatusOffsets)) {
4
Bytecode
* args = script->ptrReadPos;
5
s32 iconX =
evt_get_variable
(script, *args++);
6
s32 iconY =
evt_get_variable
(script, *args++);
7
s32 textX =
evt_get_variable
(script, *args++);
8
s32 textY =
evt_get_variable
(script, *args++);
9
Actor
* actor =
get_actor
(script->owner1.actorID);
10
11
actor->
statusIconOffset
.
x
= (s8)(iconX - actor->
actorBlueprint
->
statusIconOffset
.
x
);
12
actor->
statusIconOffset
.
y
= (s8)(iconY - actor->
actorBlueprint
->
statusIconOffset
.
y
);
13
actor->
statusTextOffset
.
x
= (s8)(textX - actor->
actorBlueprint
->
statusTextOffset
.
x
);
14
actor->
statusTextOffset
.
y
= (s8)(textY - actor->
actorBlueprint
->
statusTextOffset
.
y
);
15
16
return
ApiStatus_DONE2
;
17
}
Vec2b::x
s8 x
Definition
common_structs.h:42
Actor::statusIconOffset
Vec2b statusIconOffset
Definition
common_structs.h:1878
Vec2b::y
s8 y
Definition
common_structs.h:43
Actor::statusTextOffset
Vec2b statusTextOffset
Definition
common_structs.h:1879
Actor::actorBlueprint
struct ActorBlueprint * actorBlueprint
Definition
common_structs.h:1857
Actor
Definition
common_structs.h:1854
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
get_actor
Actor * get_actor(s32 actorID)
Definition
actor_api.c:155
battle.h
ActorBlueprint::statusIconOffset
Vec2b statusIconOffset
Definition
battle.h:150
ActorBlueprint::statusTextOffset
Vec2b statusTextOffset
Definition
battle.h:151
src
common
battle
SetAbsoluteStatusOffsets.inc.c
Generated by
1.10.0