Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
goombaria.c
Go to the documentation of this file.
1#include "common.h"
2#include "goombaria.h"
3#include "../partners.h"
4
5#define NAMESPACE world_goombaria
6
7void N(init)(Npc* goombaria) {
8 goombaria->collisionHeight = 24;
9 goombaria->collisionDiameter = 20;
10}
11
12API_CALLABLE(N(TakeOut)) {
13 Npc* goombaria = script->owner2.npc;
14
15 if (isInitialCall) {
16 partner_init_get_out(goombaria);
17 }
18
20}
21
22API_CALLABLE(N(Update)) {
23 PlayerData* playerData = &gPlayerData;
24 Npc* goombaria = script->owner2.npc;
25
26 if (isInitialCall) {
27 partner_walking_enable(goombaria, TRUE);
28 }
29
33
34 return ApiStatus_BLOCK;
35}
36
37API_CALLABLE(N(UseAbility)) {
38 return ApiStatus_DONE2;
39}
40
41API_CALLABLE(N(PutAway)) {
42 Npc* goombaria = script->owner2.npc;
43
44 if (isInitialCall) {
45 partner_init_put_away(goombaria);
46 }
47
49}
50
52 Call(N(TakeOut))
53 Return
54 End
55};
56
58 Call(N(Update))
59 Return
60 End
61};
62
64 Call(N(UseAbility))
65 Return
66 End
67};
68
70 Call(N(PutAway))
71 Return
72 End
73};
s32 partnerUsedTime[12]
Bytecode EvtScript[]
@ PARTNER_GOOMBARIA
Definition enums.h:2895
#define ApiStatus_DONE2
Definition evt.h:118
#define ApiStatus_DONE1
Definition evt.h:117
#define ApiStatus_BLOCK
Definition evt.h:116
void partner_walking_update_motion(Npc *partner)
Definition partners.c:1202
void partner_walking_update_player_tracking(Npc *partner)
Definition partners.c:1175
void partner_walking_enable(Npc *partner, s32 val)
Definition partners.c:1133
EvtScript EVS_WorldGoombaria_UseAbility
Definition goombaria.c:63
void N init(Npc *goombaria)
Definition goombaria.c:7
EvtScript EVS_WorldGoombaria_Update
Definition goombaria.c:57
EvtScript EVS_WorldGoombaria_TakeOut
Definition goombaria.c:51
EvtScript EVS_WorldGoombaria_PutAway
Definition goombaria.c:69
s32 partner_init_get_out(Npc *npc)
Definition partners.c:2252
s32 partner_init_put_away(Npc *partner)
Definition partners.c:2178
s32 partner_put_away(Npc *partner)
Definition partners.c:2185
s32 partner_get_out(Npc *partner)
Definition partners.c:2259
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:213
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:576
#define Return
Kills the current EVT thread.
Definition macros.h:217
PlayerData gPlayerData
Definition 77480.c:40