7#define NAMESPACE A(sbk_02)
9API_CALLABLE(N(UpdateSunPos)) {
24 angle = angle / 360.0f;
30 x =
sin_rad(angle) * 150.0f + 0.0f;
31 y =
cos_rad(angle) * 150.0f + 0.0f;
34 x -= script->varTable[11];
35 y -= script->varTable[12];
36 z -= script->varTable[13];
45API_CALLABLE(N(GetModelPos)) {
46 s32 modelID = script->varTable[10];
50 script->varTable[11] = (s32) model->
center.
x;
51 script->varTable[12] = (s32) model->center.y;
52 script->varTable[13] = (s32) model->center.z;
79 Exec(N(EVS_UpdateSunPos))
82 Exec(N(EVS_UpdateSunPos))
85 Exec(N(EVS_UpdateSunPos))
96s32 N(ForegroundModels)[] = {
105 .texture =
"sbk_tex",
106 .shape =
"sbk_bt02_shape",
107 .hit =
"sbk_bt02_hit",
109 .preBattle = &N(EVS_PreBattle),
110 .postBattle = &N(EVS_PostBattle),
111 .foregroundModelList = N(ForegroundModels),
s32 evt_get_variable(Evt *script, Bytecode var)
s32 get_model_list_index_from_tree_index(s32 treeIndex)
f32 evt_set_float_variable(Evt *script, Bytecode var, f32 value)
struct Model * get_model_from_list_index(s32 listIndex)
ApiStatus SetSpriteShading(Evt *script, b32 isInitialCall)
ApiStatus TranslateModel(Evt *script, b32 isInitialCall)
Translates the given model's position.
#define Mul(VAR, INT_VALUE)
#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 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 PlayEffect(args...)
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
#define Exec(EVT_SOURCE)
Launches a new thread.
#define Return
Kills the current EVT thread.
#define STAGE_MODEL_LIST_END