Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
77480.c File Reference

Go to the source code of this file.

Macros

#define inspect_icon_VRAM   (void*)0x802B7000
 
#define speech_bubble_VRAM   (void*)0x802B7000
 
#define pulse_stone_VRAM   (void*)0x802B7000
 
#define i_spy_VRAM   (void*)0x802B7000
 

Functions

HitID player_raycast_down (f32 *, f32 *, f32 *, f32 *)
 
HitID player_raycast_up_corner (f32 *x, f32 *y, f32 *z, f32 *length)
 
HitID player_raycast_general (s32, f32, f32, f32, f32, f32, f32, f32 *, f32 *, f32 *, f32 *, f32 *, f32 *, f32 *)
 
void player_get_slip_vector (f32 *outX, f32 *outY, f32 x, f32 y, f32 nX, f32 nY)
 
void phys_update_standard (void)
 
void phys_update_lava_reset (void)
 
void update_player_blink (void)
 
void check_for_ispy (void)
 
void render_ispy_icon (void)
 
void check_for_pulse_stone (void)
 unavoidable use of hardcoded map and area IDs
 
void clear_ispy_icon (void)
 
void render_pulse_stone_icon (void)
 
void clear_pulse_stone_icon (void)
 
void check_for_conversation_prompt (void)
 
void render_conversation_prompt (void)
 
void clear_conversation_prompt (void)
 
void check_for_interactables (void)
 
void render_interact_prompt (void)
 
void clear_interact_prompt (void)
 
void update_partner_timers (void)
 
void player_update_sprite (void)
 
s32 get_player_back_anim (s32 arg0)
 
void appendGfx_player (void *data)
 
void appendGfx_player_spin (void *data)
 Only used when speedy spinning.
 
void update_player_shadow (void)
 
s32 partner_use_ability (void)
 
HitID player_raycast_below (f32 yaw, f32 diameter, f32 *outX, f32 *outY, f32 *outZ, f32 *outLength, f32 *hitRx, f32 *hitRz, f32 *hitDirX, f32 *hitDirZ)
 
HitID player_raycast_below_cam_relative (PlayerStatus *playerStatus, f32 *outX, f32 *outY, f32 *outZ, f32 *outLength, f32 *hitRx, f32 *hitRz, f32 *hitDirX, f32 *hitDirZ)
 
HitID player_raycast_up_corners (PlayerStatus *player, f32 *posX, f32 *posY, f32 *posZ, f32 *hitDepth, f32 yaw)
 
HitID player_test_lateral_overlap (s32 mode, PlayerStatus *playerStatus, f32 *x, f32 *y, f32 *z, f32 length, f32 yaw)
 
HitID player_test_move_without_slipping (PlayerStatus *playerStatus, f32 *x, f32 *y, f32 *z, f32 length, f32 yaw, s32 *hasClimbableStep)
 Only used for Peach physics.
 
HitID player_test_move_with_slipping (PlayerStatus *playerStatus, f32 *x, f32 *y, f32 *z, f32 length, f32 yaw)
 
void update_player (void)
 
void check_input_use_partner (void)
 
void clear_player_status (void)
 
void player_reset_data (void)
 
b32 is_player_dismounted (void)
 
s32 get_overriding_player_anim (s32 anim)
 
void suggest_player_anim_allow_backward (AnimID anim)
 
void force_player_anim (AnimID anim)
 
void suggest_player_anim_always_forward (AnimID anim)
 
f32 get_xz_dist_to_player (f32 x, f32 z)
 
void enable_player_shadow (void)
 
void disable_player_shadow (void)
 
s32 disable_player_static_collisions (void)
 
s32 enable_player_static_collisions (void)
 
s32 disable_player_input (void)
 
s32 enable_player_input (void)
 
void func_800E01DC (void)
 
b32 check_player_action_debug (void)
 
void player_render_interact_prompts (void)
 
s32 has_valid_conversation_npc (void)
 
void func_800E06C0 (s32 arg0)
 
s32 func_800E06D8 (void)
 
void appendGfx_interact_prompt (void)
 
void render_player (void)
 
void render_player_model (void)
 

Variables

void(* ISpyNotificationCallback )(void)
 
void(* PulseStoneNotificationCallback )(void)
 
void(* TalkNotificationCallback )(void)
 
void(* InteractNotificationCallback )(void)
 
s32 D_8010C950
 
PlayerStatus gPlayerStatus
 
PlayerData gPlayerData
 
s32 WorldTattleInteractionID
 
f32 D_800F7B48 = 0.0f
 

Macro Definition Documentation

◆ inspect_icon_VRAM

#define inspect_icon_VRAM   (void*)0x802B7000

Definition at line 16 of file 77480.c.

◆ speech_bubble_VRAM

#define speech_bubble_VRAM   (void*)0x802B7000

Definition at line 17 of file 77480.c.

◆ pulse_stone_VRAM

#define pulse_stone_VRAM   (void*)0x802B7000

Definition at line 18 of file 77480.c.

◆ i_spy_VRAM

#define i_spy_VRAM   (void*)0x802B7000

Definition at line 19 of file 77480.c.

Function Documentation

◆ player_raycast_down()

HitID player_raycast_down ( f32 * x,
f32 * y,
f32 * z,
f32 * length )

Definition at line 205 of file 77480.c.

205 {
206 f32 hitX;
207 f32 hitY;
208 f32 hitZ;
209 f32 hitDepth;
210 f32 hitNx;
211 f32 hitNy;
212 f32 hitNz;
213 s32 entityID, colliderID;
214 Entity* entity;
215 s32 ret = NO_COLLIDER;
216
217 hitDepth = *length;
218 entityID = test_ray_entities(*x, *y, *z, 0.0f, -1.0f, 0.0f, &hitX, &hitY, &hitZ, &hitDepth, &hitNx, &hitNy, &hitNz);
219 if (entityID > NO_COLLIDER) {
220 entity = get_entity_by_index(entityID);
221 if (entity->alpha < 255) {
222 entity->collisionTimer = 4;
224 } else {
225 ret = entityID | COLLISION_WITH_ENTITY_BIT;
226 }
227 }
228
229 colliderID = test_ray_colliders(COLLIDER_FLAG_IGNORE_PLAYER, *x, *y, *z, 0, -1.0f, 0, &hitX, &hitY, &hitZ, &hitDepth, &hitNx, &hitNy, &hitNz);
230 if (colliderID > NO_COLLIDER) {
231 ret = colliderID;
232 }
233
234 if (ret > NO_COLLIDER) {
235 *length = hitDepth;
236 *x = hitX;
237 *y = hitY;
238 *z = hitZ;
244 gGameStatusPtr->playerGroundTraceAngles.x = atan2(0.0f, 0.0f, hitNz * 100.0, hitNy * 100.0);
246 gGameStatusPtr->playerGroundTraceAngles.z = atan2(0.0f, 0.0f, hitNx * 100.0, hitNy * 100.0);
247 } else {
251 }
252 return ret;
253}
Vec3f playerGroundTraceNormal
Vec3f playerGroundTraceAngles
#define atan2
@ COLLIDER_FLAG_IGNORE_PLAYER
Definition enums.h:4696
@ ENTITY_FLAG_CONTINUOUS_COLLISION
Definition enums.h:2619
Entity * get_entity_by_index(s32 index)
Definition entity.c:530
s32 test_ray_entities(f32 startX, f32 startY, f32 startZ, f32 dirX, f32 dirY, f32 dirZ, f32 *hitX, f32 *hitY, f32 *hitZ, f32 *hitDepth, f32 *hitNx, f32 *hitNy, f32 *hitNz)
Test a general ray from a given starting position and direction against all entities.
Definition collision.c:947
s32 test_ray_colliders(s32 ignoreFlags, f32 startX, f32 startY, f32 startZ, f32 dirX, f32 dirY, f32 dirZ, f32 *hitX, f32 *hitY, f32 *hitZ, f32 *hitDepth, f32 *hitNx, f32 *hitNy, f32 *hitNz)
Definition collision.c:768
f32 get_player_normal_pitch(void)
Definition 43F0.c:662
f32 get_player_normal_yaw(void)
Definition 43F0.c:658
#define COLLISION_WITH_ENTITY_BIT
Definition macros.h:152
#define NO_COLLIDER
Definition macros.h:156
s8 collisionTimer
GameStatus * gGameStatusPtr
Definition main_loop.c:32
f32 PlayerNormalPitch
Definition 7B440.c:10
f32 PlayerNormalYaw
Definition 7B440.c:9

Referenced by player_raycast_below().

◆ player_raycast_up_corner()

HitID player_raycast_up_corner ( f32 * x,
f32 * y,
f32 * z,
f32 * length )

Definition at line 324 of file 77480.c.

324 {
325 f32 hitX;
326 f32 hitY;
327 f32 hitZ;
328 f32 hitDepth;
329 f32 hitNx;
330 f32 hitNy;
331 f32 hitNz;
332 s32 hitID;
333 s32 ret;
334 f32 sx, sy, sz;
335 f32 sx2, sy2, sz2;
336
337 ret = NO_COLLIDER;
338
339 // needed to match
340 sx2 = sx = *x;
341 sy2 = sy = *y;
342 sz2 = sz = *z;
343 hitDepth = *length;
344 hitID = test_ray_colliders(COLLIDER_FLAG_IGNORE_PLAYER, sx, sy, sz, 0.0f, 1.0f, 0.0f, &hitX, &hitY, &hitZ, &hitDepth, &hitNx, &hitNy, &hitNz);
345 if (hitID > NO_COLLIDER && *length > hitDepth) {
346 *length = hitDepth;
347 ret = hitID;
348 *x = sx = sx2;
349 *y = sy = sy2;
350 *z = sz = sz2;
351 }
352
353 hitDepth = 10.0f;
354 hitID = test_ray_entities(*x, *y, *z, 0.0f, 1.0f, 0.0f, &hitX, &hitY, &hitZ, &hitDepth, &hitNx, &hitNy, &hitNz);
355 sx = sx2;
356 sy = sy2;
357 sz = sz2;
358 if (hitID > NO_COLLIDER && *length > hitDepth) {
359 get_entity_by_index(hitID);
360 ret = hitID | COLLISION_WITH_ENTITY_BIT;
361 *length = hitDepth;
362 *x = sx;
363 *y = sy;
364 *z = sz;
365 }
366
367 return ret;
368}

Referenced by player_raycast_up_corners().

◆ player_raycast_general()

HitID player_raycast_general ( s32 mode,
f32 startX,
f32 startY,
f32 startZ,
f32 dirX,
f32 dirY,
f32 dirZ,
f32 * hitX,
f32 * hitY,
f32 * hitZ,
f32 * hitDepth,
f32 * hitNx,
f32 * hitNy,
f32 * hitNz )

Definition at line 434 of file 77480.c.

435 {
436 f32 nAngleX;
437 f32 nAngleZ;
438 s32 entityID;
439 s32 colliderID;
440 Entity* entity;
441 s32 ignoreFlags;
442 s32 ret;
443
444 #if DX_DEBUG_MENU
445 if (dx_debug_is_cheat_enabled(DEBUG_CHEAT_IGNORE_WALLS)) {
446 return NO_COLLIDER;
447 }
448 #endif
449
450 entityID = test_ray_entities(startX, startY, startZ, dirX, dirY, dirZ, hitX, hitY, hitZ, hitDepth, hitNx, hitNy,
451 hitNz);
452 ret = NO_COLLIDER;
453 if (entityID > NO_COLLIDER) {
454 entity = get_entity_by_index(entityID);
455 if (entity->alpha < 255) {
456 entity->collisionTimer = 0;
458 } else {
459 ret = entityID | COLLISION_WITH_ENTITY_BIT;
460 }
461 } else if (mode == PLAYER_COLLISION_HAMMER) {
462 ret = test_ray_colliders(COLLIDER_FLAG_IGNORE_SHELL, startX, startY, startZ, dirX, dirY, dirZ,
463 hitX, hitY, hitZ, hitDepth, hitNx, hitNy, hitNz);
464 }
465
466 if (mode == PLAYER_COLLISION_1 || mode == PLAYER_COLLISION_HAMMER) {
467 return ret;
468 }
469
470 if (mode == PLAYER_COLLISION_4) {
471 ignoreFlags = COLLIDER_FLAG_DOCK_WALL;
472 } else {
473 ignoreFlags = COLLIDER_FLAG_IGNORE_PLAYER;
474 }
475
476 colliderID = test_ray_colliders(ignoreFlags, startX, startY, startZ, dirX, dirY, dirZ,
477 hitX, hitY, hitZ, hitDepth, hitNx, hitNy, hitNz);
478
479 if (ret <= NO_COLLIDER) {
480 ret = colliderID;
481 }
482
483 if (ret > NO_COLLIDER) {
484 nAngleZ = 180.0f - atan2(0, 0, *hitNz * 100.0, *hitNy * 100.0);
485 nAngleX = 180.0f - atan2(0, 0, *hitNx * 100.0, *hitNy * 100.0);
486
487 if (!((nAngleZ == 90.0f && nAngleX == 90.0f) || fabs(nAngleZ) >= 30.0 || fabs(nAngleX) >= 30.0)) {
488 ret = NO_COLLIDER;
489 }
490 }
491
492 return ret;
493}
@ COLLIDER_FLAG_DOCK_WALL
Definition enums.h:4699
@ COLLIDER_FLAG_IGNORE_SHELL
Definition enums.h:4695
@ PLAYER_COLLISION_HAMMER
Definition enums.h:4715
@ PLAYER_COLLISION_4
Definition enums.h:4716
@ PLAYER_COLLISION_1
Definition enums.h:4713
f64 fabs(f64 f)

