Mercurial > mm7
comparison mm7_2.cpp @ 500:63b171359be2
Слияние
author | Ritor1 |
---|---|
date | Thu, 28 Feb 2013 10:36:37 +0600 |
parents | 59649750a054 |
children | 90fdb47bfcba |
comparison
equal
deleted
inserted
replaced
499:511e3a6f587a | 500:63b171359be2 |
---|---|
11419 } | 11419 } |
11420 pWindow_MainMenu->Release(); | 11420 pWindow_MainMenu->Release(); |
11421 pIcons_LOD->_4114F2(); | 11421 pIcons_LOD->_4114F2(); |
11422 } | 11422 } |
11423 | 11423 |
11424 | 11424 int __stdcall pWinProc(HWND hWnd, UINT Msg, WPARAM wParam, unsigned int lParam) |
11425 { | |
11426 return DefWindowProcA(hWnd, Msg, wParam, lParam); | |
11427 } | |
11425 | 11428 |
11426 | 11429 |
11427 //----- (004637EB) -------------------------------------------------------- | 11430 //----- (004637EB) -------------------------------------------------------- |
11428 int __stdcall aWinProc(HWND hWnd, UINT Msg, WPARAM wParam, unsigned int lParam) | 11431 int __stdcall aWinProc(HWND hWnd, UINT Msg, WPARAM wParam, unsigned int lParam) |
11429 { | 11432 { |
12690 nullptr, | 12693 nullptr, |
12691 hOSMenu = nullptr, | 12694 hOSMenu = nullptr, |
12692 wcxw.hInstance, | 12695 wcxw.hInstance, |
12693 nullptr); | 12696 nullptr); |
12694 SetWindowTextW(hWnd, L"Might and Magic VII"); | 12697 SetWindowTextW(hWnd, L"Might and Magic VII"); |
12695 | 12698 |
12696 SetPriorityClass(GetCurrentProcess(), NORMAL_PRIORITY_CLASS); | 12699 SetPriorityClass(GetCurrentProcess(), NORMAL_PRIORITY_CLASS); |
12697 | 12700 |
12698 pRenderer = Render::Create(); | 12701 pRenderer = Render::Create(); |
12699 if (!pRenderer) | 12702 if (!pRenderer) |
12700 { | 12703 { |
12713 { | 12716 { |
12714 Log::Warning(L"Render failed to initialize"); | 12717 Log::Warning(L"Render failed to initialize"); |
12715 return false; | 12718 return false; |
12716 } | 12719 } |
12717 } | 12720 } |
12718 | 12721 |
12719 pAllocator = Allocator::Create(); | 12722 pAllocator = Allocator::Create(); |
12720 if (!pAllocator->Initialize(26 * 1024)) | 12723 if (!pAllocator->Initialize(26 * 1024)) |
12721 { | 12724 { |
12722 MessageBoxW(nullptr, | 12725 MessageBoxW(nullptr, |
12723 L"Unable to Allocate 26Mb of RAM", | 12726 L"Unable to Allocate 26Mb of RAM", |
12724 L"More RAM Memory Required", MB_ICONEXCLAMATION); | 12727 L"More RAM Memory Required", MB_ICONEXCLAMATION); |
12725 return false; | 12728 return false; |
12726 } | 12729 } |
12727 | 12730 |
12728 game_starting_year = 1168; | 12731 game_starting_year = 1168; |
12729 | 12732 |
12730 pParty = new Party; | 12733 pParty = new Party; |
12731 memset(&pParty->pHirelings, 0, sizeof(pParty->pHirelings)); | 12734 memset(&pParty->pHirelings, 0, sizeof(pParty->pHirelings)); |
12732 pParty->uWalkSpeed = GetPrivateProfileIntW(L"debug", L"walkspeed", 384, pMM6IniFile); | 12735 pParty->uWalkSpeed = GetPrivateProfileIntW(L"debug", L"walkspeed", 384, pMM6IniFile); |
12929 pChestList->ToFile(); | 12932 pChestList->ToFile(); |
12930 pOverlayList->ToFile(); | 12933 pOverlayList->ToFile(); |
12931 pSoundList->ToFile(); | 12934 pSoundList->ToFile(); |
12932 } | 12935 } |
12933 | 12936 |
12934 | 12937 |
12935 if (dword_6BE364_game_settings_1 & 2 || !(dword_6BE368_debug_settings_2 & 1))// | 12938 if (dword_6BE364_game_settings_1 & 2 || !(dword_6BE368_debug_settings_2 & 1))// |
12936 // color depth != 16 | 12939 // color depth != 16 |
12937 // or | 12940 // or |
12938 // not in window | 12941 // not in window |
12939 { | 12942 { |
13265 { | 13268 { |
13266 uGameState = 0; | 13269 uGameState = 0; |
13267 } | 13270 } |
13268 else | 13271 else |
13269 __debugbreak(); | 13272 __debugbreak(); |
13270 /*{ | 13273 { |
13271 if (GetCurrentMenuID() != MENU_10) | 13274 /* if (GetCurrentMenuID() != MENU_10) |
13272 goto LABEL_49; | 13275 goto LABEL_49; |
13273 pMouse->Activate(0); | 13276 pMouse->Activate(0); |
13274 if (pAsyncMouse) | 13277 if (pAsyncMouse) |
13275 pAsyncMouse->Suspend(); | 13278 pAsyncMouse->Suspend(); |
13276 if ( LOBYTE(pGame->pKeyboardInstance->bUsingAsynKeyboard) && pAsyncKeyboard ) | 13279 if ( LOBYTE(pGame->pKeyboardInstance->bUsingAsynKeyboard) && pAsyncKeyboard ) |
13292 strcpy(pCurrentMapName, ofn.lpstrFileTitle); | 13295 strcpy(pCurrentMapName, ofn.lpstrFileTitle); |
13293 pMouse->Activate(1); | 13296 pMouse->Activate(1); |
13294 if (pAsyncMouse) | 13297 if (pAsyncMouse) |
13295 pAsyncMouse->Resume(); | 13298 pAsyncMouse->Resume(); |
13296 if ( LOBYTE(pGame->pKeyboardInstance->bUsingAsynKeyboard) && pAsyncKeyboard ) | 13299 if ( LOBYTE(pGame->pKeyboardInstance->bUsingAsynKeyboard) && pAsyncKeyboard ) |
13297 pAsyncKeyboard->Resume(); | 13300 pAsyncKeyboard->Resume();*/ |
13298 }*/ | 13301 } |
13299 //LABEL_48: | 13302 //LABEL_48: |
13300 pGame->Loop(); | 13303 pGame->Loop(); |
13301 LABEL_49: | 13304 LABEL_49: |
13302 if ( uGameState == 3 ) | 13305 if ( uGameState == 3 ) |
13303 __debugbreak(); | 13306 __debugbreak(); |
13333 } | 13336 } |
13334 } | 13337 } |
13335 else | 13338 else |
13336 Log::Warning(L"MM init: failed"); | 13339 Log::Warning(L"MM init: failed"); |
13337 pGame->Deinitialize(); | 13340 pGame->Deinitialize(); |
13341 return 1; | |
13338 } | 13342 } |
13339 | 13343 |
13340 | 13344 |
13341 | 13345 |
13342 | 13346 |
14574 if ( v51 ) | 14578 if ( v51 ) |
14575 v0->pEquipment.uOffHand = 0; | 14579 v0->pEquipment.uOffHand = 0; |
14576 LABEL_74: | 14580 LABEL_74: |
14577 if ( v50 ) | 14581 if ( v50 ) |
14578 stru_A750F8[uActiveCharacter - 1]._494836( | 14582 stru_A750F8[uActiveCharacter - 1]._494836( |
14579 *((int *)&pSpellDatas[66].field_8 + v50), | 14583 *((int *)&pSpellDatas[66].uNormalLevelRecovery + v50), |
14580 uActiveCharacter - 1 + 9); | 14584 uActiveCharacter - 1 + 9); |
14581 break; | 14585 break; |
14582 case 1u: | 14586 case 1u: |
14583 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) ) | 14587 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) ) |
14584 goto LABEL_95; | 14588 goto LABEL_95; |