comparison mm7_2.cpp @ 441:acd8fa960c32

Pressing escape crashes no more
author Nomad
date Sun, 24 Feb 2013 15:21:24 +0200
parents 17c90e543e28
children a812665688e4
comparison
equal deleted inserted replaced
438:17c90e543e28 441:acd8fa960c32
11667 HANDLE v6; // eax@32 11667 HANDLE v6; // eax@32
11668 Keyboard *v7; // eax@33 11668 Keyboard *v7; // eax@33
11669 //HDC v9; // edi@41 11669 //HDC v9; // edi@41
11670 HDC v10; // edi@50 11670 HDC v10; // edi@50
11671 int v11; // esi@50 11671 int v11; // esi@50
11672 char v12; // zf@132 11672 //char v12; // zf@132
11673 signed int v13; // eax@135 11673 signed int v13; // eax@135
11674 int v14; // eax@139 11674 int v14; // eax@139
11675 int v15; // eax@140 11675 int v15; // eax@140
11676 int v16; // eax@141 11676 int v16; // eax@141
11677 int v17; // eax@142 11677 int v17; // eax@142
11933 } 11933 }
11934 v38 = 0; 11934 v38 = 0;
11935 v37 = 0; 11935 v37 = 0;
11936 v36 = 2; 11936 v36 = 2;
11937 v35 = ::hWnd; 11937 v35 = ::hWnd;
11938 LABEL_104: 11938 //LABEL_104:
11939 SendMessageA(v35, v36, v37, v38); 11939 SendMessageA(::hWnd, WM_DESTROY, v37, v38);
11940 return 0; 11940 return 0;
11941 } 11941 }
11942 if ( dword_506E68 != -1 ) 11942 if ( dword_506E68 != -1 )
11943 { 11943 {
11944 pKeyActionMap->_459F10(wParam); 11944 pKeyActionMap->_459F10(wParam);
11946 } 11946 }
11947 if ( !pArcomageGame->bGameInProgress ) 11947 if ( !pArcomageGame->bGameInProgress )
11948 { 11948 {
11949 if ( pVideoPlayer->pVideoFrame.pPixels ) 11949 if ( pVideoPlayer->pVideoFrame.pPixels )
11950 pVideoPlayer->bStopBeforeSchedule = 1; 11950 pVideoPlayer->bStopBeforeSchedule = 1;
11951 if ( wParam != 13 ) 11951 if ( wParam != VK_RETURN )
11952 { 11952 {
11953 if ( wParam == 17 ) 11953 if ( wParam == VK_CONTROL )
11954 { 11954 {
11955 dword_507B98_ctrl_pressed = 1; 11955 dword_507B98_ctrl_pressed = 1;
11956 return 0; 11956 return 0;
11957 } 11957 }
11958 if ( wParam == 27 ) 11958 if ( wParam == VK_ESCAPE )
11959 { 11959 {
11960 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, !v12, 0); 11960 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, window_SpeakInHouse != 0, 0);
11961 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) 11961 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
11962 { 11962 {
11963 v12 = window_SpeakInHouse == 0; 11963 v12 = window_SpeakInHouse == 0;
11964 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113; 11964 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
11965 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = !v12; 11965 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = !v12;
11966 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; 11966 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
11967 ++pMessageQueue_50CBD0->uNumMessages; 11967 ++pMessageQueue_50CBD0->uNumMessages;
11968 }*/ 11968 }*/
11969 return 0; 11969 return 0;
11970 } 11970 }
11971 if ( wParam <= 0x24 ) 11971 if ( wParam <= VK_HOME )
11972 return 0; 11972 return 0;
11973 if ( wParam > 0x28 ) 11973 if ( wParam > VK_DOWN )
11974 { 11974 {
11975 if ( wParam != 115 || pVideoPlayer->AnyMovieLoaded() ) 11975 if ( wParam != VK_F4 || pVideoPlayer->AnyMovieLoaded() )
11976 return 0; 11976 return 0;
11977 v38 = 0; 11977 v38 = 0;
11978 v37 = 104; 11978 v37 = 104;
11979 LABEL_126: 11979 LABEL_126:
11980 v36 = 273; 11980 v36 = 273;
11981 v35 = hWnd; 11981 v35 = hWnd;
11982 goto LABEL_104; 11982 SendMessageA(hWnd, WM_COMMAND, v37, v38);
11983 return 0;
11983 } 11984 }
11984 if ( pCurrentScreen 11985 if ( pCurrentScreen
11985 && pCurrentScreen != SCREEN_PRESS_ESCAPE_MESSAGE ) 11986 && pCurrentScreen != SCREEN_PRESS_ESCAPE_MESSAGE )
11986 return 0; 11987 return 0;
11987 } 11988 }