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

Go to the source code of this file.

Functions

HitID collision_check_player_intersecting_world (s32 mode, s32 arg1, f32 yaw)
 
HitID phys_check_interactable_collision (void)
 
void phys_save_ground_pos (void)
 
void record_jump_apex (void)
 
b32 can_trigger_loading_zone (void)
 
void move_player (s32 duration, f32 heading, f32 speed)
 
HitID collision_main_above (void)
 
void handle_jumping_land_on_switch (void)
 
void handle_jumping_launch (void)
 
void phys_update_jump (void)
 
void phys_init_integrator_for_current_state (void)
 
void gravity_use_fall_parms (void)
 
void phys_update_falling (void)
 
void player_handle_floor_collider_type (s32 colliderID)
 
void phys_player_land (void)
 
f32 integrate_gravity (void)
 
f32 player_fall_distance (void)
 
f32 player_check_collision_below (f32 offset, s32 *colliderID)
 
void collision_main_lateral (void)
 
HitID func_800E4404 (s32 mode, s32 offsetY, f32 arg2, f32 *outX, f32 *outY, f32 *outZ)
 
void collision_check_player_overlaps (void)
 
s32 phys_should_player_be_sliding (void)
 
void phys_set_player_sliding_check (b32(*funcPtr)(void))
 
s32 phys_is_on_sloped_ground (void)
 
void phys_main_collision_below (void)
 
void func_800E4AD8 (s32 mode)
 
void func_800E4B40 (s32 mode, f32 *outX, f32 *outY, f32 *outZ)
 
void collision_lava_reset_check_additional_overlaps (void)
 
void collision_lateral_peach (void)
 
void check_input_midair_jump (void)
 
s8 get_current_partner_id (void)
 
void try_player_footstep_sounds (s32 interval)
 
void phys_update_interact_collider (void)
 
s32 phys_can_player_interact (void)
 
f32 player_get_side_angle (void)
 
f32 player_get_camera_facing_angle (void)
 

Variables

CollisionStatus gCollisionStatus
 
f32 JumpedOnSwitchX
 
f32 JumpedOnSwitchZ
 
f32 StepUpLastYaw
 
f32 StepUpLastY
 
s16 FootstepSoundSelector = 0
 
f32 GravityParamsStartJump [] = { 15.7566404343f, -7.38624f, 3.44693994522f, -0.75f }
 
f32 GravityParamsStartFall [] = { 0.154342994094f, -0.350080013275f, -0.182262003422f, 0.0115200001746f }
 
b32(* PlayerSlidingCallback )(void) = NULL
 

Function Documentation

◆ collision_check_player_intersecting_world()

HitID collision_check_player_intersecting_world ( s32 mode,
s32 arg1,
f32 yaw )

Definition at line 754 of file 7BB60.c.

754 {
756 f32 angle = 0.0f;
757 s32 i;
758
759 for (i = 0; i < 4; i++) {
763 s32 hitID, hitID2;
764
765 hitID = player_test_lateral_overlap(mode, gPlayerStatusPtr, &x, &y, &z, 0.0f, angle);
766
767 // required to match
768 if (hitID > 0 || hitID == 0) {
769 hitID2 = hitID;
770 } else if (hitID == -1) {
771 hitID2 = hitID;
772 } else {
773 hitID2 = hitID;
774 }
775
776 if (hitID2 > NO_COLLIDER) {
777 ret = hitID2;
778 }
780
783 angle += 90.0f;
784 }
785
786 return ret;
787}
BSS s32 PopupMenu_SelectedIndex
s32 HitID
s32 player_test_lateral_overlap(s32, PlayerStatus *, f32 *, f32 *, f32 *, f32, f32)
Definition 77480.c:369
#define NO_COLLIDER
Definition macros.h:160
PlayerStatus * gPlayerStatusPtr

Referenced by collision_main_lateral(), and func_800E4AD8().

◆ phys_check_interactable_collision()

HitID phys_check_interactable_collision ( void )

Definition at line 1130 of file 7BB60.c.

1130 {
1133 f32 x, y, z, yaw;
1134
1135 if (playerStatus->flags & PS_FLAG_INPUT_DISABLED) {
1136 return ret;
1137 }
1138
1139 if (playerStatus->pressedButtons & BUTTON_A) {
1140 yaw = playerStatus->targetYaw;
1141 x = playerStatus->pos.x;
1142 y = playerStatus->pos.y;
1143 z = playerStatus->pos.z;
1144 ret = player_test_move_with_slipping(playerStatus, &x, &y, &z, playerStatus->colliderDiameter * 0.5f, yaw);
1145
1146 if (ret <= NO_COLLIDER && playerStatus->curSpeed == 0.0f) {
1147 yaw = playerStatus->spriteFacingAngle - 90.0f + gCameras[gCurrentCameraID].curYaw;
1148 x = playerStatus->pos.x;
1149 y = playerStatus->pos.y;
1150 z = playerStatus->pos.z;
1151 ret = player_test_move_with_slipping(playerStatus, &x, &y, &z, playerStatus->colliderDiameter * 0.5f, yaw);
1152 }
1153 }
1154
1155 return ret;
1156}
@ BUTTON_A
Definition enums.h:2790
@ PS_FLAG_INPUT_DISABLED
Definition enums.h:3052
HitID player_test_move_with_slipping(PlayerStatus *playerStatus, f32 *posX, f32 *posY, f32 *posZ, f32 speed, f32 heading)
Definition 77480.c:562
Camera gCameras[4]
Definition cam_main.c:16
PlayerStatus gPlayerStatus
Definition 77480.c:38
s32 gCurrentCameraID
Definition cam_math.c:5

Referenced by phys_update_interact_collider().

◆ phys_save_ground_pos()

void phys_save_ground_pos ( void )

Definition at line 1202 of file 7BB60.c.

1202 {
1204
1206 playerStatus->lastGoodPos.y = playerStatus->pos.y;
1207 playerStatus->lastGoodPos.z = playerStatus->pos.z;
1208}

Referenced by phys_main_collision_below().

◆ record_jump_apex()

◆ can_trigger_loading_zone()

b32 can_trigger_loading_zone ( void )

Definition at line 21 of file 7BB60.c.

