68API_CALLABLE(MovePartnerThroughDoor) {
78API_CALLABLE(ResetPartnerMovement) {
95API_CALLABLE(CreateMapRoom) {
103 s32 triggerColliderID;
105 f32 centerX, centerZ;
122 if (dropDoorScript != NULL) {
124 room->
flags = roomFlags;
131 room->
posEnterA.
x = centerX + (nX * 30.0f) - (nZ * 20.0f);
132 room->
posEnterA.
z = centerZ + (nZ * 30.0f) + (nX * 20.0f);
137 room->
posEnterA.
x = centerX + (nX * 60.0f) - (nZ * 20.0f);
138 room->
posEnterA.
z = centerZ + (nZ * 60.0f) + (nX * 20.0f);
145 room->
posEnterB.
x = centerX - (nX * 30.0f) - (nZ * 20.0f);
146 room->
posEnterB.
z = centerZ - (nZ * 30.0f) - (nX * 20.0f);
151 room->
posEnterB.
x = centerX - (nX * 60.0f) - (nZ * 20.0f);
152 room->
posEnterB.
z = centerZ - (nZ * 60.0f) - (nX * 20.0f);
155 room->
posEnterA.
x = centerX + (nX * 30.0f) + (nZ * 20.0f);
156 room->
posEnterA.
z = centerZ + (nZ * 30.0f) - (nX * 20.0f);
161 room->
posEnterA.
x = centerX + (nX * 60.0f) + (nZ * 20.0f);
162 room->
posEnterA.
z = centerZ + (nZ * 60.0f) - (nX * 20.0f);
169 room->
posEnterB.
x = centerX - (nX * 30.0f) + (nZ * 20.0f);
170 room->
posEnterB.
z = centerZ - (nZ * 30.0f) + (nX * 20.0f);
202API_CALLABLE(PlayRoomDoorSound) {
203 Bytecode* args = script->ptrReadPos;
204 MapRoom* door = script->functionTempPtr[1];
206 f32 posX, posY, posZ;
213API_CALLABLE(SaveDoorPtr) {
214 script->functionTemp[1] = script->varTable[1];
218API_CALLABLE(GetDoorState) {
219 MapRoom* door = script->functionTempPtr[1];
221 script->varTable[0] = door->
state;
225API_CALLABLE(SetDoorState) {
226 MapRoom* door = script->functionTempPtr[1];
232API_CALLABLE(AwaitUseDoorScript) {
233 Bytecode* args = script->ptrReadPos;
234 MapRoom* door = script->functionTempPtr[1];
244API_CALLABLE(SaveUseDoorScript) {
245 Bytecode* args = script->ptrReadPos;
246 MapRoom* door = script->functionTempPtr[1];
254API_CALLABLE(RoomVisibilityToggleImpl) {
255 MapRoom* door = script->varTablePtr[1];
262 script->functionTemp[1] = 0;
264 script->functionTemp[1] += 32;
265 if (script->functionTemp[1] > 255) {
266 script->functionTemp[1] = 255;
269 alpha = script->functionTemp[1];
271 alpha = 255 - script->functionTemp[1];
274 r = door->
bgColor[0] * (255 - alpha) / 255;
275 g = door->
bgColor[1] * (255 - alpha) / 255;
276 b = door->
bgColor[2] * (255 - alpha) / 255;
281 if (script->functionTemp[1] >= 255) {
293API_CALLABLE(SetRoomCamMoveSpeed) {
294 Bytecode* args = script->ptrReadPos;
297 static f32 savedCamMoveSpeed;
299 if (newMoveSpeed >= 0.0f) {
309API_CALLABLE(SetEntityHideMode1) {
314API_CALLABLE(SetEntityHideMode2) {
319API_CALLABLE(SetEntityHideMode0) {
324API_CALLABLE(HideRoomNPCs) {
325 MapRoom* door = script->functionTempPtr[1];
331 if (npcList == NULL) {
345 mask = ~NPC_FLAG_HIDING;
349 if (*npcList == endOfList) {
361API_CALLABLE(RevealHiddenRoomNPCs) {
362 MapRoom* door = script->functionTempPtr[1];
372 if (npc->
flags != 0) {
373 npc->
flags &= ~NPC_FLAG_HIDING;
381API_CALLABLE(UseRoomItemVisGroup) {
382 MapRoom* door = script->functionTempPtr[1];
389API_CALLABLE(RestorePrevItemVisGroup) {
390 MapRoom* door = script->functionTempPtr[1];
396API_CALLABLE(GetDoorData) {
397 MapRoom* door = script->functionTempPtr[1];
399 script->varTable[2] = door->
flags;
412 script->varTable[15] = door->
modelID;
416API_CALLABLE(GetDoorPtr) {
417 script->varTable[1] = script->functionTemp[1];
422 Call(RoomVisibilityToggleImpl)
456 Call(SetRoomCamMoveSpeed, -1)
491 Call(SetRoomCamMoveSpeed, -1)
602 Call(UseRoomItemVisGroup)
647 Call(SetEntityHideMode1)
680 Call(SetEntityHideMode2)
693 Call(ResetPartnerMovement)
861 Call(SetEntityHideMode0)
880 Call(ResetPartnerMovement)
900 Call(RevealHiddenRoomNPCs)
901 Call(RestorePrevItemVisGroup)
#define sfx_play_sound_at_position
@ ROOM_FLAG_EXIT_DOOR_DROPS
@ ROOM_LARGE_DOOR_RIGHT_HINGE_OPENS_OUT
@ ROOM_DOOR_LEFT_HINGE_OPENS_OUT
@ ROOM_DOOR_RIGHT_HINGE_OPENS_OUT
@ ROOM_FLAG_CUSTOM_ANIM_DROP_DOOR
@ ROOM_FLAGS_DOOR_TYPE_MASK
@ ROOM_LARGE_DOOR_LEFT_HINGE_OPENS_OUT
@ ROOM_DOOR_STRAIGHT_THROUGH
@ ROOM_FLAG_CUSTOM_ANIM_OPEN_DOOR
@ ROOM_FLAG_CUSTOM_ANIM_WALL_ROT
@ ROOM_DOOR_LEFT_HINGE_OPENS_IN
@ ROOM_FLAGS_VISGROUP_MASK
@ ROOM_DOOR_RIGHT_HINGE_OPENS_IN
@ ROOM_LARGE_DOOR_RIGHT_HINGE_OPENS_IN
@ ROOM_UPDATE_ENTER_BEGIN
@ ROOM_UPDATE_REQUEST_CANCEL
@ ROOM_MOVE_DOOR_ENTER_CLOSE
@ ROOM_MOVE_DOOR_EXIT_CLOSE
@ ROOM_MOVE_DOOR_EXIT_OPEN
@ ROOM_MOVE_DOOR_ENTER_OPEN
@ NPC_FLAG_IGNORE_WORLD_COLLISION
s32 evt_get_variable(Evt *script, Bytecode var)
void get_collider_center(s32 colliderID, f32 *x, f32 *y, f32 *z)
s32 does_script_exist(s32 id)
f32 evt_get_float_variable(Evt *script, Bytecode var)
void mdl_group_set_custom_gfx(u16, s32, s32, b32)
void partner_set_tether_distance(f32)
void partner_reset_tether_distance(void)
Trigger * bind_trigger_1(EvtScript *script, s32 flags, s32 triggerFlagIndex, s32 triggerVar0, s32 triggerVar1, s32 priority)
void * heap_malloc(s32 size)
void mdl_set_shroud_tint_params(u8 r, u8 g, u8 b, u8 a)
Npc * get_npc_by_index(s32 listIndex)
Npc * get_npc_safe(s32 npcID)
EvtScript * overrideDropDoor
EvtScript EVS_Default_AnimateWallRot
EvtScript EVS_EnterRoomDoor
EvtScript EVS_ExitRoom_MovePlayerB
EvtScript EVS_EnterRoom_MoveCam
EvtScript * stateListenerScript
EvtScript EVS_ExitRoom_MoveCam
@ ROOM_DATA_EVT_MOVE_WALL
@ ROOM_DATA_EVT_DROP_DOOR
@ ROOM_DATA_EVT_OPEN_DOOR
void get_flat_collider_normal(s32, f32 *, f32 *, f32 *)
EvtScript * overrideOpenDoor
EvtScript EVS_Default_AnimateDropDoor
EvtScript EVS_EnterRoom_MovePlayerA
EvtScript EVS_RoomContentVisiblityToggle
EvtScript EVS_ExitRoomDoor
void func_800EF414(s32, s32)
void set_current_item_entity_render_group(s32)
s32 get_current_item_entity_render_group(void)
EvtScript * overrideMoveWall
EvtScript EVS_ExitRoom_MovePlayerA
EvtScript EVS_Default_AnimateDoorRot
EvtScript EVS_EnterRoom_MovePlayerB
ApiStatus DisablePlayerInput(Evt *script, b32 isInitialCall)
Disables player and partner input, and disables the status menu.
ApiStatus UpdateLerp(Evt *script, b32 isInitialCall)
ApiStatus GetPlayerActionState(Evt *script, b32 isInitialCall)
ApiStatus FacePlayerTowardPoint(Evt *script, b32 isInitialCall)
ApiStatus InterpCamTargetPos(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 SetNpcFlagBits(Evt *script, b32 isInitialCall)
ApiStatus GetPlayerPos(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 Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
#define CaseEq(RVAR)
Marks the start of a switch case that executes only if LVAR == RVAR. It also marks the end of any pre...
#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 Add(VAR, INT_VALUE)
#define Goto(LABEL_ID)
Moves execution to the given label.
#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 BitwiseAndConst(VAR, CONST)
VAR &= CONST, but CONST is treated as-is rather than dereferenced with evt_get_variable.
#define ExecGetTID(EVT_SOURCE, OUTVAR)
Identical to Exec, but the newly-launched thread ID is stored in OUTVAR.
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
#define SetGroup(GROUP)
Sets the current thread's group. Group value meanings are currently not known.
#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 Exec(EVT_SOURCE)
Launches a new thread.
#define Return
Kills the current EVT thread.