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
3API_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 statusIconOffset
Vec2b statusTextOffset
struct ActorBlueprint * actorBlueprint
#define ApiStatus_DONE2
Definition evt.h:118
s32 Bytecode
Definition evt.h:7
s32 evt_get_variable(Evt *script, Bytecode var)
Definition evt.c:1690
Actor * get_actor(s32 actorID)
Definition actor_api.c:155
Vec2b statusIconOffset
Definition battle.h:150
Vec2b statusTextOffset
Definition battle.h:151