21 {
23 s32 actionState = gPlayerStatusPtr->actionState;
25
26 if (actionState == ACTION_STATE_IDLE ||
27 actionState == ACTION_STATE_WALK ||
28 actionState == ACTION_STATE_RUN ||
29 actionState == ACTION_STATE_USE_TWEESTER ||
30 actionState == ACTION_STATE_SPIN
31 ) {
32 return TRUE;
33 }
34
35 if (actionState == ACTION_STATE_RIDE) {
36 if (playerData->curPartner == PARTNER_LAKILESTER || playerData->curPartner == PARTNER_BOW) {
37 if (partnerStatus->partnerActionState != PARTNER_ACTION_NONE) {
38 return TRUE;
39 } else {
41 return FALSE;
42 }
43 } else {
44 if (partnerStatus->actingPartner == PARTNER_WATT || partnerStatus->actingPartner == PARTNER_SUSHIE) {
45 return partnerStatus->partnerActionState != PARTNER_ACTION_NONE;
46 }
47 if (partnerStatus->actingPartner == PARTNER_PARAKARRY) {
49 return FALSE;
50 }
51 }
52 }
53 return FALSE;
54}
@ PARTNER_ACTION_NONE
Definition enums.h:2932
@ PA_FLAG_INTERRUPT_USE_PARTNER
forces actions with bow, parakarry, watt, and lakilester to end (sushie not tested)
Definition enums.h:3093
@ PARTNER_LAKILESTER
Definition enums.h:2893
@ PARTNER_WATT
Definition enums.h:2891
@ PARTNER_BOW
Definition enums.h:2894
@ PARTNER_SUSHIE
Definition enums.h:2892
@ PARTNER_PARAKARRY
Definition enums.h:2889
@ ACTION_STATE_RIDE
Definition enums.h:2461
@ ACTION_STATE_IDLE
Definition enums.h:2426
@ ACTION_STATE_USE_TWEESTER
Definition enums.h:2459
@ ACTION_STATE_WALK
Definition enums.h:2427
@ ACTION_STATE_SPIN
Definition enums.h:2454
@ ACTION_STATE_RUN
Definition enums.h:2428
PartnerStatus gPartnerStatus
Definition partners.c:42
PlayerData gPlayerData
Definition 77480.c:39

◆ move_player()

void move_player ( s32 duration,
f32 heading,
f32 speed )

Definition at line 56 of file 7BB60.c.

56 {
58 gPlayerStatus.heading = heading;
59 gPlayerStatus.moveFrames = duration;
60 gPlayerStatus.curSpeed = speed;
61
64 }
65}
@ PS_FLAG_CUTSCENE_MOVEMENT
Definition enums.h:3054
@ PA_FLAG_RIDING_PARTNER
Definition enums.h:3116
void set_action_state(s32 actionState)
Definition 7E9D0.c:209

Referenced by entity_BlueWarpPipe_set_player_move_to_center().

◆ collision_main_above()

HitID collision_main_above ( void )

Definition at line 67 of file 7BB60.c.

67 {
71 f32 x, y, z;
72 f32 halfHeight;
73 f32 moveAngle;
76
77 outDepth = halfHeight = playerStatus->colliderHeight * 0.5f;
78 x = playerStatus->pos.x;
79 y = playerStatus->pos.y + halfHeight;
80 z = playerStatus->pos.z;
81
83
84 if (moveMagnitude != 0.0f) {
85 moveAngle = playerStatus->targetYaw;
86 } else {
87 moveAngle = playerStatus->spriteFacingAngle - 90.0f + gCameras[gCurrentCameraID].curYaw;
88 }
89
90 hitResult = player_raycast_up_corners(playerStatus, &x, &y, &z, &outDepth, moveAngle);
91 collisionStatus->curCeiling = hitResult;
92
93 if (hitResult > NO_COLLIDER) {
94 if (playerStatus->actionState != ACTION_STATE_FALLING
95 && playerStatus->actionState != ACTION_STATE_STEP_DOWN
96 && collisionStatus->curFloor <= NO_COLLIDER
97 ) {
98 if (outDepth <= fabsf(halfHeight + playerStatus->gravityIntegrator[0])) {
100 return hitResult;
101 }
102
103 playerStatus->pos.y = y - ((playerStatus->colliderHeight / 5.0f) * 3.0f);
104 if (playerStatus->actionState != ACTION_STATE_TORNADO_JUMP
105 && playerStatus->actionState != ACTION_STATE_SPIN_JUMP
106 ) {
107 playerStatus->gravityIntegrator[0] = 0.0f;
108 playerStatus->gravityIntegrator[1] = 0.0f;
109 playerStatus->gravityIntegrator[2] = 0.0f;
110 playerStatus->gravityIntegrator[3] = 0.0f;
111 }
112 }
113 }
114 }
115
116 return hitResult;
117}
CollisionStatus gCollisionStatus
Definition 7BB60.c:5
@ ENTITY_TYPE_BRICK_BLOCK
Definition enums.h:2556
@ ACTION_STATE_SPIN_JUMP
Definition enums.h:2441
@ ACTION_STATE_FALLING
Definition enums.h:2435
@ ACTION_STATE_STEP_DOWN
Definition enums.h:2436
@ ACTION_STATE_TORNADO_JUMP
Definition enums.h:2443
f32 fabsf(f32 f)
void player_input_to_move_vector(f32 *angle, f32 *magnitude)
Definition 7B440.c:139
u32 get_entity_type(s32 arg0)
Definition entity.c:568
HitID player_raycast_up_corners(PlayerStatus *, f32 *, f32 *, f32 *, f32 *, f32)
Definition 77480.c:254
#define COLLISION_WITH_ENTITY_BIT
Definition macros.h:156

Referenced by phys_update_standard().

◆ handle_jumping_land_on_switch()

void handle_jumping_land_on_switch ( void )

Definition at line 119 of file 7BB60.c.

