summaryrefslogtreecommitdiff
path: root/src/Companion.cpp
diff options
context:
space:
mode:
authorKiritoDv <kiritodev01@gmail.com>2024-03-05 00:09:30 -0600
committerKiritoDv <kiritodev01@gmail.com>2024-03-05 00:09:30 -0600
commita20e0a355089badfa4536639dfc95f64fb8428a2 (patch)
tree370bd51a76a8ca868eb6a0495bafe0377c38040b /src/Companion.cpp
parent1682451d2e2e510dfd213f963911dabb0e328b8f (diff)
Included filename into pad generation
Diffstat (limited to 'src/Companion.cpp')
-rw-r--r--src/Companion.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Companion.cpp b/src/Companion.cpp
index a30afe6..1493ee2 100644
--- a/src/Companion.cpp
+++ b/src/Companion.cpp
@@ -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, ";
}
@@ -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"]);