Cyrus Mod Loader
Loading...
Searching...
No Matches
shared.h
1
#pragma once
2
#include <Windows.h>
3
#include <fstream>
4
#include <iostream>
5
#include <mutex>
6
#include <ostream>
7
#include <sstream>
8
#include <string>
9
#include <unordered_map>
10
#include <unordered_set>
11
12
struct
Vector3D
{
13
float
x
;
14
float
z
;
15
float
y
;
16
};
17
18
struct
VectorI2D
{
19
float
x
;
20
float
y
;
21
};
22
23
struct
Vector2D
{
24
float
x
;
25
float
y
;
26
};
27
28
struct
Rect
{
29
int
left
;
30
int
top
;
31
int
right
;
32
int
bottom
;
33
};
34
35
struct
Color
{
36
int
r
;
37
int
b
;
38
int
g
;
39
};
40
41
using
gid = uintptr_t;
42
template
<
typename
T>
using
Vector = std::vector<T>;
43
template
<
typename
T>
using
List = std::list<T>;
44
template
<
typename
T>
using
SharedPointer = std::shared_ptr<T>;
45
46
namespace
__SHARED
{
47
static
uintptr_t base = 0;
48
}
49
50
#ifdef __INTELLISENSE__
51
#define STATIC_ASSERT(cond, msg) \
52
void x__COUNTER__() { \
53
do { \
54
} while (0); \
55
}
56
#else
57
#define STATIC_ASSERT(cond, msg) static_assert(cond, msg)
58
#endif
59
60
#define DEFINE_OFFSET_AND_STATIC_ASSERT(classname, member, offset) \
61
static const std::size_t offset_##member = offsetof(classname, member); \
62
STATIC_ASSERT(offset_##member == offset, \
63
#classname " " #member " alignment is incorrect")
64
65
#ifdef EXPORTING_DLL
66
#define CYRUS __declspec(dllexport)
67
#else
68
#define CYRUS __declspec(dllimport)
69
#endif
70
71
#ifdef __INTELLISENSE__
72
#define CYRUS __declspec(dllexport)
73
#endif
__SHARED
Definition
shared.h:46
Color
Definition
shared.h:35
Color::r
int r
Definition
shared.h:36
Color::g
int g
Definition
shared.h:38
Color::b
int b
Definition
shared.h:37
Rect
Definition
shared.h:28
Rect::bottom
int bottom
Definition
shared.h:32
Rect::left
int left
Definition
shared.h:29
Rect::top
int top
Definition
shared.h:30
Rect::right
int right
Definition
shared.h:31
Vector2D
Definition
shared.h:23
Vector2D::y
float y
Definition
shared.h:25
Vector2D::x
float x
Definition
shared.h:24
Vector3D
Definition
shared.h:12
Vector3D::y
float y
Definition
shared.h:15
Vector3D::x
float x
Definition
shared.h:13
Vector3D::z
float z
Definition
shared.h:14
VectorI2D
Definition
shared.h:18
VectorI2D::x
float x
Definition
shared.h:19
VectorI2D::y
float y
Definition
shared.h:20
src
Cyrus
shared.h
Generated by
1.11.0