Referenced by player_test_lateral_overlap(), player_test_move_with_slipping(), and player_test_move_without_slipping().

◆ player_get_slip_vector()

void player_get_slip_vector ( f32 * outX,
f32 * outY,
f32 x,
f32 y,
f32 nX,
f32 nY )

Definition at line 556 of file 77480.c.

556 {
557 f32 projectionLength = (x * nX) + (y * nY);
558
559 *outX = (x - projectionLength * nX) * 0.5f;
560 *outY = (y - projectionLength * nY) * 0.5f;
561}

Referenced by player_test_lateral_overlap(), player_test_move_with_slipping(), and player_test_move_without_slipping().

◆ phys_update_standard()

void phys_update_standard ( void )

Definition at line 737 of file 77480.c.

737 {
738 PlayerStatus* playerStatus = &gPlayerStatus;
739
742
743 #if DX_DEBUG_MENU
744 if (dx_debug_is_cheat_enabled(DEBUG_CHEAT_FLY) && playerStatus->curButtons & BUTTON_L) {
745 playerStatus->pos.y += 5.0f;
746 playerStatus->flags |= PS_FLAG_JUMPING;
747 }
748 #endif
749
750 if (!(playerStatus->flags & PS_FLAG_FLYING)) {
751 if (playerStatus->flags & PS_FLAG_JUMPING) {
753 }
754 }
755
756 if (playerStatus->flags & PS_FLAG_FALLING) {
757 if (!(playerStatus->flags & PS_FLAG_FLYING)) {
759 }
760 }
761
763
764 if (playerStatus->actionState != ACTION_STATE_SLIDING) {
767
769 && playerStatus->timeInAir == 0
770 && playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS
771 ) {
773 }
774
776 && playerStatus->actionState != ACTION_STATE_STEP_UP
777 ) {
779 }
780 }
781
782 if (playerStatus->animFlags & PA_FLAG_WATT_IN_HANDS) {
784 }
785
786 if (!(playerStatus->flags & PS_FLAG_CAMERA_DOESNT_FOLLOW)) {
787 gCameras[CAM_DEFAULT].targetPos.x = playerStatus->pos.x;
788 gCameras[CAM_DEFAULT].targetPos.y = playerStatus->pos.y;
789 gCameras[CAM_DEFAULT].targetPos.z = playerStatus->pos.z;
790 }
791}
PlayerStatus gPlayerStatus
Definition 77480.c:39
void check_input_use_partner(void)
Definition 77480.c:718
@ BUTTON_L
Definition enums.h:2782
@ PS_FLAG_FALLING
Definition enums.h:3036
@ PS_FLAG_JUMPING
Definition enums.h:3035
@ PS_FLAG_CAMERA_DOESNT_FOLLOW
Definition enums.h:3075
@ PS_FLAG_FLYING
Definition enums.h:3037
@ PA_FLAG_WATT_IN_HANDS
Definition enums.h:3092
@ PA_FLAG_USING_PEACH_PHYSICS
Definition enums.h:3103
@ ACTION_STATE_SLIDING
Definition enums.h:2445
@ ACTION_STATE_ENEMY_FIRST_STRIKE
Definition enums.h:2455
@ ACTION_STATE_STEP_UP
Definition enums.h:2462
@ CAM_DEFAULT
Definition enums.h:1800
void phys_update_action_state(void)
Definition 7E9D0.c:112
void phys_update_falling(void)
Definition 7BB60.c:316
void phys_main_collision_below(void)
Definition 7BB60.c:863
void collision_check_player_overlaps(void)
Definition 7BB60.c:813
void collision_lateral_peach(void)
Definition 7BB60.c:1057
void collision_main_lateral(void)
Definition 7BB60.c:494
void phys_update_jump(void)
Definition 7BB60.c:199
void check_input_midair_jump(void)
Definition 7BB60.c:1079
HitID collision_main_above(void)
Definition 7BB60.c:68
Vec3f targetPos
Camera gCameras[4]
Definition cam_main.c:17
void world_watt_sync_held_position(void)

Referenced by update_player().

◆ phys_update_lava_reset()

void phys_update_lava_reset ( void )

Definition at line 793 of file 77480.c.

793 {
797
799 Camera* camera = &gCameras[CAM_DEFAULT];
800
801 camera->targetPos.x = gPlayerStatusPtr->pos.x;
802 camera->targetPos.y = gPlayerStatusPtr->pos.y;
803 camera->targetPos.z = gPlayerStatusPtr->pos.z;
804 }
805}
void collision_lava_reset_check_additional_overlaps(void)
Definition 7BB60.c:990
PlayerStatus * gPlayerStatusPtr

Referenced by update_player().

◆ update_player_blink()

void update_player_blink ( void )

Definition at line 924 of file 77480.c.

924 {
925 PlayerStatus* playerStatus = &gPlayerStatus;
926 s32 outtaSight = FALSE;
927
930 }
931
932 if (playerStatus->blinkTimer > 0) {
933 playerStatus->blinkTimer--;
934
935 if (!(gGameStatusPtr->frameCounter & 1)) {
936 if (outtaSight) {
937 playerStatus->curAlpha = 192;
938 } else {
939 playerStatus->curAlpha = 255;
940 }
941 } else {
942 playerStatus->curAlpha = 96;
943 }
944
945 if (!playerStatus->blinkTimer) {
946 if (outtaSight) {
947 playerStatus->curAlpha = 128;
948 playerStatus->flags |= PS_FLAG_HAZARD_INVINCIBILITY;
949 } else {
950 playerStatus->curAlpha = 255;
951 playerStatus->flags &= ~PS_FLAG_HAZARD_INVINCIBILITY;
952 }
953 } else {
954 playerStatus->flags |= PS_FLAG_HAZARD_INVINCIBILITY;
955 }
956 }
957}
@ PS_FLAG_HAZARD_INVINCIBILITY
Definition enums.h:3056
@ PARTNER_ACTION_NONE
Definition enums.h:2932
@ PARTNER_BOW
Definition enums.h:2894
PartnerStatus gPartnerStatus
Definition partners.c:42

Referenced by update_player().

◆ check_for_ispy()

void check_for_ispy ( void )

Definition at line 1035 of file 77480.c.

1035 {
1036 PlayerStatus* playerStatus = &gPlayerStatus;
1037
1039 if (!(playerStatus->animFlags &
1041 DMA_COPY_SEGMENT(i_spy);
1043 }
1044 }
1045
1046 if (ISpyNotificationCallback != NULL) {
1048 }
1049}
void(* ISpyNotificationCallback)(void)
Definition 77480.c:33
@ PA_FLAG_SPEECH_PROMPT_AVAILABLE
(...) prompt
Definition enums.h:3096
@ PA_FLAG_INTERACT_PROMPT_AVAILABLE
! prompt
Definition enums.h:3095
void ispy_notification_setup(void)
Definition i_spy.c:91
#define DMA_COPY_SEGMENT(segment)
Definition macros.h:525
HiddenPanelsData gCurrentHiddenPanels
Definition entity.c:36

Referenced by update_player().

◆ render_ispy_icon()

void render_ispy_icon ( void )

Definition at line 1051 of file 77480.c.

1051 {
1054 }
1055}
@ PA_FLAG_ISPY_VISIBLE
The I Spy icon is being shown.
Definition enums.h:3099
void appendGfx_ispy_icon(void)
Definition i_spy.c:34

Referenced by player_render_interact_prompts().

◆ check_for_pulse_stone()

void check_for_pulse_stone ( void )

unavoidable use of hardcoded map and area IDs

Definition at line 1063 of file 77480.c.

1063 {
1064 s32 dx, dy;
1065
1066 if (PulseStoneNotificationCallback == NULL) {
1068 return;
1069 }
1070
1072 return;
1073 }
1074
1075 dx = abs(gGameStatusPtr->mapID % 7 - 2);
1076 dy = gGameStatusPtr->mapID / 7;
1077 if ((dx + dy) > 5) {
1078 return;
1079 }
1080
1082 return;
1083 }
1084
1086 return;
1087 }
1088
1090 DMA_COPY_SEGMENT(pulse_stone);
1092 }
1093 }
1094
1095 if (PulseStoneNotificationCallback != NULL) {
1097 }
1098}
void(* PulseStoneNotificationCallback)(void)
Definition 77480.c:34
@ PS_FLAG_PAUSED
Definition enums.h:3040
@ AREA_SBK
Definition enums.h:2970
@ PA_FLAG_PULSE_STONE_VISIBLE
The pulse stone icon is being shown.
Definition enums.h:3097
@ PA_FLAG_USING_PULSE_STONE
Definition enums.h:3098
@ CONTEXT_WORLD
Definition enums.h:3529
void pulse_stone_notification_setup(void)
Definition pulse_stone.c:71

Referenced by update_player().

◆ clear_ispy_icon()

void clear_ispy_icon ( void )

Definition at line 1057 of file 77480.c.

1057 {
1059 gPlayerStatusPtr->animFlags &= ~PA_FLAG_ISPY_VISIBLE;
1060}

Referenced by player_reset_data().

◆ render_pulse_stone_icon()

void render_pulse_stone_icon ( void )

Definition at line 1100 of file 77480.c.

1100 {
1103 }
1104}
void appendGfx_pulse_stone_icon(void)
Definition pulse_stone.c:82

Referenced by player_render_interact_prompts().

◆ clear_pulse_stone_icon()

void clear_pulse_stone_icon ( void )

Definition at line 1106 of file 77480.c.

1106 {
1108 gPlayerStatusPtr->animFlags &= ~PA_FLAG_PULSE_STONE_VISIBLE;
1109}

Referenced by player_reset_data().

◆ check_for_conversation_prompt()

void check_for_conversation_prompt ( void )

Definition at line 1124 of file 77480.c.

1124 {
1126 return;
1127 }
1128
1129 if (TalkNotificationCallback == NULL) {
1131 return;
1132 }
1133
1136 DMA_COPY_SEGMENT(speech_bubble);
1138 } else {
1140 return;
1141 }
1142 }
1143
1144 if (TalkNotificationCallback != NULL) {
1146 }
1147}
s32 has_valid_conversation_npc(void)
Definition 77480.c:1111
void(* TalkNotificationCallback)(void)
Definition 77480.c:35
void(* InteractNotificationCallback)(void)
Definition 77480.c:36
void interact_speech_setup(void)

Referenced by update_player().

◆ render_conversation_prompt()

void render_conversation_prompt ( void )

Definition at line 1149 of file 77480.c.

1149 {
1152 }
1153}
void appendGfx_speech_bubble(void)

Referenced by player_render_interact_prompts().

◆ clear_conversation_prompt()

void clear_conversation_prompt ( void )

Definition at line 1155 of file 77480.c.

1155 {
1157 gPlayerStatusPtr->animFlags &= ~PA_FLAG_SPEECH_PROMPT_AVAILABLE;
1158}

Referenced by player_reset_data().

◆ check_for_interactables()

void check_for_interactables ( void )

Definition at line 1207 of file 77480.c.

