Mercurial > might-and-magic-trilogy
comparison mm7_5.cpp @ 51:4211cceb3813
Merge
author | Nomad |
---|---|
date | Tue, 23 Oct 2012 23:40:55 +0200 |
parents | fde5c5acb66e 25fabc49627b |
children | 0f4ed4f0f472 663d5bf032d9 |
comparison
equal
deleted
inserted
replaced
50:fde5c5acb66e | 51:4211cceb3813 |
---|---|
3398 int v24; // eax@118 | 3398 int v24; // eax@118 |
3399 unsigned int v25; // eax@120 | 3399 unsigned int v25; // eax@120 |
3400 unsigned int v26; // ecx@127 | 3400 unsigned int v26; // ecx@127 |
3401 unsigned int v27; // eax@129 | 3401 unsigned int v27; // eax@129 |
3402 unsigned __int8 v28; // of@129 | 3402 unsigned __int8 v28; // of@129 |
3403 SoundID v29; // [sp-2Ch] [bp-3Ch]@36 | 3403 SoundID pSoundID; // [sp-2Ch] [bp-3Ch]@36 |
3404 signed int v30; // [sp-28h] [bp-38h]@36 | 3404 signed int v30; // [sp-28h] [bp-38h]@36 |
3405 unsigned int v31; // [sp-24h] [bp-34h]@36 | 3405 unsigned int v31; // [sp-24h] [bp-34h]@36 |
3406 signed int v32; // [sp-20h] [bp-30h]@36 | 3406 signed int v32; // [sp-20h] [bp-30h]@36 |
3407 unsigned int v33; // [sp-20h] [bp-30h]@105 | 3407 unsigned int v33; // [sp-20h] [bp-30h]@105 |
3408 signed int v34; // [sp-1Ch] [bp-2Ch]@36 | 3408 signed int v34; // [sp-1Ch] [bp-2Ch]@36 |
3413 int v39; // [sp-14h] [bp-24h]@56 | 3413 int v39; // [sp-14h] [bp-24h]@56 |
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 unsigned __int8 uClass[4]; // [sp+4h] [bp-Ch]@3 | 3418 int uNum; // [sp+4h] [bp-Ch]@3 |
3419 UIMessageType v45; // [sp+8h] [bp-8h]@3 | 3419 UIMessageType v45; // [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 | 3422 |
3422 if ( pMessageQueue_50CBD0->uNumMessages ) | 3423 if ( pMessageQueue_50CBD0->uNumMessages ) |
3423 { | 3424 { |
3424 //v0 = pAudioPlayer; | 3425 //v0 = pAudioPlayer; |
3425 v1 = (char *)pParty->pPlayers; | 3426 v1 = (char *)pParty->pPlayers; |
3427 pPlayer = pParty->pPlayers; | |
3426 do | 3428 do |
3427 { | 3429 { |
3428 pMessageQueue_50CBD0->PopMessage(&v45, (int *)uClass, &v46); | 3430 pMessageQueue_50CBD0->PopMessage(&v45, &uNum, &v46); |
3429 switch (v45) | 3431 switch (v45) |
3430 { | 3432 { |
3431 case UIMSG_MainMenu_ShowPartyCreationWnd: | 3433 case UIMSG_MainMenu_ShowPartyCreationWnd: |
3432 { | 3434 { |
3433 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); |
3473 { | 3475 { |
3474 //main menu save/load wnd clicking on savegame lines | 3476 //main menu save/load wnd clicking on savegame lines |
3475 if (pGUIWindow_CurrentMenu->field_40 == 1) | 3477 if (pGUIWindow_CurrentMenu->field_40 == 1) |
3476 pKeyActionMap->_459ED1(0); | 3478 pKeyActionMap->_459ED1(0); |
3477 if ( pCurrentScreen != 11 | 3479 if ( pCurrentScreen != 11 |
3478 || uLoadGameUI_SelectedSlot != *(int *)uClass + dword_6A0C9C ) | 3480 || uLoadGameUI_SelectedSlot != uNum + dword_6A0C9C ) |
3479 { | 3481 { |
3480 //load clicked line | 3482 //load clicked line |
3481 v26 = *(int *)uClass + dword_6A0C9C; | 3483 v26 = uNum + dword_6A0C9C; |
3482 if ( dword_6BE138 == *(int *)uClass + dword_6A0C9C ) | 3484 if ( dword_6BE138 == uNum + dword_6A0C9C ) |
3483 { | 3485 { |
3484 pMessageQueue_50CBD0->SendMessage(UIMSG_A4, 0, 0); | 3486 pMessageQueue_50CBD0->SendMessage(UIMSG_A4, 0, 0); |
3485 pMessageQueue_50CBD0->SendMessage(UIMSG_LoadGame, 0, 0); | 3487 pMessageQueue_50CBD0->SendMessage(UIMSG_LoadGame, 0, 0); |
3486 } | 3488 } |
3487 uLoadGameUI_SelectedSlot = v26; | 3489 uLoadGameUI_SelectedSlot = v26; |
3523 v35 = 28; | 3525 v35 = 28; |
3524 v33 = 61; | 3526 v33 = 61; |
3525 GUIWindow::Create(v18, v8, v33, v35, v37, v39, v43); | 3527 GUIWindow::Create(v18, v8, v33, v35, v37, v39, v43); |
3526 continue; | 3528 continue; |
3527 } | 3529 } |
3528 if ( v45 == UIMSG_AB ) | 3530 if ( v45 == UIMSG_AB ) // sellect face -1 |
3529 { | 3531 { |
3530 v23 = (char *)&pParty->pPlayers[*(int *)uClass]; | 3532 pPlayer = &pParty->pPlayers[uNum]; |
3531 v24 = (int)(v23 + 186); | 3533 v12 = (char)((int)pPlayer->uFace - 1) < 0; |
3532 v12 = (char)(v23[186] - 1) < 0; | 3534 --pPlayer->uFace; |
3533 --*(char *)v24; | |
3534 if ( v12 ) | 3535 if ( v12 ) |
3535 *(char *)v24 = 19; | 3536 pPlayer->uFace = 19; |
3536 *((int *)v23 + 1608) = *(char *)v24; | 3537 pPlayer->uVoiceID = pPlayer->uFace; |
3537 ((Player *)v23)->SetInitialStats(); | 3538 pPlayer->SetInitialStats(); |
3538 ((Player *)v23)->SetSexByVoice(); | 3539 pPlayer->SetSexByVoice(); |
3539 ((Player *)v23)->RandomizeName(); | 3540 pPlayer->RandomizeName(); |
3540 v25 = *(int *)uClass; | 3541 v25 = uNum; |
3541 pGUIWindow_CurrentMenu->field_2C_focus_id = (pGUIWindow_CurrentMenu->field_2C_focus_id | 3542 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem |
3542 - pGUIWindow_CurrentMenu->field_38) | 3543 - pGUIWindow_CurrentMenu->pStartingPosActiveItem) |
3543 % 7 | 3544 % 7 |
3544 + pGUIWindow_CurrentMenu->field_38 | 3545 + pGUIWindow_CurrentMenu->pStartingPosActiveItem |
3545 + 7 * *(int *)uClass; | 3546 + 7 * uNum; |
3546 uPlayerCreationUI_SelectedCharacter = v25; | 3547 uPlayerCreationUI_SelectedCharacter = v25; |
3547 GUIWindow::Create( | 3548 GUIWindow::Create( |
3548 pCreationUI_BtnPressLeft[v25]->uX, | 3549 pCreationUI_BtnPressLeft[v25]->uX, |
3549 pCreationUI_BtnPressLeft[v25]->uY, | 3550 pCreationUI_BtnPressLeft[v25]->uY, |
3550 0, | 3551 0, |
3552 (enum WindowType)92, | 3553 (enum WindowType)92, |
3553 (int)pCreationUI_BtnPressLeft[v25], | 3554 (int)pCreationUI_BtnPressLeft[v25], |
3554 1); | 3555 1); |
3555 //v0 = pAudioPlayer; | 3556 //v0 = pAudioPlayer; |
3556 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0.0, 0); | 3557 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0.0, 0); |
3557 v22 = (Player *)v23; | 3558 v22 = pPlayer; |
3558 goto LABEL_117; | 3559 goto LABEL_117; |
3559 } | 3560 } |
3560 if ( v45 == UIMSG_AC ) | 3561 if ( v45 == UIMSG_AC ) //sellect face +1 |
3561 { | 3562 { |
3562 v19 = (int)&v1[6972 * *(int *)uClass]; | 3563 pPlayer = &pParty->pPlayers[uNum]; |
3563 v20 = (char)(*(char *)(v19 + 186) + 1) % 20; | 3564 v20 = (char)((int)pPlayer->uFace + 1) % 20; |
3564 *(char *)(v19 + 186) = v20; | 3565 pPlayer->uFace = v20; |
3565 *(int *)(v19 + 6432) = v20; | 3566 pPlayer->uVoiceID = v20; |
3566 ((Player *)v19)->SetInitialStats(); | 3567 pPlayer->SetInitialStats(); |
3567 ((Player *)v19)->SetSexByVoice(); | 3568 pPlayer->SetSexByVoice(); |
3568 ((Player *)v19)->RandomizeName(); | 3569 pPlayer->RandomizeName(); |
3569 v21 = *(int *)uClass; | 3570 v21 = uNum; |
3570 pGUIWindow_CurrentMenu->field_2C_focus_id = (pGUIWindow_CurrentMenu->field_2C_focus_id | 3571 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem |
3571 - pGUIWindow_CurrentMenu->field_38) | 3572 - pGUIWindow_CurrentMenu->pStartingPosActiveItem) |
3572 % 7 | 3573 % 7 |
3573 + pGUIWindow_CurrentMenu->field_38 | 3574 + pGUIWindow_CurrentMenu->pStartingPosActiveItem |
3574 + 7 * *(int *)uClass; | 3575 + 7 * uNum; |
3575 uPlayerCreationUI_SelectedCharacter = v21; | 3576 uPlayerCreationUI_SelectedCharacter = v21; |
3576 GUIWindow::Create( | 3577 GUIWindow::Create( |
3577 pCreationUI_BtnPressRight[v21]->uX, | 3578 pCreationUI_BtnPressRight[v21]->uX, |
3578 pCreationUI_BtnPressRight[v21]->uY, | 3579 pCreationUI_BtnPressRight[v21]->uY, |
3579 0, | 3580 0, |
3581 (enum WindowType)92, | 3582 (enum WindowType)92, |
3582 (int)pCreationUI_BtnPressRight[v21], | 3583 (int)pCreationUI_BtnPressRight[v21], |
3583 1); | 3584 1); |
3584 //v0 = pAudioPlayer; | 3585 //v0 = pAudioPlayer; |
3585 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0, 0); | 3586 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0, 0); |
3586 v22 = (Player *)v19; | 3587 v22 = pPlayer; |
3587 LABEL_117: | 3588 LABEL_117: |
3588 v22->PlaySound(102, 0); | 3589 v22->PlaySound(102, 0); |
3589 v1 = (char *)pParty->pPlayers; | 3590 v1 = (char *)pParty->pPlayers; |
3590 continue; | 3591 continue; |
3591 } | 3592 } |
3621 continue; | 3622 continue; |
3622 } | 3623 } |
3623 if ( v45 == UIMSG_A3 ) | 3624 if ( v45 == UIMSG_A3 ) |
3624 { | 3625 { |
3625 ++dword_6A0C9C; | 3626 ++dword_6A0C9C; |
3626 if ( dword_6A0C9C >= *(int *)uClass ) | 3627 if ( dword_6A0C9C >= uNum ) |
3627 dword_6A0C9C = *(int *)uClass - 1; | 3628 dword_6A0C9C = uNum - 1; |
3628 if ( dword_6A0C9C < 1 ) | 3629 if ( dword_6A0C9C < 1 ) |
3629 dword_6A0C9C = 0; | 3630 dword_6A0C9C = 0; |
3630 v7 = pGUIWindow_CurrentMenu; | 3631 v7 = pGUIWindow_CurrentMenu; |
3631 v43 = 0; | 3632 v43 = 0; |
3632 v39 = (int)ptr_69BD58; | 3633 v39 = (int)ptr_69BD58; |
3723 } | 3724 } |
3724 else | 3725 else |
3725 { | 3726 { |
3726 if ( v45 == 118 ) | 3727 if ( v45 == 118 ) |
3727 { | 3728 { |
3728 v14 = *(int *)uClass; | 3729 v14 = uNum; |
3729 pGUIWindow_CurrentMenu->field_2C_focus_id = (pGUIWindow_CurrentMenu->field_2C_focus_id | 3730 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem |
3730 - pGUIWindow_CurrentMenu->field_38) | 3731 - pGUIWindow_CurrentMenu->pStartingPosActiveItem) |
3731 % 7 | 3732 % 7 |
3732 + pGUIWindow_CurrentMenu->field_38 | 3733 + pGUIWindow_CurrentMenu->pStartingPosActiveItem |
3733 + 7 * *(int *)uClass; | 3734 + 7 * uNum; |
3734 uPlayerCreationUI_SelectedCharacter = v14; | 3735 uPlayerCreationUI_SelectedCharacter = v14; |
3735 LABEL_36: | 3736 LABEL_36: |
3736 v42 = 0; | 3737 v42 = 0; |
3737 v38 = 0; | 3738 v38 = 0; |
3738 v36 = 0; | 3739 v36 = 0; |
3739 v34 = 0; | 3740 v34 = 0; |
3740 v32 = -1; | 3741 v32 = -1; |
3741 v31 = 0; | 3742 v31 = 0; |
3742 v30 = 0; | 3743 v30 = 0; |
3743 v29 = (SoundID)66; | 3744 pSoundID = (SoundID)66; |
3744 LABEL_40: | 3745 LABEL_40: |
3745 pAudioPlayer->PlaySound(v29, v30, v31, v32, v34, v36, v38, v42); | 3746 pAudioPlayer->PlaySound(pSoundID, v30, v31, v32, v34, v36, v38, v42); |
3746 continue; | 3747 continue; |
3747 } | 3748 } |
3748 if ( v45 == 144 ) | 3749 if ( v45 == 144 ) |
3749 { | 3750 { |
3750 v9 = (Player *)&v1[6972 * *(int *)uClass]; | 3751 v9 = &pPlayer[uNum]; |
3751 v46 = v9->GetSexByVoice(); | 3752 v46 = v9->GetSexByVoice(); |
3752 do | 3753 do |
3753 { | 3754 { |
3754 v12 = ((v9->uVoiceID-- - 1) & 0x80000000u) != 0; | 3755 v12 = ((v9->uVoiceID-- - 1) & 0x80000000u) != 0; |
3755 if ( v12 ) | 3756 if ( v12 ) |
3756 v9->uVoiceID = 19; | 3757 v9->uVoiceID = 19; |
3757 v13 = v9->GetSexByVoice(); | 3758 v13 = v9->GetSexByVoice(); |
3758 } | 3759 } |
3759 while ( v13 != v46 ); | 3760 while ( v13 != v46 ); |
3760 v11 = pCreationUI_BtnPressLeft2[*(int *)uClass]; | 3761 v11 = pCreationUI_BtnPressLeft2[uNum]; |
3761 goto LABEL_60; | 3762 goto LABEL_60; |
3762 } | 3763 } |
3763 if ( v45 == 145 ) | 3764 if ( v45 == 145 ) |
3764 { | 3765 { |
3765 v9 = (Player *)&v1[6972 * *(int *)uClass]; | 3766 v9 = &pPlayer[uNum]; |
3766 v46 = v9->GetSexByVoice(); | 3767 v46 = v9->GetSexByVoice(); |
3767 do | 3768 do |
3768 { | 3769 { |
3769 v9->uVoiceID = (signed int)(v9->uVoiceID + 1) % 20; | 3770 v9->uVoiceID = (signed int)(v9->uVoiceID + 1) % 20; |
3770 v10 = v9->GetSexByVoice(); | 3771 v10 = v9->GetSexByVoice(); |
3771 } | 3772 } |
3772 while ( v10 != v46 ); | 3773 while ( v10 != v46 ); |
3773 v11 = pCreationUI_BtnPressRight2[*(int *)uClass]; | 3774 v11 = pCreationUI_BtnPressRight2[uNum]; |
3774 LABEL_60: | 3775 LABEL_60: |
3775 GUIWindow::Create(v11->uX, v11->uY, 0, 0, (enum WindowType)92, (int)v11, 1); | 3776 GUIWindow::Create(v11->uX, v11->uY, 0, 0, (enum WindowType)92, (int)v11, 1); |
3776 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0, 0); | 3777 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0, 0); |
3777 v9->PlaySound(102, 0); | 3778 v9->PlaySound(102, 0); |
3778 continue; | 3779 continue; |
3798 } | 3799 } |
3799 else | 3800 else |
3800 { | 3801 { |
3801 if ( v45 == 75 ) | 3802 if ( v45 == 75 ) |
3802 { | 3803 { |
3803 uPlayerCreationUI_SelectedCharacter = *(int *)uClass; | 3804 uPlayerCreationUI_SelectedCharacter = uNum; |
3804 v41 = 3; | 3805 v41 = 3; |
3805 v1 = (char *)pParty->pPlayers; | 3806 v1 = (char *)pParty->pPlayers; |
3806 v5 = (pGUIWindow_CurrentMenu->field_2C_focus_id - pGUIWindow_CurrentMenu->field_38) % 7 | 3807 v5 = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7 |
3807 + pGUIWindow_CurrentMenu->field_38 | 3808 + pGUIWindow_CurrentMenu->pStartingPosActiveItem |
3808 + 7 * *(int *)uClass; | 3809 + 7 * uNum; |
3809 goto LABEL_44; | 3810 goto LABEL_44; |
3810 } | 3811 } |
3811 if ( (signed int)v45 > 60 ) | 3812 if ( (signed int)v45 > 60 ) |
3812 { | 3813 { |
3813 if ( v45 == 62 ) | 3814 if ( v45 == 62 ) //click + |
3814 { | 3815 { |
3815 GUIWindow::Create(0x265u, 0x189u, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnPlus, 1); | 3816 GUIWindow::Create(613, 393, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnPlus, 1); |
3816 ((Player *)&v1[6972 * uPlayerCreationUI_SelectedCharacter])->IncreaseAttribute( | 3817 (&pPlayer[uPlayerCreationUI_SelectedCharacter])->IncreaseAttribute( |
3817 (pGUIWindow_CurrentMenu->field_2C_focus_id - pGUIWindow_CurrentMenu->field_38) % 7); | 3818 (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7); |
3818 v42 = 0; | 3819 v42 = 0; |
3819 v38 = 0; | 3820 v38 = 0; |
3820 v36 = 0; | 3821 v36 = 0; |
3821 v34 = 0; | 3822 v34 = 0; |
3822 v32 = -1; | 3823 v32 = -1; |
3823 v31 = 0; | 3824 v31 = 0; |
3824 v30 = 0; | 3825 v30 = 0; |
3825 v29 = (SoundID)20; | 3826 pSoundID = (SoundID)20; |
3826 goto LABEL_40; | 3827 goto LABEL_40; |
3827 } | 3828 } |
3828 if ( v45 == 63 ) | 3829 if ( v45 == 63 ) // click - |
3829 { | 3830 { |
3830 GUIWindow::Create(0x20Bu, 0x189u, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnMinus, 1); | 3831 GUIWindow::Create(523, 393, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnMinus, 1); |
3831 ((Player *)&v1[6972 * uPlayerCreationUI_SelectedCharacter])->DecreaseAttribute( | 3832 (&pPlayer[uPlayerCreationUI_SelectedCharacter])->DecreaseAttribute( |
3832 (pGUIWindow_CurrentMenu->field_2C_focus_id - pGUIWindow_CurrentMenu->field_38) % 7); | 3833 (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7); |
3833 v42 = 0; | 3834 v42 = 0; |
3834 v38 = 0; | 3835 v38 = 0; |
3835 v36 = 0; | 3836 v36 = 0; |
3836 v34 = 0; | 3837 v34 = 0; |
3837 v32 = -1; | 3838 v32 = -1; |
3838 v31 = 0; | 3839 v31 = 0; |
3839 v30 = 0; | 3840 v30 = 0; |
3840 v29 = (SoundID)23; | 3841 pSoundID = (SoundID)23; |
3841 goto LABEL_40; | 3842 goto LABEL_40; |
3842 } | 3843 } |
3843 if ( v45 == 64 ) | 3844 if ( v45 == 64 ) // sellect active skill |
3844 { | 3845 { |
3845 auto _t = (Player *)&v1[6972 * uPlayerCreationUI_SelectedCharacter]; | 3846 auto _t = &pPlayer[uPlayerCreationUI_SelectedCharacter]; |
3846 v6 = _t->GetSkillIdxByOrder( | 3847 v6 = _t->GetSkillIdxByOrder(uNum + 4); |
3847 *(int *)uClass + 4); | |
3848 if ( _t->GetSkillIdxByOrder(3) == 37 ) | 3848 if ( _t->GetSkillIdxByOrder(3) == 37 ) |
3849 pParty->pPlayers[0].pActiveSkills[v6 + 3486 * uPlayerCreationUI_SelectedCharacter] = 1; | 3849 pParty->pPlayers[0].pActiveSkills[v6 + 3486 * uPlayerCreationUI_SelectedCharacter] = 1; |
3850 v42 = 0; | 3850 v42 = 0; |
3851 v38 = 0; | 3851 v38 = 0; |
3852 v36 = 0; | 3852 v36 = 0; |
3853 v34 = 0; | 3853 v34 = 0; |
3854 v32 = -1; | 3854 v32 = -1; |
3855 v31 = 0; | 3855 v31 = 0; |
3856 v30 = 0; | 3856 v30 = 0; |
3857 v29 = (SoundID)24; | 3857 pSoundID = (SoundID)24; |
3858 goto LABEL_40; | 3858 goto LABEL_40; |
3859 } | 3859 } |
3860 if ( v45 == 65 ) | 3860 if ( v45 == 65 ) |
3861 { | 3861 { |
3862 ((Player *)&v1[6972 * uPlayerCreationUI_SelectedCharacter])->Reset(uClass[0]); | 3862 (&pPlayer[uPlayerCreationUI_SelectedCharacter])->Reset(0); |
3863 goto LABEL_36; | 3863 goto LABEL_36; |
3864 } | 3864 } |
3865 if ( v45 == 66 ) | 3865 if ( v45 == 66 ) // click ok |
3866 { | 3866 { |
3867 GUIWindow::Create(0x244u, 0x1AFu, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnOK, 0); | 3867 GUIWindow::Create(0x244u, 0x1AFu, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnOK, 0); |
3868 if ( PlayerCreation_ComputeAttributeBonus() || !sub_4908DE() ) | 3868 if ( PlayerCreation_ComputeAttributeBonus() || !sub_4908DE() ) |
3869 GameUI_StatusBar_TimedStringTimeLeft = GetTickCount() + 4000; | 3869 GameUI_StatusBar_TimedStringTimeLeft = GetTickCount() + 4000; |
3870 else | 3870 else |
3871 uGameState = 6; | 3871 uGameState = 6; |
3872 continue; | 3872 continue; |
3873 } | 3873 } |
3874 if ( v45 == 67 ) | 3874 if ( v45 == 67 ) // click reset |
3875 { | 3875 { |
3876 GUIWindow::Create(0x20Fu, 0x1AFu, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnReset, 0); | 3876 GUIWindow::Create(0x20Fu, 0x1AFu, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnReset, 0); |
3877 pParty->Reset(); | 3877 pParty->Reset(); |
3878 } | 3878 } |
3879 else | 3879 else |
3880 { | 3880 { |
3881 if ( v45 == 74 ) | 3881 if ( v45 == 74 ) |
3882 { | 3882 { |
3883 uPlayerCreationUI_SelectedCharacter = *(int *)uClass; | 3883 uPlayerCreationUI_SelectedCharacter = uNum; |
3884 v4 = pGUIWindow_CurrentMenu->field_2C_focus_id - pGUIWindow_CurrentMenu->field_38; | 3884 v4 = pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem; |
3885 v46 = pGUIWindow_CurrentMenu->field_38; | 3885 v46 = pGUIWindow_CurrentMenu->pStartingPosActiveItem; |
3886 v41 = 2; | 3886 v41 = 2; |
3887 v5 = v4 % 7 + v46 + 7 * *(int *)uClass; | 3887 v5 = (v4 % 7) + v46 + 7 * uNum; |
3888 LABEL_44: | 3888 LABEL_44: |
3889 pGUIWindow_CurrentMenu->field_2C_focus_id = v5; | 3889 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = v5; |
3890 pParty->pPlayers[0].pActiveSkills[((Player *)&v1[6972 * uPlayerCreationUI_SelectedCharacter])->GetSkillIdxByOrder(v41) | 3890 pParty->pPlayers[0].pActiveSkills[(&pPlayer[uPlayerCreationUI_SelectedCharacter])->GetSkillIdxByOrder(v41) |
3891 + 3486 * uPlayerCreationUI_SelectedCharacter] = 0; | 3891 + 3486 * uPlayerCreationUI_SelectedCharacter] = 0; |
3892 continue; | 3892 continue; |
3893 } | 3893 } |
3894 } | 3894 } |
3895 } | 3895 } |
3897 { | 3897 { |
3898 switch ( v45 ) | 3898 switch ( v45 ) |
3899 { | 3899 { |
3900 case 60: | 3900 case 60: |
3901 pAudioPlayer->PlaySound((SoundID)24, 0, 0, -1, 0, 0, 0, 0); | 3901 pAudioPlayer->PlaySound((SoundID)24, 0, 0, -1, 0, 0, 0, 0); |
3902 v3 = *(void **)uClass; | 3902 v3 = (void *)uNum; |
3903 uPlayerCreationUI_SelectedCharacter = *(int *)uClass; | 3903 uPlayerCreationUI_SelectedCharacter = uNum; |
3904 pKeyActionMap->_459E5A(0, 15, pGUIWindow_CurrentMenu); | 3904 pKeyActionMap->_459E5A(0, 15, pGUIWindow_CurrentMenu); |
3905 pGUIWindow_CurrentMenu->ptr_1C = v3; | 3905 pGUIWindow_CurrentMenu->ptr_1C = v3; |
3906 break; | 3906 break; |
3907 case 5: | 3907 case 5: |
3908 uGameState = 1; | 3908 uGameState = 1; |