summaryrefslogtreecommitdiff
path: root/tools/src/asset_processor/assets/macroasm.cpp
diff options
context:
space:
mode:
authorHenny022p <info@henny022.de>2022-01-31 17:30:51 +0100
committerHenny022p <info@henny022.de>2022-01-31 17:30:51 +0100
commit2a53ee4bf2ee7eea617280118c2188bffec77ae5 (patch)
tree85ed631ab330f9ca3734bb77253a374e3ef0de21 /tools/src/asset_processor/assets/macroasm.cpp
parent9b60d9c5e24ed592524c25a9dc013417d6e7ee0c (diff)
parent2b8d880ffc0a4548d25dc613d53a908d36362d84 (diff)
merge master
Diffstat (limited to 'tools/src/asset_processor/assets/macroasm.cpp')
-rw-r--r--tools/src/asset_processor/assets/macroasm.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/src/asset_processor/assets/macroasm.cpp b/tools/src/asset_processor/assets/macroasm.cpp
new file mode 100644
index 00000000..c64df2e1
--- /dev/null
+++ b/tools/src/asset_processor/assets/macroasm.cpp
@@ -0,0 +1,20 @@
+#include "macroasm.h"
+#include <fmt/format.h>
+#include <util/file.h>
+
+std::filesystem::path BaseMacroAsmAsset::generateAssetPath() {
+ std::filesystem::path asset_path = path;
+ return asset_path.replace_extension(".s");
+}
+
+std::filesystem::path BaseMacroAsmAsset::generateBuildPath() {
+ std::filesystem::path build_path = path;
+ return build_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.
+ auto file = util::open_file(assetPath, "w");
+ fmt::print(file.get(), "\t.incbin \"{}\"\n", path.native());
+} \ No newline at end of file