Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
Chest.inc.c
Go to the documentation of this file.
1#include "common.h"
2
3EvtScript N(EVS_Chest_ShowGotItem) = {
6 Wait(40)
7 Call(ShowGotItem, LVar0, FALSE, 0)
10 End
11};
12
13EvtScript N(EVS_Chest_GetItem) = {
16 IfNe(LVarA, ITEM_NONE)
17 ExecWait(N(EVS_Chest_ShowGotItem))
18 EndIf
20 Wait(15)
22 Return
23 End
24};
25
26#define EVT_OPEN_CHEST(item, flag) \
27 { \
28 Set(LVarA, item) \
29 Set(flag, TRUE) \
30 ExecWait(N(EVS_Chest_GetItem)) \
31 Return \
32 End \
33 }
Bytecode EvtScript[]
@ TIME_FREEZE_FULL
Definition enums.h:3466
@ TIME_FREEZE_NONE
Definition enums.h:3464
@ EVT_GROUP_NEVER_PAUSE
Definition evt.h:142
ApiStatus AddItem(Evt *script, b32 isInitialCall)
ApiStatus SetTimeFreezeMode(Evt *script, b32 isInitialCall)
ApiStatus DisablePlayerInput(Evt *script, b32 isInitialCall)
Disables player and partner input, and disables the status menu.
ApiStatus ShowGotItem(Evt *script, b32 isInitialCall)
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
Definition macros.h:365
#define IfNe(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR != RVAR.
Definition macros.h:272
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:213
#define EndIf
Marks the end of an if statement or an else block.
Definition macros.h:298
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
Definition macros.h:475
#define LVarA
Definition macros.h:158
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#define SetGroup(GROUP)
Sets the current thread's group. Group value meanings are currently not known.
Definition macros.h:519
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:576
#define LVar0
Definition macros.h:148
#define Return
Kills the current EVT thread.
Definition macros.h:217