# HG changeset patch # User Ritor1 # Date 1406115416 -21600 # Node ID c59a8fddb5e8a2d6a52b289d424a74804ee04ab7 # Parent 1e1b2728b3d394f95ac765d4b8d2903f16497923# Parent c99c99439f6c299184e80597feb70a4b12b50390 Слияние diff -r 1e1b2728b3d3 -r c59a8fddb5e8 MMT.cpp --- a/MMT.cpp Wed Jul 23 17:34:47 2014 +0600 +++ b/MMT.cpp Wed Jul 23 17:36:56 2014 +0600 @@ -215,7 +215,9 @@ pTexture_PCX.Release(); sprintf(pContainerName, "data\\New_Icons/%s", "MMTTITLE.pcx");// pcx - pTexture_PCX.LoadPCXFile(pContainerName, 0); + if (pTexture_PCX.LoadPCXFile(pContainerName, 0) == 1) + Error("File not found: %s", pContainerName); + SetCurrentMenuID(MENU_MMT_MAIN_MENU);// enum MENU_STATE GUIWindows.h SetForegroundWindow(window->GetApiHandle()); SendMessageW(window->GetApiHandle(), WM_ACTIVATEAPP, 1, 0); diff -r 1e1b2728b3d3 -r c59a8fddb5e8 Registry.cpp --- a/Registry.cpp Wed Jul 23 17:34:47 2014 +0600 +++ b/Registry.cpp Wed Jul 23 17:36:56 2014 +0600 @@ -8,11 +8,11 @@ #include #include "Registry.h" +#include "ErrorHandling.h" //----- (004649EF) -------------------------------------------------------- int __fastcall ReadWindowsRegistryInt(const char *pKey, int uDefValue) { - int v3; // [sp+4h] [bp-24h]@1 DWORD cbData; // [sp+8h] [bp-20h]@1 LPCSTR lpValueName; // [sp+Ch] [bp-1Ch]@1 DWORD dwDisposition; // [sp+10h] [bp-18h]@2 @@ -22,7 +22,6 @@ HKEY v10; // [sp+20h] [bp-8h]@1 HKEY v11; // [sp+24h] [bp-4h]@1 - v3 = uDefValue; lpValueName = pKey; v11 = 0; v10 = 0; @@ -37,9 +36,13 @@ { if ( !RegCreateKeyExA(v10, "1.0", 0, "", 0, 0xF003Fu, 0, &v11, &dwDisposition) ) { - if ( RegQueryValueExA(v11, lpValueName, 0, 0, Data, &cbData) ) + LSTATUS status; + if ( status = RegQueryValueExA(v11, lpValueName, 0, 0, Data, &cbData) ) { - *(int *)Data = v3; + status; + GetLastError(); + + *(int *)Data = uDefValue; RegSetValueExA(v11, lpValueName, 0, 4u, Data, 4u); } RegCloseKey(v11); diff -r 1e1b2728b3d3 -r c59a8fddb5e8 mm7_2.cpp --- a/mm7_2.cpp Wed Jul 23 17:34:47 2014 +0600 +++ b/mm7_2.cpp Wed Jul 23 17:36:56 2014 +0600 @@ -1719,7 +1719,7 @@ else pGame->uFlags2 &= ~GAME_FLAGS_2_DRAW_BLOODSPLATS; - uTurnSpeed = ReadWindowsRegistryInt("TurnDelta", 0); + uTurnSpeed = ReadWindowsRegistryInt("TurnDelta", 3); if (!bNoSound) pAudioPlayer->Initialize();