iw4x-client/src/Components/Modules/AssetInterfaces/ISndCurve.cpp

25 lines
583 B
C++
Raw Normal View History

2022-02-27 07:53:44 -05:00
#include <STDInclude.hpp>
2017-01-19 16:23:59 -05:00
namespace Assets
{
void ISndCurve::save(Game::XAssetHeader header, Components::ZoneBuilder::Zone* builder)
{
AssertSize(Game::SndCurve, 136);
Utils::Stream* buffer = builder->getBuffer();
Game::SndCurve* asset = header.sndCurve;
Game::SndCurve* dest = buffer->dest<Game::SndCurve>();
buffer->save(asset);
buffer->pushBlock(Game::XFILE_BLOCK_VIRTUAL);
if (asset->filename)
{
buffer->saveString(builder->getAssetName(this->getType(), asset->filename));
Utils::Stream::ClearPointer(&dest->filename);
}
buffer->popBlock();
}
}