2022-07-02 15:07:54 +00:00
|
|
|
#pragma once
|
|
|
|
#include "common.h"
|
|
|
|
|
2022-12-24 03:04:04 +00:00
|
|
|
static HWND(WINAPI* TrueCreateWindowExA)(DWORD dwExStyle, LPCSTR lpClassName, LPCSTR lpWindowName,
|
|
|
|
DWORD dwStyle, int X, int Y, int nWidth, int nHeight,
|
|
|
|
HWND hWndParent, HMENU hMenu, HINSTANCE hInstance,
|
|
|
|
LPVOID lpParam);
|
|
|
|
static HWND(WINAPI* TrueCreateWindowExW)(DWORD dwExStyle, LPCWSTR lpClassName, LPCWSTR lpWindowName,
|
|
|
|
DWORD dwStyle, int X, int Y, int nWidth, int nHeight,
|
|
|
|
HWND hWndParent, HMENU hMenu, HINSTANCE hInstance,
|
|
|
|
LPVOID lpParam);
|
|
|
|
static BOOL(WINAPI* TrueSetSystemCursor)(HCURSOR hcur, DWORD id);
|
2023-01-21 18:51:13 +00:00
|
|
|
static IDirect3D9*(WINAPI* TrueDirect3DCreate9)(UINT SDKVersion);
|
|
|
|
static int(WINAPI* TrueGetSystemMetrics)(int nIndex);
|
|
|
|
|
2023-02-14 07:09:08 +00:00
|
|
|
static void (*__cdecl True_glutFullScreen)(void);
|
|
|
|
static void (*__cdecl True_glutSwapBuffers)(void);
|
|
|
|
static void (*__cdecl True_glutInitDisplayMode)(unsigned int mode);
|
|
|
|
static LONG (*WINAPI TrueChangeDisplaySettingsExW)(LPCWSTR lpszDeviceName, DEVMODEW* lpDevMode,
|
|
|
|
HWND hwnd, DWORD dwflags, LPVOID lParam);
|
|
|
|
|
2023-01-21 18:51:13 +00:00
|
|
|
#define _GetSystemMetrics (TrueGetSystemMetrics ? TrueGetSystemMetrics : GetSystemMetrics)
|
2022-07-02 15:07:54 +00:00
|
|
|
|
2022-12-24 03:04:04 +00:00
|
|
|
void draw_rect(IDirect3DDevice9* dev, int x, int y, int w, int h, unsigned char r, unsigned char g,
|
|
|
|
unsigned char b);
|
2022-07-02 15:07:54 +00:00
|
|
|
|
2023-02-14 07:09:08 +00:00
|
|
|
typedef VOID(__stdcall FnEndScene)(unsigned int hookType, IDirect3DDevice9* dev);
|
2022-07-02 15:07:54 +00:00
|
|
|
|
|
|
|
typedef struct end_scene_hook {
|
|
|
|
FnEndScene* hook;
|
|
|
|
struct end_scene_hook* next;
|
|
|
|
} end_scene_hook_t;
|
|
|
|
end_scene_hook_t* end_scene_hook_list;
|
|
|
|
|
2023-02-14 07:09:08 +00:00
|
|
|
#define UI_HOOK_DX9 0
|
|
|
|
#define UI_HOOK_GLUT 1
|
|
|
|
|
2022-07-02 15:07:54 +00:00
|
|
|
void register_gui_hook(FnEndScene* end_scene);
|
|
|
|
void hook_gui();
|
2022-12-24 03:04:04 +00:00
|
|
|
void setup_hud_gui();
|
2023-02-10 04:22:16 +00:00
|
|
|
|
|
|
|
extern HWND mainWindow;
|