mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-05-07 13:04:58 +00:00
refactor: update zcg generate file headers
This commit is contained in:
parent
115765ad86
commit
50612d117e
@ -6,7 +6,6 @@
|
||||
#include "Utils/StringUtils.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
namespace
|
||||
@ -32,12 +31,13 @@ namespace
|
||||
LINE("")
|
||||
LINE("#pragma once")
|
||||
LINE("")
|
||||
LINE("#include \"Loading/AssetLoader.h\"")
|
||||
LINEF("#include \"Game/{0}/{0}.h\"", m_env.m_game)
|
||||
if (m_env.m_has_actions)
|
||||
{
|
||||
LINEF("#include \"Game/{0}/XAssets/{1}/{1}_actions.h\"", m_env.m_game, Lower(m_env.m_asset->m_definition->m_name))
|
||||
}
|
||||
LINE("#include \"Loading/AssetLoader.h\"")
|
||||
LINE("")
|
||||
LINE("#include <string>")
|
||||
LINE("")
|
||||
LINEF("namespace {0}", m_env.m_game)
|
||||
@ -121,20 +121,24 @@ namespace
|
||||
LINE("// ====================================================================")
|
||||
LINE("")
|
||||
LINEF("#include \"{0}_load_db.h\"", Lower(m_env.m_asset->m_definition->m_name))
|
||||
LINEF("#include \"{0}_mark_db.h\"", Lower(m_env.m_asset->m_definition->m_name))
|
||||
LINE("#include <cassert>")
|
||||
LINE("#include <cstring>")
|
||||
LINE("")
|
||||
LINEF("#include \"{0}_mark_db.h\"", Lower(m_env.m_asset->m_definition->m_name))
|
||||
|
||||
if (!m_env.m_referenced_assets.empty())
|
||||
{
|
||||
LINE("")
|
||||
LINE("// Referenced Assets:")
|
||||
for (const auto* type : m_env.m_referenced_assets)
|
||||
{
|
||||
LINEF("#include \"../{0}/{0}_load_db.h\"", Lower(type->m_type->m_name))
|
||||
}
|
||||
LINE("")
|
||||
}
|
||||
|
||||
LINE("")
|
||||
LINE("#include <cassert>")
|
||||
LINE("#include <cstring>")
|
||||
|
||||
LINE("")
|
||||
LINEF("using namespace {0};", m_env.m_game)
|
||||
LINE("")
|
||||
PrintConstructorMethod();
|
||||
|
@ -32,8 +32,8 @@ namespace
|
||||
LINE("")
|
||||
LINE("#pragma once")
|
||||
LINE("")
|
||||
LINE("#include \"Loading/AssetMarker.h\"")
|
||||
LINEF("#include \"Game/{0}/{0}.h\"", m_env.m_game)
|
||||
LINE("#include \"Loading/AssetMarker.h\"")
|
||||
LINE("")
|
||||
LINE("#include <string>")
|
||||
LINE("")
|
||||
@ -116,19 +116,19 @@ namespace
|
||||
LINE("// ====================================================================")
|
||||
LINE("")
|
||||
LINEF("#include \"{0}_mark_db.h\"", Lower(m_env.m_asset->m_definition->m_name))
|
||||
LINE("")
|
||||
LINE("#include <cassert>")
|
||||
LINE("")
|
||||
|
||||
if (!m_env.m_referenced_assets.empty())
|
||||
{
|
||||
LINE("")
|
||||
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))
|
||||
}
|
||||
LINE("")
|
||||
}
|
||||
LINE("")
|
||||
LINE("#include <cassert>")
|
||||
LINE("")
|
||||
LINEF("using namespace {0};", m_env.m_game)
|
||||
LINE("")
|
||||
PrintConstructorMethod();
|
||||
|
@ -30,8 +30,9 @@ namespace
|
||||
LINE("")
|
||||
LINE("#pragma once")
|
||||
LINE("")
|
||||
LINE("#include \"Writing/AssetWriter.h\"")
|
||||
LINEF("#include \"Game/{0}/{0}.h\"", m_env.m_game)
|
||||
LINE("#include \"Writing/AssetWriter.h\"")
|
||||
LINE("")
|
||||
LINE("#include <string>")
|
||||
LINE("")
|
||||
LINEF("namespace {0}", m_env.m_game)
|
||||
@ -113,18 +114,20 @@ namespace
|
||||
LINE("// ====================================================================")
|
||||
LINE("")
|
||||
LINEF("#include \"{0}_write_db.h\"", Lower(m_env.m_asset->m_definition->m_name))
|
||||
LINE("#include <cassert>")
|
||||
LINE("")
|
||||
|
||||
if (!m_env.m_referenced_assets.empty())
|
||||
{
|
||||
LINE("")
|
||||
LINE("// Referenced Assets:")
|
||||
for (const auto* type : m_env.m_referenced_assets)
|
||||
{
|
||||
LINEF("#include \"../{0}/{0}_write_db.h\"", Lower(type->m_type->m_name))
|
||||
}
|
||||
LINE("")
|
||||
}
|
||||
|
||||
LINE("")
|
||||
LINE("#include <cassert>")
|
||||
LINE("")
|
||||
LINEF("using namespace {0};", m_env.m_game)
|
||||
LINE("")
|
||||
PrintConstructorMethod();
|
||||
|
Loading…
x
Reference in New Issue
Block a user