Torch
Loading...
Searching...
No Matches
DrumFactory.h
1#pragma once
2
3#include <factories/BaseFactory.h>
4#include "AudioContext.h"
5
6class DrumData : public IParsedData {
7public:
8 uint8_t adsrDecayIndex;
9 uint8_t pan;
10 uint8_t isRelocated;
11 TunedSample tunedSample;
12 uint32_t envelope;
13};
14
16 ExportResult Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName, YAML::Node& node, std::string* replacement) override;
17};
18
20 ExportResult Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName, YAML::Node& node, std::string* replacement) override;
21};
22
24 ExportResult Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName, YAML::Node& node, std::string* replacement) override;
25};
26
27class DrumFactory : public BaseFactory {
28public:
29 std::optional<std::shared_ptr<IParsedData>> parse(std::vector<uint8_t>& buffer, YAML::Node& data) override;
30 inline std::unordered_map<ExportType, std::shared_ptr<BaseExporter>> GetExporters() override {
31 return {
32 REGISTER(Header, DrumHeaderExporter)
33 REGISTER(Binary, DrumBinaryExporter)
34 REGISTER(Code, DrumCodeExporter)
35 };
36 }
37
38 bool HasModdedDependencies() override { return true; }
39};
Definition BaseFactory.h:88
Definition BaseFactory.h:94
Definition DrumFactory.h:19
Definition DrumFactory.h:23
Definition DrumFactory.h:6
Definition DrumFactory.h:27
Definition DrumFactory.h:15
Definition BaseFactory.h:80
Definition AudioContext.h:7