summaryrefslogtreecommitdiff
path: root/tools/src/asset_processor/assets/macroasm.cpp
blob: c87f355b2bea93ce2236ef43a910f629a71c666d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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();
}