changeset 969:4d1259ef6ab2

Слияние
author Ritor1
date Wed, 08 May 2013 09:45:57 +0600
parents 96f7beed452f (current diff) e655624e4b7c (diff)
children e3123a1dea82
files mm7_5.cpp
diffstat 2 files changed, 21 insertions(+), 61 deletions(-) [+]
line wrap: on
line diff
--- a/mm7_4.cpp	Wed May 08 09:45:49 2013 +0600
+++ b/mm7_4.cpp	Wed May 08 09:45:57 2013 +0600
@@ -1950,7 +1950,6 @@
   }
   return result;
 }
-
 //----- (004938D1) --------------------------------------------------------
 void __fastcall Rest(unsigned int uHoursToSleep)
 {
--- a/mm7_5.cpp	Wed May 08 09:45:49 2013 +0600
+++ b/mm7_5.cpp	Wed May 08 09:45:57 2013 +0600
@@ -3298,50 +3298,24 @@
 //----- (00435748) --------------------------------------------------------
 void __cdecl GUI_MainMenuMessageProc()
 {
-  //AudioPlayer *v0; // ebp@2
-  //Player *pPlayer1; // ebx@2
-  unsigned int v2; // ecx@18
+  Player *pPlayer; // ebx@2
   void *v3; // edi@21
   signed int v4; // eax@29
   int v5; // ecx@29
   PLAYER_SKILL_TYPE v6; // edi@37
   GUIWindow *pWindow; // eax@56
-  unsigned int v8; // edx@56
-  //Player *pCurrentPlayer; // edi@57
-  signed int v10; // eax@58
   GUIButton *pButton; // eax@59
-  //unsigned __int8 v12; // sf@62
-  //signed int v13; // eax@64
-  unsigned int v14; // eax@66
   int v15; // edi@70
   char v16; // zf@73
-  int v17; // eax@73
-  int v19; // edi@116
   char v20; // dl@116
   unsigned int v21; // eax@116
-  Player *v22; // ecx@116
-  char *v23; // ebx@118
-  int v24; // eax@118
   unsigned int v25; // eax@120
   unsigned int v26; // ecx@127
-  unsigned int v27; // eax@129
-  unsigned __int8 v28; // of@129
   SoundID pSoundID; // [sp-2Ch] [bp-3Ch]@36
-  signed int v30; // [sp-28h] [bp-38h]@36
-  unsigned int v31; // [sp-24h] [bp-34h]@36
-  signed int v32; // [sp-20h] [bp-30h]@36
-  signed int v34; // [sp-1Ch] [bp-2Ch]@36
-  int v36; // [sp-18h] [bp-28h]@36
-  unsigned int v38; // [sp-14h] [bp-24h]@36
-  int v39; // [sp-14h] [bp-24h]@56
-  signed int v40; // [sp-10h] [bp-20h]@15
   signed int v41; // [sp-10h] [bp-20h]@29
-  int v42; // [sp-10h] [bp-20h]@36
-  int v43; // [sp-10h] [bp-20h]@56
   int uNum; // [sp+4h] [bp-Ch]@3
   UIMessageType pUIMessageType; // [sp+8h] [bp-8h]@3
-  //int pSex; // [sp+Ch] [bp-4h]@3
-  Player *pPlayer;
+  int pSex; // [sp+Ch] [bp-4h]@3
 
   if ( pMessageQueue_50CBD0->uNumMessages )
   {
@@ -3351,7 +3325,6 @@
       int param2;
       pMessageQueue_50CBD0->PopMessage(&pUIMessageType, &uNum, &param2);
       auto player = &pParty->pPlayers[uNum];
-      auto sex = player->GetSexByVoice();
 
       switch (pUIMessageType) // For buttons of window MainMenu
       {
@@ -3378,33 +3351,31 @@
           pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0);
           break;
         case UIMSG_PlayerCreation_VoicePrev:
+          pSex = player->GetSexByVoice();
           do
           {
             if (player->uVoiceID == 0)
               player->uVoiceID = 19;
             else --player->uVoiceID;
           }
-          while (player->GetSexByVoice() != sex);
+          while (player->GetSexByVoice() != pSex);
           pButton = pCreationUI_BtnPressLeft2[uNum];
           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_VoiceNext:
-          {
-            //auto player = &pParty->pPlayers[uNum];
-            //auto sex = player->GetSexByVoice();
-            do
-            {
-              player->uVoiceID = (player->uVoiceID + 1) % 20;
-            }
-            while (player->GetSexByVoice() != sex);
-            pButton = pCreationUI_BtnPressRight2[uNum];
-            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;
-          }
+          pSex = player->GetSexByVoice();
+          do
+          {
+            player->uVoiceID = (player->uVoiceID + 1) % 20;
+          }
+          while (player->GetSexByVoice() != pSex);
+          pButton = pCreationUI_BtnPressRight2[uNum];
+          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];
           if (!pPlayer->uFace)
@@ -3420,10 +3391,8 @@
                                                     % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum;
           uPlayerCreationUI_SelectedCharacter = v25;
           GUIWindow::Create(pCreationUI_BtnPressLeft[v25]->uX, pCreationUI_BtnPressLeft[v25]->uY, 0, 0, WINDOW_PressedButton, (int)pCreationUI_BtnPressLeft[v25], 1);
-          //v0 = pAudioPlayer;
           pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0.0, 0);
           pPlayer->PlaySound(SPEECH_PickMe, 0);
-          //v1 = (char *)pParty->pPlayers;
           break;
         case UIMSG_PlayerCreation_FaceNext:
           pPlayer = &pParty->pPlayers[uNum];
@@ -3438,10 +3407,8 @@
                                                     % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum;
           uPlayerCreationUI_SelectedCharacter = v21;
           GUIWindow::Create(pCreationUI_BtnPressRight[v21]->uX, pCreationUI_BtnPressRight[v21]->uY, 0, 0, WINDOW_PressedButton, (int)pCreationUI_BtnPressRight[v21], 1);
-          //v0 = pAudioPlayer;
           pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0);
           pPlayer->PlaySound(SPEECH_PickMe, 0);