119 {
121 s32 colliderID;
123 AnimID anim;
124
128 }
129
130 if (playerStatus->actionSubstate == LANDING_ON_SWITCH_SUBSTATE_0) {
131 if (dist2D(JumpedOnSwitchX, JumpedOnSwitchZ, playerStatus->pos.x, playerStatus->pos.z) <= 22.0f) {
132 add_vec2D_polar(&playerStatus->pos.x, &playerStatus->pos.z, 5.0f, playerStatus->targetYaw);
133 }
135 if (playerStatus->gravityIntegrator[0] <= 0.0f) {
140 }
141 if (playerStatus->gravityIntegrator[0] > playerStatus->maxJumpSpeed) {
142 playerStatus->gravityIntegrator[0] = playerStatus->maxJumpSpeed;
143 }
144 playerStatus->pos.y += playerStatus->gravityIntegrator[0];
145 } else if (playerStatus->actionSubstate == LANDING_ON_SWITCH_SUBSTATE_2) {
146 if (dist2D(JumpedOnSwitchX, JumpedOnSwitchZ, playerStatus->pos.x, playerStatus->pos.z) <= 22.0f) {
147 add_vec2D_polar(&playerStatus->pos.x, &playerStatus->pos.z, 5.0f, playerStatus->targetYaw);
148 }
151 playerStatus->pos.y = groundPosY;
152 if (colliderID > NO_COLLIDER) {
153 if (!(playerStatus->animFlags & PA_FLAG_USING_WATT)) {
154 anim = ANIM_Mario1_Land;
155 } else {
157 }
161 }
162 }
163}
f32 JumpedOnSwitchZ
Definition 7BB60.c:7
f32 integrate_gravity(void)
Definition 7BB60.c:435
void phys_player_land(void)
Definition 7BB60.c:368
void gravity_use_fall_parms(void)
Definition 7BB60.c:301
void player_handle_floor_collider_type(s32 colliderID)
Definition 7BB60.c:325
void record_jump_apex(void)
Definition 7BB60.c:17
f32 JumpedOnSwitchX
Definition 7BB60.c:6
f32 player_fall_distance(void)
Definition 7BB60.c:460
f32 player_check_collision_below(f32 offset, s32 *colliderID)
Definition 7BB60.c:469
u32 AnimID
@ PS_FLAG_ACTION_STATE_CHANGED
Definition enums.h:3084
@ LANDING_ON_SWITCH_SUBSTATE_1
Definition enums.h:2483
@ LANDING_ON_SWITCH_SUBSTATE_0
Definition enums.h:2482
@ LANDING_ON_SWITCH_SUBSTATE_2
Definition enums.h:2484
@ PA_FLAG_USING_WATT
Definition enums.h:3090
s32 enable_player_input(void)
Definition 77480.c:997
f32 dist2D(f32 ax, f32 ay, f32 bx, f32 by)
Definition 43F0.c:668
void suggest_player_anim_allow_backward(AnimID anim)
Definition 77480.c:893
void add_vec2D_polar(f32 *x, f32 *y, f32 r, f32 theta)
Definition 43F0.c:683

Referenced by phys_update_jump().

◆ handle_jumping_launch()

void handle_jumping_launch ( void )

Definition at line 165 of file 7BB60.c.

165 {
167 s32 cond = FALSE;
168
169 if (playerStatus->pos.y < playerStatus->gravityIntegrator[3] + playerStatus->gravityIntegrator[2]) {
170 f32 phi_f6 = (playerStatus->gravityIntegrator[3] - playerStatus->pos.y) / 777.0f;
171
172 if (phi_f6 < -0.47) {
173 phi_f6 = -0.47f;
174 }
175 if (phi_f6 > 0.001) {
176 phi_f6 = 0.001f;
177 }
179 playerStatus->pos.y += playerStatus->gravityIntegrator[0];
180 if (playerStatus->gravityIntegrator[0] <= 0.0f) {
181 cond = TRUE;
182 }
183 } else {
184 playerStatus->gravityIntegrator[0] += -1.2;
185 if (playerStatus->gravityIntegrator[0] <= 0.0f) {
186 cond = TRUE;
187 }
188 playerStatus->pos.y += playerStatus->gravityIntegrator[0];
189 }
190
191 if (cond) {
193 LOAD_INTEGRATOR_FALL(playerStatus->gravityIntegrator);
195 }
196}
f32 gravityIntegrator[4]
#define LOAD_INTEGRATOR_FALL(ptr)
Definition macros.h:190

Referenced by phys_update_jump().

◆ phys_update_jump()

void phys_update_jump ( void )

Definition at line 198 of file 7BB60.c.

198 {
200
201 if (playerStatus->timeInAir != 0) {
202 switch (playerStatus->actionState) {
205 return;
208 return;
211 playerStatus->pos.y += playerStatus->gravityIntegrator[0];
212 if (playerStatus->gravityIntegrator[0] <= 0.0f) {
215 playerStatus->gravityIntegrator[0] = 0.154343f;
216 playerStatus->gravityIntegrator[1] = -0.35008f;
217 playerStatus->gravityIntegrator[2] = 0.0f;
218 playerStatus->gravityIntegrator[3] = 0.0f;
219 } else {
221 }
224 }
225 return;
226 case ACTION_STATE_HOP:
227 playerStatus->gravityIntegrator[0] -= 4.5;
228 playerStatus->pos.y += playerStatus->gravityIntegrator[0];
229 if (playerStatus->gravityIntegrator[0] <= 0.0f) {
234 }
235 return;
238 return;
239 default:
240 if (!(playerStatus->curButtons & BUTTON_A)) {
245 playerStatus->gravityIntegrator[1] *= 0.5f;
246 playerStatus->gravityIntegrator[2] *= 0.5f;
247 playerStatus->gravityIntegrator[3] *= 0.5f;
248 }
249 }
250 break;
251 }
252 }
253
255 if (playerStatus->gravityIntegrator[0] <= 0.0f) {
260 }
261
262 if (playerStatus->gravityIntegrator[0] > playerStatus->maxJumpSpeed) {
263 playerStatus->gravityIntegrator[0] = playerStatus->maxJumpSpeed;
264 }
265 playerStatus->pos.y += playerStatus->gravityIntegrator[0];
266}
void handle_jumping_launch(void)
Definition 7BB60.c:165
void handle_jumping_land_on_switch(void)
Definition 7BB60.c:119
@ PS_FLAG_ENTERING_BATTLE
Definition enums.h:3061
@ ACTION_STATE_HIT_LAVA
Definition enums.h:2451
@ ACTION_STATE_LANDING_ON_SWITCH
Small red/blue ! switches.
Definition enums.h:2434
@ ACTION_STATE_LAUNCH
Shy Guy Toybox jack-in-the-boxes.
Definition enums.h:2433
@ ACTION_STATE_HOP
Released A before apex of jump.
Definition enums.h:2432
@ ACTION_STATE_BOUNCE
Used with Kooper.
Definition enums.h:2431
@ ACTION_STATE_HIT_FIRE
Causes Mario to fly up and take damage. Used for fire bars.
Definition enums.h:2449
s32 is_starting_conversation(void)
Definition encounter.c:2816

Referenced by phys_update_standard().

◆ phys_init_integrator_for_current_state()

void phys_init_integrator_for_current_state ( void )

Definition at line 271 of file 7BB60.c.

Referenced by initialize_jump().

◆ gravity_use_fall_parms()

◆ phys_update_falling()

void phys_update_falling ( void )

Definition at line 315 of file 7BB60.c.

Referenced by phys_update_standard().

◆ player_handle_floor_collider_type()

void player_handle_floor_collider_type ( s32 colliderID)

Definition at line 325 of file 7BB60.c.

