mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-19 03:07:58 -05:00
Write StructuredDataDef data with additional comments stating debugging details for the format
This commit is contained in:
@ -53,6 +53,12 @@ void StructuredDataDefDumper::EndVersion()
|
||||
m_flags.m_empty_line_before_block = false;
|
||||
}
|
||||
|
||||
void StructuredDataDefDumper::WriteLineComment(const std::string& comment) const
|
||||
{
|
||||
Indent();
|
||||
m_stream << "// " << comment << "\n";
|
||||
}
|
||||
|
||||
void StructuredDataDefDumper::BeginEnum(const std::string& enumName, const size_t enumEntryCount, size_t enumReservedEntryCount)
|
||||
{
|
||||
assert(m_flags.m_in_version);
|
||||
@ -214,6 +220,12 @@ void StructuredDataDefDumper::EndProperty()
|
||||
ss << "[" << arraySpecifierName << "]";
|
||||
}
|
||||
|
||||
ss << " /* Offset: " << m_current_property_offset / 8;
|
||||
|
||||
if (m_current_property_offset % 8 > 0)
|
||||
ss << " + " << m_current_property_offset % 8 << "bit";
|
||||
|
||||
ss << " */ ";
|
||||
m_struct_properties.emplace_back(ss.str(), m_current_property_offset);
|
||||
|
||||
m_block = Block::BLOCK_STRUCT;
|
||||
|
@ -45,6 +45,8 @@ public:
|
||||
void BeginVersion(int version);
|
||||
void EndVersion();
|
||||
|
||||
void WriteLineComment(const std::string& comment) const;
|
||||
|
||||
void BeginEnum(const std::string& enumName, size_t enumEntryCount, size_t enumReservedEntryCount);
|
||||
void EndEnum();
|
||||
void WriteEnumEntry(const std::string& entryName, size_t entryValue);
|
||||
|
Reference in New Issue
Block a user