4#include "sprite/player.h"
7 9, 3, 9, 3, 9, 3, 8, 3,
8 7, 3, 6, 2, 5, 2, 4, 2,
11API_CALLABLE(N(CalcJumpReboundTime)) {
14 f32 posX = playerActor->
curPos.
x;
15 f32 posY = playerActor->
curPos.
y;
16 f32 posZ = playerActor->
curPos.
z;
21 script->varTable[0] = (
dist3D(posX, posY, posZ, goalX, goalY, goalZ) * 15.0f) / 100.0f;
23 if (script->varTable[0] > 20) {
24 script->varTable[0] = 20;
28 if (script->varTable[0] < 6) {
29 script->varTable[0] = 6;
31 }
else if (script->varTable[0] < 12) {
32 script->varTable[0] = 12;
55 Call(InitTargetIterator)
76EvtScript N(EVS_JumpSupport_CalcJumpTime) = {
97EvtScript N(EVS_JumpSupport_CalcJumpTime_Alt1) = {
118EvtScript N(EVS_JumpSupport_CalcJumpTime_Alt2) = {
139 Call(PlayerYieldTurn)
148 Call(SetJumpAnimations,
ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land)
150 Call(N(CalcJumpReboundTime))
156 Call(PlayerHopToGoal, 6, 0, 2)
164 Call(PlayerRunToGoal, 0)
171EvtScript N(EVS_JumpSupport_WeakRebound) = {
172 Call(PlayerYieldTurn)
181 Call(SetJumpAnimations,
ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land)
183 Call(N(CalcJumpReboundTime))
189 Call(PlayerHopToGoal, 6, 0, 2)
197 Call(PlayerRunToGoal, 0)
203EvtScript N(EVS_JumpSupport_NoFollowUp) = {
204 Call(PlayerYieldTurn)
213 Call(SetJumpAnimations,
ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land)
215 Call(N(CalcJumpReboundTime))
221 Call(PlayerHopToGoal, 6, 0, 2)
229 Call(PlayerRunToGoal, 0)
236EvtScript N(EVS_JumpSupport_UnusedRebound) = {
237 Call(PlayerYieldTurn)
246 Call(SetJumpAnimations,
ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land)
248 Call(N(CalcJumpReboundTime))
254 Call(PlayerHopToGoal, 6, 0, 2)
262 Call(PlayerRunToGoal, 0)
270EvtScript N(EVS_JumpSupport_BouncingRebound) = {
271 Call(PlayerYieldTurn)
283 Call(SetJumpAnimations,
ACTOR_PLAYER, 0, ANIM_Mario1_Hurt, ANIM_Mario1_Hurt, ANIM_Mario1_Land)
284 Call(N(CalcJumpReboundTime))
291 Call(PlayerHopToGoal, 8, 0, 2)
298 Call(PlayerHopToGoal, 6, 0, 2)
304 Call(PlayerHopToGoal, 4, 0, 2)
328 Call(PlayerYieldTurn)
332 Call(PlayerRunToGoal, 0)
339EvtScript N(EVS_JumpSupport_ApproachAndJump) = {
341 Call(action_command_jump_init)
342 ExecWait(N(EVS_JumpSupport_Approach))
343 ExecWait(N(EVS_JumpSupport_CalcJumpTime))
344 Call(action_command_jump_start,
LVarA, 3)
347 Call(SetJumpAnimations,
ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_MarioB1_Stomp)
354EvtScript N(EVS_JumpSupport_UnusedSuper) = {
356 Call(action_command_jump_init)
357 ExecWait(N(EVS_JumpSupport_Approach))
358 Call(InitTargetIterator)
359 ExecWait(N(EVS_JumpSupport_CalcJumpTime_Alt1))
363 Call(action_command_jump_start,
LVarB, 3)
366 Call(SetJumpAnimations,
ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump)
381EvtScript N(EVS_JumpSupport_UnusedUltra) = {
383 Call(action_command_jump_init)
384 ExecWait(N(EVS_JumpSupport_Approach))
385 ExecWait(N(EVS_JumpSupport_CalcJumpTime_Alt2))
386 Call(SetActionDifficultyTable,
Ref(N(D_802A10F0)))
390 Call(action_command_jump_start,
LVarB, 3)
393 Call(SetJumpAnimations,
ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_MarioW2_Carried, ANIM_MarioB1_Stomp)
395 Call(CloseActionCommandInfo)
406 Call(action_command_jump_init)
407 Call(action_command_jump_start, 13, 3)
413 Call(action_command_jump_init)
414 Call(action_command_jump_start, 2, 3)
@ ACTION_COMMAND_MODE_NOT_LEARNED
@ BS_FLAGS1_EXECUTING_MOVE
@ BTL_CAM_PLAYER_SUPER_JUMP_MIDAIR
@ BTL_CAM_PLAYER_UNUSED_ULTRA_JUMP
@ BTL_CAM_PLAYER_JUMP_MIDAIR
@ BTL_CAM_PLAYER_ULTRA_JUMP_MIDAIR
@ BTL_CAM_PLAYER_ATTACK_APPROACH
f32 dist3D(f32 ax, f32 ay, f32 az, f32 bx, f32 by, f32 bz)
ApiStatus ShakeCam(Evt *script, b32 isInitialCall)
#define Else
Marks the end of an if statement and the start of the else block.
#define Switch(LVAR)
Marks the start of a switch statement.
#define Ref(sym)
Address/pointer constant.
#define DivF(VAR, FLOAT_VALUE)
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
#define AddF(VAR, FLOAT_VALUE)
#define EndChildThread
Marks the end of a child thread block.
#define Sub(VAR, INT_VALUE)
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
#define Add(VAR, INT_VALUE)
#define EndLoop
Marks the end of a loop.
#define Goto(LABEL_ID)
Moves execution to the given label.
#define IfGt(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR <= RVAR.
#define IfLt(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR < RVAR.
#define Label(LABEL_ID)
Marks this point in the script as a Goto target.
#define EndIf
Marks the end of an if statement or an else block.
#define CaseDefault
Marks the start of a switch case that executes unconditionally. It also marks the end of any previous...
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
#define BreakLoop
Breaks out of the innermost loop.
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
#define EndSwitch
Marks the end of a switch statement and any case.
#define IfEq(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR == RVAR.
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
#define ChildThread
Marks the start of a child thread block.
#define CaseGt(RVAR)
Marks the start of a switch case that executes only if LVAR <= RVAR. It also marks the end of any pre...
#define Loop(TIMES)
Marks the beginning of a loop.
#define Return
Kills the current EVT thread.
struct Actor * playerActor
BattleStatus gBattleStatus