Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
goombario.c
Go to the documentation of this file.
1#include "common.h"
2#include "sprite/npc/WorldGoombario.h"
3#include "goombario.h"
4#include "../src/world/partners.h"
5#include "message_ids.h"
6#include "entity.h"
7
8#define NAMESPACE world_goombario
9
11
12BSS s32 N(HadSpeechPrompt);
13BSS s32 N(HadInteractPrompt);
14BSS Npc* N(InteractNpc);
15BSS s32 N(D_802BDF3C); // unused (padding?)
16BSS TweesterPhysics N(TweesterPhysicsData);
17BSS s32 N(D_802BDF5C); // unused (padding?)
19BSS s32 N(IsTattleActive);
20
21s32 N(EntityTattles)[][2] = {
22 { ENTITY_TYPE_HAMMER1_BLOCK, MSG_EntityTattle_HammerBlock1_CanBreak },
23 { ENTITY_TYPE_HAMMER1_BLOCK_TINY, MSG_EntityTattle_HammerBlock1_CanBreak },
24 { ENTITY_TYPE_HAMMER2_BLOCK, MSG_EntityTattle_HammerBlock2_CantBreak },
25 { ENTITY_TYPE_HAMMER2_BLOCK_TINY, MSG_EntityTattle_HammerBlock2_CantBreak },
26 { ENTITY_TYPE_HAMMER3_BLOCK, MSG_EntityTattle_HammerBlock3_CantBreak },
27 { ENTITY_TYPE_HAMMER3_BLOCK_TINY, MSG_EntityTattle_HammerBlock3_CantBreak },
28 { ENTITY_TYPE_BRICK_BLOCK, MSG_EntityTattle_BrickBlock },
29 { ENTITY_TYPE_MULTI_COIN_BRICK, MSG_EntityTattle_BrickBlock },
30 { ENTITY_TYPE_YELLOW_BLOCK, MSG_EntityTattle_ItemBlock },
31 { ENTITY_TYPE_SINGLE_TRIGGER_BLOCK, MSG_EntityTattle_ItemBlock },
32 { ENTITY_TYPE_MULTI_TRIGGER_BLOCK, MSG_EntityTattle_InertBlock },
33 { ENTITY_TYPE_PUSH_BLOCK, MSG_EntityTattle_PushBlock },
34 { ENTITY_TYPE_RED_BLOCK, MSG_EntityTattle_BadgeBlock },
35 { ENTITY_TYPE_SIMPLE_SPRING, MSG_EntityTattle_Spring },
36 { ENTITY_TYPE_SCRIPT_SPRING, MSG_EntityTattle_Spring },
37 { ENTITY_TYPE_BLUE_SWITCH, MSG_EntityTattle_Switch },
38 { ENTITY_TYPE_RED_SWITCH, MSG_EntityTattle_Switch },
39 { ENTITY_TYPE_HUGE_BLUE_SWITCH, MSG_EntityTattle_BigSwitch_SpinJump },
40 { ENTITY_TYPE_GREEN_STOMP_SWITCH, MSG_EntityTattle_FloorSwitch_SpinJump },
41 { ENTITY_TYPE_BLUE_WARP_PIPE, MSG_EntityTattle_Pipe },
42 { ENTITY_TYPE_PADLOCK, MSG_EntityTattle_PadLock },
43 { ENTITY_TYPE_PADLOCK_RED_FRAME, MSG_EntityTattle_PadLock },
44 { ENTITY_TYPE_PADLOCK_RED_FACE, MSG_EntityTattle_PadLock },
45 { ENTITY_TYPE_PADLOCK_BLUE_FACE, MSG_EntityTattle_PadLock },
46 { ENTITY_TYPE_SIGNPOST, MSG_EntityTattle_SignPost },
47 { ENTITY_TYPE_RED_ARROW_SIGNS, MSG_EntityTattle_ArrowSign },
48 { ENTITY_TYPE_BOMBABLE_ROCK, MSG_EntityTattle_BombableRock },
49 { ENTITY_TYPE_CHEST, MSG_EntityTattle_Chest },
50 { ENTITY_TYPE_WOODEN_CRATE, MSG_EntityTattle_WoodenCrate_CantBreak },
51 { ENTITY_TYPE_BOARDED_FLOOR, MSG_EntityTattle_BoardedFloor_CantBreak },
52 { ENTITY_TYPE_STAR_BOX_LAUNCHER, MSG_EntityTattle_JackInTheBox_SpinJump },
53 { ENTITY_TYPE_BELLBELL_PLANT, MSG_EntityTattle_BellbellPlant },
54 { ENTITY_TYPE_TRUMPET_PLANT, MSG_EntityTattle_TrumpetPlant },
55 { ENTITY_TYPE_CYMBAL_PLANT, MSG_EntityTattle_CymbalBush },
56 { ENTITY_TYPE_MUNCHLESIA, MSG_EntityTattle_Munchlesia },
57 { ENTITY_TYPE_SPINNING_FLOWER, MSG_EntityTattle_SpinningFlower },
58 { ENTITY_TYPE_PINK_FLOWER, MSG_EntityTattle_BulbBush },
59 { -1, -1 }
60};
61
62s32 N(get_trigger_tattle)(s32 tattleColliderID) {
63 s32 i;
64
65 for (i = 0; i < MAX_TRIGGERS; i++) {
66 Trigger* trigger = get_trigger_by_id(i);
67
68 if (trigger != NULL
69 && trigger->flags & TRIGGER_WALL_PRESS_A
70 && trigger->location.colliderID == tattleColliderID
71 ) {
72 return trigger->tattleMsg;
73 }
74 }
75 return 0;
76}
77
78void N(init)(Npc* goombario) {
79 goombario->collisionHeight = 24;
80 goombario->collisionDiameter = 20;
81}
82
83API_CALLABLE(N(TakeOut)) {
84 Npc* goombario = script->owner2.npc;
86
87 if (isInitialCall) {
88 partner_init_get_out(goombario);
89 }
90
91 if (partner_get_out(goombario)) {
92 return ApiStatus_DONE1;
93 } else {
94 return ApiStatus_BLOCK;
95 }
96}
97
99 Call(N(TakeOut))
100 Return
101 End
102};
103
104TweesterPhysics* N(TweesterPhysicsPtr) = &N(TweesterPhysicsData);
105
106API_CALLABLE(N(Update)) {
107 PlayerData* playerData = &gPlayerData;
108 Npc* npc = script->owner2.npc;
109 f32 sinAngle, cosAngle, liftoffVelocity;
110 Entity* entity;
111
112 if (isInitialCall) {
114 mem_clear(N(TweesterPhysicsPtr), sizeof(TweesterPhysics));
116 }
117
118 playerData->partnerUsedTime[PARTNER_GOOMBARIO]++;
120
121 if (entity == NULL) {
124 return 0;
125 }
126
127 switch (N(TweesterPhysicsPtr)->state) {
128 case 0:
129 N(TweesterPhysicsPtr)->state = 1;
130 N(TweesterPhysicsPtr)->prevFlags = npc->flags;
131 N(TweesterPhysicsPtr)->radius = fabsf(dist2D(npc->pos.x, npc->pos.z, entity->pos.x, entity->pos.z));
132 N(TweesterPhysicsPtr)->angle = atan2(entity->pos.x, entity->pos.z, npc->pos.x, npc->pos.z);
133 N(TweesterPhysicsPtr)->angularVel = 6.0f;
134 N(TweesterPhysicsPtr)->liftoffVelPhase = 50.0f;
135 N(TweesterPhysicsPtr)->countdown = 120;
137 npc->flags &= ~NPC_FLAG_GRAVITY;
138 case 1:
139 sin_cos_rad(DEG_TO_RAD(N(TweesterPhysicsPtr)->angle), &sinAngle, &cosAngle);
140
141 npc->pos.x = entity->pos.x + (sinAngle * N(TweesterPhysicsPtr)->radius);
142 npc->pos.z = entity->pos.z - (cosAngle * N(TweesterPhysicsPtr)->radius);
143 N(TweesterPhysicsPtr)->angle = clamp_angle(N(TweesterPhysicsPtr)->angle - N(TweesterPhysicsPtr)->angularVel);
144
145 if (N(TweesterPhysicsPtr)->radius > 20.0f) {
146 N(TweesterPhysicsPtr)->radius--;
147 } else if (N(TweesterPhysicsPtr)->radius < 19.0f) {
148 N(TweesterPhysicsPtr)->radius++;
149 }
150
151 liftoffVelocity = sin_rad(DEG_TO_RAD(N(TweesterPhysicsPtr)->liftoffVelPhase)) * 3.0f;
152 N(TweesterPhysicsPtr)->liftoffVelPhase += 3.0f;
153
154 if (N(TweesterPhysicsPtr)->liftoffVelPhase > 150.0f) {
155 N(TweesterPhysicsPtr)->liftoffVelPhase = 150.0f;
156 }
157
158 npc->pos.y += liftoffVelocity;
159
160 npc->renderYaw = clamp_angle(360.0f - N(TweesterPhysicsPtr)->angle);
161 N(TweesterPhysicsPtr)->angularVel += 0.8;
162
163 if (N(TweesterPhysicsPtr)->angularVel > 40.0f) {
164 N(TweesterPhysicsPtr)->angularVel = 40.0f;
165 }
166
167 if (--N(TweesterPhysicsPtr)->countdown == 0) {
168 N(TweesterPhysicsPtr)->state++;
169 }
170 break;
171 case 2:
172 npc->flags = N(TweesterPhysicsPtr)->prevFlags;
173 N(TweesterPhysicsPtr)->countdown = 30;
174 N(TweesterPhysicsPtr)->state++;
175 break;
176 case 3:
179
180 if (--N(TweesterPhysicsPtr)->countdown == 0) {
181 N(TweesterPhysicsPtr)->state = TWEESTER_PARTNER_INIT;
183 }
184 break;
185 }
186 return 0;
187}
188
189void N(try_cancel_tweester)(Npc* goombario) {
192 goombario->flags = N(TweesterPhysicsPtr)->prevFlags;
193 N(TweesterPhysicsPtr)->state = TWEESTER_PARTNER_INIT;
195 }
196}
197
199 Call(N(Update))
200 Return
201 End
202};
203
204s32 N(can_open_menus)(Npc* goombario) {
206 return FALSE;
207 }
208
209 if ((goombario->flags & (NPC_FLAG_GROUNDED | NPC_FLAG_JUMPING)) != NPC_FLAG_GROUNDED) {
210 return FALSE;
211 }
212
213 return TRUE;
214}
215
216API_CALLABLE(N(SelectTattleMsg)) {
217 PlayerStatus* playerStatus = &gPlayerStatus;
218 Npc* goombario = script->owner2.npc;
219 s32 msgID;
220 s32 entityType;
221 s32 npcMsgID;
222 s32 enemyTattleMsg;
223 s32 i;
224
225 #define USE_STATE functionTemp[0]
226 #define VAR_MSG varTable[0]
227 #define VAR_SKIP varTable[1]
228 enum {
229 USE_TATTLE_INIT = 40,
230 USE_TATTLE_DELAY = 41,
231 USE_TATTLE_FACE_PLAYER = 0,
232 USE_TATTLE_CHOOSE = 1,
233 USE_TATTLE_FORCE_MAP = 10,
234 USE_TATTLE_FORCE_NPC = 20,
235 };
236
237 if (isInitialCall) {
238 N(try_cancel_tweester)(goombario);
239 N(IsTattleActive) = FALSE;
240 N(HadSpeechPrompt) = FALSE;
241 N(HadInteractPrompt) = FALSE;
242 if (playerStatus->animFlags & PA_FLAG_SPEECH_PROMPT_AVAILABLE) {
243 N(HadSpeechPrompt) = TRUE;
244 N(InteractNpc) = SpeechBubblePtr->encounteredNPC;
245 }
246 if (playerStatus->animFlags & PA_FLAG_INTERACT_PROMPT_AVAILABLE) {
247 N(HadInteractPrompt) = TRUE;
248 }
249 script->USE_STATE = USE_TATTLE_INIT;
250 }
251
252 switch (script->USE_STATE) {
253 case USE_TATTLE_INIT:
254#if VERSION_JP
255 if (!(goombario->flags & NPC_FLAG_GROUNDED)) {
256 return ApiStatus_DONE2;
257 }
258 if (playerStatus->inputDisabledCount != 0) {
259 script->VAR_MSG = -1;
260 return ApiStatus_DONE2;
261 }
262#else
263 if (!(goombario->flags & NPC_FLAG_GROUNDED) || playerStatus->inputDisabledCount != 0) {
264 script->VAR_MSG = -1;
265 return ApiStatus_DONE2;
266 }
267#endif
268 script->functionTemp[1] = 3;
270 N(IsTattleActive) = TRUE;
271 script->functionTemp[2] = playerStatus->inputDisabledCount;
272 script->USE_STATE++;
273 break;
274 case USE_TATTLE_DELAY:
275 if (script->functionTemp[1] != 0) {
276 script->functionTemp[1]--;
277 } else {
278 if (script->functionTemp[2] < playerStatus->inputDisabledCount) {
279 script->VAR_MSG = -1;
281 N(IsTattleActive) = FALSE;
282 return ApiStatus_DONE2;
283 }
284 script->USE_STATE = USE_TATTLE_FACE_PLAYER;
285 }
286 break;
287 case USE_TATTLE_FACE_PLAYER:
289 playerStatus->flags &= ~PS_FLAG_HAS_CONVERSATION_NPC;
290 goombario->curAnim = ANIM_WorldGoombario_Idle;
291 goombario->yaw = clamp_angle(gCameras[CAM_DEFAULT].curYaw + playerStatus->spriteFacingAngle - 90.0f);
294 if (N(HadSpeechPrompt)) {
295 script->VAR_MSG = 0;
296 script->USE_STATE = USE_TATTLE_FORCE_NPC;
297 break;
298 }
299 script->USE_STATE = USE_TATTLE_CHOOSE;
300 // fallthrough
301 case USE_TATTLE_CHOOSE:
302 // check for entity tattle
305 msgID = -1;
306
307 for (i = 0; N(EntityTattles)[i][0] != -1; i++) {
308 if (N(EntityTattles)[i][0] != entityType) {
309 continue;
310 }
311 switch (entityType) {
314 if (gPlayerData.hammerLevel >= 1) {
315 msgID = MSG_EntityTattle_HammerBlock2_CanBreak;
316 }
317 break;
320 if (gPlayerData.hammerLevel >= 2) {
321 msgID = MSG_EntityTattle_HammerBlock3_CanBreak;
322 }
323 break;
325 if (gPlayerData.bootsLevel == 1) {
326 msgID = MSG_EntityTattle_WoodenCrate_SpinJump;
327 } else if (gPlayerData.bootsLevel == 2) {
328 msgID = MSG_EntityTattle_WoodenCrate_TornadoJump;
329 }
330 break;
332 if (gPlayerData.bootsLevel == 1) {
333 msgID = MSG_EntityTattle_BoardedFloor_SpinJump;
334 } else if (gPlayerData.bootsLevel == 2) {
335 msgID = MSG_EntityTattle_BoardedFloor_TornadoJump;
336 }
337 break;
339 if (gPlayerData.bootsLevel >= 2) {
340 msgID = MSG_EntityTattle_BigSwitch_TornadoJump;
341 }
342 break;
344 if (gPlayerData.bootsLevel >= 2) {
345 msgID = MSG_EntityTattle_FloorSwitch_TornadoJump;
346 }
347 break;
349 if (gPlayerData.bootsLevel >= 2) {
350 msgID = MSG_EntityTattle_JackInTheBox_TornadoJump;
351 }
352 break;
355 msgID = MSG_EntityTattle_EmptyChest;
356 }
357 break;
358 }
359 if (msgID != -1) {
360 script->VAR_MSG = msgID;
361 } else {
362 script->VAR_MSG = N(EntityTattles)[i][1];
363 }
364 script->VAR_SKIP = FALSE;
365 return ApiStatus_DONE2;
366 }
367 }
368
369 // check for NPC tattle
371 N(InteractNpc) = get_npc_unsafe(WorldTattleInteractionID & 0x1FFF);
372 enemyTattleMsg = get_enemy(N(InteractNpc)->npcID)->tattleMsg;
373 if (enemyTattleMsg != 0) {
374 msgID = enemyTattleMsg;
375 if (msgID < EVT_LIMIT) {
376 script->VAR_MSG = ((s32(*)(void))msgID)();
377 } else {
378 script->VAR_MSG = msgID;
379 script->VAR_SKIP = FALSE;
380 }
381 }
382 return ApiStatus_DONE2;
383 }
384
385 // generic interact tattle
386 if (N(HadInteractPrompt)) {
387 script->VAR_MSG = MSG_EntityTattle_Interact;
388 script->VAR_SKIP = FALSE;
389 return ApiStatus_DONE2;
390 }
391
392 // check for custom trigger tattle
393 msgID = MSG_NONE;
394 if (WorldTattleInteractionID >= 0) {
396 }
397
398 // check map tattle
399 if (msgID == MSG_NONE) {
400 msgID = get_current_map_settings()->tattle.msgID;
401 if (msgID != 0) {
402 if (msgID < EVT_LIMIT) {
403 // map uses a get_tattle function
404 script->VAR_MSG = ((s32(*)(void))msgID)();
405 } else {
406 script->VAR_MSG = msgID;
407 script->VAR_SKIP = FALSE;
408 }
409 }
410 } else {
411 script->VAR_MSG = msgID;
412 script->VAR_SKIP = TRUE;
413 }
414 return ApiStatus_DONE2;
415 }
416
417 switch (script->USE_STATE) {
418 case USE_TATTLE_FORCE_MAP:
419 msgID = get_current_map_settings()->tattle.msgID;
420 if (msgID != 0) {
421 if (msgID < EVT_LIMIT) {
422 script->VAR_MSG = ((s32(*)(void))msgID)();
423 } else {
424 script->VAR_MSG = msgID;
425 script->VAR_SKIP = FALSE;
426 }
427 return ApiStatus_DONE2;
428 }
429 break;
430 case USE_TATTLE_FORCE_NPC:
431 npcMsgID = get_enemy(N(InteractNpc)->npcID)->tattleMsg;
432 if (npcMsgID != MSG_NONE) {
433 script->VAR_MSG = npcMsgID;
434 script->VAR_SKIP = FALSE;
435 return ApiStatus_DONE2;
436 }
437 break;
438 }
439 return ApiStatus_BLOCK;
440}
441
442API_CALLABLE(N(TattleEnd)) {
443 PartnerStatus* partnerStatus = &gPartnerStatus;
444
446
447 if (N(IsTattleActive)) {
448 N(IsTattleActive) = FALSE;
450 }
451
453 partnerStatus->actingPartner = PARTNER_NONE;
454 return ApiStatus_DONE2;
455}
456
458 Call(N(SelectTattleMsg))
459 // abort without cleanup if failed to init
460 IfEq(LVar0, -1)
461 Return
462 EndIf
463 // abort if no tattle message is available
464 IfEq(LVar0, MSG_NONE)
465 Call(N(TattleEnd))
466 Return
467 EndIf
468 // show message if VAR_SKIP is FALSE
469 IfEq(LVar1, FALSE)
470 Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, LVar0)
471 EndIf
472 Wait(1)
473 // cleanup
474 Call(N(TattleEnd))
475 Return
476 End
477};
478
479API_CALLABLE(N(PutAway)) {
480 Npc* goombario = script->owner2.npc;
481
482 if (isInitialCall) {
483 partner_init_put_away(goombario);
484 }
485
486 if (partner_put_away(goombario)) {
487 return ApiStatus_DONE1;
488 } else {
489 return ApiStatus_BLOCK;
490 }
491}
492
494 Call(N(PutAway))
495 Return
496 End
497};
498
499void N(pre_battle)(Npc* goombario) {
500 PartnerStatus* partnerStatus = &gPartnerStatus;
501
502 if (partnerStatus->partnerActionState != PARTNER_ACTION_NONE) {
508 partnerStatus->actingPartner = PARTNER_NONE;
509 disable_npc_blur(goombario);
510 }
511
512 partnerStatus->actingPartner = PARTNER_GOOMBARIO;
513}
s32 partnerUsedTime[12]
Bytecode EvtScript[]
struct ChestData * chest
#define clamp_angle
#define atan2
#define mem_clear
s32 itemID
Definition entity.h:201
@ TWEESTER_PARTNER_INIT
Definition enums.h:2475
@ PARTNER_ACTION_NONE
Definition enums.h:2932
@ PARTNER_ACTION_USE
Definition enums.h:2933
@ NPC_PARTNER
Definition enums.h:2528
@ ENTITY_TYPE_HAMMER1_BLOCK
Definition enums.h:2564
@ ENTITY_TYPE_TRUMPET_PLANT
Definition enums.h:2591
@ ENTITY_TYPE_SINGLE_TRIGGER_BLOCK
Definition enums.h:2559
@ ENTITY_TYPE_BELLBELL_PLANT
Definition enums.h:2590
@ ENTITY_TYPE_SCRIPT_SPRING
Definition enums.h:2584
@ ENTITY_TYPE_PINK_FLOWER
Definition enums.h:2594
@ ENTITY_TYPE_BOMBABLE_ROCK
Definition enums.h:2581
@ ENTITY_TYPE_PUSH_BLOCK
Definition enums.h:2555
@ ENTITY_TYPE_RED_ARROW_SIGNS
Definition enums.h:2589
@ ENTITY_TYPE_PADLOCK
Definition enums.h:2546
@ ENTITY_TYPE_HAMMER3_BLOCK
Definition enums.h:2566
@ ENTITY_TYPE_HUGE_BLUE_SWITCH
Definition enums.h:2552
@ ENTITY_TYPE_BLUE_SWITCH
Definition enums.h:2550
@ ENTITY_TYPE_GREEN_STOMP_SWITCH
Definition enums.h:2553
@ ENTITY_TYPE_CYMBAL_PLANT
Definition enums.h:2593
@ ENTITY_TYPE_HAMMER2_BLOCK
Definition enums.h:2565
@ ENTITY_TYPE_HAMMER3_BLOCK_TINY
Definition enums.h:2569
@ ENTITY_TYPE_MULTI_COIN_BRICK
Definition enums.h:2557
@ ENTITY_TYPE_SIGNPOST
Definition enums.h:2588
@ ENTITY_TYPE_RED_SWITCH
Definition enums.h:2551
@ ENTITY_TYPE_SIMPLE_SPRING
Definition enums.h:2583
@ ENTITY_TYPE_CHEST
Definition enums.h:2587
@ ENTITY_TYPE_SPINNING_FLOWER
Definition enums.h:2595
@ ENTITY_TYPE_PADLOCK_RED_FACE
Definition enums.h:2548
@ ENTITY_TYPE_BRICK_BLOCK
Definition enums.h:2556
@ ENTITY_TYPE_HAMMER2_BLOCK_TINY
Definition enums.h:2568
@ ENTITY_TYPE_RED_BLOCK
Definition enums.h:2563
@ ENTITY_TYPE_MULTI_TRIGGER_BLOCK
Definition enums.h:2554
@ ENTITY_TYPE_HAMMER1_BLOCK_TINY
Definition enums.h:2567
@ ENTITY_TYPE_PADLOCK_RED_FRAME
Definition enums.h:2547
@ ENTITY_TYPE_MUNCHLESIA
Definition enums.h:2592
@ ENTITY_TYPE_PADLOCK_BLUE_FACE
Definition enums.h:2549
@ ENTITY_TYPE_BLUE_WARP_PIPE
Definition enums.h:2582
@ ENTITY_TYPE_YELLOW_BLOCK
Definition enums.h:2558
@ ENTITY_TYPE_BOARDED_FLOOR
Definition enums.h:2580
@ ENTITY_TYPE_WOODEN_CRATE
Definition enums.h:2579
@ ENTITY_TYPE_STAR_BOX_LAUNCHER
Definition enums.h:2586
@ PA_FLAG_SPEECH_PROMPT_AVAILABLE
(...) prompt
Definition enums.h:3096
@ PA_FLAG_INTERACT_PROMPT_AVAILABLE
! prompt
Definition enums.h:3095
@ TIME_FREEZE_NONE
Definition enums.h:3464
@ PARTNER_NONE
Definition enums.h:2885
@ PARTNER_GOOMBARIO
Definition enums.h:2886
@ TRIGGER_WALL_PRESS_A
Definition enums.h:2678
@ CAM_DEFAULT
Definition enums.h:1800
@ NPC_FLAG_FLYING
Definition enums.h:3001
@ NPC_FLAG_JUMPING
Definition enums.h:3009
@ NPC_FLAG_IGNORE_WORLD_COLLISION
Definition enums.h:3004
@ NPC_FLAG_IGNORE_PLAYER_COLLISION
Definition enums.h:3006
@ NPC_FLAG_GROUNDED
Definition enums.h:3010
@ NPC_FLAG_IGNORE_CAMERA_FOR_YAW
Definition enums.h:3016
#define ApiStatus_DONE2
Definition evt.h:118
#define ApiStatus_DONE1
Definition evt.h:117
#define ApiStatus_BLOCK
Definition evt.h:116
Entity * get_entity_by_index(s32 index)
Definition entity.c:530
Trigger * get_trigger_by_id(s32 triggerID)
Definition trigger.c:276
f32 fabsf(f32 f)
void disable_npc_blur(Npc *npc)
Definition npc.c:1088
void partner_walking_update_motion(Npc *partner)
Definition partners.c:1202
void partner_clear_player_tracking(Npc *partner)
Definition partners.c:2436
s32 disable_player_input(void)
Definition 77480.c:990
void partner_walking_update_player_tracking(Npc *partner)
Definition partners.c:1175
void close_status_bar(void)
Definition inventory.c:1440
s32 enable_player_input(void)
Definition 77480.c:998
f32 dist2D(f32 ax, f32 ay, f32 bx, f32 by)
Definition 43F0.c:670
u32 get_entity_type(s32 arg0)
Definition entity.c:568
void partner_walking_enable(Npc *partner, s32 val)
Definition partners.c:1133
f32 sin_rad(f32 x)
Definition 43F0.c:713
void set_time_freeze_mode(s32)
Time freeze modes: 0: none 1: NPCs move, can't be interacted with 2: NPCs don't move,...
Definition main_loop.c:358
void sin_cos_rad(f32 rad, f32 *outSinTheta, f32 *outCosTheta)
Definition 43F0.c:706
s32 cancel_current_message(void)
Definition msg_api.c:312
#define SpeakToPlayer(ARGS...)
Definition msg_api.h:6
Enemy * get_enemy(s32 npcID)
Looks for an enemy matching the specified npcID.
Definition npc.c:2540
Npc * get_npc_unsafe(s32 npcID)
Definition npc.c:995
u32 tattleMsg
Definition npc.h:344
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 COLLISION_WITH_ENTITY_BIT
Definition macros.h:152
#define BSS
Definition macros.h:7
#define EndIf
Marks the end of an if statement or an else block.
Definition macros.h:298
#define MAX_TRIGGERS
Definition macros.h:92
#define DEG_TO_RAD(deg)
Definition macros.h:134
#define LVar1
Definition macros.h:149
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#define IfEq(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR == RVAR.
Definition macros.h:269
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:576
#define EVT_LIMIT
Definition macros.h:47
#define LVar0
Definition macros.h:148
#define COLLISION_WITH_NPC_BIT
Definition macros.h:151
#define Return
Kills the current EVT thread.
Definition macros.h:217
union MapSettings::@48 tattle
MapSettings * get_current_map_settings(void)
Definition world.c:224
EntityData dataBuf
s32 flags
f32 renderYaw
AnimID curAnim
Vec3f pos
union Trigger::@1 location
Entity * TweesterTouchingPartner
Definition 7B440.c:5
PartnerStatus gPartnerStatus
Definition partners.c:42
Camera gCameras[4]
Definition cam_main.c:17
PlayerData gPlayerData
Definition 77480.c:40
PlayerStatus gPlayerStatus
Definition 77480.c:39
EvtScript EVS_WorldGoombario_UseAbility
Definition goombario.c:457
EvtScript EVS_WorldGoombario_TakeOut
Definition goombario.c:98
s32 N can_open_menus(Npc *goombario)
Definition goombario.c:204
BSS s32 WorldTattleInteractionID
Definition goombario.c:18
s32 N get_trigger_tattle(s32 tattleColliderID)
Definition goombario.c:62
EvtScript EVS_WorldGoombario_Update
Definition goombario.c:198
void N pre_battle(Npc *goombario)
Definition goombario.c:499
SpeechBubbleData * SpeechBubblePtr
void N try_cancel_tweester(Npc *goombario)
Definition goombario.c:189
void N init(Npc *goombario)
Definition goombario.c:78
EvtScript EVS_WorldGoombario_PutAway
Definition goombario.c:493