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 15 of file 77480.c.

◆ speech_bubble_VRAM

#define speech_bubble_VRAM   (void*)0x802B7000

Definition at line 16 of file 77480.c.

◆ pulse_stone_VRAM

#define pulse_stone_VRAM   (void*)0x802B7000

Definition at line 17 of file 77480.c.

◆ i_spy_VRAM

#define i_spy_VRAM   (void*)0x802B7000

Definition at line 18 of file 77480.c.

Function Documentation

◆ player_raycast_down()

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

Definition at line 204 of file 77480.c.

204 {
205 f32 hitX;
206 f32 hitY;
207 f32 hitZ;
209 f32 hitNx;
210 f32 hitNy;
211 f32 hitNz;
212 s32 entityID, colliderID;
213 Entity* entity;
214 s32 ret = NO_COLLIDER;
215
216 hitDepth = *length;
217 entityID = test_ray_entities(*x, *y, *z, 0.0f, -1.0f, 0.0f, &hitX, &hitY, &hitZ, &hitDepth, &hitNx, &hitNy, &hitNz);
218 if (entityID > NO_COLLIDER) {
220 if (entity->alpha < 255) {
221 entity->collisionTimer = 4;
223 } else {
225 }
226 }
227
228 colliderID = test_ray_colliders(COLLIDER_FLAG_IGNORE_PLAYER, *x, *y, *z, 0, -1.0f, 0, &hitX, &hitY, &hitZ, &hitDepth, &hitNx, &hitNy, &hitNz);
229 if (colliderID > NO_COLLIDER) {
230 ret = colliderID;
231 }
232
233 if (ret > NO_COLLIDER) {
234 *length = hitDepth;
235 *x = hitX;
236 *y = hitY;
237 *z = hitZ;
243 gGameStatusPtr->playerGroundTraceAngles.x = atan2(0.0f, 0.0f, hitNz * 100.0, hitNy * 100.0);
245 gGameStatusPtr->playerGroundTraceAngles.z = atan2(0.0f, 0.0f, hitNx * 100.0, hitNy * 100.0);
246 } else {
250 }
251 return ret;
252}
BSS s32 PopupMenu_SelectedIndex
Vec3f playerGroundTraceNormal
Vec3f playerGroundTraceAngles
#define atan2
@ COLLIDER_FLAG_IGNORE_PLAYER
Definition enums.h:4695
@ 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:660
f32 get_player_normal_yaw(void)
Definition 43F0.c:656
#define COLLISION_WITH_ENTITY_BIT
Definition macros.h:156
#define NO_COLLIDER
Definition macros.h:160
GameStatus * gGameStatusPtr
Definition main_loop.c:31
f32 PlayerNormalPitch
Definition 7B440.c:9
f32 PlayerNormalYaw
Definition 7B440.c:8

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 323 of file 77480.c.

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

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 433 of file 77480.c.

