Restructure asset processor

This commit is contained in:
octorock
2021-11-07 18:38:04 +01:00
parent 473bc5f260
commit e44d0e3fc9
45 changed files with 3832 additions and 2522 deletions
+20
View File
@@ -0,0 +1,20 @@
#include "macroasm.h"
#include <fstream>
std::filesystem::path BaseMacroAsmAsset::generateAssetPath() {
std::filesystem::path path = this->path;
return path.replace_extension(".s");
}
std::filesystem::path BaseMacroAsmAsset::generateBuildPath() {
std::filesystem::path path = this->path;
return path.replace_extension(".s");
}
void BaseMacroAsmAsset::extractBinary(const std::vector<char>& baserom) {
BaseAsset::extractBinary(baserom);
// Create dummy .s file that just incbins the .bin file.
std::ofstream out(this->assetPath);
out << "\t.incbin " << this->path << "\n";
out.close();
}