2#include "sprite/player.h"
27static s32 get_entity_below_spinning_flower(
void) {
28 f32 posX, posY, posZ, height;
29 f32 hitRx, hitRz, hitDirX, hitDirZ;
52 playerStatus->
flags &= ~PS_FLAG_ACTION_STATE_CHANGED;
100 distToCenter =
dist2D(entityByIndex->
pos.
x, entityByIndex->
pos.
z, playerStatus->
pos.
x, playerStatus->
pos.
z);
102 if (distToCenter > 4.0f) {
106 playerStatus->
pos.
x = entityByIndex->
pos.
x + (dx * distToCenter);
107 playerStatus->
pos.
z = entityByIndex->
pos.
z - (dz * distToCenter);
113 if (inputMagnitude != 0.0f) {
115 inputMagnitude *= 0.03125f;
116 if (inputMagnitude < 0.1) {
117 inputMagnitude = 0.1f;
119 playerStatus->
pos.
x += dx * inputMagnitude;
120 playerStatus->
pos.
z -= dz * inputMagnitude;
125 entityID = get_entity_below_spinning_flower();
148 playerStatus->
flags &= ~PS_FLAG_ROTATION_LOCKED;
164 playerStatus->
flags &= ~PS_FLAG_ROTATION_LOCKED;
178 distToCenter =
dist2D(entityByIndex->
pos.
x, entityByIndex->
pos.
z, playerStatus->
pos.
x, playerStatus->
pos.
z);
180 if (distToCenter > 4.0f) {
181 distToCenter -= 1.0f;
184 playerStatus->
pos.
x = entityByIndex->
pos.
x + (dx * distToCenter);
185 playerStatus->
pos.
z = entityByIndex->
pos.
z - (dz * distToCenter);
221 playerStatus->
pos.
y += ascentVelocity;
226 if (distToCenter > 40.0f) {
254 playerStatus->
pos.
y += ascentVelocity;
274 playerStatus->
pos.
y += ascentVelocity;
282 playerStatus->
flags &= ~PS_FLAG_ROTATION_LOCKED;
@ PS_FLAG_ROTATION_LOCKED
@ PS_FLAG_ACTION_STATE_CHANGED
Entity * get_entity_by_index(s32 index)
HitID player_raycast_below_cam_relative(PlayerStatus *playerStatus, f32 *outX, f32 *outY, f32 *outZ, f32 *outLength, f32 *hitRx, f32 *hitRz, f32 *hitDirX, f32 *hitDirZ)
void suggest_player_anim_always_forward(AnimID anim)
s32 disable_player_input(void)
f32 player_check_collision_below(f32, s32 *colliderID)
s32 disable_player_static_collisions(void)
s32 enable_player_input(void)
f32 dist2D(f32 ax, f32 ay, f32 bx, f32 by)
s32 phys_adjust_cam_on_landing(void)
void game_input_to_move_vector(f32 *x, f32 *y)
void set_action_state(s32 actionState)
void enable_partner_ai(void)
void suggest_player_anim_allow_backward(AnimID anim)
void exec_entity_commandlist(Entity *entity)
void collision_lava_reset_check_additional_overlaps(void)
s32 enable_player_static_collisions(void)
void sin_cos_rad(f32 rad, f32 *outSinTheta, f32 *outCosTheta)
#define COLLISION_WITH_ENTITY_BIT
void action_update_use_spinning_flower(void)
BSS f32 SpinningFlower_AngleToCenter
BSS s32 SpinningFlower_EntityIndex
CollisionStatus gCollisionStatus
GameStatus * gGameStatusPtr
PlayerStatus gPlayerStatus