Paper Mario DX
Paper Mario (N64) modding
Loading...
Searching...
No Matches
StashVars.inc.c
Go to the documentation of this file.
1
#include "common.h"
2
#include "
npc.h
"
3
4
// remove this and uncomment other when all data from all maps that use this are migrated to C
5
extern
s32** N(
varStash
);
6
7
API_CALLABLE(N(
StashVars
)) {
8
//static s32** varTable = NULL;
9
s32 i;
10
11
if
(N(
varStash
) ==
NULL
) {
12
N(
varStash
) =
heap_malloc
(
sizeof
(
script
->varTable));
13
14
for
(i = 0; i <
ARRAY_COUNT
(
script
->varTable); i++) {
15
N(
varStash
)[i] = (s32*)
script
->varTable[i];
16
}
17
}
else
{
18
for
(i = 0; i <
ARRAY_COUNT
(
script
->varTable); i++) {
19
script
->varTable[i] = (s32) N(
varStash
)[i];
20
}
21
22
heap_free
(N(
varStash
));
23
N(
varStash
) =
NULL
;
24
}
25
26
return
ApiStatus_DONE2
;
27
}
PopupMenu_SelectedIndex
BSS s32 PopupMenu_SelectedIndex
Definition
8a860_len_3f30.c:84
ApiStatus_DONE2
#define ApiStatus_DONE2
Definition
evt.h:118
heap_free
s32 heap_free(void *ptr)
Definition
heap.c:42
heap_malloc
void * heap_malloc(s32 size)
Definition
heap.c:34
npc.h
ARRAY_COUNT
#define ARRAY_COUNT(arr)
Definition
macros.h:40
src
world
common
todo
StashVars.inc.c
Generated by
1.10.0