mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-14 22:03:27 +01:00
add support for Seven Kingdoms II
This commit is contained in:
parent
7ac70bd878
commit
9cefca463a
@ -354,6 +354,7 @@ Wine (Linux/macOS/Android) only: override `ddraw` in [winecfg](https://wiki.wine
|
||||
- Sega Touring Car
|
||||
- Septerra Core
|
||||
- Settlers 3
|
||||
- Seven Kingdoms II
|
||||
- Shadow Flare
|
||||
- Shadow Watch
|
||||
- Shogo - Mobile Armor Division
|
||||
|
@ -16,7 +16,7 @@ typedef struct HOOKLISTDATA {
|
||||
HMODULE mod;
|
||||
} HOOKLISTDATA;
|
||||
|
||||
typedef struct HOOKLIST { char module_name[32]; HOOKLISTDATA data[36]; } HOOKLIST;
|
||||
typedef struct HOOKLIST { char module_name[32]; HOOKLISTDATA data[37]; } HOOKLIST;
|
||||
|
||||
typedef BOOL(WINAPI* GETCURSORPOSPROC)(LPPOINT);
|
||||
typedef BOOL(WINAPI* CLIPCURSORPROC)(const RECT*);
|
||||
@ -35,6 +35,7 @@ typedef BOOL(WINAPI* SETWINDOWPOSPROC)(HWND, HWND, int, int, int, int, UINT);
|
||||
typedef BOOL(WINAPI* MOVEWINDOWPROC)(HWND, int, int, int, int, BOOL);
|
||||
typedef LRESULT(WINAPI* SENDMESSAGEAPROC)(HWND, UINT, WPARAM, LPARAM);
|
||||
typedef LONG(WINAPI* SETWINDOWLONGAPROC)(HWND, int, LONG);
|
||||
typedef LONG(WINAPI* SETWINDOWLONGWPROC)(HWND, int, LONG);
|
||||
typedef LONG(WINAPI* GETWINDOWLONGAPROC)(HWND, int);
|
||||
typedef BOOL(WINAPI* ENABLEWINDOWPROC)(HWND, BOOL);
|
||||
typedef HWND(WINAPI* CREATEWINDOWEXAPROC)(DWORD, LPCSTR, LPCSTR, DWORD, int, int, int, int, HWND, HMENU, HINSTANCE, LPVOID);
|
||||
@ -99,6 +100,7 @@ extern SETWINDOWPOSPROC real_SetWindowPos;
|
||||
extern MOVEWINDOWPROC real_MoveWindow;
|
||||
extern SENDMESSAGEAPROC real_SendMessageA;
|
||||
extern SETWINDOWLONGAPROC real_SetWindowLongA;
|
||||
extern SETWINDOWLONGWPROC real_SetWindowLongW;
|
||||
extern GETWINDOWLONGAPROC real_GetWindowLongA;
|
||||
extern ENABLEWINDOWPROC real_EnableWindow;
|
||||
extern CREATEWINDOWEXAPROC real_CreateWindowExA;
|
||||
|
@ -21,6 +21,7 @@ BOOL WINAPI fake_SetWindowPos(HWND hWnd, HWND hWndInsertAfter, int X, int Y, int
|
||||
BOOL WINAPI fake_MoveWindow(HWND hWnd, int X, int Y, int nWidth, int nHeight, BOOL bRepaint);
|
||||
LRESULT WINAPI fake_SendMessageA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
|
||||
LONG WINAPI fake_SetWindowLongA(HWND hWnd, int nIndex, LONG dwNewLong);
|
||||
LONG WINAPI fake_SetWindowLongW(HWND hWnd, int nIndex, LONG dwNewLong);
|
||||
LONG WINAPI fake_GetWindowLongA(HWND hWnd, int nIndex);
|
||||
BOOL WINAPI fake_EnableWindow(HWND hWnd, BOOL bEnable);
|
||||
BOOL WINAPI fake_DestroyWindow(HWND hWnd);
|
||||
|
@ -1550,6 +1550,10 @@ static void cfg_create_ini()
|
||||
"nonexclusive=true\n"
|
||||
"fake_mode=640x480x32\n"
|
||||
"\n"
|
||||
"; Seven Kingdoms II\n"
|
||||
"[7k2]\n"
|
||||
"fake_mode=352x240x32\n"
|
||||
"\n"
|
||||
"; Sid Meier's Simgolf\n"
|
||||
"[golf]\n"
|
||||
"fake_mode=640x480x16\n"
|
||||
|
@ -34,6 +34,7 @@ SETWINDOWPOSPROC real_SetWindowPos = SetWindowPos;
|
||||
MOVEWINDOWPROC real_MoveWindow = MoveWindow;
|
||||
SENDMESSAGEAPROC real_SendMessageA = SendMessageA;
|
||||
SETWINDOWLONGAPROC real_SetWindowLongA = SetWindowLongA;
|
||||
SETWINDOWLONGWPROC real_SetWindowLongW = SetWindowLongW;
|
||||
GETWINDOWLONGAPROC real_GetWindowLongA = GetWindowLongA;
|
||||
ENABLEWINDOWPROC real_EnableWindow = EnableWindow;
|
||||
CREATEWINDOWEXAPROC real_CreateWindowExA = CreateWindowExA;
|
||||
@ -96,6 +97,7 @@ HOOKLIST g_hook_hooklist[] =
|
||||
{ "MoveWindow", (PROC)fake_MoveWindow, (PROC*)&real_MoveWindow, 0 },
|
||||
{ "SendMessageA", (PROC)fake_SendMessageA, (PROC*)&real_SendMessageA, 0 },
|
||||
{ "SetWindowLongA", (PROC)fake_SetWindowLongA, (PROC*)&real_SetWindowLongA, 0 },
|
||||
{ "SetWindowLongW", (PROC)fake_SetWindowLongW, (PROC*)&real_SetWindowLongW, 0 },
|
||||
{ "GetWindowLongA", (PROC)fake_GetWindowLongA, (PROC*)&real_GetWindowLongA, 0 },
|
||||
{ "EnableWindow", (PROC)fake_EnableWindow, (PROC*)&real_EnableWindow, 0 },
|
||||
{ "CreateWindowExA", (PROC)fake_CreateWindowExA, (PROC*)&real_CreateWindowExA, 0 },
|
||||
|
@ -448,7 +448,7 @@ LRESULT WINAPI fake_SendMessageA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lPar
|
||||
|
||||
LONG WINAPI fake_SetWindowLongA(HWND hWnd, int nIndex, LONG dwNewLong)
|
||||
{
|
||||
if (g_ddraw.ref && g_ddraw.hwnd == hWnd)
|
||||
if (g_ddraw.ref && g_ddraw.hwnd && g_ddraw.hwnd == hWnd)
|
||||
{
|
||||
if (nIndex == GWL_STYLE)
|
||||
return 0;
|
||||
@ -465,6 +465,17 @@ LONG WINAPI fake_SetWindowLongA(HWND hWnd, int nIndex, LONG dwNewLong)
|
||||
return real_SetWindowLongA(hWnd, nIndex, dwNewLong);
|
||||
}
|
||||
|
||||
LONG WINAPI fake_SetWindowLongW(HWND hWnd, int nIndex, LONG dwNewLong)
|
||||
{
|
||||
if (g_ddraw.ref && g_ddraw.hwnd && g_ddraw.hwnd == hWnd)
|
||||
{
|
||||
if (nIndex == GWL_STYLE)
|
||||
return 0;
|
||||
}
|
||||
|
||||
return real_SetWindowLongW(hWnd, nIndex, dwNewLong);
|
||||
}
|
||||
|
||||
LONG WINAPI fake_GetWindowLongA(HWND hWnd, int nIndex)
|
||||
{
|
||||
if (g_ddraw.ref && g_ddraw.hwnd == hWnd)
|
||||
|
Loading…
x
Reference in New Issue
Block a user