diff mm7_3.cpp @ 2358:23192f5b41d4

Merge
author Ritor1
date Thu, 10 Apr 2014 17:35:26 +0600
parents a574a80e7012
children bddcaf5d5db2
line wrap: on
line diff
--- a/mm7_3.cpp	Thu Apr 10 17:35:10 2014 +0600
+++ b/mm7_3.cpp	Thu Apr 10 17:35:26 2014 +0600
@@ -3390,233 +3390,6 @@
   return result;
 }
 
-//----- (00443801) --------------------------------------------------------
-void Initialize2DA()
-{
- 
-  int i;
-	char* test_string;
-	unsigned char c;
-	bool break_loop;
-	unsigned int temp_str_len;
-	char* tmp_pos;
-	int decode_step;
-
-	if ( p2DEventsTXT_Raw )
-		free(p2DEventsTXT_Raw);
-	p2DEventsTXT_Raw = NULL;
-	p2DEventsTXT_Raw = (char *)pEvents_LOD->LoadRaw("2dEvents.txt", 0);
-	strtok(p2DEventsTXT_Raw, "\r");
-	strtok(NULL, "\r");
-
-	for (i=0;i<525;++i)
-		{
-		test_string = strtok(NULL, "\r") + 1;
-		break_loop = false;
-		decode_step=0;
-		do 
-			{
-			c = *(unsigned char*)test_string;
-			temp_str_len = 0;
-			while((c!='\t')&&(c>0))
-				{
-				++temp_str_len;
-				c=test_string[temp_str_len];
-				}		
-			tmp_pos=test_string+temp_str_len;
-			if (*tmp_pos == 0)
-				break_loop = true;
-			*tmp_pos = 0;
-			if (temp_str_len)
-				{
-				switch (decode_step)
-					{
-				case 2:
-					{
-					if ( !_strnicmp(test_string, "wea", 3) )
-						{
-						p2DEvents[i].uType = BuildingType_WeaponShop;
-						break;
-						}
-					if ( !_strnicmp(test_string, "arm", 3) )
-						{
-						p2DEvents[i].uType = BuildingType_ArmorShop;
-						break;
-						}
-					if ( !_strnicmp(test_string, "mag", 3) )
-						{
-						p2DEvents[i].uType = BuildingType_MagicShop;
-						break;
-						}
-					if ( !_strnicmp(test_string, "alc", 3) )
-						{
-						p2DEvents[i].uType = BuildingType_AlchemistShop;
-						break;
-						}
-					if ( !_strnicmp(test_string, "sta", 3) )
-						{
-						p2DEvents[i].uType = BuildingType_Stables;
-						break;
-						}
-					if ( !_strnicmp(test_string, "boa", 3) )
-						{
-						p2DEvents[i].uType = BuildingType_Boats;
-						break;
-						}
-					if ( !_strnicmp(test_string, "tem", 3) )
-						{
-						p2DEvents[i].uType = BuildingType_Temple;
-						break;
-						}
-					if ( !_strnicmp(test_string, "tra", 3) )
-						{
-						p2DEvents[i].uType = BuildingType_Training;
-						break;
-						}
-					if ( !_strnicmp(test_string, "tow", 3) )
-						{
-						p2DEvents[i].uType = BuildingType_TownHall;
-						break;
-						}
-
-					if ( !_strnicmp(test_string, "tav", 3) )
-						{
-						p2DEvents[i].uType = BuildingType_Tavern;
-						break;
-						}
-					if ( !_strnicmp(test_string, "ban", 3) )
-						{
-						p2DEvents[i].uType = BuildingType_Bank;
-						break;
-						}
-					if ( !_strnicmp(test_string, "fir", 3) )
-						{
-						p2DEvents[i].uType = BuildingType_FireGuild;
-						break;
-						}
-					if ( !_strnicmp(test_string, "air", 3) )
-						{
-						p2DEvents[i].uType = BuildingType_AirGuild;
-						break;
-						}
-					if ( !_strnicmp(test_string, "wat", 3) )
-						{
-						p2DEvents[i].uType = BuildingType_WaterGuild;
-						break;
-						}
-					if ( !_strnicmp(test_string, "ear", 3) )
-						{
-						p2DEvents[i].uType = BuildingType_EarthGuild;
-						break;
-						}
-					if ( !_strnicmp(test_string, "spi", 3) )
-						{
-						p2DEvents[i].uType = BuildingType_SpiritGuild;
-						break;
-						}
-					if ( !_strnicmp(test_string, "min", 3) )
-						{
-						p2DEvents[i].uType = BuildingType_MindGuild;
-						break;
-						}
-					if ( !_strnicmp(test_string, "bod", 3) )
-						{
-						p2DEvents[i].uType = BuildingType_BodyGuild;
-						break;
-						}
-					if ( !_strnicmp(test_string, "lig", 3) )
-						{
-						p2DEvents[i].uType = BuildingType_LightGuild;
-						break;
-						}
-					if ( !_strnicmp(test_string, "dar", 3) )
-						{
-						p2DEvents[i].uType = BuildingType_DarkGuild;
-						break;
-						}
-					if ( !_strnicmp(test_string, "ele", 3) ) // "Element Guild" from mm6
-						{
-						p2DEvents[i].uType = BuildingType_ElementalGuild;
-						break;
-						}
-					if ( !_strnicmp(test_string, "sel", 3) )
-						{
-						p2DEvents[i].uType = BuildingType_SelfGuild;
-						break;
-						}
-					if ( !_strnicmp(test_string, "mir", 3) )
-						{
-						p2DEvents[i].uType = BuildingType_16;
-						break;
-						}
-					if ( !_strnicmp(test_string, "mer", 3) ) // "Merc Guild" from mm6
-						{
-						p2DEvents[i].uType = BuildingType_TownHall;
-						break;
-						}
-					p2DEvents[i].uType = BuildingType_18;
-					}
-					break;
-
-				case 4:
-					p2DEvents[i].uAnimationID = atoi(test_string);
-					break;
-				case 5:
-					p2DEvents[i].pName = RemoveQuotes(test_string);
-					break;
-				case 6:
-					p2DEvents[i].pProprieterName = RemoveQuotes(test_string);
-					break;
-				case 7:
-					p2DEvents[i].pProprieterTitle = RemoveQuotes(test_string);
-					break;
-				case 8:
-					p2DEvents[i].field_14 = atoi(test_string);
-					break;
-				case 9:
-					p2DEvents[i]._state = atoi(test_string);
-					break;
-				case 10:
-					p2DEvents[i]._rep = atoi(test_string);
-					break;
-				case 11:
-					p2DEvents[i]._per = atoi(test_string);
-					break;
-				case 12:
-					p2DEvents[i].fPriceMultiplier = atof(test_string);
-					break;
-				case 13:
-					p2DEvents[i].flt_24 = atof(test_string);
-					break;
-				case 15:
-					p2DEvents[i].field_1C = atoi(test_string);
-					break;
-				case 18:
-					p2DEvents[i].uOpenTime = atoi(test_string);
-					break;
-				case 19:
-					p2DEvents[i].uCloseTime = atoi(test_string);
-					break;
-				case 20:
-					p2DEvents[i].uExitPicID = atoi(test_string);
-					break;
-				case 21:
-					p2DEvents[i].uExitMapID = atoi(test_string);
-					break;
-				case 22:
-					p2DEvents[i]._quest_related = atoi(test_string);
-					break;
-				case 23:
-					p2DEvents[i].pEnterText = RemoveQuotes(test_string);
-					break;
-					}
-				}
-			++decode_step;
-			test_string=tmp_pos+1;
-			} while ((decode_step<24)&&!break_loop);
-		}
-
-}
 
 //----- (00443E31) --------------------------------------------------------
 void LoadLevel_InitializeLevelStr()
@@ -3816,25 +3589,6 @@
     LoadLevel_InitializeLevelStr();
 }
 
-//----- (00444D80) --------------------------------------------------------
-int GetTravelTime()
-{
-  signed int new_travel_time; // esi@1
-
-  new_travel_time = uDefaultTravelTime_ByFoot;
-  if ( CheckHiredNPCSpeciality(Guide) )
-    --new_travel_time;
-  if ( CheckHiredNPCSpeciality(Tracker) )
-    new_travel_time -= 2;
-  if ( CheckHiredNPCSpeciality(Pathfinder) )
-    new_travel_time -= 3;
-  if ( CheckHiredNPCSpeciality(Explorer) )
-    --new_travel_time;
-  if ( new_travel_time < 1 )
-    new_travel_time = 1;
-  return new_travel_time;
-}
-// 6BD07C: using guessed type int uDefaultTravelTime_ByFoot;
 
 //----- (004451A8) --------------------------------------------------------
 void __fastcall sub_4451A8_press_any_key(int a1, int a2, int a4)