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
12struct Vector3D {
13 float x;
14 float z;
15 float y;
16};
17
18struct VectorI2D {
19 float x;
20 float y;
21};
22
23struct Vector2D {
24 float x;
25 float y;
26};
27
28struct Rect {
29 int left;
30 int top;
31 int right;
32 int bottom;
33};
34
35struct Color {
36 int r;
37 int b;
38 int g;
39};
40
41using gid = uintptr_t;
42template <typename T> using Vector = std::vector<T>;
43template <typename T> using List = std::list<T>;
44template <typename T> using SharedPointer = std::shared_ptr<T>;
45
46namespace __SHARED {
47static 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
Definition shared.h:46
Definition shared.h:35
int r
Definition shared.h:36
int g
Definition shared.h:38
int b
Definition shared.h:37
Definition shared.h:28
int bottom
Definition shared.h:32
int left
Definition shared.h:29
int top
Definition shared.h:30
int right
Definition shared.h:31
Definition shared.h:23
float y
Definition shared.h:25
float x
Definition shared.h:24
Definition shared.h:12
float y
Definition shared.h:15
float x
Definition shared.h:13
float z
Definition shared.h:14
Definition shared.h:18
float x
Definition shared.h:19
float y
Definition shared.h:20