-
Notifications
You must be signed in to change notification settings - Fork 27
/
ExMultiRes.h
92 lines (74 loc) · 2.98 KB
/
ExMultiRes.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
/*==========================================================
* D2Ex2
* https://github.com/lolet/D2Ex2
* ==========================================================
* Copyright (c) 2011-2014 Bartosz Jankowski
*
* 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.
* ==========================================================
*/
#ifndef __EXMULTIRES_H__
#define __EXMULTIRES_H__
namespace ExMultiRes
{
struct ResMode
{
DWORD nWidth;
DWORD nHeight;
};
//#define GDI_MAXY 2000 // I think that's will be OK
//extern int gBufferXLookUpTable[GDI_MAXY + 1];
extern int *gptBufferXLookUpTable;
extern vector<ResMode> lResModes;
int EnumDisplayModes();
int FindDisplayMode(int Width, int Height);
bool InitImages();
void FreeImages();
void __stdcall D2CLIENT_OnResolutionSet();
void __fastcall D2CLIENT_SetResolution(int nMode);
void __fastcall D2CLIENT_ResizeView(int UiCover);
void __stdcall D2CLIENT_SetMousePos(int mX, int mY);
BOOL __stdcall D2GFX_InitWindow(HINSTANCE hInstance, LRESULT(__stdcall *pWndProc)(HWND, UINT, WPARAM, LPARAM), int nRenderMode, BOOL bWindowed);
void __stdcall D2GFX_GetModeParams(int nMode, unsigned int* pWidth, unsigned int* pHeight);
BOOL __stdcall D2GFX_SetResolution(int nMode, BOOL bUpdate);
void __stdcall D2GFX_SetStoredGammaAndContrast();
void __fastcall D2GFX_FillYBufferTable(void *ppvBits, int nWidth, int nHeight, int aZero);
//Getters
int __stdcall GFX_GetResolutionMode();
int __stdcall GFX_GetRenderType();
int __stdcall GFX_GetScreenHeight();
int __stdcall GFX_GetScreenWidth();
//Setters
void __stdcall GFX_SetResolutionMode(int nMode);
//Cleaners
void D2GFX_WindowCleanUp();
void D2GFX_Finish();
//GFX pos fixes
void __stdcall GetBeltPos(int nIndex, int nMode, BeltBox *out, int nBox);
void __stdcall GetBeltsTxtRecord(int nIndex, int nMode, BeltsTxt *out);
void __stdcall GetInventorySize(int nRecord, int nScreenMode, InventorySize *pOutRect);
void __stdcall GetInventoryGrid(int nRecord, int nScreenMode, InventoryGrid *pOut);
void __stdcall GetInventoryField(int nRecord, int nScreenMode, InventoryLayout *pOut, int nField);
// GFX fixups
void __stdcall D2CLIENT_FixMercScreenDesc();
void __stdcall D2CLIENT_FixMercScreenDescRestore();
void __stdcall DrawBorders();
void __stdcall DrawControlPanel();
void DrawMissingPieces();
//Driver handlers
BOOL __fastcall GLIDE_Init(HANDLE hWND, int nMode);
BOOL __fastcall GLIDE_ResizeWindow(HANDLE HWND, int nMode);
BOOL __fastcall GLIDE_SetRes(HANDLE hWND, int nMode);
bool enterFullscreen();
}
#endif