10API_CALLABLE(N(UpdateAnimatedFish)) {
34 script->varTable[3] = 142;
35 script->varTable[4] = 0;
36 script->varTable[5] = -118;
37 script->varTable[6] = 44;
38 script->varTable[7] = -118;
39 script->varTable[8] = 3;
40 script->varTable[9] = 0;
41 script->varTable[11] = 0;
48 script->varTable[3] = 91;
49 script->varTable[4] = 0;
50 script->varTable[5] = -118;
51 script->varTable[6] = 91;
52 script->varTable[7] = -118;
53 script->varTable[8] = 3;
54 script->varTable[9] = 0;
55 script->varTable[11] = 0;
59 script->varTable[9] += script->varTable[8];
60 if (script->varTable[9] > 45) {
61 script->varTable[9] = 45;
63 vt0 = script->varTable[3];
64 vt1 = script->varTable[4];
65 vt2 = script->varTable[5];
66 vt3 = script->varTable[6];
67 vt4 = script->varTable[7];
73 if (script->varTable[9] == 45) {
74 script->varTable[11] = 1;
78 script->varTable[9] += script->varTable[8];
79 if (script->varTable[9] > 90) {
80 script->varTable[9] = 90;
82 vt0 = script->varTable[3];
83 vt1 = script->varTable[4];
84 vt2 = script->varTable[5];
85 vt3 = script->varTable[6];
86 vt4 = script->varTable[7];
92 if (script->varTable[9] == 90) {
93 script->varTable[11] = 2;
97 script->varTable[0] = vt0;
98 script->varTable[1] = vt1;
99 script->varTable[2] = vt2;
249s32 N(DriftBobbingOffsets)[] = {
250 0, -1, -1, -2, -2, -3, -5, -8,
251 -8, -7, -6, -4, -2, -1, 0, 255,
s32 evt_get_variable(Evt *script, Bytecode var)
ApiStatus TranslateModel(Evt *script, b32 isInitialCall)
Translates the given model's position.
ApiStatus RotateModel(Evt *script, b32 isInitialCall)
Rotates the model the given amount on the selected axis.
ApiStatus RandInt(Evt *script, b32 isInitialCall)
#define Ref(sym)
Address/pointer constant.
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
#define Sub(VAR, INT_VALUE)
#define IfNe(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR != RVAR.
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
#define UseBuf(INT_PTR)
Loads a s32 pointer for use with subsequent EVT_BUF_READ commands.
#define Add(VAR, INT_VALUE)
#define EndLoop
Marks the end of a loop.
#define Goto(LABEL_ID)
Moves execution to the given label.
#define BufRead1(VAR)
Consumes the next s32 from the buffer and stores it in the given variable.
#define IfGt(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR <= RVAR.
#define Label(LABEL_ID)
Marks this point in the script as a Goto target.
#define EndIf
Marks the end of an if statement or an else block.
#define BreakLoop
Breaks out of the innermost loop.
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
#define IfEq(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR == RVAR.
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
#define Loop(TIMES)
Marks the beginning of a loop.
#define Return
Kills the current EVT thread.