1207 {
1208 PlayerStatus* playerStatus = &gPlayerStatus;
1210 b32 collidingWithEntity = FALSE;
1211
1213 return;
1214 }
1215
1216 if (InteractNotificationCallback == NULL) {
1217 s32 curInteraction = gCollisionStatus.curWall;
1218
1219 if (playerStatus->inputDisabledCount != 0) {
1220 if (gPlayerStatus.interactingWithID != curInteraction) {
1221 gPlayerStatus.interactingWithID = curInteraction;
1222 }
1223 return;
1224 }
1225
1226 if (playerStatus->timeInAir != 0) {
1227 return;
1228 }
1229
1230 if (curInteraction == NO_COLLIDER) {
1231 s32 floor = gCollisionStatus.curFloor;
1232
1233 if ((floor > NO_COLLIDER) && (floor & COLLISION_WITH_ENTITY_BIT)) {
1234 collidingWithEntity = TRUE;
1235 curInteraction = floor;
1236 switch (get_entity_type(floor)) {
1242 case ENTITY_TYPE_CHEST:
1244 curInteraction = NO_COLLIDER;
1245 break;
1246 }
1247 } else if (
1248 (!(playerStatus->flags & PS_FLAG_INPUT_DISABLED))
1249 && (playerStatus->flags & PS_FLAG_HAS_CONVERSATION_NPC)
1250 && (npc != NULL)
1252 ) {
1253 curInteraction = npc->npcID | COLLISION_WITH_NPC_BIT;
1254 if (playerStatus->interactingWithID == curInteraction) {
1255 return;
1256 }
1257 } else {
1258 playerStatus->interactingWithID = NO_COLLIDER;
1259 playerStatus->flags &= ~PS_FLAG_INTERACTED;
1260 return;
1261 }
1262 } else {
1263 if (curInteraction & COLLISION_WITH_ENTITY_BIT) {
1264 collidingWithEntity = TRUE;
1265 if (!phys_can_player_interact()) {
1266 playerStatus->interactingWithID = NO_COLLIDER;
1267 playerStatus->flags &= ~PS_FLAG_INTERACTED;
1268 return;
1269 }
1270 } else {
1271 if (!(curInteraction & COLLISION_WITH_NPC_BIT)) {
1272 if (!should_collider_allow_interact(curInteraction)) {
1273 playerStatus->interactingWithID = NO_COLLIDER;
1274 playerStatus->flags &= ~PS_FLAG_INTERACTED;
1275 return;
1276 }
1277 }
1278 }
1279 }
1280 if (playerStatus->interactingWithID == curInteraction) {
1281 if ((playerStatus->flags & PS_FLAG_INTERACTED)) {
1282 return;
1283 }
1284 } else {
1285 playerStatus->flags &= ~PS_FLAG_INTERACTED;
1286 }
1287
1288 playerStatus->interactingWithID = curInteraction;
1289 if (!collidingWithEntity || (curInteraction > NO_COLLIDER && get_entity_by_index(curInteraction)->flags & ENTITY_FLAG_SHOWS_INSPECT_PROMPT)) {
1290 if (playerStatus->actionState == ACTION_STATE_IDLE || playerStatus->actionState == ACTION_STATE_WALK || playerStatus->actionState == ACTION_STATE_RUN) {
1292 func_800EF3D4(2);
1293 }
1294 }
1295 }
1296
1297 if (!(playerStatus->animFlags & PA_FLAG_INTERACT_PROMPT_AVAILABLE)) {
1298 func_800EF3D4(0);
1300 return;
1301 }
1302
1303 if (InteractNotificationCallback == NULL) {
1304 DMA_COPY_SEGMENT(inspect_icon);
1306
1307 }
1308
1309 if (InteractNotificationCallback != NULL) {
1311 }
1312}
s32 b32
s8 flags
Definition demo_api.c:15
@ PS_FLAG_INTERACTED
Definition enums.h:3077
@ PS_FLAG_INPUT_DISABLED
Definition enums.h:3052
@ PS_FLAG_HAS_CONVERSATION_NPC
Definition enums.h:3074
@ ENTITY_TYPE_PUSH_BLOCK
Definition enums.h:2555
@ ENTITY_TYPE_PADLOCK
Definition enums.h:2546
@ ENTITY_TYPE_SIGNPOST
Definition enums.h:2588
@ ENTITY_TYPE_CHEST
Definition enums.h:2587
@ ENTITY_TYPE_PADLOCK_RED_FACE
Definition enums.h:2548
@ ENTITY_TYPE_PADLOCK_RED_FRAME
Definition enums.h:2547
@ ENTITY_TYPE_PADLOCK_BLUE_FACE
Definition enums.h:2549
@ ENTITY_FLAG_SHOWS_INSPECT_PROMPT
Definition enums.h:2625
@ ACTION_STATE_IDLE
Definition enums.h:2426
@ ACTION_STATE_WALK
Definition enums.h:2427
@ ACTION_STATE_RUN
Definition enums.h:2428
@ NPC_FLAG_USE_INSPECT_ICON
Definition enums.h:3026
s32 phys_can_player_interact(void)
Definition 7BB60.c:1159
void func_800EF3D4(s32)
Definition partners.c:2414
void interact_inspect_setup(void)
u32 get_entity_type(s32 arg0)
Definition entity.c:568
s32 should_collider_allow_interact(s32)
Definition trigger.c:281
void partner_reset_tether_distance(void)
Definition partners.c:2405
#define COLLISION_WITH_NPC_BIT
Definition macros.h:151
s32 flags
CollisionStatus gCollisionStatus
Definition 7BB60.c:6

Referenced by update_player().

◆ render_interact_prompt()

void render_interact_prompt ( void )

Definition at line 1316 of file 77480.c.

1316 {
1319 }
1320}
void appendGfx_interact_prompt(void)

Referenced by player_render_interact_prompts().

◆ clear_interact_prompt()

void clear_interact_prompt ( void )

Definition at line 1322 of file 77480.c.

1322 {
1324 gPlayerStatusPtr->animFlags &= ~PA_FLAG_INTERACT_PROMPT_AVAILABLE;
1325}

Referenced by player_reset_data().

◆ update_partner_timers()

void update_partner_timers ( void )

Definition at line 1329 of file 77480.c.

1329 {
1330 PlayerData* playerData = &gPlayerData;
1331
1333 s32 i;
1334
1335 for (i = 1; i < ARRAY_COUNT(playerData->partnerUnlockedTime); i++) {
1336 if (playerData->partners[i].enabled) {
1337 playerData->partnerUnlockedTime[i]++;
1338 }
1339 }
1340 }
1341}
PlayerData gPlayerData
Definition 77480.c:40
PartnerData partners[12]
s32 partnerUnlockedTime[12]
#define ARRAY_COUNT(arr)
Definition macros.h:40

Referenced by update_player().

◆ player_update_sprite()

void player_update_sprite ( void )

Definition at line 1347 of file 77480.c.

1347 {
1348 PlayerStatus* playerStatus = &gPlayerStatus;
1349 f32 cameraYaw = gCameras[gCurrentCameraID].curYaw;
1350 f32 camRelativeYaw = get_clamped_angle_diff(cameraYaw, playerStatus->curYaw);
1351 s32 trueAnim;
1352 s32 sprIndex;
1353 f32 angle;
1354 s32 direction;
1355 f32 timescale;
1356
1357 D_800F7B48 = 0.0f;
1358 if (camRelativeYaw < -5.0f && camRelativeYaw > -175.0f) {
1359 camRelativeYaw = 0.0f;
1360 direction = 0;
1361 } else if (camRelativeYaw > 5.0f && camRelativeYaw < 175.0f) {
1362 camRelativeYaw = 180.0f;
1363 direction = 1;
1364 } else {
1365 // direction is close to flipping, use saved value
1366 camRelativeYaw = PrevPlayerCamRelativeYaw;
1367 direction = 2;
1368 }
1369 // detect direction change
1370 if (PrevPlayerDirection != direction && direction != 2) {
1371 PrevPlayerDirection = direction;
1372 playerStatus->flipYaw[gCurrentCameraID] = (direction != 0) ? 180.0f : -180.0f;
1373
1374 if (fabsf(get_clamped_angle_diff(cameraYaw, playerStatus->curYaw)) >= 90.0f) {
1375 playerStatus->flipYaw[gCurrentCameraID] = -playerStatus->flipYaw[gCurrentCameraID];
1376 }
1377 }
1378 // handle sprite 'flipping' when changing direction
1379 angle = playerStatus->flipYaw[gCurrentCameraID];
1380 if (angle != 0.0f) {
1381 if (angle < 0.0f) {
1382 angle += 28.0f;
1383 if (angle > 0.0f) {
1384 angle = 0.0f;
1385 }
1386 }
1387 if (angle > 0.0f) {
1388 angle -= 28.0f;
1389 if (angle < 0.0f) {
1390 angle = 0.0f;
1391 }
1392 }
1393 }
1394
1395 if (playerStatus->flags & PS_FLAG_NO_FLIPPING) {
1396 angle = 0.0f;
1397 }
1398
1399 playerStatus->flipYaw[gCurrentCameraID] = angle;
1400
1401 PrevPlayerCamRelativeYaw = angle = clamp_angle(camRelativeYaw);
1402 angle = clamp_angle(playerStatus->flipYaw[gCurrentCameraID] + angle);
1403 if (playerStatus->curSpeed == 0.0f) {
1404 D_800F7B48 = 0.0f;
1405 }
1406
1407 trueAnim = playerStatus->anim;
1408 if (!(playerStatus->flags & PS_FLAG_SPINNING)) {
1409 sprIndex = (playerStatus->anim >> 0x10) & 0xFF;
1410
1411 if (playerStatus->actionState == ACTION_STATE_TORNADO_JUMP || playerStatus->flags & PS_FLAG_ROTATION_LOCKED) {
1412 if (!(playerStatus->flags & PS_FLAG_FACE_FORWARD)
1413 && (sprIndex == SPR_Mario1 || sprIndex == SPR_MarioW1 || sprIndex == SPR_Peach1)
1414 && playerStatus->spriteFacingAngle < 350.0f && playerStatus->spriteFacingAngle > 190.0f
1415 ) {
1416 trueAnim = get_player_back_anim(trueAnim);
1417 }
1418 } else {
1419 playerStatus->spriteFacingAngle = angle + D_800F7B48;
1420 if (!(playerStatus->flags & PS_FLAG_FACE_FORWARD)
1421 && (sprIndex == SPR_Mario1 || sprIndex == SPR_MarioW1 || sprIndex == SPR_Peach1)
1422 && fabsf(get_clamped_angle_diff(cameraYaw, playerStatus->curYaw)) < 60.0f
1423 ) {
1424 trueAnim = get_player_back_anim(trueAnim);
1425 }
1426 playerStatus->curYaw = playerStatus->targetYaw;
1427 }
1428 }
1429 playerStatus->trueAnimation = trueAnim;
1430
1431 timescale = 1.0f;
1432 if (playerStatus->flags & PS_FLAG_ENTERING_BATTLE) {
1433 timescale = 0.5f;
1434 }
1435 if (playerStatus->flags & PS_FLAG_TIME_STOPPED) {
1436 timescale = 0.0f;
1437 }
1438 playerStatus->animNotifyValue = spr_update_player_sprite(PLAYER_SPRITE_MAIN, playerStatus->trueAnimation, timescale);
1439 playerStatus->flags |= PS_FLAG_SPRITE_REDRAW;
1440}
f32 D_800F7B48
Definition 77480.c:1345
s32 get_player_back_anim(s32 arg0)
Definition 77480.c:1442
AnimID trueAnimation
Encoding back-facing sprite.
#define clamp_angle
@ PS_FLAG_TIME_STOPPED
Definition enums.h:3081
@ PS_FLAG_ENTERING_BATTLE
Definition enums.h:3061
@ PS_FLAG_ROTATION_LOCKED
Definition enums.h:3065
@ PS_FLAG_NO_FLIPPING
Definition enums.h:3067
@ PS_FLAG_SPINNING
Definition enums.h:3058
@ PS_FLAG_FACE_FORWARD
Definition enums.h:3079
@ PS_FLAG_SPRITE_REDRAW
Definition enums.h:3083
@ ACTION_STATE_TORNADO_JUMP
Definition enums.h:2443
f32 fabsf(f32 f)
f32 get_clamped_angle_diff(f32, f32)
Definition 43F0.c:606
s32 spr_update_player_sprite(s32 spriteInstanceID, s32 animID, f32 timeScale)
Definition sprite.c:823
@ PLAYER_SPRITE_MAIN
Definition sprite.h:26
s32 PrevPlayerDirection
Definition 7B440.c:7
s32 PrevPlayerCamRelativeYaw
Definition 7E9D0.c:31
s32 gCurrentCameraID
Definition cam_math.c:4

Referenced by update_player().

◆ get_player_back_anim()

s32 get_player_back_anim ( s32 arg0)

Definition at line 1442 of file 77480.c.

1442 {
1443 s32 sprIndex = (anim >> 16) & 0xff;
1444 s32 outAnim = 0;
1445
1446 if (sprIndex != SPR_Mario1) {
1447 if (sprIndex != SPR_MarioW1 && sprIndex != SPR_Peach1) {
1448 return anim;
1449 }
1450
1451 if (sprIndex == SPR_Mario1) {
1452 if (anim > ANIM_Mario1_SpinFall) {
1453 return anim;
1454 }
1455 } else if (sprIndex == SPR_MarioW1) {
1456 if (anim == ANIM_MarioW1_Lift) {
1457 outAnim = ANIM_MarioW1_Lift_Back;
1458 } else if (anim == ANIM_MarioW1_Toss) {
1459 outAnim = ANIM_MarioW1_Toss_Back;
1460 } else if (anim == ANIM_MarioW1_Smash1_Miss) {
1461 outAnim = ANIM_MarioW1_Smash1_Miss_Back;
1462 } else if (anim == ANIM_MarioW1_Smash1_Hit) {
1463 outAnim = ANIM_MarioW1_Smash1_Hit_Back;
1464 } else if (anim == ANIM_MarioW1_Smash2_Miss) {
1465 outAnim = ANIM_MarioW1_Smash2_Miss_Back;
1466 } else if (anim == ANIM_MarioW1_Smash2_Hit) {
1467 outAnim = ANIM_MarioW1_Smash2_Hit_Back;
1468 } else if (anim == ANIM_MarioW1_Smash3_Miss) {
1469 outAnim = ANIM_MarioW1_Smash3_Miss_Back;
1470 } else if (anim == ANIM_MarioW1_Smash3_Hit) {
1471 outAnim = ANIM_MarioW1_Smash3_Hit_Back;
1472 }
1473 } else if (sprIndex == SPR_Peach1) {
1474 if (anim > ANIM_Peach1_StepDown) {
1475 outAnim = anim + 1;
1476 }
1477 }
1478 } else if (anim > ANIM_Mario1_SpinFall) {
1479 return anim;
1480 }
1481
1482 if (outAnim != 0) {
1483 return outAnim;
1484 } else {
1485 return anim | SPRITE_ID_BACK_FACING;
1486 }
1487}
@ SPRITE_ID_BACK_FACING
Definition sprite.h:13

