Mercurial > mm7
comparison mm7_5.cpp @ 969:4d1259ef6ab2
Слияние
author | Ritor1 |
---|---|
date | Wed, 08 May 2013 09:45:57 +0600 |
parents | 96f7beed452f e655624e4b7c |
children | e3123a1dea82 |
comparison
equal
deleted
inserted
replaced
968:96f7beed452f | 969:4d1259ef6ab2 |
---|---|
3296 } | 3296 } |
3297 | 3297 |
3298 //----- (00435748) -------------------------------------------------------- | 3298 //----- (00435748) -------------------------------------------------------- |
3299 void __cdecl GUI_MainMenuMessageProc() | 3299 void __cdecl GUI_MainMenuMessageProc() |
3300 { | 3300 { |
3301 //AudioPlayer *v0; // ebp@2 | 3301 Player *pPlayer; // ebx@2 |
3302 //Player *pPlayer1; // ebx@2 | |
3303 unsigned int v2; // ecx@18 | |
3304 void *v3; // edi@21 | 3302 void *v3; // edi@21 |
3305 signed int v4; // eax@29 | 3303 signed int v4; // eax@29 |
3306 int v5; // ecx@29 | 3304 int v5; // ecx@29 |
3307 PLAYER_SKILL_TYPE v6; // edi@37 | 3305 PLAYER_SKILL_TYPE v6; // edi@37 |
3308 GUIWindow *pWindow; // eax@56 | 3306 GUIWindow *pWindow; // eax@56 |
3309 unsigned int v8; // edx@56 | |
3310 //Player *pCurrentPlayer; // edi@57 | |
3311 signed int v10; // eax@58 | |
3312 GUIButton *pButton; // eax@59 | 3307 GUIButton *pButton; // eax@59 |
3313 //unsigned __int8 v12; // sf@62 | |
3314 //signed int v13; // eax@64 | |
3315 unsigned int v14; // eax@66 | |
3316 int v15; // edi@70 | 3308 int v15; // edi@70 |
3317 char v16; // zf@73 | 3309 char v16; // zf@73 |
3318 int v17; // eax@73 | |
3319 int v19; // edi@116 | |
3320 char v20; // dl@116 | 3310 char v20; // dl@116 |
3321 unsigned int v21; // eax@116 | 3311 unsigned int v21; // eax@116 |
3322 Player *v22; // ecx@116 | |
3323 char *v23; // ebx@118 | |
3324 int v24; // eax@118 | |
3325 unsigned int v25; // eax@120 | 3312 unsigned int v25; // eax@120 |
3326 unsigned int v26; // ecx@127 | 3313 unsigned int v26; // ecx@127 |
3327 unsigned int v27; // eax@129 | |
3328 unsigned __int8 v28; // of@129 | |
3329 SoundID pSoundID; // [sp-2Ch] [bp-3Ch]@36 | 3314 SoundID pSoundID; // [sp-2Ch] [bp-3Ch]@36 |
3330 signed int v30; // [sp-28h] [bp-38h]@36 | |
3331 unsigned int v31; // [sp-24h] [bp-34h]@36 | |
3332 signed int v32; // [sp-20h] [bp-30h]@36 | |
3333 signed int v34; // [sp-1Ch] [bp-2Ch]@36 | |
3334 int v36; // [sp-18h] [bp-28h]@36 | |
3335 unsigned int v38; // [sp-14h] [bp-24h]@36 | |
3336 int v39; // [sp-14h] [bp-24h]@56 | |
3337 signed int v40; // [sp-10h] [bp-20h]@15 | |
3338 signed int v41; // [sp-10h] [bp-20h]@29 | 3315 signed int v41; // [sp-10h] [bp-20h]@29 |
3339 int v42; // [sp-10h] [bp-20h]@36 | |
3340 int v43; // [sp-10h] [bp-20h]@56 | |
3341 int uNum; // [sp+4h] [bp-Ch]@3 | 3316 int uNum; // [sp+4h] [bp-Ch]@3 |
3342 UIMessageType pUIMessageType; // [sp+8h] [bp-8h]@3 | 3317 UIMessageType pUIMessageType; // [sp+8h] [bp-8h]@3 |
3343 //int pSex; // [sp+Ch] [bp-4h]@3 | 3318 int pSex; // [sp+Ch] [bp-4h]@3 |
3344 Player *pPlayer; | |
3345 | 3319 |
3346 if ( pMessageQueue_50CBD0->uNumMessages ) | 3320 if ( pMessageQueue_50CBD0->uNumMessages ) |
3347 { | 3321 { |
3348 pPlayer = pParty->pPlayers; | 3322 pPlayer = pParty->pPlayers; |
3349 do | 3323 do |
3350 { | 3324 { |
3351 int param2; | 3325 int param2; |
3352 pMessageQueue_50CBD0->PopMessage(&pUIMessageType, &uNum, ¶m2); | 3326 pMessageQueue_50CBD0->PopMessage(&pUIMessageType, &uNum, ¶m2); |
3353 auto player = &pParty->pPlayers[uNum]; | 3327 auto player = &pParty->pPlayers[uNum]; |
3354 auto sex = player->GetSexByVoice(); | |
3355 | 3328 |
3356 switch (pUIMessageType) // For buttons of window MainMenu | 3329 switch (pUIMessageType) // For buttons of window MainMenu |
3357 { | 3330 { |
3358 case UIMSG_MainMenu_ShowPartyCreationWnd: | 3331 case UIMSG_MainMenu_ShowPartyCreationWnd: |
3359 GUIWindow::Create(495, 172, 0, 0, WINDOW_PressedButton2, (int)pMainMenu_BtnNew, 0); | 3332 GUIWindow::Create(495, 172, 0, 0, WINDOW_PressedButton2, (int)pMainMenu_BtnNew, 0); |
3376 % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum; | 3349 % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum; |
3377 uPlayerCreationUI_SelectedCharacter = uNum; | 3350 uPlayerCreationUI_SelectedCharacter = uNum; |
3378 pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0); | 3351 pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0); |
3379 break; | 3352 break; |
3380 case UIMSG_PlayerCreation_VoicePrev: | 3353 case UIMSG_PlayerCreation_VoicePrev: |
3354 pSex = player->GetSexByVoice(); | |
3381 do | 3355 do |
3382 { | 3356 { |
3383 if (player->uVoiceID == 0) | 3357 if (player->uVoiceID == 0) |
3384 player->uVoiceID = 19; | 3358 player->uVoiceID = 19; |
3385 else --player->uVoiceID; | 3359 else --player->uVoiceID; |
3386 } | 3360 } |
3387 while (player->GetSexByVoice() != sex); | 3361 while (player->GetSexByVoice() != pSex); |
3388 pButton = pCreationUI_BtnPressLeft2[uNum]; | 3362 pButton = pCreationUI_BtnPressLeft2[uNum]; |
3389 GUIWindow::Create(pButton->uX, pButton->uY, 0, 0, WINDOW_PressedButton, (int)pButton, 1); | 3363 GUIWindow::Create(pButton->uX, pButton->uY, 0, 0, WINDOW_PressedButton, (int)pButton, 1); |
3390 pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0); | 3364 pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0); |
3391 player->PlaySound(SPEECH_PickMe, 0); | 3365 player->PlaySound(SPEECH_PickMe, 0); |
3392 break; | 3366 break; |
3393 case UIMSG_PlayerCreation_VoiceNext: | 3367 case UIMSG_PlayerCreation_VoiceNext: |
3394 { | 3368 pSex = player->GetSexByVoice(); |
3395 //auto player = &pParty->pPlayers[uNum]; | 3369 do |
3396 //auto sex = player->GetSexByVoice(); | 3370 { |
3397 do | 3371 player->uVoiceID = (player->uVoiceID + 1) % 20; |
3398 { | 3372 } |
3399 player->uVoiceID = (player->uVoiceID + 1) % 20; | 3373 while (player->GetSexByVoice() != pSex); |
3400 } | 3374 pButton = pCreationUI_BtnPressRight2[uNum]; |
3401 while (player->GetSexByVoice() != sex); | 3375 GUIWindow::Create(pButton->uX, pButton->uY, 0, 0, WINDOW_PressedButton, (int)pButton, 1); |
3402 pButton = pCreationUI_BtnPressRight2[uNum]; | 3376 pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0); |
3403 GUIWindow::Create(pButton->uX, pButton->uY, 0, 0, WINDOW_PressedButton, (int)pButton, 1); | 3377 player->PlaySound(SPEECH_PickMe, 0); |
3404 pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0); | 3378 break; |
3405 player->PlaySound(SPEECH_PickMe, 0); | |
3406 break; | |
3407 } | |
3408 case UIMSG_PlayerCreation_FacePrev: | 3379 case UIMSG_PlayerCreation_FacePrev: |
3409 pPlayer = &pParty->pPlayers[uNum]; | 3380 pPlayer = &pParty->pPlayers[uNum]; |
3410 if (!pPlayer->uFace) | 3381 if (!pPlayer->uFace) |
3411 pPlayer->uFace = 19; | 3382 pPlayer->uFace = 19; |
3412 else | 3383 else |
3418 v25 = uNum; | 3389 v25 = uNum; |
3419 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) | 3390 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) |
3420 % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum; | 3391 % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum; |
3421 uPlayerCreationUI_SelectedCharacter = v25; | 3392 uPlayerCreationUI_SelectedCharacter = v25; |
3422 GUIWindow::Create(pCreationUI_BtnPressLeft[v25]->uX, pCreationUI_BtnPressLeft[v25]->uY, 0, 0, WINDOW_PressedButton, (int)pCreationUI_BtnPressLeft[v25], 1); | 3393 GUIWindow::Create(pCreationUI_BtnPressLeft[v25]->uX, pCreationUI_BtnPressLeft[v25]->uY, 0, 0, WINDOW_PressedButton, (int)pCreationUI_BtnPressLeft[v25], 1); |
3423 //v0 = pAudioPlayer; | |
3424 pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0.0, 0); | 3394 pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0.0, 0); |
3425 pPlayer->PlaySound(SPEECH_PickMe, 0); | 3395 pPlayer->PlaySound(SPEECH_PickMe, 0); |
3426 //v1 = (char *)pParty->pPlayers; | |
3427 break; | 3396 break; |
3428 case UIMSG_PlayerCreation_FaceNext: | 3397 case UIMSG_PlayerCreation_FaceNext: |
3429 pPlayer = &pParty->pPlayers[uNum]; | 3398 pPlayer = &pParty->pPlayers[uNum]; |
3430 v20 = (char)((int)pPlayer->uFace + 1) % 20; | 3399 v20 = (char)((int)pPlayer->uFace + 1) % 20; |
3431 pPlayer->uFace = v20; | 3400 pPlayer->uFace = v20; |
3436 v21 = uNum; | 3405 v21 = uNum; |
3437 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) | 3406 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) |
3438 % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum; | 3407 % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum; |
3439 uPlayerCreationUI_SelectedCharacter = v21; | 3408 uPlayerCreationUI_SelectedCharacter = v21; |
3440 GUIWindow::Create(pCreationUI_BtnPressRight[v21]->uX, pCreationUI_BtnPressRight[v21]->uY, 0, 0, WINDOW_PressedButton, (int)pCreationUI_BtnPressRight[v21], 1); | 3409 GUIWindow::Create(pCreationUI_BtnPressRight[v21]->uX, pCreationUI_BtnPressRight[v21]->uY, 0, 0, WINDOW_PressedButton, (int)pCreationUI_BtnPressRight[v21], 1); |
3441 //v0 = pAudioPlayer; | |
3442 pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0); | 3410 pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0); |
3443 pPlayer->PlaySound(SPEECH_PickMe, 0); | 3411 pPlayer->PlaySound(SPEECH_PickMe, 0); |
3444 //v1 = (char *)pParty->pPlayers; | |
3445 break; | 3412 break; |
3446 case UIMSG_PlayerCreationClickPlus: | 3413 case UIMSG_PlayerCreationClickPlus: |
3447 GUIWindow::Create(613, 393, 0, 0, WINDOW_PressedButton2, (int)pPlayerCreationUI_BtnPlus, 1); | 3414 GUIWindow::Create(613, 393, 0, 0, WINDOW_PressedButton2, (int)pPlayerCreationUI_BtnPlus, 1); |
3448 pPlayer[uPlayerCreationUI_SelectedCharacter].IncreaseAttribute((pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7); | 3415 pPlayer[uPlayerCreationUI_SelectedCharacter].IncreaseAttribute((pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7); |
3449 pAudioPlayer->PlaySound((SoundID)20, 0, 0, -1, 0, 0, 0, 0); | 3416 pAudioPlayer->PlaySound((SoundID)20, 0, 0, -1, 0, 0, 0, 0); |
3452 GUIWindow::Create(523, 393, 0, 0, WINDOW_PressedButton2, (int)pPlayerCreationUI_BtnMinus, 1); | 3419 GUIWindow::Create(523, 393, 0, 0, WINDOW_PressedButton2, (int)pPlayerCreationUI_BtnMinus, 1); |
3453 pPlayer[uPlayerCreationUI_SelectedCharacter].DecreaseAttribute((pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7); | 3420 pPlayer[uPlayerCreationUI_SelectedCharacter].DecreaseAttribute((pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7); |
3454 pAudioPlayer->PlaySound((SoundID)23, 0, 0, -1, 0, 0, 0, 0); | 3421 pAudioPlayer->PlaySound((SoundID)23, 0, 0, -1, 0, 0, 0, 0); |
3455 break; | 3422 break; |
3456 case UIMSG_PlayerCreationSelectActiveSkill: | 3423 case UIMSG_PlayerCreationSelectActiveSkill: |
3457 { | 3424 pPlayer = &pPlayer[uPlayerCreationUI_SelectedCharacter]; |
3458 auto _t = &pPlayer[uPlayerCreationUI_SelectedCharacter]; | 3425 v6 = pPlayer->GetSkillIdxByOrder(uNum + 4); |
3459 v6 = _t->GetSkillIdxByOrder(uNum + 4); | 3426 if ( pPlayer->GetSkillIdxByOrder(3) == 37 ) |
3460 if ( _t->GetSkillIdxByOrder(3) == 37 ) | 3427 pParty->pPlayers[0].pActiveSkills[v6 + 3486 * uPlayerCreationUI_SelectedCharacter] = 1; |
3461 pParty->pPlayers[0].pActiveSkills[v6 + 3486 * uPlayerCreationUI_SelectedCharacter] = 1; | 3428 pAudioPlayer->PlaySound((SoundID)24, 0, 0, -1, 0, 0, 0, 0); |
3462 pAudioPlayer->PlaySound((SoundID)24, 0, 0, -1, 0, 0, 0, 0); | 3429 break; |
3463 break; | |
3464 } | |
3465 case UIMSG_PlayerCreationSelectClass: | 3430 case UIMSG_PlayerCreationSelectClass: |
3466 pPlayer[uPlayerCreationUI_SelectedCharacter].Reset((PLAYER_CLASS_TYPE)uNum); | 3431 pPlayer[uPlayerCreationUI_SelectedCharacter].Reset((PLAYER_CLASS_TYPE)uNum); |
3467 pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0); | 3432 pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0); |
3468 break; | 3433 break; |
3469 case UIMSG_PlayerCreationClickOK: | 3434 case UIMSG_PlayerCreationClickOK: |
3610 //crt_deconstruct_ptr_6A0118(); | 3575 //crt_deconstruct_ptr_6A0118(); |
3611 pTexture_PCX.Release(); | 3576 pTexture_PCX.Release(); |
3612 pTexture_PCX.Load("title.pcx", 0); | 3577 pTexture_PCX.Load("title.pcx", 0); |
3613 SetCurrentMenuID(MENU_MAIN); | 3578 SetCurrentMenuID(MENU_MAIN); |
3614 v15 = 1; | 3579 v15 = 1; |
3615 //LABEL_81: | |
3616 pGUIWindow_CurrentMenu->Release(); | 3580 pGUIWindow_CurrentMenu->Release(); |
3617 pGUIWindow2->Release(); | 3581 pGUIWindow2->Release(); |
3618 pGUIWindow2 = 0; | 3582 pGUIWindow2 = 0; |
3619 pEventTimer->Resume(); | 3583 pEventTimer->Resume(); |
3620 pCurrentScreen = SCREEN_GAME; | 3584 pCurrentScreen = SCREEN_GAME; |
3626 pVideoPlayer->Unload(); | 3590 pVideoPlayer->Unload(); |
3627 } | 3591 } |
3628 else | 3592 else |
3629 { | 3593 { |
3630 if ( pCurrentScreen != SCREEN_1B ) | 3594 if ( pCurrentScreen != SCREEN_1B ) |
3631 //goto LABEL_81; | |
3632 { | 3595 { |
3633 pGUIWindow_CurrentMenu->Release(); | 3596 pGUIWindow_CurrentMenu->Release(); |
3634 pGUIWindow2->Release(); | 3597 pGUIWindow2->Release(); |
3635 pGUIWindow2 = 0; | 3598 pGUIWindow2 = 0; |
3636 pEventTimer->Resume(); | 3599 pEventTimer->Resume(); |
3641 //VideoPlayer::dtor(); | 3604 //VideoPlayer::dtor(); |
3642 } | 3605 } |
3643 break; | 3606 break; |
3644 case UIMSG_PlayerCreationRemoveDownSkill: | 3607 case UIMSG_PlayerCreationRemoveDownSkill: |
3645 uPlayerCreationUI_SelectedCharacter = uNum; | 3608 uPlayerCreationUI_SelectedCharacter = uNum; |
3646 //v41 = 3; | |
3647 //v1 = (char *)pParty->pPlayers; | |
3648 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7 | 3609 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7 |
3649 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum; | 3610 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum; |
3650 pParty->pPlayers[0].pActiveSkills[(&pPlayer[uPlayerCreationUI_SelectedCharacter])->GetSkillIdxByOrder(3) | 3611 pParty->pPlayers[0].pActiveSkills[(&pPlayer[uPlayerCreationUI_SelectedCharacter])->GetSkillIdxByOrder(3) |
3651 + 3486 * uPlayerCreationUI_SelectedCharacter] = 0; | 3612 + 3486 * uPlayerCreationUI_SelectedCharacter] = 0; |
3652 break; | 3613 break; |