src/script.c file

Typedefs

using ScriptCommand = void(*)(Entity*, ScriptExecutionContext*)

Functions

void InitScriptExecutionContext(ScriptExecutionContext* context, Script* script)
void sub_0807DE80(Entity*)
void DisablePauseMenu(void)
void ScriptCommandNop(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_BeginBlock(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_EndBlock(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_Jump(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_JumpIf(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_JumpIfNot(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_JumpTable(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_JumpAbsolute(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_JumpAbsoluteIf(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_JumpAbsoluteIfNot(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_JumpAbsoluteTable(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_Call(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_CallWithArg(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_LoadRoomEntityList(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_CheckSyncFlagAndClear(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_CheckInventory1(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_CheckInventory2(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_CheckLocalFlag(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_CheckLocalFlagByBank(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_CheckGlobalFlag(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_CheckRoomFlag(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_CheckPlayerInRegion(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_CheckPlayerInRegion2(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_CheckEntityInteractType(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_FacePlayerAndCheckDist(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_HasRupees(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_HasShells(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_CheckTextboxResult(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_CheckKinstoneFused(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_BuyItem(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_CheckBottleContaining(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_HasRoomItemForSale(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_VariableBitSet(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_VariableOnlyBitSet(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_VariableEqual(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_CheckPlayerFlags(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_CheckPlayerMinish(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_EntityHasHeight(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_ComparePlayerAction(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_ComparePlayerAnimationState(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SetSyncFlag(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_ClearSyncFlag(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SetLocalFlag(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SetLocalFlagByBank(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_ClearLocalFlag(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SetGlobalFlag(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_ClearGlobalFlag(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SetRoomFlag(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_ClearRoomFlag(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_Wait(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_WaitForSyncFlag(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_WaitForSyncFlagAndClear(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_WaitPlayerGetItem(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_WaitForPlayerEnterRoom(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_WaitFor_1(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_WaitForFadeFinish(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SetFadeTime(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SetFadeMask(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_FadeInvert(Entity* entity, ScriptExecutionContext* context)
void ScriptCommandNop2(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SetFade4(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SetFade5(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SetFade6(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SetFade7(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SetFadeIris(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SetFadeIrisInOut(Entity* entity, ScriptExecutionContext* context)
void SetFadeIrisForCameraTarget(u32)
void ScriptCommand_0807E858(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SetPlayerIdle(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_EnablePlayerControl(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_DisablePlayerControl(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SetPlayerAction(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_StartPlayerScript(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SetPlayerAnimation(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_0807E8E4(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SetAction(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SetIntVariable(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SetVariableToFrame(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SetAnimation(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_TriggerInteract(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_0807E974(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_AddInteractableWhenBigObject(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_RemoveInteractableObject(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_AddInteractableWhenBigFuser(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_UpdateFusion(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_0807EA4C(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_AddInteractableFuser(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_WaitUntilTextboxCloses(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_MessageFromTarget(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_MessageNoOverlap(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_MessageFromTargetPos(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_MessageFromTargetTable(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_MessageNoOverlapVar(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_EzloMessage(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_0807EB38(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SetAnimationState(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_0807EB4C(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_FacePlayer(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_FaceAwayFromPlayer(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SetEntityDirection(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SetEntityDirectionWithAnimationState(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SetEntitySpeed(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SetEntityVelocity(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SetEntityPositionRelative(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_OffsetEntityPosition(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_MoveEntityToPlayer(Entity* entity, ScriptExecutionContext* context)
void ScriptCommandNop3(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_WalkForward(Entity* entity, ScriptExecutionContext* context)
void sub_0807EC44(Entity*, ScriptExecutionContext*)
void ScriptCommand_WalkNorth(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_WalkEast(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_WalkSouth(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_WalkWest(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_0807ED24(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_MoveTo(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_LookAt(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_MoveTowardsTarget(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_MoveToPlayer(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_MoveToOffset(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_0807EF3C(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_DoPostScriptAction(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_DoPostScriptAction2(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_PlaySound(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_PlayBgm(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SoundReq(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_StopBgm(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_ModRupees(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_ModHealth(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_IncreaseMaxHealth(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_GivePlayerItem(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_GiveKinstone(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_GetInventoryValue(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SetInventoryValue(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_InitItemGetSequence(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_CameraTargetEntity(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_CameraTargetPlayer(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SetScrollSpeed(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_0807F0C8(Entity* entity, ScriptExecutionContext* context)
void InitScriptData(void)
auto CreateScriptExecutionContext(void) -> ScriptExecutionContext*
void DestroyScriptExecutionContext(ScriptExecutionContext* context)
auto StartCutscene(Entity* entity, Script* script) -> ScriptExecutionContext*
void InitScriptForEntity(Entity* entity, ScriptExecutionContext* context, Script* script)
void UnloadCutsceneData(Entity* entity)
void StartPlayerScript(Script* script)
auto StartCutscene2(Entity* entity, Script* script) -> UNUSED ScriptExecutionContext*
void HandlePostScriptActions(Entity* entity, ScriptExecutionContext* context)
void InitScriptForNPC(Entity* entity)
void sub_0807DD64(Entity* entity)
void sub_0807DD80(Entity* entity, Script* script)
void ExecuteScriptAndHandleAnimation(Entity* entity, void(*)(Entity*, ScriptExecutionContext*) postScriptCallback)
void ExecuteScriptForEntity(Entity* entity, void(*)(Entity*, ScriptExecutionContext*) postScriptCallback)
void HandleEntity0x82Actions(Entity* entity)
void LookAt(Entity* entity, ScriptExecutionContext* context, u32 x, u32 y)
void DisablePauseMenuAndPutAwayItems(void)
void EnablePauseMenu(void)
void ExecuteScript(Entity* entity, ScriptExecutionContext* context)
void CheckAnyKeyPressed(Entity* entity, ScriptExecutionContext* context)
void GetRandomInt(Entity* entity, ScriptExecutionContext* context)
void sub_0807F100(Entity* entity, ScriptExecutionContext* context)
void sub_0807F128(Entity* entity, ScriptExecutionContext* context)
void SetCollisionLayer1(Entity* entity, ScriptExecutionContext* context)
void SetPlayerCollisionLayer1(Entity* entity, ScriptExecutionContext* context)
void SetCollisionLayer2(Entity* entity, ScriptExecutionContext* context)
void sub_0807F190(Entity* entity, ScriptExecutionContext* context)
void sub_0807F1A0(Entity* entity, ScriptExecutionContext* context)
void sub_0807F1C4(Entity* entity, ScriptExecutionContext* context)
void sub_0807F1E8(Entity* entity, ScriptExecutionContext* context)
void sub_0807F210(Entity* entity, ScriptExecutionContext* context)
void SetPlayerAnimation2(Entity* entity, ScriptExecutionContext* context)
void EquipItem(Entity* entity, ScriptExecutionContext* context)
void SetPlayerMacro(Entity* entity, ScriptExecutionContext* context)
void WaitForPlayerMacro(Entity* entity, ScriptExecutionContext* context)
void WaitForAnimDone(Entity* entity, ScriptExecutionContext* context)
void WaitForPlayerAnim(Entity* entity, ScriptExecutionContext* context)
void DeleteHitbox(Entity* entity, ScriptExecutionContext* context)
void SetPriorityMessage(Entity* entity, ScriptExecutionContext* context)
void SetPriorityPlayerEvent(Entity* entity, ScriptExecutionContext* context)
void SetPriorityHighest(Entity* entity, ScriptExecutionContext* context)
void sub_0807F36C(Entity* entity, ScriptExecutionContext* context)
void sub_0807F3C8(Entity* entity, ScriptExecutionContext* context)
void sub_0807F3D8(Entity* entity, ScriptExecutionContext* context)
void CreatePlayerExclamationMark(Entity* entity, ScriptExecutionContext* context)
void CreatePlayerQuestionMark(Entity* entity, ScriptExecutionContext* context)
void LoadMenu(Entity* entity, ScriptExecutionContext* context)
void CheckInteractType(Entity* entity, ScriptExecutionContext* context)
void sub_0807F464(Entity* entity, ScriptExecutionContext* context)
void sub_0807F4F8(Entity* entity, ScriptExecutionContext* context)
void ReadPlayerAnimationState(Entity* entity, ScriptExecutionContext* context)
void WaitForPlayerIdle(Entity* entity, ScriptExecutionContext* context)
void sub_0807F5B0(Entity* entity, ScriptExecutionContext* context)
void WaitForCameraTouchRoomBorder(Entity* entity, ScriptExecutionContext* context)
void sub_0807F634(Entity* entity, ScriptExecutionContext* context)
void sub_0807F650(Entity* entity, ScriptExecutionContext* context)
void sub_0807F680(Entity* entity, ScriptExecutionContext* context)
void sub_0807F6B4(Entity* entity, ScriptExecutionContext* context)
void SetPlayerFlag(Entity* entity, ScriptExecutionContext* context)
void ResetPlayerFlag(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_ShowNPCDialogue(Entity* entity, ScriptExecutionContext* context)
void sub_0807F714(Entity* entity, ScriptExecutionContext* context)
void sub_0807F738(Entity* entity, ScriptExecutionContext* context)
void SetPlayerPos(Entity* entity, ScriptExecutionContext* context)
void GetConditionSet(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SaleItemConfirmMessage(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_CheckShopItemPrice(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_BuyShopItem(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_PlayerDropHeldObject(Entity* entity, ScriptExecutionContext* context)
void sub_0807F844(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_SetMessageValue(Entity* entity, ScriptExecutionContext* context)
void CheckEntityOnScreen(Entity* entity, ScriptExecutionContext* context)
void DoGravity(Entity* entity, ScriptExecutionContext* context)
void sub_0807F8E8(Entity* entity, ScriptExecutionContext* context)
void PutItemAnySlot(Entity* entity, ScriptExecutionContext* context)
void MakeInteractableAsMinish(Entity* entity, ScriptExecutionContext* context)
void MakePedestalInteractable(Entity* entity, ScriptExecutionContext* context)
void MakeCheckableObjectInteractable(Entity* entity, ScriptExecutionContext* context)
void sub_0807F93C(Entity* entity, ScriptExecutionContext* context)
void DeleteThoughtBubble(Entity* entity, ScriptExecutionContext* context)
void CheckMessageEqual(Entity* entity, ScriptExecutionContext* context)
void SetEntityHeight(Entity* entity, ScriptExecutionContext* context)
void SetSpriteOffset(Entity* entity, ScriptExecutionContext* context)
void WaitForPlayerNormal(Entity* entity, ScriptExecutionContext* context)
void WaitForPlayerNormalOrTalkEzlo(Entity* entity, ScriptExecutionContext* context)
void sub_0807FADC(Entity* entity, ScriptExecutionContext* context)
void sub_0807FB28(Entity* entity, ScriptExecutionContext* context)
void SetPlayerIFrames(Entity* entity, ScriptExecutionContext* context)
void DisablePlayerSwimState(Entity* entity, ScriptExecutionContext* context)
void sub_0807FB94(Entity* entity, ScriptExecutionContext* context)
void sub_0807FBA0(Entity* entity, ScriptExecutionContext* context)
void sub_0807FBB4(Entity* entity, ScriptExecutionContext* context)
void sub_0807FBC4(Entity* entity, ScriptExecutionContext* context)
void sub_0807FBCC(Entity* entity, ScriptExecutionContext* context)
void sub_0807FBD4(Entity* entity, ScriptExecutionContext* context)
void sub_0807FBFC(Entity* entity, ScriptExecutionContext* context)

Variables

u16* gUnk_08001A7C
u8 gUnk_08114F30
u8 gUnk_08114F34
const u16 gUnk_08016984
ScriptExecutionContext gPlayerScriptExecutionContext
ScriptExecutionContext gScriptExecutionContextArray
u8 gUnk_0811E750
u8 gUnk_0811E758
u8 gUnk_0811E760