Referenced by player_update_sprite().

◆ appendGfx_player()

void appendGfx_player ( void * data)

Definition at line 1544 of file 77480.c.

1544 {
1545 PlayerStatus* playerStatus = &gPlayerStatus;
1546 Matrix4f sp20, sp60, spA0, spE0;
1547 f32 temp_f0 = -gCameras[gCurrentCamID].curYaw;
1548 s32 spriteIdx;
1549
1550 if (playerStatus->actionState == ACTION_STATE_SLIDING) {
1552 guRotateF(sp20, temp_f0, 0.0f, 1.0f, 0.0f);
1553 guMtxCatF(spE0, sp20, sp20);
1554 guRotateF(spA0, playerStatus->spriteFacingAngle, 0.0f, 1.0f, 0.0f);
1555 guMtxCatF(sp20, spA0, sp20);
1556 guTranslateF(sp60, playerStatus->pos.x, playerStatus->pos.y - 1.0f, playerStatus->pos.z);
1557 guMtxCatF(sp20, sp60, sp20);
1559 } else {
1560 guRotateF(spA0, temp_f0, 0.0f, -1.0f, 0.0f);
1561 guRotateF(sp20, clamp_angle(playerStatus->pitch), 0.0f, 0.0f, 1.0f);
1562 guMtxCatF(spA0, sp20, sp20);
1563 guTranslateF(sp60, 0.0f, -playerStatus->colliderHeight * 0.5f, 0.0f);
1564 guMtxCatF(sp60, sp20, sp20);
1565 guRotateF(spA0, temp_f0, 0.0f, 1.0f, 0.0f);
1566 guMtxCatF(sp20, spA0, sp20);
1567 guRotateF(spA0, playerStatus->spriteFacingAngle, 0.0f, 1.0f, 0.0f);
1568 guMtxCatF(sp20, spA0, sp20);
1569 guTranslateF(sp60, 0.0f, playerStatus->colliderHeight * 0.5f, 0.0f);
1570 guMtxCatF(sp20, sp60, sp20);
1572 guMtxCatF(sp20, spE0, sp20);
1573 guTranslateF(sp60, playerStatus->pos.x, playerStatus->pos.y, playerStatus->pos.z);
1574 guMtxCatF(sp20, sp60, sp20);
1575
1576 if (playerStatus->animFlags & PA_FLAG_SHIVERING) {
1577 playerStatus->animFlags = playerStatus->animFlags & ~PA_FLAG_SHIVERING;
1578 playerStatus->shiverTime = 22;
1580 set_player_imgfx_all(playerStatus->anim, IMGFX_SET_ANIM, IMGFX_ANIM_SHIVER, 1, 1, 0, 0);
1581 }
1582
1583 if (playerStatus->shiverTime != 0) {
1584 playerStatus->shiverTime--;
1585 if (playerStatus->shiverTime == 0) {
1587 }
1588 }
1589
1590 if (playerStatus->spriteFacingAngle >= 90.0f && playerStatus->spriteFacingAngle < 270.0f) {
1592 } else {
1593 spriteIdx = PLAYER_SPRITE_MAIN;
1594 }
1595
1596 spr_draw_player_sprite(spriteIdx, 0, 0, 0, sp20);
1597 }
1598}
f32 Matrix4f[4][4]
#define guRotateF
#define guTranslateF
#define guMtxCatF
#define guScaleF
@ IMGFX_CLEAR
Definition enums.h:5117
@ IMGFX_SET_ANIM
Definition enums.h:5122
@ IMGFX_ANIM_SHIVER
Definition enums.h:5139
@ PA_FLAG_SHIVERING
Definition enums.h:3101
#define SPRITE_WORLD_SCALE_D
Definition macros.h:140
void set_player_imgfx_all(s32 animID, ImgFXType imgfxType, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6)
Definition sprite.c:995
s32 spr_draw_player_sprite(s32 spriteInstanceID, s32 yaw, s32 alphaIn, PAL_PTR *paletteList, Matrix4f mtx)
Definition sprite.c:872
void set_player_imgfx_comp(s32 spriteIdx, s32 compIdx, ImgFXType imgfx, s32 imgfxArg1, s32 imgfxArg2, s32 imgfxArg3, s32 imgfxArg4, s32 flags)
Definition sprite.c:969
@ DRAW_SPRITE_UPSIDE_DOWN
Definition sprite.h:19
s16 gCurrentCamID
Definition cam_main.c:13

Referenced by render_player_model().

◆ appendGfx_player_spin()

void appendGfx_player_spin ( void * data)

Only used when speedy spinning.

Definition at line 1601 of file 77480.c.

1601 {
1602 PlayerStatus* playerStatus = &gPlayerStatus;
1603 Matrix4f mtx;
1604 Matrix4f translation;
1605 Matrix4f rotation;
1606 Matrix4f scale;
1607 f32 yaw;
1608 f32 blurAngle;
1609 s32 tint;
1610 f32 px, py, pz;
1611 s32 x, y, z;
1612 s32 i;
1613 s32 spriteIdx;
1614
1615 for (i = 0; i < 2; i++) {
1617
1618 if (i == 0) {
1619 if (playerStatus->spriteFacingAngle > 90.0f && playerStatus->spriteFacingAngle <= 180.0f) {
1620 yaw = 180.0f - playerStatus->spriteFacingAngle;
1621 } else {
1622 if (playerStatus->spriteFacingAngle > 180.0f && playerStatus->spriteFacingAngle <= 270.0f) {
1623 yaw = playerStatus->spriteFacingAngle - 180.0f;
1624 } else if (playerStatus->spriteFacingAngle > 270.0f && playerStatus->spriteFacingAngle <= 360.0f) {
1625 yaw = 360.0f - playerStatus->spriteFacingAngle;
1626 } else {
1627 yaw = playerStatus->spriteFacingAngle;
1628 }
1629 }
1630
1631 tint = yaw / 25.0f;
1632 tint = 255 - (tint * 60);
1633 if (tint < 100) {
1634 tint = 100;
1635 }
1636
1637 set_player_imgfx_all(PLAYER_SPRITE_MAIN, IMGFX_SET_COLOR, tint, tint, tint, 255, 0);
1638
1639 guRotateF(rotation, yaw, 0.0f, -1.0f, 0.0f);
1640 guRotateF(mtx, clamp_angle(playerStatus->pitch), 0.0f, 0.0f, 1.0f);
1641 guMtxCatF(rotation, mtx, mtx);
1642 px = playerStatus->pos.x;
1643 py = playerStatus->pos.y;
1644 pz = playerStatus->pos.z;
1645 } else {
1646 blurAngle = phys_get_spin_history(i, &x, &y, &z);
1647
1648 if (y == 0x80000000) {
1649 py = playerStatus->pos.y;
1650 } else {
1651 py = y;
1652 }
1653
1654 px = playerStatus->pos.x;
1655 pz = playerStatus->pos.z;
1657 guRotateF(mtx, yaw, 0.0f, -1.0f, 0.0f);
1658 guRotateF(rotation, yaw, 0.0f, -1.0f, 0.0f);
1659 guRotateF(mtx, blurAngle, 0.0f, 1.0f, 0.0f);
1660 guMtxCatF(rotation, mtx, mtx);
1661 }
1662
1663 guTranslateF(translation, 0.0f, -playerStatus->colliderHeight * 0.5f, 0.0f);
1664 guMtxCatF(translation, mtx, mtx);
1665 guRotateF(rotation, yaw, 0.0f, 1.0f, 0.0f);
1666 guMtxCatF(mtx, rotation, mtx);
1667 guRotateF(rotation, playerStatus->spriteFacingAngle, 0.0f, 1.0f, 0.0f);
1668 guMtxCatF(mtx, rotation, mtx);
1669 guTranslateF(translation, 0.0f, playerStatus->colliderHeight * 0.5f, 0.0f);
1670 guMtxCatF(mtx, translation, mtx);
1672 guMtxCatF(mtx, scale, mtx);
1673 guTranslateF(translation, px, py, pz);
1674 guMtxCatF(mtx, translation, mtx);
1675
1676 if (playerStatus->spriteFacingAngle >= 90.0f && playerStatus->spriteFacingAngle < 270.0f) {
1678 } else {
1679 spriteIdx = PLAYER_SPRITE_MAIN;
1680 }
1681
1682 spr_draw_player_sprite(spriteIdx, 0, 0, 0, mtx);
1683 }
1684}
@ IMGFX_SET_ALPHA
Definition enums.h:5124
@ IMGFX_SET_COLOR
Definition enums.h:5123
f32 phys_get_spin_history(s32 lag, s32 *x, s32 *y, s32 *z)
Definition 7E9D0.c:82

Referenced by render_player_model().

◆ update_player_shadow()

void update_player_shadow ( void )

Definition at line 1686 of file 77480.c.

1686 {
1687 PlayerStatus* playerStatus = &gPlayerStatus;
1689 Camera* camera = &gCameras[gCurrentCameraID];
1690 f32 shadowScale = 0.0f;
1691 f32 yawTemp = 0.0f;
1692 f32 hitDirX, hitDirZ;
1693 f32 hitRx, hitRz;
1694 f32 x, y, z;
1695 f32 playerX, playerZ;
1696 f32 raycastYaw;
1697
1698 if (playerStatus->spriteFacingAngle >= 90.0f && playerStatus->spriteFacingAngle < 270.0f) {
1699 yawTemp = 180.0f;
1700 }
1701
1702 raycastYaw = (yawTemp - 90.0f) + gCameras[gCurrentCameraID].curYaw;
1703 shadow->pos.x = playerX = playerStatus->pos.x;
1704 shadow->pos.z = playerZ = playerStatus->pos.z;
1705 x = playerX;
1706 y = playerStatus->pos.y + (playerStatus->colliderHeight / 3.5f);
1707 z = playerZ;
1708 shadowScale = 1024.0f;
1709 gCollisionStatus.floorBelow = player_raycast_below(raycastYaw, playerStatus->colliderDiameter, &x, &y, &z,
1710 &shadowScale, &hitRx, &hitRz, &hitDirX, &hitDirZ);
1711 shadow->rot.x = hitRx;
1712 shadow->rot.z = hitRz;
1713 shadow->rot.y = clamp_angle(-camera->curYaw);
1714 hitRx += 180.0f;
1715 hitRz += 180.0f;
1716
1717 if (hitRx != 0.0f || hitRz != 0.0f) {
1718 s32 dist = dist2D(x, z, playerStatus->pos.x, playerStatus->pos.z);
1719 f32 tan = atan2(playerStatus->pos.x, playerStatus->pos.z, x, z);
1720 s32 angleTemp = clamp_angle((-90.0f - tan) + get_player_normal_yaw());
1721
1724 gGameStatusPtr->playerGroundTraceNormal.y * dist * sin_deg(angleTemp);
1725 }
1726 }
1727
1728 shadow->pos.y = y;
1729 shadow->alpha = (f64)playerStatus->curAlpha / 2;
1730
1732 set_peach_shadow_scale(shadow, shadowScale);
1733 } else {
1734 set_standard_shadow_scale(shadow, shadowScale);
1735 }
1736}
HitID player_raycast_below(f32 yaw, f32 diameter, f32 *outX, f32 *outY, f32 *outZ, f32 *outLength, f32 *hitRx, f32 *hitRz, f32 *hitDirX, f32 *hitDirZ)
Definition 77480.c:71
#define sqrtf
#define sin_deg
@ PEACH_FLAG_IS_PEACH
Definition enums.h:2488
void set_standard_shadow_scale(Shadow *shadow, f32 scale)
Definition entity.c:1674
Shadow * get_shadow_by_index(s32 index)
Definition entity.c:534
f32 dist2D(f32 ax, f32 ay, f32 bx, f32 by)
Definition 43F0.c:670
void set_peach_shadow_scale(Shadow *shadow, f32 scale)
Definition entity.c:1705
#define SQ(x)
Definition macros.h:166

Referenced by update_player().

◆ partner_use_ability()

s32 partner_use_ability ( void )

Definition at line 964 of file partners.c.

