mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-19 07:42:54 +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"
|
||||
}
|
||||
|
||||
filter "options:debug-structureddatadef"
|
||||
defines { "STRUCTUREDDATADEF_DEBUG" }
|
||||
filter {}
|
||||
|
||||
-- ========================
|
||||
-- ThirdParty
|
||||
-- ========================
|
||||
|
@ -46,6 +46,13 @@ void StructuredDataDefDumperNew::DumpEnum(const CommonStructuredDataEnum& _enum)
|
||||
|
||||
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();
|
||||
|
||||
m_stream << "struct " << _struct.m_name << "\n";
|
||||
@ -78,6 +85,11 @@ void StructuredDataDefDumperNew::DumpDef(const CommonStructuredDataDef& def)
|
||||
|
||||
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";
|
||||
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