2#include "sprite/player.h"
16static s32 get_collider_below_spin_jump(
void);
29 static f32 RotationRate;
50 playerStatus->
pitch += RotationRate;
51 if (playerStatus->
pitch >= 360.0f) {
52 playerStatus->
pitch = 360.0f;
65 if (playerStatus->
pitch == 360.0f) {
88 playerStatus->
pitch += RotationRate;
89 if (playerStatus->
pitch >= 360.0) {
90 playerStatus->
pitch = 0.0f;
102 if (velocity < -100.0f) {
113 playerStatus->
flags &= ~PS_FLAG_FLYING;
123 playerStatus->
flags &= ~PS_FLAG_FLYING;
127 playerStatus->
flags &= ~PS_FLAG_FLYING;
138 playerStatus->
pitch = 0.0f;
153 if (velocity == 0.0f) {
157 playerStatus->
pos.
y += velocity;
169 if (belowColliderID >= 0) {
192 playerStatus->
flags &= ~PS_FLAG_FLYING;
195 belowColliderID = get_collider_below_spin_jump();
196 if (belowColliderID >= 0) {
198 collisionStatus->
curFloor = belowColliderID;
203static s32 get_collider_below_spin_jump(
void) {
204 f32 posX, posY, posZ, height;
205 f32 hitRx, hitRz, hitDirX, hitDirZ;
@ PS_FLAG_ACTION_STATE_CHANGED
@ COLLIDER_FLAGS_SURFACE_TYPE_MASK
@ ENTITY_TYPE_BLUE_SWITCH
@ ENTITY_COLLISION_PLAYER_TOUCH_FLOOR
@ ACTION_STATE_SPIN_POUND
@ ACTION_STATE_LANDING_ON_SWITCH
Small red/blue ! switches.
@ CAMERA_MOVE_IGNORE_PLAYER_Y
void start_rumble(s32, s32)
Entity * get_entity_by_index(s32 index)
f32 integrate_gravity(void)
HitID player_raycast_below_cam_relative(PlayerStatus *playerStatus, f32 *outX, f32 *outY, f32 *outZ, f32 *outLength, f32 *hitRx, f32 *hitRz, f32 *hitDirX, f32 *hitDirZ)
s32 disable_player_input(void)
s32 get_collider_flags(s32 colliderID)
f32 player_check_collision_below(f32, s32 *colliderID)
s32 enable_player_input(void)
u32 get_entity_type(s32 arg0)
void set_action_state(s32 actionState)
void exec_ShakeCam1(s32 arg0, s32 arg1, s32 arg2)
void suggest_player_anim_allow_backward(AnimID anim)
f32 player_fall_distance(void)
void sfx_play_sound_at_player(s32 soundID, s32 arg1)
#define COLLISION_WITH_ENTITY_BIT
void action_update_spin_jump(void)
CollisionStatus gCollisionStatus
PlayerStatus gPlayerStatus
HiddenPanelsData gCurrentHiddenPanels