forked from IAmTrial/SlashDiablo-HD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathD2Ptrs.h
108 lines (92 loc) · 7.63 KB
/
D2Ptrs.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
#pragma once
#ifndef _D2PTRS_H
#define _D2PTRS_H
/****************************************************************************
* *
* D2Ptrs.h *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
* You may obtain a copy of the License at *
* *
* http://www.apache.org/licenses/LICENSE-2.0 *
* *
* Unless required by applicable law or agreed to in writing, software *
* distributed under the License is distributed on an "AS IS" BASIS, *
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.*
* See the License for the specific language governing permissions and *
* limitations under the License. *
* *
*---------------------------------------------------------------------------*
* *
* https://github.com/olivier-verville/D2Template *
* *
* This file is used to declare pointers, be it function or variable *
* pointers, from the game's libraries. *
* *
* It is recommended that you keep this file organized by which dll the *
* pointer is imported from, what type of pointer it is, etc. Ordering *
* them by address can also end up being very useful *
* *
*****************************************************************************/
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// These are the macros used by the template core to declare ///
// pointers. Do not touch unless you know what you're doing ///
// ///
#define D2FUNC(DLL, NAME, RETURN, CONV, ARGS, OFFSET) typedef RETURN (##CONV##* DLL##_##NAME##_t ) ARGS; static DLL##_##NAME##_t DLL##_##NAME = (DLL##_##NAME##_t )( DLLBASE_##DLL + OFFSET); ///
#define D2VAR(DLL, NAME, TYPE, OFFSET) typedef TYPE DLL##_##NAME##_vt; static DLL##_##NAME##_vt * DLL##_##NAME = (DLL##_##NAME##_vt *)( DLLBASE_##DLL + OFFSET); ///
#define D2PTR(DLL, NAME, OFFSET) static DWORD NAME = (DLLBASE_##DLL + OFFSET); ///
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/********************************************************************************
* *
* D2GAME.DLL POINTERS *
* *
*********************************************************************************/
/********************************************************************************
* *
* D2CLIENT.DLL POINTERS *
* *
*********************************************************************************/
D2VAR(D2CLIENT, ScreenSizeX, DWORD, 0xDBC48);
D2VAR(D2CLIENT, ScreenSizeY, DWORD, 0xDBC4C);
D2VAR(D2CLIENT, PanelOffsetX, int, 0x11B9A0);
D2VAR(D2CLIENT, PanelOffsetY, int, 0x11B9A4);
/********************************************************************************
* *
* D2COMMON.DLL POINTERS *
* *
*********************************************************************************/
/********************************************************************************
* *
* D2DDRAW.DLL POINTERS *
* *
*********************************************************************************/
D2VAR(D2DDRAW, GameWindowSizeY, DWORD*, 0x101D8);
/********************************************************************************
* *
* D2GDI.DLL POINTERS *
* *
*********************************************************************************/
D2VAR(D2GDI, ForegroundRenderWidth, int, 0xCA9C);
/********************************************************************************
* *
* D2GFX.DLL POINTERS *
* *
*********************************************************************************/
D2FUNC(D2GFX, D2DrawImage, void, __stdcall, (int* pFrameNumber, int nXpos, int nYpos, DWORD color, int nTransTbl, unsigned char* pPalette), 0xB080)
/********************************************************************************
* *
* D2GLIDE.DLL POINTERS *
* *
*********************************************************************************/
D2VAR(D2GLIDE, ScreenSizeX, DWORD, 0x15A68);
D2VAR(D2GLIDE, ScreenSizeY, DWORD, 0x15B04);
/********************************************************************************
* *
* GLIDE3X.DLL POINTERS *
* *
*********************************************************************************/
D2VAR(GLIDE3X, GameWindowSizeX, DWORD*, 0x1C9A0);
D2VAR(GLIDE3X, GameWindowSizeY, DWORD*, 0x1C82C);
// end of file -----------------------------------------------------------------
#endif