Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
world_use_item.c File Reference

Go to the source code of this file.

Variables

EvtScript EVS_WorldItem_ShowUsedItem
 
EvtScript EVS_WorldItem_PlayEatingSounds
 
EvtScript EVS_WorldItem_PlayDrinkingSounds
 
EvtScript EVS_World_UseItem
 

Variable Documentation

◆ EVS_WorldItem_ShowUsedItem

EvtScript EVS_WorldItem_ShowUsedItem
Initial value:
= {
Add(LVar1, 45)
Wait(15)
Add(LVar1, 20)
}
BSS s32 PopupMenu_SelectedIndex
@ EVT_GROUP_NEVER_PAUSE
Definition evt.h:142
ApiStatus RemoveItemEntity(Evt *script, b32 isInitialCall)
ApiStatus SetPlayerAnimation(Evt *script, b32 isInitialCall)
ApiStatus MakeItemEntity(Evt *script, b32 isInitialCall)
ApiStatus GetPlayerPos(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 End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:213
#define Add(VAR, INT_VALUE)
Definition macros.h:376
#define LVar2
Definition macros.h:150
#define LVar1
Definition macros.h:149
#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

Definition at line 112 of file world_use_item.c.

◆ EVS_WorldItem_PlayEatingSounds

EvtScript EVS_WorldItem_PlayEatingSounds
Initial value:
= {
Loop(4)
Wait(10)
Wait(45)
}
@ SOUND_EAT_OR_DRINK
Definition enums.h:1441
ApiStatus PlaySound(Evt *script, b32 isInitialCall)
#define EndLoop
Marks the end of a loop.
Definition macros.h:248
#define Thread
Marks the start of a thread block.
Definition macros.h:544
#define EndThread
Marks the end of a thread block.
Definition macros.h:547
#define Loop(TIMES)
Marks the beginning of a loop.
Definition macros.h:245

Definition at line 128 of file world_use_item.c.

128 {
129 Thread
130 Loop(4)
132 Wait(10)
133 EndLoop
136 Wait(45)
137 Return
138 End
139};

◆ EVS_WorldItem_PlayDrinkingSounds

EvtScript EVS_WorldItem_PlayDrinkingSounds

◆ EVS_World_UseItem

EvtScript EVS_World_UseItem

Definition at line 154 of file world_use_item.c.

154 {
158 IfNe(LVar0, 0)
160 Wait(20)
161 EndIf
165 IfEq(LVarD, 0)
167 Else
169 EndIf
170 IfEq(LVarF, 1)
172 EndIf
173 IfGt(LVarB, 0)
175 Add(LVar0, 0)
176 Add(LVar1, 35)
178 EndIf
179 IfGt(LVarC, 0)
181 Add(LVar0, 20)
182 Add(LVar1, 25)
184 EndIf
186 Add(LVar1, 25)
188 IfNe(LVarB, 0)
190 EndIf
191 IfNe(LVarC, 0)
193 EndIf
194 IfEq(LVarF, 0)
195 Wait(10)
197 Wait(30)
198 Else
199 Wait(30)
200 EndIf
204 Wait(20)
208 Return
209 End
210};
ApiStatus GetPartnerInUse(Evt *script, b32 isInitialCall)
ApiStatus ShowRecoveryShimmer(Evt *script, b32 isInitialCall)
ApiStatus DisablePlayerInput(Evt *script, b32 isInitialCall)
Disables player and partner input, and disables the status menu.
ApiStatus ShowStartRecoveryShimmer(Evt *script, b32 isInitialCall)
ApiStatus InterruptUsePartner(Evt *script, b32 isInitialCall)
#define Else
Marks the end of an if statement and the start of the else block.
Definition macros.h:295
#define LVarF
Definition macros.h:163
#define IfNe(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR != RVAR.
Definition macros.h:272
#define LVarC
Definition macros.h:160
#define IfGt(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR <= RVAR.
Definition macros.h:278
#define EndIf
Marks the end of an if statement or an else block.
Definition macros.h:298
#define LVarB
Definition macros.h:159
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
Definition macros.h:475
#define LVarD
Definition macros.h:161
#define IfEq(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR == RVAR.
Definition macros.h:269
EvtScript EVS_WorldItem_ShowUsedItem
EvtScript EVS_WorldItem_PlayEatingSounds
EvtScript EVS_WorldItem_PlayDrinkingSounds