2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-11-29 15:57:48 +00:00

chore: implement obj loading skeleton with localize asset

This commit is contained in:
Jan
2024-12-23 22:55:58 +01:00
parent 673db0592f
commit c524cb007a
64 changed files with 1238 additions and 1038 deletions

View File

@@ -3,29 +3,16 @@
#include "AssetLoading/IAssetLoader.h"
#include "IObjLoader.h"
#include "SearchPath/ISearchPath.h"
#include <memory>
#include <unordered_map>
#include "Zone/Zone.h"
namespace IW4
{
class ObjLoader final : public IObjLoader
{
public:
ObjLoader();
void LoadReferencedContainersForZone(ISearchPath& searchPath, Zone& zone) const override;
void UnloadContainersOfZone(Zone& zone) const override;
void ConfigureCreatorCollection(AssetCreatorCollection& collection) const override;
bool LoadAssetForZone(AssetLoadingContext& context, asset_type_t assetType, const std::string& assetName) const override;
void FinalizeAssetsForZone(AssetLoadingContext& context) const override;
private:
static bool IsMpZone(const Zone& zone);
static bool IsZmZone(const Zone& zone);
std::unordered_map<asset_type_t, std::unique_ptr<IAssetLoader>> m_asset_loaders_by_type;
void ConfigureCreatorCollection(AssetCreatorCollection& collection, Zone& zone, ISearchPath& searchPath) const override;
};
} // namespace IW4