mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-15 06:04:49 +01:00
#383 add support for Dark Colony
This commit is contained in:
parent
d45f35ab57
commit
f4325a73f5
@ -9,7 +9,7 @@ set GIT6=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\
|
|||||||
|
|
||||||
set PATH=C:\w64devkit\bin;%GIT1%;%GIT2%;%GIT3%;%GIT4%;%GIT5%;%GIT6%;%PATH%
|
set PATH=C:\w64devkit\bin;%GIT1%;%GIT2%;%GIT3%;%GIT4%;%GIT5%;%GIT6%;%PATH%
|
||||||
|
|
||||||
make clean
|
|
||||||
make _WIN32_WINNT=0x0400
|
make _WIN32_WINNT=0x0400
|
||||||
|
|
||||||
pause
|
pause
|
||||||
|
@ -106,6 +106,7 @@ typedef struct CNCDDRAWCONFIG
|
|||||||
BOOL carma95_hack;
|
BOOL carma95_hack;
|
||||||
BOOL sirtech_hack;
|
BOOL sirtech_hack;
|
||||||
BOOL flightsim98_hack;
|
BOOL flightsim98_hack;
|
||||||
|
BOOL darkcolony_hack;
|
||||||
|
|
||||||
} CNCDDRAWCONFIG;
|
} CNCDDRAWCONFIG;
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@ typedef BOOL(__stdcall* SETPROCESSDPIAWARENESSCONTEXTPROC)(DPI_AWARENESS_CONTEXT
|
|||||||
|
|
||||||
#if (_WIN32_WINNT < _WIN32_WINNT_WINXP)
|
#if (_WIN32_WINNT < _WIN32_WINNT_WINXP)
|
||||||
#define SetThreadExecutionState(a)
|
#define SetThreadExecutionState(a)
|
||||||
|
#define DisableProcessWindowsGhosting()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -116,6 +116,7 @@ void cfg_load()
|
|||||||
GET_BOOL(g_config.carma95_hack, "carma95_hack", FALSE);
|
GET_BOOL(g_config.carma95_hack, "carma95_hack", FALSE);
|
||||||
GET_BOOL(g_config.sirtech_hack, "sirtech_hack", FALSE);
|
GET_BOOL(g_config.sirtech_hack, "sirtech_hack", FALSE);
|
||||||
GET_BOOL(g_config.flightsim98_hack, "flightsim98_hack", FALSE);
|
GET_BOOL(g_config.flightsim98_hack, "flightsim98_hack", FALSE);
|
||||||
|
GET_BOOL(g_config.darkcolony_hack, "darkcolony_hack", FALSE);
|
||||||
|
|
||||||
GameHandlesClose = GameHandlesClose || g_config.infantryhack;
|
GameHandlesClose = GameHandlesClose || g_config.infantryhack;
|
||||||
|
|
||||||
@ -874,6 +875,11 @@ static void cfg_create_ini()
|
|||||||
"[corsairs]\n"
|
"[corsairs]\n"
|
||||||
"adjmouse=true\n"
|
"adjmouse=true\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
"; Dark Colony\n"
|
||||||
|
"[dc16]\n"
|
||||||
|
"maxgameticks=30\n"
|
||||||
|
"darkcolony_hack=true\n"
|
||||||
|
"\n"
|
||||||
"; Divine Divinity\n"
|
"; Divine Divinity\n"
|
||||||
"[div]\n"
|
"[div]\n"
|
||||||
"resolutions=2\n"
|
"resolutions=2\n"
|
||||||
|
@ -57,6 +57,11 @@ BOOL WINAPI DllMain(HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
|
|||||||
g_dbg_exception_handle = add_handler(1, (PVECTORED_EXCEPTION_HANDLER)dbg_vectored_exception_handler);
|
g_dbg_exception_handle = add_handler(1, (PVECTORED_EXCEPTION_HANDLER)dbg_vectored_exception_handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (g_config.darkcolony_hack)
|
||||||
|
{
|
||||||
|
DisableProcessWindowsGhosting();
|
||||||
|
}
|
||||||
|
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (GetEnvironmentVariable("__COMPAT_LAYER", buf, sizeof(buf)))
|
if (GetEnvironmentVariable("__COMPAT_LAYER", buf, sizeof(buf)))
|
||||||
|
@ -2046,6 +2046,14 @@ HWND WINAPI fake_CreateWindowExA(
|
|||||||
dwStyle &= ~WS_POPUP;
|
dwStyle &= ~WS_POPUP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Dark Colony */
|
||||||
|
if (HIWORD(lpClassName) && _strcmpi(lpClassName, "Merc Direct Draw Driver") == 0 &&
|
||||||
|
lpWindowName && _strcmpi(lpWindowName, "Direct Draw Driver") == 0 &&
|
||||||
|
!dwExStyle)
|
||||||
|
{
|
||||||
|
dwExStyle |= WS_EX_APPWINDOW;
|
||||||
|
}
|
||||||
|
|
||||||
/* Fallout 1/2 */
|
/* Fallout 1/2 */
|
||||||
if (HIWORD(lpClassName) && _strcmpi(lpClassName, "GNW95 Class") == 0 &&
|
if (HIWORD(lpClassName) && _strcmpi(lpClassName, "GNW95 Class") == 0 &&
|
||||||
lpWindowName && strstr(lpWindowName, "FALLOUT"))
|
lpWindowName && strstr(lpWindowName, "FALLOUT"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user