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
+3 -7
View File
@@ -12,23 +12,20 @@ public:
};
class TypeHeaderExporter : public BaseExporter {
void Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName, YAML::Node& node, std::string* replacement) override;
ExportResult Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName, YAML::Node& node, std::string* replacement) override;
};
class TypeBinaryExporter : public BaseExporter {
void Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName, YAML::Node& node, std::string* replacement) override;
ExportResult Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName, YAML::Node& node, std::string* replacement) override;
};
class TypeCodeExporter : public BaseExporter {
void Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName, YAML::Node& node, std::string* replacement) override;
ExportResult Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName, YAML::Node& node, std::string* replacement) override;
};
class TypeFactory : public BaseFactory {
public:
std::optional<std::shared_ptr<IParsedData>> parse(std::vector<uint8_t>& buffer, YAML::Node& data) override;
std::optional<std::shared_ptr<IParsedData>> parse_modding(std::vector<uint8_t>& buffer, YAML::Node& data) override {
return std::nullopt;
}
inline std::unordered_map<ExportType, std::shared_ptr<BaseExporter>> GetExporters() override {
return {
REGISTER(Code, TypeCodeExporter)
@@ -36,6 +33,5 @@ public:
REGISTER(Binary, TypeBinaryExporter)
};
}
bool SupportModdedAssets() override { return false; }
};
// }