refactor: introduce subasset loading

This commit is contained in:
Jan Laupetin
2026-02-05 18:17:15 +01:00
parent 1be411b371
commit aa47ffa629
255 changed files with 1668 additions and 3132 deletions
@@ -1,7 +1,5 @@
#include "MenuDumperIW5.h"
#include "Game/IW5/GameAssetPoolIW5.h"
#include "Game/IW5/Menu/MenuDumperIW5.h"
#include "MenuWriterIW5.h"
#include "ObjWriting.h"
@@ -18,8 +16,8 @@ namespace
const MenuList* GetParentMenuList(const XAssetInfo<menuDef_t>& asset)
{
const auto* menu = asset.Asset();
const auto* gameAssetPool = dynamic_cast<GameAssetPoolIW5*>(asset.m_zone->m_pools.get());
for (const auto* menuList : *gameAssetPool->m_menu_list)
auto zoneMenuListPool = asset.m_zone->m_pools.PoolAssets<AssetMenuList>();
for (const auto* menuList : zoneMenuListPool)
{
const auto* menuListAsset = menuList->Asset();
@@ -51,11 +49,6 @@ namespace
namespace menu
{
MenuDumperIW5::MenuDumperIW5(const AssetPool<AssetMenu::Type>& pool)
: AbstractAssetDumper(pool)
{
}
void MenuDumperIW5::DumpAsset(AssetDumpingContext& context, const XAssetInfo<AssetMenu::Type>& asset)
{
const auto* menu = asset.Asset();