diff mm7_4.cpp @ 396:4a60371fd70c

Слияние
author Ritor1
date Fri, 22 Feb 2013 21:47:55 +0600
parents c1a45052d634 edd2d8b7e3c4
children 7189d0bddf07
line wrap: on
line diff
--- a/mm7_4.cpp	Fri Feb 22 21:47:42 2013 +0600
+++ b/mm7_4.cpp	Fri Feb 22 21:47:55 2013 +0600
@@ -5915,15 +5915,7 @@
             && uMouseY >= (signed int)pControlsHead->uY && uMouseY <= (signed int)pControlsHead->uW )//mouse movement
         {
           pControlParam = pControlsHead->uControlParam;
-          if ( (signed int)pNumMessage < 40 )
-          {
-            pMessageQueue_50CBD0->pMessages[pNumMessage].eType = (UIMessageType)pControlsHead->field_1C;
-            //pTexture = &pTexture_PCX;
-            pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = pControlParam;
-            *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
-            pNumMessage = pMessageQueue_50CBD0->uNumMessages + 1;
-            ++pMessageQueue_50CBD0->uNumMessages;
-          }
+          pMessageQueue_50CBD0->SendMessage((UIMessageType)pControlsHead->field_1C, pControlParam, 0);
           v1 = 0;
         }
         pControlsHead = pControlsHead->pNext;
@@ -14771,7 +14763,7 @@
 {
   unsigned int v9; // ebx@1
   int v10; // edi@1
-  signed int v11; // eax@1
+  //signed int v11; // eax@1
   unsigned int v12; // eax@6
   const char *v13; // ST0C_4@6
   unsigned int v14; // eax@8
@@ -14779,7 +14771,7 @@
   unsigned int v16; // eax@16
   unsigned int result; // eax@26
   const char *v18; // [sp-8h] [bp-40h]@9
-  const char *v19; // [sp-4h] [bp-3Ch]@2
+  //const char *v19; // [sp-4h] [bp-3Ch]@2
   char *v20; // [sp-4h] [bp-3Ch]@9
   const char *v21; // [sp-4h] [bp-3Ch]@11
   char pContainer[40]; // [sp+Ch] [bp-2Ch]@1
@@ -14798,7 +14790,15 @@
   uCurrentHouse_Animation = v9;
   pEventTimer->Pause();
   pAudioPlayer->StopChannels(-1, -1);
-  v11 = const_2();
+
+  switch (pParty->alignment)
+  {
+    case PartyAlignment_Good:    sprintf(pContainer, "evt%02d-b", const_2()); break;
+    case PartyAlignment_Neutral: sprintf(pContainer, "evt%02d", const_2()); break;
+    case PartyAlignment_Evil:    sprintf(pContainer, "evt%02d-c", const_2()); break;
+    default: assert(false);
+  }
+  /*v11 = const_2();
   sprintf(pContainer, "evt%02d", v11);
   if ( pParty->uAlignment )
   {
@@ -14810,8 +14810,9 @@
   {
     v19 = "-b";
   }
-  strcat(pContainer, v19);
-LABEL_6:
+  strcat(pContainer, v19);*/
+
+//LABEL_6:
   v12 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
   v13 = pHouse_ExitPictures[v10];
   pTexture_Dialogue_Background = &pIcons_LOD->pTextures[v12];
@@ -15006,12 +15007,12 @@
   //Player *v13; // esi@25
   int v14; // eax@25
   //Player *v15; // esi@27
-  signed int v16; // eax@32
+  //signed int v16; // eax@32
   unsigned int v17; // eax@37
   signed int v18; // edi@37
   signed int v19; // edi@41
   //unsigned int v20; // ecx@41
-  const char *v22; // [sp-4h] [bp-40h]@33
+  //const char *v22; // [sp-4h] [bp-40h]@33
   char pContainer[40]; // [sp+Ch] [bp-30h]@32
   unsigned int v24; // [sp+34h] [bp-8h]@5
   //enum HOUSE_TYPE v25; // [sp+38h] [bp-4h]@1
@@ -15129,7 +15130,8 @@
     ++pIcons_LOD->uTexturePacksCount;
     if ( !pIcons_LOD->uNumPrevLoadedFiles )
       pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
-    v16 = const_2();
+
+    /*v16 = const_2();
     sprintf(pContainer, "evt%02d", v16);
     if ( pParty->uAlignment )
     {
@@ -15141,8 +15143,16 @@
     {
       v22 = "-b";
     }
-    strcat(pContainer, v22);
-LABEL_37:
+    strcat(pContainer, v22);*/
+//LABEL_37:
+    switch (pParty->alignment)
+    {
+      case PartyAlignment_Good:    sprintf(pContainer, "evt%02d-b", const_2()); break;
+      case PartyAlignment_Neutral: sprintf(pContainer, "evt%02d", const_2()); break;
+      case PartyAlignment_Evil:    sprintf(pContainer, "evt%02d-c", const_2()); break;
+      default: assert(false);
+    }
+
     v17 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
     array_5913D8[6] = 0;
     pTexture_Dialogue_Background = &pIcons_LOD->pTextures[v17];