434 {
435 f32 nAngleX;
436 f32 nAngleZ;
437 s32 entityID;
438 s32 colliderID;
439 Entity* entity;
440 s32 ignoreFlags;
441 s32 ret;
442
443 #if DX_DEBUG_MENU
445 return NO_COLLIDER;
446 }
447 #endif
448
449 entityID = test_ray_entities(startX, startY, startZ, dirX, dirY, dirZ, hitX, hitY, hitZ, hitDepth, hitNx, hitNy,
450 hitNz);
452 if (entityID > NO_COLLIDER) {
454 if (entity->alpha < 255) {
455 entity->collisionTimer = 0;
457 } else {
459 }
460 } else if (mode == PLAYER_COLLISION_HAMMER) {
461 ret = test_ray_colliders(COLLIDER_FLAG_IGNORE_SHELL, startX, startY, startZ, dirX, dirY, dirZ,
463 }
464
465 if (mode == PLAYER_COLLISION_1 || mode == PLAYER_COLLISION_HAMMER) {
466 return ret;
467 }
468
469 if (mode == PLAYER_COLLISION_4) {
471 } else {
473 }
474
475 colliderID = test_ray_colliders(ignoreFlags, startX, startY, startZ, dirX, dirY, dirZ,
477
478 if (ret <= NO_COLLIDER) {
479 ret = colliderID;
480 }
481
482 if (ret > NO_COLLIDER) {
483 nAngleZ = 180.0f - atan2(0, 0, *hitNz * 100.0, *hitNy * 100.0);
484 nAngleX = 180.0f - atan2(0, 0, *hitNx * 100.0, *hitNy * 100.0);
485
486 if (!((nAngleZ == 90.0f && nAngleX == 90.0f) || fabs(nAngleZ) >= 30.0 || fabs(nAngleX) >= 30.0)) {
488 }
489 }
490
491 return ret;
492}
@ COLLIDER_FLAG_DOCK_WALL
Definition enums.h:4698
@ COLLIDER_FLAG_IGNORE_SHELL
Definition enums.h:4694
@ PLAYER_COLLISION_HAMMER
Definition enums.h:4714
@ PLAYER_COLLISION_4
Definition enums.h:4715
@ PLAYER_COLLISION_1
Definition enums.h:4712
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 555 of file 77480.c.

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

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 736 of file 77480.c.

736 {
738
741
742 #if DX_DEBUG_MENU
744 playerStatus->pos.y += 5.0f;
746 }
747 #endif
748
749 if (!(playerStatus->flags & PS_FLAG_FLYING)) {
750 if (playerStatus->flags & PS_FLAG_JUMPING) {
752 }
753 }
754
755 if (playerStatus->flags & PS_FLAG_FALLING) {
756 if (!(playerStatus->flags & PS_FLAG_FLYING)) {
758 }
759 }
760
762
763 if (playerStatus->actionState != ACTION_STATE_SLIDING) {
766
768 && playerStatus->timeInAir == 0
770 ) {
772 }
773
775 && playerStatus->actionState != ACTION_STATE_STEP_UP
776 ) {
778 }
779 }
780
781 if (playerStatus->animFlags & PA_FLAG_WATT_IN_HANDS) {
783 }
784
789 }
790}
PlayerStatus gPlayerStatus
Definition 77480.c:38
void check_input_use_partner(void)
Definition 77480.c:717
@ 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:315
void phys_main_collision_below(void)
Definition 7BB60.c:862
void collision_check_player_overlaps(void)
Definition 7BB60.c:812
void collision_lateral_peach(void)
Definition 7BB60.c:1056
void collision_main_lateral(void)
Definition 7BB60.c:493
void phys_update_jump(void)
Definition 7BB60.c:198
void check_input_midair_jump(void)
Definition 7BB60.c:1078
HitID collision_main_above(void)
Definition 7BB60.c:67
Vec3f targetPos
Camera gCameras[4]
Definition cam_main.c:16
void world_watt_sync_held_position(void)

Referenced by update_player().

◆ phys_update_lava_reset()

void phys_update_lava_reset ( void )

Definition at line 792 of file 77480.c.

792 {
796
799
801 camera->targetPos.y = gPlayerStatusPtr->pos.y;
802 camera->targetPos.z = gPlayerStatusPtr->pos.z;
803 }
804}
void collision_lava_reset_check_additional_overlaps(void)
Definition 7BB60.c:989
PlayerStatus * gPlayerStatusPtr

Referenced by update_player().

◆ update_player_blink()

void update_player_blink ( void )

Definition at line 923 of file 77480.c.

923 {
925 s32 outtaSight = FALSE;
926
929 }
930
931 if (playerStatus->blinkTimer > 0) {
932 playerStatus->blinkTimer--;
933
934 if (!(gGameStatusPtr->frameCounter & 1)) {
935 if (outtaSight) {
936 playerStatus->curAlpha = 192;
937 } else {
938 playerStatus->curAlpha = 255;
939 }
940 } else {
941 playerStatus->curAlpha = 96;
942 }
943
944 if (!playerStatus->blinkTimer) {
945 if (outtaSight) {
946 playerStatus->curAlpha = 128;
948 } else {
949 playerStatus->curAlpha = 255;
951 }
952 } else {
954 }
955 }
956}
@ 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 1034 of file 77480.c.

1034 {
1036
1038 if (!(playerStatus->animFlags &
1042 }
1043 }
1044
1047 }
1048}
void(* ISpyNotificationCallback)(void)
Definition 77480.c:32
@ 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:529
HiddenPanelsData gCurrentHiddenPanels
Definition entity.c:36

Referenced by update_player().

◆ render_ispy_icon()

void render_ispy_icon ( void )

Definition at line 1050 of file 77480.c.

1050 {
1053 }
1054}
@ 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 1062 of file 77480.c.

1062 {
1063 s32 dx, dy;
1064
1067 return;
1068 }
1069
1071 return;
1072 }
1073
1074 dx = abs(gGameStatusPtr->mapID % 7 - 2);
1075 dy = gGameStatusPtr->mapID / 7;
1076 if ((dx + dy) > 5) {
1077 return;
1078 }
1079
1081 return;
1082 }
1083
1085 return;
1086 }
1087
1091 }
1092 }
1093
1096 }
1097}
void(* PulseStoneNotificationCallback)(void)
Definition 77480.c:33
@ 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:3528
void pulse_stone_notification_setup(void)
Definition pulse_stone.c:72

