7API_CALLABLE(CheckUsingRideablePartner) {
10 script->varTable[10] = 0;
13 script->varTable[10] = 0;
15 script->varTable[10] = 1;
17 script->varTable[13] = playerStatus->
targetYaw;
23API_CALLABLE(TeleportPartnerToPlayer) {
32 partner->
pos.
x = playerStatus->
pos.
x;
33 partner->
pos.
z = playerStatus->
pos.
z;
36 partner->
pos.
y = playerStatus->
pos.
y;
44API_CALLABLE(SetPlayerPositionFromSaveData) {
57 partner->
pos.
x = playerStatus->
pos.
x;
58 partner->
pos.
y = playerStatus->
pos.
y;
59 partner->
pos.
z = playerStatus->
pos.
z;
68API_CALLABLE(EnterPlayerPostPipe) {
77 playerStatus->
pos.
y = script->varTable[2] - 40;
80 playerStatus->
pos.
y += 1.0f;
81 if (!(playerStatus->
pos.
y < script->varTable[2])) {
82 playerStatus->
pos.
y = script->varTable[2];
83 playerStatus->
flags &= ~PS_FLAG_CAMERA_DOESNT_FOLLOW;
93API_CALLABLE(ShortenPartnerTetherDistance) {
98API_CALLABLE(ResetPartnerTetherDistance) {
103API_CALLABLE(PlayerMoveToDoor) {
104 Bytecode* args = script->ptrReadPos;
112 script->functionTemp[0]--;
113 if (script->functionTemp[0] < 0) {
120API_CALLABLE(GetEntryCoords) {
121 Bytecode* args = script->ptrReadPos;
134API_CALLABLE(SetupSingleDoor) {
135 if (script->varTable[3] >= 0) {
151API_CALLABLE(SetupSplitSingleDoor) {
152 if (script->varTable[3] >= 0) {
170API_CALLABLE(SetupDoubleDoors) {
183API_CALLABLE(SetupSplitDoubleDoors) {
199 Call(ShortenPartnerTetherDistance)
200 Call(CheckUsingRideablePartner)
203 Call(TeleportPartnerToPlayer)
215 Call(ResetPartnerTetherDistance)
221 Call(ShortenPartnerTetherDistance)
222 Call(CheckUsingRideablePartner)
225 Call(TeleportPartnerToPlayer)
237 Call(ResetPartnerTetherDistance)
243 Call(ShortenPartnerTetherDistance)
244 Call(CheckUsingRideablePartner)
247 Call(TeleportPartnerToPlayer)
258 Call(ResetPartnerTetherDistance)
265 Call(ShortenPartnerTetherDistance)
266 Call(CheckUsingRideablePartner)
267 Call(EnterPlayerPostPipe)
268 Call(ResetPartnerTetherDistance)
275 Call(ShortenPartnerTetherDistance)
276 Call(SetPlayerPositionFromSaveData)
278 Call(ResetPartnerTetherDistance)
285 Call(ShortenPartnerTetherDistance)
286 Call(CheckUsingRideablePartner)
295 Call(ResetPartnerTetherDistance)
301 Call(SetupSingleDoor)
308 Call(SetupSingleDoor)
315 Call(SetupSplitSingleDoor)
322 Call(SetupSplitSingleDoor)
329 Call(SetupDoubleDoors)
336 Call(SetupDoubleDoors)
343 Call(SetupSplitDoubleDoors)
350 Call(SetupSplitDoubleDoors)
359 Call(ShortenPartnerTetherDistance)
390 Call(CheckUsingRideablePartner)
399 Call(ResetPartnerTetherDistance)
408 Call(ShortenPartnerTetherDistance)
427 Call(CheckUsingRideablePartner)
429 Call(TeleportPartnerToPlayer)
430 Call(PlayerMoveToDoor, 10)
464 Call(ResetPartnerTetherDistance)
EvtScript ExitSplitSingleDoor
EvtScript EnterSingleDoor
EvtScript EnterSplitDoubleDoor
EvtScript EnterSplitSingleDoor
EvtScript ExitSplitDoubleDoor
EvtScript EnterDoubleDoor
s32 DoorModelsSwingCCW[3]
EvtScript EnterWalkCustom
@ PS_FLAG_CAMERA_DOESNT_FOLLOW
@ COLLIDER_FLAGS_UPPER_MASK
s32 evt_get_variable(Evt *script, Bytecode var)
void partner_clear_player_tracking(Npc *partner)
s32 evt_set_variable(Evt *script, Bytecode var, s32 value)
void move_player(s32 duration, f32 heading, f32 speed)
s32 partner_is_flying(void)
void enable_partner_ai(void)
EvtScript * partner_get_enter_map_script(void)
void partner_set_tether_distance(f32)
void partner_reset_tether_distance(void)
void add_vec2D_polar(f32 *x, f32 *y, f32 r, f32 theta)
Npc * get_npc_unsafe(s32 npcID)
void set_npc_yaw(Npc *npc, f32 yaw)
ApiStatus ClearPartnerMoveHistory(Evt *script, b32 isInitialCall)
ApiStatus func_802D2148(Evt *script, b32 isInitialCall)
ApiStatus UseEntryHeading(Evt *script, b32 isInitialCall)
ApiStatus RotateModel(Evt *script, b32 isInitialCall)
Rotates the model the given amount on the selected axis.
ApiStatus DisablePlayerInput(Evt *script, b32 isInitialCall)
Disables player and partner input, and disables the status menu.
ApiStatus UpdateLerp(Evt *script, b32 isInitialCall)
ApiStatus UseExitHeading(Evt *script, b32 isInitialCall)
ApiStatus PlayerMoveTo(Evt *script, b32 isInitialCall)
ApiStatus DisablePlayerPhysics(Evt *script, b32 isInitialCall)
Disables player physics if disable is TRUE, enables it if FALSE.
ApiStatus MakeLerp(Evt *script, b32 isInitialCall)
ApiStatus InterpPlayerYaw(Evt *script, b32 isInitialCall)
ApiStatus ModifyColliderFlags(Evt *script, b32 isInitialCall)
Set flags for collider + siblings + children.
ApiStatus PlaySoundAt(Evt *script, b32 isInitialCall)
#define Else
Marks the end of an if statement and the start of the else block.
#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 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 ExecWait(EVT_SOURCE)
Launches a new child thread.
#define BreakLoop
Breaks out of the innermost loop.
#define Thread
Marks the start of a thread block.
#define EndThread
Marks the end of a thread block.
#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 Exec(EVT_SOURCE)
Launches a new thread.
#define Return
Kills the current EVT thread.
MapSettings * get_current_map_settings(void)
Fields other than main, entryList, entryCount, background, and tattle are initialised when the map lo...
PartnerStatus gPartnerStatus
GameStatus * gGameStatusPtr
PlayerStatus gPlayerStatus