Paper Mario DX
Paper Mario (N64) modding
Loading...
Searching...
No Matches
MakeKeyChoice.inc.c
Go to the documentation of this file.
1
#include "common.h"
2
3
API_CALLABLE(N(
BuildKeyItemChoiceList
)) {
4
Bytecode
* args =
script
->ptrReadPos;
5
s32*
allowedItemList
= (s32*)
evt_get_variable
(
script
, *args++);
6
s32 i;
7
8
if
(
allowedItemList
!=
NULL
) {
9
for
(i = 0;
allowedItemList
[i] !=
ITEM_NONE
; i++) {
10
N(
KeyItemChoiceList
)[i] =
allowedItemList
[i];
11
}
12
N(
KeyItemChoiceList
)[i] =
ITEM_NONE
;
13
}
else
{
14
for
(i = 0; i <
ITEM_NUM_KEYS
; i++) {
15
N(
KeyItemChoiceList
)[i] =
ITEM_FIRST_KEY
+ i;
16
N(
KeyItemChoiceList
)[
ITEM_NUM_KEYS
] =
ITEM_NONE
;
// vanilla oddity -- should be after the loop!
17
}
18
}
19
return
ApiStatus_DONE2
;
20
}
PopupMenu_SelectedIndex
BSS s32 PopupMenu_SelectedIndex
Definition
8a860_len_3f30.c:84
ApiStatus_DONE2
#define ApiStatus_DONE2
Definition
evt.h:118
Bytecode
s32 Bytecode
Definition
evt.h:7
evt_get_variable
s32 evt_get_variable(Evt *script, Bytecode var)
Definition
evt.c:1689
src
world
common
atomic
MakeKeyChoice.inc.c
Generated by
1.10.0