4u16 N(StarAnimPhases)[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
16 for (i = 0; i < numVertices; i++) {
17 Vtx* vtx = &copiedVertices[i];
18 s16 temp1 = (sins(N(StarAnimPhases)[index] * (i % 3 + 1) + i) + 0x8000) / 2;
19 s32 temp2 = temp1 * 155;
20 vtx->v.cn[2] = temp2 / 0x8000 + 100;
21 vtx->v.cn[1] = temp2 / 0x8000 + 50;
23 temp3 = sins(N(StarAnimPhases)[index] / 0x8000 * (((i / 2) % 3 + 1) << 15) + N(StarAnimPhases)[index] / 0x4000 * 0x8000 + i) + 0x8000;
24 vtx->v.cn[0] = vtx->v.cn[0] * temp3 / 0x10000;
28 N(StarAnimPhases)[index] += 0x253;
31API_CALLABLE(N(SpawnSnowfall)) {
36API_CALLABLE(N(GetSnowflakePosition)) {
39 s32 posXInOut = *args++;
40 s32 posYInOut = *args++;
41 s32 posZInOut = *args++;
52 Call(N(SpawnSnowfall))
77EvtScript N(EVS_AnimateHangingSnowflake_RandomSpin) = {
80 Exec(N(EVS_RandomlySpinSnowflake))
95EvtScript N(EVS_AnimateHangingSnowflake_NoSpin) = {
void N build_gfx_star(s32 index)
Gfx * mdl_get_copied_gfx(s32 copyIndex)
s32 evt_get_variable(Evt *script, Bytecode var)
s32 evt_set_variable(Evt *script, Bytecode var, s32 value)
void mdl_get_copied_vertices(s32 copyIndex, Vtx **firstVertex, Vtx **copiedVertices, s32 *numCopied)
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 Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
#define Sub(VAR, INT_VALUE)
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
#define Add(VAR, INT_VALUE)
#define EndLoop
Marks the end of a loop.
#define Goto(LABEL_ID)
Moves execution to the given label.
#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 Wait(NUM_FRAMES)
Blocks for the given number of frames.
#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 Exec(EVT_SOURCE)
Launches a new thread.
#define Return
Kills the current EVT thread.