964 {
965 PartnerStatus* partnerStatus = &gPartnerStatus;
966
968 && wPartner != NULL
970 {
971 if (gGameStatusPtr->multiplayerEnabled && (partnerStatus->curButtons & BUTTON_B)) {
973 } else if (wCurrentPartnerId != PARTNER_NONE) {
974 D_8010CFE0 = 1;
977 return TRUE;
978 }
979 }
980 return FALSE;
981}
@ BUTTON_B
Definition enums.h:2789
@ SOUND_MENU_ERROR
Definition enums.h:933
@ PARTNER_NONE
Definition enums.h:2885
@ PARTNER_CMD_USE_ABILITY
Definition enums.h:2953
s32 is_starting_conversation(void)
Definition encounter.c:2818
PartnerStatus gPartnerStatus
Definition partners.c:42
BSS s32 NextPartnerCommand
Definition partners.c:61
BSS s32 wCurrentPartnerId
Definition partners.c:57
BSS WorldPartner * wPartner
Definition partners.c:62
BSS s32 D_8010CFE0
Definition partners.c:59
void _use_partner_ability(void)
Definition partners.c:625
Npc * wPartnerNpc
Definition partners.c:43
PartnerBoolFunc canUseAbility
Definition partners.h:20
void sfx_play_sound(s32 soundID)
Definition sfx.c:517

Referenced by check_input_use_partner(), post_battle(), post_battle(), post_battle(), post_battle(), and post_battle().

◆ player_raycast_below()

HitID player_raycast_below ( f32 yaw,
f32 diameter,
f32 * outX,
f32 * outY,
f32 * outZ,
f32 * outLength,
f32 * hitRx,
f32 * hitRz,
f32 * hitDirX,
f32 * hitDirZ )

Definition at line 71 of file 77480.c.

72 {
73 f32 x, y, z, length;
74 f32 inputX, inputY, inputZ, inputLength;
75 f32 cosTheta;
76 f32 sinTheta;
77 f32 temp_f20;
78 f32 cosTemp;
79 f32 sinTemp;
80 s32 hitID;
81 s32 ret;
82
83 *hitRx = 0.0f;
84 *hitRz = 0.0f;
85 *hitDirX = 0.0f;
86 *hitDirZ = 0.0f;
87 inputLength = *outLength;
88 temp_f20 = diameter * 0.28f;
89 sin_cos_rad(DEG_TO_RAD(yaw), &sinTheta, &cosTheta);
90 sinTemp = temp_f20 * sinTheta;
91 cosTemp = -temp_f20 * cosTheta;
92 inputX = *outX;
93 inputY = *outY;
94 inputZ = *outZ;
95
96 x = inputX + sinTemp;
97 y = inputY;
98 z = inputZ + cosTemp;
99 length = inputLength;
100 hitID = player_raycast_down(&x, &y, &z, &length);
101 ret = NO_COLLIDER;
102 if (hitID > NO_COLLIDER && length <= fabsf(*outLength)) {
105 *outX = x;
106 *outY = y;
107 *outZ = z;
108 *outLength = length;
109 *hitDirX = sinTemp;
110 *hitDirZ = cosTemp;
111 ret = hitID;
112 }
113
114 x = inputX - sinTemp;
115 y = inputY;
116 z = inputZ - cosTemp;
117 length = inputLength;
118 hitID = player_raycast_down(&x, &y, &z, &length);
119 if (hitID > NO_COLLIDER && length <= fabsf(*outLength)) {
122 *outX = x;
123 *outY = y;
124 *outZ = z;
125 *outLength = length;
126 *hitDirX = -sinTemp;
127 *hitDirZ = -cosTemp;
128 ret = hitID;
129 }
130
131 // @bug duplicate test -- same as first one. should be +/-?
132 x = inputX + cosTemp;
133 y = inputY;
134 z = inputZ + sinTemp;
135 length = inputLength;
136 hitID = player_raycast_down(&x, &y, &z, &length);
137 if (hitID > NO_COLLIDER && length <= fabsf(*outLength)) {
140 *outX = x;
141 *outY = y;
142 *outZ = z;
143 *outLength = length;
144 *hitDirX = sinTemp;
145 *hitDirZ = cosTemp;
146 ret = hitID;
147 }
148
149 // @bug duplicate test -- same as second one. should be -/+?
150 x = inputX - cosTemp;
151 y = inputY;
152 z = inputZ - sinTemp;
153 length = inputLength;
154 hitID = player_raycast_down(&x, &y, &z, &length);
155 if (hitID > NO_COLLIDER && length <= fabsf(*outLength)) {
158 *outX = x;
159 *outY = y;
160 *outZ = z;
161 *outLength = length;
162 *hitDirX = -sinTemp;
163 *hitDirZ = -cosTemp;
164 ret = hitID;
165 }
166
167 x = inputX;
168 y = inputY;
169 z = inputZ;
170 length = inputLength;
171 hitID = player_raycast_down(&x, &y, &z, &length);
172 if (hitID > NO_COLLIDER && length <= fabsf(*outLength)) {
175 *outX = x;
176 *outY = y;
177 *outZ = z;
178 *outLength = length;
179 *hitDirX = 0.0f;
180 *hitDirZ = 0.0f;
181 ret = hitID;
182 }
183
184 if (ret <= NO_COLLIDER) {
185 *outX = x;
186 *outY = y;
187 *outZ = z;
188 }
189
190 return ret;
191}
HitID player_raycast_down(f32 *, f32 *, f32 *, f32 *)
Definition 77480.c:205
void sin_cos_rad(f32 rad, f32 *outSinTheta, f32 *outCosTheta)
Definition 43F0.c:706
#define DEG_TO_RAD(deg)
Definition macros.h:134

Referenced by player_raycast_below_cam_relative(), and update_player_shadow().

◆ player_raycast_below_cam_relative()

HitID player_raycast_below_cam_relative ( PlayerStatus * playerStatus,
f32 * outX,
f32 * outY,
f32 * outZ,
f32 * outLength,
f32 * hitRx,
f32 * hitRz,
f32 * hitDirX,
f32 * hitDirZ )

Definition at line 193 of file 77480.c.

194 {
195 f32 yaw = 0.0f;
196
197 if (playerStatus->spriteFacingAngle >= 90.0f && playerStatus->spriteFacingAngle < 270.0f) {
198 yaw = 180.0f;
199 }
200
201 return player_raycast_below(yaw - 90.0f + gCameras[gCurrentCameraID].curYaw, playerStatus->colliderDiameter,
202 outX, outY, outZ, outLength, hitRx, hitRz, hitDirX, hitDirZ);
203}

Referenced by action_update_sliding(), action_update_state_23(), action_update_step_down(), can_dismount(), phys_main_collision_below(), player_check_collision_below(), test_dismount_height(), test_mounting_height_adjustment(), update_current_floor(), and update_riding_physics().

◆ player_raycast_up_corners()

HitID player_raycast_up_corners ( PlayerStatus * player,
f32 * posX,
f32 * posY,
f32 * posZ,
f32 * hitDepth,
f32 yaw )

Definition at line 255 of file 77480.c.

255 {
256 f32 startX;
257 f32 startY;
258 f32 startZ;
259 f32 depth;
260 f32 theta;
261 f32 deltaZ;
262 f32 deltaX;
263 f32 x,y,z;
264 s32 ret;
265 s32 hitID;
266 f32 radius;
267
268 radius = player->colliderDiameter * 0.3f;
269 theta = DEG_TO_RAD(yaw);
270 deltaX = radius * sin_rad(theta);
271 deltaZ = -radius * cos_rad(theta);
272
273 x = *posX;
274 y = *posY;
275 z = *posZ;
276
277 depth = *hitDepth;
278 startX = x + deltaX;
279 startY = y;
280 startZ = z + deltaZ;
281
282 ret = NO_COLLIDER;
283 hitID = player_raycast_up_corner(&startX, &startY, &startZ, &depth);
284
285 if (hitID <= NO_COLLIDER) {
286 startX = x - deltaX;
287 startY = y;
288 startZ = z - deltaZ;
289 hitID = player_raycast_up_corner(&startX, &startY, &startZ, &depth);
290 }
291
292 if (hitID <= NO_COLLIDER) {
293 startX = x + deltaZ;
294 startY = y;
295 startZ = z + deltaX;
296 hitID = player_raycast_up_corner(&startX, &startY, &startZ, &depth);
297 }
298
299 if (hitID <= NO_COLLIDER) {
300 startX = x - deltaZ;
301 startY = y;
302 startZ = z - deltaX;
303 hitID = player_raycast_up_corner(&startX, &startY, &startZ, &depth);
304 }
305
306 if (hitID > NO_COLLIDER) {
307 *posX = startX;
308 *posY = startY;
309 *posZ = startZ;
310 *hitDepth = depth;
311 ret = hitID;
312 }
313
314 if (ret <= NO_COLLIDER) {
315 *posX = startX;
316 *posY = startY;
317 *posZ = startZ;
318 *hitDepth = 0;
319 }
320
321 return ret;
322}
HitID player_raycast_up_corner(f32 *x, f32 *y, f32 *z, f32 *length)
Definition 77480.c:324
f32 cos_rad(f32 x)
Definition 43F0.c:717
f32 sin_rad(f32 x)
Definition 43F0.c:713

Referenced by collision_main_above().

◆ player_test_lateral_overlap()

HitID player_test_lateral_overlap ( s32 mode,
PlayerStatus * playerStatus,
f32 * x,
f32 * y,
f32 * z,
f32 length,
f32 yaw )

Definition at line 370 of file 77480.c.

370 {
371 f32 sinTheta;
372 f32 cosTheta;
373 f32 hitX;
374 f32 hitY;
375 f32 hitZ;
376 f32 hitDepth;
377 f32 hitNx;
378 f32 hitNy;
379 f32 hitNz;
380 f32 slipDx;
381 f32 slipDz;
382 f32 depthDiff;
383 f32 radius;
384 f32 originalDepth;
385 s32 hitID;
386 f32 height;
387 f32 targetDx;
388 f32 targetDz;
389 f32 dx;
390 f32 dz;
391 s32 ret;
392
393 radius = playerStatus->colliderDiameter * 0.5f;
394 ret = NO_COLLIDER;
395
396 if (!(playerStatus->flags & (PS_FLAG_FALLING | PS_FLAG_JUMPING))) {
397 height = playerStatus->colliderHeight * 0.286f;
398 } else {
399 height = 1.0f;
400 }
401
402 sin_cos_rad(DEG_TO_RAD(yaw), &sinTheta, &cosTheta);
403 cosTheta = -cosTheta;
404 hitDepth = length + radius;
405 hitID = player_raycast_general(mode, *x, *y + height, *z, sinTheta, 0, cosTheta, &hitX, &hitY, &hitZ, &hitDepth, &hitNx, &hitNy, &hitNz);
406
407 if (mode == PLAYER_COLLISION_HAMMER) {
408 targetDx = 0.0f;
409 targetDz = 0.0f;
410 } else {
411 targetDx = length * sinTheta;
412 targetDz = length * cosTheta;
413 }
414
415 if (hitID > NO_COLLIDER) {
416 originalDepth = length + radius;
417 if (hitDepth <= originalDepth) {
418 depthDiff = hitDepth - originalDepth;
419 dx = depthDiff * sinTheta;
420 dz = depthDiff * cosTheta;
421
422 player_get_slip_vector(&slipDx, &slipDz, targetDx, targetDz, hitNx, hitNz);
423 *x += dx + slipDx;
424 *z += dz + slipDz;
425 ret = hitID;
426 }
427 }
428
429 *x += targetDx;
430 *z += targetDz;
431 return ret;
432}
HitID player_raycast_general(s32, f32, f32, f32, f32, f32, f32, f32 *, f32 *, f32 *, f32 *, f32 *, f32 *, f32 *)
Definition 77480.c:434
void player_get_slip_vector(f32 *outX, f32 *outY, f32 x, f32 y, f32 nX, f32 nY)
Definition 77480.c:556

Referenced by action_hammer_end_swing(), action_hammer_test_swing_collision(), check_for_treadmill_overlaps(), collision_check_player_intersecting_world(), collision_check_player_overlaps(), collision_lava_reset_check_additional_overlaps(), collision_main_lateral(), func_800E4404(), and peach_disguise_check_overlaps().

◆ player_test_move_without_slipping()

HitID player_test_move_without_slipping ( PlayerStatus * playerStatus,
f32 * x,
f32 * y,
f32 * z,
f32 length,
f32 yaw,
s32 * hasClimbableStep )

Only used for Peach physics.

Definition at line 496 of file 77480.c.

