summaryrefslogtreecommitdiff
path: root/src/factories/oot/OoTPlayerAnimationFactory.h
blob: 05f080badaddb9a5ffeb0d61c68f878bc32c587e (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#pragma once

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

namespace OoT {

class OoTPlayerAnimationHeaderData : public IParsedData {
public:
    int16_t frameCount;
    std::string animDataPath;
};

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

class OoTPlayerAnimationHeaderFactory : 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, OoTPlayerAnimationHeaderBinaryExporter)
        };
    }
};

class OoTPlayerAnimationData : public IParsedData {
public:
    std::vector<int16_t> limbRotData;
};

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

class OoTPlayerAnimationDataFactory : 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, OoTPlayerAnimationDataBinaryExporter)
        };
    }
};

} // namespace OoT