Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
BeachEffects.inc.c
Go to the documentation of this file.
1#include "common.h"
2
3EvtScript N(EVS_AnimatePalmLeaves) = {
5 Label(0)
6 Call(RotateGroup, LVarA, 2, 0, 0, 1)
7 Wait(5)
8 Call(RotateGroup, LVarA, 1, 0, 0, 1)
9 Wait(5)
10 Call(RotateGroup, LVarA, -2, 0, 0, 1)
11 Wait(5)
12 Call(RotateGroup, LVarA, 1, 0, 0, 1)
13 Wait(5)
14 Call(RandInt, 30, LVar0)
15 Add(LVar0, 30)
16 Wait(LVar0)
17 Goto(0)
18 Return
19 End
20};
21
22EvtScript N(EVS_AnimateWave) = {
24 Loop(0)
25 Call(TranslateModel, LVarA, 1, 0, 0)
26 Wait(2)
27 Call(TranslateModel, LVarA, 1, 0, 0)
28 Wait(1)
29 Call(TranslateModel, LVarA, 1, Float(-0.5), 0)
30 Wait(1)
31 Call(TranslateModel, LVarA, 1, -1, 0)
32 Wait(1)
33 Call(TranslateModel, LVarA, Float(1.5), -1, 0)
34 Wait(1)
35 Call(TranslateModel, LVarA, 2, -1, 0)
36 Wait(2)
37 Call(TranslateModel, LVarA, 2, -1, 0)
38 Wait(2)
39 Call(TranslateModel, LVarA, 2, -1, 0)
40 Wait(1)
41 Call(TranslateModel, LVarA, Float(2.5), Float(-1.5), 0)
42 Wait(1)
43 Call(TranslateModel, LVarA, 3, -2, 0)
44 Wait(2)
45 Call(TranslateModel, LVarA, 3, -2, 0)
46 Wait(1)
47 Call(TranslateModel, LVarA, 3, Float(-2.5), 0)
48 Wait(1)
49 Call(TranslateModel, LVarA, 3, -3, 0)
50 Wait(2)
51 Call(TranslateModel, LVarA, 3, -3, 0)
52 Wait(2)
53 Call(TranslateModel, LVarA, 3, -3, 0)
54 Wait(1)
55 Call(TranslateModel, LVarA, 3, Float(-2.5), 0)
56 Wait(1)
57 Call(TranslateModel, LVarA, 3, -2, 0)
58 Wait(1)
59 Call(TranslateModel, LVarA, Float(2.5), -2, 0)
60 Wait(1)
61 Call(TranslateModel, LVarA, 2, -2, 0)
62 Wait(1)
63 Call(TranslateModel, LVarA, 2, Float(-1.5), 0)
64 Wait(1)
65 Call(TranslateModel, LVarA, 2, -1, 0)
66 Wait(1)
67 Call(TranslateModel, LVarA, Float(1.5), Float(-0.5), 0)
68 Wait(1)
69 Call(TranslateModel, LVarA, 1, 0, 0)
70 Wait(1)
71 Call(TranslateModel, LVarA, 1, Float(0.5), 0)
72 Wait(1)
73 Call(TranslateModel, LVarA, 1, 1, 0)
74 Wait(1)
75 Call(TranslateModel, LVarA, Float(0.5), 1, 0)
76 Wait(1)
77 Call(TranslateModel, LVarA, 0, 1, 0)
78 Wait(1)
79 Call(TranslateModel, LVarA, Float(-0.5), 1, 0)
80 Wait(1)
81 Call(TranslateModel, LVarA, -1, 1, 0)
82 Wait(2)
83 Call(TranslateModel, LVarA, -1, 1, 0)
84 Wait(1)
85 Call(TranslateModel, LVarA, -1, Float(0.5), 0)
86 Wait(1)
87 Call(TranslateModel, LVarA, -1, 0, 0)
88 Wait(2)
89 Call(TranslateModel, LVarA, -1, 0, 0)
90 Wait(1)
91 Call(TranslateModel, LVarA, Float(-0.5), 0, 0)
92 Wait(1)
93 Call(TranslateModel, LVarA, 0, 0, 0)
94 Wait(2)
96 Return
97 End
98};
Bytecode EvtScript[]
ApiStatus RotateGroup(Evt *script, b32 isInitialCall)
Rotates the given group's position.
ApiStatus TranslateModel(Evt *script, b32 isInitialCall)
Translates the given model's position.
ApiStatus RandInt(Evt *script, b32 isInitialCall)
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
Definition macros.h:365
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:213
#define Add(VAR, INT_VALUE)
Definition macros.h:376
#define EndLoop
Marks the end of a loop.
Definition macros.h:248
#define Goto(LABEL_ID)
Moves execution to the given label.
Definition macros.h:232
#define Float(DOUBLE)
Definition macros.h:51
#define Label(LABEL_ID)
Marks this point in the script as a Goto target.
Definition macros.h:227
#define LVarA
Definition macros.h:158
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:576
#define Loop(TIMES)
Marks the beginning of a loop.
Definition macros.h:245
#define LVar0
Definition macros.h:148
#define Return
Kills the current EVT thread.
Definition macros.h:217