Referenced by update_player().

◆ clear_ispy_icon()

void clear_ispy_icon ( void )

Definition at line 1056 of file 77480.c.

Referenced by player_reset_data().

◆ render_pulse_stone_icon()

void render_pulse_stone_icon ( void )

Definition at line 1099 of file 77480.c.

1099 {
1102 }
1103}
void appendGfx_pulse_stone_icon(void)
Definition pulse_stone.c:83

Referenced by player_render_interact_prompts().

◆ clear_pulse_stone_icon()

void clear_pulse_stone_icon ( void )

Definition at line 1105 of file 77480.c.

Referenced by player_reset_data().

◆ check_for_conversation_prompt()

void check_for_conversation_prompt ( void )

Definition at line 1123 of file 77480.c.

1123 {
1125 return;
1126 }
1127
1130 return;
1131 }
1132
1137 } else {
1139 return;
1140 }
1141 }
1142
1145 }
1146}
s32 has_valid_conversation_npc(void)
Definition 77480.c:1110
void(* TalkNotificationCallback)(void)
Definition 77480.c:34
void(* InteractNotificationCallback)(void)
Definition 77480.c:35
void interact_speech_setup(void)

Referenced by update_player().

◆ render_conversation_prompt()

void render_conversation_prompt ( void )

Definition at line 1148 of file 77480.c.

1148 {
1151 }
1152}
void appendGfx_speech_bubble(void)

Referenced by player_render_interact_prompts().

◆ clear_conversation_prompt()

void clear_conversation_prompt ( void )

Definition at line 1154 of file 77480.c.

Referenced by player_reset_data().

◆ check_for_interactables()

void check_for_interactables ( void )

Definition at line 1206 of file 77480.c.

1206 {
1210
1212 return;
1213 }
1214
1217
1218 if (playerStatus->inputDisabledCount != 0) {
1221 }
1222 return;
1223 }
1224
1225 if (playerStatus->timeInAir != 0) {
1226 return;
1227 }
1228
1229 if (curInteraction == NO_COLLIDER) {
1231
1235 switch (get_entity_type(floor)) {
1241 case ENTITY_TYPE_CHEST:
1244 break;
1245 }
1246 } else if (
1249 && (npc != NULL)
1251 ) {
1253 if (playerStatus->interactingWithID == curInteraction) {
1254 return;
1255 }
1256 } else {
1257 playerStatus->interactingWithID = NO_COLLIDER;
1259 return;
1260 }
1261 } else {
1264 if (!phys_can_player_interact()) {
1265 playerStatus->interactingWithID = NO_COLLIDER;
1267 return;
1268 }
1269 } else {
1272 playerStatus->interactingWithID = NO_COLLIDER;
1274 return;
1275 }
1276 }
1277 }
1278 }
1279 if (playerStatus->interactingWithID == curInteraction) {
1280 if ((playerStatus->flags & PS_FLAG_INTERACTED)) {
1281 return;
1282 }
1283 } else {
1285 }
1286
1287 playerStatus->interactingWithID = curInteraction;
1289 if (playerStatus->actionState == ACTION_STATE_IDLE || playerStatus->actionState == ACTION_STATE_WALK || playerStatus->actionState == ACTION_STATE_RUN) {
1291 func_800EF3D4(2);
1292 }
1293 }
1294 }
1295
1296 if (!(playerStatus->animFlags & PA_FLAG_INTERACT_PROMPT_AVAILABLE)) {
1297 func_800EF3D4(0);
1299 return;
1300 }
1301
1305
1306 }
1307
1310 }
1311}
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:1158
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:155
s32 flags
CollisionStatus gCollisionStatus
Definition 7BB60.c:5

Referenced by update_player().

◆ render_interact_prompt()

void render_interact_prompt ( void )

Definition at line 1315 of file 77480.c.

1315 {
1318 }
1319}
void appendGfx_interact_prompt(void)

Referenced by player_render_interact_prompts().

◆ clear_interact_prompt()

void clear_interact_prompt ( void )

Definition at line 1321 of file 77480.c.

Referenced by player_reset_data().

◆ update_partner_timers()

void update_partner_timers ( void )

Definition at line 1328 of file 77480.c.

