mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-20 00:02:55 +00:00
54 lines
1.5 KiB
C++
54 lines
1.5 KiB
C++
#pragma once
|
|
#include "IAssetLoadingManager.h"
|
|
#include "IGdtQueryable.h"
|
|
#include "SearchPath/ISearchPath.h"
|
|
#include "Utils/ClassUtils.h"
|
|
#include "Zone/ZoneTypes.h"
|
|
|
|
#include <string>
|
|
|
|
class IAssetLoader
|
|
{
|
|
public:
|
|
IAssetLoader() = default;
|
|
virtual ~IAssetLoader() = default;
|
|
IAssetLoader(const IAssetLoader& other) = default;
|
|
IAssetLoader(IAssetLoader&& other) noexcept = default;
|
|
IAssetLoader& operator=(const IAssetLoader& other) = default;
|
|
IAssetLoader& operator=(IAssetLoader&& other) noexcept = default;
|
|
|
|
_NODISCARD virtual asset_type_t GetHandlingAssetType() const = 0;
|
|
_NODISCARD virtual XAssetInfoGeneric* LoadFromGlobalAssetPools(const std::string& assetName) const = 0;
|
|
|
|
_NODISCARD virtual void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
|
{
|
|
// TODO: Make this pure virtual
|
|
return nullptr;
|
|
}
|
|
|
|
_NODISCARD virtual bool CanLoadFromGdt() const
|
|
{
|
|
return false;
|
|
}
|
|
|
|
_NODISCARD virtual bool CanLoadFromRaw() const
|
|
{
|
|
return false;
|
|
}
|
|
|
|
virtual bool LoadFromGdt(const std::string& assetName, IGdtQueryable* gdtQueryable, MemoryManager* memory, IAssetLoadingManager* manager, Zone* zone) const
|
|
{
|
|
return false;
|
|
}
|
|
|
|
virtual bool LoadFromRaw(const std::string& assetName, ISearchPath* searchPath, MemoryManager* memory, IAssetLoadingManager* manager, Zone* zone) const
|
|
{
|
|
return false;
|
|
}
|
|
|
|
virtual void FinalizeAssetsForZone(AssetLoadingContext& context) const
|
|
{
|
|
// Do nothing by default
|
|
}
|
|
};
|