diff mm7_4.cpp @ 456:20d96ec810c8

Слияние
author Ritor1
date Sun, 24 Feb 2013 13:53:18 +0600
parents 5e5dfedcc0ad 0a1ea44b4a0a
children e5cf03a3d98e
line wrap: on
line diff
--- a/mm7_4.cpp	Sun Feb 24 13:52:57 2013 +0600
+++ b/mm7_4.cpp	Sun Feb 24 13:53:18 2013 +0600
@@ -5866,7 +5866,7 @@
   LONG uMouseX; // edi@6
   LONG uMouseY; // eax@6
   GUIButton *pControlsHead; // edx@6
-  unsigned int pNumMessage; // ecx@7
+  //unsigned int pNumMessage; // ecx@7
   int pControlParam; // esi@12
   signed int v8; // edi@30
   int v9; // edx@31
@@ -5907,7 +5907,9 @@
     uMouseX = pMouse->GetCursorPos(&v25)->x;
     uMouseY = pMouse->GetCursorPos(&v25)->y;
     pControlsHead = pGUIWindow_CurrentMenu->pControlsHead;
-    if ( pControlsHead != (GUIButton *)v1 )
+
+    //does nothing actually
+    /*if ( pControlsHead != (GUIButton *)v1 )
     {
       pNumMessage = pMessageQueue_50CBD0->uNumMessages;
       do
@@ -5916,13 +5918,14 @@
             && uMouseY >= (signed int)pControlsHead->uY && uMouseY <= (signed int)pControlsHead->uW )//mouse movement
         {
           pControlParam = pControlsHead->uControlParam;
-          pMessageQueue_50CBD0->SendMessage((UIMessageType)pControlsHead->field_1C, pControlParam, 0);
+          pMessageQueue_50CBD0->AddMessage((UIMessageType)pControlsHead->field_1C, pControlParam, 0);
           v1 = 0;
         }
         pControlsHead = pControlsHead->pNext;
       }
       while ( pControlsHead != (GUIButton *)v1 );
-    }
+    }*/
+
     while ( PeekMessageA(&Msg, (HWND)v1, v1, v1, PM_REMOVE) )
     {
       if ( Msg.message == WM_QUIT )
@@ -9520,13 +9523,14 @@
             }
             pPlayers[uActiveCharacter]->PlaySound(SPEECH_85, 0);
           }
-          if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
+          pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0);
+          /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
           {
             pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
             pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 1;
             *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
             ++pMessageQueue_50CBD0->uNumMessages;
-          }
+          }*/
         }
       }
       else
@@ -9577,13 +9581,14 @@
               }
               break;
           }
-          if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
+          pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0);
+          /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
           {
             pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
             pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 1;
             *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
             ++pMessageQueue_50CBD0->uNumMessages;
-          }
+          }*/
           v11 = uActiveCharacter;
           if ( uActiveCharacter )
           {
@@ -9644,13 +9649,15 @@
   sub_44A56A();
   PrepareHouse((HOUSE_TYPE)(int)window_SpeakInHouse->ptr_1C);
   dword_F8B19C = 1;
-  if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
+
+  pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0);
+  /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
   {
     pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
     pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 1;
     *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
     ++pMessageQueue_50CBD0->uNumMessages;
-  }
+  }*/
   v11 = uActiveCharacter;
   if ( uActiveCharacter )
   {
@@ -11604,7 +11611,7 @@
 LABEL_55:
           HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, v63);
 LABEL_56:
-          result = pMessageQueue_50CBD0->uNumMessages;
+          /*result = pMessageQueue_50CBD0->uNumMessages;
           if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
           {
             pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
@@ -11613,7 +11620,9 @@
             *(&pMessageQueue_50CBD0->uNumMessages + result) = 0;
             ++pMessageQueue_50CBD0->uNumMessages;
           }
-          return result;
+          return result;*/
+          pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0);
+          return 1; // void function actually
         }
         sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[538], v5 - LODWORD(v0->uExperience), v34 + 1);// 
                                                 // "You need %d more experience to train to level %d"
@@ -12484,13 +12493,14 @@
           pParty->field_709 = 0;
           sub_44A56A();
           dword_591084 = 0;