325 {
328
329 if (colliderID > NO_COLLIDER) {
331 switch (surfaceType) {
336 break;
338 if ((*(s32*)(&partnerStatus->partnerActionState) & 0xFF0000FF) != 0x01000009) {
339 if (playerStatus->blinkTimer == 0) {
340 if (playerStatus->actionState != ACTION_STATE_HIT_LAVA) {
341 playerStatus->hazardType = HAZARD_TYPE_LAVA;
343 }
344 } else {
346 }
347 }
348 break;
350 if ((*(s32*)(&partnerStatus->partnerActionState) & 0xFF0000FF) != 0x01000009) {
351 if (playerStatus->blinkTimer == 0) {
352 if (playerStatus->actionState != ACTION_STATE_HIT_FIRE) {
353 playerStatus->hazardType = HAZARD_TYPE_SPIKES;
355 }
356 break;
357 }
359 }
360 break;
361 default:
363 break;
364 }
365 }
366}
@ SURFACE_TYPE_WATER
Definition enums.h:4670
@ SURFACE_TYPE_SLIDE
Definition enums.h:4674
@ SURFACE_TYPE_LAVA
Definition enums.h:4672
@ SURFACE_TYPE_DOCK_WALL
Definition enums.h:4673
@ SURFACE_TYPE_SPIKES
Definition enums.h:4671
@ COLLIDER_FLAGS_SURFACE_TYPE_MASK
Definition enums.h:4692
@ HAZARD_TYPE_LAVA
Definition enums.h:3500
@ HAZARD_TYPE_SPIKES
Definition enums.h:3501
@ ACTION_STATE_LAND
Definition enums.h:2437
@ ACTION_STATE_KNOCKBACK
Definition enums.h:2450
s32 get_collider_flags(s32 colliderID)
Definition collision.c:481

Referenced by handle_jumping_land_on_switch(), phys_update_falling(), and player_jump().

◆ phys_player_land()

void phys_player_land ( void )

Definition at line 368 of file 7BB60.c.

368 {
371 f32 moveAngle;
373
374 playerStatus->timeInAir = 0;
375 playerStatus->peakJumpTime = 0;
377 playerStatus->landPos.x = playerStatus->pos.x;
378 playerStatus->landPos.z = playerStatus->pos.z;
381 if (!(collisionStatus->curFloor & COLLISION_WITH_ENTITY_BIT)) {
383 }
384
385 collisionStatus->lastTouchedFloor = -1;
387 s32 entityType = get_entity_type(collisionStatus->curFloor);
388
389 if (entityType <= ACTION_STATE_FALLING) {
390 if (entityType >= ACTION_STATE_LANDING_ON_SWITCH) {
392
394 if (playerStatus->actionState != ACTION_STATE_TORNADO_JUMP
396 && playerStatus->actionState != ACTION_STATE_SPIN_JUMP
397 && playerStatus->actionState != ACTION_STATE_SPIN_POUND
398 ) {
400 } else {
402 playerStatus->actionSubstate = 11;
403 }
404 return;
405 }
406 }
407 }
408
411 return;
412 }
413
414 if (playerStatus->actionState == ACTION_STATE_LANDING_ON_SWITCH) {
416 return;
417 }
418
420 if (moveMagnitude == 0.0f) {
421 if (playerStatus->actionState != ACTION_STATE_STEP_DOWN) {
423 } else {
425 }
426 return;
427 }
428
429 if (moveMagnitude != 0.0f) {
430 playerStatus->targetYaw = moveAngle;
431 }
433}
@ ENTITY_COLLISION_PLAYER_TOUCH_FLOOR
Definition enums.h:2648
@ SOUND_LAND_SOFTLY
Definition enums.h:765
@ ACTION_STATE_STEP_DOWN_LAND
Definition enums.h:2438
@ ACTION_STATE_BOUNCE_OFF_SWITCH
Small red/blue ! switches.
Definition enums.h:2460
@ SOUND_SPACE_DEFAULT
Definition enums.h:1737
Entity * get_entity_by_index(s32 index)
Definition entity.c:530
void update_locomotion_state(void)
Definition 7E9D0.c:281
s32 disable_player_input(void)
Definition 77480.c:989
s32 phys_adjust_cam_on_landing(void)
Definition 7E9D0.c:46
void sfx_play_sound_at_player(s32 soundID, s32 arg1)
Definition sfx.c:521

Referenced by action_update_tornado_jump(), handle_jumping_land_on_switch(), and player_handle_floor_collider_type().

◆ integrate_gravity()

f32 integrate_gravity ( void )

Definition at line 435 of file 7BB60.c.

435 {
437
439 playerStatus->gravityIntegrator[2] += playerStatus->gravityIntegrator[3] / 1.7f;
440 playerStatus->gravityIntegrator[1] += playerStatus->gravityIntegrator[2] / 1.7f;
441 playerStatus->gravityIntegrator[0] += playerStatus->gravityIntegrator[1] / 1.7f;
442 } else {
443 #if DX_DEBUG_MENU
445 playerStatus->gravityIntegrator[2] += playerStatus->gravityIntegrator[3];
446 playerStatus->gravityIntegrator[1] += playerStatus->gravityIntegrator[2] * 1.5;
447 playerStatus->gravityIntegrator[0] += playerStatus->gravityIntegrator[1] * 1.5;
448 return playerStatus->gravityIntegrator[0];
449 }
450 #endif
451
452 playerStatus->gravityIntegrator[2] += playerStatus->gravityIntegrator[3];
453 playerStatus->gravityIntegrator[1] += playerStatus->gravityIntegrator[2];
454 playerStatus->gravityIntegrator[0] += playerStatus->gravityIntegrator[1];
455 }
456
457 return playerStatus->gravityIntegrator[0];
458}

Referenced by action_update_hit_fire(), action_update_knockback(), action_update_spin_jump(), action_update_step_up(), action_update_tornado_jump(), handle_jumping_land_on_switch(), phys_update_jump(), and player_fall_distance().

◆ player_fall_distance()

f32 player_fall_distance ( void )

◆ player_check_collision_below()

f32 player_check_collision_below ( f32 offset,
s32 * colliderID )

Definition at line 469 of file 7BB60.c.

469 {
472 f32 temp_f4 = playerStatus->colliderHeight * 0.5f;
473 f32 outLength = fabsf(offset) + temp_f4;
474 f32 x = playerStatus->pos.x;
475 f32 y = playerStatus->pos.y + temp_f4;
476 f32 z = playerStatus->pos.z;
477 f32 sp38, sp3C, sp40, sp44;
478 s32 hit = *colliderID = player_raycast_below_cam_relative(&gPlayerStatus, &x, &y, &z, &outLength,
479 &sp38, &sp3C, &sp40, &sp44);
480
481 if (hit <= NO_COLLIDER) {
482 if (offset >= 0.0f && collisionStatus->curCeiling > NO_COLLIDER) {
483 return playerStatus->pos.y;
484 }
485 y = playerStatus->pos.y + offset;
486 } else {
487 collisionStatus->curFloor = hit;
488 collisionStatus->lastTouchedFloor = -1;
489 }
490 return y;
491}
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 77480.c:192

Referenced by action_update_hit_fire(), action_update_hit_lava(), action_update_knockback(), action_update_sliding(), action_update_spin_jump(), action_update_step_up(), action_update_tornado_jump(), action_update_use_munchlesia(), action_update_use_spinning_flower(), handle_jumping_land_on_switch(), phys_update_falling(), and player_jump().