1328 {
1330
1332 s32 i;
1333
1334 for (i = 1; i < ARRAY_COUNT(playerData->partnerUnlockedTime); i++) {
1335 if (playerData->partners[i].enabled) {
1337 }
1338 }
1339 }
1340}
PlayerData gPlayerData
Definition 77480.c:39
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 1346 of file 77480.c.

1346 {
1350 s32 trueAnim;
1351 s32 sprIndex;
1352 f32 angle;
1353 s32 direction;
1354 f32 timescale;
1355
1356 D_800F7B48 = 0.0f;
1358 camRelativeYaw = 0.0f;
1359 direction = 0;
1360 } else if (camRelativeYaw > 5.0f && camRelativeYaw < 175.0f) {
1361 camRelativeYaw = 180.0f;
1362 direction = 1;
1363 } else {
1364 // direction is close to flipping, use saved value
1366 direction = 2;
1367 }
1368 // detect direction change
1369 if (PrevPlayerDirection != direction && direction != 2) {
1370 PrevPlayerDirection = direction;
1371 playerStatus->flipYaw[gCurrentCameraID] = (direction != 0) ? 180.0f : -180.0f;
1372
1373 if (fabsf(get_clamped_angle_diff(cameraYaw, playerStatus->curYaw)) >= 90.0f) {
1375 }
1376 }
1377 // handle sprite 'flipping' when changing direction
1378 angle = playerStatus->flipYaw[gCurrentCameraID];
1379 if (angle != 0.0f) {
1380 if (angle < 0.0f) {
1381 angle += 28.0f;
1382 if (angle > 0.0f) {
1383 angle = 0.0f;
1384 }
1385 }
1386 if (angle > 0.0f) {
1387 angle -= 28.0f;
1388 if (angle < 0.0f) {
1389 angle = 0.0f;
1390 }
1391 }
1392 }
1393
1394 if (playerStatus->flags & PS_FLAG_NO_FLIPPING) {
1395 angle = 0.0f;
1396 }
1397
1398 playerStatus->flipYaw[gCurrentCameraID] = angle;
1399
1401 angle = clamp_angle(playerStatus->flipYaw[gCurrentCameraID] + angle);
1402 if (playerStatus->curSpeed == 0.0f) {
1403 D_800F7B48 = 0.0f;
1404 }
1405
1406 trueAnim = playerStatus->anim;
1407 if (!(playerStatus->flags & PS_FLAG_SPINNING)) {
1408 sprIndex = (playerStatus->anim >> 0x10) & 0xFF;
1409
1411 if (!(playerStatus->flags & PS_FLAG_FACE_FORWARD)
1413 && playerStatus->spriteFacingAngle < 350.0f && playerStatus->spriteFacingAngle > 190.0f
1414 ) {
1416 }
1417 } else {
1418 playerStatus->spriteFacingAngle = angle + D_800F7B48;
1419 if (!(playerStatus->flags & PS_FLAG_FACE_FORWARD)
1422 ) {
1424 }
1425 playerStatus->curYaw = playerStatus->targetYaw;
1426 }
1427 }
1428 playerStatus->trueAnimation = trueAnim;
1429
1430 timescale = 1.0f;
1432 timescale = 0.5f;
1433 }
1434 if (playerStatus->flags & PS_FLAG_TIME_STOPPED) {
1435 timescale = 0.0f;
1436 }
1439}
f32 D_800F7B48
Definition 77480.c:1344
s32 get_player_back_anim(s32 arg0)
Definition 77480.c:1441
#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:604
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:6
s32 PrevPlayerCamRelativeYaw
Definition 7E9D0.c:31
s32 gCurrentCameraID
Definition cam_math.c:5

Referenced by update_player().

◆ get_player_back_anim()

s32 get_player_back_anim ( s32 arg0)

Definition at line 1441 of file 77480.c.

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

Referenced by player_update_sprite().

◆ appendGfx_player()

void appendGfx_player ( void * data)

Definition at line 1543 of file 77480.c.

