1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-31 02:04:10 +02:00

enable vhack by default for worms 2

This commit is contained in:
FunkyFr3sh 2024-05-13 04:21:54 +02:00
parent 70f0264b19
commit 8de39f6590
2 changed files with 10 additions and 2 deletions

View File

@ -1059,6 +1059,7 @@ static void cfg_create_ini()
"\n" "\n"
"; Worms 2\n" "; Worms 2\n"
"[worms2]\n" "[worms2]\n"
"vhack=true\n"
"flipclear=true\n" "flipclear=true\n"
"game_handles_close=true\n" "game_handles_close=true\n"
"center_cursor_fix=true\n" "center_cursor_fix=true\n"

View File

@ -1213,10 +1213,17 @@ HRESULT dd_SetCooperativeLevel(HWND hwnd, DWORD dwFlags)
g_ddraw.upscale_hack_height = 400; g_ddraw.upscale_hack_height = 400;
} }
else if (g_ddraw.isworms2) else if (g_ddraw.isworms2)
{
if (memcmp((char*)GetModuleHandleA(NULL) + 0x00010000, "\x17\x81\xC2\x00\x80\x00\x00\x89", 8) != 0)
{
g_ddraw.isworms2 = FALSE;
}
else
{ {
g_ddraw.upscale_hack_width = 80; g_ddraw.upscale_hack_width = 80;
g_ddraw.upscale_hack_height = 60; g_ddraw.upscale_hack_height = 60;
} }
}
if (g_config.vhack && !g_ddraw.isredalert && !g_ddraw.iscnc1 && !g_ddraw.iskkndx && !g_ddraw.isworms2) if (g_config.vhack && !g_ddraw.isredalert && !g_ddraw.iscnc1 && !g_ddraw.iskkndx && !g_ddraw.isworms2)
{ {