comparison mm7_2.cpp @ 731:de482c901171

Moved unused CPU detection stuff to a separate file.
author Nomad
date Fri, 22 Mar 2013 11:18:51 +0200
parents 9f596a163257
children 700b58aac975
comparison
equal deleted inserted replaced
730:79ad0526166c 731:de482c901171
9748 pVideoPlayer = new VideoPlayer; 9748 pVideoPlayer = new VideoPlayer;
9749 pVideoPlayer->Initialize(); 9749 pVideoPlayer->Initialize();
9750 9750
9751 dword_6BE364_game_settings_1 |= 0x4000; 9751 dword_6BE364_game_settings_1 |= 0x4000;
9752 9752
9753 if ( uTurnSpeed )
9754 {
9755 switch ( uTurnSpeed ) 9753 switch ( uTurnSpeed )
9756 { 9754 {
9757 case 1u: 9755 case 0: // undefined turn option
9756 __debugbreak(); // really shouldn't use this mode
9757 uTurnSpeed = (unsigned int)uCPUSpeed < 199 ? 128 : 64; // adjust turn speed to estimated fps
9758 break;
9759
9760 case 1u: // 16x
9761 Log::Warning(L"x16 Turn Speed"); // really shouldn't use this mode
9758 uTurnSpeed = 128; 9762 uTurnSpeed = 128;
9759 break; 9763 break;
9760 case 2u: 9764
9765 case 2u: // 32x
9766 Log::Warning(L"x32 Turn Speed"); // really shouldn't use this mode
9761 uTurnSpeed = 64; 9767 uTurnSpeed = 64;
9762 break; 9768 break;
9763 case 3u: 9769
9770 case 3u: // smooth
9764 uTurnSpeed = 0; 9771 uTurnSpeed = 0;
9765 break; 9772 break;
9766 } 9773 }
9767 } 9774
9768 else 9775 initing = false; //ADDED Gloval
9769 {
9770 uTurnSpeed = (unsigned int)uCPUSpeed < 0xC7 ? 128 : 64; // adjust turn speed to estimated fps
9771 }
9772 initing=false; //ADDED Gloval
9773 return true; 9776 return true;
9774 } 9777 }
9775 9778
9776 9779
9777 9780
10062 new_sky = true; 10065 new_sky = true;
10063 } 10066 }
10064 stru_51076C.registry_debug_flags = ReadWindowsRegistryInt("debug flags", 0); 10067 stru_51076C.registry_debug_flags = ReadWindowsRegistryInt("debug flags", 0);
10065 10068
10066 10069
10067 v8 = sub_4AC1C9(0, (Vec4_int_ *)a2); 10070 /*v8 = _4AC1C9_get_cpu_speed(0, (Vec4_int_ *)a2);
10068 Rect.left = *(int *)v8; 10071 Rect.left = *(int *)v8;
10069 Rect.top = *(int *)(v8 + 4); 10072 Rect.top = *(int *)(v8 + 4);
10070 Rect.right = *(int *)(v8 + 8); 10073 Rect.right = *(int *)(v8 + 8);
10071 Rect.bottom = *(int *)(v8 + 12); 10074 Rect.bottom = *(int *)(v8 + 12);
10072 uCPUSpeed = Rect.bottom; 10075 uCPUSpeed = Rect.bottom;*/
10076 uCPUSpeed = 2048; // about 2GHz
10073 10077
10074 10078
10075 if (MM7_Initialize()) 10079 if (MM7_Initialize())
10076 { 10080 {
10077 Log::Warning(L"MM init: ok"); 10081 Log::Warning(L"MM init: ok");