2022-02-27 07:53:44 -05:00
|
|
|
#include <STDInclude.hpp>
|
2016-01-25 17:47:50 -05:00
|
|
|
|
|
|
|
namespace Assets
|
|
|
|
{
|
2016-11-20 08:09:07 -05:00
|
|
|
void IPhysPreset::save(Game::XAssetHeader header, Components::ZoneBuilder::Zone* builder)
|
2016-01-25 17:47:50 -05:00
|
|
|
{
|
2016-11-20 08:09:07 -05:00
|
|
|
AssertSize(Game::PhysPreset, 44);
|
2016-01-25 17:47:50 -05:00
|
|
|
|
2016-11-20 08:09:07 -05:00
|
|
|
Utils::Stream* buffer = builder->getBuffer();
|
2016-01-25 17:47:50 -05:00
|
|
|
Game::PhysPreset* asset = header.physPreset;
|
2016-11-20 08:09:07 -05:00
|
|
|
Game::PhysPreset* dest = buffer->dest<Game::PhysPreset>();
|
|
|
|
buffer->save(asset);
|
2016-01-25 17:47:50 -05:00
|
|
|
|
2016-11-20 08:09:07 -05:00
|
|
|
buffer->pushBlock(Game::XFILE_BLOCK_VIRTUAL);
|
2016-01-25 17:47:50 -05:00
|
|
|
|
|
|
|
if (asset->name)
|
|
|
|
{
|
2016-11-20 08:09:07 -05:00
|
|
|
buffer->saveString(builder->getAssetName(this->getType(), asset->name));
|
2016-06-10 07:52:55 -04:00
|
|
|
Utils::Stream::ClearPointer(&dest->name);
|
2016-01-25 17:47:50 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
if (asset->sndAliasPrefix)
|
|
|
|
{
|
2016-11-20 08:09:07 -05:00
|
|
|
buffer->saveString(asset->sndAliasPrefix);
|
2016-06-10 07:52:55 -04:00
|
|
|
Utils::Stream::ClearPointer(&dest->sndAliasPrefix);
|
2016-01-25 17:47:50 -05:00
|
|
|
}
|
|
|
|
|
2016-11-20 08:09:07 -05:00
|
|
|
buffer->popBlock();
|
2016-01-25 17:47:50 -05:00
|
|
|
}
|
|
|
|
}
|