101 model->
flags &= ~MODEL_FLAG_HAS_TRANSFORM;
106 Bytecode* args = script->ptrReadPos;
115 Bytecode* args = script->ptrReadPos;
125 script->varTable[0] = centerX;
126 script->varTable[1] = centerY;
127 script->varTable[2] = centerZ;
132 Bytecode* args = script->ptrReadPos;
143 Bytecode* args = script->ptrReadPos;
151 model->
flags &= ~MODEL_FLAG_USES_CUSTOM_GFX;
157 Bytecode* args = script->ptrReadPos;
167 if (customGfxUnit != -1) {
174 Bytecode* args = script->ptrReadPos;
185 Bytecode* args = script->ptrReadPos;
194 model->
flags &= ~MODEL_FLAG_HAS_TEX_PANNER;
200 Bytecode* args = script->ptrReadPos;
206 model->
flags &= ~MODEL_FLAG_HIDDEN;
214 Bytecode* args = script->ptrReadPos;
223 Bytecode* args = script->ptrReadPos;
229 if (tileSelect == 0) {
241 Bytecode* args = script->ptrReadPos;
251 Bytecode* args = script->ptrReadPos;
261 Bytecode* args = script->ptrReadPos;
296 modelIndex = (*gCurrentModelTreeNodeInfo)[parentModelID].modelIndex;
299 if (modelIndex < 0xFF) {
300 firstChild = lastChild = modelIndex;
302 s32 treeDepth = (*gCurrentModelTreeNodeInfo)[parentModelID].treeDepth;
305 for (i = parentModelID - 1; i >= 0; i--) {
306 childModelInfo = &(*gCurrentModelTreeNodeInfo)[i];
308 if (treeDepth < childModelInfo->treeDepth) {
309 s32 childModelIndex = childModelInfo->
modelIndex;
311 if (childModelIndex < 0xFF) {
312 if (lastChild == -1) {
313 lastChild = childModelIndex;
315 firstChild = childModelIndex;
328 originalArg = *argsPtr;
330 for (i = firstChild; i <= lastChild; i++) {
331 Model* model = (*gCurrentModels)[i];
336 apiFunc(&localEvt, TRUE);
339 *argsPtr = originalArg;
348 Bytecode* args = script->ptrReadPos;
361 Bytecode* args = script->ptrReadPos;
392 Bytecode* args = script->ptrReadPos;
424 Bytecode* args = script->ptrReadPos;
431 if (transformIndex == -1) {
455 Bytecode* args = script->ptrReadPos;
464 Bytecode* args = script->ptrReadPos;
483 model->
flags &= ~MODEL_FLAG_HIDDEN;
493 Bytecode* args = script->ptrReadPos;
518 collider->
flags &= ~flags;
524 collider->
flags &= ~0xFF;
532 Bytecode* args = script->ptrReadPos;
547 collider->
flags &= ~flags;
553 collider->
flags &= ~0xFF;
563 Bytecode* args = script->ptrReadPos;
616 *outX = lavaReset->
pos.
x;
617 *outY = lavaReset->
pos.
y;
618 *outZ = lavaReset->
pos.
z;
631 script->varTable[0] = x;
632 script->varTable[1] = y;
633 script->varTable[2] = z;
639 Bytecode* args = script->ptrReadPos;
668 zone->
flags &= ~TEMP_SET_ZONE_ENABLED_FLAG_10000;
674 Bytecode* args = script->ptrReadPos;
688 zone->
flags &= ~TEMP_SET_ZONE_ENABLED_FLAG_10000;
751 Bytecode* args = script->ptrReadPos;
761 Bytecode* args = script->ptrReadPos;
775 Bytecode* args = script->ptrReadPos;
#define sfx_play_sound_at_position
@ TRANSFORM_GROUP_FLAG_HAS_TRANSFORM
@ TRANSFORM_GROUP_FLAG_MATRIX_DIRTY
@ TEMP_SET_ZONE_ENABLED_FLAG_10000
@ MODEL_FLAG_HAS_TRANSFORM
@ MODEL_FLAG_USES_CUSTOM_GFX
@ MODEL_FLAG_MATRIX_DIRTY
@ MODEL_FLAG_HAS_TEX_PANNER
@ COLLIDER_FLAG_SAFE_FLOOR
@ MODIFY_COLLIDER_FLAGS_SET_BITS
@ MODIFY_COLLIDER_FLAGS_SET_SURFACE
@ MODIFY_COLLIDER_FLAGS_SET_VALUE
@ MODIFY_COLLIDER_FLAGS_CLEAR_BITS
void clone_model(u16 srcModelID, u16 newModelID)
s32 evt_get_variable(Evt *script, Bytecode var)
void enable_transform_group(u16 modelID)
s32 get_model_list_index_from_tree_index(s32 treeIndex)
void get_map_IDs_by_name_checked(const char *mapName, s16 *areaID, s16 *mapID)
Same as get_map_IDs_by_name, but will panic if the map doesn't exist.
void mdl_group_set_visibility(u16, s32, s32)
void set_map_transition_effect(ScreenTransition)
s32 evt_set_variable(Evt *script, Bytecode var, s32 value)
void update_collider_transform(s16 colliderID)
struct Model * get_model_from_list_index(s32 listIndex)
void disable_transform_group(u16 modelID)
void mdl_make_transform_group(u16 modelID)
void set_custom_gfx(s32 customGfxIndex, Gfx *pre, Gfx *post)
s32 get_transform_group_index(s32)
void get_collider_center(s32 colliderID, f32 *x, f32 *y, f32 *z)
void set_aux_pan_v(s32 texPannerID, s32 value)
void set_main_pan_u(s32 texPannerID, s32 value)
void set_aux_pan_u(s32 texPannerID, s32 value)
void parent_collider_to_model(s16 colliderID, s16 modelIndex)
void set_tex_panner(struct Model *model, s32 texPannerID)
f32 evt_get_float_variable(Evt *script, Bytecode var)
void set_main_pan_v(s32 texPannerID, s32 value)
struct ModelTransformGroup * get_transform_group(s32 index)
void get_model_center_and_size(u16 modelID, f32 *centerX, f32 *centerY, f32 *centerZ, f32 *sizeX, f32 *sizeY, f32 *sizeZ)
void set_game_mode(s32 modeID)
s32 get_lava_reset_pos(f32 *outX, f32 *outY, f32 *outZ)
void set_zone_enabled(s32 zoneID, s32 enabled)
void apply_transform_to_children(ApiStatus(*apiFunc)(Evt *, s32), Evt *script)
ModelTreeInfoList * gCurrentModelTreeNodeInfo
LavaReset * gLavaResetList
void goto_map(Evt *script, s32 mode)
void modify_collider_family_flags(s32 index, s32 flags, s32 mode)
void mdl_make_local_vertex_copy(s32 arg0, u16 treeIdx, s32)
void(* ModelCustomGfxBuilderFunc)(s32 index)
void set_custom_gfx_builders(s32 customGfxIndex, ModelCustomGfxBuilderFunc pre, ModelCustomGfxBuilderFunc post)
void set_mdl_custom_gfx_set(Model *, s32, u32)
Matrix4f userTransformMtx
Matrix4f userTransformMtx
ModelTreeInfo ModelTreeInfoList[0x200]
ApiStatus SetCustomGfxBuilders(Evt *script, b32 isInitialCall)
ApiStatus EnableGroup(Evt *script, b32 isInitialCall)
Enables or disables the given group.
ApiStatus RotateGroup(Evt *script, b32 isInitialCall)
Rotates the given group's position.
ApiStatus SetGroupVisibility(Evt *script, b32 isInitialCall)
Enables or disables the given group.
ApiStatus SetModelCustomGfx(Evt *script, b32 isInitialCall)
ApiStatus PlaySoundAtModel(Evt *script, b32 isInitialCall)
Plays the given sound at the given model.
ApiStatus SetCustomGfxEnabled(Evt *script, b32 isInitialCall)
ApiStatus GetEntryID(Evt *script, b32 isInitialCall)
Returns the entryID of the Entry that the player entered the map from.
ApiStatus EnableModel(Evt *script, b32 isInitialCall)
Enables or disables the given model.
ApiStatus GotoMap(Evt *script, b32 isInitialCall)
Makes the player go to the given map and at the given entrance.
ApiStatus TranslateModel(Evt *script, b32 isInitialCall)
Translates the given model's position.
ApiStatus SetTransformGroupEnabled(Evt *script, b32 isInitialCall)
ApiStatus GetTransformGroup(Evt *script, b32 isInitialCall)
ApiStatus SetCustomGfx(Evt *script, b32 isInitialCall)
ApiStatus RotateModel(Evt *script, b32 isInitialCall)
Rotates the model the given amount on the selected axis.
ApiStatus GetMapID(Evt *script, b32 isInitialCall)
Returns the mapID of the map the player is currently on.
ApiStatus PlaySoundAtCollider(Evt *script, b32 isInitialCall)
Plays the given sound at the given collider.
ApiStatus SetTexPanOffset(Evt *script, b32 isInitialCall)
Sets offsets for texture panners.
ApiStatus SetModelTexVariant(Evt *script, b32 isInitialCall)
ApiStatus ScaleGroup(Evt *script, b32 isInitialCall)
Scales the given group's position.
ApiStatus SetModelFlags(Evt *script, b32 isInitialCall)
Sets flags for models.
ApiStatus ScaleModel(Evt *script, b32 isInitialCall)
Scales the model the given amount along the selected axis.
ApiStatus GetColliderCenter(Evt *script, b32 isInitialCall)
Returns the center of the given collider.
ApiStatus MakeTransformGroup(Evt *script, b32 isInitialCall)
ApiStatus GetModelCenter(Evt *script, b32 isInitialCall)
Returns the center of the given model.
ApiStatus ResetFromLava(Evt *script, b32 isInitialCall)
ApiStatus SetZoneEnabled(Evt *script, b32 isInitialCall)
Enables or disables the given zone.
ApiStatus TranslateGroup(Evt *script, b32 isInitialCall)
Translates the given group's position.
ApiStatus UpdateColliderTransform(Evt *script, b32 isInitialCall)
Applies transformation from parent model.
ApiStatus EnableTexPanning(Evt *script, b32 isInitialCall)
Enables or disables texture panning on the given model.
ApiStatus GotoMapSpecial(Evt *script, b32 isInitialCall)
Makes the player go to the given map and at the given entrance with a unique fadeout effect.
ApiStatus ParentColliderToModel(Evt *script, b32 isInitialCall)
Associates a model with a collider and applies the model's transformation.
ApiStatus GetModelIndex(Evt *script, b32 isInitialCall)
Returns the given model's index.
ApiStatus SetRenderMode(Evt *script, b32 isInitialCall)
ApiStatus MakeLocalVertexCopy(Evt *script, b32 isInitialCall)
ApiStatus InvalidateModelTransform(Evt *script, b32 isInitialCall)
ApiStatus CloneModel(Evt *script, b32 isInitialCall)
Clones the given model.
ApiStatus GetLoadType(Evt *script, b32 isInitialCall)
Returns the way the player loaded into the map, commonly used by to put the player in the correct pos...
ApiStatus SetTexPanner(Evt *script, b32 isInitialCall)
Sets a model's pannerID and sets the texture pan flag.
ApiStatus GotoMapByID(Evt *script, b32 isInitialCall)
ApiStatus ModifyColliderFlags(Evt *script, b32 isInitialCall)
Set flags for collider + siblings + children.
#define COLLISION_WITH_ENTITY_BIT
MapSettings * get_current_map_settings(void)
CollisionData gZoneCollisionData
CollisionStatus gCollisionStatus
GameStatus * gGameStatusPtr
CollisionData gCollisionData