Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
GiveReward.inc.c
Go to the documentation of this file.
1#ifndef _COMMON_GIVE_REWARD_H_
2#define _COMMON_GIVE_REWARD_H_
3
4#include "common.h"
5
6EvtScript N(GiveItemReward) = {
7 Call(ShowGotItem, LVar0, TRUE, 0)
9 End
10};
11
12EvtScript N(GiveCoinReward) = {
14 Return
15 End
16};
17
18#define EVT_GIVE_REWARD(itemID) \
19 Set(LVar0, itemID) \
20 ExecWait(N(GiveItemReward)) \
21 Call(AddItem, itemID, LVar1)
22
23#define EVT_GIVE_STAR_PIECE() \
24 Set(LVar0, ITEM_STAR_PIECE) \
25 ExecWait(N(GiveItemReward)) \
26 Call(AddStarPieces, 1)
27
28#endif
Bytecode EvtScript[]
@ ITEM_PICKUP_FLAG_1_COIN
Definition enums.h:2763
ApiStatus ShowGotItem(Evt *script, b32 isInitialCall)
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:213
#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