-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathDC6Frame.cpp
More file actions
39 lines (25 loc) · 1.04 KB
/
DC6Frame.cpp
File metadata and controls
39 lines (25 loc) · 1.04 KB
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
#include "DC6Frame.h"
#include <bit>
namespace Abyss::DataTypes {
DC6Frame::DC6Frame(Streams::StreamReader &stream) {
_flipped = stream.readUInt32();
_width = stream.readUInt32();
_height = stream.readUInt32();
_xOffset = stream.readInt32();
_yOffset = stream.readInt32();
_unknown = stream.readUInt32();
_nextBlock = stream.readUInt32();
_length = stream.readUInt32();
_frameData.resize(_length + DC6TerminatorSize);
stream.readBytes(_frameData);
}
uint32_t DC6Frame::getFlipped() const { return _flipped; }
uint32_t DC6Frame::getWidth() const { return _width; }
uint32_t DC6Frame::getHeight() const { return _height; }
int32_t DC6Frame::getXOffset() const { return _xOffset; }
int32_t DC6Frame::getYOffset() const { return _yOffset; }
uint32_t DC6Frame::getUnknown() const { return _unknown; }
uint32_t DC6Frame::getNextBlock() const { return _nextBlock; }
uint32_t DC6Frame::getLength() const { return _length; }
const std::vector<std::byte>& DC6Frame::getFrameData() const { return _frameData; }
} // namespace Abyss::DataTypes