◆ collision_main_lateral()

void collision_main_lateral ( void )

Definition at line 493 of file 7BB60.c.

493 {
499 f32 yaw;
500 f32 yaw2;
501 f32 speed;
504 s32 result;
505 s32 test1;
506 s32 test2;
507 f32 xBump;
508 f32 zBump;
509
512 speed = playerStatus->curSpeed;
514 speed *= 0.5f;
515 }
516 add_vec2D_polar(&playerStatus->pos.x, &playerStatus->pos.z, speed, playerStatus->heading);
517 return;
518 }
519
520 switch (playerStatus->actionState) {
523 playerStatus->spriteFacingAngle - 90.0f + gCameras[gCurrentCameraID].curYaw);
524 break;
527 playerStatus->pos.x += playerStatus->pushVel.x;
528 playerStatus->pos.y += playerStatus->pushVel.y;
529 playerStatus->pos.z += playerStatus->pushVel.z;
530
531 if (playerStatus->pushVel.x != 0.0f ||
532 playerStatus->pushVel.y != 0.0f ||
533 playerStatus->pushVel.z != 0.0f)
534 {
538 if (playerStatus->curAlpha != 128) {
540 atan2(0.0f, 0.0f, playerStatus->pushVel.x, playerStatus->pushVel.z));
541 }
542 }
543 }
544 break;
547 playerStatus->pos.x += playerStatus->pushVel.x;
548 playerStatus->pos.y += playerStatus->pushVel.y;
549 playerStatus->pos.z += playerStatus->pushVel.z;
550 if (playerStatus->pushVel.x != 0.0f ||
551 playerStatus->pushVel.y != 0.0f ||
552 playerStatus->pushVel.z != 0.0f)
553 {
557 }
558 if (playerStatus->pushVel.x != 0.0f ||
559 playerStatus->pushVel.y != 0.0f ||
560 playerStatus->pushVel.z != 0.0f)
561 {
563 playerStatus->spriteFacingAngle - 90.0f + gCameras[gCurrentCameraID].curYaw);
564 }
565 break;
567 playerStatus->pos.x += playerStatus->pushVel.x;
568 playerStatus->pos.y += playerStatus->pushVel.y;
569 playerStatus->pos.z += playerStatus->pushVel.z;
570 if (playerStatus->pushVel.x != 0.0f ||
571 playerStatus->pushVel.y != 0.0f ||
572 playerStatus->pushVel.z != 0.0f)
573 {
577 }
578
579 playerX = playerStatus->pos.x;
580 playerY = playerStatus->pos.y;
581 playerZ = playerStatus->pos.z;
582 if (playerStatus->curSpeed != 0.0f) {
583 yaw = playerStatus->targetYaw;
584 } else {
585 yaw = playerStatus->spriteFacingAngle - 90.0f + gCameras[gCurrentCameraID].curYaw;
586 }
587 collisionStatus->curWall =
589 playerStatus->colliderDiameter * 0.5f, yaw);
590
591 if (playerStatus->pushVel.x != 0.0f ||
592 playerStatus->pushVel.y != 0.0f ||
593 playerStatus->pushVel.z != 0.0f)
594 {
596 playerStatus->spriteFacingAngle - 90.0f + gCameras[gCurrentCameraID].curYaw);
597 }
598 break;
599 default:
600 if (!(playerStatus->flags & PS_FLAG_FLYING)) {
601 speed = 0.0f;
603 player_input_to_move_vector(&yaw, &speed);
604 if (!(playerStatus->animFlags & PA_FLAG_SPINNING)) {
605 speed *= 0.03125f;
606 if (!(playerStatus->flags & (PS_FLAG_FALLING | PS_FLAG_JUMPING))) {
607 speed *= 0.25;
608 }
609 if (playerStatus->actionState == ACTION_STATE_LAUNCH) {
610 speed *= 1.5;
611 }
613 speed *= 0.5f;
614 }
615 }
617
618 if (playerStatus->actionState == ACTION_STATE_PUSHING_BLOCK) {
619 if (fabsf(sinTheta) > fabsf(cosTheta)) {
620 xBump = speed * sinTheta;
621 zBump = 0.0f;
622 } else {
623 xBump = 0.0f;
624 zBump = -speed * cosTheta;
625 }
626 } else if (!(playerStatus->animFlags & PA_FLAG_SPINNING)) {
627 xBump = speed * sinTheta;
628 zBump = -speed * cosTheta;
629 } else {
630 xBump = 0.0f;
631 zBump = 0.0f;
632 }
633
635 speed = playerStatus->curSpeed;
637 speed *= 0.5f;
638 }
639 playerX = xBump + (speed * sinTheta);
640 playerZ = zBump - (speed * cosTheta);
641 yaw = atan2(0.0f, 0.0f, playerX, playerZ);
642 speed = sqrtf(SQ(playerX) + SQ(playerZ));
644 if (speed > playerStatus->runSpeed) {
645 speed = playerStatus->runSpeed;
646 }
647 }
648 }
649
650 playerStatus->pos.x += playerStatus->pushVel.x;
651 playerStatus->pos.z += playerStatus->pushVel.z;
652 if (playerStatus->timeInAir == 0) {
653 playerStatus->pos.y += playerStatus->pushVel.y;
654 }
655
656 if (
657 playerStatus->pushVel.x != 0.0f ||
658 playerStatus->pushVel.y != 0.0f ||
659 playerStatus->pushVel.z != 0.0f)
660 {
664 }
665
666 playerX = playerStatus->pos.x;
667 playerY = playerStatus->pos.y;
668 playerZ = playerStatus->pos.z;
670 playerStatus->colliderDiameter * 0.5f, playerStatus->targetYaw);
671 if (speed == 0.0f && result <= NO_COLLIDER) {
672 yaw2 = playerStatus->spriteFacingAngle - 90.0f + gCameras[gCurrentCameraID].curYaw;
674 playerX = playerStatus->pos.x + (sinTheta * playerStatus->colliderDiameter * 0.5f);
675 playerY = playerStatus->pos.y;
676 playerZ = playerStatus->pos.z - (cosTheta * playerStatus->colliderDiameter * 0.5f);
678 playerStatus->colliderDiameter, yaw2);
679 }
680 collisionStatus->curWall = result;
681 if (!(playerStatus->flags & PS_FLAG_MOVEMENT_LOCKED) && playerStatus->actionState != ACTION_STATE_HAMMER) {
682 if (speed == 0.0f) {
684 playerStatus->spriteFacingAngle - 90.0f + gCameras[gCurrentCameraID].curYaw);
685 break;
686 }
687
688 playerX = playerStatus->pos.x;
689 playerZ = playerStatus->pos.z;
690 playerY = playerStatus->pos.y;
691 yaw2 = yaw;
692
693 if (speed > 4.0f) {
695 if (result <= NO_COLLIDER) {
697 }
698 collisionStatus->pushingAgainstWall = result;
699 } else {
700 collisionStatus->pushingAgainstWall =
702 }
703
704 test1X = playerX;
705 test1Y = playerY;
706 test1Z = playerZ;
707 yaw = clamp_angle(yaw2 - 35.0);
709 test2X = playerX;
710 test2Z = playerY;
711 test2Y = playerZ;
712 yaw = clamp_angle(yaw2 + 35.0);
714
715 if (test1 <= NO_COLLIDER) {
716 if (test2 <= NO_COLLIDER) {
717 playerStatus->pos.x = playerX;
718 playerStatus->pos.z = playerZ;
719 } else {
720 playerStatus->pos.x = test1X;
721 playerStatus->pos.z = test1Z;
722 }
723 } else if (test2 <= NO_COLLIDER) {
724 playerStatus->pos.x = test2X;
725 playerStatus->pos.z = test2Y;
726 }
727
728 if (playerStatus->enableCollisionOverlapsCheck == 0) {
729 if (playerStatus->animFlags & PA_FLAG_SPINNING) {
730 yaw2 = playerStatus->targetYaw;
731 } else {
732 yaw2 = playerStatus->spriteFacingAngle - 90.0f + gCameras[gCurrentCameraID].curYaw;
733 }
736 }
737 }
738 }
739 }
740 break;
750 break;
751 }
752}
HitID collision_check_player_intersecting_world(s32 mode, s32 arg1, f32 yaw)
Definition 7BB60.c:754
s8 get_current_partner_id(void)
Definition 7BB60.c:1100
#define sqrtf
#define clamp_angle
#define atan2
@ PS_FLAG_FALLING
Definition enums.h:3036
@ PS_FLAG_JUMPING
Definition enums.h:3035
@ PS_FLAG_FLYING
Definition enums.h:3037
@ PS_FLAG_SCRIPTED_FALL
Definition enums.h:3071
@ PS_FLAG_MOVEMENT_LOCKED
Definition enums.h:3069
@ PLAYER_COLLISION_0
Definition enums.h:4711
@ PLAYER_COLLISION_1
Definition enums.h:4712
@ PA_FLAG_SPINNING
Definition enums.h:3107
@ ACTION_STATE_PUSHING_BLOCK
Definition enums.h:2448
@ ACTION_STATE_USE_SPRING
Definition enums.h:2466
@ ACTION_STATE_USE_SNEAKY_PARASOL
Definition enums.h:2453
@ ACTION_STATE_SLIDING
Definition enums.h:2445
@ ACTION_STATE_HAMMER
Definition enums.h:2446
@ ACTION_STATE_STEP_UP
Definition enums.h:2462
@ CAM_DEFAULT
Definition enums.h:1800
void sin_cos_rad(f32 rad, f32 *outSinTheta, f32 *outCosTheta)
Definition 43F0.c:704
#define DEG_TO_RAD(deg)
Definition macros.h:138
#define SQ(x)
Definition macros.h:170
Vec3f targetPos

