mirror of
https://github.com/izzy2lost/Torch.git
synced 2026-07-06 00:18:35 -07:00
Added pad generation for all assets
This commit is contained in:
@@ -119,6 +119,18 @@ void Companion::ExtractNode(YAML::Node& node, std::string& name, SWrapper* binar
|
||||
}
|
||||
default: {
|
||||
exporter->get()->Export(stream, result.value(), name, node, &name);
|
||||
|
||||
if(this->gConfig.exporterType == ExportType::Code) {
|
||||
if(node["pad"]){
|
||||
auto pad = GetSafeNode<uint32_t>(node, "pad");
|
||||
stream << "char pad_" << gCurrentPad++ << "[] = {\n";
|
||||
for(int i = 0; i < pad; i++){
|
||||
stream << "0x00, ";
|
||||
}
|
||||
stream << "};\n\n";
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,6 +89,7 @@ private:
|
||||
// Temporal Variables
|
||||
std::string gCurrentFile;
|
||||
std::string gFileHeader;
|
||||
uint32_t gCurrentPad = 0;
|
||||
std::variant<std::vector<std::string>, std::string> gWriteOrder;
|
||||
std::unordered_map<std::string, std::shared_ptr<BaseFactory>> gFactories;
|
||||
std::map<std::string, std::map<std::string, std::pair<YAML::Node, bool>>> gAssetDependencies;
|
||||
|
||||
Reference in New Issue
Block a user