diff mm7_3.cpp @ 510:7c86030324a5

Слияние
author Ritor1
date Fri, 01 Mar 2013 18:38:12 +0600
parents dddedef7a98e dd5124185551
children cb0ad52d6a26
line wrap: on
line diff
--- a/mm7_3.cpp	Fri Mar 01 18:37:54 2013 +0600
+++ b/mm7_3.cpp	Fri Mar 01 18:38:12 2013 +0600
@@ -13956,126 +13956,126 @@
 					{
 					if ( !_strnicmp(test_string, "wea", 3) )
 						{
-						p2DEvents[i].uType = 1;
+						p2DEvents[i].uType = BildingType_WeaponShop;
 						break;
 						}
 					if ( !_strnicmp(test_string, "arm", 3) )
 						{
-						p2DEvents[i].uType = 2;
+						p2DEvents[i].uType = BildingType_ArmorShop;
 						break;
 						}
 					if ( !_strnicmp(test_string, "mag", 3) )
 						{
-						p2DEvents[i].uType = 3;
+						p2DEvents[i].uType = BildingType_MagicShop;
 						break;
 						}
 					if ( !_strnicmp(test_string, "alc", 3) )
 						{
-						p2DEvents[i].uType = 4;
+						p2DEvents[i].uType = BildingType_AlchemistShop;
 						break;
 						}
 					if ( !_strnicmp(test_string, "sta", 3) )
 						{
-						p2DEvents[i].uType = 27;
+						p2DEvents[i].uType = BildingType_Stables;
 						break;
 						}
 					if ( !_strnicmp(test_string, "boa", 3) )
 						{
-						p2DEvents[i].uType = 28;
+						p2DEvents[i].uType = BildingType_Boats;
 						break;
 						}
 					if ( !_strnicmp(test_string, "tem", 3) )
 						{
-						p2DEvents[i].uType = 23;
+						p2DEvents[i].uType = BildingType_Temple;
 						break;
 						}
 					if ( !_strnicmp(test_string, "tra", 3) )
 						{
-						p2DEvents[i].uType = 30;
+						p2DEvents[i].uType = BildingType_Training;
 						break;
 						}
 					if ( !_strnicmp(test_string, "tow", 3) )
 						{
-						p2DEvents[i].uType = 17;
+						p2DEvents[i].uType = BildingType_TownHall;
 						break;
 						}
 
 					if ( !_strnicmp(test_string, "tav", 3) )
 						{
-						p2DEvents[i].uType = 21;
+						p2DEvents[i].uType = BildingType_Tavern;
 						break;
 						}
 					if ( !_strnicmp(test_string, "ban", 3) )
 						{
-						p2DEvents[i].uType = 22;
+						p2DEvents[i].uType = BildingType_Bank;
 						break;
 						}
 					if ( !_strnicmp(test_string, "fir", 3) )
 						{
-						p2DEvents[i].uType = 5;
+						p2DEvents[i].uType = BildingType_FireGuild;
 						break;
 						}
 					if ( !_strnicmp(test_string, "air", 3) )
 						{
-						p2DEvents[i].uType = 6;
+						p2DEvents[i].uType = BildingType_AirGuild;
 						break;
 						}
 					if ( !_strnicmp(test_string, "wat", 3) )
 						{
-						p2DEvents[i].uType = 7;
+						p2DEvents[i].uType = BildingType_WaterGuild;
 						break;
 						}
 					if ( !_strnicmp(test_string, "ear", 3) )
 						{
-						p2DEvents[i].uType = 8;
+						p2DEvents[i].uType = BildingType_EarthGuild;
 						break;
 						}
 					if ( !_strnicmp(test_string, "spi", 3) )
 						{
-						p2DEvents[i].uType = 9;
+						p2DEvents[i].uType = BildingType_SpiritGuild;
 						break;
 						}
 					if ( !_strnicmp(test_string, "min", 3) )
 						{
-						p2DEvents[i].uType = 10;
+						p2DEvents[i].uType = BildingType_MindGuild;
 						break;
 						}
 					if ( !_strnicmp(test_string, "bod", 3) )
 						{
-						p2DEvents[i].uType = 11;
+						p2DEvents[i].uType = BildingType_BodyGuild;
 						break;
 						}
 					if ( !_strnicmp(test_string, "lig", 3) )
 						{
-						p2DEvents[i].uType = 12;
+						p2DEvents[i].uType = BildingType_LightGuild;
 						break;
 						}
 					if ( !_strnicmp(test_string, "dar", 3) )
 						{
-						p2DEvents[i].uType = 13;
+						p2DEvents[i].uType = BildingType_DarkGuild;
 						break;
 						}
 					if ( !_strnicmp(test_string, "ele", 3) )
 						{
-						p2DEvents[i].uType = 14;
+						p2DEvents[i].uType = BildingType_14;
 						break;
 						}
 					if ( !_strnicmp(test_string, "sel", 3) )
 						{
-						p2DEvents[i].uType = 15;
+						p2DEvents[i].uType = BildingType_15;
 						break;
 						}
 					if ( !_strnicmp(test_string, "mir", 3) )
 						{
-						p2DEvents[i].uType = 16;
+						p2DEvents[i].uType = BildingType_16;
 						break;
 						}
 					if ( !_strnicmp(test_string, "mer", 3) )
 						{
-						p2DEvents[i].uType = 17;
+						p2DEvents[i].uType = BildingType_TownHall;
 						break;
 						}
-					p2DEvents[i].uType = 18;
+					p2DEvents[i].uType = BildingType_18;
 					}
 					break;
 
@@ -16404,7 +16404,7 @@
   LayingItem a1; // [sp+38h] [bp-7Ch]@12
   //LayingItem::LayingItem(&a1);
 
-  a1.uItemType = stru_4E3ACC[spellnum_].uItemType;
+  a1.uItemType = stru_4E3ACC[spellnum_].field_0;
   if ( spellnum_ > 58 )
   {
     if ( spellnum_ == 69 )
@@ -17086,20 +17086,17 @@
 }
 
 //----- (00449B7E) --------------------------------------------------------
-unsigned char *_449B7E_toggle_bit(unsigned char *pArray, __int16 a2, unsigned __int16 bToggle)
+void _449B7E_toggle_bit(unsigned char *pArray, __int16 a2, unsigned __int16 bToggle)
 {
   signed int v3; // esi@1
-  unsigned char *result; // eax@1
-  unsigned int v5; // edx@1
+  unsigned char set_bit; // edx@1
 
   v3 = a2 - 1;
-  result = &pArray[v3 / 8];
-  v5 = 0x80 >> v3 % 8;
+  set_bit = 0x80 >> v3 % 8;
   if ( bToggle )
-    *result |= v5;
-  else
-    *result &= ~(unsigned char)v5;
-  return result;
+    pArray[v3 / 8] |=  set_bit;
+  else
+    pArray[v3 / 8] &= ~set_bit;
 }