Only load menu files once

This commit is contained in:
Jan
2021-12-31 00:09:25 +01:00
parent 1e3946974c
commit b5475e30f0
8 changed files with 143 additions and 127 deletions

View File

@ -0,0 +1,17 @@
#include "AssetLoaderMenuDef.h"
#include <cstring>
#include "ObjLoading.h"
#include "Game/IW4/IW4.h"
#include "Pool/GlobalAssetPool.h"
using namespace IW4;
void* AssetLoaderMenuDef::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
{
auto* menu = memory->Create<menuDef_t>();
memset(menu, 0, sizeof(menuDef_t));
menu->window.name = memory->Dup(assetName.c_str());
return menu;
}