mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-03-15 17:33:03 +00:00
31 lines
957 B
C++
31 lines
957 B
C++
#include "ZoneDefWriterT5.h"
|
|
|
|
#include "Game/T5/AssetMarkerT5.h"
|
|
|
|
using namespace T5;
|
|
|
|
void ZoneDefWriter::WriteMetaData(ZoneDefinitionOutputStream& stream, const Zone& zone) const {}
|
|
|
|
void ZoneDefWriter::WriteContent(ZoneDefinitionOutputStream& stream, const Zone& zone) const
|
|
{
|
|
const auto* game = IGame::GetGameById(zone.m_game_id);
|
|
|
|
// Localized strings are all collected in one string file. So only add this to the zone file.
|
|
auto localizePoolAssets = zone.m_pools.PoolAssets<AssetLocalize>();
|
|
if (localizePoolAssets.begin() != localizePoolAssets.end())
|
|
stream.WriteEntry(*game->GetAssetTypeName(ASSET_TYPE_LOCALIZE_ENTRY), zone.m_name);
|
|
|
|
for (const auto& asset : zone.m_pools)
|
|
{
|
|
switch (asset->m_type)
|
|
{
|
|
case ASSET_TYPE_LOCALIZE_ENTRY:
|
|
break;
|
|
|
|
default:
|
|
stream.WriteEntry(*game->GetAssetTypeName(asset->m_type), asset->m_name);
|
|
break;
|
|
}
|
|
}
|
|
}
|