mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-10-19 13:05:20 +00:00
24 lines
600 B
C++
24 lines
600 B
C++
#include "MapEntsDumperIW3.h"
|
|
|
|
using namespace IW3;
|
|
|
|
namespace map_ents
|
|
{
|
|
DumperIW3::DumperIW3(const AssetPool<IW3::AssetMapEnts::Type>& pool)
|
|
: AbstractAssetDumper(pool)
|
|
{
|
|
}
|
|
|
|
void DumperIW3::DumpAsset(AssetDumpingContext& context, const XAssetInfo<MapEnts>& asset)
|
|
{
|
|
const auto* mapEnts = asset.Asset();
|
|
const auto assetFile = context.OpenAssetFile(asset.m_name + ".ents");
|
|
|
|
if (!assetFile)
|
|
return;
|
|
|
|
auto& stream = *assetFile;
|
|
stream.write(mapEnts->entityString, mapEnts->numEntityChars);
|
|
}
|
|
} // namespace map_ents
|