Mercurial > might-and-magic-trilogy
comparison mm7_5.cpp @ 57:6b3a5283b107
UIMSG_PlayerCreation
author | Ritor1 |
---|---|
date | Thu, 25 Oct 2012 16:59:01 +0600 |
parents | 1f161a887c69 |
children | 30ec77bbd018 65c940aa7bf9 |
comparison
equal
deleted
inserted
replaced
56:1f161a887c69 | 57:6b3a5283b107 |
---|---|
3414 signed int v40; // [sp-10h] [bp-20h]@15 | 3414 signed int v40; // [sp-10h] [bp-20h]@15 |
3415 signed int v41; // [sp-10h] [bp-20h]@29 | 3415 signed int v41; // [sp-10h] [bp-20h]@29 |
3416 int v42; // [sp-10h] [bp-20h]@36 | 3416 int v42; // [sp-10h] [bp-20h]@36 |
3417 int v43; // [sp-10h] [bp-20h]@56 | 3417 int v43; // [sp-10h] [bp-20h]@56 |
3418 int uNum; // [sp+4h] [bp-Ch]@3 | 3418 int uNum; // [sp+4h] [bp-Ch]@3 |
3419 UIMessageType v45; // [sp+8h] [bp-8h]@3 | 3419 UIMessageType pUIMessageType; // [sp+8h] [bp-8h]@3 |
3420 int v46; // [sp+Ch] [bp-4h]@3 | 3420 int v46; // [sp+Ch] [bp-4h]@3 |
3421 Player *pPlayer; | 3421 Player *pPlayer; |
3422 | 3422 |
3423 if ( pMessageQueue_50CBD0->uNumMessages ) | 3423 if ( pMessageQueue_50CBD0->uNumMessages ) |
3424 { | 3424 { |
3425 //v0 = pAudioPlayer; | 3425 //v0 = pAudioPlayer; |
3426 v1 = (char *)pParty->pPlayers; | 3426 v1 = (char *)pParty->pPlayers; |
3427 pPlayer = pParty->pPlayers; | 3427 pPlayer = pParty->pPlayers; |
3428 do | 3428 do |
3429 { | 3429 { |
3430 pMessageQueue_50CBD0->PopMessage(&v45, &uNum, &v46); | 3430 pMessageQueue_50CBD0->PopMessage(&pUIMessageType, &uNum, &v46); |
3431 switch (v45) | 3431 switch (pUIMessageType) |
3432 { | 3432 { |
3433 case UIMSG_MainMenu_ShowPartyCreationWnd: | 3433 case UIMSG_MainMenu_ShowPartyCreationWnd: |
3434 { | 3434 { |
3435 GUIWindow::Create(495, 172, 0, 0, WINDOW_5A, (int)pMainMenu_BtnNew, 0); | 3435 GUIWindow::Create(495, 172, 0, 0, WINDOW_5A, (int)pMainMenu_BtnNew, 0); |
3436 SetCurrentMenuID(MENU_NEWGAME); | 3436 SetCurrentMenuID(MENU_NEWGAME); |
3467 } | 3467 } |
3468 continue; | 3468 continue; |
3469 } | 3469 } |
3470 | 3470 |
3471 | 3471 |
3472 switch (v45) | 3472 switch (pUIMessageType) |
3473 { | 3473 { |
3474 case UIMSG_A5: // WINDOW_5A | 3474 case UIMSG_A5: // WINDOW_5A |
3475 { | 3475 { |
3476 //main menu save/load wnd clicking on savegame lines | 3476 //main menu save/load wnd clicking on savegame lines |
3477 if (pGUIWindow_CurrentMenu->field_40 == 1) | 3477 if (pGUIWindow_CurrentMenu->field_40 == 1) |
3478 pKeyActionMap->_459ED1(0); | 3478 pKeyActionMap->_459ED1(0); |
3479 if ( pCurrentScreen != 11 | 3479 if ( pCurrentScreen != 11 || uLoadGameUI_SelectedSlot != uNum + dword_6A0C9C ) |
3480 || uLoadGameUI_SelectedSlot != uNum + dword_6A0C9C ) | |
3481 { | 3480 { |
3482 //load clicked line | 3481 //load clicked line |
3483 v26 = uNum + dword_6A0C9C; | 3482 v26 = uNum + dword_6A0C9C; |
3484 if ( dword_6BE138 == uNum + dword_6A0C9C ) | 3483 if ( dword_6BE138 == uNum + dword_6A0C9C ) |
3485 { | 3484 { |
3502 continue; | 3501 continue; |
3503 | 3502 |
3504 | 3503 |
3505 case UIMSG_A4: | 3504 case UIMSG_A4: |
3506 { | 3505 { |
3507 GUIWindow::Create(pGUIWindow_CurrentMenu->uFrameX + 241, | 3506 GUIWindow::Create(pGUIWindow_CurrentMenu->uFrameX + 241, pGUIWindow_CurrentMenu->uFrameY + 302, |
3508 pGUIWindow_CurrentMenu->uFrameY + 302, | |
3509 61, 28, WINDOW_5E, (int)ptr_69BD64, 0); | 3507 61, 28, WINDOW_5E, (int)ptr_69BD64, 0); |
3510 } | 3508 } |
3511 continue; | 3509 continue; |
3512 } | 3510 } |
3513 | 3511 |
3514 if ( (signed int)v45 > 75 ) | 3512 if ( (signed int)pUIMessageType > 75 ) |
3515 { | 3513 { |
3516 if ( v45 > UIMSG_A3 ) | 3514 if ( pUIMessageType > UIMSG_A3 ) |
3517 { | 3515 { |
3518 if ( v45 == UIMSG_A6 ) | 3516 if ( pUIMessageType == UIMSG_A6 ) |
3519 { | 3517 { |
3520 v43 = 0; | 3518 v43 = 0; |
3521 v39 = (int)ptr_69BD60; | 3519 v39 = (int)ptr_69BD60; |
3522 v8 = pGUIWindow_CurrentMenu->uFrameY + 302; | 3520 v8 = pGUIWindow_CurrentMenu->uFrameY + 302; |
3523 v37 = (WindowType)95; | 3521 v37 = (WindowType)95; |
3525 v35 = 28; | 3523 v35 = 28; |
3526 v33 = 61; | 3524 v33 = 61; |
3527 GUIWindow::Create(v18, v8, v33, v35, v37, v39, v43); | 3525 GUIWindow::Create(v18, v8, v33, v35, v37, v39, v43); |
3528 continue; | 3526 continue; |
3529 } | 3527 } |
3530 if ( v45 == UIMSG_AB ) // sellect face -1 | 3528 if ( pUIMessageType == UIMSG_SelectFacePlayerBack ) |
3531 { | 3529 { |
3532 pPlayer = &pParty->pPlayers[uNum]; | 3530 pPlayer = &pParty->pPlayers[uNum]; |
3533 v12 = (char)((int)pPlayer->uFace - 1) < 0; | 3531 v12 = (char)((int)pPlayer->uFace - 1) < 0; |
3534 --pPlayer->uFace; | 3532 --pPlayer->uFace; |
3535 if ( v12 ) | 3533 if ( v12 ) |
3545 GUIWindow::Create(pCreationUI_BtnPressLeft[v25]->uX, pCreationUI_BtnPressLeft[v25]->uY, 0, 0, | 3543 GUIWindow::Create(pCreationUI_BtnPressLeft[v25]->uX, pCreationUI_BtnPressLeft[v25]->uY, 0, 0, |
3546 (enum WindowType)92, (int)pCreationUI_BtnPressLeft[v25], 1); | 3544 (enum WindowType)92, (int)pCreationUI_BtnPressLeft[v25], 1); |
3547 //v0 = pAudioPlayer; | 3545 //v0 = pAudioPlayer; |
3548 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0.0, 0); | 3546 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0.0, 0); |
3549 v22 = pPlayer; | 3547 v22 = pPlayer; |
3550 goto LABEL_117; | 3548 v22->PlaySound(102, 0); |
3551 } | 3549 v1 = (char *)pParty->pPlayers; |
3552 if ( v45 == UIMSG_AC ) //sellect face +1 | 3550 continue; |
3551 } | |
3552 if ( pUIMessageType == UIMSG_SelectFacePlayerForward ) | |
3553 { | 3553 { |
3554 pPlayer = &pParty->pPlayers[uNum]; | 3554 pPlayer = &pParty->pPlayers[uNum]; |
3555 v20 = (char)((int)pPlayer->uFace + 1) % 20; | 3555 v20 = (char)((int)pPlayer->uFace + 1) % 20; |
3556 pPlayer->uFace = v20; | 3556 pPlayer->uFace = v20; |
3557 pPlayer->uVoiceID = v20; | 3557 pPlayer->uVoiceID = v20; |
3565 GUIWindow::Create(pCreationUI_BtnPressRight[v21]->uX, pCreationUI_BtnPressRight[v21]->uY, 0, 0, (enum WindowType)92, | 3565 GUIWindow::Create(pCreationUI_BtnPressRight[v21]->uX, pCreationUI_BtnPressRight[v21]->uY, 0, 0, (enum WindowType)92, |
3566 (int)pCreationUI_BtnPressRight[v21], 1); | 3566 (int)pCreationUI_BtnPressRight[v21], 1); |
3567 //v0 = pAudioPlayer; | 3567 //v0 = pAudioPlayer; |
3568 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0, 0); | 3568 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0, 0); |
3569 v22 = pPlayer; | 3569 v22 = pPlayer; |
3570 LABEL_117: | |
3571 v22->PlaySound(102, 0); | 3570 v22->PlaySound(102, 0); |
3572 v1 = (char *)pParty->pPlayers; | 3571 v1 = (char *)pParty->pPlayers; |
3573 continue; | 3572 continue; |
3574 } | 3573 } |
3575 if ( v45 == UIMSG_AD ) //Press NEW | 3574 if ( pUIMessageType == UIMSG_AD ) |
3576 { | 3575 { |
3577 GUIWindow::Create(pMainMenu_BtnNew->uX, pMainMenu_BtnNew->uY, 0, 0, (enum WindowType)90, (int)pMainMenu_BtnNew, 0); | 3576 GUIWindow::Create(pMainMenu_BtnNew->uX, pMainMenu_BtnNew->uY, 0, 0, (enum WindowType)90, (int)pMainMenu_BtnNew, 0); |
3578 SetCurrentMenuID(MENU_LOAD); | 3577 SetCurrentMenuID(MENU_LOAD); |
3579 continue; | 3578 continue; |
3580 } | 3579 } |
3581 if ( v45 != 174 )//Press EXIT | 3580 if ( pUIMessageType != UIMSG_AE ) |
3582 continue; | 3581 continue; |
3583 GUIWindow::Create(pMainMenu_BtnExit->uX, pMainMenu_BtnExit->uY, 0, 0, (enum WindowType)90, (int)pMainMenu_BtnExit, 0); | 3582 GUIWindow::Create(pMainMenu_BtnExit->uX, pMainMenu_BtnExit->uY, 0, 0, (enum WindowType)90, (int)pMainMenu_BtnExit, 0); |
3584 LABEL_114: | 3583 LABEL_114: |
3585 v40 = 10; | 3584 v40 = 10; |
3586 LABEL_89: | 3585 LABEL_89: |
3587 v2 = v40; | 3586 v2 = v40; |
3588 LABEL_90: | |
3589 SetCurrentMenuID((MENU_STATE)v2); | 3587 SetCurrentMenuID((MENU_STATE)v2); |
3590 continue; | 3588 continue; |
3591 } | 3589 } |
3592 if ( v45 == UIMSG_A3 ) | 3590 if ( pUIMessageType == UIMSG_A3 ) |
3593 { | 3591 { |
3594 ++dword_6A0C9C; | 3592 ++dword_6A0C9C; |
3595 if ( dword_6A0C9C >= uNum ) | 3593 if ( dword_6A0C9C >= uNum ) |
3596 dword_6A0C9C = uNum - 1; | 3594 dword_6A0C9C = uNum - 1; |
3597 if ( dword_6A0C9C < 1 ) | 3595 if ( dword_6A0C9C < 1 ) |
3600 v43 = 0; | 3598 v43 = 0; |
3601 v39 = (int)ptr_69BD58; | 3599 v39 = (int)ptr_69BD58; |
3602 v8 = pGUIWindow_CurrentMenu->uFrameY + 323; | 3600 v8 = pGUIWindow_CurrentMenu->uFrameY + 323; |
3603 goto LABEL_105; | 3601 goto LABEL_105; |
3604 } | 3602 } |
3605 if ( v45 == 107 ) | 3603 if ( pUIMessageType == UIMSG_6B ) |
3606 { | 3604 { |
3607 if ( pCurrentScreen ) | 3605 if ( pCurrentScreen ) |
3608 { | 3606 { |
3609 pGUIWindow_CurrentMenu->Release(); | 3607 pGUIWindow_CurrentMenu->Release(); |
3610 pEventTimer->Resume(); | 3608 pEventTimer->Resume(); |
3615 if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 ) | 3613 if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 ) |
3616 continue; | 3614 continue; |
3617 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113; | 3615 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113; |
3618 goto LABEL_93; | 3616 goto LABEL_93; |
3619 } | 3617 } |
3620 if ( v45 == UIMSG_CloseBook ) | 3618 if ( pUIMessageType == UIMSG_CloseBook ) |
3621 { | 3619 { |
3622 if ( ptr_507BDC ) | 3620 if ( ptr_507BDC ) |
3623 { | 3621 { |
3624 sub_41426F(); | 3622 sub_41426F(); |
3625 continue; | 3623 continue; |
3657 } | 3655 } |
3658 continue; | 3656 continue; |
3659 } | 3657 } |
3660 v16 = GetCurrentMenuID() == 8; | 3658 v16 = GetCurrentMenuID() == 8; |
3661 v17 = pCurrentScreen; | 3659 v17 = pCurrentScreen; |
3662 if ( v16 | 3660 if ( v16 && !pCurrentScreen ) |
3663 && !pCurrentScreen ) | |
3664 goto LABEL_83; | 3661 goto LABEL_83; |
3665 if ( pCurrentScreen == 12 ) | 3662 if ( pCurrentScreen == 12 ) |
3666 { | 3663 { |
3667 pIcons_LOD->_4114F2(); | 3664 pIcons_LOD->_4114F2(); |
3668 //crt_deconstruct_ptr_6A0118(); | 3665 //crt_deconstruct_ptr_6A0118(); |
3690 //VideoPlayer::dtor(); | 3687 //VideoPlayer::dtor(); |
3691 } | 3688 } |
3692 } | 3689 } |
3693 else | 3690 else |
3694 { | 3691 { |
3695 if ( v45 == 118 ) | 3692 if ( pUIMessageType == UIMSG_PlayerCreationSelectQuality ) |
3696 { | 3693 { |
3697 v14 = uNum; | |
3698 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) | 3694 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) |
3699 % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum; | 3695 % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum; |
3700 uPlayerCreationUI_SelectedCharacter = v14; | 3696 uPlayerCreationUI_SelectedCharacter = uNum; |
3701 LABEL_36: | 3697 LABEL_36: |
3702 v42 = 0; | 3698 v42 = 0; |
3703 v38 = 0; | 3699 v38 = 0; |
3704 v36 = 0; | 3700 v36 = 0; |
3705 v34 = 0; | 3701 v34 = 0; |
3709 pSoundID = (SoundID)66; | 3705 pSoundID = (SoundID)66; |
3710 LABEL_40: | 3706 LABEL_40: |
3711 pAudioPlayer->PlaySound(pSoundID, v30, v31, v32, v34, v36, v38, v42); | 3707 pAudioPlayer->PlaySound(pSoundID, v30, v31, v32, v34, v36, v38, v42); |
3712 continue; | 3708 continue; |
3713 } | 3709 } |
3714 if ( v45 == 144 ) | 3710 if ( pUIMessageType == UIMSG_PlayerCreationVoiceBack ) |
3715 { | 3711 { |
3716 v9 = &pPlayer[uNum]; | 3712 v9 = &pPlayer[uNum]; |
3717 v46 = v9->GetSexByVoice(); | 3713 v46 = v9->GetSexByVoice(); |
3718 do | 3714 do |
3719 { | 3715 { |
3724 } | 3720 } |
3725 while ( v13 != v46 ); | 3721 while ( v13 != v46 ); |
3726 v11 = pCreationUI_BtnPressLeft2[uNum]; | 3722 v11 = pCreationUI_BtnPressLeft2[uNum]; |
3727 goto LABEL_60; | 3723 goto LABEL_60; |
3728 } | 3724 } |
3729 if ( v45 == 145 ) | 3725 if ( pUIMessageType == UIMSG_PlayerCreationVoiceForward ) |
3730 { | 3726 { |
3731 v9 = &pPlayer[uNum]; | 3727 v9 = &pPlayer[uNum]; |
3732 v46 = v9->GetSexByVoice(); | 3728 v46 = v9->GetSexByVoice(); |
3733 do | 3729 do |
3734 { | 3730 { |
3741 GUIWindow::Create(v11->uX, v11->uY, 0, 0, (enum WindowType)92, (int)v11, 1); | 3737 GUIWindow::Create(v11->uX, v11->uY, 0, 0, (enum WindowType)92, (int)v11, 1); |
3742 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0, 0); | 3738 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0, 0); |
3743 v9->PlaySound(102, 0); | 3739 v9->PlaySound(102, 0); |
3744 continue; | 3740 continue; |
3745 } | 3741 } |
3746 if ( v45 == UIMSG_A2 ) | 3742 if ( pUIMessageType == UIMSG_A2 ) |
3747 { | 3743 { |
3748 --dword_6A0C9C; | 3744 --dword_6A0C9C; |
3749 if ( dword_6A0C9C < 0 ) | 3745 if ( dword_6A0C9C < 0 ) |
3750 dword_6A0C9C = 0; | 3746 dword_6A0C9C = 0; |
3751 v7 = pGUIWindow_CurrentMenu; | 3747 v7 = pGUIWindow_CurrentMenu; |
3758 } | 3754 } |
3759 } | 3755 } |
3760 } | 3756 } |
3761 else | 3757 else |
3762 { | 3758 { |
3763 if ( v45 == 75 ) //sellect quality | 3759 if ( pUIMessageType == UIMSG_PlayerCreationRemoveDownSkill ) |
3764 { | 3760 { |
3765 uPlayerCreationUI_SelectedCharacter = uNum; | 3761 uPlayerCreationUI_SelectedCharacter = uNum; |
3766 v41 = 3; | 3762 v41 = 3; |
3767 v1 = (char *)pParty->pPlayers; | 3763 v1 = (char *)pParty->pPlayers; |
3768 v5 = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7 | 3764 v5 = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7 |
3769 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum; | 3765 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum; |
3770 goto LABEL_44; | 3766 goto LABEL_44; |
3771 } | 3767 } |
3772 if ( (signed int)v45 > 60 ) | 3768 if ( (signed int)pUIMessageType > UIMSG_3C ) |
3773 { | 3769 { |
3774 if ( v45 == 62 ) //click + | 3770 if ( pUIMessageType == UIMSG_PlayerCreationClickPlus ) |
3775 { | 3771 { |
3776 GUIWindow::Create(613, 393, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnPlus, 1); | 3772 GUIWindow::Create(613, 393, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnPlus, 1); |
3777 (&pPlayer[uPlayerCreationUI_SelectedCharacter])->IncreaseAttribute( | 3773 (&pPlayer[uPlayerCreationUI_SelectedCharacter])->IncreaseAttribute( |
3778 (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7); | 3774 (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7); |
3779 v42 = 0; | 3775 v42 = 0; |
3784 v31 = 0; | 3780 v31 = 0; |
3785 v30 = 0; | 3781 v30 = 0; |
3786 pSoundID = (SoundID)20; | 3782 pSoundID = (SoundID)20; |
3787 goto LABEL_40; | 3783 goto LABEL_40; |
3788 } | 3784 } |
3789 if ( v45 == 63 ) // click - | 3785 if ( pUIMessageType == UIMSG_PlayerCreationClickMinus ) |
3790 { | 3786 { |
3791 GUIWindow::Create(523, 393, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnMinus, 1); | 3787 GUIWindow::Create(523, 393, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnMinus, 1); |
3792 (&pPlayer[uPlayerCreationUI_SelectedCharacter])->DecreaseAttribute( | 3788 (&pPlayer[uPlayerCreationUI_SelectedCharacter])->DecreaseAttribute( |
3793 (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7); | 3789 (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7); |
3794 v42 = 0; | 3790 v42 = 0; |
3799 v31 = 0; | 3795 v31 = 0; |
3800 v30 = 0; | 3796 v30 = 0; |
3801 pSoundID = (SoundID)23; | 3797 pSoundID = (SoundID)23; |
3802 goto LABEL_40; | 3798 goto LABEL_40; |
3803 } | 3799 } |
3804 if ( v45 == 64 ) // sellect active skill | 3800 if ( pUIMessageType == UIMSG_PlayerCreationSelectActiveSkill ) |
3805 { | 3801 { |
3806 auto _t = &pPlayer[uPlayerCreationUI_SelectedCharacter]; | 3802 auto _t = &pPlayer[uPlayerCreationUI_SelectedCharacter]; |
3807 v6 = _t->GetSkillIdxByOrder(uNum + 4); | 3803 v6 = _t->GetSkillIdxByOrder(uNum + 4); |
3808 if ( _t->GetSkillIdxByOrder(3) == 37 ) | 3804 if ( _t->GetSkillIdxByOrder(3) == 37 ) |
3809 pParty->pPlayers[0].pActiveSkills[v6 + 3486 * uPlayerCreationUI_SelectedCharacter] = 1; | 3805 pParty->pPlayers[0].pActiveSkills[v6 + 3486 * uPlayerCreationUI_SelectedCharacter] = 1; |
3815 v31 = 0; | 3811 v31 = 0; |
3816 v30 = 0; | 3812 v30 = 0; |
3817 pSoundID = (SoundID)24; | 3813 pSoundID = (SoundID)24; |
3818 goto LABEL_40; | 3814 goto LABEL_40; |
3819 } | 3815 } |
3820 if ( v45 == 65 ) | 3816 if ( pUIMessageType == UIMSG_41 ) |
3821 { | 3817 { |
3822 (&pPlayer[uPlayerCreationUI_SelectedCharacter])->Reset(0); | 3818 (&pPlayer[uPlayerCreationUI_SelectedCharacter])->Reset(0); |
3823 goto LABEL_36; | 3819 goto LABEL_36; |
3824 } | 3820 } |
3825 if ( v45 == 66 ) // click ok | 3821 if ( pUIMessageType == UIMSG_PlayerCreationClickOK ) |
3826 { | 3822 { |
3827 GUIWindow::Create(0x244u, 0x1AFu, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnOK, 0); | 3823 GUIWindow::Create(580, 431, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnOK, 0); |
3828 if ( PlayerCreation_ComputeAttributeBonus() || !sub_4908DE() ) | 3824 if ( PlayerCreation_ComputeAttributeBonus() || !sub_4908DE() ) |
3829 GameUI_StatusBar_TimedStringTimeLeft = GetTickCount() + 4000; | 3825 GameUI_StatusBar_TimedStringTimeLeft = GetTickCount() + 4000; |
3830 else | 3826 else |
3831 uGameState = 6; | 3827 uGameState = 6; |
3832 continue; | 3828 continue; |
3833 } | 3829 } |
3834 if ( v45 == 67 ) // click reset | 3830 if ( pUIMessageType == UIMSG_PlayerCreationClickReset ) |
3835 { | 3831 { |
3836 GUIWindow::Create(0x20Fu, 0x1AFu, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnReset, 0); | 3832 GUIWindow::Create(527, 431, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnReset, 0); |
3837 pParty->Reset(); | 3833 pParty->Reset(); |
3838 } | 3834 } |
3839 else | 3835 else |
3840 { | 3836 { |
3841 if ( v45 == 74 ) | 3837 if ( pUIMessageType == UIMSG_PlayerCreationRemoveUpSkill ) |
3842 { | 3838 { |
3843 uPlayerCreationUI_SelectedCharacter = uNum; | 3839 uPlayerCreationUI_SelectedCharacter = uNum; |
3844 v4 = pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem; | 3840 v4 = pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem; |
3845 v46 = pGUIWindow_CurrentMenu->pStartingPosActiveItem; | 3841 v46 = pGUIWindow_CurrentMenu->pStartingPosActiveItem; |
3846 v41 = 2; | 3842 v41 = 2; |
3847 v5 = (v4 % 7) + v46 + 7 * uNum; | 3843 v5 = v4 % 7 + v46 + 7 * uNum; |
3848 LABEL_44: | 3844 LABEL_44: |
3849 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = v5; | 3845 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = v5; |
3850 pParty->pPlayers[0].pActiveSkills[(&pPlayer[uPlayerCreationUI_SelectedCharacter])->GetSkillIdxByOrder(v41) | 3846 pParty->pPlayers[0].pActiveSkills[(&pPlayer[uPlayerCreationUI_SelectedCharacter])->GetSkillIdxByOrder(v41) |
3851 + 3486 * uPlayerCreationUI_SelectedCharacter] = 0; | 3847 + 3486 * uPlayerCreationUI_SelectedCharacter] = 0; |
3852 continue; | 3848 continue; |
3853 } | 3849 } |
3854 } | 3850 } |
3855 } | 3851 } |
3856 else | 3852 else |
3857 { | 3853 { |
3858 switch ( v45 ) | 3854 switch ( pUIMessageType ) |
3859 { | 3855 { |
3860 case 60: | 3856 case 60: |
3861 pAudioPlayer->PlaySound((SoundID)24, 0, 0, -1, 0, 0, 0, 0); | 3857 pAudioPlayer->PlaySound((SoundID)24, 0, 0, -1, 0, 0, 0, 0); |
3862 v3 = (void *)uNum; | 3858 v3 = (void *)uNum; |
3863 uPlayerCreationUI_SelectedCharacter = uNum; | 3859 uPlayerCreationUI_SelectedCharacter = uNum; |
3869 break; | 3865 break; |
3870 case 17: | 3866 case 17: |
3871 pMouse->SetCursorBitmap("MICON2"); | 3867 pMouse->SetCursorBitmap("MICON2"); |
3872 break; | 3868 break; |
3873 default: | 3869 default: |
3874 if ( v45 == 58 ) | 3870 if ( pUIMessageType == 58 ) |
3875 goto LABEL_114; | 3871 goto LABEL_114; |
3876 break; | 3872 break; |
3877 } | 3873 } |
3878 } | 3874 } |
3879 } | 3875 } |