summaryrefslogtreecommitdiff
path: root/src/factories/oot/OoTCurveAnimationFactory.h
blob: 55b837b78705534488d6b854c143e08b7f180b10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once

#include "factories/BaseFactory.h"
#include "OoTAnimationTypes.h"
#include <vector>

namespace OoT {

class OoTCurveAnimationData : public IParsedData {
public:
    int16_t frameCount;
    std::vector<uint8_t> refIndexArr;
    std::vector<CurveInterpKnot> transformDataArr;
    std::vector<int16_t> copyValuesArr;
};

class OoTCurveAnimationBinaryExporter : public BaseExporter {
    ExportResult Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName,
                        YAML::Node& node, std::string* replacement) override;
};

class OoTCurveAnimationFactory : public BaseFactory {
public:
    std::optional<std::shared_ptr<IParsedData>> parse(std::vector<uint8_t>& buffer, YAML::Node& data) override;
    std::unordered_map<ExportType, std::shared_ptr<BaseExporter>> GetExporters() override {
        return {
            REGISTER(Binary, OoTCurveAnimationBinaryExporter)
        };
    }
};

} // namespace OoT