-
Notifications
You must be signed in to change notification settings - Fork 0
/
datatypes.h
63 lines (52 loc) · 1.22 KB
/
datatypes.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
/*
This file is a part of the
Amagami SS PS2 Translation Project
You may feel free to use this code if you want so.
I provide no guarantee that this code is working,
useful or anything else. Use it at your own risk.
*/
#ifndef DATATYPES_H
#define DATATYPES_H
#include <QtGlobal>
struct arc_entry_t
{
quint32 unknown0;
quint32 unknown1;
quint32 offset;
quint32 size;
static bool lessThan(const arc_entry_t& entry1, const arc_entry_t& entry2)
{
return (entry1.offset < entry2.offset);
}
};
typedef struct packed_block_entry_t
{
bool isRef;
union
{
quint8 value;
quint16 ref;
};
size_t start;
size_t length;
} packed_block_entry_t;
typedef struct packed_block_t
{
packed_block_entry_t entry[8];
quint16 header;
} packed_block_t;
typedef struct match_info_t
{
size_t maxMatchedLength;
size_t maxChunkStart;
bool valid;
quint8 chunkStart;
} match_info_t;
typedef struct size_offset_t
{
quint32 size;
quint32 offset;
size_offset_t() {}
size_offset_t(quint32 _size, quint32 _offset) : size(_size), offset(_offset) {}
} size_offset_t;
#endif // DATATYPES_H