Referenced by phys_update_lava_reset(), phys_update_standard(), and update_player().

◆ func_800E4404()

HitID func_800E4404 ( s32 mode,
s32 offsetY,
f32 arg2,
f32 * outX,
f32 * outY,
f32 * outZ )

Definition at line 789 of file 7BB60.c.

789 {
791 f32 angle = 0.0f;
792 s32 i;
793
794 for (i = 0; i < 4; i++) {
795 f32 x = *outX;
796 f32 y = *outY + offsetY;
797 f32 z = *outZ;
798 s32 hitID = player_test_lateral_overlap(mode, gPlayerStatusPtr, &x, &y, &z, 0.0f, angle);
799
800 if (hitID > NO_COLLIDER) {
801 ret = hitID;
802 }
803
804 *outX = x;
805 *outZ = z;
806 angle += 90.0f;
807 }
808
809 return ret;
810}

Referenced by func_800E4B40().

◆ collision_check_player_overlaps()

void collision_check_player_overlaps ( void )

Definition at line 812 of file 7BB60.c.

812 {
815
816 if (overlapPush != 0.0f) {
817 f32 x = playerStatus->pos.x;
818 f32 y = playerStatus->pos.y;
819 f32 z = playerStatus->pos.z;
820
822
823 overlapPush -= playerStatus->runSpeed / 10.0f;
824 playerStatus->pos.x = x;
825 playerStatus->pos.y = y;
826 playerStatus->pos.z = z;
827
828 if (overlapPush < 0.0f) {
829 overlapPush = 0.0f;
830 }
831
832 playerStatus->overlapPushAmount = overlapPush;
833 }
834}

Referenced by phys_update_standard().

◆ phys_should_player_be_sliding()

s32 phys_should_player_be_sliding ( void )

Definition at line 838 of file 7BB60.c.

838 {
840 return PlayerSlidingCallback();
841 }
842 return FALSE;
843}
b32(* PlayerSlidingCallback)(void)
Definition 7BB60.c:836

Referenced by check_input_jump(), and phys_main_collision_below().

◆ phys_set_player_sliding_check()

void phys_set_player_sliding_check ( b32(*)(void) funcPtr)

Definition at line 845 of file 7BB60.c.

845 {
847}

Referenced by load_map_by_IDs().

◆ phys_is_on_sloped_ground()

s32 phys_is_on_sloped_ground ( void )

Definition at line 849 of file 7BB60.c.

849 {
851 f32 rotZ = playerShadow->rot.z + 180.0;
852 f32 rotX = playerShadow->rot.x + 180.0;
853 s32 ret = TRUE;
854
855 if (fabsf(rotZ) < 20.0f && fabsf(rotX) < 20.0f) {
856 ret = FALSE;
857 }
858
859 return ret;
860}
Shadow * get_shadow_by_index(s32 index)
Definition entity.c:534

◆ phys_main_collision_below()

void phys_main_collision_below ( void )

Definition at line 862 of file 7BB60.c.