496 {
497 f32 sinTheta;
498 f32 cosTheta;
499 f32 hitX;
500 f32 hitY;
501 f32 hitZ;
502 f32 hitDepth;
503 f32 hitNx;
504 f32 hitNy;
505 f32 hitNz;
506 f32 slipDx;
507 f32 slipDz;
508 f32 depth;
509 f32 radius;
510 f32 depthDiff;
511 f32 height;
512 s32 ret;
513 s32 hitID;
514 f32 targetDx;
515 f32 targetDz;
516 f32 dx, dz;
517
518 radius = playerStatus->colliderDiameter * 0.5f;
519 height = playerStatus->colliderHeight * 0.286f;
520 sin_cos_rad(DEG_TO_RAD(yaw), &sinTheta, &cosTheta);
521
522 depth = length + radius;
523 cosTheta = -cosTheta;
524 hitDepth = depth;
525 dx = radius * sinTheta;
526 ret = NO_COLLIDER;
527
528 hitID = player_raycast_general(PLAYER_COLLISION_0, *x, *y + 0.1, *z, sinTheta, 0, cosTheta, &hitX, &hitY, &hitZ, &hitDepth, &hitNx, &hitNy, &hitNz);
529 if (hitID > NO_COLLIDER && hitDepth <= depth) {
530 *hasClimbableStep = TRUE;
531 }
532
533 depth = length + radius;
534 hitDepth = depth;
535 dz = radius * cosTheta;
536
537 hitID = player_raycast_general(PLAYER_COLLISION_0, *x, *y + height, *z, sinTheta, 0, cosTheta, &hitX, &hitY, &hitZ, &hitDepth, &hitNx, &hitNy, &hitNz);
538
539 targetDx = 0.0f;
540 targetDz = 0.0f;
541
542 if (hitID > NO_COLLIDER && hitDepth <= depth) {
543 depthDiff = hitDepth - depth;
544 dx = depthDiff * sinTheta;
545 dz = depthDiff * cosTheta;
546 player_get_slip_vector(&slipDx, &slipDz, 0.0f, 0.0f, hitNx, hitNz);
547 *x += dx + slipDx;
548 *z += dz + slipDz;
549 ret = hitID;
550 }
551 *x += targetDx;
552 *z += targetDz;
553 return ret;
554}
@ PLAYER_COLLISION_0
Definition enums.h:4712

Referenced by collision_lateral_peach().

◆ player_test_move_with_slipping()

HitID player_test_move_with_slipping ( PlayerStatus * playerStatus,
f32 * x,
f32 * y,
f32 * z,
f32 length,
f32 yaw )

Definition at line 563 of file 77480.c.

563 {
564 f32 sinTheta;
565 f32 cosTheta;
566 f32 hitX;
567 f32 hitY;
568 f32 hitZ;
569 f32 hitDepth;
570 f32 hitNx;
571 f32 hitNy;
572 f32 hitNz;
573 f32 slipDx;
574 f32 slipDz;
575 f32 radius;
576 f32 height;
577 s32 hitID;
578 f32 targetDx, targetDz;
579 f32 dx, dz;
580 f32 depthDiff;
581 s32 ret = NO_COLLIDER;
582
583 height = 0.0f;
584 if (!(playerStatus->flags & (PS_FLAG_JUMPING | PS_FLAG_FALLING))) {
585 height = 10.01f;
586 }
587 radius = playerStatus->colliderDiameter * 0.5f;
588
589 sin_cos_rad(DEG_TO_RAD(yaw), &sinTheta, &cosTheta);
590 cosTheta = -cosTheta;
591 hitDepth = length + radius;
592
593 targetDx = length * sinTheta;
594 targetDz = length * cosTheta;
595
596 hitID = player_raycast_general(PLAYER_COLLISION_0, *x, *y + height, *z, sinTheta, 0, cosTheta, &hitX, &hitY, &hitZ, &hitDepth, &hitNx, &hitNy, &hitNz);
597 if (hitID > NO_COLLIDER && (depthDiff = hitDepth, depthDiff <= length + radius)) {
598 depthDiff -= (length + radius);
599 dx = depthDiff * sinTheta;
600 dz = depthDiff * cosTheta;
601 player_get_slip_vector(&slipDx, &slipDz, targetDx, targetDz, hitNx, hitNz);
602 *x += dx + slipDx;
603 *z += dz + slipDz;
604 ret = hitID;
605 } else {
606 height = playerStatus->colliderHeight * 0.75;
607 hitID = player_raycast_general(PLAYER_COLLISION_0, *x, *y + height, *z, sinTheta, 0, cosTheta, &hitX, &hitY, &hitZ, &hitDepth, &hitNx, &hitNy, &hitNz);
608 if (hitID > NO_COLLIDER && (depthDiff = hitDepth, depthDiff <= length + radius)) {
609 depthDiff -= (length + radius);
610 dx = depthDiff * sinTheta;
611 dz = depthDiff * cosTheta;
612 player_get_slip_vector(&slipDx, &slipDz, targetDx, targetDz, hitNx, hitNz);
613 *x += dx + slipDx;
614 *z += dz + slipDz;
615 ret = hitID;
616 }
617 }
618
619 *x += targetDx;
620 *z += targetDz;
621 return ret;
622}

Referenced by action_update_sliding(), collision_main_lateral(), and phys_check_interactable_collision().

◆ update_player()

void update_player ( void )

Definition at line 625 of file 77480.c.

625 {
626 PlayerStatus* playerStatus = &gPlayerStatus;
627 CollisionStatus* collisionStatus = &gCollisionStatus;
628
629 #if DX_DEBUG_MENU
630 if (dx_debug_is_cheat_enabled(DEBUG_CHEAT_SPEED_MODE)) {
632 gPlayerStatus.runSpeed = 12.0f;
633 }
634 #endif
635
637
638 if ((playerStatus->timeInAir > 100) || (playerStatus->pos.y < -2000.0f)) {
639 if (!(playerStatus->animFlags & PA_FLAG_NO_OOB_RESPAWN)) {
640 playerStatus->timeInAir = 0;
641 playerStatus->pos.x = playerStatus->lastGoodPos.x;
642 playerStatus->pos.y = playerStatus->lastGoodPos.y;
643 playerStatus->pos.z = playerStatus->lastGoodPos.z;
644
645 if (playerStatus->animFlags & PA_FLAG_RIDING_PARTNER) {
646 Npc* partner;
647
649 partner = get_npc_unsafe(NPC_PARTNER);
650 partner->pos.x = playerStatus->lastGoodPos.x;
651 partner->pos.y = playerStatus->lastGoodPos.y + playerStatus->colliderHeight;
652 partner->pos.z = playerStatus->lastGoodPos.z;
653 partner->moveToPos.y = playerStatus->lastGoodPos.y;
654 } else {
655 playerStatus->timeInAir = 10;
656 }
657 }
658 }
659
660 collisionStatus->curWall = NO_COLLIDER;
661 collisionStatus->lastWallHammered = NO_COLLIDER;
662 collisionStatus->curInspect = NO_COLLIDER;
663 collisionStatus->floorBelow = TRUE;
664
666 playerStatus->flags &= ~PS_FLAG_SPECIAL_LAND;
668
669 if (playerStatus->flags & PS_FLAG_NO_STATIC_COLLISION) {
673 }
674 } else if (playerStatus->actionState != ACTION_STATE_HIT_LAVA) {
676 } else {
678 }
679
680 if (playerStatus->flags & PS_FLAG_CUTSCENE_MOVEMENT) {
681 playerStatus->moveFrames--;
682 if (playerStatus->moveFrames <= 0) {
683 playerStatus->moveFrames = 0;
684 playerStatus->flags &= ~PS_FLAG_CUTSCENE_MOVEMENT;
685 }
686 }
687
688 if (!(playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS)) {
690 }
691
693
694 gGameStatus.playerPos.x = playerStatus->pos.x;
695 gGameStatus.playerPos.y = playerStatus->pos.y;
696 gGameStatus.playerPos.z = playerStatus->pos.z;
697 gGameStatus.playerYaw = playerStatus->curYaw;
698
700 if (!(playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS)) {
702 }
703
705
710
711 playerStatus->pushVel.x = 0.0f;
712 playerStatus->pushVel.y = 0.0f;
713 playerStatus->pushVel.z = 0.0f;
714 playerStatus->flags &= ~PS_FLAG_SLIDING;
715 playerStatus->animFlags &= ~PA_FLAG_FORCE_USE_PARTNER;
716}
void phys_update_lava_reset(void)
Definition 77480.c:793
b32 check_player_action_debug(void)
Definition 77480.c:1016
void update_partner_timers(void)
Definition 77480.c:1329
void phys_update_standard(void)
Definition 77480.c:737
void update_player_blink(void)
Definition 77480.c:924
void check_for_pulse_stone(void)
unavoidable use of hardcoded map and area IDs
Definition 77480.c:1063
void check_for_conversation_prompt(void)
Definition 77480.c:1124
void update_player_shadow(void)
Definition 77480.c:1686
void player_update_sprite(void)
Definition 77480.c:1347
void check_for_ispy(void)
Definition 77480.c:1035
void check_for_interactables(void)
Definition 77480.c:1207
@ PS_FLAG_CUTSCENE_MOVEMENT
Definition enums.h:3054
@ PS_FLAG_NO_STATIC_COLLISION
Definition enums.h:3051
@ NPC_PARTNER
Definition enums.h:2528
@ PA_FLAG_INTERRUPT_USE_PARTNER
forces actions with bow, parakarry, watt, and lakilester to end (sushie not tested)
Definition enums.h:3093
@ PA_FLAG_NO_OOB_RESPAWN
Definition enums.h:3121
@ PA_FLAG_DISMOUNTING_ALLOWED
Definition enums.h:3123
@ PA_FLAG_RIDING_PARTNER
Definition enums.h:3116
@ ACTION_STATE_HIT_LAVA
Definition enums.h:2451
void check_input_open_menus(void)
Definition menus.c:191
void update_player_input(void)
Definition 7B440.c:22
void check_input_status_bar(void)
Definition menus.c:391
void player_surface_spawn_fx(void)
Definition surfaces.c:42
Npc * get_npc_unsafe(s32 npcID)
Definition npc.c:995
Vec3f moveToPos
Vec3f pos
GameStatus gGameStatus
Definition main_loop.c:21

Referenced by state_step_change_map(), state_step_enter_world(), state_step_game_over(), state_step_intro(), state_step_pause(), state_step_unpause(), and state_step_world().

◆ check_input_use_partner()

void check_input_use_partner ( void )

Definition at line 718 of file 77480.c.

718 {
719 PlayerStatus* playerStatus = &gPlayerStatus;
720 PlayerData* playerData = &gPlayerData;
721 u32 actionState = playerStatus->actionState;
722
723 if (!(playerStatus->animFlags & PA_FLAG_8BIT_MARIO)
724 && (playerStatus->animFlags & PA_FLAG_FORCE_USE_PARTNER || playerStatus->inputDisabledCount == 0)
725 && (playerStatus->pressedButtons & BUTTON_C_DOWN && !(playerStatus->flags & PS_FLAG_NO_PARTNER_USAGE))
726 && !(playerStatus->pressedButtons & BUTTON_B)
727 && !(playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS)
728 && actionState <= ACTION_STATE_RUN
729 ) {
730 if (playerData->curPartner == PARTNER_GOOMBARIO) {
732 }
734 }
735}
s32 WorldTattleInteractionID
Definition goombario.c:18
s32 partner_use_ability(void)
Definition partners.c:964
@ BUTTON_C_DOWN
Definition enums.h:2779
@ PS_FLAG_NO_PARTNER_USAGE
Definition enums.h:3042
@ PA_FLAG_FORCE_USE_PARTNER
triggers partner use when set
Definition enums.h:3094
@ PA_FLAG_8BIT_MARIO
Definition enums.h:3105
@ PARTNER_GOOMBARIO
Definition enums.h:2886

Referenced by phys_update_standard().

◆ clear_player_status()

void clear_player_status ( void )

Definition at line 807 of file 77480.c.

807 {
809}
#define mem_clear

Referenced by load_demo_battle(), load_engine_data(), load_map_by_IDs(), state_step_demo(), state_step_intro(), and state_step_startup().

◆ player_reset_data()

void player_reset_data ( void )

Definition at line 811 of file 77480.c.

811 {
812 PlayerStatus* playerStatus = &gPlayerStatus;
813
814 mem_clear(playerStatus, sizeof(PlayerStatus));
815 playerStatus->flags = PS_FLAG_HAS_REFLECTION;
817 playerStatus->shadowID = create_shadow_type(SHADOW_VARYING_CIRCLE, playerStatus->pos.x, playerStatus->pos.y,
818 playerStatus->pos.z);
825}
void clear_pulse_stone_icon(void)
Definition 77480.c:1106
void clear_interact_prompt(void)
Definition 77480.c:1322
void clear_conversation_prompt(void)
Definition 77480.c:1155
void clear_ispy_icon(void)
Definition 77480.c:1057
@ SHADOW_VARYING_CIRCLE
Definition enums.h:2535
@ PS_FLAG_HAS_REFLECTION
Definition enums.h:3034
void reset_player_status(void)
Definition 7B440.c:58
void clear_world_menus(void)
Definition menus.c:131
void func_800E5520(void)
Definition 7E9D0.c:36
s32 create_shadow_type(s32 type, f32 x, f32 y, f32 z)
Definition entity.c:1528

Referenced by load_map_by_IDs().

◆ is_player_dismounted()

b32 is_player_dismounted ( void )

Definition at line 827 of file 77480.c.

