mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-07-26 09:50:38 +00:00
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:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user