Mercurial > mm7
diff mm7_2.cpp @ 836:b66abf8b7d50
Слияние
author | Ritor1 |
---|---|
date | Wed, 27 Mar 2013 23:20:27 +0600 |
parents | 95d9727412c9 dfd683c4f538 |
children | d061180f2b42 |
line wrap: on
line diff
--- a/mm7_2.cpp Wed Mar 27 23:20:14 2013 +0600 +++ b/mm7_2.cpp Wed Mar 27 23:20:27 2013 +0600 @@ -5,7 +5,6 @@ #include "MapInfo.h" #include "Game.h" #include "GUIWindow.h" -#include "GUIButton.h" #include "GUIFont.h" #include "Party.h" #include "AudioPlayer.h" @@ -293,10 +292,10 @@ uDialogueType = 83; pDialogueWindow->Release(); pDialogueWindow = GUIWindow::Create(0, 0, 640, 350, WINDOW_MainMenu, 0, 0); - pBtn_ExitCancel = pDialogueWindow->CreateButton(471u, 445u, 169u, 35u, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[34],// "Cancel" + pBtn_ExitCancel = pDialogueWindow->CreateButton(471u, 445u, 169u, 35u, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[34],// "Cancel" (Texture *)(uExitCancelTextureId != -1 ? &pIcons_LOD->pTextures[uExitCancelTextureId] : 0), 0); - pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, 0x51u, 0, 0, "", 0); - pDialogueWindow->CreateButton(480u, 160u, 140u, 30u, 1, 0, 0, 0x53u, 0, "", 0); + pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0); + pDialogueWindow->CreateButton(480u, 160u, 140u, 30u, 1, 0, UIMSG_0, 0x53u, 0, "", 0); pDialogueWindow->_41D08F(1, 1, 0, 2); dialog_menu_id = HOUSE_DIALOGUE_OTHER; v0 = (int)((char *)window_SpeakInHouse->ptr_1C - 102); @@ -436,12 +435,12 @@ pDialogueWindow->pControlsHead = 0; pDialogueWindow->pControlsTail = 0; pDialogueWindow->uNumControls = 0; - pBtn_ExitCancel = pDialogueWindow->CreateButton(0x1D7u, 0x1BDu, 0xA9u, 0x23u, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[79], + pBtn_ExitCancel = pDialogueWindow->CreateButton(0x1D7u, 0x1BDu, 0xA9u, 0x23u, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[79], (Texture *)(uExitCancelTextureId != -1 ? (int)&pIcons_LOD->pTextures[uExitCancelTextureId] : 0), 0); - pDialogueWindow->CreateButton(0x1E0u, 0xA0u, 0x8Cu, 0x1Eu, 1, 0, 0x88u, 0x55u, 0, "", 0); - pDialogueWindow->CreateButton(0x1E0u, 0xBEu, 0x8Cu, 0x1Eu, 1, 0, 0x88u, 0x56u, 0, "", 0); - pDialogueWindow->CreateButton(0x1E0u, 0xDCu, 0x8Cu, 0x1Eu, 1, 0, 0x88u, 0x57u, 0, "", 0); - pDialogueWindow->CreateButton(0x1E0u, 0xFAu, 0x8Cu, 0x1Eu, 1, 0, 0x88u, 0x58u, 0, "", 0); + pDialogueWindow->CreateButton(0x1E0u, 0xA0u, 0x8Cu, 0x1Eu, 1, 0, UIMSG_SelectNPCDialogueOption, 0x55u, 0, "", 0); + pDialogueWindow->CreateButton(0x1E0u, 0xBEu, 0x8Cu, 0x1Eu, 1, 0, UIMSG_SelectNPCDialogueOption, 0x56u, 0, "", 0); + pDialogueWindow->CreateButton(0x1E0u, 0xDCu, 0x8Cu, 0x1Eu, 1, 0, UIMSG_SelectNPCDialogueOption, 0x57u, 0, "", 0); + pDialogueWindow->CreateButton(0x1E0u, 0xFAu, 0x8Cu, 0x1Eu, 1, 0, UIMSG_SelectNPCDialogueOption, 0x58u, 0, "", 0); pDialogueWindow->_41D08F(4, 1, 0, 1); } } @@ -808,10 +807,10 @@ { pDialogueWindow->Release(); pDialogueWindow = GUIWindow::Create(0, 0, 640, 345, WINDOW_MainMenu, 0, 0); - pBtn_ExitCancel = pDialogueWindow->CreateButton( 471, 445, 169, 35, 1, 0, 0x71u, 0, 0, + pBtn_ExitCancel = pDialogueWindow->CreateButton( 471, 445, 169, 35, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[74], //"End Conversation" pIcons_LOD->GetTexture(uExitCancelTextureId), 0); - pDialogueWindow->CreateButton(8, 8, 450, 320, 1, 0, 0x51u, 0, 0, "", 0); + pDialogueWindow->CreateButton(8, 8, 450, 320, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0); } //----- (004BD8B5) -------------------------------------------------------- @@ -898,7 +897,7 @@ do { HouseNPCData[v2 + 7] = (NPCData *)window_SpeakInHouse->CreateButton(pNPCPortraits_x[v1 - 1][v2], pNPCPortraits_y[v1 - 1][v2], - 0x3Fu, 0x49u, 1, 0, 0x19Au, v2, 0, byte_591180[v2], 0, 0, 0); + 0x3Fu, 0x49u, 1, 0, UIMSG_19A, v2, 0, byte_591180[v2], 0, 0, 0); v1 = uNumDialogueNPCPortraits; ++v2; //v3 += 100; @@ -6940,7 +6939,7 @@ && pt.y >= (signed int)pButton->uY && pt.y <= (signed int)pButton->uW && pWindow == pWindow_MainMenu ) { - pControlParam = pButton->uControlParam; + pControlParam = pButton->msg_param; switch (pControlParam) // { case 0: @@ -6987,7 +6986,7 @@ //----- (004637EB) -------------------------------------------------------- int __stdcall aWinProc(HWND hWnd, UINT Msg, WPARAM wParam, unsigned int lParam) { - unsigned int v4; // esi@1 + //unsigned int v4; // esi@1 Render *v5; // ecx@14 HANDLE v6; // eax@32 Keyboard *v7; // eax@33 @@ -7028,10 +7027,15 @@ switch (Msg) { case WM_SETTEXT: return DefWindowProcW(hWnd, Msg, wParam, lParam); + case WM_CHAR: + { + if (!pKeyActionMap->_459F10(wParam) && !viewparams->field_4C) + GUI_HandleHotkey(wParam); + } + return DefWindowProcA(hWnd, Msg, wParam, lParam); }; - v4 = lParam; if ( Msg > WM_SYSCOMMAND ) { switch ( Msg ) @@ -7089,7 +7093,7 @@ if ( pAsyncMouse != v32 ) goto _def_wnd_proc; back_to_game(); - return DefWindowProcA(hWnd, Msg, wParam, v4); + return DefWindowProcA(hWnd, Msg, wParam, lParam); } if (pAsyncMouse) goto _def_wnd_proc; @@ -7103,7 +7107,7 @@ if (pAsyncMouse) goto _def_wnd_proc; pArcomageGame->stru1.field_0 = 7; - return DefWindowProcA(hWnd, Msg, wParam, v4); + return DefWindowProcA(hWnd, Msg, wParam, lParam); } if ( pVideoPlayer->pVideoFrame.pPixels ) pVideoPlayer->bStopBeforeSchedule = 1; @@ -7128,7 +7132,7 @@ if ( pAsyncMouse == (void *)v28 ) { UI_OnMouseLeftClick(0); - return DefWindowProcA(hWnd, Msg, wParam, v4); + return DefWindowProcA(hWnd, Msg, wParam, lParam); } goto _def_wnd_proc; case WM_RBUTTONDBLCLK: @@ -7150,14 +7154,14 @@ if (!pAsyncMouse) { sub_416D62_ShowPopupWindow_MonsterRecord_ItemInfo_etcsub_416D62(0); - return DefWindowProcA(hWnd, Msg, wParam, v4); + return DefWindowProcA(hWnd, Msg, wParam, lParam); } goto _def_wnd_proc; } if (pAsyncMouse) goto _def_wnd_proc; pArcomageGame->stru1.field_0 = 8; - return DefWindowProcA(hWnd, Msg, wParam, v4); + return DefWindowProcA(hWnd, Msg, wParam, lParam); case WM_MBUTTONDOWN: if ( pRenderer->pRenderD3D ) { @@ -7165,14 +7169,14 @@ { v34 = GetPickDepth(); pGame->PickMouse(v34, (unsigned __int16)lParam, lParam >> 16, 1, &vis_sprite_filter_3, &vis_face_filter); - return DefWindowProcA(hWnd, Msg, wParam, v4); + return DefWindowProcA(hWnd, Msg, wParam, lParam); } goto _def_wnd_proc; } if ( !pGame ) goto _def_wnd_proc; sub_417871(0); - return DefWindowProcA(hWnd, Msg, wParam, v4); + return DefWindowProcA(hWnd, Msg, wParam, lParam); case WM_MOUSEMOVE: if ( pArcomageGame->bGameInProgress ) { @@ -7194,7 +7198,7 @@ goto _def_wnd_proc; pMouse->SetMouseClick((unsigned __int16)lParam, lParam >> 16); } - return DefWindowProcA(hWnd, Msg, wParam, v4); + return DefWindowProcA(hWnd, Msg, wParam, lParam); } } if ( Msg == WM_SYSCOMMAND ) @@ -7212,7 +7216,7 @@ if (pVideoPlayer->AnyMovieLoaded() && pVideoPlayer->pBinkBuffer) { BinkBufferSetOffset(pVideoPlayer->pBinkBuffer, 0, 0); - return DefWindowProcA(hWnd, Msg, wParam, v4); + return DefWindowProcA(hWnd, Msg, wParam, lParam); } } goto _def_wnd_proc; @@ -7224,16 +7228,7 @@ if ( wParam == VK_CONTROL ) { dword_507B98_ctrl_pressed = 0; - return DefWindowProcA(hWnd, Msg, wParam, v4); - } - goto _def_wnd_proc; - } - if ( Msg == WM_CHAR ) - { - if ( !pKeyActionMap->_459F10(wParam) && !viewparams->field_4C ) - { - GUI_HandleHotkey(wParam); - return DefWindowProcA(hWnd, Msg, wParam, v4); + return DefWindowProcA(hWnd, Msg, wParam, lParam); } goto _def_wnd_proc; } @@ -7254,7 +7249,7 @@ return 0; } if ( wParam != 40001 ) - return DefWindowProcA(hWnd, Msg, wParam, v4); + return DefWindowProcA(hWnd, Msg, wParam, lParam); } v38 = 0; v37 = 0; @@ -7267,7 +7262,7 @@ if ( dword_506E68 != -1 ) { pKeyActionMap->_459F10(wParam); - return DefWindowProcA(hWnd, Msg, wParam, v4); + return DefWindowProcA(hWnd, Msg, wParam, lParam); } if ( !pArcomageGame->bGameInProgress ) { @@ -7597,12 +7592,11 @@ if (pAsyncMouse) { pAsyncMouse->Suspend(); - return DefWindowProcA(hWnd, Msg, wParam, v4); + return DefWindowProcA(hWnd, Msg, wParam, lParam); } } _def_wnd_proc: - v4 = lParam; - return DefWindowProcA(hWnd, Msg, wParam, v4); + return DefWindowProcA(hWnd, Msg, wParam, lParam); } if ( Msg != WM_KILLFOCUS ) { @@ -7630,12 +7624,12 @@ goto _def_wnd_proc; } if ( ::hWnd != (HWND)wParam || (dword_4E98BC_bApplicationActive = 1, pRenderer->bWindowMode) || !pAsyncMouse ) - return DefWindowProcA(hWnd, Msg, wParam, v4); + return DefWindowProcA(hWnd, Msg, wParam, lParam); pAsyncMouse->Resume(); if ( !pAsyncMouse ) goto _def_wnd_proc; pAsyncMouse->Clip(); - return DefWindowProcA(hWnd, Msg, wParam, v4); + return DefWindowProcA(hWnd, Msg, wParam, lParam); } //----- (00464479) --------------------------------------------------------