summaryrefslogtreecommitdiff
path: root/tools/src/asset_processor/offsets.cpp
diff options
context:
space:
mode:
authoroctorock <79596758+octorock@users.noreply.github.com>2022-09-03 20:14:10 +0200
committeroctorock <79596758+octorock@users.noreply.github.com>2022-09-03 23:33:35 +0200
commita83c83ee8cc500f3128902a1c1c47c9ba2ae4981 (patch)
tree81c1f5ae649ccac932b35b057b18a7b8bf2bdba5 /tools/src/asset_processor/offsets.cpp
parentbdf796fffe54f7b80224b0ed342a91fd9d49d5cf (diff)
Extract some data
Sort data according to the compilation using they belong to. Extract background animations.
Diffstat (limited to 'tools/src/asset_processor/offsets.cpp')
-rw-r--r--tools/src/asset_processor/offsets.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/src/asset_processor/offsets.cpp b/tools/src/asset_processor/offsets.cpp
index 827fe7a6..f865a85a 100644
--- a/tools/src/asset_processor/offsets.cpp
+++ b/tools/src/asset_processor/offsets.cpp
@@ -1,9 +1,10 @@
#include "offsets.h"
-OffsetCalculator::OffsetCalculator(const std::filesystem::path& outputFile, int baseOffset_)
- : output(outputFile), baseOffset(baseOffset_), lastEnd(0) {
+OffsetCalculator::OffsetCalculator(const std::filesystem::path& asmOutputFile, const std::filesystem::path& cOutputFile, int baseOffset_)
+ : asmOutput(asmOutputFile), cOutput(cOutputFile), baseOffset(baseOffset_), lastEnd(0) {
}
void OffsetCalculator::addAsset(int start, const std::string& symbol) {
- output << "\t.equiv offset_" << symbol << ", " << start - baseOffset << std::endl;
+ asmOutput << "\t.equiv offset_" << symbol << ", " << start - baseOffset << std::endl;
+ cOutput << "#define offset_" << symbol << " " << start - baseOffset << std::endl;
} \ No newline at end of file