diff mm7_2.cpp @ 150:d92c78ab54fe

Слияние
author Ritor1
date Tue, 12 Feb 2013 10:17:35 +0600
parents 77ad59c17864 cca78efb377e
children 9abdd40a107b
line wrap: on
line diff
--- a/mm7_2.cpp	Tue Feb 12 10:17:11 2013 +0600
+++ b/mm7_2.cpp	Tue Feb 12 10:17:35 2013 +0600
@@ -3249,7 +3249,7 @@
 		  do
 		  {
 			v2 = v1->uAIState;
-			if ( v1->uAIState == 5 || v2 == 11 || v2 == 19 || (v3 = v1->uSummonerID) != 0 && (v3 & 7) == 4 )
+			if ( v1->uAIState == Dead || v2 == Removed || v2 == Disabled || (v3 = v1->uSummonerID) != 0 && (v3 & 7) == OBJECT_Player)
 			  ++v0;
 			++v1;
 			--v7;
@@ -15598,7 +15598,7 @@
         }
         while ( v6 < v22 );
       }
-      if ( (v7 & 7) == 5 )
+      if ( (v7 & 7) == OBJECT_Decoration)
       {
         v16 = (unsigned int)v7 >> 3;
         if ( (signed int)(((unsigned int)*v21 >> 16)
@@ -15697,7 +15697,7 @@
   v2 = a1;
   switch ( a1 & 7 )
   {
-    case 2:
+    case OBJECT_Item:
       v17 = a1 >> 3;
       v26 = a1 >> 3;
       v18 = a1 >> 3;
@@ -15730,7 +15730,8 @@
       }
       LayingItem::_42F933(v21);
       break;
-    case 3:
+
+    case OBJECT_Actor:
       v12 = a1 >> 3;
       v13 = &pActors[a1 >> 3];
       v14 = v13->uAIState;
@@ -15772,7 +15773,8 @@
         }
       }
       break;
-    case 5:
+
+    case OBJECT_Decoration:
       v8 = &pLevelDecorations[a1 >> 3];
       v9 = v8->field_16_event_id;
       if ( v9 )
@@ -15792,10 +15794,11 @@
         _5C3420_pDecoration = 0;
       }
       break;
+
     default:
-      if ( (a1 & 7) != 6 )
-      {
-    MessageBoxW(nullptr, L"Warning: Invalid ID reached!", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Mouse.cpp:2020", 0);
+      if ( (a1 & 7) != OBJECT_BModel)
+      {
+        MessageBoxW(nullptr, L"Warning: Invalid ID reached!", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Mouse.cpp:2020", 0);
         return 1;
       }
       if ( uCurrentlyLoadedLevelType != LEVEL_Indoor )
@@ -15866,7 +15869,7 @@
           v6 = ((v12 - v4 - 1) >> 1) + 1;
           do
           {
-            if ( (*(char *)v5 & 7) == 3 )
+            if ( (*(char *)v5 & 7) == OBJECT_Actor)
             {
               if ( *v5 <= a3 << 16 )
               {
@@ -15937,7 +15940,7 @@
       v3 = pRenderer->GetParentBillboardID(a1a);
       v4 = pBillboardRenderList[v3].sZValue;
       v5 = (unsigned __int16)pBillboardRenderList[v3].sZValue;
-      if ( (v5 & 7) == 3 )
+      if ( (v5 & 7) == OBJECT_Actor)
       {
         if ( v4 <= (unsigned int)(a3 << 16) )
         {
@@ -16196,7 +16199,7 @@
   {
     v19 = dword_720020_zvalues[v18] & 0xFFFF;
     v20 = (dword_720020_zvalues[v18] & 0xFFFFu) >> 3;
-    if ( (dword_720020_zvalues[v18] & 7) == 2 )
+    if ( (dword_720020_zvalues[v18] & 7) == OBJECT_Item)
     {
       if ( v20 >= 0x3E8 )
         return 0;
@@ -16209,16 +16212,16 @@
       }
       goto LABEL_41;
     }
-    if ( (dword_720020_zvalues[v18] & 7) == 3 )
+    if ( (dword_720020_zvalues[v18] & 7) == OBJECT_Actor)
     {
       if ( v20 >= 0xBB8 )
         return 0;
       v24 = (const char *)&pActors[v20];
       goto LABEL_51;
     }
-    if ( (dword_720020_zvalues[v18] & 7) == 5 )
+    if ( (dword_720020_zvalues[v18] & 7) == OBJECT_Decoration)
       break;
-    if ( (dword_720020_zvalues[v18] & 7) == 6 )
+    if ( (dword_720020_zvalues[v18] & 7) == OBJECT_BModel)
     {
       if ( uCurrentlyLoadedLevelType == LEVEL_Indoor )
       {
@@ -16550,14 +16553,14 @@
   v3 = &pObjectList->pObjects[v2->uObjectDescID];
   v145 = a2;
   v151 = a2 & 7;
-  if ( (a2 & 7) == 3 )
-  {
-    if ( (v2->field_58 & 7) == 3 && !pActors[v2->field_58 >> 3].GetActorsRelation(&pActors[a2 >> 3]) )
+  if ( (a2 & 7) == OBJECT_Actor)
+  {
+    if ( (v2->field_58 & 7) == OBJECT_Actor && !pActors[v2->field_58 >> 3].GetActorsRelation(&pActors[a2 >> 3]) )
       return 1;
   }
   else
   {
-    if ( (a2 & 7) == 4 && (v2->field_58 & 7) == 4 )
+    if ( (a2 & 7) == OBJECT_Player && (v2->field_58 & 7) == OBJECT_Player)
       return 1;
   }
   if ( pParty->bTurnBasedModeOn == 1 )
@@ -16569,7 +16572,7 @@
       v2->uAttributes = v5 & 0xFFFB;
     }
   }
-  if ( v151 == 6 && (v2->field_58 & 7) != 4 )
+  if ( v151 == OBJECT_BModel && (v2->field_58 & 7) != OBJECT_Player)
     BYTE2(pActors[v2->field_58 >> 3].uAttributes) |= 4u;
   v6 = v2->uItemType;
   v7 = v2->uItemType;
@@ -16626,7 +16629,7 @@
             break;
         }
         v138 = 1;
-        if ( v151 != 3 )
+        if ( v151 != OBJECT_Actor)
         {
           if ( v6 != 9030 || v2->field_50 != 4 )
             goto LABEL_246;