1543 {
1547 s32 spriteIdx;
1548
1549 if (playerStatus->actionState == ACTION_STATE_SLIDING) {
1551 guRotateF(sp20, temp_f0, 0.0f, 1.0f, 0.0f);
1553 guRotateF(spA0, playerStatus->spriteFacingAngle, 0.0f, 1.0f, 0.0f);
1555 guTranslateF(sp60, playerStatus->pos.x, playerStatus->pos.y - 1.0f, playerStatus->pos.z);
1558 } else {
1559 guRotateF(spA0, temp_f0, 0.0f, -1.0f, 0.0f);
1560 guRotateF(sp20, clamp_angle(playerStatus->pitch), 0.0f, 0.0f, 1.0f);
1562 guTranslateF(sp60, 0.0f, -playerStatus->colliderHeight * 0.5f, 0.0f);
1564 guRotateF(spA0, temp_f0, 0.0f, 1.0f, 0.0f);
1566 guRotateF(spA0, playerStatus->spriteFacingAngle, 0.0f, 1.0f, 0.0f);
1568 guTranslateF(sp60, 0.0f, playerStatus->colliderHeight * 0.5f, 0.0f);
1572 guTranslateF(sp60, playerStatus->pos.x, playerStatus->pos.y, playerStatus->pos.z);
1574
1575 if (playerStatus->animFlags & PA_FLAG_SHIVERING) {
1576 playerStatus->animFlags = playerStatus->animFlags & ~PA_FLAG_SHIVERING;
1577 playerStatus->shiverTime = 22;
1580 }
1581
1582 if (playerStatus->shiverTime != 0) {
1583 playerStatus->shiverTime--;
1584 if (playerStatus->shiverTime == 0) {
1586 }
1587 }
1588
1589 if (playerStatus->spriteFacingAngle >= 90.0f && playerStatus->spriteFacingAngle < 270.0f) {
1591 } else {
1593 }
1594
1596 }
1597}
f32 Matrix4f[4][4]
#define guRotateF
#define guTranslateF
#define guMtxCatF
#define guScaleF
@ IMGFX_CLEAR
Definition enums.h:5116
@ IMGFX_SET_ANIM
Definition enums.h:5121
@ IMGFX_ANIM_SHIVER
Definition enums.h:5138
@ PA_FLAG_SHIVERING
Definition enums.h:3101
#define SPRITE_WORLD_SCALE_D
Definition macros.h:144
void set_player_imgfx_all(s32 animID, ImgFXType imgfxType, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6)
Definition sprite.c:994
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:968
@ DRAW_SPRITE_UPSIDE_DOWN
Definition sprite.h:19
s16 gCurrentCamID
Definition cam_main.c:12

Referenced by render_player_model().

◆ appendGfx_player_spin()

void appendGfx_player_spin ( void * data)

Only used when speedy spinning.

Definition at line 1600 of file 77480.c.

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

1685 {
1689 f32 shadowScale = 0.0f;
1690 f32 yawTemp = 0.0f;
1692 f32 hitRx, hitRz;
1693 f32 x, y, z;
1696
1697 if (playerStatus->spriteFacingAngle >= 90.0f && playerStatus->spriteFacingAngle < 270.0f) {
1698 yawTemp = 180.0f;
1699 }
1700
1701 raycastYaw = (yawTemp - 90.0f) + gCameras[gCurrentCameraID].curYaw;
1702 shadow->pos.x = playerX = playerStatus->pos.x;
1703 shadow->pos.z = playerZ = playerStatus->pos.z;
1704 x = playerX;
1705 y = playerStatus->pos.y + (playerStatus->colliderHeight / 3.5f);
1706 z = playerZ;
1707 shadowScale = 1024.0f;
1709 &shadowScale, &hitRx, &hitRz, &hitDirX, &hitDirZ);
1710 shadow->rot.x = hitRx;
1711 shadow->rot.z = hitRz;
1712 shadow->rot.y = clamp_angle(-camera->curYaw);
1713 hitRx += 180.0f;
1714 hitRz += 180.0f;
1715
1716 if (hitRx != 0.0f || hitRz != 0.0f) {
1717 s32 dist = dist2D(x, z, playerStatus->pos.x, playerStatus->pos.z);
1718 f32 tan = atan2(playerStatus->pos.x, playerStatus->pos.z, x, z);
1719 s32 angleTemp = clamp_angle((-90.0f - tan) + get_player_normal_yaw());
1720
1724 }
1725 }
1726
1727 shadow->pos.y = y;
1728 shadow->alpha = (f64)playerStatus->curAlpha / 2;
1729
1731 set_peach_shadow_scale(shadow, shadowScale);
1732 } else {
1733 set_standard_shadow_scale(shadow, shadowScale);
1734 }
1735}
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:70
#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:668
void set_peach_shadow_scale(Shadow *shadow, f32 scale)
Definition entity.c:1705
#define SQ(x)
Definition macros.h:170

Referenced by update_player().

◆ partner_use_ability()

s32 partner_use_ability ( void )

Definition at line 964 of file partners.c.

