Auto pad and overlap detection (#47)

* Fully implemented pad and overlap detection

* Cleaned code, fixed pad generation and added alignment

* Added debug size on pads
This commit is contained in:
Lywx
2024-03-20 21:17:11 -06:00
committed by GitHub
parent 8465919ab7
commit f0c70f855a
62 changed files with 405 additions and 407 deletions
+6 -6
View File
@@ -6,29 +6,29 @@
#include "utils/TorchUtils.h"
TypeData::TypeData(uint32_t data): mData(data) {
}
void TypeHeaderExporter::Export(std::ostream &write, std::shared_ptr<IParsedData> raw, std::string& entryName, YAML::Node &node, std::string* replacement) {
ExportResult TypeHeaderExporter::Export(std::ostream &write, std::shared_ptr<IParsedData> raw, std::string& entryName, YAML::Node &node, std::string* replacement) {
const auto symbol = GetSafeNode(node, "symbol", entryName);
if(Companion::Instance->IsOTRMode()){
write << "static const char " << symbol << "[] = \"__OTR__" << (*replacement) << "\";\n\n";
return;
return std::nullopt;
}
write << "extern Type " << symbol << ";\n";
// write << "extern Type " << symbol << "[];\n";
}
void TypeCodeExporter::Export(std::ostream &write, std::shared_ptr<IParsedData> raw, std::string& entryName, YAML::Node &node, std::string* replacement ) {
ExportResult TypeCodeExporter::Export(std::ostream &write, std::shared_ptr<IParsedData> raw, std::string& entryName, YAML::Node &node, std::string* replacement ) {
const auto symbol = GetSafeNode(node, "symbol", entryName);
const auto offset = GetSafeNode<uint32_t>(node, "offset");
auto data = std::static_pointer_cast<TypeData>(raw);
}
void TypeBinaryExporter::Export(std::ostream &write, std::shared_ptr<IParsedData> raw, std::string& entryName, YAML::Node &node, std::string* replacement ) {
ExportResult TypeBinaryExporter::Export(std::ostream &write, std::shared_ptr<IParsedData> raw, std::string& entryName, YAML::Node &node, std::string* replacement ) {
}