refactor: image and obj data loading

This commit is contained in:
Jan
2024-09-24 12:01:42 +01:00
parent 5fee875495
commit 5cc52c42cd
97 changed files with 1784 additions and 1878 deletions

View File

@ -21,7 +21,7 @@ namespace
"lorem,ipsum");
Zone zone("MockZone", 0, &g_GameIW3);
MockAssetLoadingManager assetLoadingManager(&zone, &searchPath);
MockAssetLoadingManager assetLoadingManager(zone, searchPath);
AssetLoaderStringTable assetLoader;
MemoryManager memory;

View File

@ -22,7 +22,7 @@ namespace
"lorem,ipsum");
Zone zone("MockZone", 0, &g_GameIW4);
MockAssetLoadingManager assetLoadingManager(&zone, &searchPath);
MockAssetLoadingManager assetLoadingManager(zone, searchPath);
AssetLoaderStringTable assetLoader;
MemoryManager memory;

View File

@ -29,7 +29,7 @@ namespace test::game::iw4::menu::parsing::it
public:
MenuParsingItHelper()
: m_zone("MockZone", 0, &g_GameIW4),
m_manager(&m_zone, &m_search_path)
m_manager(m_zone, m_search_path)
{
}

View File

@ -21,7 +21,7 @@ namespace
"lorem,ipsum");
Zone zone("MockZone", 0, &g_GameIW5);
MockAssetLoadingManager assetLoadingManager(&zone, &searchPath);
MockAssetLoadingManager assetLoadingManager(zone, searchPath);
AssetLoaderStringTable assetLoader;
MemoryManager memory;

View File

@ -21,7 +21,7 @@ namespace
"lorem,ipsum");
Zone zone("MockZone", 0, &g_GameT5);
MockAssetLoadingManager assetLoadingManager(&zone, &searchPath);
MockAssetLoadingManager assetLoadingManager(zone, searchPath);
AssetLoaderStringTable assetLoader;
MemoryManager memory;

View File

@ -21,7 +21,7 @@ namespace
"lorem,ipsum");
Zone zone("MockZone", 0, &g_GameT6);
MockAssetLoadingManager assetLoadingManager(&zone, &searchPath);
MockAssetLoadingManager assetLoadingManager(zone, searchPath);
AssetLoaderStringTable assetLoader;
MemoryManager memory;

View File

@ -1,6 +1,6 @@
#include "MockAssetLoadingManager.h"
MockAssetLoadingManager::MockAssetLoadingManager(Zone* zone, ISearchPath* searchPath)
MockAssetLoadingManager::MockAssetLoadingManager(Zone& zone, ISearchPath& searchPath)
: m_zone(zone),
m_mock_gdt(std::make_unique<Gdt>()),
m_context(std::make_unique<AssetLoadingContext>(zone, searchPath, std::vector({m_mock_gdt.get()})))

View File

@ -7,14 +7,14 @@
class MockAssetLoadingManager final : public IAssetLoadingManager
{
Zone* m_zone;
Zone& m_zone;
std::unique_ptr<Gdt> m_mock_gdt;
std::unique_ptr<AssetLoadingContext> m_context;
std::map<std::string, std::unique_ptr<XAssetInfoGeneric>> m_added_assets;
std::multimap<std::string, std::unique_ptr<XAssetInfoGeneric>> m_available_dependencies;
public:
MockAssetLoadingManager(Zone* zone, ISearchPath* searchPath);
MockAssetLoadingManager(Zone& zone, ISearchPath& searchPath);
_NODISCARD AssetLoadingContext* GetAssetLoadingContext() const override;
XAssetInfoGeneric* AddAsset(std::unique_ptr<XAssetInfoGeneric> xAssetInfo) override;