964 {
966
968 && wPartner != NULL
970 {
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:2816
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 70 of file 77480.c.

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

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 192 of file 77480.c.

193 {
194 f32 yaw = 0.0f;
195
196 if (playerStatus->spriteFacingAngle >= 90.0f && playerStatus->spriteFacingAngle < 270.0f) {
197 yaw = 180.0f;
198 }
199
200 return player_raycast_below(yaw - 90.0f + gCameras[gCurrentCameraID].curYaw, playerStatus->colliderDiameter,
202}

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 254 of file 77480.c.

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

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 369 of file 77480.c.

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

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 495 of file 77480.c.

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

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 562 of file 77480.c.

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

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

◆ update_player()

void update_player ( void )

Definition at line 624 of file 77480.c.

624 {
627
628 #if DX_DEBUG_MENU
631 gPlayerStatus.runSpeed = 12.0f;
632 }
633 #endif
634
636
637 if ((playerStatus->timeInAir > 100) || (playerStatus->pos.y < -2000.0f)) {
638 if (!(playerStatus->animFlags & PA_FLAG_NO_OOB_RESPAWN)) {
639 playerStatus->timeInAir = 0;
640 playerStatus->pos.x = playerStatus->lastGoodPos.x;
641 playerStatus->pos.y = playerStatus->lastGoodPos.y;
642 playerStatus->pos.z = playerStatus->lastGoodPos.z;
643
644 if (playerStatus->animFlags & PA_FLAG_RIDING_PARTNER) {
645 Npc* partner;
646
649 partner->pos.x = playerStatus->lastGoodPos.x;
650 partner->pos.y = playerStatus->lastGoodPos.y + playerStatus->colliderHeight;
651 partner->pos.z = playerStatus->lastGoodPos.z;
652 partner->moveToPos.y = playerStatus->lastGoodPos.y;
653 } else {
654 playerStatus->timeInAir = 10;
655 }
656 }
657 }
658
659 collisionStatus->curWall = NO_COLLIDER;
660 collisionStatus->lastWallHammered = NO_COLLIDER;
661 collisionStatus->curInspect = NO_COLLIDER;
662 collisionStatus->floorBelow = TRUE;
663
667
672 }
673 } else if (playerStatus->actionState != ACTION_STATE_HIT_LAVA) {
675 } else {
677 }
678
680 playerStatus->moveFrames--;
681 if (playerStatus->moveFrames <= 0) {
682 playerStatus->moveFrames = 0;
684 }
685 }
686
687 if (!(playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS)) {
689 }
690
692
697
699 if (!(playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS)) {
701 }
702
704
709
710 playerStatus->pushVel.x = 0.0f;
711 playerStatus->pushVel.y = 0.0f;
712 playerStatus->pushVel.z = 0.0f;
715}
void phys_update_lava_reset(void)
Definition 77480.c:792
b32 check_player_action_debug(void)
Definition 77480.c:1015
void update_partner_timers(void)
Definition 77480.c:1328
void phys_update_standard(void)
Definition 77480.c:736
void update_player_blink(void)
Definition 77480.c:923
void check_for_pulse_stone(void)
unavoidable use of hardcoded map and area IDs
Definition 77480.c:1062
void check_for_conversation_prompt(void)
Definition 77480.c:1123
void update_player_shadow(void)
Definition 77480.c:1685
void player_update_sprite(void)
Definition 77480.c:1346
void check_for_ispy(void)
Definition 77480.c:1034
void check_for_interactables(void)
Definition 77480.c:1206
@ 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:21
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:993
GameStatus gGameStatus
Definition main_loop.c:20

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 717 of file 77480.c.

717 {
720 u32 actionState = playerStatus->actionState;
721
722 if (!(playerStatus->animFlags & PA_FLAG_8BIT_MARIO)
723 && (playerStatus->animFlags & PA_FLAG_FORCE_USE_PARTNER || playerStatus->inputDisabledCount == 0)
724 && (playerStatus->pressedButtons & BUTTON_C_DOWN && !(playerStatus->flags & PS_FLAG_NO_PARTNER_USAGE))
725 && !(playerStatus->pressedButtons & BUTTON_B)
727 && actionState <= ACTION_STATE_RUN
728 ) {
729 if (playerData->curPartner == PARTNER_GOOMBARIO) {
730 WorldTattleInteractionID = playerStatus->interactingWithID;
731 }
733 }
734}
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 806 of file 77480.c.

806 {
808}
#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 810 of file 77480.c.

