Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
LoadAnimationFromTable.inc.c
Go to the documentation of this file.
1API_CALLABLE(N(LoadAnimationFromTable)) {
2 Bytecode* args = script->ptrReadPos;
3 s32 type = evt_get_variable(script, *args++);
4 s32 index = evt_get_variable(script, *args++);
5
6 switch (type) {
7 case VINE_0:
9 (u8*) N(VineAnimationsDmaTable)[3 * index + 0],
10 (u8*) N(VineAnimationsDmaTable)[3 * index + 1],
11 (void*) VINE_0_BASE);
12 break;
13 case VINE_1:
15 (u8*) N(VineAnimationsDmaTable)[3 * index + 0],
16 (u8*) N(VineAnimationsDmaTable)[3 * index + 1],
17 (void*) VINE_1_BASE);
18 break;
19 case VINE_2:
21 (u8*) N(VineAnimationsDmaTable)[3 * index + 0],
22 (u8*) N(VineAnimationsDmaTable)[3 * index + 1],
23 (void*) VINE_2_BASE);
24 break;
25 case VINE_3:
27 (u8*) N(VineAnimationsDmaTable)[3 * index + 0],
28 (u8*) N(VineAnimationsDmaTable)[3 * index + 1],
29 (void*) VINE_3_BASE);
30 break;
31 }
32 return ApiStatus_DONE2;
33}
#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
u32 dma_copy(Addr romStart, Addr romEnd, void *vramDest)
Definition 43F0.c:444
#define VINE_1_BASE
Definition part1.inc.c:20
@ VINE_3
Definition part1.inc.c:5
@ VINE_2
Definition part1.inc.c:4
@ VINE_1
Definition part1.inc.c:3
@ VINE_0
Definition part1.inc.c:2
#define VINE_2_BASE
Definition part1.inc.c:21
#define VINE_0_BASE
Definition part1.inc.c:19
#define VINE_3_BASE
Definition part1.inc.c:22