mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-13 00:08:26 -05:00
feat: add loader for creating empty assets for all remaining iw5 asset types
This commit is contained in:
17
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderFont.cpp
Normal file
17
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderFont.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderFont.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderFont::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* font = memory->Create<Font_s>();
|
||||
memset(font, 0, sizeof(Font_s));
|
||||
font->fontName = memory->Dup(assetName.c_str());
|
||||
return font;
|
||||
}
|
Reference in New Issue
Block a user