810 {
812
817 playerStatus->pos.z);
824}
void clear_pulse_stone_icon(void)
Definition 77480.c:1105
void clear_interact_prompt(void)
Definition 77480.c:1321
void clear_conversation_prompt(void)
Definition 77480.c:1154
void clear_ispy_icon(void)
Definition 77480.c:1056
@ SHADOW_VARYING_CIRCLE
Definition enums.h:2535
@ PS_FLAG_HAS_REFLECTION
Definition enums.h:3034
void reset_player_status(void)
Definition 7B440.c:57
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 826 of file 77480.c.

826 {
833 return FALSE;
834 }
835 return TRUE;
836}
@ 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 838 of file 77480.c.

838 {
841
843 && anim != ANIM_Mario1_Flail
844 && anim != ANIM_Mario1_Jump
845 ) {
846 return -1;
847 }
848
849 if (partnerStatus->partnerActionState != PARTNER_ACTION_NONE) {
850 if (partnerStatus->actingPartner == PARTNER_LAKILESTER && anim == ANIM_Mario1_Idle) {
852 }
853
854 if (partnerStatus->partnerActionState != PARTNER_ACTION_NONE
855 && partnerStatus->actingPartner == PARTNER_BOW
856 && anim != ANIM_Mario1_Crouch
857 && anim != ANIM_Mario1_Idle
858 ) {
859 return -1;
860 }
861 }
862
863 if (anim == ANIM_Mario1_ThumbsUp && partnerStatus->partnerActionState == PARTNER_ACTION_USE) {
864 return -1;
865 }
866
867 if (anim == ANIM_MarioW1_Lift || anim == ANIM_Peach2_SpreadArms || anim == ANIM_Mario1_Idle) {
868 if (!(playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS)) {
869 if (!is_player_dismounted()) {
870 return -1;
871 }
872 } else if (!(playerStatus->animFlags & PA_FLAG_INVISIBLE)) {
874 } else {
876 return -1;
877 }
878 } else if (playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS) {
879 if (playerStatus->peachItemHeld != PEACH_BAKING_NONE
880 && (anim == ANIM_Peach2_RaiseArms || anim == ANIM_Peach2_Talk || anim == ANIM_Peach2_LowerArms)
881 ) {
883 }
884 }
885
886 if (anim == ANIM_MarioW2_Collapse) {
887 exec_ShakeCam1(0, 0, 2);
888 }
889
890 return anim;
891}
b32 is_player_dismounted(void)
Definition 77480.c:826
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 904 of file 77480.c.

904 {
906
907 playerStatus->anim = anim;
908 playerStatus->animNotifyValue = 0;
910}

◆ suggest_player_anim_always_forward()

◆ get_xz_dist_to_player()

◆ enable_player_shadow()

void enable_player_shadow ( void )

Definition at line 963 of file 77480.c.

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 )

◆ disable_player_input()

◆ enable_player_input()

◆ func_800E01DC()

void func_800E01DC ( void )

Definition at line 1007 of file 77480.c.

1007 {
1009
1012 }
1013}

◆ check_player_action_debug()

b32 check_player_action_debug ( void )

Definition at line 1015 of file 77480.c.

1015 {
1019 }
1020 return TRUE;
1021 }
1022 return FALSE;
1023}
@ DEBUG_SCRIPTS_NONE
Definition enums.h:4274
@ 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 1027 of file 77480.c.

1027 {
1032}
void render_interact_prompt(void)
Definition 77480.c:1315
void render_conversation_prompt(void)
Definition 77480.c:1148
void render_pulse_stone_icon(void)
Definition 77480.c:1099
void render_ispy_icon(void)
Definition 77480.c:1050

Referenced by gfx_draw_frame().

◆ has_valid_conversation_npc()

s32 has_valid_conversation_npc ( void )

Definition at line 1110 of file 77480.c.

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

Referenced by check_for_conversation_prompt(), and should_continue_pulse_stone().

◆ func_800E06C0()

void func_800E06C0 ( s32 arg0)

Definition at line 1159 of file 77480.c.

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

Referenced by update_triggers().

◆ func_800E06D8()

s32 func_800E06D8 ( void )

Definition at line 1163 of file 77480.c.

