27 {
30 f32 angle, magnitude, speedModifier;
31
32 s32 spinFlags, nonDizzyFlags;
33 s32 effectType;
35 s32 firstCall = FALSE;
36
37
40 playerStatus->
animFlags &= ~PA_FLAG_INTERRUPT_SPIN;
62 firstCall = TRUE;
63
66 }
67
70 }
71
80 }
81
82 effectType = -1;
83 anim = ANIM_Mario1_Spin;
84
85 if (spinFlags) {
87 effectType = 2;
88 anim = ANIM_Mario1_SpinAttack;
90 effectType = 4;
91 anim = ANIM_Mario1_Spin;
93 effectType = 0;
94 anim = ANIM_Mario1_SpeedySpin;
95 }
96 }
97
99 nonDizzyFlags = spinFlags & ~SPIN_TYPE_DIZZY;
100
103 }
106 }
109 }
110
113
116 } else {
117 effectType++;
119 }
120 if (spinFlags != 0) {
122 }
123
128 }
129
130
134 }
142 }
143
144
146 playerStatus->
animFlags &= ~PA_FLAG_SPINNING;
147 playerStatus->
flags &= ~PS_FLAG_SPINNING;
151 return;
152 }
153
154
160 }
161
162
167 }
168
176 playerStatus->
flags &= ~PS_FLAG_SPINNING;
177 playerStatus->
animFlags &= ~PA_FLAG_SPINNING;
179 }
181 return;
182 }
183
191 }
192 }
193 }
194
198
201 }
202
206 } else {
208 if (speedModifier < 0.1) {
209 speedModifier = 0.1f;
210 }
211
213 speedModifier = 0.0f;
214 }
215
219 }
220 }
221
223
229 if (magnitude != 0.0f || playerStatus->
targetYaw != angle) {
231 }
232 }
233 playerStatus->
curSpeed = (magnitude != 0.0f) ? playerStatus->
runSpeed * speedModifier : 0.0f;
234 break;
238 break;
239 }
245 }
246 return;
247 } else {
249 }
250 }
251
255
259 playerStatus->
flags &= ~PS_FLAG_SPINNING;
261 } else if (angle < playerStatus->spriteFacingAngle) {
266 playerStatus->
flags &= ~PS_FLAG_SPINNING;
268 }
273 playerStatus->
flags &= ~PS_FLAG_SPINNING;
275 }
277 }
278}
f32 spinDirectionMagnitude
struct EffectInstance * specialDecorationEffect
@ PS_FLAG_ACTION_STATE_CHANGED
@ SOUND_SPEEDY_SPIN_ATTACK
s32 is_ability_active(s32 arg0)
void player_input_to_move_vector(f32 *angle, f32 *magnitude)
void suggest_player_anim_always_forward(AnimID anim)
void set_action_state(s32 actionState)
void phys_update_interact_collider(void)
void suggest_player_anim_allow_backward(AnimID anim)
b32 check_input_hammer(void)
b32 check_input_jump(void)
void sfx_stop_sound(s32 soundID)
void sfx_play_sound_at_player(s32 soundID, s32 arg1)
s32 gSpinHistoryBufferPos
s16 gSpinHistoryPosAngle[5]
void phys_clear_spin_history(void)
CollisionStatus gCollisionStatus
PlayerSpinState gPlayerSpinState
PlayerStatus gPlayerStatus