diff Game.cpp @ 2481:4f4eb812af28

KEY_ALL_ACCESS
author Ritor1
date Fri, 22 Aug 2014 17:41:25 +0600
parents 94cf712fc780
children 0683c0a38282
line wrap: on
line diff
--- a/Game.cpp	Fri Aug 22 11:07:07 2014 +0600
+++ b/Game.cpp	Fri Aug 22 17:41:25 2014 +0600
@@ -70,7 +70,6 @@
 
 
 
-
 Game *pGame;
 
 
@@ -1746,6 +1745,9 @@
             GUIWindow::Create(243, 162, 0, 0, WINDOW_PressedButton2, (int)pBtn_SliderLeft, (char *)1);
             pAudioPlayer->SetMasterVolume(pSoundVolumeLevels[uSoundVolumeMultiplier] * 128.0f);
             pAudioPlayer->PlaySound((SoundID)218, -1, 0, -1, 0, 0, 0, 0);
+			//int v = AIL_redbook_volume(pAudioPlayer->hAILRedbook);
+			//if (v)
+				//__debugbreak();
             continue;
           }
           if ( uMessageParam == 5 )//Increase sound level button right
@@ -4884,13 +4886,13 @@
 		hNWC = nullptr,
 		hMM7 = nullptr,
 		hVersion = nullptr;
-	if (!RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE", 0, 0x2001Fu, &hSoftware))
+	if (!RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE", 0, KEY_READ|KEY_WOW64_32KEY, &hSoftware))
 	{
-		if (!RegOpenKeyExA(hSoftware, "New World Computing", 0, 0x2001Fu, &hNWC))
+		if (!RegOpenKeyExA(hSoftware, "New World Computing", 0, KEY_READ|KEY_WOW64_32KEY, &hNWC))
 		{
-			if (!RegOpenKeyExA(hNWC, "Might and Magic VII", 0, 0x2001Fu, &hMM7))
+			if (!RegOpenKeyExA(hNWC, "Might and Magic VII", 0, KEY_READ|KEY_WOW64_32KEY, &hMM7))
 			{
-				if (!RegOpenKeyExA(hMM7, "1.0", 0, 0x2001Fu, &hVersion))
+				if (!RegOpenKeyExA(hMM7, "1.0", 0, KEY_READ|KEY_WOW64_32KEY, &hVersion))
 				{
 					DWORD cbData = 3;
 					if (!RegQueryValueExA(hVersion, "CDDrive", 0, 0, (BYTE *)drive, &cbData))
@@ -5269,17 +5271,17 @@
 		uTurnSpeed = (unsigned int)uCPUSpeed < 199 ? 128 : 64; // adjust turn speed to estimated fps
 		break;
 
-	case 1u:             // 16x
+	case 1:             // 16x
 		Log::Warning(L"x16 Turn Speed"); // really shouldn't use this mode
 		uTurnSpeed = 128;
 		break;
 
-	case 2u:             // 32x
+	case 2:             // 32x
 		Log::Warning(L"x32 Turn Speed"); // really shouldn't use this mode
 		uTurnSpeed = 64;
 		break;
 
-	case 3u:             // smooth
+	case 3:             // smooth
 		uTurnSpeed = 0;
 		break;
 	}