-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlugin.cpp
More file actions
63 lines (51 loc) · 2.12 KB
/
Plugin.cpp
File metadata and controls
63 lines (51 loc) · 2.12 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
60
61
62
63
#include "CKAll.h"
#include "DX8InputManager.h"
#ifdef CK_LIB
#define CreateNewManager CreateNewInputManager
#define RemoveManager RemoveInputManager
#define CKGetPluginInfoCount CKGet_InputManager_PluginInfoCount
#define CKGetPluginInfo CKGet_InputManager_PluginInfo
#define g_PluginInfo g_InputManager_PluginInfo
#else
#define CreateNewManager CreateNewManager
#define RemoveManager RemoveManager
#define CKGetPluginInfoCount CKGetPluginInfoCount
#define CKGetPluginInfo CKGetPluginInfo
#define g_PluginInfo g_PluginInfo
#endif
CKPluginInfo g_InputManager_PluginInfo;
#define DX8_INPUTMANAGER_GUID CKGUID(0xF787C904, 0)
void CKInitializeParameterTypes(CKContext *context);
void CKInitializeOperationTypes(CKContext *context);
void CKInitializeOperationFunctions(CKContext *context);
void CKUnInitializeParameterTypes(CKContext *context);
void CKUnInitializeOperationTypes(CKContext *context);
CKERROR CreateNewManager(CKContext *context)
{
CKInitializeParameterTypes(context);
CKInitializeOperationTypes(context);
CKInitializeOperationFunctions(context);
new DX8InputManager(context);
return CK_OK;
}
CKERROR RemoveManager(CKContext *context)
{
DX8InputManager *man = (DX8InputManager *)context->GetManagerByName("DirectX Input Manager");
if (man) delete man;
CKUnInitializeParameterTypes(context);
CKUnInitializeOperationTypes(context);
return CK_OK;
}
PLUGIN_EXPORT CKPluginInfo *CKGetPluginInfo(int Index)
{
g_InputManager_PluginInfo.m_Author = "Virtools";
g_InputManager_PluginInfo.m_Description = "DirectX Keyboard/Mouse/Joystick Manager";
g_InputManager_PluginInfo.m_Extension = "";
g_InputManager_PluginInfo.m_Type = CKPLUGIN_MANAGER_DLL;
g_InputManager_PluginInfo.m_Version = 0x000002;
g_InputManager_PluginInfo.m_InitInstanceFct = CreateNewManager;
g_InputManager_PluginInfo.m_ExitInstanceFct = RemoveManager;
g_InputManager_PluginInfo.m_GUID = DX8_INPUTMANAGER_GUID;
g_InputManager_PluginInfo.m_Summary = "DirectX Input Manager";
return &g_InputManager_PluginInfo;
}