-
Notifications
You must be signed in to change notification settings - Fork 13
/
m_Environment.h
101 lines (61 loc) · 2.49 KB
/
m_Environment.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
#ifdef FUNCTION_DECLARE
#define MODULE_ENVIRONMENT
void WeatherPatch_ASM();
void LightingPatch_ASM();
void InfravisionPatch_ASM();
void __stdcall ShakeScreenPatch(DWORD *pPosX, DWORD *pPosY);
#endif
#ifdef VARIABLE_DEFINE
GVAR2(ToggleVar, tFullVisuals, 1, 0, -1, 1, 0)
GVAR2(ToggleVar, tWeather, 1, 0, -1, 1, 0)
GVAR2(ToggleVar, tLightRadiu, 1, 0, -1, 1, 0)
GVAR2(ToggleVar, tInfravision, 1, 1, -1, 1, 0)
GVAR2(ToggleVar, tScreenshake, 1, 0, -1, 1, 0)
GVAR2(BYTE, afMonsterCorpses[1000] , {0})
GVAR2(BYTE, afMissileCorpses[1000] , {0})
GVAR2(ToggleVar, tHiddenCorpse, 1, 0, -1, 1, 0)
#endif
#ifdef PATH_INSTALL
{PatchFILL, DLLOFFSET(D2CLIENT, 0x6FB02A64), INST_NOP, 2 , &fDefault}, //floors inside
{PatchFILL, DLLOFFSET(D2CLIENT, 0x6FB02AAA), INST_NOP, 2 , &fDefault}, //walls inside
{PatchCALL, DLLOFFSET(D2CLIENT, 0x6FAE5ED7), (DWORD)LightingPatch_ASM, 6 , &fDefault},
{PatchJMP, DLLOFFSET(D2COMMON, 0x6FD6E216), (DWORD)WeatherPatch_ASM, 5 , &fDefault},
{PatchCALL, DLLOFFSET(D2CLIENT, 0x6FAE2BB2), (DWORD)ShakeScreenPatch, 5 , &fDefault},
{PatchCALL, DLLOFFSET(D2CLIENT, 0x6FB04ED5), (DWORD)InfravisionPatch_ASM, 5 , &fDefault},
#endif
#ifdef CONFIG_LOAD
{1, "FullVisualsToggle", &tFullVisuals },
{1, "WeatherToggle", &tWeather },
{1, "LightRadiusToggle", &tLightRadiu },
{1, "InfravisionToggle", &tInfravision },
{1, "ScreenShakeToggle", &tScreenshake },
{5, "MissileCorpses", &afMissileCorpses, 1,{1000}},
{5, "MonsterCorpses", &afMonsterCorpses, 1,{1000}},
{1, "HiddenCorpsesToggle", &tHiddenCorpse },
#endif
#ifdef RUN_ONCE
#endif
#ifdef RUN_LOOP
#endif
#ifdef INIT_VALUE
memset(afMonsterCorpses, 1, sizeof(afMonsterCorpses));
memset(afMissileCorpses, 1, sizeof(afMissileCorpses));
#endif
#ifdef FIX_VALUE
if ( tWeather.isLoad==FALSE ){
tWeather.isOn = tFullVisuals.isOn;
tWeather.key = tFullVisuals.key;
}
if ( tLightRadiu.isLoad==FALSE ){
tLightRadiu.isOn = tFullVisuals.isOn;
tLightRadiu.key = tFullVisuals.key;
}
if ( tInfravision.isLoad==FALSE ){
tInfravision.isOn = tFullVisuals.isOn;
tInfravision.key = tFullVisuals.key;
}
if ( tScreenshake.isLoad==FALSE ){
tScreenshake.isOn = tFullVisuals.isOn;
tScreenshake.key = tFullVisuals.key;
}
#endif