[IComWorld] Mark light definition

This commit is contained in:
momo5502 2016-12-31 03:46:23 +01:00
parent 80883013d3
commit 7135ef2a60
2 changed files with 16 additions and 0 deletions

View File

@ -2,6 +2,21 @@
namespace Assets
{
void IComWorld::mark(Game::XAssetHeader header, Components::ZoneBuilder::Zone* builder)
{
Game::ComWorld* asset = header.comWorld;
if (asset->lights)
{
for (int i = 0; i < asset->lightCount; ++i)
{
if (asset->lights[i].name)
{
builder->loadAsset(Game::XAssetType::ASSET_TYPE_LIGHT_DEF, std::string(asset->lights[i].name), false);
}
}
}
}
void IComWorld::save(Game::XAssetHeader header, Components::ZoneBuilder::Zone* builder)
{
AssertSize(Game::ComWorld, 16);

View File

@ -6,5 +6,6 @@ namespace Assets
virtual Game::XAssetType getType() override { return Game::XAssetType::ASSET_TYPE_COMWORLD; };
virtual void save(Game::XAssetHeader header, Components::ZoneBuilder::Zone* builder) override;
virtual void mark(Game::XAssetHeader header, Components::ZoneBuilder::Zone* builder) override;
};
}