mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-11 07:18:11 -05:00
refactor: use asset_type_t for ZoneDefinition
This commit is contained in:
@ -25,7 +25,7 @@ void ZoneDefWriter::WriteContent(ZoneDefinitionOutputStream& stream, const Unlin
|
||||
// Localized strings are all collected in one string file. So only add this to the zone file.
|
||||
if (!pools->m_localize->m_asset_lookup.empty())
|
||||
{
|
||||
stream.WriteEntry(pools->GetAssetTypeName(ASSET_TYPE_LOCALIZE_ENTRY), zone->m_name);
|
||||
stream.WriteEntry(*pools->GetAssetTypeName(ASSET_TYPE_LOCALIZE_ENTRY), zone->m_name);
|
||||
}
|
||||
|
||||
for (const auto& asset : *pools)
|
||||
@ -36,7 +36,7 @@ void ZoneDefWriter::WriteContent(ZoneDefinitionOutputStream& stream, const Unlin
|
||||
break;
|
||||
|
||||
default:
|
||||
stream.WriteEntry(pools->GetAssetTypeName(asset->m_type), asset->m_name);
|
||||
stream.WriteEntry(*pools->GetAssetTypeName(asset->m_type), asset->m_name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ void ZoneDefWriter::WriteContent(ZoneDefinitionOutputStream& stream, const Unlin
|
||||
// Localized strings are all collected in one string file. So only add this to the zone file.
|
||||
if (!pools->m_localize->m_asset_lookup.empty())
|
||||
{
|
||||
stream.WriteEntry(pools->GetAssetTypeName(ASSET_TYPE_LOCALIZE_ENTRY), zone->m_name);
|
||||
stream.WriteEntry(*pools->GetAssetTypeName(ASSET_TYPE_LOCALIZE_ENTRY), zone->m_name);
|
||||
}
|
||||
|
||||
for (const auto& asset : *pools)
|
||||
@ -36,7 +36,7 @@ void ZoneDefWriter::WriteContent(ZoneDefinitionOutputStream& stream, const Unlin
|
||||
break;
|
||||
|
||||
default:
|
||||
stream.WriteEntry(pools->GetAssetTypeName(asset->m_type), asset->m_name);
|
||||
stream.WriteEntry(*pools->GetAssetTypeName(asset->m_type), asset->m_name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ void ZoneDefWriter::WriteContent(ZoneDefinitionOutputStream& stream, const Unlin
|
||||
// Localized strings are all collected in one string file. So only add this to the zone file.
|
||||
if (!pools->m_localize->m_asset_lookup.empty())
|
||||
{
|
||||
stream.WriteEntry(pools->GetAssetTypeName(ASSET_TYPE_LOCALIZE_ENTRY), zone->m_name);
|
||||
stream.WriteEntry(*pools->GetAssetTypeName(ASSET_TYPE_LOCALIZE_ENTRY), zone->m_name);
|
||||
}
|
||||
|
||||
for (const auto& asset : *pools)
|
||||
@ -36,7 +36,7 @@ void ZoneDefWriter::WriteContent(ZoneDefinitionOutputStream& stream, const Unlin
|
||||
break;
|
||||
|
||||
default:
|
||||
stream.WriteEntry(pools->GetAssetTypeName(asset->m_type), asset->m_name);
|
||||
stream.WriteEntry(*pools->GetAssetTypeName(asset->m_type), asset->m_name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ void ZoneDefWriter::WriteContent(ZoneDefinitionOutputStream& stream, const Unlin
|
||||
// Localized strings are all collected in one string file. So only add this to the zone file.
|
||||
if (!pools->m_localize->m_asset_lookup.empty())
|
||||
{
|
||||
stream.WriteEntry(pools->GetAssetTypeName(ASSET_TYPE_LOCALIZE_ENTRY), zone->m_name);
|
||||
stream.WriteEntry(*pools->GetAssetTypeName(ASSET_TYPE_LOCALIZE_ENTRY), zone->m_name);
|
||||
}
|
||||
|
||||
for (const auto& asset : *pools)
|
||||
@ -36,7 +36,7 @@ void ZoneDefWriter::WriteContent(ZoneDefinitionOutputStream& stream, const Unlin
|
||||
break;
|
||||
|
||||
default:
|
||||
stream.WriteEntry(pools->GetAssetTypeName(asset->m_type), asset->m_name);
|
||||
stream.WriteEntry(*pools->GetAssetTypeName(asset->m_type), asset->m_name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ void ZoneDefWriter::WriteContent(ZoneDefinitionOutputStream& stream, const Unlin
|
||||
// Localized strings are all collected in one string file. So only add this to the zone file.
|
||||
if (!pools->m_localize->m_asset_lookup.empty())
|
||||
{
|
||||
stream.WriteEntry(pools->GetAssetTypeName(ASSET_TYPE_LOCALIZE_ENTRY), zone->m_name);
|
||||
stream.WriteEntry(*pools->GetAssetTypeName(ASSET_TYPE_LOCALIZE_ENTRY), zone->m_name);
|
||||
}
|
||||
|
||||
for (const auto& asset : *pools)
|
||||
@ -95,7 +95,7 @@ void ZoneDefWriter::WriteContent(ZoneDefinitionOutputStream& stream, const Unlin
|
||||
break;
|
||||
|
||||
default:
|
||||
stream.WriteEntry(pools->GetAssetTypeName(asset->m_type), asset->m_name);
|
||||
stream.WriteEntry(*pools->GetAssetTypeName(asset->m_type), asset->m_name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -226,7 +226,7 @@ private:
|
||||
std::vector<bool> handledSpecifiedAssets(m_args.m_specified_asset_types.size());
|
||||
for (auto i = 0; i < assetTypeCount; i++)
|
||||
{
|
||||
const auto assetTypeName = std::string(context.m_zone->m_pools->GetAssetTypeName(i));
|
||||
const auto assetTypeName = std::string(*context.m_zone->m_pools->GetAssetTypeName(i));
|
||||
|
||||
const auto foundSpecifiedEntry = m_args.m_specified_asset_type_map.find(assetTypeName);
|
||||
if (foundSpecifiedEntry != m_args.m_specified_asset_type_map.end())
|
||||
@ -256,7 +256,7 @@ private:
|
||||
auto first = true;
|
||||
for (auto i = 0; i < assetTypeCount; i++)
|
||||
{
|
||||
const auto assetTypeName = std::string(context.m_zone->m_pools->GetAssetTypeName(i));
|
||||
const auto assetTypeName = std::string(*context.m_zone->m_pools->GetAssetTypeName(i));
|
||||
|
||||
if (first)
|
||||
first = false;
|
||||
|
Reference in New Issue
Block a user