changeset 2355:a574a80e7012

Moving more functions out of unsorted_subs
author Grumpy7
date Wed, 09 Apr 2014 22:58:22 +0200
parents 7f2e111bbafb
children 23192f5b41d4
files GUIWindow.cpp GUIWindow.h Items.cpp Outdoor.cpp Outdoor.h Party.cpp Party.h Player.cpp Player.h UI/UIHouses.cpp UI/UIHouses.h UI/UIPopup.cpp UI/UIPopup.h mm7_2.cpp mm7_3.cpp mm7_unsorted_subs.h
diffstat 16 files changed, 324 insertions(+), 313 deletions(-) [+]
line wrap: on
line diff
--- a/GUIWindow.cpp	Wed Apr 09 21:58:46 2014 +0200
+++ b/GUIWindow.cpp	Wed Apr 09 22:58:22 2014 +0200
@@ -2555,4 +2555,11 @@
     pMessages[uNumMessages].param = param;
     pMessages[uNumMessages++].field_8 = a4;
   }
-}
\ No newline at end of file
+}
+
+//----- (004637E0) --------------------------------------------------------
+char  sub_4637E0_is_there_popup_onscreen()
+{
+  return dword_507BF0_is_there_popup_onscreen == 1;
+}
+// 507BF0: using guessed type int dword_507BF0_is_there_popup_onscreen;
\ No newline at end of file
--- a/GUIWindow.h	Wed Apr 09 21:58:46 2014 +0200
+++ b/GUIWindow.h	Wed Apr 09 22:58:22 2014 +0200
@@ -615,6 +615,7 @@
 void OnPaperdollLeftClick();
 void DrawJoinGuildWindow(int pEventCode);
 void  DialogueEnding();
+char sub_4637E0_is_there_popup_onscreen();
 
 
 void __fastcall ZBuffer_Fill(int *pZBuffer, int uTextureId, int iZValue);
--- a/Items.cpp	Wed Apr 09 21:58:46 2014 +0200
+++ b/Items.cpp	Wed Apr 09 22:58:22 2014 +0200
@@ -1,6 +1,7 @@
 #define _CRT_SECURE_NO_WARNINGS
 #include <stdlib.h>
 #include <string>
+#include "UI\UIHouses.h"
 #include "GUIButton.h"
 #include "mm7_unsorted_subs.h"
 #include "ErrorHandling.h"
@@ -462,7 +463,7 @@
 			pSpecialEnchantmentsSumm[i]+=pSpecialEnchantments[j].to_item_apply[i];
 		}
 
-	Initialize2DA();
+	InitializeBuildingResidents();
 
 	pItemsTXT_Raw = NULL;
 	pItemsTXT_Raw = (char*) pEvents_LOD->LoadRaw("items.txt", 0);
--- a/Outdoor.cpp	Wed Apr 09 21:58:46 2014 +0200
+++ b/Outdoor.cpp	Wed Apr 09 22:58:22 2014 +0200
@@ -4349,4 +4349,18 @@
   }
   pFaceID = 0;
   return ceiling_height_level[v22];// нет никакой преграды
+}
+
+
+//----- (00464839) --------------------------------------------------------
+char Is_out15odm_underwater()
+{
+  return _stricmp(pCurrentMapName, "out15.odm") == 0;
+}
+
+//----- (00464851) --------------------------------------------------------
+void SetUnderwaterFog()
+{
+  day_fogrange_1 = 50;
+  day_fogrange_2 = 5000;
 }
\ No newline at end of file
--- a/Outdoor.h	Wed Apr 09 21:58:46 2014 +0200
+++ b/Outdoor.h	Wed Apr 09 22:58:22 2014 +0200
@@ -253,6 +253,8 @@
 void ODM_GetTerrainNormalAt(int pos_x, int pos_z, Vec3_int_ *out);
 void UpdateActors_ODM();
 void ODM_ProcessPartyActions();
+char Is_out15odm_underwater();
+void SetUnderwaterFog();
 
 
 
--- a/Party.cpp	Wed Apr 09 21:58:46 2014 +0200
+++ b/Party.cpp	Wed Apr 09 22:58:22 2014 +0200
@@ -1191,4 +1191,24 @@
     }
   }
   return affectedCount;
-}
\ No newline at end of file
+}
+
+//----- (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;
\ No newline at end of file
--- a/Party.h	Wed Apr 09 21:58:46 2014 +0200
+++ b/Party.h	Wed Apr 09 22:58:22 2014 +0200
@@ -327,3 +327,4 @@
 bool TestPartyQuestBit(PARTY_QUEST_BITS bit);
 void __fastcall Rest(unsigned int uHoursToSleep);
 void RestAndHeal(__int64 uNumMinutes); // idb
