-
Notifications
You must be signed in to change notification settings - Fork 2
/
Common.h
54 lines (42 loc) · 1.8 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
#ifndef COMMON_H
#define COMMON_H
#if defined(_DEBUG) && defined(WIN32)
#define _CRTDBG_MAP_ALLOC 1
#endif
#define IN_EXT_VERSION2
#define COXSDK
#pragma warning(disable:4786)
// ----------------------------------------------
// VERSION AND BUILD YOUR EXTENSION CAN WORK WITH
// ----------------------------------------------
//#define TGFEXT // TGF, MMF Standard and MMF Pro
#define MMFEXT // MMF Standard and MMF Pro
//#define PROEXT // MMF Pro only
// Build number of the minimum required version of MMF
#define MINBUILD 249
// General includes
#include "ccxhdr.h"
#include "Surface.h"
// Specific to this cox
#include "Resource.h"
#include "DRValue.h"
#include "Main.h"
#include "TigsExt.hpp"
#include "ObjectSelection.h"
// Globals and Prototypes
extern HINSTANCE hInstLib;
extern short conditionsInfos[];
extern short actionsInfos[];
extern short expressionsInfos[];
long (WINAPI * ConditionJumps[])(LPRDATA rdPtr, long param1, long param2);
short (WINAPI * ActionJumps[])(LPRDATA rdPtr, long param1, long param2);
long (WINAPI * ExpressionJumps[])(LPRDATA rdPtr, long param);
// Used to ensure the MMF version is 1.5, you can safely ignore this
#if defined(MMFEXT)
#define IS_COMPATIBLE(v) (v->mvGetVersion != NULL && (v->mvGetVersion() & MMFBUILD_MASK) >= MINBUILD && (v->mvGetVersion() & MMFVERSION_MASK) >= MMFVERSION_20 && ((v->mvGetVersion() & MMFVERFLAG_MASK) & MMFVERFLAG_HOME) == 0)
#elif defined(PROEXT)
#define IS_COMPATIBLE(v) (v->mvGetVersion != NULL && (v->mvGetVersion() & MMFBUILD_MASK) >= MINBUILD && (v->mvGetVersion() & MMFVERSION_MASK) >= MMFVERSION_20 && ((v->mvGetVersion() & MMFVERFLAG_MASK) & MMFVERFLAG_PRO) != 0)
#else
#define IS_COMPATIBLE(v) (v->mvGetVersion != NULL && (v->mvGetVersion() & MMFBUILD_MASK) >= MINBUILD && (v->mvGetVersion() & MMFVERSION_MASK) >= MMFVERSION_20)
#endif
#endif