862 {
866 f32 collHeightHalf = playerStatus->colliderHeight * 0.5f;
867 f32 playerX = playerStatus->pos.x;
869 f32 playerZ = playerStatus->pos.z;
870 f32 outLength = playerStatus->colliderHeight;
871 f32 temp_f24 = (2.0f * playerStatus->colliderHeight) / 7.0f;
872 f32 hitRx, hitRz;
874 s32 colliderID;
875 s32 cond;
876
878 &hitDirX, &hitDirZ);
879 playerStatus->groundNormalPitch = get_player_normal_pitch();
880
881 if (collHeightHalf + (temp_f24 * 0.5f) < outLength) {
882 colliderID = NO_COLLIDER;
883 }
884 if (playerStatus->timeInAir == 0) {
885 collisionStatus->curFloor = colliderID;
886 }
887 if (colliderID > NO_COLLIDER) {
888 playerStatus->groundAnglesXZ.x = hitDirX;
889 playerStatus->groundAnglesXZ.y = hitDirZ;
890 }
891
893 return;
894 }
895
896 if (playerStatus->flags & PS_FLAG_AIRBORNE) {
897 return;
898 }
899
900 if (playerStatus->actionState == ACTION_STATE_SLIDING) {
901 return;
902 }
903
904 if (playerStatus->flags & PS_FLAG_SLIDING) {
906 }
907
910 }
911
912 if (playerStatus->actionState == ACTION_STATE_SLIDING) {
913 return;
914 }
915
916 if (colliderID > NO_COLLIDER) {
918 switch (surfaceType) {
920 if (partnerStatus->partnerActionState == PARTNER_ACTION_NONE || partnerStatus->actingPartner != PARTNER_BOW) {
921 if (playerStatus->blinkTimer == 0) {
922 if (playerStatus->actionState != ACTION_STATE_HIT_LAVA) {
923 playerStatus->hazardType = HAZARD_TYPE_SPIKES;
925 }
926 } else {
928 }
929 }
930 break;
932 if (partnerStatus->partnerActionState == PARTNER_ACTION_NONE || partnerStatus->actingPartner != PARTNER_BOW) {
933 if (playerStatus->blinkTimer == 0) {
934 if (playerStatus->actionState != ACTION_STATE_HIT_LAVA) {
935 playerStatus->hazardType = HAZARD_TYPE_LAVA;
937 }
938 } else {
940 }
941 }
942 break;
943 default:
944 cond = FALSE;
947 }
948
949 if (playerStatus->actionState != ACTION_STATE_STEP_UP && !cond) {
950 if (!(playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS)) {
951 if (playerY - playerStatus->pos.y < 6.0f) {
952 playerStatus->pos.y = playerY;
953 } else {
956 StepUpLastYaw = playerStatus->targetYaw;
957 }
958 } else {
959 playerStatus->pos.y = playerY;
960 }
962 }
963 break;
964 }
965 } else if (!(playerStatus->flags & PS_FLAG_FLYING)
967 ) {
968 if (outLength <= collHeightHalf + temp_f24 && hitDirX == 0.0f && hitDirZ == 0.0f) {
970 } else {
972 }
974 }
975}
s32 phys_should_player_be_sliding(void)
Definition 7BB60.c:838
f32 StepUpLastYaw
Definition 7BB60.c:8
f32 StepUpLastY
Definition 7BB60.c:9
void phys_save_ground_pos(void)
Definition 7BB60.c:1202
@ PS_FLAG_AIRBORNE
Definition enums.h:3033
@ PS_FLAG_SLIDING
Definition enums.h:3038
@ ENTITY_TYPE_HIDDEN_PANEL
Definition enums.h:2585
@ PA_FLAG_USING_PEACH_PHYSICS
Definition enums.h:3103
@ ACTION_STATE_USE_SPINNING_FLOWER
Definition enums.h:2457
f32 get_player_normal_pitch(void)
Definition 43F0.c:660

Referenced by phys_update_standard().

◆ func_800E4AD8()

void func_800E4AD8 ( s32 mode)

Definition at line 977 of file 7BB60.c.

◆ func_800E4B40()

void func_800E4B40 ( s32 mode,
f32 * outX,
f32 * outY,
f32 * outZ )

Definition at line 983 of file 7BB60.c.

983 {
985
987}
HitID func_800E4404(s32 mode, s32 offsetY, f32 arg2, f32 *outX, f32 *outY, f32 *outZ)
Definition 7BB60.c:789

◆ collision_lava_reset_check_additional_overlaps()

void collision_lava_reset_check_additional_overlaps ( void )

Definition at line 989 of file 7BB60.c.

989 {
991 f32 x, y, z;
992 f32 yaw;
993
994 if (playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS) {
996 return;
997 }
998
999 yaw = clamp_angle(playerStatus->targetYaw - 30.0);
1000 y = playerStatus->pos.y + (playerStatus->colliderHeight * 0.75f);
1001 x = playerStatus->pos.x;
1002 z = playerStatus->pos.z;
1004 playerStatus->pos.x = x;
1005 playerStatus->pos.z = z;
1006
1007 yaw = clamp_angle(playerStatus->targetYaw + 30.0);
1008 y = playerStatus->pos.y + (playerStatus->colliderHeight * 0.75f);
1009 x = playerStatus->pos.x;
1010 z = playerStatus->pos.z;
1012 playerStatus->pos.x = x;
1013 playerStatus->pos.z = z;
1014
1015 yaw = clamp_angle(playerStatus->targetYaw - 30.0);
1016 x = playerStatus->pos.x;
1017 y = playerStatus->pos.y;
1018 z = playerStatus->pos.z;
1020 playerStatus->pos.x = x;
1021 playerStatus->pos.z = z;
1022
1023 yaw = clamp_angle(playerStatus->targetYaw + 30.0);
1024 x = playerStatus->pos.x;
1025 y = playerStatus->pos.y;
1026 z = playerStatus->pos.z;
1028 playerStatus->pos.x = x;
1029 playerStatus->pos.z = z;
1030
1031 yaw = clamp_angle(playerStatus->targetYaw + 90.0);
1032 x = playerStatus->pos.x;
1033 y = playerStatus->pos.y;
1034 z = playerStatus->pos.z;
1036 playerStatus->pos.x = x;
1037 playerStatus->pos.z = z;
1038 yaw = clamp_angle(playerStatus->targetYaw - 90.0);
1039
1040 x = playerStatus->pos.x;
1041 y = playerStatus->pos.y;
1042 z = playerStatus->pos.z;
1044 playerStatus->pos.x = x;
1045 playerStatus->pos.z = z;
1046
1047 yaw = clamp_angle(playerStatus->targetYaw + 180.0);
1048 x = playerStatus->pos.x;
1049 y = playerStatus->pos.y;
1050 z = playerStatus->pos.z;
1052 playerStatus->pos.x = x;
1053 playerStatus->pos.z = z;
1054}
void collision_lateral_peach(void)
Definition 7BB60.c:1056

Referenced by action_update_use_spinning_flower(), and phys_update_lava_reset().

◆ collision_lateral_peach()

void collision_lateral_peach ( void )

Definition at line 1056 of file 7BB60.c.

