mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-07-26 18:00:38 +00:00
* feat: T5 map ents dumper * chore: adjust map ents dumper code style to each other --------- Co-authored-by: Jan Laupetin <[email protected]>
21 lines
555 B
C++
21 lines
555 B
C++
#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
|