Update IsDebug (#25)

Co-authored-by: = <=>
This commit is contained in:
MegaMech
2024-03-09 23:42:25 -06:00
committed by GitHub
co-authored by = <=>
parent a2d735c528
commit c4bb1ad8ee
3 changed files with 22 additions and 6 deletions
+14 -1
View File
@@ -123,7 +123,20 @@ void DListCodeExporter::Export(std::ostream &write, std::shared_ptr<IParsedData>
gfxd_execute();
write << std::string(out);
write << "}; // size = 0x" << std::hex << std::uppercase << (sizeof(uint32_t) * cmds.size()) << "\n\n";
write << "};\n";
if (Companion::Instance->IsDebug()) {
std::string str = ((sizeof(uint32_t) * cmds.size()) / 8) == 1 ? " displaylist" : " displaylists";
write << "// " << std::hex << std::uppercase << ((sizeof(uint32_t) * cmds.size()) / 8) << str << "\n";
if (IS_SEGMENTED(offset)) {
offset = SEGMENT_OFFSET(offset);
}
write << "// 0x" << std::hex << std::uppercase << (offset + (sizeof(uint32_t) * (cmds.size()))) << "\n";
}
write << "\n";
}
void DebugDisplayList(uint32_t w0, uint32_t w1){