1056 {
1058 s32 climbableStep = FALSE;
1059 f32 yaw = playerStatus->targetYaw;
1060 f32 x = playerStatus->pos.x;
1061 f32 y = playerStatus->pos.y;
1062 f32 z = playerStatus->pos.z;
1064
1065 playerStatus->pos.x = x;
1066 playerStatus->pos.z = z;
1067
1068 // If there was a climbable step in this direction, but no wall, we can climb up it
1069 if (climbableStep
1070 && wall <= NO_COLLIDER
1071 && playerStatus->actionState != ACTION_STATE_STEP_UP_PEACH
1072 && playerStatus->curSpeed != 0.0f
1073 ) {
1075 }
1076}
@ ACTION_STATE_STEP_UP_PEACH
Definition enums.h:2452
HitID player_test_move_without_slipping(PlayerStatus *, f32 *, f32 *, f32 *, f32, f32, s32 *)
Only used for Peach physics.
Definition 77480.c:495

Referenced by collision_lava_reset_check_additional_overlaps(), and phys_update_standard().

◆ check_input_midair_jump()

void check_input_midair_jump ( void )

Definition at line 1078 of file 7BB60.c.

1078 {
1082 && gPlayerStatus.timeInAir < 18
1084 ) {
1085 switch (gPlayerData.bootsLevel) {
1086 case 0:
1087 break;
1088 case 1:
1091 break;
1092 case 2:
1095 break;
1096 }
1097 }
1098}
@ PA_FLAG_8BIT_MARIO
Definition enums.h:3105

Referenced by phys_update_standard().

◆ get_current_partner_id()

s8 get_current_partner_id ( void )

Definition at line 1100 of file 7BB60.c.

1100 {
1101 return gPlayerData.curPartner;
1102}

Referenced by collision_main_lateral(), and entity_try_partner_interaction_trigger().

◆ try_player_footstep_sounds()

void try_player_footstep_sounds ( s32 interval)

Definition at line 1104 of file 7BB60.c.

1104 {
1105 if (gGameStatusPtr->frameCounter % interval == 0) {
1107 s32 soundID, altSoundID;
1108
1110 soundID = SOUND_STEP_CRUNCHY1;
1112 } else {
1113 soundID = SOUND_STEP_NORMAL1;
1115 }
1116
1117 if (FootstepSoundSelector == 0) {
1118 soundID = altSoundID;
1119 }
1120
1123 }
1124}
s16 FootstepSoundSelector
Definition 7BB60.c:11
@ SURFACE_TYPE_HEDGES
used within hedge maze in flo_11
Definition enums.h:4678
@ SURFACE_TYPE_FLOWERS
Definition enums.h:4675
@ SOUND_STEP_NORMAL1
Definition enums.h:759
@ SOUND_STEP_CRUNCHY1
Definition enums.h:761
@ SOUND_STEP_CRUNCHY2
Definition enums.h:762
@ SOUND_STEP_NORMAL2
Definition enums.h:760
GameStatus * gGameStatusPtr
Definition main_loop.c:31

Referenced by action_update_run(), action_update_step_up_peach(), and action_update_walk().

◆ phys_update_interact_collider()

◆ phys_can_player_interact()

s32 phys_can_player_interact ( void )

Definition at line 1158 of file 7BB60.c.

1158 {
1159 s32 ret = TRUE;
1160
1164 ret = FALSE;
1165 }
1166 } else {
1167 ret = FALSE;
1168 }
1172 ret = FALSE;
1173 }
1174 return ret;
1175}
@ PARTNER_ACTION_BOMBETTE_2
Definition enums.h:2937
@ PARTNER_BOMBETTE
Definition enums.h:2888

Referenced by check_for_interactables(), func_800E06D8(), should_collider_allow_interact(), should_continue_inspect(), and update_triggers().

◆ player_get_side_angle()

f32 player_get_side_angle ( void )

Definition at line 1177 of file 7BB60.c.

1177 {
1179
1180 if (deltaYaw < -5.0f && deltaYaw > -175.0f) {
1181 deltaYaw = 0.0f;
1182 } else if (deltaYaw > 5.0f && deltaYaw < 175.0f) {
1183 deltaYaw = 180.0f;
1184 } else {
1186 }
1187 return clamp_angle(deltaYaw - 90.0f + gCameras[gCurrentCameraID].curYaw);
1188}
f32 get_clamped_angle_diff(f32, f32)
Definition 43F0.c:604
s32 PrevPlayerCamRelativeYaw
Definition 7E9D0.c:31

Referenced by action_hammer_end_swing(), action_hammer_play_hit_fx(), action_hammer_test_swing_collision(), entity_StarBoxLauncher_check_launch(), parasol_get_npc(), partner_flying_follow_player(), and partner_walking_follow_player().

◆ player_get_camera_facing_angle()

f32 player_get_camera_facing_angle ( void )

Definition at line 1190 of file 7BB60.c.

1190 {
1191 f32 angle = 0.0f;
1192
1194 angle = 180.0f;
1195 }
1196
1197 angle = angle + gCameras[CAM_DEFAULT].curYaw + 90.0f;
1198
1199 return clamp_angle(angle);
1200}

Referenced by entity_ItemBlock_spawn_item(), and entity_WoodenCrate_shatter().

Variable Documentation

◆ gCollisionStatus

◆ JumpedOnSwitchX

f32 JumpedOnSwitchX

Definition at line 6 of file 7BB60.c.

Referenced by action_update_landing_on_switch(), and handle_jumping_land_on_switch().

◆ JumpedOnSwitchZ

f32 JumpedOnSwitchZ

Definition at line 7 of file 7BB60.c.

Referenced by action_update_landing_on_switch(), and handle_jumping_land_on_switch().

◆ StepUpLastYaw

f32 StepUpLastYaw

Definition at line 8 of file 7BB60.c.

Referenced by phys_main_collision_below().

◆ StepUpLastY

f32 StepUpLastY

Definition at line 9 of file 7BB60.c.

Referenced by phys_main_collision_below().

◆ FootstepSoundSelector

s16 FootstepSoundSelector = 0

Definition at line 11 of file 7BB60.c.

Referenced by try_player_footstep_sounds().

◆ GravityParamsStartJump

f32 GravityParamsStartJump[] = { 15.7566404343f, -7.38624f, 3.44693994522f, -0.75f }

Definition at line 268 of file 7BB60.c.

268{ 15.7566404343f, -7.38624f, 3.44693994522f, -0.75f };

Referenced by phys_init_integrator_for_current_state().

◆ GravityParamsStartFall

f32 GravityParamsStartFall[] = { 0.154342994094f, -0.350080013275f, -0.182262003422f, 0.0115200001746f }

Definition at line 269 of file 7BB60.c.

269{ 0.154342994094f, -0.350080013275f, -0.182262003422f, 0.0115200001746f };

Referenced by gravity_use_fall_parms().

◆ PlayerSlidingCallback

b32(* PlayerSlidingCallback) (void) ( void ) = NULL

Definition at line 836 of file 7BB60.c.

Referenced by phys_set_player_sliding_check(), and phys_should_player_be_sliding().