-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon.h
77 lines (67 loc) · 1.14 KB
/
common.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
68
69
70
71
72
73
74
75
76
77
// this contains common type definitions that are thoughought the code
// renamed to Utf8String in Thyme codebase
class AsciiString
{
AsciiStringData *data;
struct AsciiStringData
{
#ifdef DEBUG
char *debug_ptr;
#endif
uint16_t ref_count;
uint16_t num_chars_allocated;
// string data is stored immediately after the header.
};
}
class UnicodeString
{
UnicodeStringData *data;
struct UnicodeStringData
{
#ifdef DEBUG
wchar_t *debug_ptr;
#endif
uint16_t ref_count;
uint16_t num_chars_allocated;
// string data is stored immediately after the header.
};
};
// size is variable based on bit count, account for at least a dword when mapping these
template<int bits>
class BitFlags
{
std::bitset<bits> m_bits;
};
class FastCriticalSectionClass
{
unsigned int m_flag;
};
class Vector3
{
float X;
float Y;
float Z;
};
class Vector4
{
float X;
float Y;
float Z;
float W;
};
class Matrix3
{
Vector3 Row[3];
};
class Matrix3D
{
Vector4 Row[3];
};
class Matrix4
{
Vector4 Row[4];
};
class StringClass
{
char *m_buffer;
}