Mercurial > mm7
diff mm7_5.cpp @ 971:35f2e900618e
m
author | Ritor1 |
---|---|
date | Wed, 08 May 2013 17:02:37 +0600 |
parents | e3123a1dea82 |
children | c8a0f6d89c70 e875f5ab0cfb |
line wrap: on
line diff
--- a/mm7_5.cpp Wed May 08 16:30:37 2013 +0600 +++ b/mm7_5.cpp Wed May 08 17:02:37 2013 +0600 @@ -3306,14 +3306,13 @@ GUIWindow *pWindow; // eax@56 GUIButton *pButton; // eax@59 int v15; // edi@70 - char v16; // zf@73 char v20; // dl@116 unsigned int v21; // eax@116 unsigned int v25; // eax@120 unsigned int v26; // ecx@127 SoundID pSoundID; // [sp-2Ch] [bp-3Ch]@36 signed int v41; // [sp-10h] [bp-20h]@29 - int uNum; // [sp+4h] [bp-Ch]@3 + int pParam; // [sp+4h] [bp-Ch]@3 UIMessageType pUIMessageType; // [sp+8h] [bp-8h]@3 int pSex; // [sp+Ch] [bp-4h]@3 @@ -3323,8 +3322,8 @@ do { int param2; - pMessageQueue_50CBD0->PopMessage(&pUIMessageType, &uNum, ¶m2); - auto player = &pParty->pPlayers[uNum]; + pMessageQueue_50CBD0->PopMessage(&pUIMessageType, &pParam, ¶m2); + auto player = &pParty->pPlayers[pParam]; switch (pUIMessageType) // For buttons of window MainMenu { @@ -3346,8 +3345,8 @@ break; case UIMSG_PlayerCreation_SelectAttribute: pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) - % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum; - uPlayerCreationUI_SelectedCharacter = uNum; + % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * pParam; + uPlayerCreationUI_SelectedCharacter = pParam; pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0); break; case UIMSG_PlayerCreation_VoicePrev: @@ -3359,7 +3358,7 @@ else --player->uVoiceID; } while (player->GetSexByVoice() != pSex); - pButton = pCreationUI_BtnPressLeft2[uNum]; + pButton = pCreationUI_BtnPressLeft2[pParam]; GUIWindow::Create(pButton->uX, pButton->uY, 0, 0, WINDOW_PressedButton, (int)pButton, 1); pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0); player->PlaySound(SPEECH_PickMe, 0); @@ -3371,13 +3370,13 @@ player->uVoiceID = (player->uVoiceID + 1) % 20; } while (player->GetSexByVoice() != pSex); - pButton = pCreationUI_BtnPressRight2[uNum]; + pButton = pCreationUI_BtnPressRight2[pParam]; GUIWindow::Create(pButton->uX, pButton->uY, 0, 0, WINDOW_PressedButton, (int)pButton, 1); pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0); player->PlaySound(SPEECH_PickMe, 0); break; case UIMSG_PlayerCreation_FacePrev: - pPlayer = &pParty->pPlayers[uNum]; + pPlayer = &pParty->pPlayers[pParam]; if (!pPlayer->uFace) pPlayer->uFace = 19; else @@ -3386,25 +3385,25 @@ pPlayer->SetInitialStats(); pPlayer->SetSexByVoice(); pPlayer->RandomizeName(); - v25 = uNum; + v25 = pParam; pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) - % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum; + % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * pParam; uPlayerCreationUI_SelectedCharacter = v25; GUIWindow::Create(pCreationUI_BtnPressLeft[v25]->uX, pCreationUI_BtnPressLeft[v25]->uY, 0, 0, WINDOW_PressedButton, (int)pCreationUI_BtnPressLeft[v25], 1); pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0.0, 0); pPlayer->PlaySound(SPEECH_PickMe, 0); break; case UIMSG_PlayerCreation_FaceNext: - pPlayer = &pParty->pPlayers[uNum]; + pPlayer = &pParty->pPlayers[pParam]; v20 = (char)((int)pPlayer->uFace + 1) % 20; pPlayer->uFace = v20; pPlayer->uVoiceID = v20; pPlayer->SetInitialStats(); pPlayer->SetSexByVoice(); pPlayer->RandomizeName(); - v21 = uNum; + v21 = pParam; pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) - % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum; + % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * pParam; uPlayerCreationUI_SelectedCharacter = v21; GUIWindow::Create(pCreationUI_BtnPressRight[v21]->uX, pCreationUI_BtnPressRight[v21]->uY, 0, 0, WINDOW_PressedButton, (int)pCreationUI_BtnPressRight[v21], 1); pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0); @@ -3422,13 +3421,13 @@ break; case UIMSG_PlayerCreationSelectActiveSkill: pPlayer = &pPlayer[uPlayerCreationUI_SelectedCharacter]; - v6 = pPlayer->GetSkillIdxByOrder(uNum + 4); + v6 = pPlayer->GetSkillIdxByOrder(pParam + 4); if ( pPlayer->GetSkillIdxByOrder(3) == 37 ) pParty->pPlayers[0].pActiveSkills[v6 + 3486 * uPlayerCreationUI_SelectedCharacter] = 1; pAudioPlayer->PlaySound((SoundID)24, 0, 0, -1, 0, 0, 0, 0); break; case UIMSG_PlayerCreationSelectClass: - pPlayer[uPlayerCreationUI_SelectedCharacter].Reset((PLAYER_CLASS_TYPE)uNum); + pPlayer[uPlayerCreationUI_SelectedCharacter].Reset((PLAYER_CLASS_TYPE)pParam); pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0); break; case UIMSG_PlayerCreationClickOK: @@ -3443,19 +3442,19 @@ pParty->Reset(); break; case UIMSG_PlayerCreationRemoveUpSkill: - uPlayerCreationUI_SelectedCharacter = uNum; + uPlayerCreationUI_SelectedCharacter = pParam; v4 = pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem; //int pSex = pGUIWindow_CurrentMenu->pStartingPosActiveItem; v41 = 2; - v5 = v4 % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum; + v5 = v4 % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * pParam; pGUIWindow_CurrentMenu->pCurrentPosActiveItem = v5; pParty->pPlayers[0].pActiveSkills[(&pPlayer[uPlayerCreationUI_SelectedCharacter])->GetSkillIdxByOrder(v41) + 3486 * uPlayerCreationUI_SelectedCharacter] = 0; break; case UIMSG_PlayerCreationChangeName: pAudioPlayer->PlaySound((SoundID)24, 0, 0, -1, 0, 0, 0, 0); - v3 = (void *)uNum; - uPlayerCreationUI_SelectedCharacter = uNum; + v3 = (void *)pParam; + uPlayerCreationUI_SelectedCharacter = pParam; pKeyActionMap->EnterText(0, 15, pGUIWindow_CurrentMenu); pGUIWindow_CurrentMenu->ptr_1C = v3; break; @@ -3477,11 +3476,11 @@ //main menu save/load wnd clicking on savegame lines if (pGUIWindow_CurrentMenu->field_40 == 1) pKeyActionMap->_459ED1(0); - if ( pCurrentScreen != SCREEN_SAVEGAME || uLoadGameUI_SelectedSlot != uNum + pSaveListPosition ) + if ( pCurrentScreen != SCREEN_SAVEGAME || uLoadGameUI_SelectedSlot != pParam + pSaveListPosition ) { //load clicked line - v26 = uNum + pSaveListPosition; - if ( dword_6BE138 == uNum + pSaveListPosition ) + v26 = pParam + pSaveListPosition; + if ( dword_6BE138 == pParam + pSaveListPosition ) { pMessageQueue_50CBD0->AddMessage(UIMSG_SaveLoadBtn, 0, 0); pMessageQueue_50CBD0->AddMessage(UIMSG_LoadGame, 0, 0); @@ -3502,8 +3501,8 @@ break; case UIMSG_DownArrow: ++pSaveListPosition; - if ( pSaveListPosition >= uNum ) - pSaveListPosition = uNum - 1; + if ( pSaveListPosition >= pParam ) + pSaveListPosition = pParam - 1; if ( pSaveListPosition < 1 ) pSaveListPosition = 0; pWindow = pGUIWindow_CurrentMenu; @@ -3541,7 +3540,6 @@ viewparams->field_48 = 1; if ( !GetCurrentMenuID() || GetCurrentMenuID() == MENU_CREATEPARTY || GetCurrentMenuID() == MENU_NAMEPANELESC ) { -LABEL_83: if ( pCurrentScreen == SCREEN_VIDEO ) pVideoPlayer->FastForwardToFrame(pVideoPlayer->pResetflag); if (GetCurrentMenuID() == MENU_NAMEPANELESC) @@ -3554,21 +3552,26 @@ SetCurrentMenuID(MENU_CREDITSCLOSE); break; } - /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) - { - pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)5; -//LABEL_93: - pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; - *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; - ++pMessageQueue_50CBD0->uNumMessages; - continue; - }*/ pMessageQueue_50CBD0->AddMessage(UIMSG_ChangeGameState, 0, 0); break; } - v16 = GetCurrentMenuID() == 8; - if ( v16 && !pCurrentScreen ) - goto LABEL_83; + if ( GetCurrentMenuID() == MENU_CREDITSPROC && !pCurrentScreen ) + { + if ( pCurrentScreen == SCREEN_VIDEO ) + pVideoPlayer->FastForwardToFrame(pVideoPlayer->pResetflag); + if (GetCurrentMenuID() == MENU_NAMEPANELESC) + { + SetCurrentMenuID(MENU_CREATEPARTY); + break; + } + if (GetCurrentMenuID() == MENU_CREDITSPROC) + { + SetCurrentMenuID(MENU_CREDITSCLOSE); + break; + } + pMessageQueue_50CBD0->AddMessage(UIMSG_ChangeGameState, 0, 0); + break; + } if ( pCurrentScreen == SCREEN_LOADGAME ) { pIcons_LOD->_4114F2(); @@ -3605,9 +3608,9 @@ } break; case UIMSG_PlayerCreationRemoveDownSkill: - uPlayerCreationUI_SelectedCharacter = uNum; + uPlayerCreationUI_SelectedCharacter = pParam; pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7 - + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum; + + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * pParam; pParty->pPlayers[0].pActiveSkills[(&pPlayer[uPlayerCreationUI_SelectedCharacter])->GetSkillIdxByOrder(3) + 3486 * uPlayerCreationUI_SelectedCharacter] = 0; break;