Skip to content

Commit

Permalink
Included filename into pad generation
Browse files Browse the repository at this point in the history
  • Loading branch information
KiritoDv committed Mar 5, 2024
1 parent 1682451 commit a20e0a3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Companion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,9 @@ void Companion::ExtractNode(YAML::Node& node, std::string& name, SWrapper* binar

if(this->gConfig.exporterType == ExportType::Code) {
if(node["pad"]){
auto filename = this->gCurrentDirectory.filename().string();
auto pad = GetSafeNode<uint32_t>(node, "pad");
stream << "char pad_" << gCurrentPad++ << "[] = {\n" << tab;
stream << "char pad_" << filename << "_" << gCurrentPad++ << "[] = {\n" << tab;
for(int i = 0; i < pad; i++){
stream << "0x00, ";
}
Expand Down Expand Up @@ -434,6 +435,7 @@ void Companion::Process() {
root = YAML::LoadFile(yamlPath);
this->gConfig.segment.local.clear();
this->gFileHeader.clear();
this->gCurrentPad = 0;

if(root[":config"]) {
this->ParseCurrentFileConfig(root[":config"]);
Expand Down

0 comments on commit a20e0a3

Please sign in to comment.