-          //v1 = (char *)pParty->pPlayers;
           break;
         case UIMSG_PlayerCreationClickPlus:
           GUIWindow::Create(613, 393, 0, 0, WINDOW_PressedButton2, (int)pPlayerCreationUI_BtnPlus, 1);
@@ -3454,14 +3421,12 @@
           pAudioPlayer->PlaySound((SoundID)23, 0, 0, -1, 0, 0, 0, 0);
           break;
         case UIMSG_PlayerCreationSelectActiveSkill:
-          {
-            auto _t = &pPlayer[uPlayerCreationUI_SelectedCharacter];
-            v6 = _t->GetSkillIdxByOrder(uNum + 4);
-            if ( _t->GetSkillIdxByOrder(3) == 37 )
-              pParty->pPlayers[0].pActiveSkills[v6 + 3486 * uPlayerCreationUI_SelectedCharacter] = 1;
-            pAudioPlayer->PlaySound((SoundID)24, 0, 0, -1, 0, 0, 0, 0);
-            break;
-          }
+          pPlayer = &pPlayer[uPlayerCreationUI_SelectedCharacter];
+          v6 = pPlayer->GetSkillIdxByOrder(uNum + 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);
           pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0);
@@ -3612,7 +3577,6 @@
             pTexture_PCX.Load("title.pcx", 0);
             SetCurrentMenuID(MENU_MAIN);
             v15 = 1;
-//LABEL_81:
             pGUIWindow_CurrentMenu->Release();
             pGUIWindow2->Release();
             pGUIWindow2 = 0;
@@ -3628,7 +3592,6 @@
           else
           {
             if ( pCurrentScreen != SCREEN_1B )
-              //goto LABEL_81;
             {
               pGUIWindow_CurrentMenu->Release();
               pGUIWindow2->Release();
@@ -3643,8 +3606,6 @@
           break;
         case UIMSG_PlayerCreationRemoveDownSkill:
           uPlayerCreationUI_SelectedCharacter = uNum;
-          //v41 = 3;
-          //v1 = (char *)pParty->pPlayers;
           pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7
              + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum;
           pParty->pPlayers[0].pActiveSkills[(&pPlayer[uPlayerCreationUI_SelectedCharacter])->GetSkillIdxByOrder(3)