+int GetTravelTime();
--- a/Player.cpp	Wed Apr 09 21:58:46 2014 +0200
+++ b/Player.cpp	Wed Apr 09 22:58:22 2014 +0200
@@ -8168,4 +8168,18 @@
   if (id != -1)
     AttackerInfo.Add(PID(OBJECT_Item, id), a5, SLOWORD(a1a.vPosition.x), SLOWORD(a1a.vPosition.y),
     SLOWORD(a1a.vPosition.z), 0, 0);
+}
+
+//----- (00458244) --------------------------------------------------------
+unsigned int SkillToMastery( unsigned int skill_value )
+{
+  switch (skill_value & 0x1C0)
+  {
+  case 0x100: return 4;     // Grandmaster
+  case 0x80:  return 3;     // Master
+  case 0x40:  return 2;     // Expert
+  case 0x00:  return 1;     // Normal
+  }
+  assert(false);
+  return 0;
 }
\ No newline at end of file
--- a/Player.h	Wed Apr 09 21:58:46 2014 +0200
+++ b/Player.h	Wed Apr 09 22:58:22 2014 +0200
@@ -851,5 +851,6 @@
 bool  ShouldLoadTexturesForRaceAndGender(unsigned int _this);
 int PlayerCreation_GetUnspentAttributePointCount();
 int CycleCharacter(bool backwards);
+unsigned int SkillToMastery(unsigned int skill_value);
 
 extern NZIArray<struct Player *, 5> pPlayers;
\ No newline at end of file
--- a/UI/UIHouses.cpp	Wed Apr 09 21:58:46 2014 +0200
+++ b/UI/UIHouses.cpp	Wed Apr 09 22:58:22 2014 +0200
@@ -3072,4 +3072,233 @@
   jail_dialogue_window.uFrameZ = 334;
   jail_dialogue_window.DrawTitleText(pFontArrus, 0, (310 - pFontArrus->CalcTextHeight(pGlobalTXT_LocalizationStrings[672], &jail_dialogue_window, 0, 0)) / 2 + 18,
      Color16(0xFFu, 0xFFu, 0x9Bu), pGlobalTXT_LocalizationStrings[672], 3);//"За многочисленные преступления и злодеяния вы были приговорены к одному году заключения."
+}
+
+
+//----- (00443801) --------------------------------------------------------
+void InitializeBuildingResidents()
+{
+
+  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);
+  }
+
 }
\ No newline at end of file
--- a/UI/UIHouses.h	Wed Apr 09 21:58:46 2014 +0200
+++ b/UI/UIHouses.h	Wed Apr 09 22:58:22 2014 +0200
@@ -142,6 +142,7 @@
 void InitializaDialogueOptions_Tavern(BuildingType type); // idb
 void InitializaDialogueOptions_Shops(BuildingType type);
 void InitializaDialogueOptions(BuildingType type);
+void InitializeBuildingResidents();
 
 extern int uHouse_ExitPic; // weak
 extern int dword_591080; // weak
--- a/UI/UIPopup.cpp	Wed Apr 09 21:58:46 2014 +0200
+++ b/UI/UIPopup.cpp	Wed Apr 09 22:58:22 2014 +0200
@@ -1,4 +1,5 @@
 #define _CRT_SECURE_NO_WARNINGS
+#include "UIPopup.h"
 #include "Books\UIMapBook.h"
 #include "UIShops.h"
 #include "..\MM7.h"
@@ -2007,3 +2008,28 @@
   return;
 }
 
+
+//----- (0045828B) --------------------------------------------------------
+unsigned int __fastcall GetSpellColor(signed int a1)
+{
+  if ( a1 == 0 )
+    return Color16(0, 0, 0);
+  if ( a1 < 12 )
+    return Color16(255, 85, 0);
+  if ( a1 < 23 )
+    return Color16(150, 212, 255);
+  if ( a1 < 34 )
+    return Color16(0, 128, 255);
+  if ( a1 < 45 )
+    return Color16(128, 128, 128);
+  if ( a1 < 56 )
+    return Color16(225, 225, 225);
+  if ( a1 < 67 )
+    return Color16(235, 15, 255);
+  if ( a1 < 78 )
+    return Color16(255, 128, 0);
+  if ( a1 < 89 )
+    return Color16(255, 255, 155);
+  if ( a1 < 100 )
+    return Color16(192, 192, 240);
+}
\ No newline at end of file
--- a/UI/UIPopup.h	Wed Apr 09 21:58:46 2014 +0200
+++ b/UI/UIPopup.h	Wed Apr 09 22:58:22 2014 +0200
@@ -1,1 +1,3 @@
-#pragma once
\ No newline at end of file
+#pragma once
+
+unsigned int __fastcall GetSpellColor(signed int a1);
\ No newline at end of file
--- a/mm7_2.cpp	Wed Apr 09 21:58:46 2014 +0200
+++ b/mm7_2.cpp	Wed Apr 09 22:58:22 2014 +0200
@@ -1936,44 +1936,7 @@
   }
 }
 
