Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
7E9D0.c
Go to the documentation of this file.
1// this file and world/actions.c are candidates for merging
2
3#include "common.h"
4#include "world/partners.h"
5#include "world/actions.h"
6#include "world/disguise.h"
7#include "npc.h"
8#include "effects.h"
9#include "ld_addrs.h"
10
11#include "sprite/npc/WorldClubba.h"
12#include "sprite/npc/WorldKoopatrol.h"
13#include "sprite/npc/HammerBros.h"
14#ifdef SHIFT
15extern Addr world_action_CLASS_VRAM;
16#define PLAYER_ACTION_VRAM_DEF world_action_CLASS_VRAM
17#else
18#define PLAYER_ACTION_VRAM_DEF (void*) 0x802B6000
19#endif
20
30
32s32 D_800F7B44 = 0; // always zero, remove?
33
35
36void func_800E5520(void) {
37 D_8010C9B0 = 0;
38}
39
40s32 (*LandingAdjustCamCallback)(void) = NULL;
41
42void phys_set_landing_adjust_cam_check(s32 (*funcPtr)(void)) {
44}
45
48
49 if (LandingAdjustCamCallback != NULL) {
51 }
52
53 if (ret == LANDING_CAM_CHECK_SURFACE) {
55
56 if (surfaceType == SURFACE_TYPE_LAVA) {
59 } else {
60 gCameras[CAM_DEFAULT].moveFlags &= ~CAMERA_MOVE_IGNORE_PLAYER_Y;
61 }
64 } else {
65 gCameras[CAM_DEFAULT].moveFlags &= ~CAMERA_MOVE_NO_INTERP_Y;
66 }
67
68 return ret;
69}
70
72 s32 i;
73
75
76 for (i = 0; i < ARRAY_COUNT(gSpinHistoryPosAngle); i++) {
77 gSpinHistoryPosAngle[i] = 180;
78 gSpinHistoryPosY[i] = 0x80000000;
79 }
80}
81
82f32 phys_get_spin_history(s32 lag, s32* x, s32* y, s32* z) {
83 s32 idx = gSpinHistoryBufferPos - lag;
84
85 if (idx < 0) {
87 }
88
89 *x = gSpinHistoryPosX[idx];
90 *y = gSpinHistoryPosY[idx];
91 *z = gSpinHistoryPosZ[idx];
92 return gSpinHistoryPosAngle[idx];
93}
94
96 s32 i;
97
100
101 for (i = 0; i < ARRAY_COUNT(gSpinHistoryPosAngle); i++) {
103 gSpinHistoryPosX[i] = 0;
104 gSpinHistoryPosY[i] = 0;
105 gSpinHistoryPosZ[i] = 0;
106 }
107
108 D_8010C964 = 0;
110}
111
113 PlayerStatus* playerStatus = &gPlayerStatus;
114 PlayerSpinState* playerSpinState = &gPlayerSpinState;
115
116 if (!(playerStatus->flags & PS_FLAG_ENTERING_BATTLE)) {
117 playerStatus->flags &= ~PS_FLAG_TIME_STOPPED;
118 }
119
120 if (playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS) {
122 return;
123 }
124
125 if (playerStatus->camResetDelay != 0) {
126 playerStatus->camResetDelay--;
127 if (playerStatus->camResetDelay == 0) {
129 }
130 }
131
132 // if midair, look for velocity inflection
133 if (playerStatus->timeInAir != 0) {
134 if (playerStatus->gravityIntegrator[0] <= 0.0f && LastMidairPlayerVelY > 0.0f) {
135 playerStatus->peakJumpTime = playerStatus->timeInAir;
136 }
137 LastMidairPlayerVelY = playerStatus->gravityIntegrator[0];
138 }
139
141
142 if (playerSpinState->stopSoundTimer != 0) {
143 playerSpinState->stopSoundTimer--;
144 if (playerSpinState->stopSoundTimer == 0) {
145 playerStatus->animFlags &= ~PA_FLAG_SPINNING;
146 if (playerSpinState->spinSoundID != 0) {
147 sfx_stop_sound(playerSpinState->spinSoundID);
148 }
149 }
150 }
151
152 do {
153 s32 actionState = playerStatus->actionState;
154
155 if (actionState == ACTION_STATE_IDLE || actionState == ACTION_STATE_WALK || actionState == ACTION_STATE_RUN) {
156 s32 cond;
157
158 if (!(playerStatus->flags & PS_FLAG_INPUT_DISABLED)) {
160 } else {
161 cond = FALSE;
162 }
163
164 if ((gPartnerStatus.partnerActionState == PARTNER_ACTION_NONE) && !(playerStatus->flags & PS_FLAG_PAUSED) && cond) {
166 }
168 }
169
171
172 if (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED) {
173 if (action->dmaStart != NULL && action->dmaStart != LastLoadedActionOffset) {
176 }
177 }
178 action->update();
179 } while (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED);
180}
181
208
209void set_action_state(s32 actionState) {
210 PlayerStatus* playerStatus = &gPlayerStatus;
211 PlayerData* playerData = &gPlayerData;
212 PlayerSpinState* spinState = &gPlayerSpinState;
213
214 if (playerStatus->flags & PS_FLAG_SPECIAL_JUMP) {
215 playerStatus->flags &= ~PS_FLAG_SPECIAL_JUMP;
217 }
218
219 if (playerStatus->animFlags & PA_FLAG_8BIT_MARIO) {
220 if (actionState >= ACTION_STATE_IDLE && actionState < ACTION_STATE_TALK) {
221 playerStatus->prevActionState = playerStatus->actionState;
222 playerStatus->actionState = actionState;
223 playerStatus->flags |= PS_FLAG_ACTION_STATE_CHANGED;
224 }
225 return;
226 }
227
228 if (actionState == ACTION_STATE_HIT_FIRE || actionState == ACTION_STATE_HIT_LAVA) {
229 s8 partner;
230
231 if (playerStatus->hazardType == HAZARD_TYPE_FIRE_BAR) {
232 actionState = ACTION_STATE_HIT_FIRE;
233 }
234
235 // Whilst Sushie, Lakilester, or Parakarry's ability is active, hazards have no effect.
236 partner = playerData->curPartner;
237
238 if (partner == PARTNER_SUSHIE || partner == PARTNER_LAKILESTER || partner == PARTNER_PARAKARRY) {
241 playerStatus->flags |= PS_FLAG_HIT_FIRE;
242 return;
243 }
244 }
245 }
246
247 if (actionState == ACTION_STATE_SLIDING) {
248 playerStatus->flags |= PS_FLAG_SLIDING;
249 playerStatus->moveFrames = 0;
250 playerStatus->flags &= ~PS_FLAG_CUTSCENE_MOVEMENT;
251 }
252
253 playerStatus->prevActionState = playerStatus->actionState;
254 if (actionState == ACTION_STATE_USE_TWEESTER) {
255 playerStatus->prevActionState = ACTION_STATE_IDLE;
256 }
257
258 if (actionState == ACTION_STATE_ENEMY_FIRST_STRIKE) {
260 }
261 playerStatus->actionState = actionState;
262 playerStatus->flags |= PS_FLAG_ACTION_STATE_CHANGED;
263
264 if (playerStatus->actionState == ACTION_STATE_SPIN) {
265 return;
266 }
267
268 playerStatus->flags &= ~PS_FLAG_SPINNING;
269 playerStatus->animFlags &= ~PA_FLAG_SPINNING;
270
271 if (spinState->spinSoundID != 0) {
272 sfx_stop_sound(spinState->spinSoundID);
273 }
274
275 if (playerStatus->specialDecorationEffect != NULL) {
276 playerStatus->specialDecorationEffect->data.spin->timeLeft = 10;
277 playerStatus->specialDecorationEffect = NULL;
278 }
279}
280
282 PlayerStatus* playerStatus = &gPlayerStatus;
283
285 SQ(playerStatus->stickAxis[0]) + SQ(playerStatus->stickAxis[1]) > SQ(55))
286 {
288 } else {
290 }
291}
292
293void start_falling(void) {
294 PlayerStatus* playerStatus = &gPlayerStatus;
295
298}
299
300void start_bounce_a(void) {
301 PlayerStatus* playerStatus = &gPlayerStatus;
302
304 playerStatus->gravityIntegrator[0] = 10.0f;
305 playerStatus->gravityIntegrator[1] = -2.0f;
306 playerStatus->gravityIntegrator[2] = 0.8f;
307 playerStatus->gravityIntegrator[3] = -0.75f;
308}
309
310void start_bounce_b(void) {
311 PlayerStatus* playerStatus = &gPlayerStatus;
312
314 playerStatus->gravityIntegrator[0] = 8.0f;
315 playerStatus->gravityIntegrator[1] = -1.0f;
316 playerStatus->gravityIntegrator[2] = 0;
317 playerStatus->gravityIntegrator[3] = 0;
318 playerStatus->flags |= PS_FLAG_SCRIPTED_FALL;
319}
320
322 PlayerStatus* playerStatus = &gPlayerStatus;
323 PlayerData* playerData = &gPlayerData;
324
325 if (playerStatus->pressedButtons & BUTTON_B) {
326 if (playerStatus->flags & PS_FLAG_FALLING) {
327 return FALSE;
328 }
329
331 return FALSE;
332 }
333
334 if (playerData->hammerLevel == -1) {
335 return FALSE;
336 }
337
339 return TRUE;
340 }
341 return FALSE;
342}
343
345 PlayerStatus* playerStatus = &gPlayerStatus;
346 CollisionStatus* collisionStatus = &gCollisionStatus;
347 s32 surfaceType;
348
349 if (!(playerStatus->pressedButtons & BUTTON_A)) {
350 return FALSE;
351 }
352
354 if ((surfaceType == SURFACE_TYPE_SLIDE) && phys_should_player_be_sliding()) {
355 return FALSE;
356 }
357
358 if (collisionStatus->touchingWallTrigger != 0 ||
361 {
362 return FALSE;
363 }
364
365 if ((collisionStatus->curInspect != -1) && (collisionStatus->curInspect & COLLISION_WITH_ENTITY_BIT)) {
366 Entity* entity = get_entity_by_index(collisionStatus->curInspect);
367
369 if ((entity->boundScriptBytecode == NULL) || (entity->flags & ENTITY_FLAG_4000)) {
370 if (entity->type == ENTITY_TYPE_PINK_FLOWER ||
371 entity->type == ENTITY_TYPE_BELLBELL_PLANT ||
373 {
374 return FALSE;
375 }
376 } else {
377 return FALSE;
378 }
379 }
380 }
381
383 return TRUE;
384}
385
387 PlayerStatus* playerStatus = &gPlayerStatus;
388 PlayerSpinState* spinState = &gPlayerSpinState;
389 PlayerSpinState* temp2 = spinState;
390
391 if (!((playerStatus->flags & (PS_FLAG_NO_STATIC_COLLISION | PS_FLAG_CUTSCENE_MOVEMENT)) ||
392 (playerStatus->animFlags & PA_FLAG_USING_WATT) ||
393 (playerStatus->curButtons & BUTTON_C_DOWN) ||
395
396 s32 actionState = playerStatus->actionState;
397 s32 btnPressed = playerStatus->pressedButtons & Z_TRIG;
398
399 // TODO
400 if (actionState != ACTION_STATE_RIDE) {
401 if (actionState < ACTION_STATE_STEP_UP) {
402 if (actionState < ACTION_STATE_JUMP) {
403 if (actionState >= 0 && !(playerStatus->animFlags & PA_FLAG_SPINNING)) {
404 if (btnPressed || spinState->hasBufferedSpin) {
406 if (spinState->hasBufferedSpin != FALSE) {
407 if (spinState->bufferedStickAxis.x != 0 || spinState->bufferedStickAxis.y != 0) {
408 playerStatus->prevActionState = temp2->prevActionState;
409 } else {
410 playerStatus->prevActionState = ACTION_STATE_IDLE;
411 }
412 }
413 }
414 }
415 }
416 }
417 }
418 }
419}
420
422 ANIM_WorldClubba_Anim00,
423 ANIM_WorldClubba_Anim02,
424 ANIM_WorldClubba_Anim03,
425 ANIM_WorldClubba_Anim04,
426 ANIM_WorldClubba_Anim05,
427 ANIM_WorldClubba_Anim08,
428 ANIM_WorldClubba_Anim07,
429 ANIM_WorldClubba_Anim13,
430 ANIM_WorldClubba_Anim14,
432};
433
435 ANIM_HammerBros_Anim00,
436 ANIM_HammerBros_Anim02,
437 ANIM_HammerBros_Anim03,
438 ANIM_HammerBros_Anim04,
439 ANIM_HammerBros_Anim06,
440 ANIM_HammerBros_Anim07,
441 ANIM_HammerBros_Anim09,
442 ANIM_HammerBros_Anim0A,
443 ANIM_HammerBros_Anim0B,
444 ANIM_HammerBros_Anim1A,
446};
447
449 ANIM_WorldKoopatrol_Anim00,
450 ANIM_WorldKoopatrol_Anim01,
451 ANIM_WorldKoopatrol_Anim02,
452 ANIM_WorldKoopatrol_Anim04,
453 ANIM_WorldKoopatrol_Anim05,
454 ANIM_WorldKoopatrol_Anim06,
455 ANIM_WorldKoopatrol_Anim07,
456 ANIM_WorldKoopatrol_Anim08,
457 ANIM_WorldKoopatrol_Anim09,
458 ANIM_WorldKoopatrol_Anim12,
459 ANIM_WorldKoopatrol_Anim14,
460 ANIM_WorldKoopatrol_Anim1B,
462};
463
466 ANIM_WorldKoopatrol_Anim01,
467 ANIM_WorldKoopatrol_Anim04,
468 ANIM_WorldKoopatrol_Anim06,
469 ANIM_WorldKoopatrol_Anim08,
470 ANIM_WorldKoopatrol_Anim00,
471 ANIM_WorldKoopatrol_Anim1B
472 },
474 ANIM_WorldKoopatrol_Anim01,
475 ANIM_WorldKoopatrol_Anim04,
476 ANIM_WorldKoopatrol_Anim06,
477 ANIM_WorldKoopatrol_Anim08,
478 ANIM_WorldKoopatrol_Anim00,
479 ANIM_WorldKoopatrol_Anim1B
480 },
482 ANIM_HammerBros_Anim03,
483 ANIM_HammerBros_Anim06,
484 ANIM_HammerBros_Anim09,
485 ANIM_HammerBros_Anim0B,
486 ANIM_HammerBros_Anim00,
487 ANIM_HammerBros_Anim1A
488 },
490 ANIM_WorldClubba_Anim02,
491 ANIM_WorldClubba_Anim03,
492 ANIM_WorldClubba_Anim04,
493 ANIM_WorldClubba_Anim05,
494 ANIM_WorldClubba_Anim00,
495 ANIM_WorldClubba_Anim14
496 },
497};
498
505
507 s32 listIndex = PeachDisguiseNpcIndex;
508
509 if (listIndex >= 0) {
510 get_npc_by_index(listIndex)->curAnim = anim;
511 }
512}
513
514void peach_force_disguise_action(s32 useParasol) {
515 PlayerStatus* playerStatus = &gPlayerStatus;
516
517 if (useParasol) {
519 } else {
520 playerStatus->animFlags &= ~PA_FLAG_INVISIBLE;
521 gGameStatusPtr->peachFlags &= ~PEACH_FLAG_DISGUISED;
522 playerStatus->peachDisguise = PEACH_DISGUISE_NONE;
525 playerStatus->colliderHeight = 55;
526 playerStatus->colliderDiameter = 38;
527 }
528}
529
531 PlayerStatus* playerStatus = &gPlayerStatus;
532 s32 actionState = playerStatus->actionState;
533 Npc* disguiseNpc;
534
535 if (actionState == ACTION_STATE_IDLE || actionState == ACTION_STATE_WALK || actionState == ACTION_STATE_RUN) {
536 if (PeachDisguiseReapplyDelay != 0) {
538 if (PeachDisguiseReapplyDelay == 0) {
540 playerStatus->animFlags |= PA_FLAG_INVISIBLE;
542
544 if (disguiseNpc != NULL) {
545 disguiseNpc->flags &= ~NPC_FLAG_IGNORE_CAMERA_FOR_YAW;
546 }
547 }
548 }
551 }
552 }
553}
554
556 PlayerStatus* playerStatus = &gPlayerStatus;
557
558 if (PeachDisguiseNpcIndex >= 0) {
560
562 npc->renderYaw = playerStatus->spriteFacingAngle;
563 } else {
564 npc->yaw = playerStatus->targetYaw;
565 }
566
567 npc->pos.x = playerStatus->pos.x;
568 npc->pos.y = playerStatus->pos.y;
569 npc->pos.z = playerStatus->pos.z;
570 }
571}
572
573Npc* peach_make_disguise_npc(s32 peachDisguise) {
574 PlayerStatus* playerStatus = &gPlayerStatus;
575 NpcBlueprint bp;
576 NpcBlueprint* bpPtr = &bp;
577 Npc* npc;
578 f32 yaw;
579
580 if (peachDisguise == PEACH_DISGUISE_NONE) {
581 return NULL;
582 }
583
584 playerStatus->colliderHeight = 37;
585 playerStatus->colliderDiameter = 38;
586 playerStatus->peachDisguise = peachDisguise;
587 gGameStatusPtr->peachDisguise = peachDisguise;
588
591 bpPtr->onUpdate = NULL;
592 bpPtr->onRender = NULL;
593
596
598
599 if (!(playerStatus->spriteFacingAngle >= 90.0f) || !(playerStatus->spriteFacingAngle < 270.0f)) {
600 yaw = 180.0f;
601 } else {
602 yaw = 0.0f;
603 }
604
605 set_npc_yaw(npc, yaw);
606
607 npc->pos.x = playerStatus->pos.x;
608 npc->pos.y = playerStatus->pos.y;
609 npc->pos.z = playerStatus->pos.z;
610
611 return npc;
612}
613
615 PlayerStatus* playerStatus = &gPlayerStatus;
616 Camera* camera = &gCameras[gCurrentCameraID];
617 f32 yaw, dx, dy;
618 s32 radius;
619 s32 hitID;
620 s32 i;
621
622 if (playerStatus->spriteFacingAngle >= 90.0f && playerStatus->spriteFacingAngle < 270.0f) {
623 yaw = camera->curYaw - 270.0f;
624 } else {
625 yaw = camera->curYaw - 90.0f;
626 }
627 sin_cos_rad(DEG_TO_RAD(clamp_angle(yaw)), &dx, &dy);
628
629 for (radius = 2, i = 2; i > 0; radius += 18, i--) {
630 f32 x = playerStatus->pos.x + (dx * radius);
631 f32 y = playerStatus->pos.y + 4.0f;
632 f32 z = playerStatus->pos.z - (dy * radius);
633 hitID = player_test_lateral_overlap(PLAYER_COLLISION_HAMMER, playerStatus, &x, &y, &z, 4.0f, yaw);
634 if (hitID > NO_COLLIDER) {
635 break;
636 }
637 }
638
639 return hitID;
640}
void start_falling(void)
Definition 7E9D0.c:293
void phys_reset_spin_history(void)
Definition 7E9D0.c:95
s32 PeachDisguiseReapplyDelay
Definition 7E9D0.c:22
AnimID HammerBroDisguiseExtraAnims[]
Definition 7E9D0.c:434
void phys_update_action_state(void)
Definition 7E9D0.c:112
void update_locomotion_state(void)
Definition 7E9D0.c:281
s32 gSpinHistoryPosY[5]
Definition 7E9D0.c:27
DisguiseAnims BasicPeachDisguiseAnims[]
Definition 7E9D0.c:464
s32(* LandingAdjustCamCallback)(void)
Definition 7E9D0.c:40
void peach_force_disguise_action(s32 useParasol)
Definition 7E9D0.c:514
void func_800E5520(void)
Definition 7E9D0.c:36
void check_input_spin(void)
Definition 7E9D0.c:386
s32 D_800F7B44
Definition 7E9D0.c:32
s32 gSpinHistoryPosX[5]
Definition 7E9D0.c:26
void phys_peach_update(void)
Definition 7E9D0.c:182
s32 PrevPlayerCamRelativeYaw
Definition 7E9D0.c:31
s32 phys_adjust_cam_on_landing(void)
Definition 7E9D0.c:46
s32 peach_disguise_check_overlaps(void)
Definition 7E9D0.c:614
void * LastLoadedActionOffset
Definition 7E9D0.c:21
void start_bounce_b(void)
Definition 7E9D0.c:310
#define PLAYER_ACTION_VRAM_DEF
Definition 7E9D0.c:18
void set_action_state(s32 actionState)
Definition 7E9D0.c:209
s16 D_8010C9B0
Definition 7E9D0.c:25
void start_bounce_a(void)
Definition 7E9D0.c:300
void peach_sync_disguise_npc(void)
Definition 7E9D0.c:555
s32 gSpinHistoryBufferPos
Definition 7E9D0.c:24
void peach_set_disguise_anim(AnimID anim)
Definition 7E9D0.c:506
b32 check_input_hammer(void)
Definition 7E9D0.c:321
void peach_check_for_parasol_input(void)
Definition 7E9D0.c:530
s16 gSpinHistoryPosAngle[5]
Definition 7E9D0.c:29
AnimID * PeachDisguiseExtraAnims[]
Definition 7E9D0.c:499
AnimID ClubbaDisguiseExtraAnims[]
Definition 7E9D0.c:421
s32 D_8010C964
Definition 7E9D0.c:23
b32 check_input_jump(void)
Definition 7E9D0.c:344
AnimID KoopatrolDisguiseExtraAnims[]
Definition 7E9D0.c:448
f32 phys_get_spin_history(s32 lag, s32 *x, s32 *y, s32 *z)
Definition 7E9D0.c:82
f32 LastMidairPlayerVelY
Definition 7E9D0.c:34
s32 gSpinHistoryPosZ[5]
Definition 7E9D0.c:28
void phys_clear_spin_history(void)
Definition 7E9D0.c:71
Npc * peach_make_disguise_npc(s32 peachDisguise)
Definition 7E9D0.c:573
void phys_set_landing_adjust_cam_check(s32(*funcPtr)(void))
Definition 7E9D0.c:42
Action PlayerActionsTable[]
Definition actions.c:77
struct EffectInstance * specialDecorationEffect
s32 b32
f32 gravityIntegrator[4]
u32 AnimID
#define clamp_angle
#define mem_clear
s32 timeLeft
Definition effects.h:1207
struct SpinFXData * spin
Definition effects.h:2534
EffectData data
Definition effects.h:2605
@ BUTTON_A
Definition enums.h:2790
@ BUTTON_C_DOWN
Definition enums.h:2779
@ BUTTON_B
Definition enums.h:2789
@ PEACH_FLAG_DISGUISED
Definition enums.h:2489
@ PEACH_FLAG_HAS_PARASOL
Definition enums.h:2490
@ SURFACE_TYPE_SLIDE
Definition enums.h:4675
@ SURFACE_TYPE_LAVA
Definition enums.h:4673
@ PEACH_DISGUISE_KOOPATROL
Definition enums.h:2519
@ PEACH_DISGUISE_HAMMER_BROS
Definition enums.h:2520
@ PEACH_DISGUISE_CLUBBA
Definition enums.h:2521
@ PEACH_DISGUISE_NONE
Definition enums.h:2518
@ PS_FLAG_PAUSED
Definition enums.h:3040
@ PS_FLAG_FALLING
Definition enums.h:3036
@ PS_FLAG_ENTERING_BATTLE
Definition enums.h:3061
@ PS_FLAG_ACTION_STATE_CHANGED
Definition enums.h:3084
@ PS_FLAG_SPECIAL_JUMP
Definition enums.h:3046
@ PS_FLAG_CUTSCENE_MOVEMENT
Definition enums.h:3054
@ PS_FLAG_SLIDING
Definition enums.h:3038
@ PS_FLAG_NO_STATIC_COLLISION
Definition enums.h:3051
@ PS_FLAG_SCRIPTED_FALL
Definition enums.h:3071
@ PS_FLAG_HIT_FIRE
Definition enums.h:3050
@ PS_FLAG_INPUT_DISABLED
Definition enums.h:3052
@ PARTNER_ACTION_NONE
Definition enums.h:2932
@ PARTNER_ACTION_USE
Definition enums.h:2933
@ LANDING_CAM_NEVER_ADJUST
Definition enums.h:6419
@ LANDING_CAM_CHECK_SURFACE
Definition enums.h:6420
@ COLLIDER_FLAGS_SURFACE_TYPE_MASK
Definition enums.h:4693
@ HAZARD_TYPE_FIRE_BAR
Definition enums.h:3502
@ ENTITY_TYPE_TRUMPET_PLANT
Definition enums.h:2591
@ ENTITY_TYPE_BELLBELL_PLANT
Definition enums.h:2590
@ ENTITY_TYPE_PINK_FLOWER
Definition enums.h:2594
@ PLAYER_COLLISION_HAMMER
Definition enums.h:4715
@ PA_FLAG_INTERRUPT_USE_PARTNER
forces actions with bow, parakarry, watt, and lakilester to end (sushie not tested)
Definition enums.h:3093
@ PA_FLAG_SPEECH_PROMPT_AVAILABLE
(...) prompt
Definition enums.h:3096
@ PA_FLAG_SPINNING
Definition enums.h:3107
@ PA_FLAG_INVISIBLE
Definition enums.h:3104
@ PA_FLAG_8BIT_MARIO
Definition enums.h:3105
@ PA_FLAG_USING_PEACH_PHYSICS
Definition enums.h:3103
@ PA_FLAG_INTERACT_PROMPT_AVAILABLE
! prompt
Definition enums.h:3095
@ PA_FLAG_USING_WATT
Definition enums.h:3090
@ ABILITY_SLOW_GO
Definition enums.h:447
@ ENTITY_FLAG_SHOWS_INSPECT_PROMPT
Definition enums.h:2625
@ ENTITY_FLAG_4000
Definition enums.h:2627
@ PARTNER_LAKILESTER
Definition enums.h:2893
@ PARTNER_WATT
Definition enums.h:2891
@ PARTNER_SUSHIE
Definition enums.h:2892
@ PARTNER_PARAKARRY
Definition enums.h:2889
@ ACTION_STATE_RIDE
Definition enums.h:2461
@ ACTION_STATE_HIT_LAVA
Definition enums.h:2451
@ ACTION_STATE_JUMP
Definition enums.h:2430
@ ACTION_STATE_IDLE
Definition enums.h:2426
@ ACTION_STATE_TALK
Reading signs doesn't count.
Definition enums.h:2440
@ ACTION_STATE_USE_TWEESTER
Definition enums.h:2459
@ ACTION_STATE_USE_SNEAKY_PARASOL
Definition enums.h:2453
@ ACTION_STATE_FALLING
Definition enums.h:2435
@ ACTION_STATE_SLIDING
Definition enums.h:2445
@ ACTION_STATE_ENEMY_FIRST_STRIKE
Definition enums.h:2455
@ ACTION_STATE_WALK
Definition enums.h:2427
@ ACTION_STATE_BOUNCE
Used with Kooper.
Definition enums.h:2431
@ ACTION_STATE_HAMMER
Definition enums.h:2446
@ ACTION_STATE_HIT_FIRE
Causes Mario to fly up and take damage. Used for fire bars.
Definition enums.h:2449
@ ACTION_STATE_STEP_UP
Definition enums.h:2462
@ ACTION_STATE_SPIN
Definition enums.h:2454
@ ACTION_STATE_RUN
Definition enums.h:2428
@ CAMERA_MOVE_IGNORE_PLAYER_Y
Definition enums.h:4732
@ CAMERA_MOVE_ACCEL_INTERP_Y
Definition enums.h:4734
@ CAMERA_MOVE_NO_INTERP_Y
Definition enums.h:4733
@ CAM_DEFAULT
Definition enums.h:1800
@ NPC_FLAG_FLYING
Definition enums.h:3001
@ NPC_FLAG_IGNORE_WORLD_COLLISION
Definition enums.h:3004
@ NPC_FLAG_IGNORE_PLAYER_COLLISION
Definition enums.h:3006
@ NPC_FLAG_IGNORE_CAMERA_FOR_YAW
Definition enums.h:3016
b32 check_conversation_trigger(void)
Definition encounter.c:2322
Entity * get_entity_by_index(s32 index)
Definition entity.c:530
s32 is_ability_active(s32 arg0)
Definition inventory.c:1725
s32 get_collider_flags(s32 colliderID)
Definition collision.c:481
u32 dma_copy(Addr romStart, Addr romEnd, void *vramDest)
Definition 43F0.c:444
s32 enable_player_input(void)
Definition 77480.c:998
s32 phys_should_player_be_sliding(void)
Definition 7BB60.c:839
s32 player_test_lateral_overlap(s32, PlayerStatus *, f32 *, f32 *, f32 *, f32, f32)
Definition 77480.c:370
void calculate_camera_yinterp_rate(void)
Definition 7B440.c:183
void sin_cos_rad(f32 rad, f32 *outSinTheta, f32 *outCosTheta)
Definition 43F0.c:706
s32 create_standard_npc(NpcBlueprint *blueprint, AnimID *animList)
Definition npc.c:194
void disable_npc_shadow(Npc *npc)
Definition npc.c:1037
void free_npc_by_index(s32 listIndex)
Definition npc.c:202
Npc * get_npc_by_index(s32 listIndex)
Definition npc.c:271
void set_npc_yaw(Npc *npc, f32 yaw)
Definition npc.c:1246
void sfx_stop_sound(s32 soundID)
Definition sfx.c:507
#define COLLISION_WITH_ENTITY_BIT
Definition macros.h:152
#define ARRAY_COUNT(arr)
Definition macros.h:40
#define DEG_TO_RAD(deg)
Definition macros.h:134
#define LOAD_INTEGRATOR_FALL(ptr)
Definition macros.h:186
#define SQ(x)
Definition macros.h:166
#define NO_COLLIDER
Definition macros.h:156
void * dmaStart
Definition actions.h:8
s8 flag
Definition actions.h:10
void(* update)(void)
Definition actions.h:7
void * dmaEnd
Definition actions.h:9
EvtScript * boundScriptBytecode
void(* onRender)(struct Npc *)
Definition npc.h:89
void(* onUpdate)(struct Npc *)
Definition npc.h:88
s32 initialAnim
Definition npc.h:87
s32 flags
Definition npc.h:86
s32 flags
f32 renderYaw
AnimID curAnim
Vec3f pos
u8 Addr[]
Linker symbol address, as in ld_addrs.h.
Definition types.h:16
#define ANIM_LIST_END
Terminates an extraAnimationList.
Definition types.h:22
CollisionStatus gCollisionStatus
Definition 7BB60.c:6
PartnerStatus gPartnerStatus
Definition partners.c:42
GameStatus * gGameStatusPtr
Definition main_loop.c:32
PlayerSpinState gPlayerSpinState
Definition 7B440.c:11
Camera gCameras[4]
Definition cam_main.c:17
PlayerData gPlayerData
Definition 77480.c:40
PlayerStatus gPlayerStatus
Definition 77480.c:39
s32 gCurrentCameraID
Definition cam_math.c:4
s32 PeachDisguiseNpcIndex
Definition 7B440.c:4