-
Notifications
You must be signed in to change notification settings - Fork 8
/
StdAfx.h
143 lines (125 loc) · 3.28 KB
/
StdAfx.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
// Precompiled header
// >> Include headers with stable code
// !! Recompile header after modifications
//
#pragma once
// 4018 - signed/unsigned mismatch
// 4244 - loss of data by assignment
// 4267 - possible loss of data (truncation)
// 4305 - truncation by assignment
// 4288 - disable warning for crap Microsoft extension screwing up the scope of variables defined in for loops
// 4311 - pointer truncation
// 4312 - pointer extension
#pragma warning(disable: 4018 4244 4267 4305 4288 4312 4311 4800)
// Header Version - Win7+
#define WINVER 0x0601
#define _WIN32_WINNT 0x0601
#define DIRECTINPUT_VERSION 0x0800
#define DPSAPI_VERSION 1
#define NOMINMAX 1
// WIN32
#include <windows.h>
#include <windowsx.h>
#include <atltypes.h>
#include <commctrl.h>
#include <richedit.h>
#include <shlobj.h>
#include <Rpc.h>
#include <Dbghelp.h>
#include <uxtheme.h>
#include <Objbase.h>
#include <Psapi.h>
#include <Shellapi.h>
#include <vssym32.h>
// CRT
#include <time.h>
#include <intrin.h>
#include <errno.h>
#include <crtdefs.h>
// STL
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cassert>
#include <cstdarg>
#include <cmath>
#include <cwchar>
#include <algorithm>
#include <list>
#include <map>
#include <vector>
#include <set>
#include <queue>
#include <stack>
#include <string>
#include <fstream>
#include <filesystem>
#include <stdexcept>
#include <exception>
#include <sstream>
#include <memory>
#include <iostream>
#include <complex>
#include <iomanip>
#include <numeric>
#include <functional>
#include <regex>
#include <unordered_map>
#include <unordered_set>
#include <thread>
#include <mutex>
#include <array>
// RPC
#include <Rpc.h>
// DIRECTX
#include <d3d9.h>
#include <d3d9types.h>
#include <d3dx9.h>
#include <d3dx9tex.h>
#include <dinput.h>
// xSE Common
#include <ITypes.h>
#include <IErrors.h>
#include <IDynamicCreate.h>
#include <ISingleton.h>
#include <IDirectoryIterator.h>
#include <IFileStream.h>
// SME
#include <MemoryHandler.h>
#include <INIManager.h>
#include <INIEditGUI.h>
#include <Functors.h>
#include <StringHelpers.h>
#include <UIHelpers.h>
#include <MiscGunk.h>
#include <MersenneTwister.h>
using namespace SME;
using namespace SME::INI;
using namespace SME::Functors;
using namespace SME::MemoryHandler;
// OBSE
#include "obse_common\obse_version.h"
#include "obse\PluginAPI.h"
#include "obse\GameTypes.h"
#include "obse\Utilities.h"
// BGSEEBASE
#include "[BGSEEBase]\Main.h"
#include "[BGSEEBase]\Console.h"
#include "[BGSEEBase]\UIManager.h"
#include "[BGSEEBase]\HookUtil.h"
// CSE
#include "Main.h"
#include "EditorAPI\TESEditorAPI.h"
#include "Settings.h"
#include "EventSources.h"
#include "EventSinks.h"
#include "Serialization.h"
#define PI 3.151592653589793
#undef SME_ASSERT
#define SME_ASSERT(_Expression) (void)( (!!(_Expression)) || (BGSEECONSOLE->LogAssertion("CSE", "ASSERTION FAILED (%s, %d): %s", __FILE__, __LINE__, #_Expression), _wassert(_CRT_WIDE(#_Expression), _CRT_WIDE(__FILE__), __LINE__), 0) )
// required for assertions in d'tors (for static instances) as we don't want it to trigger the crash handler recursively
#ifdef NDEBUG
#define DEBUG_ASSERT(_Expression) (void)( (!!(_Expression)) || (BGSEECONSOLE->LogAssertion("CSE", "ASSERTION FAILED (%s, %d): %s", __FILE__, __LINE__, #_Expression), 0) )
#else
#define DEBUG_ASSERT(expr) SME_ASSERT(expr)
#endif