forked from noah-/d2bs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
D2BS.h
121 lines (100 loc) · 2.39 KB
/
D2BS.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
#ifndef __D2BS_H__
#define __D2BS_H__
#pragma once
#define XP_WIN
#define D2BS_VERSION "1.5.1870"
#include <windows.h>
#include <vector>
#include "ScreenHook.h"
//struct Variables;
#define ArraySize(x) (sizeof((x)) / sizeof((x)[0]))
#define PRIVATE_UNIT 1
#define PRIVATE_ITEM 3
struct Private { DWORD dwPrivateType; };
struct Module
{
union {
HMODULE hModule;
DWORD dwBaseAddress;
};
DWORD _1;
char szPath[MAX_PATH];
};
struct Variables
{
int nChickenHP;
int nChickenMP;
DWORD dwInjectTime;
DWORD dwGameTime;
BOOL bDontCatchNextMsg;
BOOL bClickAction;
BOOL bNeedShutdown;
BOOL bUseGamePrint;
BOOL bShutdownFromDllMain;
BOOL bChangedAct;
BOOL bGameLoopEntered;
DWORD dwGameThreadId;
DWORD dwMaxGameTime;
DWORD dwGameTimeout;
BOOL bQuitOnError;
BOOL bQuitOnHostile;
BOOL bStartAtMenu;
BOOL bActive;
BOOL bBlockKeys;
BOOL bBlockMouse;
BOOL bDisableCache;
BOOL bUseProfileScript;
BOOL bLoadedWithCGuard;
BOOL bLogConsole;
BOOL bEnableUnsupported;
BOOL bForwardMessageBox;
BOOL bUseRawCDKey;
BOOL bQuitting;
BOOL bCacheFix;
BOOL bMulti;
BOOL bSleepy;
int dwMemUsage;
int dwConsoleFont;
HANDLE eventSignal;
Module* pModule;
HMODULE hModule;
HWND hHandle;
char szPath[_MAX_PATH];
char szScriptPath[_MAX_PATH];
char szProfile[256];
char szStarter[_MAX_FNAME];
char szDefault[_MAX_FNAME];
char szClassic[30];
char szLod[30];
char szTitle[128];
WNDPROC oldWNDPROC;
HHOOK hMouseHook;
HHOOK hKeybHook;
UINT_PTR uTimer;
long SectionCount;
std::map<unsigned __int32, CellFile*> mCachedCellFiles;
std::vector<std::pair<DWORD, DWORD> > vUnitList;
//std::list<Event*> EventList;
CRITICAL_SECTION cEventSection;
CRITICAL_SECTION cRoomSection;
CRITICAL_SECTION cMiscSection;
CRITICAL_SECTION cScreenhookSection;
CRITICAL_SECTION cPrintSection;
CRITICAL_SECTION cTextHookSection;
CRITICAL_SECTION cImageHookSection;
CRITICAL_SECTION cBoxHookSection;
CRITICAL_SECTION cFrameHookSection;
CRITICAL_SECTION cLineHookSection;
CRITICAL_SECTION cFlushCacheSection;
CRITICAL_SECTION cConsoleSection;
CRITICAL_SECTION cGameLoopSection;
CRITICAL_SECTION cUnitListSection;
CRITICAL_SECTION cFileSection;
DWORD dwSelectedUnitId;
DWORD dwSelectedUnitType;
POINT pMouseCoords;
};
extern Variables Vars;
BOOL Startup(void);
void Shutdown(void);
#endif