summaryrefslogtreecommitdiff
path: root/src/factories/pm64/ImgFXAnimFactory.h
blob: acf928401d25bd4f0c5d6456c0a608ea7fc1df48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once

#include "factories/BaseFactory.h"
#include "types/RawBuffer.h"

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

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

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