Mercurial > mm7
diff mm7_5.cpp @ 165:572d821561f3
MenuID
author | Ritor1 |
---|---|
date | Thu, 14 Feb 2013 14:48:43 +0600 |
parents | a0e7ad5425d4 |
children | 49728858c35e 038a4d09406f |
line wrap: on
line diff
--- a/mm7_5.cpp Thu Feb 14 09:27:19 2013 +0600 +++ b/mm7_5.cpp Thu Feb 14 14:48:43 2013 +0600 @@ -753,7 +753,7 @@ v130 = 0; v127 = 219; goto _play_sound_and_continue; - case 0x1A0: + case UIMSG_1A0: dword_506F08 = v0; continue; case UIMSG_1A1: @@ -3790,25 +3790,25 @@ pMessageQueue_50CBD0->PopMessage(&pUIMessageType, &uNum, &pSex); switch (pUIMessageType) // For buttons of window MainMenu { - case UIMSG_MainMenu_ShowPartyCreationWnd:// Окно создания группы + case UIMSG_MainMenu_ShowPartyCreationWnd: { GUIWindow::Create(495, 172, 0, 0, WINDOW_5A, (int)pMainMenu_BtnNew, 0); SetCurrentMenuID(MENU_NEWGAME); } continue; - case UIMSG_MainMenu_ShowLoadWindow:// Окно Загрузка + case UIMSG_MainMenu_ShowLoadWindow: { GUIWindow::Create(495, 227, 0, 0, WINDOW_5A, (int)pMainMenu_BtnLoad, 0); SetCurrentMenuID(MENU_SAVELOAD); } continue; - case UIMSG_ShowCredits:// Окно Создатели + case UIMSG_ShowCredits: { GUIWindow::Create(495, 282, 0, 0, WINDOW_5A, (int)pMainMenu_BtnCredits, 0); SetCurrentMenuID(MENU_CREDITS); } continue; - case UIMSG_ExitToWindows:// Окно Выход + case UIMSG_ExitToWindows: { GUIWindow::Create(495, 337, 0, 0, WINDOW_5A, (int)pMainMenu_BtnExit, 0); SetCurrentMenuID(MENU_FINISHED); @@ -3818,14 +3818,14 @@ switch (pUIMessageType) // For buttons of window LoadGame { - case UIMSG_LoadGame:// Процесс загрузки + case UIMSG_LoadGame: { if (!pSavegameUsedSlots[uLoadGameUI_SelectedSlot]) continue; - SetCurrentMenuID(MENU_LOAD); - continue; - } - case UIMSG_SelectLoadSlot: // Выбранный слот сохранёнки + SetCurrentMenuID(MENU_LOADINGPROC); + continue; + } + case UIMSG_SelectLoadSlot: { //main menu save/load wnd clicking on savegame lines if (pGUIWindow_CurrentMenu->field_40 == 1) @@ -3851,12 +3851,12 @@ } continue; } - case UIMSG_LoadSlot: // Нажатие на слот в окне Загрузка + case UIMSG_LoadSlot: { GUIWindow::Create(pGUIWindow_CurrentMenu->uFrameX + 241, pGUIWindow_CurrentMenu->uFrameY + 302, 61, 28, WINDOW_5E, (int)pBtnLoadSlot, 0); continue; } - case UIMSG_DownArrow://нажатие стрелки вниз + case UIMSG_DownArrow: { ++pSaveListPosition; if ( pSaveListPosition >= uNum ) @@ -3864,23 +3864,21 @@ if ( pSaveListPosition < 1 ) pSaveListPosition = 0; pWindow = pGUIWindow_CurrentMenu; - v8 = pGUIWindow_CurrentMenu->uFrameY + 323; - GUIWindow::Create(pWindow->uFrameX + 215, v8, 0, 0, (WindowType)90, (int)pBtnDownArrow, 0); - continue; - } - case UIMSG_Cancel:// Нажатие кнопки Отмена + GUIWindow::Create(pWindow->uFrameX + 215, pGUIWindow_CurrentMenu->uFrameY + 323, 0, 0, (WindowType)90, (int)pBtnDownArrow, 0); + continue; + } + case UIMSG_Cancel: { GUIWindow::Create(pGUIWindow_CurrentMenu->uFrameX + 350, pGUIWindow_CurrentMenu->uFrameY + 302, 61, 28, (WindowType)95, (int)pBtnCancel, 0); continue; } - case UIMSG_ArrowUp:// Кнопка Вверх + case UIMSG_ArrowUp: { --pSaveListPosition; if ( pSaveListPosition < 0 ) pSaveListPosition = 0; pWindow = pGUIWindow_CurrentMenu; - v8 = pGUIWindow_CurrentMenu->uFrameY + 197; - GUIWindow::Create(pWindow->uFrameX + 215, v8, 0, 0, (WindowType)90, (int)pBtnArrowUp, 0); + GUIWindow::Create(pWindow->uFrameX + 215, pGUIWindow_CurrentMenu->uFrameY + 197, 0, 0, (WindowType)90, (int)pBtnArrowUp, 0); continue; } } @@ -3889,7 +3887,7 @@ { if ( pUIMessageType > UIMSG_DownArrow ) { - if ( pUIMessageType == UIMSG_SelectFacePlayerBack ) // Выбор лица персонажа кнопка назад + if ( pUIMessageType == UIMSG_SelectFacePlayerBack ) { pPlayer = &pParty->pPlayers[uNum]; v12 = (char)((int)pPlayer->uFace - 1) < 0; @@ -3912,7 +3910,7 @@ //v1 = (char *)pParty->pPlayers; continue; } - if ( pUIMessageType == UIMSG_SelectFacePlayerForward ) // выбор лица персонажа кнопка вперёд + if ( pUIMessageType == UIMSG_SelectFacePlayerForward ) { pPlayer = &pParty->pPlayers[uNum]; v20 = (char)((int)pPlayer->uFace + 1) % 20; @@ -3937,7 +3935,7 @@ { __debugbreak(); GUIWindow::Create(pMainMenu_BtnNew->uX, pMainMenu_BtnNew->uY, 0, 0, (enum WindowType)90, (int)pMainMenu_BtnNew, 0); - SetCurrentMenuID(MENU_LOAD); + SetCurrentMenuID(MENU_LOADINGPROC); continue; } if ( pUIMessageType != UIMSG_AE )//unknow @@ -3946,11 +3944,7 @@ continue; } GUIWindow::Create(pMainMenu_BtnExit->uX, pMainMenu_BtnExit->uY, 0, 0, (enum WindowType)90, (int)pMainMenu_BtnExit, 0); -//LABEL_114: - v40 = 10; -//LABEL_89: - v2 = v40; - SetCurrentMenuID((MENU_STATE)v2); + SetCurrentMenuID(MENU_10); continue; } if ( pUIMessageType == UIMSG_6B )//unknow @@ -3967,7 +3961,6 @@ if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 ) continue; pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_Escape; - //goto LABEL_93; pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; ++pMessageQueue_50CBD0->uNumMessages; @@ -3986,26 +3979,19 @@ pVideoPlayer->bStopBeforeSchedule = 1; viewparams->bRedrawGameUI = 1; viewparams->field_48 = 1; - if ( !GetCurrentMenuID() || GetCurrentMenuID() == 6 || GetCurrentMenuID() == 7 ) - { - v17 = pCurrentScreen; + if ( !GetCurrentMenuID() || GetCurrentMenuID() == MENU_CREATEPARTY || GetCurrentMenuID() == MENU_NAMEPANELESC ) + { LABEL_83: - if ( v17 == 16 ) - pVideoPlayer->FastForwardToFrame(pVideoPlayer->field_40); - if (GetCurrentMenuID() == MENU_7) - { - v40 = 6; - //goto LABEL_89; - v2 = v40; - SetCurrentMenuID((MENU_STATE)v2); + if ( pCurrentScreen == SCREEN_VIDEO ) + pVideoPlayer->FastForwardToFrame(pVideoPlayer->pResetflag); + if (GetCurrentMenuID() == MENU_NAMEPANELESC) + { + SetCurrentMenuID(MENU_CREATEPARTY); continue; } - if (GetCurrentMenuID() == MENU_Credits) - { - v40 = 11; - //goto LABEL_89; - v2 = v40; - SetCurrentMenuID((MENU_STATE)v2); + if (GetCurrentMenuID() == MENU_CREDITSPROC) + { + SetCurrentMenuID(MENU_CREDITSCLOSE); continue; } if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) @@ -4020,7 +4006,6 @@ continue; } v16 = GetCurrentMenuID() == 8; - v17 = pCurrentScreen; if ( v16 && !pCurrentScreen ) goto LABEL_83; if ( pCurrentScreen == SCREEN_LOADGAME ) @@ -4095,9 +4080,8 @@ do { pCurrentPlayer->uVoiceID = (signed int)(pCurrentPlayer->uVoiceID + 1) % 20; - v10 = pCurrentPlayer->GetSexByVoice(); - } - while ( v10 != pSex ); + } + while ( pCurrentPlayer->GetSexByVoice() != pSex ); pButton = pCreationUI_BtnPressRight2[uNum]; GUIWindow::Create(pButton->uX, pButton->uY, 0, 0, (enum WindowType)92, (int)pButton, 1); pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0, 0); @@ -4111,12 +4095,11 @@ if ( pUIMessageType == UIMSG_PlayerCreationRemoveDownSkill ) { uPlayerCreationUI_SelectedCharacter = uNum; - v41 = 3; + //v41 = 3; //v1 = (char *)pParty->pPlayers; - v5 = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7 + pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum; - pGUIWindow_CurrentMenu->pCurrentPosActiveItem = v5; - pParty->pPlayers[0].pActiveSkills[(&pPlayer[uPlayerCreationUI_SelectedCharacter])->GetSkillIdxByOrder(v41) + pParty->pPlayers[0].pActiveSkills[(&pPlayer[uPlayerCreationUI_SelectedCharacter])->GetSkillIdxByOrder(3) + 3486 * uPlayerCreationUI_SelectedCharacter] = 0; continue; } @@ -4203,9 +4186,7 @@ break; case UIMSG_3A://unknow __debugbreak(); - v40 = 10; - v2 = v40; - SetCurrentMenuID((MENU_STATE)v2); + SetCurrentMenuID(MENU_10); break; } } @@ -15528,7 +15509,7 @@ } continue; } - if ( pWindowType != 10 ) + if ( pWindowType != 10 ) //pWindowType == 10 { v2 = pWindowType - 3; if ( v2 )//pWindowType > 3