30 foliage_setup_shear_mtx(mtx, scale,
dx,
dz);
38 foliage_setup_shear_mtx(mtx, scale,
dx,
dz);
45static void foliage_clear_model_shear(
s32 modelID) {
77 script->functionTemp[1] = 0;
85 switch (
script->functionTemp[0]) {
87 for (
s32 i = 0; i < list->
count; i++) {
89 foliage_apply_model_shear(modelID, scale,
dx,
pivotY, 0.0f);
92 if (
script->functionTemp[1] == 0 && i == 0) {
106 for (
s32 i = 0; i < list->
count; i++) {
108 foliage_apply_model_shear(modelID, scale, -
dx,
pivotY, 0.0f);
111 script->functionTemp[1]++;
122 for (
s32 i = 0; i < list->
count; i++) {
124 foliage_clear_model_shear(modelID);
143 for (
s32 i = 0; i < list->
count; i++) {
146 if (
drop->spawnFlag == 0) {
173 for (
s32 i = 0; i < list->
count; i++) {
BSS s32 PopupMenu_SelectedIndex
#define sfx_play_sound_at_position
@ MODEL_FLAG_HAS_TRANSFORM
@ MODEL_FLAG_MATRIX_DIRTY
@ SOUND_SHAKE_TREE_LEAVES
EvtScript EVS_SearchBush
Execute this script to animate a shaking bush and potentially spawn an item from it.
EvtScript EVS_ShakeTree
Execute this script to animate a shaking tree and potentially spawn items from it.
s32 evt_get_variable(Evt *script, Bytecode var)
s32 get_model_list_index_from_tree_index(s32 treeIndex)
s32 evt_set_variable(Evt *script, Bytecode var, s32 value)
s32 make_item_entity_nodelay(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode, s32 pickupVar)
struct Model * get_model_from_list_index(s32 listIndex)
f32 evt_get_float_variable(Evt *script, Bytecode var)
void get_model_center_and_size(u16 modelID, f32 *centerX, f32 *centerY, f32 *centerZ, f32 *sizeX, f32 *sizeY, f32 *sizeZ)
ApiStatus GetPlayerPos(Evt *script, b32 isInitialCall)
ApiStatus GetGameContext(Evt *script, b32 isInitialCall)
Get current GameContext from GameStatus Use this to tell whether the script is executing in world or ...
#define Else
Marks the end of an if statement and the start of the else block.
#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 BufRead4(VAR1, VAR2, VAR3, VAR4)
Consumes the next four s32s from the buffer and stores them in the given variables.
#define BufRead1(VAR)
Consumes the next s32 from the buffer and stores it in the given variable.
#define EndIf
Marks the end of an if statement or an else block.
#define SetTimescale(TIMESCALE)
Sets the current thread's timescale. This is a multiplier applied to Wait and Wait_SECONDS.
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
#define Thread
Marks the start of a thread block.
#define EndThread
Marks the end of a thread block.
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
#define BufRead2(VAR1, VAR2)
Consumes the next two s32s from the buffer and stores them in the given variables.
#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 Return
Kills the current EVT thread.