refactor: add game name to generated load and write files

This commit is contained in:
Jan Laupetin committed 2026-01-17 00:45:17 +00:00
1 parent 77af856a87
commit 86b7e55e5b
17 files changed
+168 -394

No files matched your search

@@ -32,10 +32,7 @@ namespace
for (const auto* asset : m_env.m_assets)
{
auto lowerAssetName = asset->m_definition->m_name;
utils::MakeStringLowerCase(lowerAssetName);
LINEF("#include \"Game/{0}/XAssets/{1}/{1}_mark_db.h\"", m_env.m_game, lowerAssetName)
LINEF("#include \"Game/{0}/XAssets/{1}/{1}_{2}_mark_db.h\"", m_env.m_game, Lower(asset->m_definition->m_name), Lower(m_env.m_game))
}
}
@@ -142,7 +139,7 @@ namespace
{
AddGeneratedHint();
LINEF("#include \"{0}_mark_db.h\"", Lower(m_env.m_asset->m_definition->m_name))
LINEF("#include \"{0}_{1}_mark_db.h\"", Lower(m_env.m_asset->m_definition->m_name), Lower(m_env.m_game))
if (!m_env.m_referenced_assets.empty())
{
@@ -150,7 +147,7 @@ namespace
LINE("// Referenced Assets:")
for (const auto* type : m_env.m_referenced_assets)
{
LINEF("#include \"../{0}/{0}_mark_db.h\"", Lower(type->m_type->m_name))
LINEF("#include \"../{0}/{0}_{1}_mark_db.h\"", Lower(type->m_type->m_name), Lower(m_env.m_game))
}
}
LINE("")
@@ -802,7 +799,7 @@ void ZoneMarkTemplate::RenderOncePerTemplateFile(std::ostream& stream, const Cod
{
assert(fileTag == TAG_ALL_MARKERS);
PerTemplate t(stream, context);
const PerTemplate t(stream, context);
t.AllMarkers();
}
@@ -813,8 +810,11 @@ std::vector<CodeTemplateFile> ZoneMarkTemplate::GetFilesToRenderOncePerAsset(con
auto assetName = context.m_asset->m_definition->m_name;
utils::MakeStringLowerCase(assetName);
files.emplace_back(std::format("XAssets/{0}/{0}_mark_db.h", assetName), TAG_HEADER);
files.emplace_back(std::format("XAssets/{0}/{0}_mark_db.cpp", assetName), TAG_SOURCE);
auto gameName = context.m_game;
utils::MakeStringLowerCase(gameName);
files.emplace_back(std::format("XAssets/{0}/{0}_{1}_mark_db.h", assetName, gameName), TAG_HEADER);
files.emplace_back(std::format("XAssets/{0}/{0}_{1}_mark_db.cpp", assetName, gameName), TAG_SOURCE);
return files;
}