-
Notifications
You must be signed in to change notification settings - Fork 0
/
Common.h
83 lines (65 loc) · 1.74 KB
/
Common.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
#pragma once
// #define TGFEXT // TGF2, MMF2, MMF2 Dev
#define MMFEXT // MMF2, MMF2 Dev
// #define PROEXT // MMF2 Dev only
#include "Edif.h"
#include "Resource.h"
// Suppress the deprecated warnings for VC2005
//#define _CRT_SECURE_NO_WARNINGS
#include <string>
#include <sstream>
using namespace std;
// Unicode thing
#include <tchar.h>
typedef TCHAR tchar;
// rTemplate include
#define NOTOLD 1
// Useful macros
//#define OR ||
//#define AND &&
DWORD WINAPI SetBOMMarkASCThread(void *);
// edPtr : Used at edittime and saved in the MFA/CCN/EXE files
struct EDITDATA
{
// Header - required
extHeader eHeader;
// Object's data
// short swidth;
// short sheight;
};
class Extension;
struct RUNDATA
{
// Main header - required
headerObject rHo;
// Optional headers - depend on the OEFLAGS value, see documentation and examples for more info
// rCom rc; // Common structure for movements & animations
// rMvt rm; // Movements
// rSpr rs; // Sprite (displayable objects)
// rVal rv; // Alterable values
// Required
Extension * pExtension;
/*
You shouldn't add any variables or anything here. Add them as members
of the Extension class (Extension.h) instead.
*/
};
#ifndef _UNICODE
#define Uni(var) var
#else
#pragma warning (disable:4172)
inline wchar_t * Uni(const char * var)
{
wchar_t ret [255] (L"\0");
MultiByteToWideChar(CP_UTF8 /*CP_AC*/, NULL, var, -1, ret, 255);
return ret;
}
#pragma warning (default:4172)
#endif
#include "Extension.h"
struct BOMThreadData {
const char * FileToAddTo;
const int TypeOfBOM;
const bool IgnoreCurrentBOM;
BOMThreadData(const char * FTAT, const int TOB, const bool ICB) : FileToAddTo(FTAT), TypeOfBOM(TOB), IgnoreCurrentBOM(ICB) {}
};