Torch
Loading...
Searching...
No Matches
GruntyQuestionFactory.h
1#pragma once
2
3#include "DialogFactory.h"
4#include <factories/BaseFactory.h>
5
6namespace BK64 {
7
8typedef struct OptionString {
9 uint8_t cmd;
10 uint8_t unk0;
11 uint8_t unk1;
12 std::string str;
14
15class GruntyQuestionData : public IParsedData {
16 public:
17 std::vector<DialogString> mText;
18 std::vector<OptionString> mOptions;
19
20 GruntyQuestionData(std::vector<DialogString> text, std::vector<OptionString> options)
21 : mText(std::move(text)), mOptions(std::move(options)) {
22 }
23};
24
26 ExportResult Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName,
27 YAML::Node& node, std::string* replacement) override;
28};
29
31 ExportResult Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName,
32 YAML::Node& node, std::string* replacement) override;
33};
34
36 ExportResult Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName,
37 YAML::Node& node, std::string* replacement) override;
38};
39
41 ExportResult Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName,
42 YAML::Node& node, std::string* replacement) override;
43};
44
46 public:
47 std::optional<std::shared_ptr<IParsedData>> parse(std::vector<uint8_t>& buffer, YAML::Node& data) override;
48 std::optional<std::shared_ptr<IParsedData>> parse_modding(std::vector<uint8_t>& buffer, YAML::Node& data) override;
49 inline std::unordered_map<ExportType, std::shared_ptr<BaseExporter>> GetExporters() override {
50 return { REGISTER(Code, GruntyQuestionCodeExporter) REGISTER(Header, GruntyQuestionHeaderExporter)
51 REGISTER(Binary, GruntyQuestionBinaryExporter) REGISTER(Modding, GruntyQuestionModdingExporter) };
52 }
53 bool SupportModdedAssets() override {
54 return true;
55 }
56};
57} // namespace BK64
Definition GruntyQuestionFactory.h:30
Definition GruntyQuestionFactory.h:35
Definition GruntyQuestionFactory.h:45
Definition GruntyQuestionFactory.h:25
Definition GruntyQuestionFactory.h:40
Definition BaseFactory.h:95
Definition BaseFactory.h:101
Definition BaseFactory.h:87
Definition GruntyQuestionFactory.h:8