2#include "sprite/npc/WorldParakarry.h"
13BSS s32 N(LetterDelivery_SavedNpcAnim);
15API_CALLABLE(N(LetterDelivery_Init)) {
31API_CALLABLE(N(LetterDelivery_CalcLetterPos)) {
52API_CALLABLE(N(LetterDelivery_SaveNpcAnim)) {
55 N(LetterDelivery_SavedNpcAnim) = npc->
curAnim;
56 npc->
curAnim = script->varTable[4];
60API_CALLABLE(N(LetterDelivery_RestoreNpcAnim)) {
63 npc->
curAnim = N(LetterDelivery_SavedNpcAnim);
67EvtScript N(EVS_LetterDelivery_CarryLetter) = {
78EvtScript N(EVS_LetterDelivery_ItemPrompt) = {
133 Call(N(ItemChoice_WaitForSelection),
LVar0)
144 Call(N(LetterDelivery_SaveNpcAnim))
182 Call(N(LetterDelivery_RestoreNpcAnim))
187#define EVT_LETTER_PROMPT(npcName, npcID, animTalk, animIdle, msg1, msg2, ms3, msg4, itemID, itemList) \
188 EvtScript N(EVS_LetterPrompt_##npcName) = { \
189 Call(N(LetterDelivery_Init), \
190 npcID, animTalk, animIdle, \
192 msg1, msg2, ms3, msg4, \
194 ExecWait(N(EVS_DoLetterDelivery)) \
199#define EVT_LETTER_REWARD(npcName) \
200 EvtScript N(EVS_LetterReward_##npcName) = { \
201 IfEq(LVarC, DELIVERY_ACCEPTED) \
202 EVT_GIVE_STAR_PIECE() \
208#define EVT_LETTER_CHECK(npcName) \
209 ExecWait(N(EVS_LetterPrompt_##npcName)) \
210 ExecWait(N(EVS_LetterReward_##npcName))
#define EVT_GIVE_REWARD(itemID)
@ STORY_CH2_PARAKARRY_JOINED_PARTY
@ ITEM_SPAWN_MODE_DECORATION
@ NPC_FLAG_IGNORE_PLAYER_COLLISION
s32 evt_get_variable(Evt *script, Bytecode var)
s32 evt_set_variable(Evt *script, Bytecode var, s32 value)
void add_vec2D_polar(f32 *x, f32 *y, f32 r, f32 theta)
#define SpeakToNpc(ARGS...)
#define SpeakToPlayer(ARGS...)
Npc * get_npc_unsafe(s32 npcID)
ApiStatus CloseChoicePopup(Evt *script, b32 isInitialCall)
ApiStatus RemoveItemEntity(Evt *script, b32 isInitialCall)
ApiStatus DisablePartnerAI(Evt *script, b32 isInitialCall)
ApiStatus SetItemPos(Evt *script, b32 isInitialCall)
ApiStatus GetNpcPos(Evt *script, b32 isInitialCall)
ApiStatus GetCurrentPartnerID(Evt *script, b32 isInitialCall)
ApiStatus SetNpcAnimation(Evt *script, b32 isInitialCall)
ApiStatus EnablePartnerAI(Evt *script, b32 isInitialCall)
ApiStatus NpcFaceNpc(Evt *script, b32 isInitialCall)
ApiStatus GetNpcYaw(Evt *script, b32 isInitialCall)
ApiStatus InterpNpcYaw(Evt *script, b32 isInitialCall)
ApiStatus PlayerFaceNpc(Evt *script, b32 isInitialCall)
ApiStatus NpcJump1(Evt *script, b32 isInitialCall)
ApiStatus MakeItemEntity(Evt *script, b32 isInitialCall)
ApiStatus SetNpcJumpscale(Evt *script, b32 isInitialCall)
ApiStatus GetAngleBetweenNPCs(Evt *script, b32 isInitialCall)
ApiStatus SetNpcFlagBits(Evt *script, b32 isInitialCall)
ApiStatus RemoveKeyItemAt(Evt *script, b32 isInitialCall)
ApiStatus FindItem(Evt *script, b32 isInitialCall)
ApiStatus ShowKeyChoicePopup(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 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 EndLoop
Marks the end of a loop.
#define Unbind
Unbinds the current thread from the trigger it was bound to, if any.
#define BindPadlock(EVT_SOURCE, TRIGGER, COLLIDER_ID, ITEM_LIST, UNK_A3, TRIGGER_PTR_OUTVAR)
Similar to BindTrigger, but also takes arguments for the item list to show.
#define IfLt(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR < RVAR.
#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 IfLe(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR > RVAR.
#define KillThread(TID)
Kills a thread by its thread ID.
#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 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 Loop(TIMES)
Marks the beginning of a loop.
#define BitwiseOrConst(VAR, CONST)
VAR |= CONST, but CONST is treated as-is rather than dereferenced with evt_get_variable.
#define Return
Kills the current EVT thread.