827 {
834 return FALSE;
835 }
836 return TRUE;
837}
@ PARTNER_ACTION_USE
Definition enums.h:2933
@ PARTNER_LAKILESTER
Definition enums.h:2893
@ PARTNER_WATT
Definition enums.h:2891
@ PARTNER_SUSHIE
Definition enums.h:2892
@ PARTNER_PARAKARRY
Definition enums.h:2889

Referenced by get_overriding_player_anim(), and update_item_entity_pickup().

◆ get_overriding_player_anim()

s32 get_overriding_player_anim ( s32 anim)

Definition at line 839 of file 77480.c.

839 {
840 PlayerStatus* playerStatus = &gPlayerStatus;
841 PartnerStatus* partnerStatus = &gPartnerStatus;
842
844 && anim != ANIM_Mario1_Flail
845 && anim != ANIM_Mario1_Jump
846 ) {
847 return -1;
848 }
849
850 if (partnerStatus->partnerActionState != PARTNER_ACTION_NONE) {
851 if (partnerStatus->actingPartner == PARTNER_LAKILESTER && anim == ANIM_Mario1_Idle) {
852 anim = ANIM_MarioW2_RideLaki;
853 }
854
855 if (partnerStatus->partnerActionState != PARTNER_ACTION_NONE
856 && partnerStatus->actingPartner == PARTNER_BOW
857 && anim != ANIM_Mario1_Crouch
858 && anim != ANIM_Mario1_Idle
859 ) {
860 return -1;
861 }
862 }
863
864 if (anim == ANIM_Mario1_ThumbsUp && partnerStatus->partnerActionState == PARTNER_ACTION_USE) {
865 return -1;
866 }
867
868 if (anim == ANIM_MarioW1_Lift || anim == ANIM_Peach2_SpreadArms || anim == ANIM_Mario1_Idle) {
869 if (!(playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS)) {
870 if (!is_player_dismounted()) {
871 return -1;
872 }
873 } else if (!(playerStatus->animFlags & PA_FLAG_INVISIBLE)) {
874 anim = ANIM_Peach2_SpreadArms;
875 } else {
877 return -1;
878 }
879 } else if (playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS) {
880 if (playerStatus->peachItemHeld != PEACH_BAKING_NONE
881 && (anim == ANIM_Peach2_RaiseArms || anim == ANIM_Peach2_Talk || anim == ANIM_Peach2_LowerArms)
882 ) {
883 anim = ANIM_Peach3_PresentCompleteCake;
884 }
885 }
886
887 if (anim == ANIM_MarioW2_Collapse) {
888 exec_ShakeCam1(0, 0, 2);
889 }
890
891 return anim;
892}
b32 is_player_dismounted(void)
Definition 77480.c:827
DisguiseAnims BasicPeachDisguiseAnims[]
Definition 7E9D0.c:464
@ PA_FLAG_INVISIBLE
Definition enums.h:3104
@ PEACH_BAKING_NONE
Definition enums.h:2496
@ ACTION_STATE_USE_SPINNING_FLOWER
Definition enums.h:2457
void peach_set_disguise_anim(AnimID)
Definition 7E9D0.c:506
void exec_ShakeCam1(s32 arg0, s32 arg1, s32 arg2)
Definition cam_api.c:365

Referenced by suggest_player_anim_allow_backward(), and suggest_player_anim_always_forward().

◆ suggest_player_anim_allow_backward()

◆ force_player_anim()

void force_player_anim ( AnimID anim)

Definition at line 905 of file 77480.c.

905 {
906 PlayerStatus* playerStatus = &gPlayerStatus;
907
908 playerStatus->anim = anim;
909 playerStatus->animNotifyValue = 0;
910 playerStatus->flags &= ~PS_FLAG_FACE_FORWARD;
911}

◆ suggest_player_anim_always_forward()

◆ get_xz_dist_to_player()

f32 get_xz_dist_to_player ( f32 x,
f32 z )

◆ enable_player_shadow()

void enable_player_shadow ( void )

Definition at line 964 of file 77480.c.

964 {
965 get_shadow_by_index(gPlayerStatus.shadowID)->flags &= ~ENTITY_FLAG_HIDDEN;
966}

Referenced by func_802BC3A0_E2ECD0().

◆ disable_player_shadow()

void disable_player_shadow ( void )

◆ disable_player_static_collisions()

◆ enable_player_static_collisions()

s32 enable_player_static_collisions ( void )

Definition at line 980 of file 77480.c.

980 {
981 PlayerStatus* playerStatus = &gPlayerStatus;
982
983 playerStatus->enableCollisionOverlapsCheck--;
984 if (playerStatus->enableCollisionOverlapsCheck == 0) {
985 playerStatus->flags &= ~PS_FLAG_NO_STATIC_COLLISION;
986 }
987 return playerStatus->enableCollisionOverlapsCheck;
988}

Referenced by action_update_parasol(), action_update_use_munchlesia(), action_update_use_spinning_flower(), action_update_use_tweester(), entity_HiddenPanel_flip_over(), entity_StarBoxLauncher_launch(), pre_battle(), pre_battle(), and pre_battle().

◆ disable_player_input()

◆ enable_player_input()

◆ func_800E01DC()

void func_800E01DC ( void )

Definition at line 1008 of file 77480.c.

1008 {
1009 PlayerStatus* playerStatus = &gPlayerStatus;
1010
1011 if (playerStatus->animFlags & PA_FLAG_INTERACT_PROMPT_AVAILABLE) {
1012 playerStatus->flags |= PS_FLAG_INTERACTED;
1013 }
1014}

◆ check_player_action_debug()

b32 check_player_action_debug ( void )

Definition at line 1016 of file 77480.c.

1016 {
1020 }
1021 return TRUE;
1022 }
1023 return FALSE;
1024}
@ DEBUG_SCRIPTS_NONE
Definition enums.h:4275
@ BUTTON_R
Definition enums.h:2781
void set_action_state(s32 actionState)
Definition 7E9D0.c:209

Referenced by phys_main_collision_below(), player_fall_distance(), and update_player().

◆ player_render_interact_prompts()

void player_render_interact_prompts ( void )

Definition at line 1028 of file 77480.c.

1028 {
1033}
void render_interact_prompt(void)
Definition 77480.c:1316
void render_conversation_prompt(void)
Definition 77480.c:1149
void render_pulse_stone_icon(void)
Definition 77480.c:1100
void render_ispy_icon(void)
Definition 77480.c:1051

Referenced by gfx_draw_frame().

◆ has_valid_conversation_npc()

s32 has_valid_conversation_npc ( void )

Definition at line 1111 of file 77480.c.

1111 {
1112 PlayerStatus* playerStatus = &gPlayerStatus;
1113 Npc* npc = playerStatus->encounteredNPC;
1114 s32 ret = FALSE;
1115 s32 cond;
1116
1117 if (npc != NULL && !(npc->flags & NPC_FLAG_USE_INSPECT_ICON)) {
1118 cond = !(playerStatus->flags & PS_FLAG_INPUT_DISABLED) && (playerStatus->flags & PS_FLAG_HAS_CONVERSATION_NPC);
1119 ret = cond;
1120 }
1121 return ret;
1122}

Referenced by check_for_conversation_prompt(), and should_continue_pulse_stone().

◆ func_800E06C0()

void func_800E06C0 ( s32 arg0)

Definition at line 1160 of file 77480.c.

1160 {
1161 D_8010C950 = (arg0 == 1);
1162}
s32 D_8010C950
Definition 77480.c:37

Referenced by update_triggers().

◆ func_800E06D8()

s32 func_800E06D8 ( void )

Definition at line 1164 of file 77480.c.

1164 {
1165 PlayerStatus* playerStatus = &gPlayerStatus;
1166 s32 currentWall;
1167
1168 if (playerStatus->timeInAir != 0 || playerStatus->inputDisabledCount != 0) {
1169 return FALSE;
1170 }
1172 return FALSE;
1173 }
1174 if (playerStatus->flags & PS_FLAG_HAS_CONVERSATION_NPC
1175 && !(playerStatus->flags & PS_FLAG_INPUT_DISABLED)
1176 && playerStatus->encounteredNPC != NULL
1178 ) {
1179 playerStatus->interactingWithID = NO_COLLIDER;
1180 return TRUE;
1181 }
1182
1183 currentWall = gCollisionStatus.curWall;
1184 if (!(currentWall & COLLISION_WITH_ENTITY_BIT)) {
1185 if (!should_collider_allow_interact(currentWall)) {
1186 return FALSE;
1187 }
1188 } else if (!phys_can_player_interact()) {
1189 playerStatus->interactingWithID = NO_COLLIDER;
1190 return FALSE;
1191 } else if (get_entity_type(currentWall) == ENTITY_TYPE_PUSH_BLOCK) {
1192 return FALSE;
1193 }
1194
1195 if (playerStatus->interactingWithID == currentWall) {
1196 if (playerStatus->flags & PS_FLAG_INTERACTED) {
1197 return FALSE;
1198 }
1199 } else {
1200 playerStatus->flags &= ~PS_FLAG_INTERACTED;
1201 }
1202 playerStatus->interactingWithID = NO_COLLIDER;
1203
1204 return TRUE;
1205}

Referenced by should_continue_pulse_stone().

◆ appendGfx_interact_prompt()

void appendGfx_interact_prompt ( void )

Definition at line 63 of file inspect_icon.c.

63 {
64 ImgFXTexture ifxImg;
65 Matrix4f sp38, sp78;
66
69 guRotateF(sp78, InspectIconPtr->yaw - gCameras[gCurrentCameraID].curYaw, 0.0f, 1.0f, 0.0f);
70 guMtxCatF(sp38, sp78, sp38);
72 guMtxCatF(sp38, sp78, sp78);
74
76 G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
77 gSPDisplayList(gMainGfxPos++, &inspect_icon_gfx);
78
79 ifxImg.raster = inspect_icon_img;
80 ifxImg.palette = inspect_icon_pal;
81 ifxImg.width = inspect_icon_img_width;
82 ifxImg.height = inspect_icon_img_height;
83 ifxImg.xOffset = -16;
84 ifxImg.yOffset = 26;
85 ifxImg.alpha = 255;
90 imgfx_appendGfx_component(0, &ifxImg, 0, sp78);
91
92 gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
93 }
94}
Mtx matrixStack[0x200]
#define guMtxF2L
@ IMGFX_FLAG_40
Definition enums.h:5099
@ IMGFX_FLAG_400
Definition enums.h:5103
@ IMGFX_FLAG_8
Definition enums.h:5096
s32 imgfx_appendGfx_component(s32, ImgFXTexture *, u32, Matrix4f)
Definition imgfx.c:704
void imgfx_update(u32, ImgFXType, s32, s32, s32, s32, s32)
Definition imgfx.c:487
InspectIconData * InspectIconPtr
Gfx * gMainGfxPos
Definition cam_main.c:15
u16 gMatrixListPos
Definition main_loop.c:45
PlayerStatus gPlayerStatus
Definition 77480.c:39
DisplayContext * gDisplayContext
Definition cam_main.c:16

Referenced by render_interact_prompt().

◆ render_player()

void render_player ( void )

Definition at line 1489 of file 77480.c.

1489 {
1492 }
1493}
void render_player_model(void)
Definition 77480.c:1495

Referenced by render_frame().

◆ render_player_model()

void render_player_model ( void )

Definition at line 1495 of file 77480.c.

1495 {
1496 RenderTask task;
1497 RenderTask* rtPtr = &task;
1498 PlayerStatus* playerStatus = &gPlayerStatus;
1499 s32 x, y, z;
1500
1501 if (playerStatus->flags & PS_FLAG_SPRITE_REDRAW) {
1502 playerStatus->flags &= ~PS_FLAG_SPRITE_REDRAW;
1503 get_screen_coords(gCurrentCamID, playerStatus->pos.x, playerStatus->pos.y,
1504 playerStatus->pos.z, &x, &y, &z);
1505 if (!(playerStatus->flags & PS_FLAG_SPINNING)) {
1506 if (playerStatus->curAlpha != playerStatus->prevAlpha) {
1507 if (playerStatus->curAlpha < 254) {
1508 if (playerStatus->animFlags & PA_FLAG_MAP_HAS_SWITCH) {
1510 } else {
1512 }
1513 set_player_imgfx_comp(PLAYER_SPRITE_MAIN, -1, IMGFX_SET_ALPHA, 0, 0, 0, playerStatus->curAlpha, 0);
1514
1515 } else {
1516 playerStatus->renderMode = RENDER_MODE_ALPHATEST;
1518 }
1519 }
1520
1521 playerStatus->prevAlpha = playerStatus->curAlpha;
1522
1523 } else {
1525 playerStatus->prevAlpha = 0;
1526 }
1527
1528 if (!(playerStatus->animFlags & PA_FLAG_INVISIBLE)) {
1529 rtPtr->appendGfxArg = playerStatus;
1530 rtPtr->dist = -z;
1531 rtPtr->renderMode = playerStatus->renderMode;
1532
1533 if (playerStatus->flags & PS_FLAG_SPINNING) {
1535 } else {
1536 rtPtr->appendGfx = appendGfx_player;
1537 }
1538
1539 queue_render_task(rtPtr);
1540 }
1541 }
1542}
void appendGfx_player_spin(void *data)
Only used when speedy spinning.
Definition 77480.c:1601
void appendGfx_player(void *data)
Definition 77480.c:1544
#define queue_render_task
@ PA_FLAG_MAP_HAS_SWITCH
Definition enums.h:3119
@ RENDER_MODE_SURFACE_XLU_LAYER2
Definition enums.h:3287
@ RENDER_MODE_ALPHATEST
Definition enums.h:3276
@ RENDER_MODE_SURFACE_XLU_LAYER1
Definition enums.h:3282
void get_screen_coords(s32 camID, f32 x, f32 y, f32 z, s32 *screenX, s32 *screenY, s32 *screenZ)
Definition cam_main.c:410
void * appendGfxArg
void(* appendGfx)(void *)

