parse samp section for ABR version 6.2
This commit is contained in:
21
src/abr.h
21
src/abr.h
@@ -271,6 +271,25 @@ class ABR : public BinaryStream
|
||||
virtual std::string str(int indent, const std::string& prefix) const override
|
||||
{ return std::string(indent, '-') + prefix + fmt::format("point: [{}, {}]", x, y); }
|
||||
};
|
||||
struct Channel : public Type
|
||||
{
|
||||
uint32_t depth;
|
||||
Rectangle rect;
|
||||
uint8_t compression;
|
||||
std::vector<uint8_t> data;
|
||||
Channel() = default;
|
||||
Channel(uint32_t depth, const Rectangle& rect, uint8_t compression, std::vector<uint8_t>& data) :
|
||||
depth(depth), rect(rect), compression(compression), data(std::move(data)) { }
|
||||
};
|
||||
struct Image : public Type
|
||||
{
|
||||
uint32_t version; // = 3
|
||||
Rectangle rect;
|
||||
std::vector<Channel> channels;
|
||||
Image() = default;
|
||||
Image(uint32_t version, const Rectangle& rect) :
|
||||
version(version), rect(rect) { }
|
||||
};
|
||||
|
||||
public:
|
||||
ABR();
|
||||
@@ -302,6 +321,8 @@ private:
|
||||
bool section_desc();
|
||||
bool section_samp();
|
||||
bool section_patt();
|
||||
// Parse Virtual Memory Array List
|
||||
std::shared_ptr<Image> parse_vmem();
|
||||
std::shared_ptr<List> parse_vlls();
|
||||
std::shared_ptr<String> parse_text();
|
||||
std::shared_ptr<Descriptor> parse_objc();
|
||||
|
||||
Reference in New Issue
Block a user