From 72c7ef7d26781f8db462a9f9e588e9f34195ebdd Mon Sep 17 00:00:00 2001 From: MysterD Date: Sun, 13 Mar 2022 21:22:26 -0700 Subject: [PATCH] Make DynOS generate a bin for every Geo Layout --- data/dynos_gfx_read.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/data/dynos_gfx_read.cpp b/data/dynos_gfx_read.cpp index f679a32f..0ef631f3 100644 --- a/data/dynos_gfx_read.cpp +++ b/data/dynos_gfx_read.cpp @@ -1813,8 +1813,13 @@ void DynOS_Gfx_GeneratePack(const SysPath &aPackFolder) { } // Generate a binary file for each actor found in the GfxData +#ifdef COOP + for (auto &_GeoNode : _GfxData->mGeoLayouts) { + String _GeoRootName = _GeoNode->mName; +#else for (s32 i = 0; i != DynOS_Geo_GetActorCount(); ++i) { String _GeoRootName = DynOS_Geo_GetActorName(i); +#endif DataNode *_GeoRoot = GetGeoLayout(_GfxData, _GeoRootName); if (_GeoRoot != NULL) { @@ -1852,8 +1857,13 @@ void DynOS_Gfx_GeneratePack(const SysPath &aPackFolder) { SysPath _AnimsFolder = fstring("%s/%s/anims", aPackFolder.c_str(), _ActorFolder.begin()); ScanAnimationFolder(_GfxData, _AnimsFolder); +#ifdef COOP + // Create table for player model animations + if ((_GeoRootName == "mario_geo" || _GeoRootName == "luigi_geo" || _GeoRootName == "toad_player_geo" || _GeoRootName == "wario_geo" || _GeoRootName == "waluigi_geo") && !_GfxData->mAnimations.Empty()) { +#else // Create table for mario_geo animations or luigi_geo animations if ((_GeoRootName == "mario_geo" || _GeoRootName == "luigi_geo") && !_GfxData->mAnimations.Empty()) { +#endif _GfxData->mAnimationTable.Resize(256); for (s32 i = 0; i != 256; ++i) { String _AnimName("anim_%02X", i);