-          if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
+          pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0);
+          /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
           {
             pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
             pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 1;
             *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
             ++pMessageQueue_50CBD0->uNumMessages;
-          }
+          }*/
           goto LABEL_89;
         }
         v14 = 76;
@@ -12545,13 +12555,15 @@
     strcpy(v13, v15);
     pParty->field_709 = 0;
     sub_44A56A();
-    if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
+
+    pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0);
+    /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
     {
       pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
       pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 1;
       *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
       ++pMessageQueue_50CBD0->uNumMessages;
-    }
+    }*/
     if ( (uDialogue_SpeakingActorNPC_ID & 0x80000000u) == 0 )
       pDialogue_SpeakingActor->uAIState = Removed;
     if ( uActiveCharacter )
@@ -12569,13 +12581,14 @@
     {
       if ( v2->uProfession != 41 )
         v2->bHasUsedTheAbility = 1;
-      if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
+      /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
       {
         pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
         pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 1;
         *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
         ++pMessageQueue_50CBD0->uNumMessages;
-      }
+      }*/
+      pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0);
       goto LABEL_87;
     }
     v7 = pGlobalTXT_LocalizationStrings[140];
@@ -12844,7 +12857,7 @@
           }
         }
       }
-      result = pMessageQueue_50CBD0->uNumMessages;
+      /*result = pMessageQueue_50CBD0->uNumMessages;
       if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
       {
         pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
@@ -12852,8 +12865,9 @@
         result = 3 * pMessageQueue_50CBD0->uNumMessages + 3;
         *(&pMessageQueue_50CBD0->uNumMessages + result) = 0;
         ++pMessageQueue_50CBD0->uNumMessages;
-      }
-      return result;
+      }*/
+      pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0);
+      return 1; // void function actually
     }
     pRenderer->DrawTextureIndexed(8u, 8u, dword_F8B164);
     v5 = 0;
@@ -13388,7 +13402,7 @@
     v1->PlaySound(SPEECH_82, 0);
     pOtherOverlayList->_4418B1(20, uActiveCharacter + 99, 0, 65536);
 LABEL_46:
-    result = pMessageQueue_50CBD0->uNumMessages;
+    /*result = pMessageQueue_50CBD0->uNumMessages;
     if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
     {
       pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
@@ -13396,8 +13410,9 @@
       result = 3 * pMessageQueue_50CBD0->uNumMessages + 3;
       *(&pMessageQueue_50CBD0->uNumMessages + result) = v25;
       ++pMessageQueue_50CBD0->uNumMessages;
-    }
-    return result;
+    }*/
+    pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, v25);
+    return result; // void func
   }
   v63 = 1;
   v41 = pDialogueWindow->GetControl(pDialogueWindow->pStartingPosActiveItem);
@@ -13650,7 +13665,7 @@
     {
       v5 = 0;
     }
-    result = pMessageQueue_50CBD0->uNumMessages;
+    /*result = pMessageQueue_50CBD0->uNumMessages;
     if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
     {
       pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
@@ -13658,8 +13673,9 @@
       result = 3 * pMessageQueue_50CBD0->uNumMessages + 3;
       *(&pMessageQueue_50CBD0->uNumMessages + result) = v5;
       ++pMessageQueue_50CBD0->uNumMessages;
-    }
-    return result;
+    }*/
+    pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, v5);
+    return result; // void func
   }
   if ( !(unsigned __int16)_449B57_test_bit(
                             (unsigned __int8 *)v1->field_152,
@@ -14000,11 +14016,12 @@
       {
         ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2u);
         HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, 3);
-        if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 )
+        /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 )
           return;
         pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
         pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 1;
-        goto LABEL_33;
+        goto LABEL_33;*/
+        pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0);
       }
       Party::TakeGold(s1);
       v47[1] = (const char *)7;
@@ -14076,7 +14093,8 @@
           sqrt(3.1415926);
         while ( sub_4BD8B5() )
           ;
-        if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
+        pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0);
+        /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
         {
           pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
           pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
@@ -14084,7 +14102,7 @@
           *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
           ++pMessageQueue_50CBD0->uNumMessages;
           return;
-        }
+        }*/
       }
       else
       {