Referenced by render_player().

Variable Documentation

◆ ISpyNotificationCallback

void(* ISpyNotificationCallback) (void) ( void )

◆ PulseStoneNotificationCallback

◆ TalkNotificationCallback

◆ InteractNotificationCallback

◆ D_8010C950

s32 D_8010C950

Definition at line 37 of file 77480.c.

Referenced by func_800E06C0(), and interact_inspect_setup().

◆ gPlayerStatus

PlayerStatus gPlayerStatus

Definition at line 39 of file 77480.c.

Referenced by _show_message(), _use_partner_ability(), action_hammer_end_swing(), action_hammer_play_hit_fx(), action_hammer_test_swing_collision(), action_update_falling(), action_update_first_strike(), action_update_hammer(), action_update_hit_fire(), action_update_hit_lava(), action_update_idle(), action_update_idle_peach(), action_update_jump(), action_update_knockback(), action_update_land(), action_update_landing_on_switch(), action_update_launch(), action_update_parasol(), action_update_peach_falling(), action_update_peach_land(), action_update_peach_step_down(), action_update_peach_step_down_land(), action_update_pushing_block(), action_update_raise_arms(), action_update_ride(), action_update_run(), action_update_sliding(), action_update_spin(), action_update_spin_jump(), action_update_state_23(), action_update_step_down(), action_update_step_down_land(), action_update_step_up(), action_update_step_up_peach(), action_update_step_up_set_peach_anim(), action_update_talk(), action_update_tornado_jump(), action_update_use_munchlesia(), action_update_use_spinning_flower(), action_update_use_tweester(), action_update_walk(), action_update_walk_set_peach_anim(), ai_check_player_dist(), appendGfx_interact_prompt(), appendGfx_ispy_icon(), appendGfx_player(), appendGfx_player_spin(), appendGfx_pulse_stone_icon(), appendGfx_speech_bubble(), basic_ai_check_player_dist(), btl_restore_world_cameras(), btl_save_world_cameras(), calculate_camera_yinterp_rate(), can_dismount(), can_open_world_menu(), check_conversation_trigger(), check_for_conversation_prompt(), check_for_interactables(), check_for_ispy(), check_for_pulse_stone(), check_for_treadmill_overlaps(), check_input_hammer(), check_input_jump(), check_input_midair_jump(), check_input_open_menus(), check_input_spin(), check_input_status_bar(), check_input_use_partner(), clear_player_status(), cloud_trail_update(), collision_check_player_overlaps(), collision_lateral_peach(), collision_lava_reset_check_additional_overlaps(), collision_main_above(), collision_main_lateral(), disable_player_input(), disable_player_shadow(), disable_player_static_collisions(), draw_encounters_pre_battle(), enable_player_input(), enable_player_shadow(), enable_player_static_collisions(), end_outta_sight_cleanup(), entity_ArrowSign_handle_collision(), entity_base_block_update_slow_sinking(), entity_base_switch_init(), entity_BellbellPlant_idle(), entity_block_handle_collision(), entity_BlueWarpPipe_enter_pipe_init(), entity_BlueWarpPipe_enter_pipe_update(), entity_BlueWarpPipe_idle(), entity_BlueWarpPipe_set_player_move_to_center(), Entity_BoardedFloor_idle(), entity_can_collide_with_jumping_player(), entity_Chest_idle(), entity_CymbalPlant_idle(), entity_GiantChest_open(), entity_GreenStompSwitch_idle(), entity_HeartBlockContent__anim_heal(), entity_HeartBlockContent_anim_idle(), entity_HiddenItemBlock_idle(), entity_HugeBlueSwitch_idle(), entity_MunchlesiaChewing_init(), entity_Padlock_push_player(), entity_PinkFlower_idle(), entity_ScriptSpring_idle(), entity_Signpost_idle(), entity_SimpleSpring_idle(), entity_SimpleSpring_set_jump_params(), entity_small_switch_idle(), entity_StarBoxLauncher_check_launch(), entity_TriggerBlock_disable_player_input(), entity_TrumpetPlant_idle(), entity_Tweester_idle(), entity_WoodenCrate_idle(), falling_leaves_update(), flower_trail_update_part(), force_player_anim(), func_800E01DC(), func_800E06D8(), func_800E4AD8(), func_800E4B40(), func_800EA52C(), func_802B6000_E27510(), func_802BB000_E2D930(), func_802BB0A0_E2D9D0(), func_802BB8D4_E2E204(), func_802BB98C_E2E2BC(), func_802BC050_E2E980(), func_802BC0F0_E2EA20(), func_802BC17C_E2EAAC(), func_802BC2B4_E2EBE4(), func_802BC3E4_E2ED14(), func_802D23F8(), func_E0020000(), game_input_to_move_vector(), get_npc_pos(), get_overriding_player_anim(), get_xz_dist_to_player(), gravity_use_fall_parms(), handle_jumping_land_on_switch(), handle_jumping_launch(), has_valid_conversation_npc(), initialize_jump(), integrate_gravity(), interact_inspect_setup(), interact_inspect_update(), interact_speech_setup(), interact_speech_update(), is_player_action_state(), ispy_notification_setup(), ispy_notification_update(), load_map_by_IDs(), make_item_entity_at_player(), move_player(), npc_do_player_collision(), npc_follow_init(), offset_player_from_camera(), parasol_get_npc(), parasol_update_spin(), partner_do_player_collision(), partner_flying_enable(), partner_flying_follow_player(), partner_flying_update_motion(), partner_flying_update_player_tracking(), partner_force_player_flip_done(), partner_get_out(), partner_init_after_battle(), partner_move_to_goal(), partner_put_away(), partner_reset_data(), partner_walking_enable(), partner_walking_follow_player(), partner_walking_update_motion(), partner_walking_update_player_tracking(), peach_check_for_parasol_input(), peach_disguise_check_overlaps(), peach_force_disguise_action(), peach_make_disguise_npc(), peach_sync_disguise_npc(), phys_can_player_interact(), phys_check_interactable_collision(), phys_init_integrator_for_current_state(), phys_is_on_sloped_ground(), phys_main_collision_below(), phys_peach_update(), phys_player_land(), phys_save_ground_pos(), phys_update_action_state(), phys_update_falling(), phys_update_jump(), phys_update_standard(), player_check_collision_below(), player_get_camera_facing_angle(), player_get_side_angle(), player_handle_floor_collider_type(), player_input_to_move_vector(), player_jump(), player_reset_data(), player_surface_spawn_basic_fx(), player_surface_spawn_cloud_fx(), player_surface_spawn_flower_fx(), player_surface_spawn_fx(), player_surface_spawn_hedges_fx(), player_surface_spawn_snow_fx(), player_surface_spawn_water_fx(), player_update_sprite(), pre_battle(), pre_battle(), pulse_stone_notification_setup(), pulse_stone_notification_update(), record_jump_apex(), render_player_model(), reset_outta_sight_alpha_on_menu_close(), reset_player_status(), set_action_state(), set_peach_shadow_scale(), sfx_play_sound_at_player(), should_cancel_open_world_menu(), should_cancel_pulse_stone(), should_continue_inspect(), should_continue_pulse_stone(), snowflake_render(), star_update(), start_bounce_a(), start_bounce_b(), start_falling(), state_init_game_over(), state_step_end_battle(), state_step_unpause(), suggest_player_anim_allow_backward(), suggest_player_anim_always_forward(), switch_to_partner(), sync_player_position(), test_dismount_height(), test_item_player_collision(), test_mounting_height_adjustment(), test_player_entity_aabb(), update_camera_unused_ahead(), update_camera_unused_leading(), update_current_floor(), update_encounters_conversation(), update_encounters_neutral(), update_encounters_post_battle(), update_inspect_icon_pos(), update_item_entity_collectable(), update_item_entity_pickup(), update_locomotion_state(), update_npcs(), update_player(), update_player_blink(), update_player_carry_anim(), update_player_input(), update_player_shadow(), update_riding_physics(), update_riding_physics(), update_status_bar(), update_triggers(), and update_unused_lead_amt().

◆ gPlayerData

PlayerData gPlayerData

Definition at line 40 of file 77480.c.

Referenced by _use_partner_ability(), action_hammer_end_swing(), action_hammer_play_hit_fx(), action_hammer_test_swing_collision(), action_update_hammer(), action_update_idle(), action_update_idle_peach(), action_update_run(), action_update_walk(), add_coins(), add_item(), add_star_pieces(), add_star_points(), add_star_power(), appendGfx_npc_actor(), appendGfx_player_actor(), btl_check_can_change_partner(), btl_check_player_defeated(), btl_init_menu_boots(), btl_init_menu_hammer(), btl_init_menu_items(), btl_init_menu_partner(), btl_merlee_on_first_strike(), btl_merlee_on_start_turn(), btl_restore_world_cameras(), btl_state_draw_select_target(), btl_state_update_begin_player_turn(), btl_state_update_begin_turn(), btl_state_update_celebration(), btl_state_update_change_partner(), btl_state_update_end_training_battle(), btl_state_update_end_turn(), btl_state_update_enemy_striking_first(), btl_state_update_first_strike(), btl_state_update_normal_start(), btl_state_update_partner_menu(), btl_state_update_partner_move(), btl_state_update_partner_striking_first(), btl_state_update_player_menu(), btl_state_update_run_away(), btl_state_update_victory(), btl_update(), calc_enemy_damage_target(), calc_enemy_test_target(), calc_player_damage_enemy(), can_trigger_loading_zone(), check_block_input(), check_input_hammer(), check_input_midair_jump(), check_input_open_menus(), check_input_use_partner(), clear_player_data(), ClubbaNappingAI_Sleep(), coin_counter_draw_content(), count_item(), count_power_plus(), deduct_current_move_fp(), dispatch_damage_event_player(), enforce_hpfp_limits(), entity_block_handle_collision(), entity_GiantChest_give_equipment(), entity_HeartBlock_show_tutorial_message(), entity_small_switch_idle(), entity_Tweester_idle(), find_item(), fio_save_game(), fio_serialize_state(), func_800F4D28(), func_80269118(), func_80269160(), get_consumables_count(), get_consumables_empty(), get_current_partner_id(), get_player_anim_for_status(), get_stored_count(), get_stored_empty(), has_full_fp(), has_full_hp(), has_item(), increment_max_star_power(), initialize_battle(), initialize_status_bar(), is_ability_active(), is_badge_equipped(), load_demo_battle(), load_partner_actor(), partner_handle_after_battle(), partner_reset_data(), pause_badges_count_all(), pause_badges_count_equipped(), pause_badges_draw_contents(), pause_badges_load_badges(), pause_badges_try_equip(), pause_badges_try_remove(), pause_get_total_equipped_bp_cost(), pause_items_load_items(), pause_partners_draw_movelist(), pause_partners_draw_title(), pause_partners_handle_input(), pause_partners_init(), pause_spirits_draw_contents(), pause_spirits_draw_title(), pause_spirits_handle_input(), pause_stats_draw_contents(), pause_stats_handle_input(), recover_fp(), recover_hp(), remove_consumable(), remove_item(), reset_status_bar(), set_action_state(), set_max_star_power(), set_npc_animation(), setup_demo_player(), setup_item_popup(), setup_partner_popup(), shop_open_item_select_popup(), SomeVtxFunc(), sort_consumables(), spawn_drops(), state_step_demo(), state_step_end_battle(), state_step_intro(), status_bar_start_blinking_sp(), step_game_loop(), store_item(), subtract_hp(), SuperBlock_get_partner_rank(), sync_status_bar(), update_coin_counter(), update_encounters_neutral(), update_encounters_post_battle(), update_encounters_pre_battle(), update_item_entity_collectable(), update_item_entity_pickup(), update_partner_timers(), update_status_bar(), use_consumable(), and ver_deserialize_standard().

◆ WorldTattleInteractionID

s32 WorldTattleInteractionID
extern

Definition at line 18 of file goombario.c.

Referenced by check_input_use_partner().

◆ D_800F7B48

f32 D_800F7B48 = 0.0f

Definition at line 1345 of file 77480.c.

Referenced by player_update_sprite().