mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-19 07:42:54 +00:00
17 lines
469 B
C++
17 lines
469 B
C++
#include "DefaultCreatorImageIW3.h"
|
|
|
|
using namespace IW3;
|
|
|
|
DefaultCreatorImage::DefaultCreatorImage(MemoryManager& memory)
|
|
: m_memory(memory)
|
|
{
|
|
}
|
|
|
|
AssetCreationResult DefaultCreatorImage::CreateDefaultAsset(const std::string& assetName, AssetCreationContext& context) const
|
|
{
|
|
auto* asset = m_memory.Alloc<GfxImage>();
|
|
asset->name = m_memory.Dup(assetName.c_str());
|
|
|
|
return AssetCreationResult::Success(context.AddAsset<AssetImage>(assetName, asset));
|
|
}
|