feat: T4 add StringTable loader (#934)

* feat: T4 add string table loader

* chore: rename stringtable loaders to match style between games

* fix: make sure all games correctly interpret failed stringtable loading

---------

Co-authored-by: Jan Laupetin <[email protected]>
This commit is contained in:
mo
2026-07-26 00:40:02 +02:00
committed by GitHub
co-authored by Jan Laupetin
parent 76e5bb17a2
commit 0c66d1838e
12 changed files with 117 additions and 15 deletions
@@ -3,12 +3,8 @@
#include "Csv/CsvStream.h"
#include "Game/IW5/CommonIW5.h"
#include "Game/IW5/IW5.h"
#include "ObjLoading.h"
#include "Pool/GlobalAssetPool.h"
#include "StringTable/StringTableLoader.h"
#include <cstring>
using namespace IW5;
namespace
@@ -30,6 +26,8 @@ namespace
string_table::StringTableLoaderV2<StringTable, Common::StringTable_HashString> loader;
auto* stringTable = loader.LoadFromStream(assetName, m_memory, *file.m_stream);
if (!stringTable)
return AssetCreationResult::Failure();
return AssetCreationResult::Success(context.AddAsset<AssetStringTable>(assetName, stringTable));
}