diff --git a/data/dynos.cpp.h b/data/dynos.cpp.h index 27fd98b2..519e4c59 100644 --- a/data/dynos.cpp.h +++ b/data/dynos.cpp.h @@ -699,12 +699,6 @@ void *DynOS_Geo_GetFunctionPointerFromIndex(s32 aIndex); s32 DynOS_Geo_GetFunctionIndex(const void *aPtr); void *DynOS_Geo_GetGraphNode(const void *aGeoLayout, bool aKeepInMemory); -s32 DynOS_Lvl_GetGeoCount(); -const char *DynOS_Lvl_GetGeoName(s32 aIndex); -const void *DynOS_Lvl_GetGeoLayout(s32 aIndex); -const void *DynOS_Lvl_GetGeoLayoutFromName(const char *aGeoName); -s32 DynOS_Lvl_GetGeoIndex(const void *aGeoLayout); - // // Levels // @@ -746,6 +740,17 @@ const char *DynOS_Warp_GetParamName(s32 aLevel, s32 aIndex); void DynOS_Col_Add(const SysPath &aPackFolder, const char *aCollisionName); Collision* DynOS_Col_Get(const char* collisionName); +// +// Managers +// + +const void* DynOS_Mgr_VanillaScriptPtr_GetFromName(const char* aDataName); +const char* DynOS_Mgr_VanillaScriptPtr_GetFromData(const void* aData); +const GeoLayout* DynOS_Mgr_VanillaLvlGeo_GetFromName(const char* aDataName); +const char* DynOS_Mgr_VanillaLvlGeo_GetFromData(const GeoLayout* aData); +const Texture* DynOS_Mgr_VanillaTex_GetFromName(const char* aDataName); +const char* DynOS_Mgr_VanillaTex_GetFromData(const Texture* aData); + // // Bin // diff --git a/data/dynos_bin_gfx.cpp b/data/dynos_bin_gfx.cpp index 5bcc3c06..08fc22eb 100644 --- a/data/dynos_bin_gfx.cpp +++ b/data/dynos_bin_gfx.cpp @@ -447,6 +447,12 @@ static s64 ParseGfxSymbolArg(GfxData* aGfxData, DataNode* aNode, u64* pToke return (s64) x; } + // Vanilla textures + auto vanillaTex = DynOS_Mgr_VanillaTex_GetFromName(_Arg.begin()); + if (vanillaTex != NULL) { + return (s64)vanillaTex; + } + // Recursive descent parsing bool rdSuccess = false; s64 rdValue = DynOS_RecursiveDescent_Parse(_Arg.begin(), &rdSuccess, DynOS_Gfx_ParseGfxConstants); @@ -674,9 +680,12 @@ static Array ParseGfxSetCombineMode(GfxData* aGfxData, DataNode* aNode } static void UpdateTextureInfo(GfxData* aGfxData, s64 *aTexPtr, s32 aFormat, s32 aSize, s32 aWidth, s32 aHeight) { - // Update current texture pointers if (aTexPtr && (*aTexPtr)) { + if (DynOS_Mgr_VanillaTex_GetFromData(*(const Texture**)aTexPtr)) { + return; + } + aGfxData->mGfxContext.mCurrentPalette = aGfxData->mGfxContext.mCurrentTexture; aGfxData->mGfxContext.mCurrentTexture = (DataNode*) (*aTexPtr); } diff --git a/data/dynos_bin_lvl.cpp b/data/dynos_bin_lvl.cpp index f56abab7..c50f5e8f 100644 --- a/data/dynos_bin_lvl.cpp +++ b/data/dynos_bin_lvl.cpp @@ -1399,23 +1399,6 @@ s64 DynOS_Lvl_ParseLevelScriptConstants(const String& _Arg, bool* found) { lvl_constant(NULL); lvl_constant(FALSE); - // vanilla 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); - } - } - - // vanilla level geos - s32 lvlGeoCount = DynOS_Lvl_GetGeoCount(); - for (s32 i = 0; i < lvlGeoCount; i++) { - if (!strcmp(_Arg.begin(), DynOS_Lvl_GetGeoName(i))) { - return (LevelScript)DynOS_Lvl_GetGeoLayout(i); - } - } - *found = false; return 0; } @@ -1491,6 +1474,21 @@ static LevelScript ParseLevelScriptSymbolArgInternal(GfxData* aGfxData, DataNode } } + // vanilla 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); + } + } + + // Vanilla Lvl Geos + auto vanillaGeo = DynOS_Mgr_VanillaLvlGeo_GetFromName(_Arg.begin()); + if (vanillaGeo != NULL) { + return (LevelScript)vanillaGeo; + } + // Integers s32 x; if ((_Arg[1] == 'x' && sscanf(_Arg.begin(), "%x", &x) == 1) || (sscanf(_Arg.begin(), "%d", &x) == 1)) { @@ -2033,7 +2031,23 @@ static bool DynOS_Lvl_GeneratePack_Internal(const SysPath &aPackFolder, ArraymLights); + ClearLvlDataNodes(_GfxData->mLightTs); + ClearLvlDataNodes(_GfxData->mAmbientTs); + ClearLvlDataNodes(_GfxData->mTextures); + ClearLvlDataNodes(_GfxData->mTextureLists); + ClearLvlDataNodes(_GfxData->mVertices); + ClearLvlDataNodes(_GfxData->mDisplayLists); + ClearLvlDataNodes(_GfxData->mGeoLayouts); + ClearLvlDataNodes(_GfxData->mCollisions); ClearLvlDataNodes(_GfxData->mLevelScripts); + ClearLvlDataNodes(_GfxData->mMacroObjects); + ClearLvlDataNodes(_GfxData->mTrajectories); + ClearLvlDataNodes(_GfxData->mMovtexs); + ClearLvlDataNodes(_GfxData->mMovtexQCs); + ClearLvlDataNodes(_GfxData->mRooms); + ClearLvlDataNodes(_GfxData->mGenerateGeoLayouts); + ClearLvlDataNodes(_GfxData->mGenerateLevelScripts); generated = true; } return generated; @@ -2074,6 +2088,9 @@ void DynOS_Lvl_GeneratePack(const SysPath &aPackFolder) { Print("---------- Level pack folder: \"%s\" ----------", aPackFolder.c_str()); Array> _ActorsFolders; + GfxData *_GfxData = New(); + _GfxData->mModelIdentifier = 0; + DIR *aPackDir = opendir(aPackFolder.c_str()); if (aPackDir) { struct dirent *_PackEnt = NULL; @@ -2090,16 +2107,13 @@ void DynOS_Lvl_GeneratePack(const SysPath &aPackFolder) { // Only parse folders with a 'script.c' if (!fs_sys_file_exists(fstring("%s/script.c", _Folder.c_str()).c_str()) && !fs_sys_file_exists(fstring("%s/custom.script.c", _Folder.c_str()).c_str())) continue; - GfxData *_GfxData = New(); - _GfxData->mModelIdentifier = 0; - DynOS_Lvl_GeneratePack_Recursive(_Folder, _GfxData); - // Generate a binary file for each level found in the GfxData - DynOS_Lvl_GeneratePack_Internal(aPackFolder, _ActorsFolders, _GfxData); - DynOS_Gfx_Free(_GfxData); - } closedir(aPackDir); } + + // Generate a binary file for each level found in the GfxData + DynOS_Lvl_GeneratePack_Internal(aPackFolder, _ActorsFolders, _GfxData); + DynOS_Gfx_Free(_GfxData); } diff --git a/data/dynos_bin_pointer.cpp b/data/dynos_bin_pointer.cpp index 834cf600..39c2d2e3 100644 --- a/data/dynos_bin_pointer.cpp +++ b/data/dynos_bin_pointer.cpp @@ -4,29 +4,6 @@ extern "C" { #include "levels/scripts.h" } -#define define_pointer(ptr) (const void *) #ptr, (const void *) ptr -static const void *sDynosPointers[] = { - define_pointer(level_main_scripts_entry), - define_pointer(script_func_global_1), - define_pointer(script_func_global_2), - define_pointer(script_func_global_3), - define_pointer(script_func_global_4), - define_pointer(script_func_global_5), - define_pointer(script_func_global_6), - define_pointer(script_func_global_7), - define_pointer(script_func_global_8), - define_pointer(script_func_global_9), - define_pointer(script_func_global_10), - define_pointer(script_func_global_11), - define_pointer(script_func_global_12), - define_pointer(script_func_global_13), - define_pointer(script_func_global_14), - define_pointer(script_func_global_15), - define_pointer(script_func_global_16), - define_pointer(script_func_global_17), - define_pointer(script_func_global_18), -}; - ///////////// // Writing // ///////////// @@ -43,6 +20,7 @@ static PointerData GetDataFromPointer(const void* aPtr, GfxData* aGfxData) { } } + // Light_ts for (auto& _Node : aGfxData->mLightTs) { if (&_Node->mData->col[0] == aPtr) { return { _Node->mName, 1 }; @@ -55,6 +33,7 @@ static PointerData GetDataFromPointer(const void* aPtr, GfxData* aGfxData) { } } + // Ambient_ts for (auto& _Node : aGfxData->mAmbientTs) { if (&_Node->mData->col[0] == aPtr) { return { _Node->mName, 1 }; @@ -157,21 +136,21 @@ static PointerData GetDataFromPointer(const void* aPtr, GfxData* aGfxData) { } // Vanilla Lvl Geos - s32 lvlGeoCount = DynOS_Lvl_GetGeoCount(); - for (s32 i = 0; i < lvlGeoCount; i++) { - if (aPtr == DynOS_Lvl_GetGeoLayout(i)) { - return { DynOS_Lvl_GetGeoName(i), 0 }; - } + auto vanillaGeo = DynOS_Mgr_VanillaLvlGeo_GetFromData((const GeoLayout*)aPtr); + if (vanillaGeo != NULL) { + return { vanillaGeo, 0 }; } - // Vanilla Pointers - s32 pointerCount = (s32) (sizeof(sDynosPointers) / (2 * sizeof(sDynosPointers[0]))); - for (s32 i = 0; i < pointerCount; i++) { - const char* ptrName = (const char*)sDynosPointers[i * 2 + 0]; - const void* ptr = sDynosPointers[i * 2 + 1]; - if (ptr == aPtr) { - return { ptrName, 0 }; - } + // Vanilla Script Pointers + auto vanillaScriptPtr = DynOS_Mgr_VanillaScriptPtr_GetFromData(aPtr); + if (vanillaScriptPtr != NULL) { + return { vanillaScriptPtr, 0 }; + } + + // Vanilla Textures + auto vanillaTex = DynOS_Mgr_VanillaTex_GetFromData((const Texture*)aPtr); + if (vanillaTex != NULL) { + return { vanillaTex, 0 }; } // Vertices @@ -188,6 +167,7 @@ static PointerData GetDataFromPointer(const void* aPtr, GfxData* aGfxData) { } } return { _VtxArrayName, (u32)((const Vtx*)aPtr - (const Vtx*)_VtxArrayStart) }; + } void DynOS_Pointer_Lua_Write(FILE* aFile, u32 index, GfxData* aGfxData) { @@ -257,6 +237,7 @@ static void *GetPointerFromData(GfxData *aGfxData, const String &aPtrName, u32 a } } + // Light_ts for (auto& _Node : aGfxData->mLightTs) { if (_Node->mName == aPtrName) { if (aPtrData == 1) { @@ -272,6 +253,7 @@ static void *GetPointerFromData(GfxData *aGfxData, const String &aPtrName, u32 a } } + // Ambient_ts for (auto& _Node : aGfxData->mAmbientTs) { if (_Node->mName == aPtrName) { if (aPtrData == 1) { @@ -384,21 +366,21 @@ static void *GetPointerFromData(GfxData *aGfxData, const String &aPtrName, u32 a } // Vanilla Lvl Geos - s32 lvlGeoCount = DynOS_Lvl_GetGeoCount(); - for (s32 i = 0; i < lvlGeoCount; i++) { - if (!strcmp(aPtrName.begin(), DynOS_Lvl_GetGeoName(i))) { - return (void*)DynOS_Lvl_GetGeoLayout(i); - } + auto vanillaGeo = DynOS_Mgr_VanillaLvlGeo_GetFromName(aPtrName.begin()); + if (vanillaGeo != NULL) { + return (void*)vanillaGeo; } - // Vanilla Pointers - s32 pointerCount = (s32) (sizeof(sDynosPointers) / (2 * sizeof(sDynosPointers[0]))); - for (s32 i = 0; i < pointerCount; i++) { - const char* ptrName = (const char*)sDynosPointers[i * 2 + 0]; - const void* ptr = sDynosPointers[i * 2 + 1]; - if (!strcmp(aPtrName.begin(), ptrName)) { - return (void*)ptr; - } + // Vanilla Script Pointers + auto vanillaScriptPtr = DynOS_Mgr_VanillaScriptPtr_GetFromName(aPtrName.begin()); + if (vanillaScriptPtr != NULL) { + return (void*)vanillaScriptPtr; + } + + // Vanilla Textures + auto vanillaTex = DynOS_Mgr_VanillaTex_GetFromName(aPtrName.begin()); + if (vanillaTex != NULL) { + return (void*)vanillaTex; } // Error diff --git a/data/dynos_mgr_vanilla_data.cpp b/data/dynos_mgr_vanilla_data.cpp new file mode 100644 index 00000000..fddc0e53 --- /dev/null +++ b/data/dynos_mgr_vanilla_data.cpp @@ -0,0 +1,786 @@ +#include "dynos.cpp.h" +extern "C" { +#include "behavior_table.h" +#include "levels/scripts.h" + +#include "levels/bbh/header.h" +#include "levels/bitdw/header.h" +#include "levels/bitfs/header.h" +#include "levels/bits/header.h" +#include "levels/bob/header.h" +#include "levels/bowser_2/header.h" +#include "levels/bowser_3/header.h" +#include "levels/castle_grounds/header.h" +#include "levels/castle_inside/header.h" +#include "levels/ccm/header.h" +#include "levels/ddd/header.h" +#include "levels/hmc/header.h" +#include "levels/jrb/header.h" +#include "levels/lll/header.h" +#include "levels/rr/header.h" +#include "levels/sl/header.h" +#include "levels/ssl/header.h" +#include "levels/thi/header.h" +#include "levels/ttc/header.h" +#include "levels/ttm/header.h" +#include "levels/wdw/header.h" +#include "levels/wf/header.h" + +#include "textures.h" +} + +#define MGR_FIND_DATA(_DataTable, _Cast) \ + size_t _count = sizeof(_DataTable) / (2 * sizeof(_DataTable[0])); \ + for (u32 _i = 0; _i < _count; _i++) { \ + if (!strcmp((const char*)_DataTable[_i * 2 + 0], aDataName)) { \ + return _Cast _DataTable[_i * 2 + 1]; \ + } \ + } \ + return NULL; + +#define MGR_FIND_NAME(_DataTable) \ + size_t _count = sizeof(_DataTable) / (2 * sizeof(_DataTable[0])); \ + for (u32 _i = 0; _i < _count; _i++) { \ + if ((const void*)_DataTable[_i * 2 + 1] == aData) { \ + return (const char*)_DataTable[_i * 2 + 0]; \ + } \ + } \ + return NULL; + + /////////////////////// + // Function Pointers // +/////////////////////// + +#define define_vanilla_script_ptr(ptr) (const void*)#ptr, (const void*)ptr + +static const void* sDynosVanillaScriptPtrs[] = { + define_vanilla_script_ptr(level_main_scripts_entry), + define_vanilla_script_ptr(script_func_global_1), + define_vanilla_script_ptr(script_func_global_2), + define_vanilla_script_ptr(script_func_global_3), + define_vanilla_script_ptr(script_func_global_4), + define_vanilla_script_ptr(script_func_global_5), + define_vanilla_script_ptr(script_func_global_6), + define_vanilla_script_ptr(script_func_global_7), + define_vanilla_script_ptr(script_func_global_8), + define_vanilla_script_ptr(script_func_global_9), + define_vanilla_script_ptr(script_func_global_10), + define_vanilla_script_ptr(script_func_global_11), + define_vanilla_script_ptr(script_func_global_12), + define_vanilla_script_ptr(script_func_global_13), + define_vanilla_script_ptr(script_func_global_14), + define_vanilla_script_ptr(script_func_global_15), + define_vanilla_script_ptr(script_func_global_16), + define_vanilla_script_ptr(script_func_global_17), + define_vanilla_script_ptr(script_func_global_18), +}; + +const void* DynOS_Mgr_VanillaScriptPtr_GetFromName(const char* aDataName) { + MGR_FIND_DATA(sDynosVanillaScriptPtrs, (const void*)); +} + +const char* DynOS_Mgr_VanillaScriptPtr_GetFromData(const void* aData) { + MGR_FIND_NAME(sDynosVanillaScriptPtrs); +} + + //////////////// + // Level Geos // +//////////////// + +#define define_vanilla_lvl_geo(tex) (const void*) #tex, (const void*) tex +static const void* sDynosVanillaLvlGeos[] = { + define_vanilla_lvl_geo(geo_bbh_0005B0), + define_vanilla_lvl_geo(geo_bbh_0005C8), + define_vanilla_lvl_geo(geo_bbh_0005E0), + define_vanilla_lvl_geo(geo_bbh_0005F8), + define_vanilla_lvl_geo(geo_bbh_000610), + define_vanilla_lvl_geo(geo_bbh_000628), + define_vanilla_lvl_geo(geo_bbh_000640), + define_vanilla_lvl_geo(geo_bbh_000658), + define_vanilla_lvl_geo(geo_bbh_000670), + define_vanilla_lvl_geo(geo_bbh_0006B0), + define_vanilla_lvl_geo(geo_bbh_0006E8), + define_vanilla_lvl_geo(geo_bbh_000730), + define_vanilla_lvl_geo(geo_bbh_000750), + define_vanilla_lvl_geo(geo_bbh_000768), + define_vanilla_lvl_geo(geo_bbh_0007B0), + define_vanilla_lvl_geo(geo_bbh_0007D0), + define_vanilla_lvl_geo(geo_bbh_000800), + define_vanilla_lvl_geo(geo_bbh_000828), + define_vanilla_lvl_geo(geo_bbh_000860), + define_vanilla_lvl_geo(geo_bbh_000888), + define_vanilla_lvl_geo(geo_bbh_0008B0), + define_vanilla_lvl_geo(geo_bbh_0008E8), + define_vanilla_lvl_geo(geo_bbh_000950), + define_vanilla_lvl_geo(geo_bbh_0009C8), + define_vanilla_lvl_geo(geo_bbh_000A18), + define_vanilla_lvl_geo(geo_bbh_000A60), + define_vanilla_lvl_geo(geo_bbh_000AD8), + define_vanilla_lvl_geo(geo_bbh_000B28), + define_vanilla_lvl_geo(geo_bbh_000B88), + define_vanilla_lvl_geo(geo_bbh_000BF0), + define_vanilla_lvl_geo(geo_bbh_000C38), + define_vanilla_lvl_geo(geo_bbh_000C88), + define_vanilla_lvl_geo(geo_bbh_000CE8), + define_vanilla_lvl_geo(geo_bbh_000D20), + define_vanilla_lvl_geo(geo_bbh_000D68), + define_vanilla_lvl_geo(geo_bbh_000DB0), + define_vanilla_lvl_geo(geo_bbh_000DF0), + define_vanilla_lvl_geo(geo_bbh_000E40), + define_vanilla_lvl_geo(geo_bbh_000E80), + define_vanilla_lvl_geo(geo_bbh_000EB0), + define_vanilla_lvl_geo(geo_bbh_000F00), + define_vanilla_lvl_geo(geo_bitdw_0003C0), + define_vanilla_lvl_geo(geo_bitdw_0003D8), + define_vanilla_lvl_geo(geo_bitdw_0003F0), + define_vanilla_lvl_geo(geo_bitdw_000408), + define_vanilla_lvl_geo(geo_bitdw_000420), + define_vanilla_lvl_geo(geo_bitdw_000438), + define_vanilla_lvl_geo(geo_bitdw_000450), + define_vanilla_lvl_geo(geo_bitdw_000468), + define_vanilla_lvl_geo(geo_bitdw_000480), + define_vanilla_lvl_geo(geo_bitdw_000498), + define_vanilla_lvl_geo(geo_bitdw_0004B0), + define_vanilla_lvl_geo(geo_bitdw_0004C8), + define_vanilla_lvl_geo(geo_bitdw_0004E0), + define_vanilla_lvl_geo(geo_bitdw_0004F8), + define_vanilla_lvl_geo(geo_bitdw_000510), + define_vanilla_lvl_geo(geo_bitdw_000528), + define_vanilla_lvl_geo(geo_bitdw_000540), + define_vanilla_lvl_geo(geo_bitdw_000558), + define_vanilla_lvl_geo(geo_bitdw_000570), + define_vanilla_lvl_geo(geo_bitdw_000588), + define_vanilla_lvl_geo(geo_bitdw_0005A0), + define_vanilla_lvl_geo(geo_bitdw_0005B8), + define_vanilla_lvl_geo(geo_bitdw_0005D0), + define_vanilla_lvl_geo(geo_bitdw_0005E8), + define_vanilla_lvl_geo(geo_bitdw_000600), + define_vanilla_lvl_geo(geo_bitdw_000618), + define_vanilla_lvl_geo(bitfs_geo_0004B0), + define_vanilla_lvl_geo(bitfs_geo_0004C8), + define_vanilla_lvl_geo(bitfs_geo_0004E0), + define_vanilla_lvl_geo(bitfs_geo_0004F8), + define_vanilla_lvl_geo(bitfs_geo_000510), + define_vanilla_lvl_geo(bitfs_geo_000528), + define_vanilla_lvl_geo(bitfs_geo_000540), + define_vanilla_lvl_geo(bitfs_geo_000558), + define_vanilla_lvl_geo(bitfs_geo_000570), + define_vanilla_lvl_geo(bitfs_geo_000588), + define_vanilla_lvl_geo(bitfs_geo_0005A0), + define_vanilla_lvl_geo(bitfs_geo_0005B8), + define_vanilla_lvl_geo(bitfs_geo_0005D0), + define_vanilla_lvl_geo(bitfs_geo_0005E8), + define_vanilla_lvl_geo(bitfs_geo_000600), + define_vanilla_lvl_geo(bitfs_geo_000618), + define_vanilla_lvl_geo(bitfs_geo_000630), + define_vanilla_lvl_geo(bitfs_geo_000648), + define_vanilla_lvl_geo(bitfs_geo_000660), + define_vanilla_lvl_geo(bitfs_geo_000678), + define_vanilla_lvl_geo(bitfs_geo_000690), + define_vanilla_lvl_geo(bitfs_geo_0006A8), + define_vanilla_lvl_geo(bitfs_geo_0006C0), + define_vanilla_lvl_geo(bitfs_geo_0006D8), + define_vanilla_lvl_geo(bitfs_geo_0006F0), + define_vanilla_lvl_geo(bitfs_geo_000708), + define_vanilla_lvl_geo(bitfs_geo_000728), + define_vanilla_lvl_geo(bitfs_geo_000740), + define_vanilla_lvl_geo(bitfs_geo_000758), + define_vanilla_lvl_geo(bitfs_geo_000770), + define_vanilla_lvl_geo(bitfs_geo_000788), + define_vanilla_lvl_geo(bitfs_geo_0007A0), + define_vanilla_lvl_geo(bits_geo_000430), + define_vanilla_lvl_geo(bits_geo_000448), + define_vanilla_lvl_geo(bits_geo_000460), + define_vanilla_lvl_geo(bits_geo_000478), + define_vanilla_lvl_geo(bits_geo_000490), + define_vanilla_lvl_geo(bits_geo_0004A8), + define_vanilla_lvl_geo(bits_geo_0004C0), + define_vanilla_lvl_geo(bits_geo_0004D8), + define_vanilla_lvl_geo(bits_geo_0004F0), + define_vanilla_lvl_geo(bits_geo_000508), + define_vanilla_lvl_geo(bits_geo_000520), + define_vanilla_lvl_geo(bits_geo_000538), + define_vanilla_lvl_geo(bits_geo_000550), + define_vanilla_lvl_geo(bits_geo_000568), + define_vanilla_lvl_geo(bits_geo_000580), + define_vanilla_lvl_geo(bits_geo_000598), + define_vanilla_lvl_geo(bits_geo_0005B0), + define_vanilla_lvl_geo(bits_geo_0005C8), + define_vanilla_lvl_geo(bits_geo_0005E0), + define_vanilla_lvl_geo(bits_geo_0005F8), + define_vanilla_lvl_geo(bits_geo_000610), + define_vanilla_lvl_geo(bits_geo_000628), + define_vanilla_lvl_geo(bits_geo_000640), + define_vanilla_lvl_geo(bits_geo_000658), + define_vanilla_lvl_geo(bits_geo_000670), + define_vanilla_lvl_geo(bits_geo_000688), + define_vanilla_lvl_geo(bits_geo_0006A0), + define_vanilla_lvl_geo(bits_geo_0006B8), + define_vanilla_lvl_geo(bits_geo_0006D0), + define_vanilla_lvl_geo(bits_geo_0006E8), + define_vanilla_lvl_geo(bits_geo_000700), + define_vanilla_lvl_geo(bits_geo_000718), + define_vanilla_lvl_geo(bob_geo_000440), + define_vanilla_lvl_geo(bob_geo_000458), + define_vanilla_lvl_geo(bob_geo_000470), + define_vanilla_lvl_geo(bob_geo_000488), + define_vanilla_lvl_geo(bowser_2_geo_000170), + define_vanilla_lvl_geo(bowser_2_geo_000188), + define_vanilla_lvl_geo(bowser_3_geo_000290), + define_vanilla_lvl_geo(bowser_3_geo_0002A8), + define_vanilla_lvl_geo(bowser_3_geo_0002C0), + define_vanilla_lvl_geo(bowser_3_geo_0002D8), + define_vanilla_lvl_geo(bowser_3_geo_0002F0), + define_vanilla_lvl_geo(bowser_3_geo_000308), + define_vanilla_lvl_geo(bowser_3_geo_000320), + define_vanilla_lvl_geo(bowser_3_geo_000338), + define_vanilla_lvl_geo(bowser_3_geo_000350), + define_vanilla_lvl_geo(bowser_3_geo_000368), + define_vanilla_lvl_geo(bowser_3_geo_000380), + define_vanilla_lvl_geo(bowser_3_geo_000398), + define_vanilla_lvl_geo(castle_grounds_geo_000660), + define_vanilla_lvl_geo(castle_grounds_geo_0006F4), + define_vanilla_lvl_geo(castle_grounds_geo_00070C), + define_vanilla_lvl_geo(castle_grounds_geo_000724), + define_vanilla_lvl_geo(castle_grounds_geo_00073C), + define_vanilla_lvl_geo(castle_geo_000F00), + define_vanilla_lvl_geo(castle_geo_000F18), + define_vanilla_lvl_geo(castle_geo_000F30), + define_vanilla_lvl_geo(castle_geo_000F70), + define_vanilla_lvl_geo(castle_geo_000F88), + define_vanilla_lvl_geo(castle_geo_000FA8), + define_vanilla_lvl_geo(castle_geo_000FD0), + define_vanilla_lvl_geo(castle_geo_001000), + define_vanilla_lvl_geo(castle_geo_001038), + define_vanilla_lvl_geo(castle_geo_001088), + define_vanilla_lvl_geo(castle_geo_0010C8), + define_vanilla_lvl_geo(castle_geo_001110), + define_vanilla_lvl_geo(castle_geo_001158), + define_vanilla_lvl_geo(castle_geo_0011A8), + define_vanilla_lvl_geo(castle_geo_001200), + define_vanilla_lvl_geo(castle_geo_001260), + define_vanilla_lvl_geo(castle_geo_0012C8), + define_vanilla_lvl_geo(castle_geo_001348), + define_vanilla_lvl_geo(castle_geo_0013B8), + define_vanilla_lvl_geo(castle_geo_001400), + define_vanilla_lvl_geo(castle_geo_001518), + define_vanilla_lvl_geo(castle_geo_001530), + define_vanilla_lvl_geo(castle_geo_001548), + define_vanilla_lvl_geo(castle_geo_001560), + define_vanilla_lvl_geo(castle_geo_001578), + define_vanilla_lvl_geo(castle_geo_0015B8), + define_vanilla_lvl_geo(castle_geo_0015F8), + define_vanilla_lvl_geo(castle_geo_001628), + define_vanilla_lvl_geo(castle_geo_001668), + define_vanilla_lvl_geo(castle_geo_001690), + define_vanilla_lvl_geo(castle_geo_0016D8), + define_vanilla_lvl_geo(castle_geo_001740), + define_vanilla_lvl_geo(castle_geo_001798), + define_vanilla_lvl_geo(castle_geo_001800), + define_vanilla_lvl_geo(castle_geo_001858), + define_vanilla_lvl_geo(castle_geo_001940), + define_vanilla_lvl_geo(castle_geo_001958), + define_vanilla_lvl_geo(castle_geo_001980), + define_vanilla_lvl_geo(castle_geo_0019C8), + define_vanilla_lvl_geo(castle_geo_0019F8), + define_vanilla_lvl_geo(castle_geo_001A30), + define_vanilla_lvl_geo(castle_geo_001A58), + define_vanilla_lvl_geo(castle_geo_001AB8), + define_vanilla_lvl_geo(castle_geo_001AF8), + define_vanilla_lvl_geo(castle_geo_001B48), + define_vanilla_lvl_geo(castle_geo_001BB0), + define_vanilla_lvl_geo(castle_geo_001C10), + define_vanilla_lvl_geo(ccm_geo_0003D0), + define_vanilla_lvl_geo(ccm_geo_0003F0), + define_vanilla_lvl_geo(ccm_geo_00040C), + define_vanilla_lvl_geo(ccm_geo_00042C), + define_vanilla_lvl_geo(ccm_geo_00045C), + define_vanilla_lvl_geo(ccm_geo_000494), + define_vanilla_lvl_geo(ccm_geo_0004BC), + define_vanilla_lvl_geo(ccm_geo_0004E4), + define_vanilla_lvl_geo(ccm_geo_00051C), + define_vanilla_lvl_geo(ccm_geo_0005E8), + define_vanilla_lvl_geo(ddd_geo_000450), + define_vanilla_lvl_geo(ddd_geo_000478), + define_vanilla_lvl_geo(ddd_geo_0004A0), + define_vanilla_lvl_geo(ddd_geo_0004C0), + define_vanilla_lvl_geo(ddd_geo_000570), + define_vanilla_lvl_geo(hmc_geo_000530), + define_vanilla_lvl_geo(hmc_geo_000548), + define_vanilla_lvl_geo(hmc_geo_000570), + define_vanilla_lvl_geo(hmc_geo_000588), + define_vanilla_lvl_geo(hmc_geo_0005A0), + define_vanilla_lvl_geo(hmc_geo_0005B8), + define_vanilla_lvl_geo(hmc_geo_0005D0), + define_vanilla_lvl_geo(hmc_geo_0005E8), + define_vanilla_lvl_geo(hmc_geo_000618), + define_vanilla_lvl_geo(hmc_geo_000658), + define_vanilla_lvl_geo(hmc_geo_0006A8), + define_vanilla_lvl_geo(hmc_geo_0006E0), + define_vanilla_lvl_geo(hmc_geo_000700), + define_vanilla_lvl_geo(hmc_geo_000748), + define_vanilla_lvl_geo(hmc_geo_000770), + define_vanilla_lvl_geo(hmc_geo_000798), + define_vanilla_lvl_geo(hmc_geo_0007F8), + define_vanilla_lvl_geo(hmc_geo_000850), + define_vanilla_lvl_geo(hmc_geo_0008D0), + define_vanilla_lvl_geo(hmc_geo_000938), + define_vanilla_lvl_geo(hmc_geo_000998), + define_vanilla_lvl_geo(hmc_geo_000A18), + define_vanilla_lvl_geo(hmc_geo_000A88), + define_vanilla_lvl_geo(hmc_geo_000AE8), + define_vanilla_lvl_geo(hmc_geo_000B48), + define_vanilla_lvl_geo(hmc_geo_000B90), + define_vanilla_lvl_geo(jrb_geo_000900), + define_vanilla_lvl_geo(jrb_geo_000918), + define_vanilla_lvl_geo(jrb_geo_000930), + define_vanilla_lvl_geo(jrb_geo_000948), + define_vanilla_lvl_geo(jrb_geo_000960), + define_vanilla_lvl_geo(jrb_geo_000978), + define_vanilla_lvl_geo(jrb_geo_000990), + define_vanilla_lvl_geo(jrb_geo_0009B0), + define_vanilla_lvl_geo(jrb_geo_0009C8), + define_vanilla_lvl_geo(jrb_geo_0009E8), + define_vanilla_lvl_geo(jrb_geo_000A00), + define_vanilla_lvl_geo(jrb_geo_000A18), + define_vanilla_lvl_geo(jrb_geo_000AFC), + define_vanilla_lvl_geo(lll_geo_0009E0), + define_vanilla_lvl_geo(lll_geo_0009F8), + define_vanilla_lvl_geo(lll_geo_000A10), + define_vanilla_lvl_geo(lll_geo_000A28), + define_vanilla_lvl_geo(lll_geo_000A40), + define_vanilla_lvl_geo(lll_geo_000A60), + define_vanilla_lvl_geo(lll_geo_000A78), + define_vanilla_lvl_geo(lll_geo_000A90), + define_vanilla_lvl_geo(lll_geo_000AA8), + define_vanilla_lvl_geo(lll_geo_000AC0), + define_vanilla_lvl_geo(lll_geo_000AD8), + define_vanilla_lvl_geo(lll_geo_000AF0), + define_vanilla_lvl_geo(lll_geo_000B08), + define_vanilla_lvl_geo(lll_geo_000B20), + define_vanilla_lvl_geo(lll_geo_000B38), + define_vanilla_lvl_geo(lll_geo_000B50), + define_vanilla_lvl_geo(lll_geo_000B68), + define_vanilla_lvl_geo(lll_geo_000B80), + define_vanilla_lvl_geo(lll_geo_000B98), + define_vanilla_lvl_geo(lll_geo_000BB0), + define_vanilla_lvl_geo(lll_geo_000BC8), + define_vanilla_lvl_geo(lll_geo_000BE0), + define_vanilla_lvl_geo(lll_geo_000BF8), + define_vanilla_lvl_geo(lll_geo_000C10), + define_vanilla_lvl_geo(lll_geo_000C30), + define_vanilla_lvl_geo(lll_geo_000C50), + define_vanilla_lvl_geo(lll_geo_000C70), + define_vanilla_lvl_geo(lll_geo_000C90), + define_vanilla_lvl_geo(lll_geo_000CB0), + define_vanilla_lvl_geo(lll_geo_000CD0), + define_vanilla_lvl_geo(lll_geo_000CF0), + define_vanilla_lvl_geo(lll_geo_000D10), + define_vanilla_lvl_geo(lll_geo_000D30), + define_vanilla_lvl_geo(lll_geo_000D50), + define_vanilla_lvl_geo(lll_geo_000D70), + define_vanilla_lvl_geo(lll_geo_000D90), + define_vanilla_lvl_geo(lll_geo_000DB0), + define_vanilla_lvl_geo(lll_geo_000DD0), + define_vanilla_lvl_geo(lll_geo_000DE8), + define_vanilla_lvl_geo(lll_geo_000E00), + define_vanilla_lvl_geo(lll_geo_000EA8), + define_vanilla_lvl_geo(lll_geo_000EC0), + define_vanilla_lvl_geo(rr_geo_000660), + define_vanilla_lvl_geo(rr_geo_000678), + define_vanilla_lvl_geo(rr_geo_000690), + define_vanilla_lvl_geo(rr_geo_0006A8), + define_vanilla_lvl_geo(rr_geo_0006C0), + define_vanilla_lvl_geo(rr_geo_0006D8), + define_vanilla_lvl_geo(rr_geo_0006F0), + define_vanilla_lvl_geo(rr_geo_000708), + define_vanilla_lvl_geo(rr_geo_000720), + define_vanilla_lvl_geo(rr_geo_000738), + define_vanilla_lvl_geo(rr_geo_000758), + define_vanilla_lvl_geo(rr_geo_000770), + define_vanilla_lvl_geo(rr_geo_000788), + define_vanilla_lvl_geo(rr_geo_0007A0), + define_vanilla_lvl_geo(rr_geo_0007B8), + define_vanilla_lvl_geo(rr_geo_0007D0), + define_vanilla_lvl_geo(rr_geo_0007E8), + define_vanilla_lvl_geo(rr_geo_000800), + define_vanilla_lvl_geo(rr_geo_000818), + define_vanilla_lvl_geo(rr_geo_000830), + define_vanilla_lvl_geo(rr_geo_000848), + define_vanilla_lvl_geo(rr_geo_000860), + define_vanilla_lvl_geo(rr_geo_000878), + define_vanilla_lvl_geo(rr_geo_000890), + define_vanilla_lvl_geo(rr_geo_0008A8), + define_vanilla_lvl_geo(rr_geo_0008C0), + define_vanilla_lvl_geo(rr_geo_0008D8), + define_vanilla_lvl_geo(rr_geo_0008F0), + define_vanilla_lvl_geo(rr_geo_000908), + define_vanilla_lvl_geo(rr_geo_000920), + define_vanilla_lvl_geo(rr_geo_000940), + define_vanilla_lvl_geo(rr_geo_000958), + define_vanilla_lvl_geo(rr_geo_000970), + define_vanilla_lvl_geo(rr_geo_000988), + define_vanilla_lvl_geo(rr_geo_0009A0), + define_vanilla_lvl_geo(rr_geo_0009B8), + define_vanilla_lvl_geo(rr_geo_0009D0), + define_vanilla_lvl_geo(sl_geo_000360), + define_vanilla_lvl_geo(sl_geo_000378), + define_vanilla_lvl_geo(sl_geo_000390), + define_vanilla_lvl_geo(sl_geo_0003A8), + define_vanilla_lvl_geo(sl_geo_000484), + define_vanilla_lvl_geo(ssl_geo_0005C0), + define_vanilla_lvl_geo(ssl_geo_0005D8), + define_vanilla_lvl_geo(ssl_geo_000618), + define_vanilla_lvl_geo(ssl_geo_000630), + define_vanilla_lvl_geo(ssl_geo_000648), + define_vanilla_lvl_geo(ssl_geo_000734), + define_vanilla_lvl_geo(ssl_geo_000764), + define_vanilla_lvl_geo(ssl_geo_000794), + define_vanilla_lvl_geo(ssl_geo_0007AC), + define_vanilla_lvl_geo(ssl_geo_0007CC), + define_vanilla_lvl_geo(ssl_geo_00088C), + define_vanilla_lvl_geo(thi_geo_0005B0), + define_vanilla_lvl_geo(thi_geo_0005C8), + define_vanilla_lvl_geo(thi_geo_0005F0), + define_vanilla_lvl_geo(thi_geo_000608), + define_vanilla_lvl_geo(thi_geo_0006D4), + define_vanilla_lvl_geo(thi_geo_00079C), + define_vanilla_lvl_geo(ttc_geo_000240), + define_vanilla_lvl_geo(ttc_geo_000258), + define_vanilla_lvl_geo(ttc_geo_000270), + define_vanilla_lvl_geo(ttc_geo_000288), + define_vanilla_lvl_geo(ttc_geo_0002A8), + define_vanilla_lvl_geo(ttc_geo_0002C8), + define_vanilla_lvl_geo(ttc_geo_0002E0), + define_vanilla_lvl_geo(ttc_geo_0002F8), + define_vanilla_lvl_geo(ttc_geo_000310), + define_vanilla_lvl_geo(ttc_geo_000328), + define_vanilla_lvl_geo(ttc_geo_000340), + define_vanilla_lvl_geo(ttc_geo_000358), + define_vanilla_lvl_geo(ttc_geo_000370), + define_vanilla_lvl_geo(ttc_geo_000388), + define_vanilla_lvl_geo(ttc_geo_0003A0), + define_vanilla_lvl_geo(ttc_geo_0003B8), + define_vanilla_lvl_geo(ttm_geo_000710), + define_vanilla_lvl_geo(ttm_geo_000730), + define_vanilla_lvl_geo(ttm_geo_000748), + define_vanilla_lvl_geo(ttm_geo_000778), + define_vanilla_lvl_geo(ttm_geo_0007A8), + define_vanilla_lvl_geo(ttm_geo_0007D8), + define_vanilla_lvl_geo(ttm_geo_000808), + define_vanilla_lvl_geo(ttm_geo_000830), + define_vanilla_lvl_geo(ttm_geo_000858), + define_vanilla_lvl_geo(ttm_geo_000880), + define_vanilla_lvl_geo(ttm_geo_0008A8), + define_vanilla_lvl_geo(ttm_geo_0008D0), + define_vanilla_lvl_geo(ttm_geo_0008F8), + define_vanilla_lvl_geo(ttm_geo_000920), + define_vanilla_lvl_geo(ttm_geo_000948), + define_vanilla_lvl_geo(ttm_geo_000970), + define_vanilla_lvl_geo(ttm_geo_000990), + define_vanilla_lvl_geo(ttm_geo_0009C0), + define_vanilla_lvl_geo(ttm_geo_0009F0), + define_vanilla_lvl_geo(ttm_geo_000A18), + define_vanilla_lvl_geo(ttm_geo_000A40), + define_vanilla_lvl_geo(ttm_geo_000A70), + define_vanilla_lvl_geo(ttm_geo_000B5C), + define_vanilla_lvl_geo(ttm_geo_000BEC), + define_vanilla_lvl_geo(ttm_geo_000C84), + define_vanilla_lvl_geo(ttm_geo_000D14), + define_vanilla_lvl_geo(ttm_geo_000D4C), + define_vanilla_lvl_geo(ttm_geo_000D84), + define_vanilla_lvl_geo(ttm_geo_000DBC), + define_vanilla_lvl_geo(ttm_geo_000DF4), + define_vanilla_lvl_geo(wdw_geo_000580), + define_vanilla_lvl_geo(wdw_geo_000598), + define_vanilla_lvl_geo(wdw_geo_0005C0), + define_vanilla_lvl_geo(wdw_geo_0005E8), + define_vanilla_lvl_geo(wdw_geo_000610), + define_vanilla_lvl_geo(wdw_geo_000628), + define_vanilla_lvl_geo(wdw_geo_000640), + define_vanilla_lvl_geo(wdw_geo_000658), + define_vanilla_lvl_geo(wdw_geo_000724), + define_vanilla_lvl_geo(wf_geo_0007E0), + define_vanilla_lvl_geo(wf_geo_000820), + define_vanilla_lvl_geo(wf_geo_000860), + define_vanilla_lvl_geo(wf_geo_000878), + define_vanilla_lvl_geo(wf_geo_000890), + define_vanilla_lvl_geo(wf_geo_0008A8), + define_vanilla_lvl_geo(wf_geo_0008E8), + define_vanilla_lvl_geo(wf_geo_000900), + define_vanilla_lvl_geo(wf_geo_000940), + define_vanilla_lvl_geo(wf_geo_000958), + define_vanilla_lvl_geo(wf_geo_0009A0), + define_vanilla_lvl_geo(wf_geo_0009B8), + define_vanilla_lvl_geo(wf_geo_0009D0), + define_vanilla_lvl_geo(wf_geo_0009E8), + define_vanilla_lvl_geo(wf_geo_000A00), + define_vanilla_lvl_geo(wf_geo_000A40), + define_vanilla_lvl_geo(wf_geo_000A58), + define_vanilla_lvl_geo(wf_geo_000A98), + define_vanilla_lvl_geo(wf_geo_000AB0), + define_vanilla_lvl_geo(wf_geo_000AC8), + define_vanilla_lvl_geo(wf_geo_000AE0), + define_vanilla_lvl_geo(wf_geo_000AF8), + define_vanilla_lvl_geo(wf_geo_000B10), + define_vanilla_lvl_geo(wf_geo_000B38), + define_vanilla_lvl_geo(wf_geo_000B60), + define_vanilla_lvl_geo(wf_geo_000B78), + define_vanilla_lvl_geo(wf_geo_000B90), + define_vanilla_lvl_geo(wf_geo_000BA8), + define_vanilla_lvl_geo(wf_geo_000BC8), + define_vanilla_lvl_geo(wf_geo_000BE0), + define_vanilla_lvl_geo(wf_geo_000BF8), +}; + +const GeoLayout* DynOS_Mgr_VanillaLvlGeo_GetFromName(const char* aDataName) { + MGR_FIND_DATA(sDynosVanillaLvlGeos, (const GeoLayout*)); +} + +const char* DynOS_Mgr_VanillaLvlGeo_GetFromData(const GeoLayout* aData) { + MGR_FIND_NAME(sDynosVanillaLvlGeos); +} + + ////////////// + // Textures // +////////////// + +#define define_vanilla_tex(tex) (const void*) #tex, (const void*) tex +static const void* sDynosVanillaTexs[] = { + define_vanilla_tex(cave_09000000), + define_vanilla_tex(cave_09001000), + define_vanilla_tex(cave_09001800), + define_vanilla_tex(cave_09002800), + define_vanilla_tex(cave_09003000), + define_vanilla_tex(cave_09003800), + define_vanilla_tex(cave_09004800), + define_vanilla_tex(cave_09005800), + define_vanilla_tex(cave_09006800), + define_vanilla_tex(cave_09007000), + define_vanilla_tex(cave_09007800), + define_vanilla_tex(cave_09008800), + define_vanilla_tex(cave_09009800), + define_vanilla_tex(cave_0900A000), + define_vanilla_tex(cave_0900A800), + define_vanilla_tex(cave_0900B800), + define_vanilla_tex(cave_0900C000), + define_vanilla_tex(fire_09000000), + define_vanilla_tex(fire_09000800), + define_vanilla_tex(fire_09001000), + define_vanilla_tex(fire_09001800), + define_vanilla_tex(fire_09002000), + define_vanilla_tex(fire_09002800), + define_vanilla_tex(fire_09003000), + define_vanilla_tex(fire_09003800), + define_vanilla_tex(fire_09004000), + define_vanilla_tex(fire_09004800), + define_vanilla_tex(fire_09005000), + define_vanilla_tex(fire_09005800), + define_vanilla_tex(fire_09006000), + define_vanilla_tex(fire_09006800), + define_vanilla_tex(fire_09007000), + define_vanilla_tex(fire_09007800), + define_vanilla_tex(fire_09008000), + define_vanilla_tex(fire_09008800), + define_vanilla_tex(fire_09009000), + define_vanilla_tex(fire_09009800), + define_vanilla_tex(fire_0900A000), + define_vanilla_tex(fire_0900A800), + define_vanilla_tex(fire_0900B000), + define_vanilla_tex(fire_0900B800), + define_vanilla_tex(generic_09000000), + define_vanilla_tex(generic_09000800), + define_vanilla_tex(generic_09001000), + define_vanilla_tex(generic_09001800), + define_vanilla_tex(generic_09002000), + define_vanilla_tex(generic_09002800), + define_vanilla_tex(generic_09003000), + define_vanilla_tex(generic_09003800), + define_vanilla_tex(generic_09004000), + define_vanilla_tex(generic_09004800), + define_vanilla_tex(generic_09005000), + define_vanilla_tex(generic_09005800), + define_vanilla_tex(generic_09006000), + define_vanilla_tex(generic_09007000), + define_vanilla_tex(generic_09007800), + define_vanilla_tex(generic_09008000), + define_vanilla_tex(generic_09008800), + define_vanilla_tex(generic_09009000), + define_vanilla_tex(generic_09009800), + define_vanilla_tex(generic_0900A000), + define_vanilla_tex(generic_0900A800), + define_vanilla_tex(generic_0900B000), + define_vanilla_tex(grass_09000000), + define_vanilla_tex(grass_09000800), + define_vanilla_tex(grass_09001000), + define_vanilla_tex(grass_09001800), + define_vanilla_tex(grass_09002000), + define_vanilla_tex(grass_09002800), + define_vanilla_tex(grass_09003000), + define_vanilla_tex(grass_09003800), + define_vanilla_tex(grass_09004000), + define_vanilla_tex(grass_09004800), + define_vanilla_tex(grass_09005000), + define_vanilla_tex(grass_09005800), + define_vanilla_tex(grass_09006000), + define_vanilla_tex(grass_09006800), + define_vanilla_tex(grass_09007000), + define_vanilla_tex(grass_09007800), + define_vanilla_tex(grass_09008000), + define_vanilla_tex(grass_09008800), + define_vanilla_tex(grass_09009000), + define_vanilla_tex(grass_09009800), + define_vanilla_tex(grass_0900A000), + define_vanilla_tex(grass_0900A800), + define_vanilla_tex(grass_0900B000), + define_vanilla_tex(grass_0900B800), + define_vanilla_tex(inside_09000000), + define_vanilla_tex(inside_09001000), + define_vanilla_tex(inside_09002000), + define_vanilla_tex(inside_09003000), + define_vanilla_tex(inside_09003800), + define_vanilla_tex(inside_09004000), + define_vanilla_tex(inside_09004800), + define_vanilla_tex(inside_09005000), + define_vanilla_tex(inside_09005800), + define_vanilla_tex(inside_09006000), + define_vanilla_tex(inside_09007000), + define_vanilla_tex(inside_09008000), + define_vanilla_tex(inside_09008800), + define_vanilla_tex(inside_09009000), + define_vanilla_tex(inside_0900A000), + define_vanilla_tex(inside_0900B000), + define_vanilla_tex(inside_0900B800), + define_vanilla_tex(machine_09000000), + define_vanilla_tex(machine_09000800), + define_vanilla_tex(machine_09001000), + define_vanilla_tex(machine_09001800), + define_vanilla_tex(machine_09002000), + define_vanilla_tex(machine_09002800), + define_vanilla_tex(machine_09003000), + define_vanilla_tex(machine_09003800), + define_vanilla_tex(machine_09004000), + define_vanilla_tex(machine_09005000), + define_vanilla_tex(machine_09005800), + define_vanilla_tex(machine_09006000), + define_vanilla_tex(machine_09006800), + define_vanilla_tex(machine_09007000), + define_vanilla_tex(machine_09007800), + define_vanilla_tex(machine_09008000), + define_vanilla_tex(machine_09008400), + define_vanilla_tex(mountain_09000000), + define_vanilla_tex(mountain_09000800), + define_vanilla_tex(mountain_09001800), + define_vanilla_tex(mountain_09002800), + define_vanilla_tex(mountain_09003000), + define_vanilla_tex(mountain_09003800), + define_vanilla_tex(mountain_09004000), + define_vanilla_tex(mountain_09004800), + define_vanilla_tex(mountain_09005000), + define_vanilla_tex(mountain_09005800), + define_vanilla_tex(mountain_09006800), + define_vanilla_tex(mountain_09007000), + define_vanilla_tex(mountain_09007800), + define_vanilla_tex(mountain_09008000), + define_vanilla_tex(mountain_09008800), + define_vanilla_tex(mountain_09009800), + define_vanilla_tex(mountain_0900A000), + define_vanilla_tex(mountain_0900A800), + define_vanilla_tex(mountain_0900B000), + define_vanilla_tex(mountain_0900B800), + define_vanilla_tex(mountain_0900C000), + define_vanilla_tex(outside_09000000), + define_vanilla_tex(outside_09000800), + define_vanilla_tex(outside_09001000), + define_vanilla_tex(outside_09002000), + define_vanilla_tex(outside_09003000), + define_vanilla_tex(outside_09003800), + define_vanilla_tex(outside_09004000), + define_vanilla_tex(outside_09004800), + define_vanilla_tex(outside_09005800), + define_vanilla_tex(outside_09006000), + define_vanilla_tex(outside_09006800), + define_vanilla_tex(outside_09007800), + define_vanilla_tex(outside_09008000), + define_vanilla_tex(outside_09008800), + define_vanilla_tex(outside_09009000), + define_vanilla_tex(outside_09009800), + define_vanilla_tex(outside_0900A000), + define_vanilla_tex(outside_0900A800), + define_vanilla_tex(outside_0900B000), + define_vanilla_tex(outside_0900B400), + define_vanilla_tex(outside_0900BC00), + define_vanilla_tex(sky_09000000), + define_vanilla_tex(sky_09000800), + define_vanilla_tex(sky_09001000), + define_vanilla_tex(sky_09001800), + define_vanilla_tex(sky_09002000), + define_vanilla_tex(sky_09003000), + define_vanilla_tex(sky_09003800), + define_vanilla_tex(sky_09004800), + define_vanilla_tex(sky_09005000), + define_vanilla_tex(sky_09005800), + define_vanilla_tex(sky_09006000), + define_vanilla_tex(texture_metal_hole), + define_vanilla_tex(sky_09007000), + define_vanilla_tex(sky_09007800), + define_vanilla_tex(sky_09008000), + define_vanilla_tex(snow_09000000), + define_vanilla_tex(snow_09000800), + define_vanilla_tex(snow_09001000), + define_vanilla_tex(snow_09002000), + define_vanilla_tex(snow_09002800), + define_vanilla_tex(snow_09003000), + define_vanilla_tex(snow_09003800), + define_vanilla_tex(snow_09004000), + define_vanilla_tex(snow_09004800), + define_vanilla_tex(snow_09005000), + define_vanilla_tex(snow_09005800), + define_vanilla_tex(snow_09006000), + define_vanilla_tex(snow_09006800), + define_vanilla_tex(snow_09007000), + define_vanilla_tex(snow_09008000), + define_vanilla_tex(snow_09008800), + define_vanilla_tex(snow_09009000), + define_vanilla_tex(snow_09009800), + define_vanilla_tex(spooky_09000000), + define_vanilla_tex(spooky_09000800), + define_vanilla_tex(spooky_09001800), + define_vanilla_tex(spooky_09002800), + define_vanilla_tex(spooky_09003800), + define_vanilla_tex(spooky_09004800), + define_vanilla_tex(spooky_09005000), + define_vanilla_tex(spooky_09006000), + define_vanilla_tex(spooky_09006800), + define_vanilla_tex(spooky_09007000), + define_vanilla_tex(spooky_09008000), + define_vanilla_tex(spooky_09008800), + define_vanilla_tex(spooky_09009000), + define_vanilla_tex(spooky_0900A000), + define_vanilla_tex(spooky_0900A800), + define_vanilla_tex(spooky_0900B000), + define_vanilla_tex(spooky_0900B800), + define_vanilla_tex(water_09000000), + define_vanilla_tex(water_09000800), + define_vanilla_tex(water_09001800), + define_vanilla_tex(water_09002800), + define_vanilla_tex(water_09003800), + define_vanilla_tex(water_09004800), + define_vanilla_tex(water_09005800), + define_vanilla_tex(water_09006000), + define_vanilla_tex(water_09006800), + define_vanilla_tex(water_09007800), + define_vanilla_tex(water_09008800), + define_vanilla_tex(water_09009000), + define_vanilla_tex(water_0900A000), + define_vanilla_tex(water_0900A800), + define_vanilla_tex(water_0900B800), +}; + +const Texture* DynOS_Mgr_VanillaTex_GetFromName(const char* aDataName) { + MGR_FIND_DATA(sDynosVanillaTexs, (const Texture*)); +} + +const char* DynOS_Mgr_VanillaTex_GetFromData(const Texture* aData) { + MGR_FIND_NAME(sDynosVanillaTexs); +} diff --git a/data/dynos_misc.cpp b/data/dynos_misc.cpp index 0e0f8db5..cecefcdc 100644 --- a/data/dynos_misc.cpp +++ b/data/dynos_misc.cpp @@ -39,31 +39,10 @@ extern "C" { #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" -#include "levels/bits/header.h" -#include "levels/bob/header.h" -#include "levels/bowser_2/header.h" -#include "levels/bowser_3/header.h" -#include "levels/castle_grounds/header.h" -#include "levels/castle_inside/header.h" -#include "levels/ccm/header.h" -#include "levels/ddd/header.h" -#include "levels/hmc/header.h" -#include "levels/jrb/header.h" -#include "levels/lll/header.h" -#include "levels/rr/header.h" -#include "levels/sl/header.h" -#include "levels/ssl/header.h" -#include "levels/thi/header.h" -#include "levels/ttc/header.h" -#include "levels/ttm/header.h" -#include "levels/wdw/header.h" -#include "levels/wf/header.h" } +static Array> sDynosCustomLevelScripts; + // // String // @@ -425,6 +404,16 @@ const void *DynOS_Geo_GetActorLayout(s32 aIndex) { } const void *DynOS_Geo_GetActorLayoutFromName(const char *aActorName) { + // check levels + for (auto& lvl : sDynosCustomLevelScripts) { + 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); @@ -632,484 +621,6 @@ Collision* DynOS_Col_Get(const char* collisionName) { // Levels // //////////// -#define define_lvl_geo(geo) (const void *) #geo, (const void *) geo -static const void *sDynosLevelGeos[] = { - define_lvl_geo(geo_bbh_0005B0), - define_lvl_geo(geo_bbh_0005C8), - define_lvl_geo(geo_bbh_0005E0), - define_lvl_geo(geo_bbh_0005F8), - define_lvl_geo(geo_bbh_000610), - define_lvl_geo(geo_bbh_000628), - define_lvl_geo(geo_bbh_000640), - define_lvl_geo(geo_bbh_000658), - define_lvl_geo(geo_bbh_000670), - define_lvl_geo(geo_bbh_0006B0), - define_lvl_geo(geo_bbh_0006E8), - define_lvl_geo(geo_bbh_000730), - define_lvl_geo(geo_bbh_000750), - define_lvl_geo(geo_bbh_000768), - define_lvl_geo(geo_bbh_0007B0), - define_lvl_geo(geo_bbh_0007D0), - define_lvl_geo(geo_bbh_000800), - define_lvl_geo(geo_bbh_000828), - define_lvl_geo(geo_bbh_000860), - define_lvl_geo(geo_bbh_000888), - define_lvl_geo(geo_bbh_0008B0), - define_lvl_geo(geo_bbh_0008E8), - define_lvl_geo(geo_bbh_000950), - define_lvl_geo(geo_bbh_0009C8), - define_lvl_geo(geo_bbh_000A18), - define_lvl_geo(geo_bbh_000A60), - define_lvl_geo(geo_bbh_000AD8), - define_lvl_geo(geo_bbh_000B28), - define_lvl_geo(geo_bbh_000B88), - define_lvl_geo(geo_bbh_000BF0), - define_lvl_geo(geo_bbh_000C38), - define_lvl_geo(geo_bbh_000C88), - define_lvl_geo(geo_bbh_000CE8), - define_lvl_geo(geo_bbh_000D20), - define_lvl_geo(geo_bbh_000D68), - define_lvl_geo(geo_bbh_000DB0), - define_lvl_geo(geo_bbh_000DF0), - define_lvl_geo(geo_bbh_000E40), - define_lvl_geo(geo_bbh_000E80), - define_lvl_geo(geo_bbh_000EB0), - define_lvl_geo(geo_bbh_000F00), - define_lvl_geo(geo_bitdw_0003C0), - define_lvl_geo(geo_bitdw_0003D8), - define_lvl_geo(geo_bitdw_0003F0), - define_lvl_geo(geo_bitdw_000408), - define_lvl_geo(geo_bitdw_000420), - define_lvl_geo(geo_bitdw_000438), - define_lvl_geo(geo_bitdw_000450), - define_lvl_geo(geo_bitdw_000468), - define_lvl_geo(geo_bitdw_000480), - define_lvl_geo(geo_bitdw_000498), - define_lvl_geo(geo_bitdw_0004B0), - define_lvl_geo(geo_bitdw_0004C8), - define_lvl_geo(geo_bitdw_0004E0), - define_lvl_geo(geo_bitdw_0004F8), - define_lvl_geo(geo_bitdw_000510), - define_lvl_geo(geo_bitdw_000528), - define_lvl_geo(geo_bitdw_000540), - define_lvl_geo(geo_bitdw_000558), - define_lvl_geo(geo_bitdw_000570), - define_lvl_geo(geo_bitdw_000588), - define_lvl_geo(geo_bitdw_0005A0), - define_lvl_geo(geo_bitdw_0005B8), - define_lvl_geo(geo_bitdw_0005D0), - define_lvl_geo(geo_bitdw_0005E8), - define_lvl_geo(geo_bitdw_000600), - define_lvl_geo(geo_bitdw_000618), - define_lvl_geo(bitfs_geo_0004B0), - define_lvl_geo(bitfs_geo_0004C8), - define_lvl_geo(bitfs_geo_0004E0), - define_lvl_geo(bitfs_geo_0004F8), - define_lvl_geo(bitfs_geo_000510), - define_lvl_geo(bitfs_geo_000528), - define_lvl_geo(bitfs_geo_000540), - define_lvl_geo(bitfs_geo_000558), - define_lvl_geo(bitfs_geo_000570), - define_lvl_geo(bitfs_geo_000588), - define_lvl_geo(bitfs_geo_0005A0), - define_lvl_geo(bitfs_geo_0005B8), - define_lvl_geo(bitfs_geo_0005D0), - define_lvl_geo(bitfs_geo_0005E8), - define_lvl_geo(bitfs_geo_000600), - define_lvl_geo(bitfs_geo_000618), - define_lvl_geo(bitfs_geo_000630), - define_lvl_geo(bitfs_geo_000648), - define_lvl_geo(bitfs_geo_000660), - define_lvl_geo(bitfs_geo_000678), - define_lvl_geo(bitfs_geo_000690), - define_lvl_geo(bitfs_geo_0006A8), - define_lvl_geo(bitfs_geo_0006C0), - define_lvl_geo(bitfs_geo_0006D8), - define_lvl_geo(bitfs_geo_0006F0), - define_lvl_geo(bitfs_geo_000708), - define_lvl_geo(bitfs_geo_000728), - define_lvl_geo(bitfs_geo_000740), - define_lvl_geo(bitfs_geo_000758), - define_lvl_geo(bitfs_geo_000770), - define_lvl_geo(bitfs_geo_000788), - define_lvl_geo(bitfs_geo_0007A0), - define_lvl_geo(bits_geo_000430), - define_lvl_geo(bits_geo_000448), - define_lvl_geo(bits_geo_000460), - define_lvl_geo(bits_geo_000478), - define_lvl_geo(bits_geo_000490), - define_lvl_geo(bits_geo_0004A8), - define_lvl_geo(bits_geo_0004C0), - define_lvl_geo(bits_geo_0004D8), - define_lvl_geo(bits_geo_0004F0), - define_lvl_geo(bits_geo_000508), - define_lvl_geo(bits_geo_000520), - define_lvl_geo(bits_geo_000538), - define_lvl_geo(bits_geo_000550), - define_lvl_geo(bits_geo_000568), - define_lvl_geo(bits_geo_000580), - define_lvl_geo(bits_geo_000598), - define_lvl_geo(bits_geo_0005B0), - define_lvl_geo(bits_geo_0005C8), - define_lvl_geo(bits_geo_0005E0), - define_lvl_geo(bits_geo_0005F8), - define_lvl_geo(bits_geo_000610), - define_lvl_geo(bits_geo_000628), - define_lvl_geo(bits_geo_000640), - define_lvl_geo(bits_geo_000658), - define_lvl_geo(bits_geo_000670), - define_lvl_geo(bits_geo_000688), - define_lvl_geo(bits_geo_0006A0), - define_lvl_geo(bits_geo_0006B8), - define_lvl_geo(bits_geo_0006D0), - define_lvl_geo(bits_geo_0006E8), - define_lvl_geo(bits_geo_000700), - define_lvl_geo(bits_geo_000718), - define_lvl_geo(bob_geo_000440), - define_lvl_geo(bob_geo_000458), - define_lvl_geo(bob_geo_000470), - define_lvl_geo(bob_geo_000488), - define_lvl_geo(bowser_2_geo_000170), - define_lvl_geo(bowser_2_geo_000188), - define_lvl_geo(bowser_3_geo_000290), - define_lvl_geo(bowser_3_geo_0002A8), - define_lvl_geo(bowser_3_geo_0002C0), - define_lvl_geo(bowser_3_geo_0002D8), - define_lvl_geo(bowser_3_geo_0002F0), - define_lvl_geo(bowser_3_geo_000308), - define_lvl_geo(bowser_3_geo_000320), - define_lvl_geo(bowser_3_geo_000338), - define_lvl_geo(bowser_3_geo_000350), - define_lvl_geo(bowser_3_geo_000368), - define_lvl_geo(bowser_3_geo_000380), - define_lvl_geo(bowser_3_geo_000398), - define_lvl_geo(castle_grounds_geo_000660), - define_lvl_geo(castle_grounds_geo_0006F4), - define_lvl_geo(castle_grounds_geo_00070C), - define_lvl_geo(castle_grounds_geo_000724), - define_lvl_geo(castle_grounds_geo_00073C), - define_lvl_geo(castle_geo_000F00), - define_lvl_geo(castle_geo_000F18), - define_lvl_geo(castle_geo_000F30), - define_lvl_geo(castle_geo_000F70), - define_lvl_geo(castle_geo_000F88), - define_lvl_geo(castle_geo_000FA8), - define_lvl_geo(castle_geo_000FD0), - define_lvl_geo(castle_geo_001000), - define_lvl_geo(castle_geo_001038), - define_lvl_geo(castle_geo_001088), - define_lvl_geo(castle_geo_0010C8), - define_lvl_geo(castle_geo_001110), - define_lvl_geo(castle_geo_001158), - define_lvl_geo(castle_geo_0011A8), - define_lvl_geo(castle_geo_001200), - define_lvl_geo(castle_geo_001260), - define_lvl_geo(castle_geo_0012C8), - define_lvl_geo(castle_geo_001348), - define_lvl_geo(castle_geo_0013B8), - define_lvl_geo(castle_geo_001400), - define_lvl_geo(castle_geo_001518), - define_lvl_geo(castle_geo_001530), - define_lvl_geo(castle_geo_001548), - define_lvl_geo(castle_geo_001560), - define_lvl_geo(castle_geo_001578), - define_lvl_geo(castle_geo_0015B8), - define_lvl_geo(castle_geo_0015F8), - define_lvl_geo(castle_geo_001628), - define_lvl_geo(castle_geo_001668), - define_lvl_geo(castle_geo_001690), - define_lvl_geo(castle_geo_0016D8), - define_lvl_geo(castle_geo_001740), - define_lvl_geo(castle_geo_001798), - define_lvl_geo(castle_geo_001800), - define_lvl_geo(castle_geo_001858), - define_lvl_geo(castle_geo_001940), - define_lvl_geo(castle_geo_001958), - define_lvl_geo(castle_geo_001980), - define_lvl_geo(castle_geo_0019C8), - define_lvl_geo(castle_geo_0019F8), - define_lvl_geo(castle_geo_001A30), - define_lvl_geo(castle_geo_001A58), - define_lvl_geo(castle_geo_001AB8), - define_lvl_geo(castle_geo_001AF8), - define_lvl_geo(castle_geo_001B48), - define_lvl_geo(castle_geo_001BB0), - define_lvl_geo(castle_geo_001C10), - define_lvl_geo(ccm_geo_0003D0), - define_lvl_geo(ccm_geo_0003F0), - define_lvl_geo(ccm_geo_00040C), - define_lvl_geo(ccm_geo_00042C), - define_lvl_geo(ccm_geo_00045C), - define_lvl_geo(ccm_geo_000494), - define_lvl_geo(ccm_geo_0004BC), - define_lvl_geo(ccm_geo_0004E4), - define_lvl_geo(ccm_geo_00051C), - define_lvl_geo(ccm_geo_0005E8), - define_lvl_geo(ddd_geo_000450), - define_lvl_geo(ddd_geo_000478), - define_lvl_geo(ddd_geo_0004A0), - define_lvl_geo(ddd_geo_0004C0), - define_lvl_geo(ddd_geo_000570), - define_lvl_geo(hmc_geo_000530), - define_lvl_geo(hmc_geo_000548), - define_lvl_geo(hmc_geo_000570), - define_lvl_geo(hmc_geo_000588), - define_lvl_geo(hmc_geo_0005A0), - define_lvl_geo(hmc_geo_0005B8), - define_lvl_geo(hmc_geo_0005D0), - define_lvl_geo(hmc_geo_0005E8), - define_lvl_geo(hmc_geo_000618), - define_lvl_geo(hmc_geo_000658), - define_lvl_geo(hmc_geo_0006A8), - define_lvl_geo(hmc_geo_0006E0), - define_lvl_geo(hmc_geo_000700), - define_lvl_geo(hmc_geo_000748), - define_lvl_geo(hmc_geo_000770), - define_lvl_geo(hmc_geo_000798), - define_lvl_geo(hmc_geo_0007F8), - define_lvl_geo(hmc_geo_000850), - define_lvl_geo(hmc_geo_0008D0), - define_lvl_geo(hmc_geo_000938), - define_lvl_geo(hmc_geo_000998), - define_lvl_geo(hmc_geo_000A18), - define_lvl_geo(hmc_geo_000A88), - define_lvl_geo(hmc_geo_000AE8), - define_lvl_geo(hmc_geo_000B48), - define_lvl_geo(hmc_geo_000B90), - define_lvl_geo(jrb_geo_000900), - define_lvl_geo(jrb_geo_000918), - define_lvl_geo(jrb_geo_000930), - define_lvl_geo(jrb_geo_000948), - define_lvl_geo(jrb_geo_000960), - define_lvl_geo(jrb_geo_000978), - define_lvl_geo(jrb_geo_000990), - define_lvl_geo(jrb_geo_0009B0), - define_lvl_geo(jrb_geo_0009C8), - define_lvl_geo(jrb_geo_0009E8), - define_lvl_geo(jrb_geo_000A00), - define_lvl_geo(jrb_geo_000A18), - define_lvl_geo(jrb_geo_000AFC), - define_lvl_geo(lll_geo_0009E0), - define_lvl_geo(lll_geo_0009F8), - define_lvl_geo(lll_geo_000A10), - define_lvl_geo(lll_geo_000A28), - define_lvl_geo(lll_geo_000A40), - define_lvl_geo(lll_geo_000A60), - define_lvl_geo(lll_geo_000A78), - define_lvl_geo(lll_geo_000A90), - define_lvl_geo(lll_geo_000AA8), - define_lvl_geo(lll_geo_000AC0), - define_lvl_geo(lll_geo_000AD8), - define_lvl_geo(lll_geo_000AF0), - define_lvl_geo(lll_geo_000B08), - define_lvl_geo(lll_geo_000B20), - define_lvl_geo(lll_geo_000B38), - define_lvl_geo(lll_geo_000B50), - define_lvl_geo(lll_geo_000B68), - define_lvl_geo(lll_geo_000B80), - define_lvl_geo(lll_geo_000B98), - define_lvl_geo(lll_geo_000BB0), - define_lvl_geo(lll_geo_000BC8), - define_lvl_geo(lll_geo_000BE0), - define_lvl_geo(lll_geo_000BF8), - define_lvl_geo(lll_geo_000C10), - define_lvl_geo(lll_geo_000C30), - define_lvl_geo(lll_geo_000C50), - define_lvl_geo(lll_geo_000C70), - define_lvl_geo(lll_geo_000C90), - define_lvl_geo(lll_geo_000CB0), - define_lvl_geo(lll_geo_000CD0), - define_lvl_geo(lll_geo_000CF0), - define_lvl_geo(lll_geo_000D10), - define_lvl_geo(lll_geo_000D30), - define_lvl_geo(lll_geo_000D50), - define_lvl_geo(lll_geo_000D70), - define_lvl_geo(lll_geo_000D90), - define_lvl_geo(lll_geo_000DB0), - define_lvl_geo(lll_geo_000DD0), - define_lvl_geo(lll_geo_000DE8), - define_lvl_geo(lll_geo_000E00), - define_lvl_geo(lll_geo_000EA8), - define_lvl_geo(lll_geo_000EC0), - define_lvl_geo(rr_geo_000660), - define_lvl_geo(rr_geo_000678), - define_lvl_geo(rr_geo_000690), - define_lvl_geo(rr_geo_0006A8), - define_lvl_geo(rr_geo_0006C0), - define_lvl_geo(rr_geo_0006D8), - define_lvl_geo(rr_geo_0006F0), - define_lvl_geo(rr_geo_000708), - define_lvl_geo(rr_geo_000720), - define_lvl_geo(rr_geo_000738), - define_lvl_geo(rr_geo_000758), - define_lvl_geo(rr_geo_000770), - define_lvl_geo(rr_geo_000788), - define_lvl_geo(rr_geo_0007A0), - define_lvl_geo(rr_geo_0007B8), - define_lvl_geo(rr_geo_0007D0), - define_lvl_geo(rr_geo_0007E8), - define_lvl_geo(rr_geo_000800), - define_lvl_geo(rr_geo_000818), - define_lvl_geo(rr_geo_000830), - define_lvl_geo(rr_geo_000848), - define_lvl_geo(rr_geo_000860), - define_lvl_geo(rr_geo_000878), - define_lvl_geo(rr_geo_000890), - define_lvl_geo(rr_geo_0008A8), - define_lvl_geo(rr_geo_0008C0), - define_lvl_geo(rr_geo_0008D8), - define_lvl_geo(rr_geo_0008F0), - define_lvl_geo(rr_geo_000908), - define_lvl_geo(rr_geo_000920), - define_lvl_geo(rr_geo_000940), - define_lvl_geo(rr_geo_000958), - define_lvl_geo(rr_geo_000970), - define_lvl_geo(rr_geo_000988), - define_lvl_geo(rr_geo_0009A0), - define_lvl_geo(rr_geo_0009B8), - define_lvl_geo(rr_geo_0009D0), - define_lvl_geo(sl_geo_000360), - define_lvl_geo(sl_geo_000378), - define_lvl_geo(sl_geo_000390), - define_lvl_geo(sl_geo_0003A8), - define_lvl_geo(sl_geo_000484), - define_lvl_geo(ssl_geo_0005C0), - define_lvl_geo(ssl_geo_0005D8), - define_lvl_geo(ssl_geo_000618), - define_lvl_geo(ssl_geo_000630), - define_lvl_geo(ssl_geo_000648), - define_lvl_geo(ssl_geo_000734), - define_lvl_geo(ssl_geo_000764), - define_lvl_geo(ssl_geo_000794), - define_lvl_geo(ssl_geo_0007AC), - define_lvl_geo(ssl_geo_0007CC), - define_lvl_geo(ssl_geo_00088C), - define_lvl_geo(thi_geo_0005B0), - define_lvl_geo(thi_geo_0005C8), - define_lvl_geo(thi_geo_0005F0), - define_lvl_geo(thi_geo_000608), - define_lvl_geo(thi_geo_0006D4), - define_lvl_geo(thi_geo_00079C), - define_lvl_geo(ttc_geo_000240), - define_lvl_geo(ttc_geo_000258), - define_lvl_geo(ttc_geo_000270), - define_lvl_geo(ttc_geo_000288), - define_lvl_geo(ttc_geo_0002A8), - define_lvl_geo(ttc_geo_0002C8), - define_lvl_geo(ttc_geo_0002E0), - define_lvl_geo(ttc_geo_0002F8), - define_lvl_geo(ttc_geo_000310), - define_lvl_geo(ttc_geo_000328), - define_lvl_geo(ttc_geo_000340), - define_lvl_geo(ttc_geo_000358), - define_lvl_geo(ttc_geo_000370), - define_lvl_geo(ttc_geo_000388), - define_lvl_geo(ttc_geo_0003A0), - define_lvl_geo(ttc_geo_0003B8), - define_lvl_geo(ttm_geo_000710), - define_lvl_geo(ttm_geo_000730), - define_lvl_geo(ttm_geo_000748), - define_lvl_geo(ttm_geo_000778), - define_lvl_geo(ttm_geo_0007A8), - define_lvl_geo(ttm_geo_0007D8), - define_lvl_geo(ttm_geo_000808), - define_lvl_geo(ttm_geo_000830), - define_lvl_geo(ttm_geo_000858), - define_lvl_geo(ttm_geo_000880), - define_lvl_geo(ttm_geo_0008A8), - define_lvl_geo(ttm_geo_0008D0), - define_lvl_geo(ttm_geo_0008F8), - define_lvl_geo(ttm_geo_000920), - define_lvl_geo(ttm_geo_000948), - define_lvl_geo(ttm_geo_000970), - define_lvl_geo(ttm_geo_000990), - define_lvl_geo(ttm_geo_0009C0), - define_lvl_geo(ttm_geo_0009F0), - define_lvl_geo(ttm_geo_000A18), - define_lvl_geo(ttm_geo_000A40), - define_lvl_geo(ttm_geo_000A70), - define_lvl_geo(ttm_geo_000B5C), - define_lvl_geo(ttm_geo_000BEC), - define_lvl_geo(ttm_geo_000C84), - define_lvl_geo(ttm_geo_000D14), - define_lvl_geo(ttm_geo_000D4C), - define_lvl_geo(ttm_geo_000D84), - define_lvl_geo(ttm_geo_000DBC), - define_lvl_geo(ttm_geo_000DF4), - define_lvl_geo(wdw_geo_000580), - define_lvl_geo(wdw_geo_000598), - define_lvl_geo(wdw_geo_0005C0), - define_lvl_geo(wdw_geo_0005E8), - define_lvl_geo(wdw_geo_000610), - define_lvl_geo(wdw_geo_000628), - define_lvl_geo(wdw_geo_000640), - define_lvl_geo(wdw_geo_000658), - define_lvl_geo(wdw_geo_000724), - define_lvl_geo(wf_geo_0007E0), - define_lvl_geo(wf_geo_000820), - define_lvl_geo(wf_geo_000860), - define_lvl_geo(wf_geo_000878), - define_lvl_geo(wf_geo_000890), - define_lvl_geo(wf_geo_0008A8), - define_lvl_geo(wf_geo_0008E8), - define_lvl_geo(wf_geo_000900), - define_lvl_geo(wf_geo_000940), - define_lvl_geo(wf_geo_000958), - define_lvl_geo(wf_geo_0009A0), - define_lvl_geo(wf_geo_0009B8), - define_lvl_geo(wf_geo_0009D0), - define_lvl_geo(wf_geo_0009E8), - define_lvl_geo(wf_geo_000A00), - define_lvl_geo(wf_geo_000A40), - define_lvl_geo(wf_geo_000A58), - define_lvl_geo(wf_geo_000A98), - define_lvl_geo(wf_geo_000AB0), - define_lvl_geo(wf_geo_000AC8), - define_lvl_geo(wf_geo_000AE0), - define_lvl_geo(wf_geo_000AF8), - define_lvl_geo(wf_geo_000B10), - define_lvl_geo(wf_geo_000B38), - define_lvl_geo(wf_geo_000B60), - define_lvl_geo(wf_geo_000B78), - define_lvl_geo(wf_geo_000B90), - define_lvl_geo(wf_geo_000BA8), - define_lvl_geo(wf_geo_000BC8), - define_lvl_geo(wf_geo_000BE0), - define_lvl_geo(wf_geo_000BF8), -}; - -s32 DynOS_Lvl_GetGeoCount() { - return (s32) (sizeof(sDynosLevelGeos) / (2 * sizeof(sDynosLevelGeos[0]))); -} - -const char *DynOS_Lvl_GetGeoName(s32 aIndex) { - return (const char *) sDynosLevelGeos[2 * aIndex]; -} - -const void *DynOS_Lvl_GetGeoLayout(s32 aIndex) { - return (const void *) sDynosLevelGeos[2 * aIndex + 1]; -} - -const void *DynOS_Lvl_GetGeoLayoutFromName(const char *aGeoName) { - for (s32 i = 0; i < DynOS_Lvl_GetGeoCount(); ++i) { - if (!strcmp(DynOS_Lvl_GetGeoName(i), aGeoName)) { - return DynOS_Lvl_GetGeoLayout(i); - } - } - return NULL; -} - -s32 DynOS_Lvl_GetGeoIndex(const void *aGeoLayout) { - for (s32 i = 0; i < DynOS_Lvl_GetGeoCount(); ++i) { - if (DynOS_Lvl_GetGeoLayout(i) == aGeoLayout) { - return i; - } - } - return -1; -} - -static Array> sDynosCustomLevelScripts; - void DynOS_Lvl_Add(s32 modIndex, const SysPath &aPackFolder, const char *aLevelName) { // check for duplicates for (s32 i = 0; i < sDynosCustomLevelScripts.Count(); ++i) {