mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-07-26 18:00:38 +00:00
feat: T5 map ents dumper (#878)
* feat: T5 map ents dumper * chore: adjust map ents dumper code style to each other --------- Co-authored-by: Jan Laupetin <[email protected]>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#include "MapEntsDumperT5.h"
|
||||
|
||||
#include "Maps/MapEntsCommon.h"
|
||||
|
||||
using namespace T5;
|
||||
|
||||
namespace map_ents
|
||||
{
|
||||
void DumperT5::DumpAsset(AssetDumpingContext& context, const XAssetInfo<AssetMapEnts::Type>& asset)
|
||||
{
|
||||
const auto* mapEnts = asset.Asset();
|
||||
const auto assetFile = context.OpenAssetFile(GetEntsFileNameForAssetName(asset.m_name));
|
||||
|
||||
if (!assetFile)
|
||||
return;
|
||||
|
||||
auto& stream = *assetFile;
|
||||
stream.write(mapEnts->entityString, std::max(mapEnts->numEntityChars - 1, 0));
|
||||
}
|
||||
} // namespace map_ents
|
||||
Reference in New Issue
Block a user