-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfoart.h
67 lines (55 loc) · 891 Bytes
/
foart.h
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#pragma once
#include "ByteReader.hpp"
#include <vector>
struct ucolor
{
uint8_t r;
uint8_t g;
uint8_t b;
uint8_t a;
};
class frame_t
{
public:
bool is_shared;
uint16_t width;
uint16_t height;
int16_t next_x;
int16_t next_y;
std::vector<ucolor> pixels;
uint16_t shared_indx;
void read(ByteReader* reader);
};
class hdr_t
{
public:
uint16_t frames_count;
uint16_t anim_ticks;
uint8_t dirs;
void read(ByteReader* reader);
};
class data_t
{
public:
hdr_t* hdr_ptr;
int16_t offs_x;
int16_t offs_y;
std::vector<frame_t> frames;
void read(ByteReader* reader);
};
class file_t
{
public:
uint8_t check_num1;
hdr_t hdr;
std::vector<data_t> data;
void read(ByteReader* reader);
};
class oldfile_t // Old file format, only for FO2 graphics support - APAMk2
{
public:
uint32_t width;
uint32_t height;
std::vector<ucolor> pixels;
void read(ByteReader* reader);
};