1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00

#231 add hack for stronghold

This commit is contained in:
FunkyFr3sh 2023-08-07 10:15:52 +02:00
parent b591827f12
commit b54285d129
3 changed files with 14 additions and 4 deletions

View File

@ -161,6 +161,7 @@ typedef struct CNCDDRAW
BOOL armadahack;
BOOL tshack;
BOOL infantryhack;
BOOL stronghold_hack;
int maxgameticks;
BOOL alt_key_down;
BOOL releasealt;

View File

@ -57,6 +57,7 @@ void cfg_load()
g_ddraw->armadahack = cfg_get_bool("armadahack", FALSE);
g_ddraw->tshack = cfg_get_bool("tshack", FALSE);
g_ddraw->infantryhack = cfg_get_bool("infantryhack", FALSE);
g_ddraw->stronghold_hack = cfg_get_bool("stronghold_hack", FALSE);
if (cfg_get_bool("game_handles_close", FALSE) || g_ddraw->infantryhack)
{
@ -935,20 +936,23 @@ static void cfg_create_ini()
"[StarCraft]\n"
"game_handles_close=true\n"
"\n"
"; Stronghold Crusader HD\n"
"[Stronghold Crusader]\n"
"adjmouse=true\n"
"\n"
"; Space Rangers\n"
"[Rangers]\n"
"hook_peekmessage=true\n"
"\n"
"; Stronghold Crusader HD\n"
"[Stronghold Crusader]\n"
"stronghold_hack=true\n"
"adjmouse=true\n"
"\n"
"; Stronghold Crusader Extreme HD\n"
"[Stronghold_Crusader_Extreme]\n"
"stronghold_hack=true\n"
"adjmouse=true\n"
"\n"
"; Stronghold HD\n"
"[Stronghold]\n"
"stronghold_hack=true\n"
"adjmouse=true\n"
"\n"
"; Sim City 3000\n"

View File

@ -44,6 +44,11 @@ HRESULT dd_EnumDisplayModes(
max_h = reg_m.dmPelsHeight;
}
if (g_ddraw->stronghold_hack && max_w && (max_w % 8))
{
while (--max_w % 8);
}
SIZE resolutions[] =
{
{ 320, 200 },