-//----- (00458244) --------------------------------------------------------
-unsigned int SkillToMastery( unsigned int skill_value )
-{
-  switch (skill_value & 0x1C0)
-  {
-    case 0x100: return 4;     // Grandmaster
-    case 0x80:  return 3;     // Master
-    case 0x40:  return 2;     // Expert
-    case 0x00:  return 1;     // Normal
-  }
-  assert(false);
-  return 0;
-}
-
-//----- (0045828B) --------------------------------------------------------
-unsigned int __fastcall GetSpellColor(signed int a1)
-{
-  if ( a1 == 0 )
-    return Color16(0, 0, 0);
-  if ( a1 < 12 )
-    return Color16(255, 85, 0);
-  if ( a1 < 23 )
-    return Color16(150, 212, 255);
-  if ( a1 < 34 )
-    return Color16(0, 128, 255);
-  if ( a1 < 45 )
-    return Color16(128, 128, 128);
-  if ( a1 < 56 )
-    return Color16(225, 225, 225);
-  if ( a1 < 67 )
-    return Color16(235, 15, 255);
-  if ( a1 < 78 )
-    return Color16(255, 128, 0);
-  if ( a1 < 89 )
-    return Color16(255, 255, 155);
-  if ( a1 < 100 )
-    return Color16(192, 192, 240);
-}
+
 
 //----- (004610AA) --------------------------------------------------------
 void __fastcall PrepareToLoadODM(unsigned int bLoading, ODMRenderParams *a2)
@@ -2385,18 +2348,6 @@
   pIconsFrameTable->InitializeAnimation(uIconID_CharacterFrame);
 }
 
-//----- (00464839) --------------------------------------------------------
-char Is_out15odm_underwater()
-{
-  return _stricmp(pCurrentMapName, "out15.odm") == 0;
-}
-
-//----- (00464851) --------------------------------------------------------
-void SetUnderwaterFog()
-{
-  day_fogrange_1 = 50;
-  day_fogrange_2 = 5000;
-}
 
 //----- (00464866) --------------------------------------------------------
 void DoPrepareWorld(unsigned int bLoading, int _1_fullscreen_loading_2_box)
@@ -3435,12 +3386,6 @@
   return 1;
 }
 
-//----- (004637E0) --------------------------------------------------------
-char  sub_4637E0_is_there_popup_onscreen()
-{
-  return dword_507BF0_is_there_popup_onscreen == 1;
-}
-// 507BF0: using guessed type int dword_507BF0_is_there_popup_onscreen;
 
 //----- (00466082) --------------------------------------------------------
 void MM6_Initialize(const wchar_t *pIniFilename)
--- a/mm7_3.cpp	Wed Apr 09 21:58:46 2014 +0200
+++ b/mm7_3.cpp	Wed Apr 09 22:58:22 2014 +0200
@@ -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)
--- a/mm7_unsorted_subs.h	Wed Apr 09 21:58:46 2014 +0200
+++ b/mm7_unsorted_subs.h	Wed Apr 09 22:58:22 2014 +0200
@@ -29,25 +29,18 @@
 int __fastcall _43F5C8_get_point_light_level_with_respect_to_lights(unsigned int uBaseLightLevel, int uSectorID, float x, float y, float z);
 bool _44100D_should_alter_right_panel();
 __int16 __fastcall sub_441A4E(int a1);
-void Initialize2DA();
 void LoadLevel_InitializeLevelStr();
 void OnMapLeave();
 void OnMapLoad();
 void Level_LoadEvtAndStr(const char *pLevelName);
-int GetTravelTime();
 void __fastcall sub_4451A8_press_any_key(int a1, int a2, int a4);
-unsigned int SkillToMastery(unsigned int skill_value);
-unsigned int __fastcall GetSpellColor(signed int a1);
 void __fastcall PrepareToLoadODM(unsigned int bLoading, struct ODMRenderParams *a2);
 void _461103_load_level_sub();
 void MainMenu_Loop();
-char sub_4637E0_is_there_popup_onscreen();
 void ResetCursor_Palettes_LODs_Level_Audio_SFT_Windows();
 void PrepareWorld(unsigned int _0_box_loading_1_fullscreen);
 void Game_DeinitializeAndTerminate(int exitCode); // idb
 void FinalInitialization();
-char Is_out15odm_underwater();
-void SetUnderwaterFog();
 void DoPrepareWorld(unsigned int bLoading, int _1_fullscreen_loading_2_box);
 bool __fastcall CheckMM7CD(char c);
 void SecondaryInitialization();