mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-19 15:52:53 +00:00
31 lines
930 B
C++
31 lines
930 B
C++
#pragma once
|
|
|
|
#include "AssetLoading/IAssetLoader.h"
|
|
#include "IObjLoader.h"
|
|
#include "SearchPath/ISearchPath.h"
|
|
|
|
#include <memory>
|
|
#include <unordered_map>
|
|
|
|
namespace IW3
|
|
{
|
|
class ObjLoader final : public IObjLoader
|
|
{
|
|
std::unordered_map<asset_type_t, std::unique_ptr<IAssetLoader>> m_asset_loaders_by_type;
|
|
|
|
static bool IsMpZone(const Zone& zone);
|
|
static bool IsZmZone(const Zone& zone);
|
|
|
|
public:
|
|
ObjLoader();
|
|
|
|
[[nodiscard]] bool SupportsZone(const Zone& zone) const override;
|
|
|
|
void LoadReferencedContainersForZone(ISearchPath& searchPath, Zone& zone) const override;
|
|
void UnloadContainersOfZone(Zone& zone) const override;
|
|
|
|
bool LoadAssetForZone(AssetLoadingContext& context, asset_type_t assetType, const std::string& assetName) const override;
|
|
void FinalizeAssetsForZone(AssetLoadingContext& context) const override;
|
|
};
|
|
} // namespace IW3
|