This repository was archived by the owner on Mar 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathFA2PPCore.h
More file actions
59 lines (47 loc) · 1.21 KB
/
Copy pathFA2PPCore.h
File metadata and controls
59 lines (47 loc) · 1.21 KB
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
#pragma once
using BYTE = unsigned char;
using WORD = unsigned short;
using DWORD = unsigned long;
using byte = BYTE;
using word = WORD;
using dword = DWORD;
struct noinit_t final {};
//Assembly macros
#include "Helpers/CompileTime.h"
#include "Helpers/ASMMacros.h"
#include <Memory.h>
#include <wchar.h>
#include <cstdio>
//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)
#define elif else if
#define SAFE_RELEASE(ptr) {if(ptr) delete[] ptr;}