Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
IsItemBadge.inc.c
Go to the documentation of this file.
1#include "common.h"
2#include "npc.h"
3
4API_CALLABLE(N(IsItemBadge)) {
5 Bytecode* args = script->ptrReadPos;
6 s32 itemIndex = evt_get_variable(script, *args++);
7
8 script->varTable[0] = FALSE;
9 if (gItemTable[itemIndex].typeFlags & ITEM_TYPE_FLAG_BADGE) {
10 script->varTable[0] = TRUE;
11 }
12
13 return ApiStatus_DONE2;
14}
@ ITEM_TYPE_FLAG_BADGE
Definition enums.h:1839
#define ApiStatus_DONE2
Definition evt.h:118
s32 Bytecode
Definition evt.h:7
s32 evt_get_variable(Evt *script, Bytecode var)
Definition evt.c:1690
ItemData gItemTable[]