forked from Ares-Developers/YRpp
-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathYRPPCore.h
64 lines (46 loc) · 1.21 KB
/
YRPPCore.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
#pragma once
typedef unsigned char BYTE;
typedef unsigned short WORD;
typedef unsigned long DWORD;
// the most basic globals
#include <Fundamentals.h>
//Syringe interaction header - also includes <windows.h>
#include <Syringe.h>
//Assembly macros
#include <ASMMacros.h>
#include <Memory.h>
#include <wchar.h>
#include <cstdio>
#include <Helpers/EnumFlags.h>
//Avoid default CTOR trick
#define DECLARE_PROPERTY(type,name)\
union{\
type name; \
char __##name[sizeof(type)]; \
}
#define DECLARE_PROPERTY_ARRAY(type,name,cnt)\
union{\
type name[cnt]; \
char __##name[sizeof(type) * cnt]; \
}
//Not gettable/settable members
#define PROTECTED_PROPERTY(type,name)\
protected:\
type name; \
public:
/*
Operation: The Cleansing
These two replace a function's implementation.
R0 is used for functions which return a numeric value or a pointer.
RX is for functions without a return type.
Functions that return struct instances will have to be written manually.
I chose short names to keep things clean.
Example usage:
virtual int foo(int bar) R0;
virtual void alla(double malla) RX;
*/
#define R0 {return 0;}
#define RX {}
#define RT(type) {return type();}
#define NOVTABLE __declspec(novtable)
struct noinit_t final {};