From 8b4a5f6d6d1b0b8b2a2e1c135f74f72853e27a01 Mon Sep 17 00:00:00 2001 From: MysterD Date: Fri, 8 Apr 2022 18:56:22 -0700 Subject: [PATCH] Refactored actor geos in DynOS --- data/dynos.cpp.h | 24 +- data/dynos_bin_actor.cpp | 2 +- data/dynos_bin_lvl.cpp | 9 +- data/dynos_bin_pointer.cpp | 18 +- data/dynos_c.cpp | 4 +- data/dynos_gfx_init.cpp | 6 +- data/dynos_gfx_update.cpp | 104 +- data/dynos_mgr_actor.cpp | 104 ++ data/dynos_mgr_builtin.cpp | 2173 ++++++++++++++++++++---------------- data/dynos_misc.cpp | 309 ----- 10 files changed, 1387 insertions(+), 1366 deletions(-) create mode 100644 data/dynos_mgr_actor.cpp diff --git a/data/dynos.cpp.h b/data/dynos.cpp.h index 68f1347b..ad8006a1 100644 --- a/data/dynos.cpp.h +++ b/data/dynos.cpp.h @@ -688,13 +688,6 @@ s32 DynOS_String_Width(const u8 *aStr64); // Geo // -void DynOS_Geo_AddActorCustom(const SysPath &aPackFolder, const char *aActorName); -const void *DynOS_Geo_GetActorLayoutFromName(const char *aActorName); -bool DynOS_Geo_IsCustomActor(s32 aIndex); -s32 DynOS_Geo_GetActorCount(); -const char *DynOS_Geo_GetActorName(s32 aIndex); -const void *DynOS_Geo_GetActorLayout(s32 aIndex); -s32 DynOS_Geo_GetActorIndex(const void *aGeoLayout); void *DynOS_Geo_GetGraphNode(const void *aGeoLayout, bool aKeepInMemory); // @@ -730,6 +723,11 @@ const char *DynOS_Warp_GetParamName(s32 aLevel, s32 aIndex); const void* DynOS_Builtin_ScriptPtr_GetFromName(const char* aDataName); const char* DynOS_Builtin_ScriptPtr_GetFromData(const void* aData); +const GeoLayout* DynOS_Builtin_Actor_GetFromName(const char* aDataName); +const char* DynOS_Builtin_Actor_GetFromData(const GeoLayout* aData); +const GeoLayout* DynOS_Builtin_Actor_GetFromIndex(s32 aIndex); +const char* DynOS_Builtin_Actor_GetNameFromIndex(s32 aIndex); +s32 DynOS_Builtin_Actor_GetCount(); const GeoLayout* DynOS_Builtin_LvlGeo_GetFromName(const char* aDataName); const char* DynOS_Builtin_LvlGeo_GetFromData(const GeoLayout* aData); const Collision* DynOS_Builtin_LvlCol_GetFromName(const char* aDataName); @@ -740,6 +738,18 @@ const void* DynOS_Builtin_Func_GetFromName(const char* aDataName); const void* DynOS_Builtin_Func_GetFromIndex(s32 aIndex); s32 DynOS_Builtin_Func_GetIndexFromData(const void* aData); +// +// Actor Manager +// + +void DynOS_Actor_AddCustom(const SysPath &aPackFolder, const char *aActorName); +s32 DynOS_Actor_GetCount(); +const char *DynOS_Actor_GetName(s32 aIndex); +const void *DynOS_Actor_GetLayoutFromIndex(s32 aIndex); +const void *DynOS_Actor_GetLayoutFromName(const char *aActorName); +s32 DynOS_Actor_GetIndex(const void *aGeoLayout); +bool DynOS_Actor_IsCustom(s32 aIndex); + // // Lvl Manager // diff --git a/data/dynos_bin_actor.cpp b/data/dynos_bin_actor.cpp index c68d9776..16a4344d 100644 --- a/data/dynos_bin_actor.cpp +++ b/data/dynos_bin_actor.cpp @@ -256,7 +256,7 @@ void DynOS_Actor_GeneratePack(const SysPath &aPackFolder) { bool foundActor = false; for (s32 i = prevGeoLayoutCount; i < geoLayoutCount; i++) { String _GeoRootName = _GfxData->mGeoLayouts[i]->mName; - const void* actor = DynOS_Geo_GetActorLayoutFromName(_GeoRootName.begin()); + const void* actor = DynOS_Actor_GetLayoutFromName(_GeoRootName.begin()); if (actor != NULL) { foundActor = true; _GfxData->mGenerateGeoLayouts.Add(_GfxData->mGeoLayouts[i]); diff --git a/data/dynos_bin_lvl.cpp b/data/dynos_bin_lvl.cpp index 69d9dc79..a7280eb2 100644 --- a/data/dynos_bin_lvl.cpp +++ b/data/dynos_bin_lvl.cpp @@ -1459,12 +1459,9 @@ static LevelScript ParseLevelScriptSymbolArgInternal(GfxData* aGfxData, DataNode } // Built-in actors - s32 actorCount = DynOS_Geo_GetActorCount(); - for (s32 i = 0; i < actorCount; i++) { - if (DynOS_Geo_IsCustomActor(i)) { break; } - if (!strcmp(_Arg.begin(), DynOS_Geo_GetActorName(i))) { - return (LevelScript)DynOS_Geo_GetActorLayout(i); - } + auto builtinActor = DynOS_Builtin_Actor_GetFromName(_Arg.begin()); + if (builtinActor != NULL) { + return (LevelScript)builtinActor; } // Built-in Lvl Geos diff --git a/data/dynos_bin_pointer.cpp b/data/dynos_bin_pointer.cpp index 10d77a91..bb854788 100644 --- a/data/dynos_bin_pointer.cpp +++ b/data/dynos_bin_pointer.cpp @@ -120,12 +120,9 @@ static PointerData GetDataFromPointer(const void* aPtr, GfxData* aGfxData) { } // Built-in Actors - s32 actorCount = DynOS_Geo_GetActorCount(); - for (s32 i = 0; i < actorCount; i++) { - if (DynOS_Geo_IsCustomActor(i)) { break; } - if (aPtr == DynOS_Geo_GetActorLayout(i)) { - return { DynOS_Geo_GetActorName(i), 0 }; - } + auto builtinActor = DynOS_Builtin_Actor_GetFromData((const GeoLayout*)aPtr); + if (builtinActor != NULL) { + return { builtinActor, 0 }; } // Built-in Lvl Geos @@ -362,12 +359,9 @@ static void *GetPointerFromData(GfxData *aGfxData, const String &aPtrName, u32 a } // Built-in Actors - s32 actorCount = DynOS_Geo_GetActorCount(); - for (s32 i = 0; i < actorCount; i++) { - if (DynOS_Geo_IsCustomActor(i)) { break; } - if (!strcmp(aPtrName.begin(), DynOS_Geo_GetActorName(i))) { - return (void*)DynOS_Geo_GetActorLayout(i); - } + auto builtinActor = DynOS_Builtin_Actor_GetFromName(aPtrName.begin()); + if (builtinActor != NULL) { + return (void*)builtinActor; } // Built-in Lvl Geos diff --git a/data/dynos_c.cpp b/data/dynos_c.cpp index d58b48ea..1a3f1f18 100644 --- a/data/dynos_c.cpp +++ b/data/dynos_c.cpp @@ -81,11 +81,11 @@ void dynos_generate_packs(const char* directory) { // -- geos -- // void dynos_add_actor_custom(const char *modPath, const char* geoName) { - DynOS_Geo_AddActorCustom(modPath, geoName); + DynOS_Actor_AddCustom(modPath, geoName); } const void* dynos_geolayout_get(const char *name) { - return DynOS_Geo_GetActorLayoutFromName(name); + return DynOS_Actor_GetLayoutFromName(name); } // -- collisions -- // diff --git a/data/dynos_gfx_init.cpp b/data/dynos_gfx_init.cpp index ae885ad0..7a619ee2 100644 --- a/data/dynos_gfx_init.cpp +++ b/data/dynos_gfx_init.cpp @@ -74,11 +74,11 @@ Array DynOS_Gfx_Init() { // Alloc and init the actors gfx list Array &pActorGfxList = DynOS_Gfx_GetActorList(); - pActorGfxList.Resize(DynOS_Geo_GetActorCount()); - for (s32 i = 0; i != DynOS_Geo_GetActorCount(); ++i) { + pActorGfxList.Resize(DynOS_Actor_GetCount()); + for (s32 i = 0; i != DynOS_Actor_GetCount(); ++i) { pActorGfxList[i].mPackIndex = -1; pActorGfxList[i].mGfxData = NULL; - pActorGfxList[i].mGraphNode = (GraphNode *) DynOS_Geo_GetGraphNode(DynOS_Geo_GetActorLayout(i), false); + pActorGfxList[i].mGraphNode = (GraphNode *) DynOS_Geo_GetGraphNode(DynOS_Actor_GetLayoutFromIndex(i), false); } // Scan the DynOS packs folder diff --git a/data/dynos_gfx_update.cpp b/data/dynos_gfx_update.cpp index 6cbe9492..96442595 100644 --- a/data/dynos_gfx_update.cpp +++ b/data/dynos_gfx_update.cpp @@ -52,7 +52,7 @@ void DynOS_Gfx_SwapAnimations(void *aPtr) { pDefaultAnimation = _Object->header.gfx.animInfo.curAnim; // Actor index - s32 _ActorIndex = DynOS_Geo_GetActorIndex(_Object->header.gfx.sharedChild->georef); + s32 _ActorIndex = DynOS_Actor_GetIndex(_Object->header.gfx.sharedChild->georef); if (_ActorIndex == -1) { return; } @@ -101,68 +101,66 @@ void DynOS_Gfx_SwapAnimations(void *aPtr) { // void DynOS_Gfx_Update() { - if (gObjectLists) { + if (!gObjectLists) { return; } - // Check packs - Array &_Enabled = DynOS_Gfx_GetPacksEnabled(); - const Array &pDynosPacks = DynOS_Gfx_GetPacks(); - while (_Enabled.Count() < pDynosPacks.Count()) { - _Enabled.Add(true); - } + // Check packs + Array &_Enabled = DynOS_Gfx_GetPacksEnabled(); + const Array &pDynosPacks = DynOS_Gfx_GetPacks(); + while (_Enabled.Count() < pDynosPacks.Count()) { + _Enabled.Add(true); + } - // Loop through all object lists - for (s32 list : { OBJ_LIST_PLAYER, OBJ_LIST_DESTRUCTIVE, OBJ_LIST_GENACTOR, OBJ_LIST_PUSHABLE, OBJ_LIST_LEVEL, OBJ_LIST_DEFAULT, OBJ_LIST_SURFACE, OBJ_LIST_POLELIKE, OBJ_LIST_UNIMPORTANT }) { - struct Object *_Head = (struct Object *) &gObjectLists[list]; - for (struct Object *_Object = (struct Object *) _Head->header.next; _Object != _Head; _Object = (struct Object *) _Object->header.next) { - if (_Object->header.gfx.sharedChild) { + // Loop through all object lists + for (s32 list : { OBJ_LIST_PLAYER, OBJ_LIST_DESTRUCTIVE, OBJ_LIST_GENACTOR, OBJ_LIST_PUSHABLE, OBJ_LIST_LEVEL, OBJ_LIST_DEFAULT, OBJ_LIST_SURFACE, OBJ_LIST_POLELIKE, OBJ_LIST_UNIMPORTANT }) { + struct Object *_Head = (struct Object *) &gObjectLists[list]; + for (struct Object *_Object = (struct Object *) _Head->header.next; _Object != _Head; _Object = (struct Object *) _Object->header.next) { + // Make sure it's non-null + if (!_Object->header.gfx.sharedChild) { continue; } - // Actor index - s32 _ActorIndex = DynOS_Geo_GetActorIndex(_Object->header.gfx.sharedChild->georef); - if (_ActorIndex != -1) { + // Actor index + s32 _ActorIndex = DynOS_Actor_GetIndex(_Object->header.gfx.sharedChild->georef); + if (_ActorIndex == -1) { continue; } - // Replace the object's model and animations - ActorGfx *_ActorGfx = &DynOS_Gfx_GetActorList()[_ActorIndex]; + // Replace the object's model and animations + ActorGfx *_ActorGfx = &DynOS_Gfx_GetActorList()[_ActorIndex]; - // Check for disabled downloaded models - if (configDisableDownloadedModels && _ActorGfx->mPackIndex == 99) { - extern const GeoLayout error_model_geo[]; - s32 actorIndex = DynOS_Geo_IsCustomActor(_ActorIndex) ? DynOS_Geo_GetActorIndex(error_model_geo) : _ActorIndex; - const void* geoLayout = DynOS_Geo_GetActorLayout(actorIndex); - _ActorGfx->mPackIndex = -1; - _ActorGfx->mGfxData = NULL; - _ActorGfx->mGraphNode = (GraphNode *) DynOS_Geo_GetGraphNode(geoLayout, true); - } + // Check for disabled downloaded models + if (configDisableDownloadedModels && _ActorGfx->mPackIndex == 99) { + extern const GeoLayout error_model_geo[]; + s32 actorIndex = DynOS_Actor_IsCustom(_ActorIndex) ? DynOS_Actor_GetIndex(error_model_geo) : _ActorIndex; + const void* geoLayout = DynOS_Actor_GetLayoutFromIndex(actorIndex); + _ActorGfx->mPackIndex = -1; + _ActorGfx->mGfxData = NULL; + _ActorGfx->mGraphNode = (GraphNode *) DynOS_Geo_GetGraphNode(geoLayout, true); + } - for (s32 i = 0; i != pDynosPacks.Count(); ++i) { - // If enabled and no pack is selected - // load the pack's model and replace the default actor's model - if (_Enabled[i] && _ActorGfx->mPackIndex == -1) { + for (s32 i = 0; i != pDynosPacks.Count(); ++i) { + // If enabled and no pack is selected + // load the pack's model and replace the default actor's model + if (_Enabled[i] && _ActorGfx->mPackIndex == -1) { - // Load Gfx data from binary - GfxData *_GfxData = DynOS_Actor_LoadFromBinary(pDynosPacks[i]->mPath, DynOS_Geo_GetActorName(_ActorIndex)); - if (_GfxData) { - _ActorGfx->mPackIndex = i; - _ActorGfx->mGfxData = _GfxData; - _ActorGfx->mGraphNode = (GraphNode *) DynOS_Geo_GetGraphNode((*(_GfxData->mGeoLayouts.end() - 1))->mData, true); - _ActorGfx->mGraphNode->georef = DynOS_Geo_GetActorLayout(_ActorIndex); - break; - } - } - - // If disabled and this pack is the one selected - // replace the actor's model by the default one - else if (!_Enabled[i] && _ActorGfx->mPackIndex == i) { - _ActorGfx->mPackIndex = -1; - _ActorGfx->mGfxData = NULL; - _ActorGfx->mGraphNode = (GraphNode *) DynOS_Geo_GetGraphNode(DynOS_Geo_GetActorLayout(_ActorIndex), true); - } - } - - // Update object - _Object->header.gfx.sharedChild = _ActorGfx->mGraphNode; + // Load Gfx data from binary + GfxData *_GfxData = DynOS_Actor_LoadFromBinary(pDynosPacks[i]->mPath, DynOS_Actor_GetName(_ActorIndex)); + if (_GfxData) { + _ActorGfx->mPackIndex = i; + _ActorGfx->mGfxData = _GfxData; + _ActorGfx->mGraphNode = (GraphNode *) DynOS_Geo_GetGraphNode((*(_GfxData->mGeoLayouts.end() - 1))->mData, true); + _ActorGfx->mGraphNode->georef = DynOS_Actor_GetLayoutFromIndex(_ActorIndex); + break; } } + + // If disabled and this pack is the one selected + // replace the actor's model by the default one + else if (!_Enabled[i] && _ActorGfx->mPackIndex == i) { + _ActorGfx->mPackIndex = -1; + _ActorGfx->mGfxData = NULL; + _ActorGfx->mGraphNode = (GraphNode *) DynOS_Geo_GetGraphNode(DynOS_Actor_GetLayoutFromIndex(_ActorIndex), true); + } } + + // Update object + _Object->header.gfx.sharedChild = _ActorGfx->mGraphNode; } } } diff --git a/data/dynos_mgr_actor.cpp b/data/dynos_mgr_actor.cpp new file mode 100644 index 00000000..802c6a6d --- /dev/null +++ b/data/dynos_mgr_actor.cpp @@ -0,0 +1,104 @@ +#include "dynos.cpp.h" + +static Array> sDynosCustomActors; + +// TODO: the cleanup/refactor didn't really go as planned. +// clean up the actor management code more + +void DynOS_Actor_AddCustom(const SysPath &aPackFolder, const char *aActorName) { + // check for duplicates + bool isUnique = true; + s32 foundIndex = -1; + for (s32 i = 0; i < DynOS_Actor_GetCount(); ++i) { + if (!strcmp(DynOS_Actor_GetName(i), aActorName)) { + isUnique = false; + foundIndex = i; + break; + } + } + + u16 actorLen = strlen(aActorName); + char* actorName = (char*)calloc(1, sizeof(char) * (actorLen + 1)); + strcpy(actorName, aActorName); + + GfxData *_GfxData = DynOS_Actor_LoadFromBinary(aPackFolder, actorName); + if (!_GfxData) { + free(actorName); + return; + } + + void* geoLayout = (*(_GfxData->mGeoLayouts.end() - 1))->mData; + if (!geoLayout) { + free(actorName); + return; + } + + // Add to custom actors + s32 index = DynOS_Actor_GetCount(); + if (isUnique) { + sDynosCustomActors.Add({ actorName, geoLayout }); + } else { + index = foundIndex; + free(actorName); + } + + // Alloc and init the actors gfx list + Array &pActorGfxList = DynOS_Gfx_GetActorList(); + pActorGfxList.Resize(DynOS_Actor_GetCount()); + pActorGfxList[index].mPackIndex = 99; + pActorGfxList[index].mGfxData = _GfxData; + pActorGfxList[index].mGraphNode = (GraphNode *) DynOS_Geo_GetGraphNode(geoLayout, true); +} + +s32 DynOS_Actor_GetCount() { + return (s32) DynOS_Builtin_Actor_GetCount() + sDynosCustomActors.Count(); +} + +const char *DynOS_Actor_GetName(s32 aIndex) { + s32 builtinCount = DynOS_Builtin_Actor_GetCount(); + if (aIndex < builtinCount) { return (const char *) DynOS_Builtin_Actor_GetNameFromIndex(aIndex); } + return sDynosCustomActors[aIndex - builtinCount].first; +} + +const void *DynOS_Actor_GetLayoutFromIndex(s32 aIndex) { + s32 builtinCount = DynOS_Builtin_Actor_GetCount(); + if (aIndex < builtinCount) { return (const void *) DynOS_Builtin_Actor_GetFromIndex(aIndex); } + return sDynosCustomActors[aIndex - builtinCount].second; +} + +const void *DynOS_Actor_GetLayoutFromName(const char *aActorName) { + if (aActorName == NULL) { return NULL; } + + // check levels + auto& levelsArray = DynOS_Lvl_GetArray(); + for (auto& lvl : levelsArray) { + for (auto& geo : lvl.second->mGeoLayouts) { + if (geo->mName == aActorName) { + return geo->mData; + } + } + } + + // check actors + for (s32 i = 0; i < DynOS_Actor_GetCount(); ++i) { + if (!strcmp(DynOS_Actor_GetName(i), aActorName)) { + return DynOS_Actor_GetLayoutFromIndex(i); + } + } + + return NULL; +} + +s32 DynOS_Actor_GetIndex(const void *aGeoLayout) { + for (s32 i = 0; i < DynOS_Actor_GetCount(); ++i) { + if (DynOS_Actor_GetLayoutFromIndex(i) == aGeoLayout) { + return i; + } + } + return -1; +} + +bool DynOS_Actor_IsCustom(s32 aIndex) { + s32 builtinCount = DynOS_Builtin_Actor_GetCount(); + return aIndex >= builtinCount; +} diff --git a/data/dynos_mgr_builtin.cpp b/data/dynos_mgr_builtin.cpp index 1cf64008..a1704a6b 100644 --- a/data/dynos_mgr_builtin.cpp +++ b/data/dynos_mgr_builtin.cpp @@ -19,6 +19,29 @@ extern "C" { #include "game/rendering_graph_node.h" #include "game/skybox.h" +#include "actors/common0.h" +#include "actors/common1.h" +#include "actors/group0.h" +#include "actors/group1.h" +#include "actors/group2.h" +#include "actors/group3.h" +#include "actors/group4.h" +#include "actors/group5.h" +#include "actors/group6.h" +#include "actors/group7.h" +#include "actors/group8.h" +#include "actors/group9.h" +#include "actors/group10.h" +#include "actors/group11.h" +#include "actors/group12.h" +#include "actors/group13.h" +#include "actors/group14.h" +#include "actors/group15.h" +#include "actors/group16.h" +#include "actors/group17.h" +#include "actors/custom0.h" +#include "actors/zcustom0.h" + #include "levels/bbh/header.h" #include "levels/bitdw/header.h" #include "levels/bitfs/header.h" @@ -55,6 +78,8 @@ extern "C" { #include "textures.h" } +#define define_builtin(_ptr) (const void*)#_ptr, (const void*)_ptr + #define MGR_FIND_DATA(_DataTable, _Cast) \ size_t _count = sizeof(_DataTable) / (2 * sizeof(_DataTable[0])); \ for (u32 _i = 0; _i < _count; _i++) { \ @@ -77,28 +102,26 @@ extern "C" { // Function Pointers // /////////////////////// -#define define_builtin_script_ptr(ptr) (const void*)#ptr, (const void*)ptr - static const void* sDynosBuiltinScriptPtrs[] = { - define_builtin_script_ptr(level_main_scripts_entry), - define_builtin_script_ptr(script_func_global_1), - define_builtin_script_ptr(script_func_global_2), - define_builtin_script_ptr(script_func_global_3), - define_builtin_script_ptr(script_func_global_4), - define_builtin_script_ptr(script_func_global_5), - define_builtin_script_ptr(script_func_global_6), - define_builtin_script_ptr(script_func_global_7), - define_builtin_script_ptr(script_func_global_8), - define_builtin_script_ptr(script_func_global_9), - define_builtin_script_ptr(script_func_global_10), - define_builtin_script_ptr(script_func_global_11), - define_builtin_script_ptr(script_func_global_12), - define_builtin_script_ptr(script_func_global_13), - define_builtin_script_ptr(script_func_global_14), - define_builtin_script_ptr(script_func_global_15), - define_builtin_script_ptr(script_func_global_16), - define_builtin_script_ptr(script_func_global_17), - define_builtin_script_ptr(script_func_global_18), + define_builtin(level_main_scripts_entry), + define_builtin(script_func_global_1), + define_builtin(script_func_global_2), + define_builtin(script_func_global_3), + define_builtin(script_func_global_4), + define_builtin(script_func_global_5), + define_builtin(script_func_global_6), + define_builtin(script_func_global_7), + define_builtin(script_func_global_8), + define_builtin(script_func_global_9), + define_builtin(script_func_global_10), + define_builtin(script_func_global_11), + define_builtin(script_func_global_12), + define_builtin(script_func_global_13), + define_builtin(script_func_global_14), + define_builtin(script_func_global_15), + define_builtin(script_func_global_16), + define_builtin(script_func_global_17), + define_builtin(script_func_global_18), }; const void* DynOS_Builtin_ScriptPtr_GetFromName(const char* aDataName) { @@ -109,479 +132,686 @@ const char* DynOS_Builtin_ScriptPtr_GetFromData(const void* aData) { MGR_FIND_NAME(sDynosBuiltinScriptPtrs); } + //////////// + // Actors // +//////////// + +static const void *sDynosBuiltinActors[] = { + define_builtin(amp_geo), + define_builtin(birds_geo), + define_builtin(blargg_geo), + define_builtin(blue_coin_switch_geo), + define_builtin(black_bobomb_geo), + define_builtin(bobomb_buddy_geo), + define_builtin(boo_geo), + define_builtin(boo_castle_geo), + define_builtin(bookend_geo), + define_builtin(bookend_part_geo), + define_builtin(bowling_ball_geo), + define_builtin(bowling_ball_track_geo), + define_builtin(bowser_geo), + define_builtin(bowser2_geo), + define_builtin(bowser_bomb_geo), + define_builtin(bowser_flames_geo), + define_builtin(bowser_impact_smoke_geo), + define_builtin(bowser_1_yellow_sphere_geo), + define_builtin(invisible_bowser_accessory_geo), + define_builtin(bowser_key_geo), + define_builtin(bowser_key_cutscene_geo), + define_builtin(breakable_box_geo), + define_builtin(breakable_box_small_geo), + define_builtin(bub_geo), + define_builtin(bubba_geo), + define_builtin(bubble_geo), + define_builtin(bullet_bill_geo), + define_builtin(bully_geo), + define_builtin(bully_boss_geo), + define_builtin(burn_smoke_geo), + define_builtin(butterfly_geo), + define_builtin(cannon_barrel_geo), + define_builtin(cannon_base_geo), + define_builtin(cap_switch_geo), + define_builtin(cartoon_star_geo), + define_builtin(chain_chomp_geo), + define_builtin(checkerboard_platform_geo), + define_builtin(chilly_chief_geo), + define_builtin(chilly_chief_big_geo), + define_builtin(chuckya_geo), + define_builtin(clam_shell_geo), + define_builtin(yellow_coin_geo), + define_builtin(yellow_coin_no_shadow_geo), + define_builtin(blue_coin_geo), + define_builtin(blue_coin_no_shadow_geo), + define_builtin(red_coin_geo), + define_builtin(red_coin_no_shadow_geo), + define_builtin(dirt_animation_geo), + define_builtin(dorrie_geo), + define_builtin(cabin_door_geo), + define_builtin(castle_door_geo), + define_builtin(castle_door_0_star_geo), + define_builtin(castle_door_1_star_geo), + define_builtin(castle_door_3_stars_geo), + define_builtin(haunted_door_geo), + define_builtin(hazy_maze_door_geo), + define_builtin(metal_door_geo), + define_builtin(key_door_geo), + define_builtin(wooden_door_geo), + define_builtin(enemy_lakitu_geo), + define_builtin(exclamation_box_geo), + define_builtin(exclamation_box_outline_geo), + define_builtin(explosion_geo), + define_builtin(eyerok_left_hand_geo), + define_builtin(eyerok_right_hand_geo), + define_builtin(fish_geo), + define_builtin(cyan_fish_geo), + define_builtin(flyguy_geo), + define_builtin(red_flame_geo), + define_builtin(red_flame_shadow_geo), + define_builtin(blue_flame_geo), + define_builtin(fwoosh_geo), + define_builtin(goomba_geo), + define_builtin(haunted_cage_geo), + define_builtin(haunted_chair_geo), + define_builtin(heart_geo), + define_builtin(heave_ho_geo), + define_builtin(hoot_geo), + define_builtin(king_bobomb_geo), + define_builtin(klepto_geo), + define_builtin(koopa_with_shell_geo), + define_builtin(koopa_without_shell_geo), + define_builtin(koopa_flag_geo), + define_builtin(koopa_shell_geo), + define_builtin(lakitu_geo), + define_builtin(mad_piano_geo), + define_builtin(manta_seg5_geo_05008D14), + define_builtin(mario_geo), + define_builtin(marios_cap_geo), + define_builtin(marios_metal_cap_geo), + define_builtin(marios_wing_cap_geo), + define_builtin(marios_winged_metal_cap_geo), + define_builtin(metal_box_geo), + define_builtin(metallic_ball_geo), + define_builtin(mips_geo), + define_builtin(mist_geo), + define_builtin(moneybag_geo), + define_builtin(monty_mole_geo), + define_builtin(mr_blizzard_geo), + define_builtin(mr_blizzard_hidden_geo), + define_builtin(mr_i_geo), + define_builtin(mr_i_iris_geo), + define_builtin(mushroom_1up_geo), + define_builtin(number_geo), + define_builtin(peach_geo), + define_builtin(penguin_geo), + define_builtin(piranha_plant_geo), + define_builtin(pokey_head_geo), + define_builtin(pokey_body_part_geo), + define_builtin(purple_marble_geo), + define_builtin(purple_switch_geo), + define_builtin(scuttlebug_geo), + define_builtin(seaweed_geo), + define_builtin(skeeter_geo), + define_builtin(small_key_geo), + define_builtin(small_water_splash_geo), + define_builtin(smoke_geo), + define_builtin(snufit_geo), + define_builtin(sparkles_geo), + define_builtin(sparkles_animation_geo), + define_builtin(spindrift_geo), + define_builtin(spiny_geo), + define_builtin(spiny_ball_geo), + define_builtin(star_geo), + define_builtin(transparent_star_geo), + define_builtin(sushi_geo), + define_builtin(swoop_geo), + define_builtin(thwomp_geo), + define_builtin(toad_geo), + define_builtin(treasure_chest_base_geo), + define_builtin(treasure_chest_lid_geo), + define_builtin(bubbly_tree_geo), + define_builtin(spiky_tree_geo), + define_builtin(snow_tree_geo), + define_builtin(palm_tree_geo), + define_builtin(leaves_geo), + define_builtin(tweester_geo), + define_builtin(ukiki_geo), + define_builtin(unagi_geo), + define_builtin(warp_pipe_geo), + define_builtin(water_bomb_geo), + define_builtin(water_bomb_shadow_geo), + define_builtin(water_ring_geo), + define_builtin(water_splash_geo), + define_builtin(idle_water_wave_geo), + define_builtin(wave_trail_geo), + define_builtin(white_particle_geo), + define_builtin(white_puff_geo), + define_builtin(whomp_geo), + define_builtin(wiggler_head_geo), + define_builtin(wiggler_body_geo), + define_builtin(wooden_post_geo), + define_builtin(wooden_signpost_geo), + define_builtin(yellow_sphere_geo), + define_builtin(yoshi_geo), + define_builtin(yoshi_egg_geo), + // coop models + define_builtin(error_model_geo), + define_builtin(luigi_geo), + define_builtin(luigis_cap_geo), + define_builtin(luigis_metal_cap_geo), + define_builtin(luigis_wing_cap_geo), + define_builtin(luigis_winged_metal_cap_geo), + define_builtin(toad_player_geo), + define_builtin(toads_cap_geo), + define_builtin(toads_metal_cap_geo), + define_builtin(toads_wing_cap_geo), + define_builtin(waluigi_geo), + define_builtin(waluigis_cap_geo), + define_builtin(waluigis_metal_cap_geo), + define_builtin(waluigis_wing_cap_geo), + define_builtin(waluigis_winged_metal_cap_geo), + define_builtin(wario_geo), + define_builtin(warios_cap_geo), + define_builtin(warios_metal_cap_geo), + define_builtin(warios_wing_cap_geo), + define_builtin(warios_winged_metal_cap_geo), +}; + +const GeoLayout* DynOS_Builtin_Actor_GetFromName(const char* aDataName) { + MGR_FIND_DATA(sDynosBuiltinActors, (const GeoLayout*)); +} + +const char* DynOS_Builtin_Actor_GetFromData(const GeoLayout* aData) { + MGR_FIND_NAME(sDynosBuiltinActors); +} + +const GeoLayout* DynOS_Builtin_Actor_GetFromIndex(s32 aIndex) { + size_t count = DynOS_Builtin_Actor_GetCount(); + if (aIndex < 0 || aIndex >= count) { return NULL; } + return (const GeoLayout*)sDynosBuiltinActors[aIndex * 2 + 1]; +} + +const char* DynOS_Builtin_Actor_GetNameFromIndex(s32 aIndex) { + size_t count = DynOS_Builtin_Actor_GetCount(); + if (aIndex < 0 || aIndex >= count) { return NULL; } + return (const char*)sDynosBuiltinActors[aIndex * 2 + 0]; +} + +s32 DynOS_Builtin_Actor_GetCount() { + return sizeof(sDynosBuiltinActors) / (2 * sizeof(sDynosBuiltinActors[0])); +} + //////////////// // Level Geos // //////////////// -#define define_builtin_lvl_geo(tex) (const void*) #tex, (const void*) tex static const void* sDynosBuiltinLvlGeos[] = { - define_builtin_lvl_geo(bitfs_geo_0004B0), - define_builtin_lvl_geo(bitfs_geo_0004C8), - define_builtin_lvl_geo(bitfs_geo_0004E0), - define_builtin_lvl_geo(bitfs_geo_0004F8), - define_builtin_lvl_geo(bitfs_geo_000510), - define_builtin_lvl_geo(bitfs_geo_000528), - define_builtin_lvl_geo(bitfs_geo_000540), - define_builtin_lvl_geo(bitfs_geo_000558), - define_builtin_lvl_geo(bitfs_geo_000570), - define_builtin_lvl_geo(bitfs_geo_000588), - define_builtin_lvl_geo(bitfs_geo_0005A0), - define_builtin_lvl_geo(bitfs_geo_0005B8), - define_builtin_lvl_geo(bitfs_geo_0005D0), - define_builtin_lvl_geo(bitfs_geo_0005E8), - define_builtin_lvl_geo(bitfs_geo_000600), - define_builtin_lvl_geo(bitfs_geo_000618), - define_builtin_lvl_geo(bitfs_geo_000630), - define_builtin_lvl_geo(bitfs_geo_000648), - define_builtin_lvl_geo(bitfs_geo_000660), - define_builtin_lvl_geo(bitfs_geo_000678), - define_builtin_lvl_geo(bitfs_geo_000690), - define_builtin_lvl_geo(bitfs_geo_0006A8), - define_builtin_lvl_geo(bitfs_geo_0006C0), - define_builtin_lvl_geo(bitfs_geo_0006D8), - define_builtin_lvl_geo(bitfs_geo_0006F0), - define_builtin_lvl_geo(bitfs_geo_000708), - define_builtin_lvl_geo(bitfs_geo_000728), - define_builtin_lvl_geo(bitfs_geo_000740), - define_builtin_lvl_geo(bitfs_geo_000758), - define_builtin_lvl_geo(bitfs_geo_000770), - define_builtin_lvl_geo(bitfs_geo_000788), - define_builtin_lvl_geo(bitfs_geo_0007A0), - define_builtin_lvl_geo(bits_geo_000430), - define_builtin_lvl_geo(bits_geo_000448), - define_builtin_lvl_geo(bits_geo_000460), - define_builtin_lvl_geo(bits_geo_000478), - define_builtin_lvl_geo(bits_geo_000490), - define_builtin_lvl_geo(bits_geo_0004A8), - define_builtin_lvl_geo(bits_geo_0004C0), - define_builtin_lvl_geo(bits_geo_0004D8), - define_builtin_lvl_geo(bits_geo_0004F0), - define_builtin_lvl_geo(bits_geo_000508), - define_builtin_lvl_geo(bits_geo_000520), - define_builtin_lvl_geo(bits_geo_000538), - define_builtin_lvl_geo(bits_geo_000550), - define_builtin_lvl_geo(bits_geo_000568), - define_builtin_lvl_geo(bits_geo_000580), - define_builtin_lvl_geo(bits_geo_000598), - define_builtin_lvl_geo(bits_geo_0005B0), - define_builtin_lvl_geo(bits_geo_0005C8), - define_builtin_lvl_geo(bits_geo_0005E0), - define_builtin_lvl_geo(bits_geo_0005F8), - define_builtin_lvl_geo(bits_geo_000610), - define_builtin_lvl_geo(bits_geo_000628), - define_builtin_lvl_geo(bits_geo_000640), - define_builtin_lvl_geo(bits_geo_000658), - define_builtin_lvl_geo(bits_geo_000670), - define_builtin_lvl_geo(bits_geo_000688), - define_builtin_lvl_geo(bits_geo_0006A0), - define_builtin_lvl_geo(bits_geo_0006B8), - define_builtin_lvl_geo(bits_geo_0006D0), - define_builtin_lvl_geo(bits_geo_0006E8), - define_builtin_lvl_geo(bits_geo_000700), - define_builtin_lvl_geo(bits_geo_000718), - define_builtin_lvl_geo(bob_geo_000440), - define_builtin_lvl_geo(bob_geo_000458), - define_builtin_lvl_geo(bob_geo_000470), - define_builtin_lvl_geo(bob_geo_000488), - define_builtin_lvl_geo(bowser_1_geo_0000D0), - define_builtin_lvl_geo(bowser_2_geo_000170), - define_builtin_lvl_geo(bowser_2_geo_000170), - define_builtin_lvl_geo(bowser_2_geo_000188), - define_builtin_lvl_geo(bowser_2_geo_000188), - define_builtin_lvl_geo(bowser_3_geo_000290), - define_builtin_lvl_geo(bowser_3_geo_000290), - define_builtin_lvl_geo(bowser_3_geo_0002A8), - define_builtin_lvl_geo(bowser_3_geo_0002A8), - define_builtin_lvl_geo(bowser_3_geo_0002C0), - define_builtin_lvl_geo(bowser_3_geo_0002C0), - define_builtin_lvl_geo(bowser_3_geo_0002D8), - define_builtin_lvl_geo(bowser_3_geo_0002D8), - define_builtin_lvl_geo(bowser_3_geo_0002F0), - define_builtin_lvl_geo(bowser_3_geo_0002F0), - define_builtin_lvl_geo(bowser_3_geo_000308), - define_builtin_lvl_geo(bowser_3_geo_000308), - define_builtin_lvl_geo(bowser_3_geo_000320), - define_builtin_lvl_geo(bowser_3_geo_000320), - define_builtin_lvl_geo(bowser_3_geo_000338), - define_builtin_lvl_geo(bowser_3_geo_000338), - define_builtin_lvl_geo(bowser_3_geo_000350), - define_builtin_lvl_geo(bowser_3_geo_000350), - define_builtin_lvl_geo(bowser_3_geo_000368), - define_builtin_lvl_geo(bowser_3_geo_000368), - define_builtin_lvl_geo(bowser_3_geo_000380), - define_builtin_lvl_geo(bowser_3_geo_000380), - define_builtin_lvl_geo(bowser_3_geo_000398), - define_builtin_lvl_geo(bowser_3_geo_000398), - define_builtin_lvl_geo(castle_courtyard_geo_000200), - define_builtin_lvl_geo(castle_courtyard_geo_000218), - define_builtin_lvl_geo(castle_geo_000F00), - define_builtin_lvl_geo(castle_geo_000F18), - define_builtin_lvl_geo(castle_geo_000F30), - define_builtin_lvl_geo(castle_geo_000F70), - define_builtin_lvl_geo(castle_geo_000F88), - define_builtin_lvl_geo(castle_geo_000FA8), - define_builtin_lvl_geo(castle_geo_000FD0), - define_builtin_lvl_geo(castle_geo_001000), - define_builtin_lvl_geo(castle_geo_001038), - define_builtin_lvl_geo(castle_geo_001088), - define_builtin_lvl_geo(castle_geo_0010C8), - define_builtin_lvl_geo(castle_geo_001110), - define_builtin_lvl_geo(castle_geo_001158), - define_builtin_lvl_geo(castle_geo_0011A8), - define_builtin_lvl_geo(castle_geo_001200), - define_builtin_lvl_geo(castle_geo_001260), - define_builtin_lvl_geo(castle_geo_0012C8), - define_builtin_lvl_geo(castle_geo_001348), - define_builtin_lvl_geo(castle_geo_0013B8), - define_builtin_lvl_geo(castle_geo_001400), - define_builtin_lvl_geo(castle_geo_001518), - define_builtin_lvl_geo(castle_geo_001530), - define_builtin_lvl_geo(castle_geo_001548), - define_builtin_lvl_geo(castle_geo_001560), - define_builtin_lvl_geo(castle_geo_001578), - define_builtin_lvl_geo(castle_geo_0015B8), - define_builtin_lvl_geo(castle_geo_0015F8), - define_builtin_lvl_geo(castle_geo_001628), - define_builtin_lvl_geo(castle_geo_001668), - define_builtin_lvl_geo(castle_geo_001690), - define_builtin_lvl_geo(castle_geo_0016D8), - define_builtin_lvl_geo(castle_geo_001740), - define_builtin_lvl_geo(castle_geo_001798), - define_builtin_lvl_geo(castle_geo_001800), - define_builtin_lvl_geo(castle_geo_001858), - define_builtin_lvl_geo(castle_geo_001940), - define_builtin_lvl_geo(castle_geo_001958), - define_builtin_lvl_geo(castle_geo_001980), - define_builtin_lvl_geo(castle_geo_0019C8), - define_builtin_lvl_geo(castle_geo_0019F8), - define_builtin_lvl_geo(castle_geo_001A30), - define_builtin_lvl_geo(castle_geo_001A58), - define_builtin_lvl_geo(castle_geo_001AB8), - define_builtin_lvl_geo(castle_geo_001AF8), - define_builtin_lvl_geo(castle_geo_001B48), - define_builtin_lvl_geo(castle_geo_001BB0), - define_builtin_lvl_geo(castle_geo_001C10), - define_builtin_lvl_geo(castle_grounds_geo_000660), - define_builtin_lvl_geo(castle_grounds_geo_0006F4), - define_builtin_lvl_geo(castle_grounds_geo_00070C), - define_builtin_lvl_geo(castle_grounds_geo_000724), - define_builtin_lvl_geo(castle_grounds_geo_00073C), - define_builtin_lvl_geo(ccm_geo_0003D0), - define_builtin_lvl_geo(ccm_geo_0003F0), - define_builtin_lvl_geo(ccm_geo_00040C), - define_builtin_lvl_geo(ccm_geo_00042C), - define_builtin_lvl_geo(ccm_geo_00045C), - define_builtin_lvl_geo(ccm_geo_000494), - define_builtin_lvl_geo(ccm_geo_0004BC), - define_builtin_lvl_geo(ccm_geo_0004E4), - define_builtin_lvl_geo(ccm_geo_00051C), - define_builtin_lvl_geo(ccm_geo_0005E8), - define_builtin_lvl_geo(cotmc_geo_0001A0), - define_builtin_lvl_geo(ddd_geo_000450), - define_builtin_lvl_geo(ddd_geo_000478), - define_builtin_lvl_geo(ddd_geo_0004A0), - define_builtin_lvl_geo(ddd_geo_0004C0), - define_builtin_lvl_geo(ddd_geo_000570), - define_builtin_lvl_geo(geo_bbh_0005B0), - define_builtin_lvl_geo(geo_bbh_0005C8), - define_builtin_lvl_geo(geo_bbh_0005E0), - define_builtin_lvl_geo(geo_bbh_0005F8), - define_builtin_lvl_geo(geo_bbh_000610), - define_builtin_lvl_geo(geo_bbh_000628), - define_builtin_lvl_geo(geo_bbh_000640), - define_builtin_lvl_geo(geo_bbh_000658), - define_builtin_lvl_geo(geo_bbh_000670), - define_builtin_lvl_geo(geo_bbh_0006B0), - define_builtin_lvl_geo(geo_bbh_0006E8), - define_builtin_lvl_geo(geo_bbh_000730), - define_builtin_lvl_geo(geo_bbh_000750), - define_builtin_lvl_geo(geo_bbh_000768), - define_builtin_lvl_geo(geo_bbh_0007B0), - define_builtin_lvl_geo(geo_bbh_0007D0), - define_builtin_lvl_geo(geo_bbh_000800), - define_builtin_lvl_geo(geo_bbh_000828), - define_builtin_lvl_geo(geo_bbh_000860), - define_builtin_lvl_geo(geo_bbh_000888), - define_builtin_lvl_geo(geo_bbh_0008B0), - define_builtin_lvl_geo(geo_bbh_0008E8), - define_builtin_lvl_geo(geo_bbh_000950), - define_builtin_lvl_geo(geo_bbh_0009C8), - define_builtin_lvl_geo(geo_bbh_000A18), - define_builtin_lvl_geo(geo_bbh_000A60), - define_builtin_lvl_geo(geo_bbh_000AD8), - define_builtin_lvl_geo(geo_bbh_000B28), - define_builtin_lvl_geo(geo_bbh_000B88), - define_builtin_lvl_geo(geo_bbh_000BF0), - define_builtin_lvl_geo(geo_bbh_000C38), - define_builtin_lvl_geo(geo_bbh_000C88), - define_builtin_lvl_geo(geo_bbh_000CE8), - define_builtin_lvl_geo(geo_bbh_000D20), - define_builtin_lvl_geo(geo_bbh_000D68), - define_builtin_lvl_geo(geo_bbh_000DB0), - define_builtin_lvl_geo(geo_bbh_000DF0), - define_builtin_lvl_geo(geo_bbh_000E40), - define_builtin_lvl_geo(geo_bbh_000E80), - define_builtin_lvl_geo(geo_bbh_000EB0), - define_builtin_lvl_geo(geo_bbh_000F00), - define_builtin_lvl_geo(geo_bitdw_0003C0), - define_builtin_lvl_geo(geo_bitdw_0003D8), - define_builtin_lvl_geo(geo_bitdw_0003F0), - define_builtin_lvl_geo(geo_bitdw_000408), - define_builtin_lvl_geo(geo_bitdw_000420), - define_builtin_lvl_geo(geo_bitdw_000438), - define_builtin_lvl_geo(geo_bitdw_000450), - define_builtin_lvl_geo(geo_bitdw_000468), - define_builtin_lvl_geo(geo_bitdw_000480), - define_builtin_lvl_geo(geo_bitdw_000498), - define_builtin_lvl_geo(geo_bitdw_0004B0), - define_builtin_lvl_geo(geo_bitdw_0004C8), - define_builtin_lvl_geo(geo_bitdw_0004E0), - define_builtin_lvl_geo(geo_bitdw_0004F8), - define_builtin_lvl_geo(geo_bitdw_000510), - define_builtin_lvl_geo(geo_bitdw_000528), - define_builtin_lvl_geo(geo_bitdw_000540), - define_builtin_lvl_geo(geo_bitdw_000558), - define_builtin_lvl_geo(geo_bitdw_000570), - define_builtin_lvl_geo(geo_bitdw_000588), - define_builtin_lvl_geo(geo_bitdw_0005A0), - define_builtin_lvl_geo(geo_bitdw_0005B8), - define_builtin_lvl_geo(geo_bitdw_0005D0), - define_builtin_lvl_geo(geo_bitdw_0005E8), - define_builtin_lvl_geo(geo_bitdw_000600), - define_builtin_lvl_geo(geo_bitdw_000618), - define_builtin_lvl_geo(hmc_geo_000530), - define_builtin_lvl_geo(hmc_geo_000548), - define_builtin_lvl_geo(hmc_geo_000570), - define_builtin_lvl_geo(hmc_geo_000588), - define_builtin_lvl_geo(hmc_geo_0005A0), - define_builtin_lvl_geo(hmc_geo_0005B8), - define_builtin_lvl_geo(hmc_geo_0005D0), - define_builtin_lvl_geo(hmc_geo_0005E8), - define_builtin_lvl_geo(hmc_geo_000618), - define_builtin_lvl_geo(hmc_geo_000658), - define_builtin_lvl_geo(hmc_geo_0006A8), - define_builtin_lvl_geo(hmc_geo_0006E0), - define_builtin_lvl_geo(hmc_geo_000700), - define_builtin_lvl_geo(hmc_geo_000748), - define_builtin_lvl_geo(hmc_geo_000770), - define_builtin_lvl_geo(hmc_geo_000798), - define_builtin_lvl_geo(hmc_geo_0007F8), - define_builtin_lvl_geo(hmc_geo_000850), - define_builtin_lvl_geo(hmc_geo_0008D0), - define_builtin_lvl_geo(hmc_geo_000938), - define_builtin_lvl_geo(hmc_geo_000998), - define_builtin_lvl_geo(hmc_geo_000A18), - define_builtin_lvl_geo(hmc_geo_000A88), - define_builtin_lvl_geo(hmc_geo_000AE8), - define_builtin_lvl_geo(hmc_geo_000B48), - define_builtin_lvl_geo(hmc_geo_000B90), - define_builtin_lvl_geo(jrb_geo_000900), - define_builtin_lvl_geo(jrb_geo_000918), - define_builtin_lvl_geo(jrb_geo_000930), - define_builtin_lvl_geo(jrb_geo_000948), - define_builtin_lvl_geo(jrb_geo_000960), - define_builtin_lvl_geo(jrb_geo_000978), - define_builtin_lvl_geo(jrb_geo_000990), - define_builtin_lvl_geo(jrb_geo_0009B0), - define_builtin_lvl_geo(jrb_geo_0009C8), - define_builtin_lvl_geo(jrb_geo_0009E8), - define_builtin_lvl_geo(jrb_geo_000A00), - define_builtin_lvl_geo(jrb_geo_000A18), - define_builtin_lvl_geo(jrb_geo_000AFC), - define_builtin_lvl_geo(lll_geo_0009E0), - define_builtin_lvl_geo(lll_geo_0009F8), - define_builtin_lvl_geo(lll_geo_000A10), - define_builtin_lvl_geo(lll_geo_000A28), - define_builtin_lvl_geo(lll_geo_000A40), - define_builtin_lvl_geo(lll_geo_000A60), - define_builtin_lvl_geo(lll_geo_000A78), - define_builtin_lvl_geo(lll_geo_000A90), - define_builtin_lvl_geo(lll_geo_000AA8), - define_builtin_lvl_geo(lll_geo_000AC0), - define_builtin_lvl_geo(lll_geo_000AD8), - define_builtin_lvl_geo(lll_geo_000AF0), - define_builtin_lvl_geo(lll_geo_000B08), - define_builtin_lvl_geo(lll_geo_000B20), - define_builtin_lvl_geo(lll_geo_000B38), - define_builtin_lvl_geo(lll_geo_000B50), - define_builtin_lvl_geo(lll_geo_000B68), - define_builtin_lvl_geo(lll_geo_000B80), - define_builtin_lvl_geo(lll_geo_000B98), - define_builtin_lvl_geo(lll_geo_000BB0), - define_builtin_lvl_geo(lll_geo_000BC8), - define_builtin_lvl_geo(lll_geo_000BE0), - define_builtin_lvl_geo(lll_geo_000BF8), - define_builtin_lvl_geo(lll_geo_000C10), - define_builtin_lvl_geo(lll_geo_000C30), - define_builtin_lvl_geo(lll_geo_000C50), - define_builtin_lvl_geo(lll_geo_000C70), - define_builtin_lvl_geo(lll_geo_000C90), - define_builtin_lvl_geo(lll_geo_000CB0), - define_builtin_lvl_geo(lll_geo_000CD0), - define_builtin_lvl_geo(lll_geo_000CF0), - define_builtin_lvl_geo(lll_geo_000D10), - define_builtin_lvl_geo(lll_geo_000D30), - define_builtin_lvl_geo(lll_geo_000D50), - define_builtin_lvl_geo(lll_geo_000D70), - define_builtin_lvl_geo(lll_geo_000D90), - define_builtin_lvl_geo(lll_geo_000DB0), - define_builtin_lvl_geo(lll_geo_000DD0), - define_builtin_lvl_geo(lll_geo_000DE8), - define_builtin_lvl_geo(lll_geo_000E00), - define_builtin_lvl_geo(lll_geo_000EA8), - define_builtin_lvl_geo(lll_geo_000EC0), - define_builtin_lvl_geo(pss_geo_000100), - define_builtin_lvl_geo(rr_geo_000660), - define_builtin_lvl_geo(rr_geo_000678), - define_builtin_lvl_geo(rr_geo_000690), - define_builtin_lvl_geo(rr_geo_0006A8), - define_builtin_lvl_geo(rr_geo_0006C0), - define_builtin_lvl_geo(rr_geo_0006D8), - define_builtin_lvl_geo(rr_geo_0006F0), - define_builtin_lvl_geo(rr_geo_000708), - define_builtin_lvl_geo(rr_geo_000720), - define_builtin_lvl_geo(rr_geo_000738), - define_builtin_lvl_geo(rr_geo_000758), - define_builtin_lvl_geo(rr_geo_000770), - define_builtin_lvl_geo(rr_geo_000788), - define_builtin_lvl_geo(rr_geo_0007A0), - define_builtin_lvl_geo(rr_geo_0007B8), - define_builtin_lvl_geo(rr_geo_0007D0), - define_builtin_lvl_geo(rr_geo_0007E8), - define_builtin_lvl_geo(rr_geo_000800), - define_builtin_lvl_geo(rr_geo_000818), - define_builtin_lvl_geo(rr_geo_000830), - define_builtin_lvl_geo(rr_geo_000848), - define_builtin_lvl_geo(rr_geo_000860), - define_builtin_lvl_geo(rr_geo_000878), - define_builtin_lvl_geo(rr_geo_000890), - define_builtin_lvl_geo(rr_geo_0008A8), - define_builtin_lvl_geo(rr_geo_0008C0), - define_builtin_lvl_geo(rr_geo_0008D8), - define_builtin_lvl_geo(rr_geo_0008F0), - define_builtin_lvl_geo(rr_geo_000908), - define_builtin_lvl_geo(rr_geo_000920), - define_builtin_lvl_geo(rr_geo_000940), - define_builtin_lvl_geo(rr_geo_000958), - define_builtin_lvl_geo(rr_geo_000970), - define_builtin_lvl_geo(rr_geo_000988), - define_builtin_lvl_geo(rr_geo_0009A0), - define_builtin_lvl_geo(rr_geo_0009B8), - define_builtin_lvl_geo(rr_geo_0009D0), - define_builtin_lvl_geo(sa_geo_000170), - define_builtin_lvl_geo(sl_geo_000360), - define_builtin_lvl_geo(sl_geo_000378), - define_builtin_lvl_geo(sl_geo_000390), - define_builtin_lvl_geo(sl_geo_0003A8), - define_builtin_lvl_geo(sl_geo_000484), - define_builtin_lvl_geo(ssl_geo_0005C0), - define_builtin_lvl_geo(ssl_geo_0005D8), - define_builtin_lvl_geo(ssl_geo_000618), - define_builtin_lvl_geo(ssl_geo_000630), - define_builtin_lvl_geo(ssl_geo_000648), - define_builtin_lvl_geo(ssl_geo_000734), - define_builtin_lvl_geo(ssl_geo_000764), - define_builtin_lvl_geo(ssl_geo_000794), - define_builtin_lvl_geo(ssl_geo_0007AC), - define_builtin_lvl_geo(ssl_geo_0007CC), - define_builtin_lvl_geo(ssl_geo_00088C), - define_builtin_lvl_geo(thi_geo_0005B0), - define_builtin_lvl_geo(thi_geo_0005C8), - define_builtin_lvl_geo(thi_geo_0005F0), - define_builtin_lvl_geo(thi_geo_000608), - define_builtin_lvl_geo(thi_geo_0006D4), - define_builtin_lvl_geo(thi_geo_00079C), - define_builtin_lvl_geo(totwc_geo_000160), - define_builtin_lvl_geo(totwc_geo_000188), - define_builtin_lvl_geo(ttc_geo_000240), - define_builtin_lvl_geo(ttc_geo_000258), - define_builtin_lvl_geo(ttc_geo_000270), - define_builtin_lvl_geo(ttc_geo_000288), - define_builtin_lvl_geo(ttc_geo_0002A8), - define_builtin_lvl_geo(ttc_geo_0002C8), - define_builtin_lvl_geo(ttc_geo_0002E0), - define_builtin_lvl_geo(ttc_geo_0002F8), - define_builtin_lvl_geo(ttc_geo_000310), - define_builtin_lvl_geo(ttc_geo_000328), - define_builtin_lvl_geo(ttc_geo_000340), - define_builtin_lvl_geo(ttc_geo_000358), - define_builtin_lvl_geo(ttc_geo_000370), - define_builtin_lvl_geo(ttc_geo_000388), - define_builtin_lvl_geo(ttc_geo_0003A0), - define_builtin_lvl_geo(ttc_geo_0003B8), - define_builtin_lvl_geo(ttm_geo_000710), - define_builtin_lvl_geo(ttm_geo_000730), - define_builtin_lvl_geo(ttm_geo_000748), - define_builtin_lvl_geo(ttm_geo_000778), - define_builtin_lvl_geo(ttm_geo_0007A8), - define_builtin_lvl_geo(ttm_geo_0007D8), - define_builtin_lvl_geo(ttm_geo_000808), - define_builtin_lvl_geo(ttm_geo_000830), - define_builtin_lvl_geo(ttm_geo_000858), - define_builtin_lvl_geo(ttm_geo_000880), - define_builtin_lvl_geo(ttm_geo_0008A8), - define_builtin_lvl_geo(ttm_geo_0008D0), - define_builtin_lvl_geo(ttm_geo_0008F8), - define_builtin_lvl_geo(ttm_geo_000920), - define_builtin_lvl_geo(ttm_geo_000948), - define_builtin_lvl_geo(ttm_geo_000970), - define_builtin_lvl_geo(ttm_geo_000990), - define_builtin_lvl_geo(ttm_geo_0009C0), - define_builtin_lvl_geo(ttm_geo_0009F0), - define_builtin_lvl_geo(ttm_geo_000A18), - define_builtin_lvl_geo(ttm_geo_000A40), - define_builtin_lvl_geo(ttm_geo_000A70), - define_builtin_lvl_geo(ttm_geo_000B5C), - define_builtin_lvl_geo(ttm_geo_000BEC), - define_builtin_lvl_geo(ttm_geo_000C84), - define_builtin_lvl_geo(ttm_geo_000D14), - define_builtin_lvl_geo(ttm_geo_000D4C), - define_builtin_lvl_geo(ttm_geo_000D84), - define_builtin_lvl_geo(ttm_geo_000DBC), - define_builtin_lvl_geo(ttm_geo_000DF4), - define_builtin_lvl_geo(vcutm_geo_0001F0), - define_builtin_lvl_geo(vcutm_geo_000208), - define_builtin_lvl_geo(wdw_geo_000580), - define_builtin_lvl_geo(wdw_geo_000598), - define_builtin_lvl_geo(wdw_geo_0005C0), - define_builtin_lvl_geo(wdw_geo_0005E8), - define_builtin_lvl_geo(wdw_geo_000610), - define_builtin_lvl_geo(wdw_geo_000628), - define_builtin_lvl_geo(wdw_geo_000640), - define_builtin_lvl_geo(wdw_geo_000658), - define_builtin_lvl_geo(wdw_geo_000724), - define_builtin_lvl_geo(wf_geo_0007E0), - define_builtin_lvl_geo(wf_geo_000820), - define_builtin_lvl_geo(wf_geo_000860), - define_builtin_lvl_geo(wf_geo_000878), - define_builtin_lvl_geo(wf_geo_000890), - define_builtin_lvl_geo(wf_geo_0008A8), - define_builtin_lvl_geo(wf_geo_0008E8), - define_builtin_lvl_geo(wf_geo_000900), - define_builtin_lvl_geo(wf_geo_000940), - define_builtin_lvl_geo(wf_geo_000958), - define_builtin_lvl_geo(wf_geo_0009A0), - define_builtin_lvl_geo(wf_geo_0009B8), - define_builtin_lvl_geo(wf_geo_0009D0), - define_builtin_lvl_geo(wf_geo_0009E8), - define_builtin_lvl_geo(wf_geo_000A00), - define_builtin_lvl_geo(wf_geo_000A40), - define_builtin_lvl_geo(wf_geo_000A58), - define_builtin_lvl_geo(wf_geo_000A98), - define_builtin_lvl_geo(wf_geo_000AB0), - define_builtin_lvl_geo(wf_geo_000AC8), - define_builtin_lvl_geo(wf_geo_000AE0), - define_builtin_lvl_geo(wf_geo_000AF8), - define_builtin_lvl_geo(wf_geo_000B10), - define_builtin_lvl_geo(wf_geo_000B38), - define_builtin_lvl_geo(wf_geo_000B60), - define_builtin_lvl_geo(wf_geo_000B78), - define_builtin_lvl_geo(wf_geo_000B90), - define_builtin_lvl_geo(wf_geo_000BA8), - define_builtin_lvl_geo(wf_geo_000BC8), - define_builtin_lvl_geo(wf_geo_000BE0), - define_builtin_lvl_geo(wf_geo_000BF8), - define_builtin_lvl_geo(wmotr_geo_0001F0), + define_builtin(bitfs_geo_0004B0), + define_builtin(bitfs_geo_0004C8), + define_builtin(bitfs_geo_0004E0), + define_builtin(bitfs_geo_0004F8), + define_builtin(bitfs_geo_000510), + define_builtin(bitfs_geo_000528), + define_builtin(bitfs_geo_000540), + define_builtin(bitfs_geo_000558), + define_builtin(bitfs_geo_000570), + define_builtin(bitfs_geo_000588), + define_builtin(bitfs_geo_0005A0), + define_builtin(bitfs_geo_0005B8), + define_builtin(bitfs_geo_0005D0), + define_builtin(bitfs_geo_0005E8), + define_builtin(bitfs_geo_000600), + define_builtin(bitfs_geo_000618), + define_builtin(bitfs_geo_000630), + define_builtin(bitfs_geo_000648), + define_builtin(bitfs_geo_000660), + define_builtin(bitfs_geo_000678), + define_builtin(bitfs_geo_000690), + define_builtin(bitfs_geo_0006A8), + define_builtin(bitfs_geo_0006C0), + define_builtin(bitfs_geo_0006D8), + define_builtin(bitfs_geo_0006F0), + define_builtin(bitfs_geo_000708), + define_builtin(bitfs_geo_000728), + define_builtin(bitfs_geo_000740), + define_builtin(bitfs_geo_000758), + define_builtin(bitfs_geo_000770), + define_builtin(bitfs_geo_000788), + define_builtin(bitfs_geo_0007A0), + define_builtin(bits_geo_000430), + define_builtin(bits_geo_000448), + define_builtin(bits_geo_000460), + define_builtin(bits_geo_000478), + define_builtin(bits_geo_000490), + define_builtin(bits_geo_0004A8), + define_builtin(bits_geo_0004C0), + define_builtin(bits_geo_0004D8), + define_builtin(bits_geo_0004F0), + define_builtin(bits_geo_000508), + define_builtin(bits_geo_000520), + define_builtin(bits_geo_000538), + define_builtin(bits_geo_000550), + define_builtin(bits_geo_000568), + define_builtin(bits_geo_000580), + define_builtin(bits_geo_000598), + define_builtin(bits_geo_0005B0), + define_builtin(bits_geo_0005C8), + define_builtin(bits_geo_0005E0), + define_builtin(bits_geo_0005F8), + define_builtin(bits_geo_000610), + define_builtin(bits_geo_000628), + define_builtin(bits_geo_000640), + define_builtin(bits_geo_000658), + define_builtin(bits_geo_000670), + define_builtin(bits_geo_000688), + define_builtin(bits_geo_0006A0), + define_builtin(bits_geo_0006B8), + define_builtin(bits_geo_0006D0), + define_builtin(bits_geo_0006E8), + define_builtin(bits_geo_000700), + define_builtin(bits_geo_000718), + define_builtin(bob_geo_000440), + define_builtin(bob_geo_000458), + define_builtin(bob_geo_000470), + define_builtin(bob_geo_000488), + define_builtin(bowser_1_geo_0000D0), + define_builtin(bowser_2_geo_000170), + define_builtin(bowser_2_geo_000170), + define_builtin(bowser_2_geo_000188), + define_builtin(bowser_2_geo_000188), + define_builtin(bowser_3_geo_000290), + define_builtin(bowser_3_geo_000290), + define_builtin(bowser_3_geo_0002A8), + define_builtin(bowser_3_geo_0002A8), + define_builtin(bowser_3_geo_0002C0), + define_builtin(bowser_3_geo_0002C0), + define_builtin(bowser_3_geo_0002D8), + define_builtin(bowser_3_geo_0002D8), + define_builtin(bowser_3_geo_0002F0), + define_builtin(bowser_3_geo_0002F0), + define_builtin(bowser_3_geo_000308), + define_builtin(bowser_3_geo_000308), + define_builtin(bowser_3_geo_000320), + define_builtin(bowser_3_geo_000320), + define_builtin(bowser_3_geo_000338), + define_builtin(bowser_3_geo_000338), + define_builtin(bowser_3_geo_000350), + define_builtin(bowser_3_geo_000350), + define_builtin(bowser_3_geo_000368), + define_builtin(bowser_3_geo_000368), + define_builtin(bowser_3_geo_000380), + define_builtin(bowser_3_geo_000380), + define_builtin(bowser_3_geo_000398), + define_builtin(bowser_3_geo_000398), + define_builtin(castle_courtyard_geo_000200), + define_builtin(castle_courtyard_geo_000218), + define_builtin(castle_geo_000F00), + define_builtin(castle_geo_000F18), + define_builtin(castle_geo_000F30), + define_builtin(castle_geo_000F70), + define_builtin(castle_geo_000F88), + define_builtin(castle_geo_000FA8), + define_builtin(castle_geo_000FD0), + define_builtin(castle_geo_001000), + define_builtin(castle_geo_001038), + define_builtin(castle_geo_001088), + define_builtin(castle_geo_0010C8), + define_builtin(castle_geo_001110), + define_builtin(castle_geo_001158), + define_builtin(castle_geo_0011A8), + define_builtin(castle_geo_001200), + define_builtin(castle_geo_001260), + define_builtin(castle_geo_0012C8), + define_builtin(castle_geo_001348), + define_builtin(castle_geo_0013B8), + define_builtin(castle_geo_001400), + define_builtin(castle_geo_001518), + define_builtin(castle_geo_001530), + define_builtin(castle_geo_001548), + define_builtin(castle_geo_001560), + define_builtin(castle_geo_001578), + define_builtin(castle_geo_0015B8), + define_builtin(castle_geo_0015F8), + define_builtin(castle_geo_001628), + define_builtin(castle_geo_001668), + define_builtin(castle_geo_001690), + define_builtin(castle_geo_0016D8), + define_builtin(castle_geo_001740), + define_builtin(castle_geo_001798), + define_builtin(castle_geo_001800), + define_builtin(castle_geo_001858), + define_builtin(castle_geo_001940), + define_builtin(castle_geo_001958), + define_builtin(castle_geo_001980), + define_builtin(castle_geo_0019C8), + define_builtin(castle_geo_0019F8), + define_builtin(castle_geo_001A30), + define_builtin(castle_geo_001A58), + define_builtin(castle_geo_001AB8), + define_builtin(castle_geo_001AF8), + define_builtin(castle_geo_001B48), + define_builtin(castle_geo_001BB0), + define_builtin(castle_geo_001C10), + define_builtin(castle_grounds_geo_000660), + define_builtin(castle_grounds_geo_0006F4), + define_builtin(castle_grounds_geo_00070C), + define_builtin(castle_grounds_geo_000724), + define_builtin(castle_grounds_geo_00073C), + define_builtin(ccm_geo_0003D0), + define_builtin(ccm_geo_0003F0), + define_builtin(ccm_geo_00040C), + define_builtin(ccm_geo_00042C), + define_builtin(ccm_geo_00045C), + define_builtin(ccm_geo_000494), + define_builtin(ccm_geo_0004BC), + define_builtin(ccm_geo_0004E4), + define_builtin(ccm_geo_00051C), + define_builtin(ccm_geo_0005E8), + define_builtin(cotmc_geo_0001A0), + define_builtin(ddd_geo_000450), + define_builtin(ddd_geo_000478), + define_builtin(ddd_geo_0004A0), + define_builtin(ddd_geo_0004C0), + define_builtin(ddd_geo_000570), + define_builtin(geo_bbh_0005B0), + define_builtin(geo_bbh_0005C8), + define_builtin(geo_bbh_0005E0), + define_builtin(geo_bbh_0005F8), + define_builtin(geo_bbh_000610), + define_builtin(geo_bbh_000628), + define_builtin(geo_bbh_000640), + define_builtin(geo_bbh_000658), + define_builtin(geo_bbh_000670), + define_builtin(geo_bbh_0006B0), + define_builtin(geo_bbh_0006E8), + define_builtin(geo_bbh_000730), + define_builtin(geo_bbh_000750), + define_builtin(geo_bbh_000768), + define_builtin(geo_bbh_0007B0), + define_builtin(geo_bbh_0007D0), + define_builtin(geo_bbh_000800), + define_builtin(geo_bbh_000828), + define_builtin(geo_bbh_000860), + define_builtin(geo_bbh_000888), + define_builtin(geo_bbh_0008B0), + define_builtin(geo_bbh_0008E8), + define_builtin(geo_bbh_000950), + define_builtin(geo_bbh_0009C8), + define_builtin(geo_bbh_000A18), + define_builtin(geo_bbh_000A60), + define_builtin(geo_bbh_000AD8), + define_builtin(geo_bbh_000B28), + define_builtin(geo_bbh_000B88), + define_builtin(geo_bbh_000BF0), + define_builtin(geo_bbh_000C38), + define_builtin(geo_bbh_000C88), + define_builtin(geo_bbh_000CE8), + define_builtin(geo_bbh_000D20), + define_builtin(geo_bbh_000D68), + define_builtin(geo_bbh_000DB0), + define_builtin(geo_bbh_000DF0), + define_builtin(geo_bbh_000E40), + define_builtin(geo_bbh_000E80), + define_builtin(geo_bbh_000EB0), + define_builtin(geo_bbh_000F00), + define_builtin(geo_bitdw_0003C0), + define_builtin(geo_bitdw_0003D8), + define_builtin(geo_bitdw_0003F0), + define_builtin(geo_bitdw_000408), + define_builtin(geo_bitdw_000420), + define_builtin(geo_bitdw_000438), + define_builtin(geo_bitdw_000450), + define_builtin(geo_bitdw_000468), + define_builtin(geo_bitdw_000480), + define_builtin(geo_bitdw_000498), + define_builtin(geo_bitdw_0004B0), + define_builtin(geo_bitdw_0004C8), + define_builtin(geo_bitdw_0004E0), + define_builtin(geo_bitdw_0004F8), + define_builtin(geo_bitdw_000510), + define_builtin(geo_bitdw_000528), + define_builtin(geo_bitdw_000540), + define_builtin(geo_bitdw_000558), + define_builtin(geo_bitdw_000570), + define_builtin(geo_bitdw_000588), + define_builtin(geo_bitdw_0005A0), + define_builtin(geo_bitdw_0005B8), + define_builtin(geo_bitdw_0005D0), + define_builtin(geo_bitdw_0005E8), + define_builtin(geo_bitdw_000600), + define_builtin(geo_bitdw_000618), + define_builtin(hmc_geo_000530), + define_builtin(hmc_geo_000548), + define_builtin(hmc_geo_000570), + define_builtin(hmc_geo_000588), + define_builtin(hmc_geo_0005A0), + define_builtin(hmc_geo_0005B8), + define_builtin(hmc_geo_0005D0), + define_builtin(hmc_geo_0005E8), + define_builtin(hmc_geo_000618), + define_builtin(hmc_geo_000658), + define_builtin(hmc_geo_0006A8), + define_builtin(hmc_geo_0006E0), + define_builtin(hmc_geo_000700), + define_builtin(hmc_geo_000748), + define_builtin(hmc_geo_000770), + define_builtin(hmc_geo_000798), + define_builtin(hmc_geo_0007F8), + define_builtin(hmc_geo_000850), + define_builtin(hmc_geo_0008D0), + define_builtin(hmc_geo_000938), + define_builtin(hmc_geo_000998), + define_builtin(hmc_geo_000A18), + define_builtin(hmc_geo_000A88), + define_builtin(hmc_geo_000AE8), + define_builtin(hmc_geo_000B48), + define_builtin(hmc_geo_000B90), + define_builtin(jrb_geo_000900), + define_builtin(jrb_geo_000918), + define_builtin(jrb_geo_000930), + define_builtin(jrb_geo_000948), + define_builtin(jrb_geo_000960), + define_builtin(jrb_geo_000978), + define_builtin(jrb_geo_000990), + define_builtin(jrb_geo_0009B0), + define_builtin(jrb_geo_0009C8), + define_builtin(jrb_geo_0009E8), + define_builtin(jrb_geo_000A00), + define_builtin(jrb_geo_000A18), + define_builtin(jrb_geo_000AFC), + define_builtin(lll_geo_0009E0), + define_builtin(lll_geo_0009F8), + define_builtin(lll_geo_000A10), + define_builtin(lll_geo_000A28), + define_builtin(lll_geo_000A40), + define_builtin(lll_geo_000A60), + define_builtin(lll_geo_000A78), + define_builtin(lll_geo_000A90), + define_builtin(lll_geo_000AA8), + define_builtin(lll_geo_000AC0), + define_builtin(lll_geo_000AD8), + define_builtin(lll_geo_000AF0), + define_builtin(lll_geo_000B08), + define_builtin(lll_geo_000B20), + define_builtin(lll_geo_000B38), + define_builtin(lll_geo_000B50), + define_builtin(lll_geo_000B68), + define_builtin(lll_geo_000B80), + define_builtin(lll_geo_000B98), + define_builtin(lll_geo_000BB0), + define_builtin(lll_geo_000BC8), + define_builtin(lll_geo_000BE0), + define_builtin(lll_geo_000BF8), + define_builtin(lll_geo_000C10), + define_builtin(lll_geo_000C30), + define_builtin(lll_geo_000C50), + define_builtin(lll_geo_000C70), + define_builtin(lll_geo_000C90), + define_builtin(lll_geo_000CB0), + define_builtin(lll_geo_000CD0), + define_builtin(lll_geo_000CF0), + define_builtin(lll_geo_000D10), + define_builtin(lll_geo_000D30), + define_builtin(lll_geo_000D50), + define_builtin(lll_geo_000D70), + define_builtin(lll_geo_000D90), + define_builtin(lll_geo_000DB0), + define_builtin(lll_geo_000DD0), + define_builtin(lll_geo_000DE8), + define_builtin(lll_geo_000E00), + define_builtin(lll_geo_000EA8), + define_builtin(lll_geo_000EC0), + define_builtin(pss_geo_000100), + define_builtin(rr_geo_000660), + define_builtin(rr_geo_000678), + define_builtin(rr_geo_000690), + define_builtin(rr_geo_0006A8), + define_builtin(rr_geo_0006C0), + define_builtin(rr_geo_0006D8), + define_builtin(rr_geo_0006F0), + define_builtin(rr_geo_000708), + define_builtin(rr_geo_000720), + define_builtin(rr_geo_000738), + define_builtin(rr_geo_000758), + define_builtin(rr_geo_000770), + define_builtin(rr_geo_000788), + define_builtin(rr_geo_0007A0), + define_builtin(rr_geo_0007B8), + define_builtin(rr_geo_0007D0), + define_builtin(rr_geo_0007E8), + define_builtin(rr_geo_000800), + define_builtin(rr_geo_000818), + define_builtin(rr_geo_000830), + define_builtin(rr_geo_000848), + define_builtin(rr_geo_000860), + define_builtin(rr_geo_000878), + define_builtin(rr_geo_000890), + define_builtin(rr_geo_0008A8), + define_builtin(rr_geo_0008C0), + define_builtin(rr_geo_0008D8), + define_builtin(rr_geo_0008F0), + define_builtin(rr_geo_000908), + define_builtin(rr_geo_000920), + define_builtin(rr_geo_000940), + define_builtin(rr_geo_000958), + define_builtin(rr_geo_000970), + define_builtin(rr_geo_000988), + define_builtin(rr_geo_0009A0), + define_builtin(rr_geo_0009B8), + define_builtin(rr_geo_0009D0), + define_builtin(sa_geo_000170), + define_builtin(sl_geo_000360), + define_builtin(sl_geo_000378), + define_builtin(sl_geo_000390), + define_builtin(sl_geo_0003A8), + define_builtin(sl_geo_000484), + define_builtin(ssl_geo_0005C0), + define_builtin(ssl_geo_0005D8), + define_builtin(ssl_geo_000618), + define_builtin(ssl_geo_000630), + define_builtin(ssl_geo_000648), + define_builtin(ssl_geo_000734), + define_builtin(ssl_geo_000764), + define_builtin(ssl_geo_000794), + define_builtin(ssl_geo_0007AC), + define_builtin(ssl_geo_0007CC), + define_builtin(ssl_geo_00088C), + define_builtin(thi_geo_0005B0), + define_builtin(thi_geo_0005C8), + define_builtin(thi_geo_0005F0), + define_builtin(thi_geo_000608), + define_builtin(thi_geo_0006D4), + define_builtin(thi_geo_00079C), + define_builtin(totwc_geo_000160), + define_builtin(totwc_geo_000188), + define_builtin(ttc_geo_000240), + define_builtin(ttc_geo_000258), + define_builtin(ttc_geo_000270), + define_builtin(ttc_geo_000288), + define_builtin(ttc_geo_0002A8), + define_builtin(ttc_geo_0002C8), + define_builtin(ttc_geo_0002E0), + define_builtin(ttc_geo_0002F8), + define_builtin(ttc_geo_000310), + define_builtin(ttc_geo_000328), + define_builtin(ttc_geo_000340), + define_builtin(ttc_geo_000358), + define_builtin(ttc_geo_000370), + define_builtin(ttc_geo_000388), + define_builtin(ttc_geo_0003A0), + define_builtin(ttc_geo_0003B8), + define_builtin(ttm_geo_000710), + define_builtin(ttm_geo_000730), + define_builtin(ttm_geo_000748), + define_builtin(ttm_geo_000778), + define_builtin(ttm_geo_0007A8), + define_builtin(ttm_geo_0007D8), + define_builtin(ttm_geo_000808), + define_builtin(ttm_geo_000830), + define_builtin(ttm_geo_000858), + define_builtin(ttm_geo_000880), + define_builtin(ttm_geo_0008A8), + define_builtin(ttm_geo_0008D0), + define_builtin(ttm_geo_0008F8), + define_builtin(ttm_geo_000920), + define_builtin(ttm_geo_000948), + define_builtin(ttm_geo_000970), + define_builtin(ttm_geo_000990), + define_builtin(ttm_geo_0009C0), + define_builtin(ttm_geo_0009F0), + define_builtin(ttm_geo_000A18), + define_builtin(ttm_geo_000A40), + define_builtin(ttm_geo_000A70), + define_builtin(ttm_geo_000B5C), + define_builtin(ttm_geo_000BEC), + define_builtin(ttm_geo_000C84), + define_builtin(ttm_geo_000D14), + define_builtin(ttm_geo_000D4C), + define_builtin(ttm_geo_000D84), + define_builtin(ttm_geo_000DBC), + define_builtin(ttm_geo_000DF4), + define_builtin(vcutm_geo_0001F0), + define_builtin(vcutm_geo_000208), + define_builtin(wdw_geo_000580), + define_builtin(wdw_geo_000598), + define_builtin(wdw_geo_0005C0), + define_builtin(wdw_geo_0005E8), + define_builtin(wdw_geo_000610), + define_builtin(wdw_geo_000628), + define_builtin(wdw_geo_000640), + define_builtin(wdw_geo_000658), + define_builtin(wdw_geo_000724), + define_builtin(wf_geo_0007E0), + define_builtin(wf_geo_000820), + define_builtin(wf_geo_000860), + define_builtin(wf_geo_000878), + define_builtin(wf_geo_000890), + define_builtin(wf_geo_0008A8), + define_builtin(wf_geo_0008E8), + define_builtin(wf_geo_000900), + define_builtin(wf_geo_000940), + define_builtin(wf_geo_000958), + define_builtin(wf_geo_0009A0), + define_builtin(wf_geo_0009B8), + define_builtin(wf_geo_0009D0), + define_builtin(wf_geo_0009E8), + define_builtin(wf_geo_000A00), + define_builtin(wf_geo_000A40), + define_builtin(wf_geo_000A58), + define_builtin(wf_geo_000A98), + define_builtin(wf_geo_000AB0), + define_builtin(wf_geo_000AC8), + define_builtin(wf_geo_000AE0), + define_builtin(wf_geo_000AF8), + define_builtin(wf_geo_000B10), + define_builtin(wf_geo_000B38), + define_builtin(wf_geo_000B60), + define_builtin(wf_geo_000B78), + define_builtin(wf_geo_000B90), + define_builtin(wf_geo_000BA8), + define_builtin(wf_geo_000BC8), + define_builtin(wf_geo_000BE0), + define_builtin(wf_geo_000BF8), + define_builtin(wmotr_geo_0001F0), }; const GeoLayout* DynOS_Builtin_LvlGeo_GetFromName(const char* aDataName) { @@ -596,210 +826,209 @@ const char* DynOS_Builtin_LvlGeo_GetFromData(const GeoLayout* aData) { // Level Cols // //////////////// -#define define_builtin_lvl_col(col) (const void*) #col, (const void*) col static const void* sDynosBuiltinLvlCols[] = { - define_builtin_lvl_col(bbh_seg7_collision_07026B1C), - define_builtin_lvl_col(bbh_seg7_collision_coffin), - define_builtin_lvl_col(bbh_seg7_collision_haunted_bookshelf), - define_builtin_lvl_col(bbh_seg7_collision_level), - define_builtin_lvl_col(bbh_seg7_collision_merry_go_round), - define_builtin_lvl_col(bbh_seg7_collision_mesh_elevator), - define_builtin_lvl_col(bbh_seg7_collision_staircase_step), - define_builtin_lvl_col(bbh_seg7_collision_tilt_floor_platform), - define_builtin_lvl_col(bitdw_seg7_collision_0700F688), - define_builtin_lvl_col(bitdw_seg7_collision_0700F70C), - define_builtin_lvl_col(bitdw_seg7_collision_0700F7F0), - define_builtin_lvl_col(bitdw_seg7_collision_0700F898), - define_builtin_lvl_col(bitdw_seg7_collision_0700F91C), - define_builtin_lvl_col(bitdw_seg7_collision_0700FA3C), - define_builtin_lvl_col(bitdw_seg7_collision_0700FB5C), - define_builtin_lvl_col(bitdw_seg7_collision_0700FC7C), - define_builtin_lvl_col(bitdw_seg7_collision_0700FD9C), - define_builtin_lvl_col(bitdw_seg7_collision_level), - define_builtin_lvl_col(bitdw_seg7_collision_moving_pyramid), - define_builtin_lvl_col(bitfs_seg7_collision_07015124), - define_builtin_lvl_col(bitfs_seg7_collision_07015288), - define_builtin_lvl_col(bitfs_seg7_collision_07015714), - define_builtin_lvl_col(bitfs_seg7_collision_07015768), - define_builtin_lvl_col(bitfs_seg7_collision_070157E0), - define_builtin_lvl_col(bitfs_seg7_collision_07015928), - define_builtin_lvl_col(bitfs_seg7_collision_inverted_pyramid), - define_builtin_lvl_col(bitfs_seg7_collision_level), - define_builtin_lvl_col(bitfs_seg7_collision_sinking_cage_platform), - define_builtin_lvl_col(bitfs_seg7_collision_sinking_platform), - define_builtin_lvl_col(bitfs_seg7_collision_squishable_platform), - define_builtin_lvl_col(bits_seg7_collision_0701A9A0), - define_builtin_lvl_col(bits_seg7_collision_0701AA0C), - define_builtin_lvl_col(bits_seg7_collision_0701AA84), - define_builtin_lvl_col(bits_seg7_collision_0701AC28), - define_builtin_lvl_col(bits_seg7_collision_0701ACAC), - define_builtin_lvl_col(bits_seg7_collision_0701AD54), - define_builtin_lvl_col(bits_seg7_collision_0701ADD8), - define_builtin_lvl_col(bits_seg7_collision_0701AE5C), - define_builtin_lvl_col(bits_seg7_collision_0701B0D4), - define_builtin_lvl_col(bits_seg7_collision_0701B26C), - define_builtin_lvl_col(bits_seg7_collision_0701B404), - define_builtin_lvl_col(bits_seg7_collision_0701B59C), - define_builtin_lvl_col(bits_seg7_collision_0701B734), - define_builtin_lvl_col(bits_seg7_collision_level), - define_builtin_lvl_col(bob_seg7_collision_bridge), - define_builtin_lvl_col(bob_seg7_collision_chain_chomp_gate), - define_builtin_lvl_col(bob_seg7_collision_gate), - define_builtin_lvl_col(bob_seg7_collision_level), - define_builtin_lvl_col(bowser_1_seg7_collision_level), - define_builtin_lvl_col(bowser_2_seg7_collision_lava), - define_builtin_lvl_col(bowser_2_seg7_collision_tilting_platform), - define_builtin_lvl_col(bowser_3_seg7_collision_07004B94), - define_builtin_lvl_col(bowser_3_seg7_collision_07004C18), - define_builtin_lvl_col(bowser_3_seg7_collision_07004C9C), - define_builtin_lvl_col(bowser_3_seg7_collision_07004D20), - define_builtin_lvl_col(bowser_3_seg7_collision_07004DA4), - define_builtin_lvl_col(bowser_3_seg7_collision_07004E28), - define_builtin_lvl_col(bowser_3_seg7_collision_07004EAC), - define_builtin_lvl_col(bowser_3_seg7_collision_07004F30), - define_builtin_lvl_col(bowser_3_seg7_collision_07004FB4), - define_builtin_lvl_col(bowser_3_seg7_collision_07005038), - define_builtin_lvl_col(bowser_3_seg7_collision_level), - define_builtin_lvl_col(castle_courtyard_seg7_collision), - define_builtin_lvl_col(castle_grounds_seg7_collision_cannon_grill), - define_builtin_lvl_col(castle_grounds_seg7_collision_level), - define_builtin_lvl_col(castle_grounds_seg7_collision_moat_grills), - define_builtin_lvl_col(ccm_seg7_area_1_collision), - define_builtin_lvl_col(ccm_seg7_area_2_collision), - define_builtin_lvl_col(ccm_seg7_collision_070163F8), - define_builtin_lvl_col(cotmc_seg7_collision_level), - define_builtin_lvl_col(ddd_seg7_area_1_collision), - define_builtin_lvl_col(ddd_seg7_area_2_collision), - define_builtin_lvl_col(ddd_seg7_collision_bowser_sub_door), - define_builtin_lvl_col(ddd_seg7_collision_submarine), - define_builtin_lvl_col(hmc_seg7_collision_0702B65C), - define_builtin_lvl_col(hmc_seg7_collision_controllable_platform_sub), - define_builtin_lvl_col(hmc_seg7_collision_controllable_platform), - define_builtin_lvl_col(hmc_seg7_collision_elevator), - define_builtin_lvl_col(hmc_seg7_collision_level), - define_builtin_lvl_col(inside_castle_seg7_area_1_collision), - define_builtin_lvl_col(inside_castle_seg7_area_2_collision), - define_builtin_lvl_col(inside_castle_seg7_area_3_collision), - define_builtin_lvl_col(inside_castle_seg7_collision_ddd_warp_2), - define_builtin_lvl_col(inside_castle_seg7_collision_ddd_warp), - define_builtin_lvl_col(inside_castle_seg7_collision_floor_trap), - define_builtin_lvl_col(inside_castle_seg7_collision_star_door), - define_builtin_lvl_col(inside_castle_seg7_collision_water_level_pillar), - define_builtin_lvl_col(jrb_seg7_area_1_collision), - define_builtin_lvl_col(jrb_seg7_area_2_collision), - define_builtin_lvl_col(jrb_seg7_collision_0700CEF0), - define_builtin_lvl_col(jrb_seg7_collision_0700D1DC), - define_builtin_lvl_col(jrb_seg7_collision_floating_box), - define_builtin_lvl_col(jrb_seg7_collision_floating_platform), - define_builtin_lvl_col(jrb_seg7_collision_in_sunken_ship_2), - define_builtin_lvl_col(jrb_seg7_collision_in_sunken_ship_3), - define_builtin_lvl_col(jrb_seg7_collision_in_sunken_ship), - define_builtin_lvl_col(jrb_seg7_collision_pillar_base), - define_builtin_lvl_col(jrb_seg7_collision_rock_solid), - define_builtin_lvl_col(lll_seg7_area_1_collision), - define_builtin_lvl_col(lll_seg7_area_2_collision), - define_builtin_lvl_col(lll_seg7_collision_0701D21C), - define_builtin_lvl_col(lll_seg7_collision_drawbridge), - define_builtin_lvl_col(lll_seg7_collision_falling_wall), - define_builtin_lvl_col(lll_seg7_collision_floating_block), - define_builtin_lvl_col(lll_seg7_collision_hexagonal_platform), - define_builtin_lvl_col(lll_seg7_collision_inverted_pyramid), - define_builtin_lvl_col(lll_seg7_collision_octagonal_moving_platform), - define_builtin_lvl_col(lll_seg7_collision_pitoune), - define_builtin_lvl_col(lll_seg7_collision_puzzle_piece), - define_builtin_lvl_col(lll_seg7_collision_rotating_fire_bars), - define_builtin_lvl_col(lll_seg7_collision_rotating_platform), - define_builtin_lvl_col(lll_seg7_collision_sinking_pyramids), - define_builtin_lvl_col(lll_seg7_collision_slow_tilting_platform), - define_builtin_lvl_col(lll_seg7_collision_wood_piece), - define_builtin_lvl_col(pss_seg7_collision), - define_builtin_lvl_col(rr_seg7_collision_07029038), - define_builtin_lvl_col(rr_seg7_collision_07029508), - define_builtin_lvl_col(rr_seg7_collision_070295F8), - define_builtin_lvl_col(rr_seg7_collision_0702967C), - define_builtin_lvl_col(rr_seg7_collision_07029750), - define_builtin_lvl_col(rr_seg7_collision_07029858), - define_builtin_lvl_col(rr_seg7_collision_07029924), - define_builtin_lvl_col(rr_seg7_collision_07029C1C), - define_builtin_lvl_col(rr_seg7_collision_07029FA4), - define_builtin_lvl_col(rr_seg7_collision_0702A32C), - define_builtin_lvl_col(rr_seg7_collision_0702A6B4), - define_builtin_lvl_col(rr_seg7_collision_donut_platform), - define_builtin_lvl_col(rr_seg7_collision_elevator_platform), - define_builtin_lvl_col(rr_seg7_collision_level), - define_builtin_lvl_col(rr_seg7_collision_pendulum), - define_builtin_lvl_col(rr_seg7_collision_rotating_platform_with_fire), - define_builtin_lvl_col(sa_seg7_collision), - define_builtin_lvl_col(sl_seg7_area_1_collision), - define_builtin_lvl_col(sl_seg7_area_2_collision), - define_builtin_lvl_col(sl_seg7_collision_pound_explodes), - define_builtin_lvl_col(sl_seg7_collision_sliding_snow_mound), - define_builtin_lvl_col(ssl_seg7_area_1_collision), - define_builtin_lvl_col(ssl_seg7_area_2_collision), - define_builtin_lvl_col(ssl_seg7_area_3_collision), - define_builtin_lvl_col(ssl_seg7_collision_0702808C), - define_builtin_lvl_col(ssl_seg7_collision_07028274), - define_builtin_lvl_col(ssl_seg7_collision_070282F8), - define_builtin_lvl_col(ssl_seg7_collision_07028370), - define_builtin_lvl_col(ssl_seg7_collision_070284B0), - define_builtin_lvl_col(ssl_seg7_collision_grindel), - define_builtin_lvl_col(ssl_seg7_collision_pyramid_elevator), - define_builtin_lvl_col(ssl_seg7_collision_pyramid_top), - define_builtin_lvl_col(ssl_seg7_collision_spindel), - define_builtin_lvl_col(ssl_seg7_collision_tox_box), - define_builtin_lvl_col(thi_seg7_area_1_collision), - define_builtin_lvl_col(thi_seg7_area_2_collision), - define_builtin_lvl_col(thi_seg7_area_3_collision), - define_builtin_lvl_col(thi_seg7_collision_top_trap), - define_builtin_lvl_col(totwc_seg7_collision), - define_builtin_lvl_col(ttc_seg7_collision_07014F70), - define_builtin_lvl_col(ttc_seg7_collision_07015008), - define_builtin_lvl_col(ttc_seg7_collision_070152B4), - define_builtin_lvl_col(ttc_seg7_collision_070153E0), - define_builtin_lvl_col(ttc_seg7_collision_07015584), - define_builtin_lvl_col(ttc_seg7_collision_07015650), - define_builtin_lvl_col(ttc_seg7_collision_07015754), - define_builtin_lvl_col(ttc_seg7_collision_070157D8), - define_builtin_lvl_col(ttc_seg7_collision_clock_main_rotation), - define_builtin_lvl_col(ttc_seg7_collision_clock_pendulum), - define_builtin_lvl_col(ttc_seg7_collision_clock_platform), - define_builtin_lvl_col(ttc_seg7_collision_level), - define_builtin_lvl_col(ttc_seg7_collision_rotating_clock_platform2), - define_builtin_lvl_col(ttc_seg7_collision_sliding_surface), - define_builtin_lvl_col(ttm_seg7_area_1_collision), - define_builtin_lvl_col(ttm_seg7_area_2_collision), - define_builtin_lvl_col(ttm_seg7_area_3_collision), - define_builtin_lvl_col(ttm_seg7_area_4_collision), - define_builtin_lvl_col(ttm_seg7_collision_pitoune_2), - define_builtin_lvl_col(ttm_seg7_collision_podium_warp), - define_builtin_lvl_col(ttm_seg7_collision_ukiki_cage), - define_builtin_lvl_col(vcutm_seg7_collision_0700AC44), - define_builtin_lvl_col(vcutm_seg7_collision), - define_builtin_lvl_col(wdw_seg7_area_1_collision), - define_builtin_lvl_col(wdw_seg7_area_2_collision), - define_builtin_lvl_col(wdw_seg7_collision_070184C8), - define_builtin_lvl_col(wdw_seg7_collision_07018528), - define_builtin_lvl_col(wdw_seg7_collision_070186B4), - define_builtin_lvl_col(wdw_seg7_collision_arrow_lift), - define_builtin_lvl_col(wdw_seg7_collision_express_elevator_platform), - define_builtin_lvl_col(wdw_seg7_collision_rect_floating_platform), - define_builtin_lvl_col(wdw_seg7_collision_square_floating_platform), - define_builtin_lvl_col(wf_seg7_collision_070102D8), - define_builtin_lvl_col(wf_seg7_collision_breakable_wall_2), - define_builtin_lvl_col(wf_seg7_collision_breakable_wall), - define_builtin_lvl_col(wf_seg7_collision_bullet_bill_cannon), - define_builtin_lvl_col(wf_seg7_collision_clocklike_rotation), - define_builtin_lvl_col(wf_seg7_collision_kickable_board), - define_builtin_lvl_col(wf_seg7_collision_large_bomp), - define_builtin_lvl_col(wf_seg7_collision_platform), - define_builtin_lvl_col(wf_seg7_collision_rotating_platform), - define_builtin_lvl_col(wf_seg7_collision_sliding_brick_platform), - define_builtin_lvl_col(wf_seg7_collision_small_bomp), - define_builtin_lvl_col(wf_seg7_collision_tower_door), - define_builtin_lvl_col(wf_seg7_collision_tower), - define_builtin_lvl_col(wf_seg7_collision_trapezoid), - define_builtin_lvl_col(wf_seg7_collision_tumbling_bridge), - define_builtin_lvl_col(wmotr_seg7_collision), + define_builtin(bbh_seg7_collision_07026B1C), + define_builtin(bbh_seg7_collision_coffin), + define_builtin(bbh_seg7_collision_haunted_bookshelf), + define_builtin(bbh_seg7_collision_level), + define_builtin(bbh_seg7_collision_merry_go_round), + define_builtin(bbh_seg7_collision_mesh_elevator), + define_builtin(bbh_seg7_collision_staircase_step), + define_builtin(bbh_seg7_collision_tilt_floor_platform), + define_builtin(bitdw_seg7_collision_0700F688), + define_builtin(bitdw_seg7_collision_0700F70C), + define_builtin(bitdw_seg7_collision_0700F7F0), + define_builtin(bitdw_seg7_collision_0700F898), + define_builtin(bitdw_seg7_collision_0700F91C), + define_builtin(bitdw_seg7_collision_0700FA3C), + define_builtin(bitdw_seg7_collision_0700FB5C), + define_builtin(bitdw_seg7_collision_0700FC7C), + define_builtin(bitdw_seg7_collision_0700FD9C), + define_builtin(bitdw_seg7_collision_level), + define_builtin(bitdw_seg7_collision_moving_pyramid), + define_builtin(bitfs_seg7_collision_07015124), + define_builtin(bitfs_seg7_collision_07015288), + define_builtin(bitfs_seg7_collision_07015714), + define_builtin(bitfs_seg7_collision_07015768), + define_builtin(bitfs_seg7_collision_070157E0), + define_builtin(bitfs_seg7_collision_07015928), + define_builtin(bitfs_seg7_collision_inverted_pyramid), + define_builtin(bitfs_seg7_collision_level), + define_builtin(bitfs_seg7_collision_sinking_cage_platform), + define_builtin(bitfs_seg7_collision_sinking_platform), + define_builtin(bitfs_seg7_collision_squishable_platform), + define_builtin(bits_seg7_collision_0701A9A0), + define_builtin(bits_seg7_collision_0701AA0C), + define_builtin(bits_seg7_collision_0701AA84), + define_builtin(bits_seg7_collision_0701AC28), + define_builtin(bits_seg7_collision_0701ACAC), + define_builtin(bits_seg7_collision_0701AD54), + define_builtin(bits_seg7_collision_0701ADD8), + define_builtin(bits_seg7_collision_0701AE5C), + define_builtin(bits_seg7_collision_0701B0D4), + define_builtin(bits_seg7_collision_0701B26C), + define_builtin(bits_seg7_collision_0701B404), + define_builtin(bits_seg7_collision_0701B59C), + define_builtin(bits_seg7_collision_0701B734), + define_builtin(bits_seg7_collision_level), + define_builtin(bob_seg7_collision_bridge), + define_builtin(bob_seg7_collision_chain_chomp_gate), + define_builtin(bob_seg7_collision_gate), + define_builtin(bob_seg7_collision_level), + define_builtin(bowser_1_seg7_collision_level), + define_builtin(bowser_2_seg7_collision_lava), + define_builtin(bowser_2_seg7_collision_tilting_platform), + define_builtin(bowser_3_seg7_collision_07004B94), + define_builtin(bowser_3_seg7_collision_07004C18), + define_builtin(bowser_3_seg7_collision_07004C9C), + define_builtin(bowser_3_seg7_collision_07004D20), + define_builtin(bowser_3_seg7_collision_07004DA4), + define_builtin(bowser_3_seg7_collision_07004E28), + define_builtin(bowser_3_seg7_collision_07004EAC), + define_builtin(bowser_3_seg7_collision_07004F30), + define_builtin(bowser_3_seg7_collision_07004FB4), + define_builtin(bowser_3_seg7_collision_07005038), + define_builtin(bowser_3_seg7_collision_level), + define_builtin(castle_courtyard_seg7_collision), + define_builtin(castle_grounds_seg7_collision_cannon_grill), + define_builtin(castle_grounds_seg7_collision_level), + define_builtin(castle_grounds_seg7_collision_moat_grills), + define_builtin(ccm_seg7_area_1_collision), + define_builtin(ccm_seg7_area_2_collision), + define_builtin(ccm_seg7_collision_070163F8), + define_builtin(cotmc_seg7_collision_level), + define_builtin(ddd_seg7_area_1_collision), + define_builtin(ddd_seg7_area_2_collision), + define_builtin(ddd_seg7_collision_bowser_sub_door), + define_builtin(ddd_seg7_collision_submarine), + define_builtin(hmc_seg7_collision_0702B65C), + define_builtin(hmc_seg7_collision_controllable_platform_sub), + define_builtin(hmc_seg7_collision_controllable_platform), + define_builtin(hmc_seg7_collision_elevator), + define_builtin(hmc_seg7_collision_level), + define_builtin(inside_castle_seg7_area_1_collision), + define_builtin(inside_castle_seg7_area_2_collision), + define_builtin(inside_castle_seg7_area_3_collision), + define_builtin(inside_castle_seg7_collision_ddd_warp_2), + define_builtin(inside_castle_seg7_collision_ddd_warp), + define_builtin(inside_castle_seg7_collision_floor_trap), + define_builtin(inside_castle_seg7_collision_star_door), + define_builtin(inside_castle_seg7_collision_water_level_pillar), + define_builtin(jrb_seg7_area_1_collision), + define_builtin(jrb_seg7_area_2_collision), + define_builtin(jrb_seg7_collision_0700CEF0), + define_builtin(jrb_seg7_collision_0700D1DC), + define_builtin(jrb_seg7_collision_floating_box), + define_builtin(jrb_seg7_collision_floating_platform), + define_builtin(jrb_seg7_collision_in_sunken_ship_2), + define_builtin(jrb_seg7_collision_in_sunken_ship_3), + define_builtin(jrb_seg7_collision_in_sunken_ship), + define_builtin(jrb_seg7_collision_pillar_base), + define_builtin(jrb_seg7_collision_rock_solid), + define_builtin(lll_seg7_area_1_collision), + define_builtin(lll_seg7_area_2_collision), + define_builtin(lll_seg7_collision_0701D21C), + define_builtin(lll_seg7_collision_drawbridge), + define_builtin(lll_seg7_collision_falling_wall), + define_builtin(lll_seg7_collision_floating_block), + define_builtin(lll_seg7_collision_hexagonal_platform), + define_builtin(lll_seg7_collision_inverted_pyramid), + define_builtin(lll_seg7_collision_octagonal_moving_platform), + define_builtin(lll_seg7_collision_pitoune), + define_builtin(lll_seg7_collision_puzzle_piece), + define_builtin(lll_seg7_collision_rotating_fire_bars), + define_builtin(lll_seg7_collision_rotating_platform), + define_builtin(lll_seg7_collision_sinking_pyramids), + define_builtin(lll_seg7_collision_slow_tilting_platform), + define_builtin(lll_seg7_collision_wood_piece), + define_builtin(pss_seg7_collision), + define_builtin(rr_seg7_collision_07029038), + define_builtin(rr_seg7_collision_07029508), + define_builtin(rr_seg7_collision_070295F8), + define_builtin(rr_seg7_collision_0702967C), + define_builtin(rr_seg7_collision_07029750), + define_builtin(rr_seg7_collision_07029858), + define_builtin(rr_seg7_collision_07029924), + define_builtin(rr_seg7_collision_07029C1C), + define_builtin(rr_seg7_collision_07029FA4), + define_builtin(rr_seg7_collision_0702A32C), + define_builtin(rr_seg7_collision_0702A6B4), + define_builtin(rr_seg7_collision_donut_platform), + define_builtin(rr_seg7_collision_elevator_platform), + define_builtin(rr_seg7_collision_level), + define_builtin(rr_seg7_collision_pendulum), + define_builtin(rr_seg7_collision_rotating_platform_with_fire), + define_builtin(sa_seg7_collision), + define_builtin(sl_seg7_area_1_collision), + define_builtin(sl_seg7_area_2_collision), + define_builtin(sl_seg7_collision_pound_explodes), + define_builtin(sl_seg7_collision_sliding_snow_mound), + define_builtin(ssl_seg7_area_1_collision), + define_builtin(ssl_seg7_area_2_collision), + define_builtin(ssl_seg7_area_3_collision), + define_builtin(ssl_seg7_collision_0702808C), + define_builtin(ssl_seg7_collision_07028274), + define_builtin(ssl_seg7_collision_070282F8), + define_builtin(ssl_seg7_collision_07028370), + define_builtin(ssl_seg7_collision_070284B0), + define_builtin(ssl_seg7_collision_grindel), + define_builtin(ssl_seg7_collision_pyramid_elevator), + define_builtin(ssl_seg7_collision_pyramid_top), + define_builtin(ssl_seg7_collision_spindel), + define_builtin(ssl_seg7_collision_tox_box), + define_builtin(thi_seg7_area_1_collision), + define_builtin(thi_seg7_area_2_collision), + define_builtin(thi_seg7_area_3_collision), + define_builtin(thi_seg7_collision_top_trap), + define_builtin(totwc_seg7_collision), + define_builtin(ttc_seg7_collision_07014F70), + define_builtin(ttc_seg7_collision_07015008), + define_builtin(ttc_seg7_collision_070152B4), + define_builtin(ttc_seg7_collision_070153E0), + define_builtin(ttc_seg7_collision_07015584), + define_builtin(ttc_seg7_collision_07015650), + define_builtin(ttc_seg7_collision_07015754), + define_builtin(ttc_seg7_collision_070157D8), + define_builtin(ttc_seg7_collision_clock_main_rotation), + define_builtin(ttc_seg7_collision_clock_pendulum), + define_builtin(ttc_seg7_collision_clock_platform), + define_builtin(ttc_seg7_collision_level), + define_builtin(ttc_seg7_collision_rotating_clock_platform2), + define_builtin(ttc_seg7_collision_sliding_surface), + define_builtin(ttm_seg7_area_1_collision), + define_builtin(ttm_seg7_area_2_collision), + define_builtin(ttm_seg7_area_3_collision), + define_builtin(ttm_seg7_area_4_collision), + define_builtin(ttm_seg7_collision_pitoune_2), + define_builtin(ttm_seg7_collision_podium_warp), + define_builtin(ttm_seg7_collision_ukiki_cage), + define_builtin(vcutm_seg7_collision_0700AC44), + define_builtin(vcutm_seg7_collision), + define_builtin(wdw_seg7_area_1_collision), + define_builtin(wdw_seg7_area_2_collision), + define_builtin(wdw_seg7_collision_070184C8), + define_builtin(wdw_seg7_collision_07018528), + define_builtin(wdw_seg7_collision_070186B4), + define_builtin(wdw_seg7_collision_arrow_lift), + define_builtin(wdw_seg7_collision_express_elevator_platform), + define_builtin(wdw_seg7_collision_rect_floating_platform), + define_builtin(wdw_seg7_collision_square_floating_platform), + define_builtin(wf_seg7_collision_070102D8), + define_builtin(wf_seg7_collision_breakable_wall_2), + define_builtin(wf_seg7_collision_breakable_wall), + define_builtin(wf_seg7_collision_bullet_bill_cannon), + define_builtin(wf_seg7_collision_clocklike_rotation), + define_builtin(wf_seg7_collision_kickable_board), + define_builtin(wf_seg7_collision_large_bomp), + define_builtin(wf_seg7_collision_platform), + define_builtin(wf_seg7_collision_rotating_platform), + define_builtin(wf_seg7_collision_sliding_brick_platform), + define_builtin(wf_seg7_collision_small_bomp), + define_builtin(wf_seg7_collision_tower_door), + define_builtin(wf_seg7_collision_tower), + define_builtin(wf_seg7_collision_trapezoid), + define_builtin(wf_seg7_collision_tumbling_bridge), + define_builtin(wmotr_seg7_collision), }; const Collision* DynOS_Builtin_LvlCol_GetFromName(const char* aDataName) { @@ -814,236 +1043,235 @@ const char* DynOS_Builtin_LvlCol_GetFromData(const Collision* aData) { // Textures // ////////////// -#define define_builtin_tex(tex) (const void*) #tex, (const void*) tex static const void* sDynosBuiltinTexs[] = { - define_builtin_tex(cave_09000000), - define_builtin_tex(cave_09001000), - define_builtin_tex(cave_09001800), - define_builtin_tex(cave_09002800), - define_builtin_tex(cave_09003000), - define_builtin_tex(cave_09003800), - define_builtin_tex(cave_09004800), - define_builtin_tex(cave_09005800), - define_builtin_tex(cave_09006800), - define_builtin_tex(cave_09007000), - define_builtin_tex(cave_09007800), - define_builtin_tex(cave_09008800), - define_builtin_tex(cave_09009800), - define_builtin_tex(cave_0900A000), - define_builtin_tex(cave_0900A800), - define_builtin_tex(cave_0900B800), - define_builtin_tex(cave_0900C000), - define_builtin_tex(fire_09000000), - define_builtin_tex(fire_09000800), - define_builtin_tex(fire_09001000), - define_builtin_tex(fire_09001800), - define_builtin_tex(fire_09002000), - define_builtin_tex(fire_09002800), - define_builtin_tex(fire_09003000), - define_builtin_tex(fire_09003800), - define_builtin_tex(fire_09004000), - define_builtin_tex(fire_09004800), - define_builtin_tex(fire_09005000), - define_builtin_tex(fire_09005800), - define_builtin_tex(fire_09006000), - define_builtin_tex(fire_09006800), - define_builtin_tex(fire_09007000), - define_builtin_tex(fire_09007800), - define_builtin_tex(fire_09008000), - define_builtin_tex(fire_09008800), - define_builtin_tex(fire_09009000), - define_builtin_tex(fire_09009800), - define_builtin_tex(fire_0900A000), - define_builtin_tex(fire_0900A800), - define_builtin_tex(fire_0900B000), - define_builtin_tex(fire_0900B800), - define_builtin_tex(generic_09000000), - define_builtin_tex(generic_09000800), - define_builtin_tex(generic_09001000), - define_builtin_tex(generic_09001800), - define_builtin_tex(generic_09002000), - define_builtin_tex(generic_09002800), - define_builtin_tex(generic_09003000), - define_builtin_tex(generic_09003800), - define_builtin_tex(generic_09004000), - define_builtin_tex(generic_09004800), - define_builtin_tex(generic_09005000), - define_builtin_tex(generic_09005800), - define_builtin_tex(generic_09006000), - define_builtin_tex(generic_09007000), - define_builtin_tex(generic_09007800), - define_builtin_tex(generic_09008000), - define_builtin_tex(generic_09008800), - define_builtin_tex(generic_09009000), - define_builtin_tex(generic_09009800), - define_builtin_tex(generic_0900A000), - define_builtin_tex(generic_0900A800), - define_builtin_tex(generic_0900B000), - define_builtin_tex(grass_09000000), - define_builtin_tex(grass_09000800), - define_builtin_tex(grass_09001000), - define_builtin_tex(grass_09001800), - define_builtin_tex(grass_09002000), - define_builtin_tex(grass_09002800), - define_builtin_tex(grass_09003000), - define_builtin_tex(grass_09003800), - define_builtin_tex(grass_09004000), - define_builtin_tex(grass_09004800), - define_builtin_tex(grass_09005000), - define_builtin_tex(grass_09005800), - define_builtin_tex(grass_09006000), - define_builtin_tex(grass_09006800), - define_builtin_tex(grass_09007000), - define_builtin_tex(grass_09007800), - define_builtin_tex(grass_09008000), - define_builtin_tex(grass_09008800), - define_builtin_tex(grass_09009000), - define_builtin_tex(grass_09009800), - define_builtin_tex(grass_0900A000), - define_builtin_tex(grass_0900A800), - define_builtin_tex(grass_0900B000), - define_builtin_tex(grass_0900B800), - define_builtin_tex(inside_09000000), - define_builtin_tex(inside_09001000), - define_builtin_tex(inside_09002000), - define_builtin_tex(inside_09003000), - define_builtin_tex(inside_09003800), - define_builtin_tex(inside_09004000), - define_builtin_tex(inside_09004800), - define_builtin_tex(inside_09005000), - define_builtin_tex(inside_09005800), - define_builtin_tex(inside_09006000), - define_builtin_tex(inside_09007000), - define_builtin_tex(inside_09008000), - define_builtin_tex(inside_09008800), - define_builtin_tex(inside_09009000), - define_builtin_tex(inside_0900A000), - define_builtin_tex(inside_0900B000), - define_builtin_tex(inside_0900B800), - define_builtin_tex(machine_09000000), - define_builtin_tex(machine_09000800), - define_builtin_tex(machine_09001000), - define_builtin_tex(machine_09001800), - define_builtin_tex(machine_09002000), - define_builtin_tex(machine_09002800), - define_builtin_tex(machine_09003000), - define_builtin_tex(machine_09003800), - define_builtin_tex(machine_09004000), - define_builtin_tex(machine_09005000), - define_builtin_tex(machine_09005800), - define_builtin_tex(machine_09006000), - define_builtin_tex(machine_09006800), - define_builtin_tex(machine_09007000), - define_builtin_tex(machine_09007800), - define_builtin_tex(machine_09008000), - define_builtin_tex(machine_09008400), - define_builtin_tex(mountain_09000000), - define_builtin_tex(mountain_09000800), - define_builtin_tex(mountain_09001800), - define_builtin_tex(mountain_09002800), - define_builtin_tex(mountain_09003000), - define_builtin_tex(mountain_09003800), - define_builtin_tex(mountain_09004000), - define_builtin_tex(mountain_09004800), - define_builtin_tex(mountain_09005000), - define_builtin_tex(mountain_09005800), - define_builtin_tex(mountain_09006800), - define_builtin_tex(mountain_09007000), - define_builtin_tex(mountain_09007800), - define_builtin_tex(mountain_09008000), - define_builtin_tex(mountain_09008800), - define_builtin_tex(mountain_09009800), - define_builtin_tex(mountain_0900A000), - define_builtin_tex(mountain_0900A800), - define_builtin_tex(mountain_0900B000), - define_builtin_tex(mountain_0900B800), - define_builtin_tex(mountain_0900C000), - define_builtin_tex(outside_09000000), - define_builtin_tex(outside_09000800), - define_builtin_tex(outside_09001000), - define_builtin_tex(outside_09002000), - define_builtin_tex(outside_09003000), - define_builtin_tex(outside_09003800), - define_builtin_tex(outside_09004000), - define_builtin_tex(outside_09004800), - define_builtin_tex(outside_09005800), - define_builtin_tex(outside_09006000), - define_builtin_tex(outside_09006800), - define_builtin_tex(outside_09007800), - define_builtin_tex(outside_09008000), - define_builtin_tex(outside_09008800), - define_builtin_tex(outside_09009000), - define_builtin_tex(outside_09009800), - define_builtin_tex(outside_0900A000), - define_builtin_tex(outside_0900A800), - define_builtin_tex(outside_0900B000), - define_builtin_tex(outside_0900B400), - define_builtin_tex(outside_0900BC00), - define_builtin_tex(sky_09000000), - define_builtin_tex(sky_09000800), - define_builtin_tex(sky_09001000), - define_builtin_tex(sky_09001800), - define_builtin_tex(sky_09002000), - define_builtin_tex(sky_09003000), - define_builtin_tex(sky_09003800), - define_builtin_tex(sky_09004800), - define_builtin_tex(sky_09005000), - define_builtin_tex(sky_09005800), - define_builtin_tex(sky_09006000), - define_builtin_tex(texture_metal_hole), - define_builtin_tex(sky_09007000), - define_builtin_tex(sky_09007800), - define_builtin_tex(sky_09008000), - define_builtin_tex(snow_09000000), - define_builtin_tex(snow_09000800), - define_builtin_tex(snow_09001000), - define_builtin_tex(snow_09002000), - define_builtin_tex(snow_09002800), - define_builtin_tex(snow_09003000), - define_builtin_tex(snow_09003800), - define_builtin_tex(snow_09004000), - define_builtin_tex(snow_09004800), - define_builtin_tex(snow_09005000), - define_builtin_tex(snow_09005800), - define_builtin_tex(snow_09006000), - define_builtin_tex(snow_09006800), - define_builtin_tex(snow_09007000), - define_builtin_tex(snow_09008000), - define_builtin_tex(snow_09008800), - define_builtin_tex(snow_09009000), - define_builtin_tex(snow_09009800), - define_builtin_tex(spooky_09000000), - define_builtin_tex(spooky_09000800), - define_builtin_tex(spooky_09001800), - define_builtin_tex(spooky_09002800), - define_builtin_tex(spooky_09003800), - define_builtin_tex(spooky_09004800), - define_builtin_tex(spooky_09005000), - define_builtin_tex(spooky_09006000), - define_builtin_tex(spooky_09006800), - define_builtin_tex(spooky_09007000), - define_builtin_tex(spooky_09008000), - define_builtin_tex(spooky_09008800), - define_builtin_tex(spooky_09009000), - define_builtin_tex(spooky_0900A000), - define_builtin_tex(spooky_0900A800), - define_builtin_tex(spooky_0900B000), - define_builtin_tex(spooky_0900B800), - define_builtin_tex(water_09000000), - define_builtin_tex(water_09000800), - define_builtin_tex(water_09001800), - define_builtin_tex(water_09002800), - define_builtin_tex(water_09003800), - define_builtin_tex(water_09004800), - define_builtin_tex(water_09005800), - define_builtin_tex(water_09006000), - define_builtin_tex(water_09006800), - define_builtin_tex(water_09007800), - define_builtin_tex(water_09008800), - define_builtin_tex(water_09009000), - define_builtin_tex(water_0900A000), - define_builtin_tex(water_0900A800), - define_builtin_tex(water_0900B800), + define_builtin(cave_09000000), + define_builtin(cave_09001000), + define_builtin(cave_09001800), + define_builtin(cave_09002800), + define_builtin(cave_09003000), + define_builtin(cave_09003800), + define_builtin(cave_09004800), + define_builtin(cave_09005800), + define_builtin(cave_09006800), + define_builtin(cave_09007000), + define_builtin(cave_09007800), + define_builtin(cave_09008800), + define_builtin(cave_09009800), + define_builtin(cave_0900A000), + define_builtin(cave_0900A800), + define_builtin(cave_0900B800), + define_builtin(cave_0900C000), + define_builtin(fire_09000000), + define_builtin(fire_09000800), + define_builtin(fire_09001000), + define_builtin(fire_09001800), + define_builtin(fire_09002000), + define_builtin(fire_09002800), + define_builtin(fire_09003000), + define_builtin(fire_09003800), + define_builtin(fire_09004000), + define_builtin(fire_09004800), + define_builtin(fire_09005000), + define_builtin(fire_09005800), + define_builtin(fire_09006000), + define_builtin(fire_09006800), + define_builtin(fire_09007000), + define_builtin(fire_09007800), + define_builtin(fire_09008000), + define_builtin(fire_09008800), + define_builtin(fire_09009000), + define_builtin(fire_09009800), + define_builtin(fire_0900A000), + define_builtin(fire_0900A800), + define_builtin(fire_0900B000), + define_builtin(fire_0900B800), + define_builtin(generic_09000000), + define_builtin(generic_09000800), + define_builtin(generic_09001000), + define_builtin(generic_09001800), + define_builtin(generic_09002000), + define_builtin(generic_09002800), + define_builtin(generic_09003000), + define_builtin(generic_09003800), + define_builtin(generic_09004000), + define_builtin(generic_09004800), + define_builtin(generic_09005000), + define_builtin(generic_09005800), + define_builtin(generic_09006000), + define_builtin(generic_09007000), + define_builtin(generic_09007800), + define_builtin(generic_09008000), + define_builtin(generic_09008800), + define_builtin(generic_09009000), + define_builtin(generic_09009800), + define_builtin(generic_0900A000), + define_builtin(generic_0900A800), + define_builtin(generic_0900B000), + define_builtin(grass_09000000), + define_builtin(grass_09000800), + define_builtin(grass_09001000), + define_builtin(grass_09001800), + define_builtin(grass_09002000), + define_builtin(grass_09002800), + define_builtin(grass_09003000), + define_builtin(grass_09003800), + define_builtin(grass_09004000), + define_builtin(grass_09004800), + define_builtin(grass_09005000), + define_builtin(grass_09005800), + define_builtin(grass_09006000), + define_builtin(grass_09006800), + define_builtin(grass_09007000), + define_builtin(grass_09007800), + define_builtin(grass_09008000), + define_builtin(grass_09008800), + define_builtin(grass_09009000), + define_builtin(grass_09009800), + define_builtin(grass_0900A000), + define_builtin(grass_0900A800), + define_builtin(grass_0900B000), + define_builtin(grass_0900B800), + define_builtin(inside_09000000), + define_builtin(inside_09001000), + define_builtin(inside_09002000), + define_builtin(inside_09003000), + define_builtin(inside_09003800), + define_builtin(inside_09004000), + define_builtin(inside_09004800), + define_builtin(inside_09005000), + define_builtin(inside_09005800), + define_builtin(inside_09006000), + define_builtin(inside_09007000), + define_builtin(inside_09008000), + define_builtin(inside_09008800), + define_builtin(inside_09009000), + define_builtin(inside_0900A000), + define_builtin(inside_0900B000), + define_builtin(inside_0900B800), + define_builtin(machine_09000000), + define_builtin(machine_09000800), + define_builtin(machine_09001000), + define_builtin(machine_09001800), + define_builtin(machine_09002000), + define_builtin(machine_09002800), + define_builtin(machine_09003000), + define_builtin(machine_09003800), + define_builtin(machine_09004000), + define_builtin(machine_09005000), + define_builtin(machine_09005800), + define_builtin(machine_09006000), + define_builtin(machine_09006800), + define_builtin(machine_09007000), + define_builtin(machine_09007800), + define_builtin(machine_09008000), + define_builtin(machine_09008400), + define_builtin(mountain_09000000), + define_builtin(mountain_09000800), + define_builtin(mountain_09001800), + define_builtin(mountain_09002800), + define_builtin(mountain_09003000), + define_builtin(mountain_09003800), + define_builtin(mountain_09004000), + define_builtin(mountain_09004800), + define_builtin(mountain_09005000), + define_builtin(mountain_09005800), + define_builtin(mountain_09006800), + define_builtin(mountain_09007000), + define_builtin(mountain_09007800), + define_builtin(mountain_09008000), + define_builtin(mountain_09008800), + define_builtin(mountain_09009800), + define_builtin(mountain_0900A000), + define_builtin(mountain_0900A800), + define_builtin(mountain_0900B000), + define_builtin(mountain_0900B800), + define_builtin(mountain_0900C000), + define_builtin(outside_09000000), + define_builtin(outside_09000800), + define_builtin(outside_09001000), + define_builtin(outside_09002000), + define_builtin(outside_09003000), + define_builtin(outside_09003800), + define_builtin(outside_09004000), + define_builtin(outside_09004800), + define_builtin(outside_09005800), + define_builtin(outside_09006000), + define_builtin(outside_09006800), + define_builtin(outside_09007800), + define_builtin(outside_09008000), + define_builtin(outside_09008800), + define_builtin(outside_09009000), + define_builtin(outside_09009800), + define_builtin(outside_0900A000), + define_builtin(outside_0900A800), + define_builtin(outside_0900B000), + define_builtin(outside_0900B400), + define_builtin(outside_0900BC00), + define_builtin(sky_09000000), + define_builtin(sky_09000800), + define_builtin(sky_09001000), + define_builtin(sky_09001800), + define_builtin(sky_09002000), + define_builtin(sky_09003000), + define_builtin(sky_09003800), + define_builtin(sky_09004800), + define_builtin(sky_09005000), + define_builtin(sky_09005800), + define_builtin(sky_09006000), + define_builtin(texture_metal_hole), + define_builtin(sky_09007000), + define_builtin(sky_09007800), + define_builtin(sky_09008000), + define_builtin(snow_09000000), + define_builtin(snow_09000800), + define_builtin(snow_09001000), + define_builtin(snow_09002000), + define_builtin(snow_09002800), + define_builtin(snow_09003000), + define_builtin(snow_09003800), + define_builtin(snow_09004000), + define_builtin(snow_09004800), + define_builtin(snow_09005000), + define_builtin(snow_09005800), + define_builtin(snow_09006000), + define_builtin(snow_09006800), + define_builtin(snow_09007000), + define_builtin(snow_09008000), + define_builtin(snow_09008800), + define_builtin(snow_09009000), + define_builtin(snow_09009800), + define_builtin(spooky_09000000), + define_builtin(spooky_09000800), + define_builtin(spooky_09001800), + define_builtin(spooky_09002800), + define_builtin(spooky_09003800), + define_builtin(spooky_09004800), + define_builtin(spooky_09005000), + define_builtin(spooky_09006000), + define_builtin(spooky_09006800), + define_builtin(spooky_09007000), + define_builtin(spooky_09008000), + define_builtin(spooky_09008800), + define_builtin(spooky_09009000), + define_builtin(spooky_0900A000), + define_builtin(spooky_0900A800), + define_builtin(spooky_0900B000), + define_builtin(spooky_0900B800), + define_builtin(water_09000000), + define_builtin(water_09000800), + define_builtin(water_09001800), + define_builtin(water_09002800), + define_builtin(water_09003800), + define_builtin(water_09004800), + define_builtin(water_09005800), + define_builtin(water_09006000), + define_builtin(water_09006800), + define_builtin(water_09007800), + define_builtin(water_09008800), + define_builtin(water_09009000), + define_builtin(water_0900A000), + define_builtin(water_0900A800), + define_builtin(water_0900B800), }; const Texture* DynOS_Builtin_Tex_GetFromName(const char* aDataName) { @@ -1070,61 +1298,60 @@ static void *geo_rotate_3d_coin(s32 callContext, void *node, UNUSED void *c) { return NULL; } -#define define_builtin_func(tex) (const void*) #tex, (const void*) tex static const void* sDynosBuiltinFuncs[] = { - define_builtin_func(geo_mirror_mario_set_alpha), - define_builtin_func(geo_switch_mario_stand_run), - define_builtin_func(geo_switch_mario_eyes), - define_builtin_func(geo_mario_tilt_torso), - define_builtin_func(geo_mario_head_rotation), - define_builtin_func(geo_switch_mario_hand), - define_builtin_func(geo_mario_hand_foot_scaler), - define_builtin_func(geo_switch_mario_cap_effect), - define_builtin_func(geo_switch_mario_cap_on_off), - define_builtin_func(geo_mario_rotate_wing_cap_wings), - define_builtin_func(geo_switch_mario_hand_grab_pos), - define_builtin_func(geo_render_mirror_mario), - define_builtin_func(geo_mirror_mario_backface_culling), - define_builtin_func(geo_update_projectile_pos_from_parent), - define_builtin_func(geo_update_layer_transparency), - define_builtin_func(geo_switch_anim_state), - define_builtin_func(geo_switch_area), - define_builtin_func(geo_camera_main), - define_builtin_func(geo_camera_fov), - define_builtin_func(geo_envfx_main), - define_builtin_func(geo_skybox_main), - define_builtin_func(geo_wdw_set_initial_water_level), - define_builtin_func(geo_movtex_pause_control), - define_builtin_func(geo_movtex_draw_water_regions), - define_builtin_func(geo_movtex_draw_nocolor), - define_builtin_func(geo_movtex_draw_colored), - define_builtin_func(geo_movtex_draw_colored_no_update), - define_builtin_func(geo_movtex_draw_colored_2_no_update), - define_builtin_func(geo_movtex_update_horizontal), - define_builtin_func(geo_movtex_draw_colored_no_update), - define_builtin_func(geo_painting_draw), - define_builtin_func(geo_painting_update), - define_builtin_func(geo_exec_inside_castle_light), - define_builtin_func(geo_exec_flying_carpet_timer_update), - define_builtin_func(geo_exec_flying_carpet_create), - define_builtin_func(geo_exec_cake_end_screen), - define_builtin_func(geo_cannon_circle_base), - define_builtin_func(geo_move_mario_part_from_parent), - define_builtin_func(geo_bits_bowser_coloring), - define_builtin_func(geo_update_body_rot_from_parent), - define_builtin_func(geo_switch_bowser_eyes), - define_builtin_func(geo_switch_tuxie_mother_eyes), - define_builtin_func(geo_update_held_mario_pos), - define_builtin_func(geo_snufit_move_mask), - define_builtin_func(geo_snufit_scale_body), - define_builtin_func(geo_scale_bowser_key), + define_builtin(geo_mirror_mario_set_alpha), + define_builtin(geo_switch_mario_stand_run), + define_builtin(geo_switch_mario_eyes), + define_builtin(geo_mario_tilt_torso), + define_builtin(geo_mario_head_rotation), + define_builtin(geo_switch_mario_hand), + define_builtin(geo_mario_hand_foot_scaler), + define_builtin(geo_switch_mario_cap_effect), + define_builtin(geo_switch_mario_cap_on_off), + define_builtin(geo_mario_rotate_wing_cap_wings), + define_builtin(geo_switch_mario_hand_grab_pos), + define_builtin(geo_render_mirror_mario), + define_builtin(geo_mirror_mario_backface_culling), + define_builtin(geo_update_projectile_pos_from_parent), + define_builtin(geo_update_layer_transparency), + define_builtin(geo_switch_anim_state), + define_builtin(geo_switch_area), + define_builtin(geo_camera_main), + define_builtin(geo_camera_fov), + define_builtin(geo_envfx_main), + define_builtin(geo_skybox_main), + define_builtin(geo_wdw_set_initial_water_level), + define_builtin(geo_movtex_pause_control), + define_builtin(geo_movtex_draw_water_regions), + define_builtin(geo_movtex_draw_nocolor), + define_builtin(geo_movtex_draw_colored), + define_builtin(geo_movtex_draw_colored_no_update), + define_builtin(geo_movtex_draw_colored_2_no_update), + define_builtin(geo_movtex_update_horizontal), + define_builtin(geo_movtex_draw_colored_no_update), + define_builtin(geo_painting_draw), + define_builtin(geo_painting_update), + define_builtin(geo_exec_inside_castle_light), + define_builtin(geo_exec_flying_carpet_timer_update), + define_builtin(geo_exec_flying_carpet_create), + define_builtin(geo_exec_cake_end_screen), + define_builtin(geo_cannon_circle_base), + define_builtin(geo_move_mario_part_from_parent), + define_builtin(geo_bits_bowser_coloring), + define_builtin(geo_update_body_rot_from_parent), + define_builtin(geo_switch_bowser_eyes), + define_builtin(geo_switch_tuxie_mother_eyes), + define_builtin(geo_update_held_mario_pos), + define_builtin(geo_snufit_move_mask), + define_builtin(geo_snufit_scale_body), + define_builtin(geo_scale_bowser_key), (const void *) "geo_rotate_coin", (const void *) geo_rotate_3d_coin, - define_builtin_func(geo_offset_klepto_held_object), - define_builtin_func(geo_switch_peach_eyes), + define_builtin(geo_offset_klepto_held_object), + define_builtin(geo_switch_peach_eyes), // coop-specific - define_builtin_func(geo_mario_set_player_colors), - define_builtin_func(geo_movtex_draw_water_regions_ext), - define_builtin_func(lvl_init_or_update), + define_builtin(geo_mario_set_player_colors), + define_builtin(geo_movtex_draw_water_regions_ext), + define_builtin(lvl_init_or_update), }; const void* DynOS_Builtin_Func_GetFromName(const char* aDataName) { diff --git a/data/dynos_misc.cpp b/data/dynos_misc.cpp index f1557e56..8fa1fcf4 100644 --- a/data/dynos_misc.cpp +++ b/data/dynos_misc.cpp @@ -16,29 +16,6 @@ extern "C" { #include "game/behavior_actions.h" #include "game/rendering_graph_node.h" #include "game/skybox.h" - -#include "actors/common0.h" -#include "actors/common1.h" -#include "actors/group0.h" -#include "actors/group1.h" -#include "actors/group2.h" -#include "actors/group3.h" -#include "actors/group4.h" -#include "actors/group5.h" -#include "actors/group6.h" -#include "actors/group7.h" -#include "actors/group8.h" -#include "actors/group9.h" -#include "actors/group10.h" -#include "actors/group11.h" -#include "actors/group12.h" -#include "actors/group13.h" -#include "actors/group14.h" -#include "actors/group15.h" -#include "actors/group16.h" -#include "actors/group17.h" -#include "actors/custom0.h" -#include "actors/zcustom0.h" } // @@ -135,292 +112,6 @@ s32 DynOS_String_Width(const u8 *aStr64) { return _Width; } -// -// Actors -// - -// &__Actors() -#define define_actor(geo) (const void *) #geo, (const void *) geo -static const void *sDynosActors[] = { -define_actor(amp_geo), -define_actor(birds_geo), -define_actor(blargg_geo), -define_actor(blue_coin_switch_geo), -define_actor(black_bobomb_geo), -define_actor(bobomb_buddy_geo), -define_actor(boo_geo), -define_actor(boo_castle_geo), -define_actor(bookend_geo), -define_actor(bookend_part_geo), -define_actor(bowling_ball_geo), -define_actor(bowling_ball_track_geo), -define_actor(bowser_geo), -define_actor(bowser2_geo), -define_actor(bowser_bomb_geo), -define_actor(bowser_flames_geo), -define_actor(bowser_impact_smoke_geo), -define_actor(bowser_1_yellow_sphere_geo), -define_actor(invisible_bowser_accessory_geo), -define_actor(bowser_key_geo), -define_actor(bowser_key_cutscene_geo), -define_actor(breakable_box_geo), -define_actor(breakable_box_small_geo), -define_actor(bub_geo), -define_actor(bubba_geo), -define_actor(bubble_geo), -define_actor(bullet_bill_geo), -define_actor(bully_geo), -define_actor(bully_boss_geo), -define_actor(burn_smoke_geo), -define_actor(butterfly_geo), -define_actor(cannon_barrel_geo), -define_actor(cannon_base_geo), -define_actor(cap_switch_geo), -define_actor(cartoon_star_geo), -define_actor(chain_chomp_geo), -define_actor(checkerboard_platform_geo), -define_actor(chilly_chief_geo), -define_actor(chilly_chief_big_geo), -define_actor(chuckya_geo), -define_actor(clam_shell_geo), -define_actor(yellow_coin_geo), -define_actor(yellow_coin_no_shadow_geo), -define_actor(blue_coin_geo), -define_actor(blue_coin_no_shadow_geo), -define_actor(red_coin_geo), -define_actor(red_coin_no_shadow_geo), -define_actor(dirt_animation_geo), -define_actor(dorrie_geo), -define_actor(cabin_door_geo), -define_actor(castle_door_geo), -define_actor(castle_door_0_star_geo), -define_actor(castle_door_1_star_geo), -define_actor(castle_door_3_stars_geo), -define_actor(haunted_door_geo), -define_actor(hazy_maze_door_geo), -define_actor(metal_door_geo), -define_actor(key_door_geo), -define_actor(wooden_door_geo), -define_actor(enemy_lakitu_geo), -define_actor(exclamation_box_geo), -define_actor(exclamation_box_outline_geo), -define_actor(explosion_geo), -define_actor(eyerok_left_hand_geo), -define_actor(eyerok_right_hand_geo), -define_actor(fish_geo), -define_actor(cyan_fish_geo), -define_actor(flyguy_geo), -define_actor(red_flame_geo), -define_actor(red_flame_shadow_geo), -define_actor(blue_flame_geo), -define_actor(fwoosh_geo), -define_actor(goomba_geo), -define_actor(haunted_cage_geo), -define_actor(haunted_chair_geo), -define_actor(heart_geo), -define_actor(heave_ho_geo), -define_actor(hoot_geo), -define_actor(king_bobomb_geo), -define_actor(klepto_geo), -define_actor(koopa_with_shell_geo), -define_actor(koopa_without_shell_geo), -define_actor(koopa_flag_geo), -define_actor(koopa_shell_geo), -define_actor(lakitu_geo), -define_actor(mad_piano_geo), -define_actor(manta_seg5_geo_05008D14), -define_actor(mario_geo), -define_actor(marios_cap_geo), -define_actor(marios_metal_cap_geo), -define_actor(marios_wing_cap_geo), -define_actor(marios_winged_metal_cap_geo), -define_actor(metal_box_geo), -define_actor(metallic_ball_geo), -define_actor(mips_geo), -define_actor(mist_geo), -define_actor(moneybag_geo), -define_actor(monty_mole_geo), -define_actor(mr_blizzard_geo), -define_actor(mr_blizzard_hidden_geo), -define_actor(mr_i_geo), -define_actor(mr_i_iris_geo), -define_actor(mushroom_1up_geo), -define_actor(number_geo), -define_actor(peach_geo), -define_actor(penguin_geo), -define_actor(piranha_plant_geo), -define_actor(pokey_head_geo), -define_actor(pokey_body_part_geo), -define_actor(purple_marble_geo), -define_actor(purple_switch_geo), -define_actor(scuttlebug_geo), -define_actor(seaweed_geo), -define_actor(skeeter_geo), -define_actor(small_key_geo), -define_actor(small_water_splash_geo), -define_actor(smoke_geo), -define_actor(snufit_geo), -define_actor(sparkles_geo), -define_actor(sparkles_animation_geo), -define_actor(spindrift_geo), -define_actor(spiny_geo), -define_actor(spiny_ball_geo), -define_actor(star_geo), -define_actor(transparent_star_geo), -define_actor(sushi_geo), -define_actor(swoop_geo), -define_actor(thwomp_geo), -define_actor(toad_geo), -define_actor(treasure_chest_base_geo), -define_actor(treasure_chest_lid_geo), -define_actor(bubbly_tree_geo), -define_actor(spiky_tree_geo), -define_actor(snow_tree_geo), -define_actor(palm_tree_geo), -define_actor(leaves_geo), -define_actor(tweester_geo), -define_actor(ukiki_geo), -define_actor(unagi_geo), -define_actor(warp_pipe_geo), -define_actor(water_bomb_geo), -define_actor(water_bomb_shadow_geo), -define_actor(water_ring_geo), -define_actor(water_splash_geo), -define_actor(idle_water_wave_geo), -define_actor(wave_trail_geo), -define_actor(white_particle_geo), -define_actor(white_puff_geo), -define_actor(whomp_geo), -define_actor(wiggler_head_geo), -define_actor(wiggler_body_geo), -define_actor(wooden_post_geo), -define_actor(wooden_signpost_geo), -define_actor(yellow_sphere_geo), -define_actor(yoshi_geo), -define_actor(yoshi_egg_geo), -// coop models -define_actor(error_model_geo), -define_actor(luigi_geo), -define_actor(luigis_cap_geo), -define_actor(luigis_metal_cap_geo), -define_actor(luigis_wing_cap_geo), -define_actor(luigis_winged_metal_cap_geo), -define_actor(toad_player_geo), -define_actor(toads_cap_geo), -define_actor(toads_metal_cap_geo), -define_actor(toads_wing_cap_geo), -define_actor(waluigi_geo), -define_actor(waluigis_cap_geo), -define_actor(waluigis_metal_cap_geo), -define_actor(waluigis_wing_cap_geo), -define_actor(waluigis_winged_metal_cap_geo), -define_actor(wario_geo), -define_actor(warios_cap_geo), -define_actor(warios_metal_cap_geo), -define_actor(warios_wing_cap_geo), -define_actor(warios_winged_metal_cap_geo), -}; - -static Array> sDynosCustomActors; - -void DynOS_Geo_AddActorCustom(const SysPath &aPackFolder, const char *aActorName) { - // check for duplicates - bool isUnique = true; - s32 foundIndex = -1; - for (s32 i = 0; i < DynOS_Geo_GetActorCount(); ++i) { - if (!strcmp(DynOS_Geo_GetActorName(i), aActorName)) { - isUnique = false; - foundIndex = i; - break; - } - } - - u16 actorLen = strlen(aActorName); - char* actorName = (char*)calloc(1, sizeof(char) * (actorLen + 1)); - strcpy(actorName, aActorName); - - GfxData *_GfxData = DynOS_Actor_LoadFromBinary(aPackFolder, actorName); - if (!_GfxData) { - free(actorName); - return; - } - - void* geoLayout = (*(_GfxData->mGeoLayouts.end() - 1))->mData; - if (!geoLayout) { - free(actorName); - return; - } - - // Add to custom actors - s32 index = DynOS_Geo_GetActorCount(); - if (isUnique) { - sDynosCustomActors.Add({ actorName, geoLayout }); - } else { - index = foundIndex; - free(actorName); - } - - // Alloc and init the actors gfx list - Array &pActorGfxList = DynOS_Gfx_GetActorList(); - pActorGfxList.Resize(DynOS_Geo_GetActorCount()); - pActorGfxList[index].mPackIndex = 99; - pActorGfxList[index].mGfxData = _GfxData; - pActorGfxList[index].mGraphNode = (GraphNode *) DynOS_Geo_GetGraphNode(geoLayout, true); -} - -s32 DynOS_Geo_GetActorCount() { - s32 arrayCount = (s32) (sizeof(sDynosActors) / (2 * sizeof(sDynosActors[0]))); - return (s32) arrayCount + sDynosCustomActors.Count(); -} - -const char *DynOS_Geo_GetActorName(s32 aIndex) { - s32 arrayCount = (s32) (sizeof(sDynosActors) / (2 * sizeof(sDynosActors[0]))); - if (aIndex < arrayCount) { return (const char *) sDynosActors[2 * aIndex]; } - return sDynosCustomActors[aIndex - arrayCount].first; -} - -const void *DynOS_Geo_GetActorLayout(s32 aIndex) { - s32 arrayCount = (s32) (sizeof(sDynosActors) / (2 * sizeof(sDynosActors[0]))); - if (aIndex < arrayCount) { return (const void *) sDynosActors[2 * aIndex + 1]; } - return sDynosCustomActors[aIndex - arrayCount].second; -} - -const void *DynOS_Geo_GetActorLayoutFromName(const char *aActorName) { - if (aActorName == NULL) { return NULL; } - - // check levels - auto& levelsArray = DynOS_Lvl_GetArray(); - for (auto& lvl : levelsArray) { - for (auto& geo : lvl.second->mGeoLayouts) { - if (geo->mName == aActorName) { - return geo->mData; - } - } - } - - // check actors - for (s32 i = 0; i < DynOS_Geo_GetActorCount(); ++i) { - if (!strcmp(DynOS_Geo_GetActorName(i), aActorName)) { - return DynOS_Geo_GetActorLayout(i); - } - } - return NULL; -} - -s32 DynOS_Geo_GetActorIndex(const void *aGeoLayout) { - for (s32 i = 0; i < DynOS_Geo_GetActorCount(); ++i) { - if (DynOS_Geo_GetActorLayout(i) == aGeoLayout) { - return i; - } - } - return -1; -} - -bool DynOS_Geo_IsCustomActor(s32 aIndex) { - s32 arrayCount = (s32) (sizeof(sDynosActors) / (2 * sizeof(sDynosActors[0]))); - return aIndex >= arrayCount; -} - // // Geo //