Mercurial > mm7
comparison mm7_5.cpp @ 3:bf31c505f4d3
13.01.13(MainMenuMessageProc())
author | Ritor1 |
---|---|
date | Sun, 13 Jan 2013 17:41:47 +0600 |
parents | 89240115d392 |
children | 8e33efd39355 |
comparison
equal
deleted
inserted
replaced
2:89240115d392 | 3:bf31c505f4d3 |
---|---|
498 v9 = 241; | 498 v9 = 241; |
499 pWindowType1 = (WindowType)94; | 499 pWindowType1 = (WindowType)94; |
500 v137 = 42; | 500 v137 = 42; |
501 v133 = 106; | 501 v133 = 106; |
502 goto LABEL_733; | 502 goto LABEL_733; |
503 case UIMSG_A5: | 503 case UIMSG_SelectLoadSlot: |
504 if ( pGUIWindow_CurrentMenu->field_40 == v0 ) | 504 if ( pGUIWindow_CurrentMenu->field_40 == v0 ) |
505 pKeyActionMap->_459ED1(0); | 505 pKeyActionMap->_459ED1(0); |
506 if ( pCurrentScreen != 11 || uLoadGameUI_SelectedSlot != pSaveListPosition + uMessageParam ) | 506 if ( pCurrentScreen != 11 || uLoadGameUI_SelectedSlot != pSaveListPosition + uMessageParam ) |
507 { | 507 { |
508 v10 = pSaveListPosition + uMessageParam; | 508 v10 = pSaveListPosition + uMessageParam; |
512 { | 512 { |
513 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)164; | 513 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)164; |
514 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; | 514 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; |
515 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | 515 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; |
516 v11 = pMessageQueue_50CBD0->uNumMessages + 1; | 516 v11 = pMessageQueue_50CBD0->uNumMessages + 1; |
517 v13 = __OFSUB__(pMessageQueue_50CBD0->uNumMessages + 1, 40); | 517 v13 = pMessageQueue_50CBD0->uNumMessages + 1 > 40; |
518 v12 = (signed int)pMessageQueue_50CBD0->uNumMessages - 39 < 0; | 518 v12 = (signed int)pMessageQueue_50CBD0->uNumMessages - 39 < 0; |
519 ++pMessageQueue_50CBD0->uNumMessages; | 519 ++pMessageQueue_50CBD0->uNumMessages; |
520 if ( v12 ^ v13 ) | 520 if ( v12 ^ v13 ) |
521 { | 521 { |
522 pMessageQueue_50CBD0->pMessages[v11].eType = (UIMessageType)82; | 522 pMessageQueue_50CBD0->pMessages[v11].eType = (UIMessageType)82; |
529 uLoadGameUI_SelectedSlot = v10; | 529 uLoadGameUI_SelectedSlot = v10; |
530 dword_6BE138 = v10; | 530 dword_6BE138 = v10; |
531 } | 531 } |
532 else | 532 else |
533 { | 533 { |
534 pKeyActionMap->_459E5A(0, 19, pGUIWindow_CurrentMenu); | 534 pKeyActionMap->EnterText(0, 19, pGUIWindow_CurrentMenu); |
535 if ( strcmp((const char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot, pGlobalTXT_LocalizationStrings[72]) )// "Empty" | 535 if ( strcmp((const char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot, pGlobalTXT_LocalizationStrings[72]) )// "Empty" |
536 strcpy((char *)pKeyActionMap->pPressedKeysBuffer, (const char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot); | 536 strcpy((char *)pKeyActionMap->pPressedKeysBuffer, (const char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot); |
537 pKeyActionMap->uNumKeysPressed = strlen((const char *)pKeyActionMap->pPressedKeysBuffer); | 537 pKeyActionMap->uNumKeysPressed = strlen((const char *)pKeyActionMap->pPressedKeysBuffer); |
538 } | 538 } |
539 goto _continue; | 539 goto _continue; |
689 goto LABEL_623; | 689 goto LABEL_623; |
690 v14 = uMessageParam; | 690 v14 = uMessageParam; |
691 if ( dword_506F08 != v0 ) | 691 if ( dword_506F08 != v0 ) |
692 v14 = uMessageParam + 14; | 692 v14 = uMessageParam + 14; |
693 dword_506E68 = v14; | 693 dword_506E68 = v14; |
694 pKeyActionMap->_459E5A(0, v0, pGUIWindow_CurrentMenu); | 694 pKeyActionMap->EnterText(0, v0, pGUIWindow_CurrentMenu); |
695 goto _continue; | 695 goto _continue; |
696 case UIMSG_ResetKeyMapping: | 696 case UIMSG_ResetKeyMapping: |
697 v197 = 1; | 697 v197 = 1; |
698 pKeyActionMap->SetDefaultMapping(); | 698 pKeyActionMap->SetDefaultMapping(); |
699 uAction = 0; | 699 uAction = 0; |
1071 pAudioPlayer->StopChannels(-1, -1); | 1071 pAudioPlayer->StopChannels(-1, -1); |
1072 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, uMessage, 0); | 1072 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, uMessage, 0); |
1073 pBooksWindow = GUIWindow::Create(0x258u, 0x169u, 0, 0, (enum WindowType)99, (int)pBtn_History, 0); | 1073 pBooksWindow = GUIWindow::Create(0x258u, 0x169u, 0, 0, (enum WindowType)99, (int)pBtn_History, 0); |
1074 bFlashHistoryBook = 0; | 1074 bFlashHistoryBook = 0; |
1075 goto _continue; | 1075 goto _continue; |
1076 case UIMSG_CloseBook: | 1076 case UIMSG_Escape: |
1077 back_to_game(); | 1077 back_to_game(); |
1078 if ( pMessageQueue_50CBD0->uNumMessages ) | 1078 if ( pMessageQueue_50CBD0->uNumMessages ) |
1079 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 1079 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
1080 if ( pCurrentScreen > 15 ) | 1080 if ( pCurrentScreen > 15 ) |
1081 { | 1081 { |
2721 pCharacterScreen_DollBtn = pGUIWindow_CurrentMenu->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, v0, 0, 0x85u, 0, 0, v1, 0); | 2721 pCharacterScreen_DollBtn = pGUIWindow_CurrentMenu->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, v0, 0, 0x85u, 0, 0, v1, 0); |
2722 goto LABEL_422; | 2722 goto LABEL_422; |
2723 case UIMSG_Quit|0x1: | 2723 case UIMSG_Quit|0x1: |
2724 OnPaperdollLeftClick(); | 2724 OnPaperdollLeftClick(); |
2725 goto _continue; | 2725 goto _continue; |
2726 case UIMSG_CloseBook|0x2: | 2726 case UIMSG_Escape|0x2: |
2727 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 100; | 2727 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 100; |
2728 sub_4196A0(); | 2728 sub_4196A0(); |
2729 sub_419379(); | 2729 sub_419379(); |
2730 pButton = pCharacterScreen_StatsBtn; | 2730 pButton = pCharacterScreen_StatsBtn; |
2731 goto LABEL_716; | 2731 goto LABEL_716; |
2781 pButton = pCharacterScreen_ExitBtn; | 2781 pButton = pCharacterScreen_ExitBtn; |
2782 v163 = 0; | 2782 v163 = 0; |
2783 pButton2 = pCharacterScreen_ExitBtn; | 2783 pButton2 = pCharacterScreen_ExitBtn; |
2784 pWindowType1 = (WindowType)97; | 2784 pWindowType1 = (WindowType)97; |
2785 goto LABEL_731; | 2785 goto LABEL_731; |
2786 case UIMSG_CloseBook|0x4: | 2786 case UIMSG_Escape|0x4: |
2787 sub_419379(); | 2787 sub_419379(); |
2788 sub_4196A0(); | 2788 sub_4196A0(); |
2789 sub_419220(); | 2789 sub_419220(); |
2790 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 102; | 2790 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 102; |
2791 GUIWindow::Create(pCharacterScreen_AwardsBtn->uX, pCharacterScreen_AwardsBtn->uY, 0, 0, (WindowType)(WINDOW_HouseInterior|0x42), | 2791 GUIWindow::Create(pCharacterScreen_AwardsBtn->uX, pCharacterScreen_AwardsBtn->uY, 0, 0, (WindowType)(WINDOW_HouseInterior|0x42), |
2792 (int)pCharacterScreen_AwardsBtn, 0); | 2792 (int)pCharacterScreen_AwardsBtn, 0); |
2793 sub_419100(); | 2793 sub_419100(); |
2794 goto _continue; | 2794 goto _continue; |
2795 case 71://0x47: | 2795 case 71://0x47: |
2796 switch ( uMessageParam ) | 2796 switch ( uMessageParam ) |
2797 { | 2797 { |
2798 default: | 2798 default: |
2799 goto _continue; | 2799 goto _continue; |
2800 case 11: | 2800 case 11: |
3131 //pPlayer1 = pParty->pPlayers; | 3131 //pPlayer1 = pParty->pPlayers; |
3132 pPlayer = pParty->pPlayers; | 3132 pPlayer = pParty->pPlayers; |
3133 do | 3133 do |
3134 { | 3134 { |
3135 pMessageQueue_50CBD0->PopMessage(&pUIMessageType, &uNum, &pSex); | 3135 pMessageQueue_50CBD0->PopMessage(&pUIMessageType, &uNum, &pSex); |
3136 switch (pUIMessageType) //создание окон из главного меню | 3136 switch (pUIMessageType) // For buttons of window MainMenu |
3137 { | 3137 { |
3138 case UIMSG_MainMenu_ShowPartyCreationWnd:// Окно создания группы | 3138 case UIMSG_MainMenu_ShowPartyCreationWnd:// Окно создания группы |
3139 { | 3139 { |
3140 GUIWindow::Create(495, 172, 0, 0, WINDOW_5A, (int)pMainMenu_BtnNew, 0); | 3140 GUIWindow::Create(495, 172, 0, 0, WINDOW_5A, (int)pMainMenu_BtnNew, 0); |
3141 SetCurrentMenuID(MENU_NEWGAME); | 3141 SetCurrentMenuID(MENU_NEWGAME); |
3157 { | 3157 { |
3158 GUIWindow::Create(495, 337, 0, 0, WINDOW_5A, (int)pMainMenu_BtnExit, 0); | 3158 GUIWindow::Create(495, 337, 0, 0, WINDOW_5A, (int)pMainMenu_BtnExit, 0); |
3159 SetCurrentMenuID(MENU_FINISHED); | 3159 SetCurrentMenuID(MENU_FINISHED); |
3160 } | 3160 } |
3161 continue; | 3161 continue; |
3162 } | |
3163 | |
3164 switch (pUIMessageType) // For buttons of window LoadGame | |
3165 { | |
3162 case UIMSG_LoadGame:// Процесс загрузки | 3166 case UIMSG_LoadGame:// Процесс загрузки |
3163 { | 3167 { |
3164 if (!pSavegameUsedSlots[uLoadGameUI_SelectedSlot]) | 3168 if (!pSavegameUsedSlots[uLoadGameUI_SelectedSlot]) |
3165 continue; | 3169 continue; |
3166 SetCurrentMenuID(MENU_LOAD); | 3170 SetCurrentMenuID(MENU_LOAD); |
3171 continue; | |
3167 } | 3172 } |
3168 continue; | 3173 case UIMSG_SelectLoadSlot: // Выбранный слот сохранёнки |
3169 } | |
3170 switch (pUIMessageType) | |
3171 { | |
3172 case UIMSG_A5: // WINDOW_5A | |
3173 { | 3174 { |
3174 //main menu save/load wnd clicking on savegame lines | 3175 //main menu save/load wnd clicking on savegame lines |
3175 if (pGUIWindow_CurrentMenu->field_40 == 1) | 3176 if (pGUIWindow_CurrentMenu->field_40 == 1) |
3176 pKeyActionMap->_459ED1(0); | 3177 pKeyActionMap->_459ED1(0); |
3177 if ( pCurrentScreen != 11 || uLoadGameUI_SelectedSlot != uNum + pSaveListPosition ) | 3178 if ( pCurrentScreen != 11 || uLoadGameUI_SelectedSlot != uNum + pSaveListPosition ) |
3187 dword_6BE138 = v26; | 3188 dword_6BE138 = v26; |
3188 } | 3189 } |
3189 else | 3190 else |
3190 { | 3191 { |
3191 //typing in the line | 3192 //typing in the line |
3192 pKeyActionMap->_459E5A(0, 19, pGUIWindow_CurrentMenu); | 3193 pKeyActionMap->EnterText(0, 19, pGUIWindow_CurrentMenu); |
3193 strcpy((char *)pKeyActionMap->pPressedKeysBuffer, pSavegameHeader[uLoadGameUI_SelectedSlot].pName); | 3194 strcpy((char *)pKeyActionMap->pPressedKeysBuffer, pSavegameHeader[uLoadGameUI_SelectedSlot].pName); |
3194 pKeyActionMap->uNumKeysPressed = strlen((const char *)pKeyActionMap->pPressedKeysBuffer); | 3195 pKeyActionMap->uNumKeysPressed = strlen((const char *)pKeyActionMap->pPressedKeysBuffer); |
3195 } | 3196 } |
3197 continue; | |
3196 } | 3198 } |
3197 continue; | |
3198 case UIMSG_LoadSlot: // Нажатие на слот в окне Загрузка | 3199 case UIMSG_LoadSlot: // Нажатие на слот в окне Загрузка |
3199 { | 3200 { |
3200 GUIWindow::Create(pGUIWindow_CurrentMenu->uFrameX + 241, pGUIWindow_CurrentMenu->uFrameY + 302, 61, 28, WINDOW_5E, (int)pBtnLoadSlot, 0); | 3201 GUIWindow::Create(pGUIWindow_CurrentMenu->uFrameX + 241, pGUIWindow_CurrentMenu->uFrameY + 302, 61, 28, WINDOW_5E, (int)pBtnLoadSlot, 0); |
3202 continue; | |
3201 } | 3203 } |
3202 continue; | 3204 case UIMSG_DownArrow://нажатие стрелки вниз |
3205 { | |
3206 ++pSaveListPosition; | |
3207 if ( pSaveListPosition >= uNum ) | |
3208 pSaveListPosition = uNum - 1; | |
3209 if ( pSaveListPosition < 1 ) | |
3210 pSaveListPosition = 0; | |
3211 pWindow = pGUIWindow_CurrentMenu; | |
3212 v8 = pGUIWindow_CurrentMenu->uFrameY + 323; | |
3213 GUIWindow::Create(pWindow->uFrameX + 215, v8, 0, 0, (WindowType)90, (int)pBtnDownArrow, 0); | |
3214 continue; | |
3215 } | |
3216 case UIMSG_Cancel:// Нажатие кнопки Отмена | |
3217 { | |
3218 GUIWindow::Create(pGUIWindow_CurrentMenu->uFrameX + 350, pGUIWindow_CurrentMenu->uFrameY + 302, 61, 28, (WindowType)95, (int)pBtnCancel, 0); | |
3219 continue; | |
3220 } | |
3221 case UIMSG_ArrowUp:// Кнопка Вверх | |
3222 { | |
3223 --pSaveListPosition; | |
3224 if ( pSaveListPosition < 0 ) | |
3225 pSaveListPosition = 0; | |
3226 pWindow = pGUIWindow_CurrentMenu; | |
3227 v8 = pGUIWindow_CurrentMenu->uFrameY + 197; | |
3228 GUIWindow::Create(pWindow->uFrameX + 215, v8, 0, 0, (WindowType)90, (int)pBtnArrowUp, 0); | |
3229 continue; | |
3230 } | |
3203 } | 3231 } |
3204 if ( (signed int)pUIMessageType > UIMSG_PlayerCreationRemoveDownSkill ) | 3232 |
3233 if ( (signed int)pUIMessageType > UIMSG_PlayerCreationRemoveDownSkill )// For button of window PlayerCreation | |
3205 { | 3234 { |
3206 if ( pUIMessageType > UIMSG_DownArrow ) | 3235 if ( pUIMessageType > UIMSG_DownArrow ) |
3207 { | 3236 { |
3208 if ( pUIMessageType == UIMSG_Cancel )// Нажатие кнопки Отмена | 3237 if ( pUIMessageType == UIMSG_SelectFacePlayerBack ) // Выбор лица персонажа кнопка назад |
3209 { | |
3210 GUIWindow::Create(pGUIWindow_CurrentMenu->uFrameX + 350, pGUIWindow_CurrentMenu->uFrameY + 302, 61, 28, (WindowType)95, (int)pBtnCancel, 0); | |
3211 continue; | |
3212 } | |
3213 if ( pUIMessageType == UIMSG_SelectFacePlayerBack ) | |
3214 { | 3238 { |
3215 pPlayer = &pParty->pPlayers[uNum]; | 3239 pPlayer = &pParty->pPlayers[uNum]; |
3216 v12 = (char)((int)pPlayer->uFace - 1) < 0; | 3240 v12 = (char)((int)pPlayer->uFace - 1) < 0; |
3217 --pPlayer->uFace; | 3241 --pPlayer->uFace; |
3218 if ( v12 ) | 3242 if ( v12 ) |
3227 uPlayerCreationUI_SelectedCharacter = v25; | 3251 uPlayerCreationUI_SelectedCharacter = v25; |
3228 GUIWindow::Create(pCreationUI_BtnPressLeft[v25]->uX, pCreationUI_BtnPressLeft[v25]->uY, 0, 0, | 3252 GUIWindow::Create(pCreationUI_BtnPressLeft[v25]->uX, pCreationUI_BtnPressLeft[v25]->uY, 0, 0, |
3229 (enum WindowType)92, (int)pCreationUI_BtnPressLeft[v25], 1); | 3253 (enum WindowType)92, (int)pCreationUI_BtnPressLeft[v25], 1); |
3230 //v0 = pAudioPlayer; | 3254 //v0 = pAudioPlayer; |
3231 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0.0, 0); | 3255 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0.0, 0); |
3232 v22 = pPlayer; | 3256 pPlayer->PlaySound(102, 0); |
3233 v22->PlaySound(102, 0); | |
3234 //v1 = (char *)pParty->pPlayers; | 3257 //v1 = (char *)pParty->pPlayers; |
3235 continue; | 3258 continue; |
3236 } | 3259 } |
3237 if ( pUIMessageType == UIMSG_SelectFacePlayerForward ) | 3260 if ( pUIMessageType == UIMSG_SelectFacePlayerForward ) // выбор лица персонажа кнопка вперёд |
3238 { | 3261 { |
3239 pPlayer = &pParty->pPlayers[uNum]; | 3262 pPlayer = &pParty->pPlayers[uNum]; |
3240 v20 = (char)((int)pPlayer->uFace + 1) % 20; | 3263 v20 = (char)((int)pPlayer->uFace + 1) % 20; |
3241 pPlayer->uFace = v20; | 3264 pPlayer->uFace = v20; |
3242 pPlayer->uVoiceID = v20; | 3265 pPlayer->uVoiceID = v20; |
3249 uPlayerCreationUI_SelectedCharacter = v21; | 3272 uPlayerCreationUI_SelectedCharacter = v21; |
3250 GUIWindow::Create(pCreationUI_BtnPressRight[v21]->uX, pCreationUI_BtnPressRight[v21]->uY, 0, 0, (enum WindowType)92, | 3273 GUIWindow::Create(pCreationUI_BtnPressRight[v21]->uX, pCreationUI_BtnPressRight[v21]->uY, 0, 0, (enum WindowType)92, |
3251 (int)pCreationUI_BtnPressRight[v21], 1); | 3274 (int)pCreationUI_BtnPressRight[v21], 1); |
3252 //v0 = pAudioPlayer; | 3275 //v0 = pAudioPlayer; |
3253 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0, 0); | 3276 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0, 0); |
3254 v22 = pPlayer; | 3277 pPlayer->PlaySound(102, 0); |
3255 v22->PlaySound(102, 0); | |
3256 //v1 = (char *)pParty->pPlayers; | 3278 //v1 = (char *)pParty->pPlayers; |
3257 continue; | 3279 continue; |
3258 } | 3280 } |
3259 if ( pUIMessageType == UIMSG_AD ) | 3281 if ( pUIMessageType == UIMSG_AD )//unknow |
3260 { | 3282 { |
3283 __debugbreak(); | |
3261 GUIWindow::Create(pMainMenu_BtnNew->uX, pMainMenu_BtnNew->uY, 0, 0, (enum WindowType)90, (int)pMainMenu_BtnNew, 0); | 3284 GUIWindow::Create(pMainMenu_BtnNew->uX, pMainMenu_BtnNew->uY, 0, 0, (enum WindowType)90, (int)pMainMenu_BtnNew, 0); |
3262 SetCurrentMenuID(MENU_LOAD); | 3285 SetCurrentMenuID(MENU_LOAD); |
3263 continue; | |
3264 } | |
3265 if ( pUIMessageType != UIMSG_AE ) | |
3266 continue; | 3286 continue; |
3287 } | |
3288 if ( pUIMessageType != UIMSG_AE )//unknow | |
3289 { | |
3290 __debugbreak(); | |
3291 continue; | |
3292 } | |
3267 GUIWindow::Create(pMainMenu_BtnExit->uX, pMainMenu_BtnExit->uY, 0, 0, (enum WindowType)90, (int)pMainMenu_BtnExit, 0); | 3293 GUIWindow::Create(pMainMenu_BtnExit->uX, pMainMenu_BtnExit->uY, 0, 0, (enum WindowType)90, (int)pMainMenu_BtnExit, 0); |
3268 //LABEL_114: | 3294 //LABEL_114: |
3269 v40 = 10; | 3295 v40 = 10; |
3270 //LABEL_89: | 3296 //LABEL_89: |
3271 v2 = v40; | 3297 v2 = v40; |
3272 SetCurrentMenuID((MENU_STATE)v2); | 3298 SetCurrentMenuID((MENU_STATE)v2); |
3273 continue; | 3299 continue; |
3274 } | 3300 } |
3275 if ( pUIMessageType == UIMSG_DownArrow )//нажатие стрелки вниз | 3301 if ( pUIMessageType == UIMSG_6B )//unknow |
3276 { | 3302 { |
3277 ++pSaveListPosition; | 3303 __debugbreak(); |
3278 if ( pSaveListPosition >= uNum ) | |
3279 pSaveListPosition = uNum - 1; | |
3280 if ( pSaveListPosition < 1 ) | |
3281 pSaveListPosition = 0; | |
3282 pWindow = pGUIWindow_CurrentMenu; | |
3283 v8 = pGUIWindow_CurrentMenu->uFrameY + 323; | |
3284 GUIWindow::Create(pWindow->uFrameX + 215, v8, 0, 0, (WindowType)90, (int)pBtnDownArrow, 0); | |
3285 continue; | |
3286 } | |
3287 if ( pUIMessageType == UIMSG_6B ) | |
3288 { | |
3289 if ( pCurrentScreen ) | 3304 if ( pCurrentScreen ) |
3290 { | 3305 { |
3291 pGUIWindow_CurrentMenu->Release(); | 3306 pGUIWindow_CurrentMenu->Release(); |
3292 pEventTimer->Resume(); | 3307 pEventTimer->Resume(); |
3293 pCurrentScreen = 0; | 3308 pCurrentScreen = 0; |
3294 viewparams->bRedrawGameUI = 1; | 3309 viewparams->bRedrawGameUI = 1; |
3295 } | 3310 } |
3296 GUIWindow::Create(602, 450, 0, 0, (enum WindowType)92, (int)pBtn_GameSettings, 0); | 3311 GUIWindow::Create(602, 450, 0, 0, (enum WindowType)92, (int)pBtn_GameSettings, 0); |
3297 if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 ) | 3312 if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 ) |
3298 continue; | 3313 continue; |
3299 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_CloseBook; | 3314 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_Escape; |
3300 //goto LABEL_93; | 3315 //goto LABEL_93; |
3301 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; | 3316 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; |
3302 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | 3317 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; |
3303 ++pMessageQueue_50CBD0->uNumMessages; | 3318 ++pMessageQueue_50CBD0->uNumMessages; |
3304 continue; | 3319 continue; |
3305 } | 3320 } |
3306 if ( pUIMessageType == UIMSG_CloseBook ) | 3321 if ( pUIMessageType == UIMSG_Escape ) |
3307 { | 3322 { |
3308 if ( ptr_507BDC ) | 3323 if ( ptr_507BDC ) |
3309 { | 3324 { |
3310 sub_41426F(); | 3325 sub_41426F(); |
3311 continue; | 3326 continue; |
3398 % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum; | 3413 % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum; |
3399 uPlayerCreationUI_SelectedCharacter = uNum; | 3414 uPlayerCreationUI_SelectedCharacter = uNum; |
3400 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0, 0); | 3415 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0, 0); |
3401 continue; | 3416 continue; |
3402 } | 3417 } |
3403 if ( pUIMessageType == UIMSG_PlayerCreationVoiceBack ) | 3418 if ( pUIMessageType == UIMSG_PlayerCreationVoiceBack )// есть проблема со звуками |
3404 { | 3419 { |
3405 pCurrentPlayer = &pPlayer[uNum]; | 3420 pCurrentPlayer = &pPlayer[uNum]; |
3406 pSex = pCurrentPlayer->GetSexByVoice(); | 3421 pSex = pCurrentPlayer->GetSexByVoice(); |
3407 do | 3422 do |
3408 { | 3423 { |
3409 v12 = (/*(*/pCurrentPlayer->uVoiceID-- - 1/*) & 0x80000000u */) != 0; | 3424 v12 = (pCurrentPlayer->uVoiceID-- - 1) == 0; |
3410 if ( v12 ) | 3425 if ( v12 ) |
3411 pCurrentPlayer->uVoiceID = 19; | 3426 pCurrentPlayer->uVoiceID = 19; |
3412 v13 = pCurrentPlayer->GetSexByVoice(); | 3427 v13 = pCurrentPlayer->GetSexByVoice(); |
3413 } | 3428 } |
3414 while ( v13 != pSex ); | 3429 while ( v13 != pSex ); |
3430 while ( v10 != pSex ); | 3445 while ( v10 != pSex ); |
3431 pButton = pCreationUI_BtnPressRight2[uNum]; | 3446 pButton = pCreationUI_BtnPressRight2[uNum]; |
3432 GUIWindow::Create(pButton->uX, pButton->uY, 0, 0, (enum WindowType)92, (int)pButton, 1); | 3447 GUIWindow::Create(pButton->uX, pButton->uY, 0, 0, (enum WindowType)92, (int)pButton, 1); |
3433 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0, 0); | 3448 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0, 0); |
3434 pCurrentPlayer->PlaySound(102, 0); | 3449 pCurrentPlayer->PlaySound(102, 0); |
3435 continue; | |
3436 } | |
3437 if ( pUIMessageType == UIMSG_ArrowUp )// Кнопка Вверх | |
3438 { | |
3439 --pSaveListPosition; | |
3440 if ( pSaveListPosition < 0 ) | |
3441 pSaveListPosition = 0; | |
3442 pWindow = pGUIWindow_CurrentMenu; | |
3443 v8 = pGUIWindow_CurrentMenu->uFrameY + 197; | |
3444 GUIWindow::Create(pWindow->uFrameX + 215, v8, 0, 0, (WindowType)90, (int)pBtnArrowUp, 0); | |
3445 continue; | 3450 continue; |
3446 } | 3451 } |
3447 } | 3452 } |
3448 } | 3453 } |
3449 else | 3454 else |
3458 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = v5; | 3463 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = v5; |
3459 pParty->pPlayers[0].pActiveSkills[(&pPlayer[uPlayerCreationUI_SelectedCharacter])->GetSkillIdxByOrder(v41) | 3464 pParty->pPlayers[0].pActiveSkills[(&pPlayer[uPlayerCreationUI_SelectedCharacter])->GetSkillIdxByOrder(v41) |
3460 + 3486 * uPlayerCreationUI_SelectedCharacter] = 0; | 3465 + 3486 * uPlayerCreationUI_SelectedCharacter] = 0; |
3461 continue; | 3466 continue; |
3462 } | 3467 } |
3463 if ( (signed int)pUIMessageType > UIMSG_3C ) | 3468 if ( (signed int)pUIMessageType > UIMSG_PlayerCreationChangeName ) |
3464 { | 3469 { |
3465 if ( pUIMessageType == UIMSG_PlayerCreationClickPlus ) | 3470 if ( pUIMessageType == UIMSG_PlayerCreationClickPlus ) |
3466 { | 3471 { |
3467 GUIWindow::Create(613, 393, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnPlus, 1); | 3472 GUIWindow::Create(613, 393, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnPlus, 1); |
3468 (&pPlayer[uPlayerCreationUI_SelectedCharacter])->IncreaseAttribute( | 3473 (&pPlayer[uPlayerCreationUI_SelectedCharacter])->IncreaseAttribute( |
3525 } | 3530 } |
3526 else | 3531 else |
3527 { | 3532 { |
3528 switch ( pUIMessageType ) | 3533 switch ( pUIMessageType ) |
3529 { | 3534 { |
3530 case 60: | 3535 case UIMSG_PlayerCreationChangeName: |
3531 pAudioPlayer->PlaySound((SoundID)24, 0, 0, -1, 0, 0, 0, 0); | 3536 pAudioPlayer->PlaySound((SoundID)24, 0, 0, -1, 0, 0, 0, 0); |
3532 v3 = (void *)uNum; | 3537 v3 = (void *)uNum; |
3533 uPlayerCreationUI_SelectedCharacter = uNum; | 3538 uPlayerCreationUI_SelectedCharacter = uNum; |
3534 pKeyActionMap->_459E5A(0, 15, pGUIWindow_CurrentMenu); | 3539 pKeyActionMap->EnterText(0, 15, pGUIWindow_CurrentMenu); |
3535 pGUIWindow_CurrentMenu->ptr_1C = v3; | 3540 pGUIWindow_CurrentMenu->ptr_1C = v3; |
3536 break; | 3541 break; |
3537 case 5: | 3542 case UIMSG_ChangeGameState: |
3538 uGameState = 1; | 3543 uGameState = 1; |
3539 break; | 3544 break; |
3540 case 17: | 3545 case UIMSG_11://unknow |
3546 __debugbreak(); | |
3541 pMouse->SetCursorBitmap("MICON2"); | 3547 pMouse->SetCursorBitmap("MICON2"); |
3542 break; | 3548 break; |
3543 default: | 3549 case UIMSG_3A://unknow |
3544 if ( pUIMessageType == 58 ) | 3550 __debugbreak(); |
3545 //goto LABEL_114; | 3551 v40 = 10; |
3546 { | 3552 v2 = v40; |
3547 v40 = 10; | 3553 SetCurrentMenuID((MENU_STATE)v2); |
3548 v2 = v40; | |
3549 SetCurrentMenuID((MENU_STATE)v2); | |
3550 continue; | |
3551 } | |
3552 break; | 3554 break; |
3553 } | 3555 } |
3554 } | 3556 } |
3555 } | 3557 } |
3556 } | 3558 } |