mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-19 15:52:53 +00:00
Print debug info about structured data def when compiled with the debug flag for it
This commit is contained in:
parent
3fc9eac5f0
commit
fef646fded
@ -58,6 +58,10 @@ workspace "OpenAssetTools"
|
|||||||
"_CRT_SECURE_NO_WARNINGS"
|
"_CRT_SECURE_NO_WARNINGS"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
filter "options:debug-structureddatadef"
|
||||||
|
defines { "STRUCTUREDDATADEF_DEBUG" }
|
||||||
|
filter {}
|
||||||
|
|
||||||
-- ========================
|
-- ========================
|
||||||
-- ThirdParty
|
-- ThirdParty
|
||||||
-- ========================
|
-- ========================
|
||||||
|
@ -46,6 +46,13 @@ void StructuredDataDefDumperNew::DumpEnum(const CommonStructuredDataEnum& _enum)
|
|||||||
|
|
||||||
void StructuredDataDefDumperNew::DumpStruct(const CommonStructuredDataStruct& _struct)
|
void StructuredDataDefDumperNew::DumpStruct(const CommonStructuredDataStruct& _struct)
|
||||||
{
|
{
|
||||||
|
#ifdef STRUCTUREDDATADEF_DEBUG
|
||||||
|
Indent();
|
||||||
|
m_stream << "// BitOffset: " << _struct.m_bit_offset << "\n";
|
||||||
|
Indent();
|
||||||
|
m_stream << "// Size (Byte): " << _struct.m_size_in_byte << "\n";
|
||||||
|
#endif
|
||||||
|
|
||||||
Indent();
|
Indent();
|
||||||
|
|
||||||
m_stream << "struct " << _struct.m_name << "\n";
|
m_stream << "struct " << _struct.m_name << "\n";
|
||||||
@ -78,6 +85,11 @@ void StructuredDataDefDumperNew::DumpDef(const CommonStructuredDataDef& def)
|
|||||||
|
|
||||||
m_stream << "// ====================\n";
|
m_stream << "// ====================\n";
|
||||||
|
|
||||||
|
#ifdef STRUCTUREDDATADEF_DEBUG
|
||||||
|
m_stream << "// Size (Byte): " << def.m_size_in_byte << "\n";
|
||||||
|
m_stream << "// Checksum: " << def.m_checksum << "\n";
|
||||||
|
#endif
|
||||||
|
|
||||||
m_stream << "version " << def.m_version << "\n{\n";
|
m_stream << "version " << def.m_version << "\n{\n";
|
||||||
IncIndent();
|
IncIndent();
|
||||||
|
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
newoption {
|
||||||
|
trigger = "debug-structureddatadef",
|
||||||
|
description = "Activate additional debugging logic for StructuredDataDef assets"
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user