1163 {
1165 s32 currentWall;
1166
1167 if (playerStatus->timeInAir != 0 || playerStatus->inputDisabledCount != 0) {
1168 return FALSE;
1169 }
1171 return FALSE;
1172 }
1175 && playerStatus->encounteredNPC != NULL
1176 && playerStatus->encounteredNPC->flags & NPC_FLAG_USE_INSPECT_ICON
1177 ) {
1179 return TRUE;
1180 }
1181
1185 return FALSE;
1186 }
1187 } else if (!phys_can_player_interact()) {
1188 playerStatus->interactingWithID = NO_COLLIDER;
1189 return FALSE;
1191 return FALSE;
1192 }
1193
1194 if (playerStatus->interactingWithID == currentWall) {
1195 if (playerStatus->flags & PS_FLAG_INTERACTED) {
1196 return FALSE;
1197 }
1198 } else {
1200 }
1201 playerStatus->interactingWithID = NO_COLLIDER;
1202
1203 return TRUE;
1204}

Referenced by should_continue_pulse_stone().

◆ appendGfx_interact_prompt()

void appendGfx_interact_prompt ( void )

Definition at line 63 of file inspect_icon.c.

63 {
66
74
78
79 ifxImg.raster = inspect_icon_img;
80 ifxImg.palette = inspect_icon_pal;
83 ifxImg.xOffset = -16;
84 ifxImg.yOffset = 26;
85 ifxImg.alpha = 255;
91
93 }
94}
Mtx matrixStack[0x200]
#define guMtxF2L
@ IMGFX_FLAG_40
Definition enums.h:5098
@ IMGFX_FLAG_400
Definition enums.h:5102
@ IMGFX_FLAG_8
Definition enums.h:5095
s32 imgfx_appendGfx_component(s32, ImgFXTexture *, u32, Matrix4f)
Definition imgfx.c:703
void imgfx_update(u32, ImgFXType, s32, s32, s32, s32, s32)
Definition imgfx.c:486
InspectIconData * InspectIconPtr
Gfx * gMainGfxPos
Definition cam_main.c:14
u16 gMatrixListPos
Definition main_loop.c:44
PlayerStatus gPlayerStatus
Definition 77480.c:38
DisplayContext * gDisplayContext
Definition cam_main.c:15

Referenced by render_interact_prompt().

◆ render_player()

void render_player ( void )

Definition at line 1488 of file 77480.c.

1488 {
1491 }
1492}
void render_player_model(void)
Definition 77480.c:1494

Referenced by render_frame().

◆ render_player_model()

void render_player_model ( void )

Definition at line 1494 of file 77480.c.

1494 {
1496 RenderTask* rtPtr = &task;
1498 s32 x, y, z;
1499
1500 if (playerStatus->flags & PS_FLAG_SPRITE_REDRAW) {
1503 playerStatus->pos.z, &x, &y, &z);
1504 if (!(playerStatus->flags & PS_FLAG_SPINNING)) {
1505 if (playerStatus->curAlpha != playerStatus->prevAlpha) {
1506 if (playerStatus->curAlpha < 254) {
1507 if (playerStatus->animFlags & PA_FLAG_MAP_HAS_SWITCH) {
1509 } else {
1511 }
1513
1514 } else {
1515 playerStatus->renderMode = RENDER_MODE_ALPHATEST;
1517 }
1518 }
1519
1520 playerStatus->prevAlpha = playerStatus->curAlpha;
1521
1522 } else {
1524 playerStatus->prevAlpha = 0;
1525 }
1526
1527 if (!(playerStatus->animFlags & PA_FLAG_INVISIBLE)) {
1528 rtPtr->appendGfxArg = playerStatus;
1529 rtPtr->dist = -z;
1530 rtPtr->renderMode = playerStatus->renderMode;
1531
1532 if (playerStatus->flags & PS_FLAG_SPINNING) {
1533 rtPtr->appendGfx = appendGfx_player_spin;
1534 } else {
1535 rtPtr->appendGfx = appendGfx_player;
1536 }
1537
1539 }
1540 }
1541}
void appendGfx_player_spin(void *data)
Only used when speedy spinning.
Definition 77480.c:1600
void appendGfx_player(void *data)
Definition 77480.c:1543
#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:409

Referenced by render_player().

Variable Documentation

◆ ISpyNotificationCallback

void(* ISpyNotificationCallback) (void) ( void )

◆ PulseStoneNotificationCallback

◆ TalkNotificationCallback

◆ InteractNotificationCallback

◆ D_8010C950

s32 D_8010C950

Definition at line 36 of file 77480.c.

Referenced by func_800E06C0(), and interact_inspect_setup().

◆ gPlayerStatus

PlayerStatus gPlayerStatus

Definition at line 38 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 39 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(), 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_action_command_attempt_count(), increment_action_command_success_count(), 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 1344 of file 77480.c.

Referenced by player_update_sprite().