7extern EvtScript N(EVS_BetaBreakFloor_Touch);
8extern EvtScript N(EVS_BetaPanel_PoundAtop);
9extern EvtScript N(EVS_BetaPanel_PoundNearby);
11API_CALLABLE(N(CheckShouldBreakFloor)) {
13 s32* array = script->array;
14 f32 distance =
dist2D(playerStatus->
pos.
x, playerStatus->
pos.
z, array[2], array[3]);
16 script->varTable[0] = 1;
19 script->varTable[0] = 0;
21 if (script->array[4] <= distance) {
22 script->varTable[0] = 0;
28API_CALLABLE(N(CheckShouldFlipFloor)) {
31 playerStatus->
pos.
x, playerStatus->
pos.
z,
32 script->array[2], script->array[4]);
34 script->varTable[0] = 0;
35 if (distance < 112.5f) {
36 script->varTable[0] = 2;
38 if (distance < 37.5f) {
39 script->varTable[0] = 1;
69 Call(N(CheckShouldBreakFloor))
122 Call(N(CheckShouldFlipFloor))
124 ExecWait(N(EVS_BetaPanel_PoundAtop))
127 ExecWait(N(EVS_BetaPanel_PoundNearby))
174EvtScript N(EVS_BetaPanel_PoundNearby) = {
@ ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS
@ COLLIDER_FLAGS_UPPER_MASK
@ MODIFY_COLLIDER_FLAGS_SET_BITS
@ MODIFY_COLLIDER_FLAGS_CLEAR_BITS
@ ACTION_STATE_SPIN_POUND
@ ACTION_STATE_TORNADO_POUND
@ ACTION_STATE_TORNADO_JUMP
f32 dist2D(f32 ax, f32 ay, f32 bx, f32 by)
ApiStatus SetPlayerPos(Evt *script, b32 isInitialCall)
Sets the player position.
ApiStatus EnableModel(Evt *script, b32 isInitialCall)
Enables or disables the given model.
ApiStatus TranslateModel(Evt *script, b32 isInitialCall)
Translates the given model's position.
ApiStatus RotateModel(Evt *script, b32 isInitialCall)
Rotates the model the given amount on the selected axis.
ApiStatus UpdateLerp(Evt *script, b32 isInitialCall)
ApiStatus GetPlayerActionState(Evt *script, b32 isInitialCall)
ApiStatus MakeItemEntity(Evt *script, b32 isInitialCall)
ApiStatus UpdateColliderTransform(Evt *script, b32 isInitialCall)
Applies transformation from parent model.
ApiStatus ParentColliderToModel(Evt *script, b32 isInitialCall)
Associates a model with a collider and applies the model's transformation.
ApiStatus MakeLerp(Evt *script, b32 isInitialCall)
ApiStatus GetPlayerPos(Evt *script, b32 isInitialCall)
ApiStatus ModifyColliderFlags(Evt *script, b32 isInitialCall)
Set flags for collider + siblings + children.
#define ArrayVar(INDEX)
User Word.
#define Ref(sym)
Address/pointer constant.
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
#define IfNe(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR != RVAR.
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
#define UseBuf(INT_PTR)
Loads a s32 pointer for use with subsequent EVT_BUF_READ commands.
#define Add(VAR, INT_VALUE)
#define EndLoop
Marks the end of a loop.
#define Goto(LABEL_ID)
Moves execution to the given label.
#define BufRead1(VAR)
Consumes the next s32 from the buffer and stores it in the given variable.
#define BindTrigger(EVT_SOURCE, TRIGGER, COLLIDER_ID, UNK_A3, TRIGGER_PTR_OUTVAR)
Sets up a script to launch when a particular event is triggered.
#define Label(LABEL_ID)
Marks this point in the script as a Goto target.
#define MallocArray(SIZE, OUT_PTR_VAR)
Allocates a new array of the given size for use with ArrayVar(INDEX).
#define EndIf
Marks the end of an if statement or an else block.
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
#define UseArray(INT_PTR)
Loads an s32 array pointer into the current thread for use with ArrayVar(INDEX).
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
#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 Loop(TIMES)
Marks the beginning of a loop.
#define Return
Kills the current EVT thread.
PlayerStatus gPlayerStatus