2017-02-25 14:55:04 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace Assets
|
|
|
|
{
|
2017-02-25 15:01:06 -05:00
|
|
|
class ImenuDef_t : public Components::AssetHandler::IAsset
|
2017-02-25 14:55:04 -05:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual Game::XAssetType getType() override { return Game::XAssetType::ASSET_TYPE_MENU; };
|
|
|
|
|
|
|
|
virtual void save(Game::XAssetHeader header, Components::ZoneBuilder::Zone* builder) override;
|
2017-02-25 15:11:17 -05:00
|
|
|
virtual void mark(Game::XAssetHeader header, Components::ZoneBuilder::Zone* builder) override;
|
2017-02-25 14:55:04 -05:00
|
|
|
// virtual void load(Game::XAssetHeader* header, std::string name, Components::ZoneBuilder::Zone* builder) override;
|
2017-02-26 08:54:19 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
template <typename T> void save_windowDef_t(Game::windowDef_t* asset, T* dest, Components::ZoneBuilder::Zone* builder)
|
|
|
|
{
|
|
|
|
Utils::Stream* buffer = builder->getBuffer();
|
|
|
|
|
|
|
|
if (asset->name)
|
|
|
|
{
|
|
|
|
buffer->saveString(asset->name);
|
|
|
|
Utils::Stream::ClearPointer(&dest->window.name);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (asset->group)
|
|
|
|
{
|
|
|
|
buffer->saveString(asset->group);
|
|
|
|
Utils::Stream::ClearPointer(&dest->window.group);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (asset->background)
|
|
|
|
{
|
|
|
|
dest->window.background = builder->saveSubAsset(Game::XAssetType::ASSET_TYPE_MATERIAL, asset->background).material;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
void save_ExpressionSupportingData(Game::ExpressionSupportingData* asset, Components::ZoneBuilder::Zone* builder);
|
|
|
|
void save_Statement_s(Game::Statement_s* asset, Components::ZoneBuilder::Zone* builder);
|
|
|
|
void save_MenuEventHandlerSet(Game::MenuEventHandlerSet* asset, Components::ZoneBuilder::Zone* builder);
|
|
|
|
void save_ItemKeyHandler(Game::ItemKeyHandler* asset, Components::ZoneBuilder::Zone* builder);
|
|
|
|
void save_itemDefData_t(Game::itemDefData_t* asset, int type, Game::itemDef_t* dest, Components::ZoneBuilder::Zone* builder);
|
|
|
|
void save_itemDef_t(Game::itemDef_t *asset, Components::ZoneBuilder::Zone* builder);
|
2017-02-25 14:55:04 -05:00
|
|
|
};
|
|
|
|
}
|