changeset 784:b3e08a496778

Merge
author Nomad
date Sun, 24 Mar 2013 21:15:01 +0200
parents b27dd658ea77 (current diff) c47efaf23642 (diff)
children f004c7ceb7bd 83a58d185d3c
files UIHouses.cpp mm7_2.cpp mm7_3.cpp mm7_4.cpp mm7_5.cpp mm7_6.cpp
diffstat 14 files changed, 417 insertions(+), 1175 deletions(-) [+]
line wrap: on
line diff
--- a/Actor.cpp	Sun Mar 24 21:14:28 2013 +0200
+++ b/Actor.cpp	Sun Mar 24 21:15:01 2013 +0200
@@ -21,17 +21,31 @@
 #include "GUIWindow.h"
 #include "GUIFont.h"
 
-
-
-
 Actor pActors[500];
 int uNumActors;
 
 stru319 stru_50C198; // idb
 
-
-
-
+//----- (00448A40) --------------------------------------------------------
+void Actor::ToggleFlag(signed int uActorID, unsigned int uFlag, int bToggle)
+{
+  if ( uActorID >= 0 && uActorID <= (signed int)(uNumActors - 1) )
+  {
+    if ( bToggle )
+    {
+      pActors[uActorID].uAttributes |= uFlag;
+    }
+    else
+    {
+      if ( uFlag == 0x10000 )
+      {
+        if (pActors[uActorID].uAIState == Disabled )
+          pActors[uActorID].uAIState = Standing;
+      }
+      pActors[uActorID].uAttributes &= ~uFlag;
+    }
+  }
+}
 
 //----- (00448518) --------------------------------------------------------
 void __fastcall sub_448518_npc_set_item(int npc, unsigned int item, int a3)
@@ -142,7 +156,6 @@
   }
 }
 
-
 //----- (00445D4A) --------------------------------------------------------
 void Actor::InitializeDialogue(int bPlayerSaysHello)
 {
@@ -289,7 +302,6 @@
       pPlayers[uActiveCharacter]->PlaySound(SPEECH_GoodDay, 0);
   }
 }
-
   
 //----- (0040894B) --------------------------------------------------------
 bool Actor::CanAct()
@@ -1412,7 +1424,6 @@
   }
 }
 
-
 //----- (0043ABB0) --------------------------------------------------------
 bool Actor::ArePeasantsOfSameFaction(Actor *a1, Actor *a2)
 {
@@ -1468,7 +1479,6 @@
   }
 }
 
-
 //----- (00404874) --------------------------------------------------------
 char __fastcall Actor::_404874(unsigned int uActorID, AIDirection *a2, int a3, char a4)
 {
@@ -1950,7 +1960,6 @@
   return result;
 }
 
-
 //----- (00404030) --------------------------------------------------------
 void Actor::FaceObject(unsigned int uActorID, unsigned int uObjID, int _48, AIDirection *a4)
 {
@@ -2003,8 +2012,6 @@
     AI_Stand(uActorID, uObjID, uActionLength, a4);
 }
 
-
-
 //----- (00403EB6) --------------------------------------------------------
 void Actor::AI_Stand(unsigned int uActorID, unsigned int object_to_face_pid, unsigned int uActionLength, AIDirection *a4)
 {
@@ -2029,7 +2036,6 @@
   actor->UpdateAnimation();
 }
 
-
 //----- (00403E61) --------------------------------------------------------
 void __fastcall Actor::StandAwhile(unsigned int uActorID)
 {
@@ -2148,7 +2154,6 @@
       Actor::_402AD7(v24, a2, rand() % 2, 64, arg0);
 }
 
-
 //----- (00438CF3) --------------------------------------------------------
 void Actor::ApplyFineForKillingPeasant(unsigned int uActorID)
 {
@@ -2216,7 +2221,6 @@
   }
 }
 
-
 //----- (0043AE80) --------------------------------------------------------
 void Actor::AddBloodsplatOnDamageOverlay(unsigned int uActorID, int a2, signed int a3)
 {
@@ -2326,7 +2330,6 @@
   return;
 }
 
-
 //----- (0043B3E0) --------------------------------------------------------
 int Actor::_43B3E0_CalcDamage(Actor *a1, signed int a2)
 {
@@ -2453,7 +2456,6 @@
   return result;
 }
 
-
 //----- (00403A60) --------------------------------------------------------
 void Actor::_403A60(unsigned int uActorID, signed int edx0, AIDirection *pDir)
 {
@@ -2560,7 +2562,6 @@
     Actor::_402AD7(v22, a2, v22, 64, pDir);
 }
 
-
 //----- (00403854) --------------------------------------------------------
 void Actor::_403854(unsigned int uActorID, signed int edx0, AIDirection *pDir)
 {
@@ -2667,7 +2668,6 @@
     Actor::_402AD7(v22, a2, v22, 64, pDir);
 }
 
-
 //----- (0040368B) --------------------------------------------------------
 void Actor::_40368B(unsigned int uActorID, signed int edx0, AIDirection *pDir)
 {
@@ -2759,7 +2759,6 @@
     Actor::_402AD7(v21, a2, v21, 64, pDir);
 }
 
-
 //----- (00403476) --------------------------------------------------------
 void Actor::_403476(unsigned int uActorID, signed int edx0, AIDirection *pDir)
 {
@@ -2942,7 +2941,6 @@
   v5->UpdateAnimation();
 }
 
-
 //----- (004031C1) --------------------------------------------------------
 char __fastcall Actor::_4031C1_update_job(unsigned int uActorID, signed int a2, int a3)
 {
@@ -3001,7 +2999,6 @@
   return (char)v5;
 }
 
-
 //----- (004030AD) --------------------------------------------------------
 void Actor::_4030AD(unsigned int uActorID, signed int edx0, int arg0)
 {
@@ -3105,7 +3102,6 @@
   pActor->UpdateAnimation();
 }
 
-
 //----- (00402D6E) --------------------------------------------------------
 void Actor::Die(unsigned int uActorID)
 {
@@ -3372,7 +3368,6 @@
   }
 }
 
-
 //----- (0040281C) --------------------------------------------------------
 void Actor::_40281C(unsigned int uActorID, unsigned int a2, signed int uActionLength, AIDirection *pDir, int a5)
 {
@@ -3456,7 +3451,6 @@
   v7->UpdateAnimation();
 }
 
-
 //----- (00402686) --------------------------------------------------------
 void Actor::_402686(unsigned int uActorID, unsigned int a2, signed int uActionLength, AIDirection *a4)
 {
@@ -3817,7 +3811,6 @@
   return 0;
 }
 
-
 //----- (0045976D) --------------------------------------------------------
 void Actor::UpdateAnimation()
 {
@@ -3958,14 +3951,12 @@
   }
 }
 
-
 //----- (00459667) --------------------------------------------------------
 void Actor::Remove()
 {
   this->uAIState = Removed;
 }
 
-
 //----- (0044FD29) --------------------------------------------------------
 int Actor::_44FD29(int a2)
 {
@@ -4096,4 +4087,4 @@
     v8->uSummonerID = result;
   }
   return result;
-}
\ No newline at end of file
+}
--- a/IndoorCameraD3D.cpp	Sun Mar 24 21:14:28 2013 +0200
+++ b/IndoorCameraD3D.cpp	Sun Mar 24 21:15:01 2013 +0200
@@ -7,10 +7,92 @@
 #include "OutdoorCamera.h"
 #include "Render.h"
 #include "LOD.h"
-
 #include "mm7_data.h"
 
+//----- (004361EF) --------------------------------------------------------
+IndoorCameraD3D::IndoorCameraD3D()
+{
+  IndoorCameraD3D *v1; // esi@1
+  //double v2; // st7@1
+  //double v3; // st6@1
+  //double v4; // st5@1
+  //double v5; // st7@1
+  //double v6; // st6@1
+  //double v7; // st5@1
 
+  v1 = this;
+  //IndoorCameraD3D_Vec3::IndoorCameraD3D_Vec3(&this->field_4);
+  //IndoorCameraD3D_Vec3::IndoorCameraD3D_Vec3(&v1->field_14);
+  //IndoorCameraD3D_Vec3::IndoorCameraD3D_Vec3(&v1->field_24);
+  /*_eh_vector_constructor_iterator_(v1->std__vector_000034_prolly_frustrum,
+    24,
+    6,
+    (void (__thiscall *)(void *))IndoorCameraD3D_Vec4::IndoorCameraD3D_Vec4,
+    (void (__thiscall *)(void *))IndoorCameraD3D_Vec4::dtor);*/
+  //v2 = 0;//(double)pBLVRenderParams->vPartyPos.z;
+  //v3 = 0;//(double)pBLVRenderParams->vPartyPos.y;
+  //v4 = 0;//(double)pBLVRenderParams->vPartyPos.x;
+  v1->field_108 = 0.0;
+  v1->blv_party_x = 0;
+  v1->blv_party_y = 0;
+  v1->blv_party_z = 0;
+  //v5 = 0;//(double)pBLVRenderParams->vPartyPos.z;
+  //v6 = 0;//(double)pBLVRenderParams->vPartyPos.y;
+  //v7 = 300;//(double)(pBLVRenderParams->vPartyPos.x + 300);
+  v1->field_138 = 0.0;
+  v1->blv_party_x_2 = 300;
+  v1->blv_party_y_2 = 0;
+  v1->blv_party_z_2 = 0;
+  v1->field_168 = 0.0;
+  v1->field_198 = 0.0;
+  v1->field_1C8 = 0.0;
+  v1->field_1F8 = 0.0;
+  v1->field_228 = 0.0;
+  v1->field_258 = 0.0;
+  v1->field_288 = 0.0;
+  v1->field_2B8 = 0.0;
+  v1->field_2E8 = 0.0;
+  v1->field_2BC = 0.0;
+  v1->field_2C0 = 0.0;
+  v1->field_2C4 = 0.0;
+  v1->field_318 = 0.0;
+  v1->field_2EC = 0.0;
+  v1->field_2F0 = 0.0;
+  v1->field_2F4 = 0.0;
+  v1->field_348 = 0.0;
+  v1->field_31C = 0.0;
+  v1->field_320 = 0.0;
+  v1->field_324 = 0.0;
+  v1->field_378 = 0.0;
+  v1->field_34C = 0.0;
+  v1->field_350 = 0.0;
+  v1->field_354 = 0.0;
+  for (uint i = 0; i < 16384; ++i)
+  {
+    list_0037C[i].field_0 = 0;
+    list_0037C[i].flt_30 = 0.0f;
+  }
+
+  list_0037C_size = 0;
+  for (uint i = 0; i < 256; ++i)
+    list_E0380[i].mm7__vector_000004_size = 0;
+  /*v10 = v1->list_E0380;
+  v12 = 256;
+  do
+  {
+    v10->mm7__vector_000004_size = 0;
+    //mm7__vector_constructor(
+    //  v10->mm7__vector_000004,
+    //  48,
+    //  64,
+    //  (int (__thiscall *)(int))IndoorCameraD3D_stru1::IndoorCameraD3D_stru1);
+    //++v10;
+    --v12;
+  }
+  while ( v12 );*/
+  list_E0380_size = 0;
+  //v1->vdestructor_ptr = &stru8_pvdtor;
+}
 
 //----- (004364C5) --------------------------------------------------------
 void IndoorCameraD3D::ViewTransfrom_OffsetUV(RenderVertexSoft *pVertices, unsigned int uNumVertices, RenderVertexSoft *pOutVertices, stru320 *a5)
@@ -92,8 +174,6 @@
   return !bDoNotShow || (v12 = *v10, v12 >= (signed int)0x40000u) && v12 <= (signed int)0x1F400000u;
 }
 
-
-
 //----- (00436455) --------------------------------------------------------
 bool IndoorCameraD3D::IsCulled(BLVFace *pFace)
 {
@@ -329,7 +409,6 @@
     pIndoorCamera->ViewTransform(a1a + i);
 }
 
-
 //----- (00436932) --------------------------------------------------------
 bool IndoorCameraD3D::GetFacetOrientation(char polyType, Vec3_float_ *a2, Vec3_float_ *a3, Vec3_float_ *a4)
 {
@@ -392,7 +471,6 @@
   }
 }
 
-
 //----- (00438258) --------------------------------------------------------
 bool IndoorCameraD3D::is_face_faced_to_camera(BLVFace *pFace, RenderVertexSoft *a2)
 {
@@ -414,7 +492,6 @@
   this->list_0037C_size = 0;
 }
 
-
 //----- (00438240) --------------------------------------------------------
 void IndoorCameraD3D::_438240_draw_lits()
 {
@@ -479,7 +556,6 @@
   }
 }
 
-
 //----- (00438141) --------------------------------------------------------
 void IndoorCameraD3D::_438141_draw_list_0037C()
 {
@@ -528,7 +604,6 @@
   }
 }
 
-
 //----- (00437D4A) --------------------------------------------------------
 void IndoorCameraD3D::_437D4A_draw_some_vertices(float x, float y, float z, unsigned int a5, char a6, float a7)
 {
@@ -713,7 +788,6 @@
   }
 }
 
-
 //----- (00437C96) --------------------------------------------------------
 void IndoorCameraD3D::do_draw_debug_line_d3d(const RenderVertexD3D3 *pLineBegin, unsigned int uDiffuseBegin, const RenderVertexD3D3 *pLineEnd, unsigned int uDiffuseEnd, float z_stuff)
 {
@@ -867,7 +941,6 @@
     MessageBoxW(nullptr, L"draw_debug_line() not implemented for SW rendering", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Core3D.cpp:1383", 0);
 }
 
-
 //----- (00437A55) --------------------------------------------------------
 void IndoorCameraD3D::debug_outline_d3d(const RenderVertexD3D3 *pLineVertices, unsigned int uNumLines, int uDiffuse, float z_stuff)
 {
@@ -896,7 +969,6 @@
   do_draw_debug_line_d3d(&pLineVertices[v5], uDiffuse, pLineVertices, uDiffuse, z_stuff);
 }
 
-
 //----- (004379EE) --------------------------------------------------------
 void IndoorCameraD3D::debug_outline_sw(RenderVertexSoft *a2, unsigned int uNumVertices, unsigned int uDiffuse, float a5)
 {
@@ -926,7 +998,6 @@
   do_draw_debug_line_sw(&a2[v5], uDiffuse, a2, uDiffuse, 0, a5);
 }
 
-
 //----- (00437906) --------------------------------------------------------
 void IndoorCameraD3D::PrepareAndDrawDebugOutline(BLVFace *pFace, unsigned int uDiffuse)
 {
@@ -972,7 +1043,6 @@
 }
 // 50D9D0: using guessed type char static_sub_437906_byte_50D9D0_init_flag;
 
-
 //----- (004378BA) --------------------------------------------------------
 void IndoorCameraD3D::MatrixMultiply(Matrix3x3_float_ *a1, Matrix3x3_float_ *a2, Matrix3x3_float_ *out)
 {
@@ -1010,7 +1080,6 @@
   while ( v6 );
 }
 
-
 //----- (004376E7) --------------------------------------------------------
 void IndoorCameraD3D::CreateWorldMatrixAndSomeStuff()
 {
@@ -1067,7 +1136,6 @@
   screenCenterY = (double)(pViewport->uScreenCenterY - pViewport->uScreen_TL_Y);
 }
 
-
 //----- (00437691) --------------------------------------------------------
 void IndoorCameraD3D::Vec3Transform(const IndoorCameraD3D_Vec3 *pVector, IndoorCameraD3D_Vec3 *pOut)
 {
@@ -1390,6 +1458,7 @@
   *pOutNumVertices = v5;
   return result;
 }
+
 //----- (00436F09) --------------------------------------------------------
 void IndoorCameraD3D::_436F09_mess_with_lightmap__clipflag_4(RenderVertexSoft *pInVertices, int uNumInVertices, RenderVertexSoft *pOutVertices, unsigned int *pOutNumVertices)
 {
@@ -1492,7 +1561,6 @@
   }
 }
 
-
 //----- (00436CDC) --------------------------------------------------------
 void IndoorCameraD3D::_436CDC_mess_with_lightmap__clipflag_2(RenderVertexSoft *pInVertices, int uNumInVertices, RenderVertexSoft *pOutVertices, unsigned int *pOutNumVertices)
 {
@@ -1588,7 +1656,6 @@
   }
 }
 
-
 //----- (00436BB7) --------------------------------------------------------
 void IndoorCameraD3D::Project(RenderVertexSoft *pVertices, unsigned int uNumVertices, char a4)
 {
@@ -1658,7 +1725,6 @@
   }
 }
 
-
 //----- (00436A9A) --------------------------------------------------------
 void IndoorCameraD3D::Project(signed int x, signed int y, signed int z, int *a5, int *a6)
 {
@@ -1717,7 +1783,6 @@
   return result;
 }
 
-
 //----- (00436A24) --------------------------------------------------------
 struct IDirect3DTexture2 *IndoorCameraD3D::LoadTextureAndGetHardwarePtr(char *Str1)
 {
--- a/Mouse.cpp	Sun Mar 24 21:14:28 2013 +0200
+++ b/Mouse.cpp	Sun Mar 24 21:15:01 2013 +0200
@@ -110,12 +110,20 @@
     {
       v10 = 0.0;
       v5 = 0.0;
-LABEL_12:
+//LABEL_12:
       v6 = v5;
       pAsyncMouse->SetHotspot(v6, v10);
-      goto LABEL_18;
+	  if ( !pAsyncMouse || (pAsyncMouse->LoadCursor(pName), !pAsyncMouse) )
+	  {
+		GetCursorPos(&Point);
+		SetCursorPos(Point.x, Point.y);
+	  }
+	  return;
     }
-    goto LABEL_20;
+    GetCursorPos(&Point);
+	ClientToScreen(hWnd,&Point);
+    SetCursorPos(Point.x, Point.y);
+    return;
   }
   if ( !strcmp(pName, "MICON2") )
   {
@@ -126,9 +134,16 @@
     {
       v10 = 14.0;
       v5 = 14.0;
-      goto LABEL_12;
+      v6 = v5;
+      pAsyncMouse->SetHotspot(v6, v10);
+	  if ( !pAsyncMouse || (pAsyncMouse->LoadCursor(pName), !pAsyncMouse) )
+	  {
+		GetCursorPos(&Point);
+		SetCursorPos(Point.x, Point.y);
+	  }
+	  return;
     }
-LABEL_20:
+//LABEL_20:
     GetCursorPos(&Point);
     SetCursorPos(Point.x, Point.y);
     return;
@@ -138,9 +153,12 @@
     v8 = (LONG)LoadCursorA(0, (LPCSTR)IDC_WAIT);
     SetClassLongA(hWnd, -12, v8);
   }
-LABEL_18:
+//LABEL_18:
   if ( !pAsyncMouse || (pAsyncMouse->LoadCursor(pName), !pAsyncMouse) )
-    goto LABEL_20;
+  {
+    GetCursorPos(&Point);
+    SetCursorPos(Point.x, Point.y);
+  }
 }
 // 506128: using guessed type int areWeLoadingTexture;
 
--- a/NPC.cpp	Sun Mar 24 21:14:28 2013 +0200
+++ b/NPC.cpp	Sun Mar 24 21:15:01 2013 +0200
@@ -11,7 +11,6 @@
 #include "MM7.h"
 #include "NPC.h"
 
-
 int pDialogueNPCCount;
 struct Texture *pDialogueNPCPortraits[6];
 int uNumDialogueNPCPortraits; // weak
@@ -25,6 +24,235 @@
 void  InitializeQuests();
 bool   CheckPortretAgainstSex(int portret_num, int sex); 
 
+//----- (004459F9) --------------------------------------------------------
+NPCData *__fastcall GetNPCData(signed int npcid)
+{
+  unsigned int v1; // esi@1
+  NPCData *result; // eax@5
+  int v3; // esi@9
+  int v4; // ecx@9
+  //int v5; // edx@9
+  //NPCData *v6; // eax@9
+  char *v7; // ebx@14
+  NPCData *v8; // edi@14
+  char v9; // al@22
+  char v10;
+  //std::string v10; // [sp-18h] [bp-2Ch]@4
+  int v11;
+  //const char *v11; // [sp-8h] [bp-1Ch]@4
+  int v12; // [sp-4h] [bp-18h]@4
+  int v13; 
+  char *v14;
+  //std::string *v13; // [sp+Ch] [bp-8h]@4
+  int a3; // [sp+13h] [bp-1h]@4
+  int i;
+
+  /*v1 = npcid;
+  if ( (npcid & 0x80000000u) == 0 )
+  {
+    if ( (signed int)npcid < 5000 )
+    {
+      if ( (signed int)npcid >= 501 )
+      {
+    MessageBoxW(nullptr, L"NPC id exceeds MAX_DATA!", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Events.cpp:1984", 0);
+      }
+      return &pNPCStats->pNewNPCData[v1];
+    }
+    return &pNPCStats->array_13EF4[npcid - 5000];
+  }
+  if ( (signed int)npcid >= 5000 )
+    return &pNPCStats->array_13EF4[npcid - 5000];
+  if ( (sDialogue_SpeakingActorNPC_ID & 0x80000000u) == 0 )
+  {
+    result = 0;
+  }
+  else
+  {
+    v3 = abs((int)sDialogue_SpeakingActorNPC_ID) - 1;
+    v4 = 0;
+    v5 = 0;
+    v6 = pParty->pHirelings;
+    do
+    {
+      if ( v6->pName )
+        pTmpBuf[v4++] = v5;
+      ++v6;
+      ++v5;
+    }
+    while ( (signed int)v6 < (signed int)&pParty->pPickedItem );
+    v13 = 0;
+    if ( (signed int)pNPCStats->uNumNewNPCs > 0 )
+    {
+      v7 = &pTmpBuf[v4];
+      v8 = pNPCStats->pNewNPCData;
+      do
+      {
+        if ( v8->uFlags & 0x80
+          && (!pParty->pHirelings[0].pName || strcmp(v8->pName, pParty->pHirelings[0].pName))
+          && (!pParty->pHirelings[1].pName || strcmp(v8->pName, pParty->pHirelings[1].pName)) )
+          *v7++ = (char)v13 + 2;
+        v13 = (std::string *)((char *)v13 + 1);
+        ++v8;
+      }
+      while ( (signed int)v13 < (signed int)pNPCStats->uNumNewNPCs );
+    }
+    v9 = pTmpBuf[v3];
+    if ( (unsigned __int8)v9 >= 2u )
+      result = &pNPCStats->pNPCData[(unsigned __int8)v9 + 499];
+    else
+      result = &pParty->pHirelings[(unsigned __int8)v9];
+  }
+  return result;*/
+  v1 = npcid;
+  if ( npcid >= 0 )
+  {
+    if ( npcid < 5000 )
+    {
+      if ( npcid >= 501 )
+      {
+        MessageBoxW(nullptr, L"NPC id exceeds MAX_DATA!", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Events.cpp:1984", 0);
+      }
+      return &pNPCStats->pNewNPCData[v1];// - 1];
+    }
+    return &pNPCStats->pAdditionalNPC[npcid - 5000];
+  }
+
+
+  if ( npcid >= 5000 )
+    return &pNPCStats->pAdditionalNPC[npcid - 5000];
+  if (sDialogue_SpeakingActorNPC_ID >= 0)
+  {
+    result = 0;
+  }
+  else
+  {
+    v3 = abs(sDialogue_SpeakingActorNPC_ID) - 1;
+    v4 = 0;
+
+    for (i = 0; i < 2; ++i)
+    {
+      if (pParty->pHirelings[i].pName)
+        pTmpBuf[v4++] = i;
+    }
+
+    if (pNPCStats->uNumNewNPCs > 0)
+    {
+      for (i = 0; i < pNPCStats->uNumNewNPCs; ++i)
+      {
+        if (pNPCStats->pNewNPCData[i].Hired())
+        {
+          if (!pParty->pHirelings[0].pName || strcmp((char *)pNPCStats->pNewNPCData[i].pName, (char *)pParty->pHirelings[0].pName))
+          {
+            if (!pParty->pHirelings[1].pName || strcmp((char *)pNPCStats->pNewNPCData[i].pName, (char *)pParty->pHirelings[1].pName))
+              pTmpBuf[v4++] = i + 2;
+          }
+        }
+      }
+    }
+
+    v9 = pTmpBuf[v3];
+    if ( v9 >= 2 )
+     result = &pNPCStats->pNPCData[499 + v9];
+    else
+      result = &pParty->pHirelings[v9];
+  }
+}
+
+//----- (00445B2C) --------------------------------------------------------
+NPCData *__fastcall GetNewNPCData(signed int npcid, int a2)
+{
+  signed int v2; // esi@1
+  int v3; // edi@1
+  NPCData *result; // eax@5
+  int v5; // esi@9
+  int v6; // ecx@9
+  int v7; // edx@9
+  NPCData *v8; // eax@9
+  NPCData *v9; // edi@14
+  int v10; // ecx@20
+  char v11; // al@23
+  std::string v12; // [sp-18h] [bp-34h]@4
+  const char *v13; // [sp-8h] [bp-24h]@4
+  int v14; // [sp-4h] [bp-20h]@4
+  std::string *v15; // [sp+Ch] [bp-10h]@1
+  char *v16; // [sp+10h] [bp-Ch]@14
+  int v17; // [sp+14h] [bp-8h]@13
+  int a3; // [sp+1Bh] [bp-1h]@4
+
+  v2 = npcid;
+  v3 = a2;
+  v15 = (std::string *)a2;
+  if ( npcid >= 0 )
+  {
+    if ( npcid < 5000 )
+    {
+      if ( npcid >= 501 )
+      {
+    MessageBoxW(nullptr, L"NPC id exceeds MAX_DATA!", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Events.cpp:2040", 0);
+      }
+      *(int *)v3 = v2;
+      return &pNPCStats->pNewNPCData[v2];
+    }
+LABEL_7:
+    *(int *)a2 = npcid - 5000;
+    return &pNPCStats->pAdditionalNPC[npcid - 5000];
+  }
+  if ( npcid >= 5000 )
+    goto LABEL_7;
+  if ( sDialogue_SpeakingActorNPC_ID >= 0 )
+  {
+    *(int *)a2 = 0;
+    result = 0;
+  }
+  else
+  {
+    v5 = abs((int)sDialogue_SpeakingActorNPC_ID) - 1;
+    v6 = 0;
+    v7 = 0;
+    v8 = pParty->pHirelings;
+    do
+    {
+      if ( v8->pName )
+        pTmpBuf[v6++] = v7;
+      ++v8;
+      ++v7;
+    }
+    while ( (signed int)v8 < (signed int)&pParty->pPickedItem );
+    v17 = 0;
+    if ( (signed int)pNPCStats->uNumNewNPCs > 0 )
+    {
+      v9 = pNPCStats->pNewNPCData;
+      v16 = &pTmpBuf[v6];
+      do
+      {
+        if ( v9->Hired()
+          && (!pParty->pHirelings[0].pName || strcmp(v9->pName, pParty->pHirelings[0].pName))
+          && (!pParty->pHirelings[1].pName || strcmp(v9->pName, pParty->pHirelings[1].pName)) )
+        {
+          v10 = (int)v16++;
+          *(char *)v10 = v17 + 2;
+        }
+        ++v17;
+        ++v9;
+      }
+      while ( v17 < (signed int)pNPCStats->uNumNewNPCs );
+      v3 = (int)v15;
+    }
+    v11 = pTmpBuf[v5];
+    if ( (unsigned __int8)v11 >= 2u )
+    {
+      *(int *)v3 = (unsigned __int8)v11 - 2;
+      result = &pNPCStats->pNPCData[(unsigned __int8)pTmpBuf[v5] + 499];
+    }
+    else
+    {
+      *(int *)v3 = (unsigned __int8)v11;
+      result = &pParty->pHirelings[(unsigned __int8)pTmpBuf[v5]];
+    }
+  }
+  return result;
+}
+
 //----- (00476977) --------------------------------------------------------
 void NPCStats::InitializeNPCText()
 	{
--- a/Random.cpp	Sun Mar 24 21:14:28 2013 +0200
+++ b/Random.cpp	Sun Mar 24 21:15:01 2013 +0200
@@ -7,7 +7,7 @@
 
 
 
-struct Random *pRnd; // idb
+struct Random *pRnd=new Random(); // idb
 
 
 
--- a/Render.cpp	Sun Mar 24 21:14:28 2013 +0200
+++ b/Render.cpp	Sun Mar 24 21:15:01 2013 +0200
@@ -22,19 +22,11 @@
 #include "Log.h"
 #include "TileFrameTable.h"
 #include "texts.h"
-
 #include "mm7_data.h"
 
-
 #pragma comment(lib, "lib\\legacy_dx\\lib\\ddraw.lib")
 #pragma comment(lib, "lib\\legacy_dx\\lib\\dxguid.lib")
 
-
-
-
-
-
-
 struct IDirectDrawClipper *pDDrawClipper;
 struct Render *pRenderer; // idb
 struct RenderVertexD3D3  pVertices[50];
@@ -43,7 +35,6 @@
 unsigned int uNumBillboardsToDraw;
 int uNumSpritesDrawnThisFrame; // weak
 
-
 RenderVertexSoft array_507D30[50];
 RenderVertexSoft array_508690[50];
 RenderVertexSoft array_508FF0[50];
@@ -61,15 +52,8 @@
 RenderVertexSoft pVerticesSR_801A10[384];
 RenderVertexSoft pVerticesSR_806210[384];
 
-
-
-
-
-
-
 void SetBillboardBlendOptions(RenderBillboardD3D::OpacityType a1);
 
-
 /*  384 */
 #pragma pack(push, 1)
 struct PCXHeader_1
@@ -98,29 +82,11 @@
 };
 #pragma pack(pop)
 
-
-
-
-
-
-
-
 HRESULT __stdcall D3DZBufferFormatEnumerator(DDPIXELFORMAT *Src, DDPIXELFORMAT *Dst);
 HRESULT __stdcall DDrawDisplayModesEnumerator(DDSURFACEDESC2 *pSurfaceDesc, __int16 *a2);
 HRESULT __stdcall D3DDeviceEnumerator(const GUID *lpGUID, const char *lpDeviceDesc, const char *lpDeviceName, D3DDEVICEDESC *pHWDesc, D3DDEVICEDESC *pSWDesc, struct RenderD3D_aux *a6);
 signed int __stdcall RenderD3D__DeviceEnumerator(GUID *lpGUID, const char *lpDevDesc, const char *lpDriverName, RenderD3D__DevInfo *pOut); // idb
 
-
-
-
-
-
-
-
-
-
-
-
 //----- (0049E79F) --------------------------------------------------------
 bool __cdecl CheckTextureStages()
 {
@@ -163,18 +129,6 @@
   return v0;
 }
 
-
-
-
-
-
-
-
-
-
-
-
-
 //----- (00440CB8) --------------------------------------------------------
 void Render::DrawBillboardList_BLV()
 {
@@ -224,10 +178,6 @@
   }
 }
 
-
-
-
-
 //----- (004A16A5) --------------------------------------------------------
 bool __cdecl AreRenderSurfacesOk()
 {
@@ -256,8 +206,6 @@
   return result;
 }
 
-
-
 //----- (00487389) --------------------------------------------------------
 __int16 Render::ExecOutdoorDrawSW()
 {
@@ -2476,8 +2424,6 @@
 // 4D864C: using guessed type char byte_4D864C;
 // 76D5C0: using guessed type char static_sub_0048034E_byte_76D5C0__init_flag;
 
-
-
 //----- (00481212) --------------------------------------------------------
 void Render::DrawTerrainSW(int a1, int a2, int a3)
 {
@@ -2976,7 +2922,6 @@
   }
 }
 
-
 //----- (0047BACF) --------------------------------------------------------
 void Render::TransformBillboardsAndSetPalettesODM()
 {
@@ -3056,7 +3001,6 @@
   }
 }
 
-
 //----- (0047AF11) --------------------------------------------------------
 void Render::DrawSpriteObjects_ODM()
 {
@@ -3263,7 +3207,6 @@
 // 4E94D3: using guessed type char byte_4E94D3;
 // 5187E4: using guessed type int uNumSpritesDrawnThisFrame;
 
-
 //----- (0049D9BC) --------------------------------------------------------
 signed int __stdcall RenderD3D__DeviceEnumerator(GUID *lpGUID, const char *lpDevDesc, const char *lpDriverName, RenderD3D__DevInfo *pOut)
 {
@@ -3383,7 +3326,6 @@
   return 1;
 }
 
-
 //----- (0049D784) --------------------------------------------------------
 HRESULT __stdcall D3DDeviceEnumerator(const GUID *lpGUID, const char *lpDeviceDesc, const char *lpDeviceName, D3DDEVICEDESC *pHWDesc, D3DDEVICEDESC *pSWDesc, RenderD3D_aux *a6)
 {
@@ -3461,7 +3403,6 @@
   return 1;
 }
 
-
 //----- (0049D75C) --------------------------------------------------------
 HRESULT __stdcall DDrawDisplayModesEnumerator(DDSURFACEDESC2 *pSurfaceDesc, __int16 *a2)
 {
@@ -3479,8 +3420,6 @@
   return result;
 }
 
-
-
 //----- (0047A95E) --------------------------------------------------------
 void Render::PrepareDecorationsRenderList_ODM()
 {
@@ -3803,7 +3742,6 @@
 // 4E94D0: using guessed type char byte_4E94D0;
 // 5187EC: using guessed type int uNumDecorationsDrawnThisFrame;
 
-
 //----- (0049D717) --------------------------------------------------------
 HRESULT __stdcall D3DZBufferFormatEnumerator(DDPIXELFORMAT *Src, DDPIXELFORMAT *Dst)
 {
@@ -3836,7 +3774,6 @@
   DirectDrawEnumerateA((LPDDENUMCALLBACKA)RenderD3D__DeviceEnumerator, *pOutDevices);
 }
 
-
 //----- (0049DC58) --------------------------------------------------------
 RenderD3D::RenderD3D()
 {
@@ -3978,7 +3915,6 @@
   }
 }
 
-
 //----- (0049DE14) --------------------------------------------------------
 bool RenderD3D::CreateDevice(unsigned int uDeviceID, int bWindowed, HWND hWnd)
 {
@@ -4254,7 +4190,6 @@
   return 1;
 }
 
-
 //----- (0049E444) --------------------------------------------------------
 unsigned int RenderD3D::GetDeviceCaps()
 {
@@ -4297,7 +4232,6 @@
   return result;
 }
 
-
 //----- (0049E4FC) --------------------------------------------------------
 void RenderD3D::ClearTarget(unsigned int bClearColor, unsigned int uClearColor, unsigned int bClearDepth, float z_clear)
 {
@@ -4313,7 +4247,6 @@
     pViewport->Clear2(1, rects, uClearFlags, uClearColor, z_clear, 0);
 }
 
-
 //----- (0049E54D) --------------------------------------------------------
 void RenderD3D::Present(bool bForceBlit)
 {
@@ -4339,7 +4272,6 @@
     pFrontBuffer->Flip(0, 1);
 }
 
-
 //----- (0049E5D4) --------------------------------------------------------
 bool RenderD3D::CreateTexture(unsigned int uTextureWidth, unsigned int uTextureHeight, IDirectDrawSurface4 **pOutSurface, IDirect3DTexture2 **pOutTexture, bool bAlphaChannel, bool bMipmaps, unsigned int uMinDeviceTexDim)
 {
@@ -4430,8 +4362,6 @@
   pSprites_LOD->ReleaseLostHardwareSprites();
 }
 
-
-
 //----- (004A2050) --------------------------------------------------------
 void Render::DrawPolygon(unsigned int uNumVertices, stru148 *a3, ODMFace *a4, IDirect3DTexture2 *pTexture)
 {
@@ -4693,7 +4623,6 @@
 }
 // 4D864C: using guessed type char byte_4D864C;
 
-
 //----- (0049EB79) --------------------------------------------------------
 Render::~Render()
 {
@@ -4709,8 +4638,6 @@
   //nullsub_1();
 }
 
-
-
 //----- (0049E756) --------------------------------------------------------
 bool Render::IsColorKeySupported(IDirectDraw4 *this_)
 {
@@ -4785,8 +4712,7 @@
   hd_water_current_frame = 0;
 }
 
-bool Render::Initialize(bool bWindowed, uint uDefaultDevice,
-                        bool bColoredLights, uint uDetailLevel, uint bTinting)
+bool Render::Initialize(bool bWindowed, uint uDefaultDevice, bool bColoredLights, uint uDetailLevel, uint bTinting)
 {
   bUserDirect3D = true;//ReadWindowsRegistryInt("Use D3D", 0);
   bStartInWindow = bWindowed;
@@ -4804,8 +4730,6 @@
   return r1 && r2;
 }
 
-
-
 //----- (0049EBF1) --------------------------------------------------------
 void Render::_49EBF1()
 {
@@ -4856,7 +4780,6 @@
   }
 }
 
-
 //----- (0049ECC4) --------------------------------------------------------
 void Render::ClearBlack()
 {
@@ -4869,7 +4792,6 @@
     memset(pRenderer->pTargetSurface, 0, 4 * (field_10 * field_14 / 2));
 }
 
-
 //----- (0049ED18) --------------------------------------------------------
 void Render::PresentBlackScreen()
 {
@@ -4903,7 +4825,6 @@
   pRenderer->Present();
 }
 
-
 //----- (0049EDB6) --------------------------------------------------------
 void Render::SavePCXScreenshot()
 {
@@ -5088,7 +5009,6 @@
 }
 // 4EFA80: using guessed type int dword_4EFA80;
 
-
 //----- (0049F1BC) --------------------------------------------------------
 void Render::_49F1BC(const char *a1)
 {
@@ -5283,8 +5203,6 @@
 }
 // 4EFA84: using guessed type int dword_4EFA84;
 
-
-
 //----- (0049F5A2) --------------------------------------------------------
 int Render::_49F5A2(int a2, int a3, int a4, void *Dst, int a6, int a7)
 {
@@ -5456,7 +5374,6 @@
   return result;
 }
 
-
 //----- (0049F8B5) --------------------------------------------------------
 FILE *Render::SavePCXImage(const char *Filename, char *a3, int a4, int a5)
 {
@@ -5593,7 +5510,6 @@
   return result;
 }
 
-
 //----- (0049FBCD) --------------------------------------------------------
 void Render::ClearTarget(unsigned int uColor)
 {
@@ -5606,8 +5522,6 @@
     memset32(pTargetSurface, uColor, field_10 * field_14 / 2);
 }
 
-
-
 //----- (0049FC23) --------------------------------------------------------
 void Render::Release2()
 {
@@ -5615,7 +5529,6 @@
   bWindowMode = 1;
 }
 
-
 //----- (0049FC37) --------------------------------------------------------
 void Render::Present()
 {
@@ -5694,7 +5607,6 @@
   }
 }
 
-
 //----- (0049FDBF) --------------------------------------------------------
 void Render::CreateZBuffer()
 {
@@ -5706,7 +5618,6 @@
   }
 }
 
-
 //----- (0049FE05) --------------------------------------------------------
 void Render::Release()
 {
@@ -6059,7 +5970,6 @@
 }
 // 6BE3A0: using guessed type float flt_6BE3A0;
 
-
 //----- (004A05F3) --------------------------------------------------------
 bool Render::SwitchToWindow(HWND hWnd)
 {
@@ -6292,7 +6202,6 @@
   return 0;
 }
 
-
 //----- (004A0BEE) --------------------------------------------------------
 char Render::RasterLine2D(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW, unsigned __int16 uColor)
 {
@@ -6526,16 +6435,12 @@
   return v12;
 }
 
-
-
 //----- (004A0E80) --------------------------------------------------------
 void Render::ClearZBuffer(int a2, int a3)
 {
   memset32(this->pActiveZBuffer, -65536, 0x4B000u);
 }
 
-
-
 //----- (004A0E97) --------------------------------------------------------
 void Render::SetRasterClipRect(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW)
 {
@@ -6545,7 +6450,6 @@
   this->raster_clip_w = uW;
 }
 
-
 //----- (004A0EB6) --------------------------------------------------------
 void Render::ParseTargetPixelFormat()
 {
@@ -6660,7 +6564,6 @@
   return result;
 }
 
-
 //----- (004A1032) --------------------------------------------------------
 bool Render::LockSurface_DDraw2(IDirectDrawSurface2 *pSurface, DDSURFACEDESC *pDesc, unsigned int uLockFlags)
 {
@@ -6991,7 +6894,6 @@
   return bUserDirect3D == 0;
 }
 
-
 //----- (004A16E1) --------------------------------------------------------
 void Render::UnlockBackBuffer()
 {
@@ -7001,7 +6903,6 @@
     ErrD3D(pBackBuffer2->Unlock(0));
 }
 
-
 //----- (004A172E) --------------------------------------------------------
 void Render::LockFrontBuffer(void **pOutSurface, unsigned int *pOutPixelsPerRow)
 {
@@ -7054,7 +6955,6 @@
   ErrD3D(pFront->Unlock(0));
 }
 
-
 //----- (004A1814) --------------------------------------------------------
 void Render::RestoreFrontBuffer()
 {
@@ -7067,7 +6967,6 @@
     (*v1)->Restore();
 }
 
-
 //----- (004A184C) --------------------------------------------------------
 HRESULT Render::_4A184C()
 {
@@ -7121,7 +7020,6 @@
   ErrD3D(pFront->Blt(a2, pBack, v6, v7, v8));
 }
 
-
 //----- (004A18F5) --------------------------------------------------------
 void Render::BltToFront(RECT *pDstRect, IDirectDrawSurface *pSrcSurface, RECT *pSrcRect, unsigned int uBltFlags)
 {
@@ -7238,7 +7136,6 @@
   return v7;
 }
 
-
 //----- (004A1E9D) --------------------------------------------------------
 unsigned int Render::GetBillboardDrawListSize()
 {
@@ -7312,8 +7209,6 @@
     pGame->pStru6Instance->RenderSpecialEffects();
 }
 
-
-
 //----- (004A2031) --------------------------------------------------------
 unsigned int Render::GetActorTintColor(float a2, int tint, int a4, int a5, RenderBillboard *a6)
 {
@@ -7718,7 +7613,6 @@
         pBLVRenderParams->uFlags & INDOOR_CAMERA_DRAW_D3D_OUTLINES )
       pGame->pIndoorCameraD3D->debug_outline_d3d(d3d_vertex_buffer, uNumVertices, 0x00FFFFFF, 0.0);
   }
-
 // 4A26BC: could not find valid save-restore pair for esi
 // 4D864C: using guessed type char byte_4D864C;
 
@@ -7766,6 +7660,7 @@
   pRenderer->pRenderD3D->pDevice->DrawPrimitive(D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR | D3DFVF_TEX1, pVertices, uNumVertices, D3DDP_DONOTUPDATEEXTENTS | D3DDP_DONOTLIGHT);
  }
 }
+
 //----- (004A2DA3) --------------------------------------------------------
 void Render::DrawFan(unsigned int uNumVertices, stru148 *a3, IDirect3DTexture2 *pTexture)
 {
@@ -7810,7 +7705,6 @@
   }
 }
 
-
 //----- (004A2ED5) --------------------------------------------------------
 void Render::_4A2ED5(signed int a2, stru148 *a3, IDirect3DTexture2 *pHwTex)
 {
@@ -7866,8 +7760,6 @@
   }
 }
 
-
-
 //----- (004A2FC0) --------------------------------------------------------
 void Render::DrawIndoorPolygon(unsigned int uNumVertices, BLVFace *pFace, IDirect3DTexture2 *pHwTex, Texture *pTex, int uPackedID, unsigned int uColor, int a8)
 {
@@ -8075,7 +7967,6 @@
 }
 // 4D864C: using guessed type char byte_4D864C;
 
-
 //----- (004A43B1) --------------------------------------------------------
 void Render::DrawBillboard_Indoor(RenderBillboardTransform_local0 *pSoftBillboard, Sprite *pSprite, int dimming_level)
 {
@@ -8204,8 +8095,6 @@
   }
 }
 
-
-
 //----- (004A354F) --------------------------------------------------------
 void Render::MakeParticleBillboardAndPush_BLV(RenderBillboardTransform_local0 *a2, IDirect3DTexture2 *a3, unsigned int uDiffuse, int angle)
 {
@@ -8381,7 +8270,6 @@
   }
 }
 
-
 //----- (004A3AD9) --------------------------------------------------------
 void Render::MakeParticleBillboardAndPush_ODM(RenderBillboardTransform_local0 *a2, IDirect3DTexture2 *a3, unsigned int uDiffuse, int angle)
 {
@@ -8554,7 +8442,6 @@
   }
 }
 
-
 //----- (004A4023) --------------------------------------------------------
 void Render::TransformBillboard(RenderBillboardTransform_local0 *a2, Sprite *pSprite, int dimming_level, RenderBillboard *pBillboard)
 {
@@ -8660,7 +8547,6 @@
     pBillboardRenderListD3D[v8].uOpacity = RenderBillboardD3D::Transparent;
 }
 
-
 //----- (004A48E4) --------------------------------------------------------
 int Render::MakeParticleBillboardAndPush_BLV_Software(int screenSpaceX, int screenSpaceY, int z, int lightColor, int a6)
 {
@@ -8854,7 +8740,6 @@
   ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_CULLMODE, D3DCULL_CW));
 }
 
-
 //----- (004A4CC9) --------------------------------------------------------
 void Render::_4A4CC9(stru6_stru1_indoor_sw_billboard *a1, int a2)
 {
@@ -8932,7 +8817,6 @@
   }
 }
 
-
 //----- (004A4DE1) --------------------------------------------------------
 bool Render::LoadTexture(const char *pName, unsigned int bMipMaps, IDirectDrawSurface4 **pOutSurface, IDirect3DTexture2 **pOutTexture)
 {
@@ -9186,7 +9070,6 @@
   }
 }
 
-
 //----- ( ) --------------------------------------------------------
 unsigned int Render::_4A52F1(unsigned int this_, float a3)
 {
@@ -9394,8 +9277,6 @@
   return result;
 }
 
-
-
 //----- (004A5B81) --------------------------------------------------------
 void Render::SetTextureClipRect(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW)
 {
@@ -9406,7 +9287,6 @@
   this->uClipZ = uZ;
 }
 
-
 //----- (004A5BB6) --------------------------------------------------------
 void Render::ResetTextureClipRect()
 {
@@ -9417,7 +9297,6 @@
   this->uClipZ = 640;
 }
 
-
 //----- (004A5BE3) --------------------------------------------------------
 void Render::DrawTextureRGB(unsigned int uOutX, unsigned int uOutY, RGBTexture *a4)
 {
@@ -9521,7 +9400,6 @@
   }
 }
 
-
 //----- (004A5D33) --------------------------------------------------------
 void Render::_4A5D33(unsigned int pX, unsigned int pY, int a4, int a5, RGBTexture *pTexture)
 {
@@ -9634,8 +9512,6 @@
   }
 }
 
-
-
 //----- (004A6E7E) --------------------------------------------------------
 void Render::_4A6E7E(unsigned int a2, unsigned int a3, Texture *a4)
 {
@@ -9768,7 +9644,6 @@
   }
 }
 
-
 //----- (004A6DF5) --------------------------------------------------------
 int Render::_4A6DF5(unsigned __int16 *pBitmap, unsigned int uBitmapPitch, Vec2_int_ *pBitmapXY, unsigned __int16 *pTarget, unsigned int uTargetPitch, Vec4_int_ *a7)
 {
@@ -9818,7 +9693,6 @@
   return result;
 }
 
-
 //----- (004A6D87) --------------------------------------------------------
 void Render::FillRectFast(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight, unsigned int uColor16)
 {
@@ -9836,8 +9710,6 @@
     }
 }
 
-
-
 //----- (004A6C4F) --------------------------------------------------------
 void Render::DrawText(signed int uOutX, signed int uOutY, unsigned __int8 *pFontPixels, unsigned int uCharWidth, unsigned int uCharHeight, unsigned __int16 *pFontPalette, unsigned __int16 uFaceColor, unsigned __int16 uShadowColor)
 {
@@ -9937,8 +9809,6 @@
   }
 }
 
-
-
 //----- (004A6A68) --------------------------------------------------------
 void Render::_4A6A68(unsigned int a2, unsigned int a3, Texture *a4, __int16 height)
 {
@@ -9957,8 +9827,6 @@
     DrawTextureIndexed(a2, a3, &tex);
 }
 
-
-
 //----- (004A6AB1) --------------------------------------------------------
 void Render::DrawTextPalette(int x, int y, int a4, int a5, unsigned int uFontHeight, unsigned __int16 *pPalette, int a8)
 {
@@ -10209,7 +10077,6 @@
   }
 }
 
-
 //----- (004A6776) --------------------------------------------------------
 void Render::DrawTransparentRedShade(unsigned int a2, unsigned int a3, Texture *a4)
 {
@@ -10425,7 +10292,6 @@
   }
 }
 
-
 //----- (004A63E6) --------------------------------------------------------
 void Render::_4A63E6(unsigned int a2, unsigned int a3, Texture *a4, Texture *a5, int a6, int a7, int a8)
 {
@@ -10549,7 +10415,6 @@
   }
 }
 
-
 //----- (004A6274) --------------------------------------------------------
 void Render::DrawTextureTransparent(unsigned int uX, unsigned int uY, Texture *pTexture)
 {
@@ -10658,7 +10523,6 @@
   }
 }
 
-
 //----- (004A612A) --------------------------------------------------------
 void Render::DrawMaskToZBuffer(signed int uOutX, unsigned int uOutY, Texture *pTexture, int zVal)
 {
@@ -10764,7 +10628,6 @@
   }
 }
 
-
 //----- (004A601E) --------------------------------------------------------
 void Render::_4A601E(signed int a2, signed int a3, Texture *pTexture, int a5)
 {
@@ -11104,14 +10967,12 @@
 // 6BE364: using guessed type int dword_6BE364_game_settings_1;
 // A74C88: using guessed type int dword_A74C88;
 
-
 //----- (0044EC20) --------------------------------------------------------
 bool RenderD3D::DoesRaiseExceptions()
 {
   return true;
 }
 
-
 //----- (0040DBD3) --------------------------------------------------------
 void __fastcall Render::SetPixel(Vec2_int_ *pTargetXY, unsigned __int16 uColor)
 {
@@ -11142,7 +11003,6 @@
   }
 }
 
-
 //----- (004524D8) --------------------------------------------------------
 HWLTexture *RenderHWLContainer::LoadTexture(const char *pName, int bMipMaps)
 {
@@ -11383,14 +11243,6 @@
   return true;
 }
 
-
-
-
-
-
-
-
-
 //----- (004A1C1E) --------------------------------------------------------
 void DoRenderBillboards_D3D()
 {
@@ -11459,10 +11311,6 @@
   ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DITHERENABLE, TRUE));
 }
 
-
-
-
-
 //----- (004A1DA8) --------------------------------------------------------
 void SetBillboardBlendOptions(RenderBillboardD3D::OpacityType a1)
 {
--- a/SpriteObject.cpp	Sun Mar 24 21:14:28 2013 +0200
+++ b/SpriteObject.cpp	Sun Mar 24 21:15:01 2013 +0200
@@ -14,17 +14,31 @@
 #include "LOD.h"
 #include "Actor.h"
 #include "Events.h"
-
 #include "mm7_data.h"
 
-
-
-
 size_t uNumSpriteObjects;
 SpriteObject pSpriteObjects[1000];
 
-
-
+//----- (00404828) --------------------------------------------------------
+SpriteObject::SpriteObject()
+{
+  field_22_glow_radius_multiplier = 1;
+  uSoundID = 0;
+  uFacing = 0;
+  vVelocity.z = 0;
+  vVelocity.y = 0;
+  vVelocity.x = 0;
+  uType = 0;
+  uObjectDescID = 0;
+  field_61 = 0;
+  field_60_distance_related_prolly_lod = 0;
+  field_20 = 0;
+  uSpriteFrameID = 0;
+  field_50 = 0;
+  field_4C = 0;
+  field_48 = 0;
+  field_54 = 0;
+}
 
 //----- (0042F5ED) --------------------------------------------------------
 int SpriteObject::Create(int yaw, int pitch, int a4, int a5)
@@ -165,8 +179,6 @@
   return v6;
 }
 
-
-
 //----- (00471C03) --------------------------------------------------------
 void SpriteObject::UpdateObject_fn0_ODM(unsigned int uLayingItemID)
 {
@@ -589,8 +601,6 @@
   }
 }
 
-
-
 //----- (0047136C) --------------------------------------------------------
 void SpriteObject::UpdateObject_fn0_BLV(unsigned int uLayingItemID)
 {
@@ -975,9 +985,6 @@
 }
 // 46DF1A: using guessed type int __fastcall 46DF1A_collide_against_actor(int, int);
 
-
-
-
 //----- (00438E35) --------------------------------------------------------
 void SpriteObject::_438E35()
 {
@@ -1070,8 +1077,6 @@
   }
 }
 
-
-
 //----- (0042F933) --------------------------------------------------------
 void SpriteObject::OnInteraction(unsigned int uLayingItemID)
 {
--- a/UIHouses.cpp	Sun Mar 24 21:14:28 2013 +0200
+++ b/UIHouses.cpp	Sun Mar 24 21:15:01 2013 +0200
@@ -1,5 +1,4 @@
 #include "UIHouses.h"
-
 #include "Party.h"
 #include "Player.h"
 #include "texts.h"
@@ -24,11 +23,9 @@
 #include "IndoorCamera.h"
 #include "MapInfo.h"
 #include "Log.h"
-
 #include "MM7.h"
 #include "mm7_data.h"
 
-
 int uHouse_ExitPic; // weak
 
 int dword_591080; // weak
@@ -36,7 +33,6 @@
 int in_current_building_type; // 00F8B198
 HOUSE_DIALOGUE_MENU dialog_menu_id; // 00F8B19C
 
-
 #pragma pack(push, 1)
 struct stru365_travel_info
 {
--- a/mm7_1.cpp	Sun Mar 24 21:14:28 2013 +0200
+++ b/mm7_1.cpp	Sun Mar 24 21:15:01 2013 +0200
@@ -8,7 +8,6 @@
 #include <assert.h>
 
 #include "MM7.h"
-
 #include "MapInfo.h"
 #include "Game.h"
 #include "GUIWindow.h"
@@ -52,24 +51,13 @@
 #include "texts.h"
 #include "stru351.h"
 #include "UIHouses.h"
-
 #include "mm7_data.h"
 
-
-
-
 int __stdcall aWinProc(HWND hWnd, UINT Msg, WPARAM wParam, unsigned int lParam);
 int __stdcall InsertMM7CDDialogFunc(HWND hDlg, int a2, __int16 a3, int a4);
 bool __fastcall FindMM7CD(HWND hWnd, char *pCDDrive);
 bool __fastcall Initialize(HINSTANCE hInst, char *pCmdLine);
 
-
-
-
-
-
-
-
 //----- (004453C0) mm6-----------------------------------------------------
 //----- (004A1760) mm6_chinese---------------------------------------------
 int fixpoint_mul(int a1, int a2)
@@ -113,8 +101,6 @@
 // 506988: using guessed type int dword_506988;
 // 50698C: using guessed type int dword_50698C;
 // 507CC0: using guessed type int dword_507CC0;
-
-
 // 50651C: using guessed type int dword_50651C;
 // 506520: using guessed type int dword_506520;
 // 506524: using guessed type int dword_506524;
@@ -123,14 +109,8 @@
 // 506548: using guessed type int dword_506548;
 // 723E80: using guessed type int dword_723E80_award_related[];
 // 723E84: using guessed type int dword_723E84[];
-
-
-
 // 5075E0: using guessed type int pVisibleWindowsIdxs[20];
 
-
-
-
 //----- (0041CD4F) --------------------------------------------------------
 bool __thiscall sub_41CD4F(unsigned int _this)
 {
@@ -480,12 +460,6 @@
   return a1->DrawText(a2, 32, uY, 0, pTmpBuf, 0, 0, 0);
 }
 
-
-
-
-
-
-
 //----- (0041F54A) --------------------------------------------------------
 void __cdecl LoadActualSkyFrame()
 {
@@ -544,9 +518,6 @@
   viewparams->bRedrawGameUI = 1;
 }
 
-
-
-
 //----- (0042038D) --------------------------------------------------------
 void __cdecl sub_42038D()
 {
@@ -574,7 +545,6 @@
   }
 }
 
-
 //----- (00420C05) --------------------------------------------------------
 void __fastcall party_finds_gold(unsigned int uNumGold, int _1_dont_share_with_followers___2_the_same_but_without_a_message__else_normal)
 {
@@ -731,8 +701,6 @@
   }
 }
 
-
-
 //----- (004219BE) --------------------------------------------------------
 GUIWindow *stru277::sub_4219BE()
 {
@@ -770,7 +738,6 @@
   return v2;
 }
 
-
 //----- (00421B2C) --------------------------------------------------------
 bool __cdecl sub_421B2C_PlaceInInventory_or_DropPickedItem()
 {
@@ -866,7 +833,6 @@
   return 1;
 }
 
-
 //----- (00421D00) --------------------------------------------------------
 void __fastcall GameUI_OnPlayerPortraitLeftClick(unsigned int uPlayerID)
 {
@@ -1635,8 +1601,6 @@
   uGameUIFontShadow = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(v5, v4, v6);
 }
 
-
-
 //----- (00423AEE) --------------------------------------------------------
 void __cdecl reset_some_strus_flt_2Cs()
 {
@@ -2458,7 +2422,6 @@
   return result;*/
 }
 
-
 //----- (00424829) --------------------------------------------------------
 bool sub_424829(int a1, BspRenderer_stru2 *a2, BspRenderer_stru2 *a3, int a4)
 {
--- a/mm7_2.cpp	Sun Mar 24 21:14:28 2013 +0200
+++ b/mm7_2.cpp	Sun Mar 24 21:15:01 2013 +0200
@@ -53,12 +53,9 @@
 #include "Log.h"
 #include "UIHouses.h"
 #include "texts.h"
-
 #include "mm7_data.h"
 #include "MM7.h"
 
-
-
 //----- (004BB756) --------------------------------------------------------
 signed int __fastcall sub_4BB756(signed int a1)
 {
@@ -744,10 +741,6 @@
   pAudioPlayer->PlaySound((SoundID)14060, 0, 0, -1, 0, 0, 0, 0);
 }
 
-
-
-
-
 //----- (004BC8D5) --------------------------------------------------------
 void SpellBookGenerator()
 	{
@@ -810,7 +803,6 @@
   return;
 }
 
-
 //----- (004BCA33) --------------------------------------------------------
 void UI_CreateEndConversationButton()
 {
@@ -822,7 +814,6 @@
   pDialogueWindow->CreateButton(8, 8, 450, 320, 1, 0, 0x51u, 0, 0, "", 0);
 }
 
-
 //----- (004BD8B5) --------------------------------------------------------
 signed int __cdecl sub_4BD8B5()
 {
@@ -921,10 +912,6 @@
   return 0;
 }
 
-
-
-
-
 //----- (004BDB56) --------------------------------------------------------
 void __cdecl UIShop_Buy_Identify_Repair()
 {
@@ -1399,8 +1386,6 @@
   }
 }
 
-
-
 //----- (004BE386) --------------------------------------------------------
 void __fastcall log_error(const char *pMessage)
 {
@@ -1419,9 +1404,6 @@
   }
 }
 
-
-
-
 //----- (004BF91E) --------------------------------------------------------
 unsigned int __thiscall GameOverMenu(void *ecx0)
 {
@@ -1621,12 +1603,6 @@
   return result;
 }
 
-
-
-
-
-
-
 //----- (004D6FB0) --------------------------------------------------------
 int /*__usercall*/ sr_sub_4D6FB0/*<eax>*/(stru315 *a1/*<ebp>*/)
 {
@@ -2393,9 +2369,6 @@
   }
 }
 
-
-
-
 //----- (00451007) --------------------------------------------------------
 int stru350::sub_451007_scale_image_bicubic(unsigned short *pSrc, int srcWidth, int srcHeight, int srcPitch,
                                             unsigned short *pDst, int dstWidth, int dstHeight, int dstPitch,
@@ -3644,12 +3617,6 @@
   }
 }
 
-
-
-
-
-
-
 //----- (0044E1EC) --------------------------------------------------------
 int TextureFrameTable::FromFileTxt(const char *Args)
 {
@@ -3768,13 +3735,6 @@
   return 1;
 }
 
-
-
-
-
-
-
-
 //----- (0044F57C) --------------------------------------------------------
 void SpawnEncounter(MapInfo *pMapInfo, SpawnPointMM7 *spawn, int a3, int a4, int a5)
 {
@@ -4056,9 +4016,6 @@
     //while ( (signed int)v53 < v56 );
 }
 
-
-
-
 //----- (0044FA4C) --------------------------------------------------------
 signed int __fastcall sub_44FA4C_spawn_light_elemental(int a1, int a2, int a3)
 {
@@ -4181,7 +4138,6 @@
   return result;
 }
 
-
 //----- (0044FFD8) --------------------------------------------------------
 int MapInfo::SpawnRandomTreasure(SpawnPointMM7 *a2)
 {
@@ -4357,7 +4313,6 @@
   return a1a.Create(0, 0, 0, 0);
 }
 
-
 //----- (00450521) --------------------------------------------------------
 signed int __fastcall sub_450521_ProllyDropItemAt(int ecx0, signed int a2, int a3, int a4, int a5, unsigned __int16 a6)
 {
@@ -4403,9 +4358,6 @@
   return a1.Create(0, 0, 0, 0);
 }
 
-
-
-
 //----- (0045063B) --------------------------------------------------------
 int __fastcall sub_45063B(MapInfo *a1, int a2)
 {
@@ -4559,8 +4511,6 @@
   return result;
 }
 
-
-
 //----- (00450929) --------------------------------------------------------
 int LevelDecoration::GetGlobalEvent()
 {
@@ -4764,7 +4714,6 @@
 }
 // 5C6DF8: using guessed type int dword_5C6DF8;
 
-
 //----- (00450DA3) --------------------------------------------------------
 int __cdecl GetAlertStatus()
 {
@@ -4777,8 +4726,6 @@
   return result;
 }
 
-
-
 //----- (00450DDE) --------------------------------------------------------
 stru350 *stru350::_450DDE()
 {
@@ -4786,7 +4733,6 @@
   return this;
 }
 
-
 //----- (00450DF1) --------------------------------------------------------
 bool stru350::_450DF1(const stru355 *p1, const stru355 *p2)
 {
@@ -4987,9 +4933,6 @@
   return true;
 }
 
-
-
-
 //----- (00450F55) --------------------------------------------------------
 unsigned int stru350::_450F55(int a2)
 {
@@ -5014,7 +4957,6 @@
   return v2 | ((a2 & field_0.field_10) << field_48) | ((a2 & field_0.field_14) << field_50) | ((a2 & field_0.field_18) << field_58);
 }
 
-
 //----- (00452442) --------------------------------------------------------
 unsigned int __fastcall sub_452442(unsigned __int16 a1, unsigned __int16 a2, int a3, int a4)
 {
@@ -5048,8 +4990,6 @@
                                                                     + (__PAIR__(v10, (unsigned __int16)a4 >> 2) & 0x1C00));
 }
 
-
-
 //----- (0045281E) --------------------------------------------------------
 //    Calculates atan2(y/x)
 // return value: angle in integer format (multiplier of Pi/1024)  
@@ -5160,9 +5100,6 @@
   return 0;
 }
 
-
-
-
 //----- (00452969) --------------------------------------------------------
 stru193_math::stru193_math()
 {
@@ -5324,11 +5261,6 @@
   return result;
 }
 
-
-
-
-
-
 //----- (00453F62) --------------------------------------------------------
 void MapStats::Initialize()
 {
@@ -5657,11 +5589,6 @@
 }
 // 453F62: using guessed type char Str[32];
 
-
-
-
-
-
 //----- (004547A3) --------------------------------------------------------
 MAP_TYPE MapStats::GetMapInfo(const char *Str2)
 {
@@ -5729,11 +5656,6 @@
   }
 }
 
-
-
-
-
-
 //----- (00458244) --------------------------------------------------------
 unsigned int __fastcall SkillToMastery(unsigned __int16 a1)
 {
@@ -5759,7 +5681,6 @@
   return result;
 }
 
-
 //----- (0045828B) --------------------------------------------------------
 unsigned int __fastcall GetSpellColor(signed int a1)
 {
@@ -5876,7 +5797,6 @@
   return GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(v2, v1, v4);
 }
 
-
 //----- (004583B0) --------------------------------------------------------
 LevelDecoration::LevelDecoration()
 {
@@ -5891,14 +5811,6 @@
   this->uCog = 0;
 }
 
-
-
-
-
-
-
-
-
 //----- (00458600) --------------------------------------------------------
 void DecorationList::ToFile()
 {
@@ -6129,10 +6041,6 @@
   return 1;
 }
 
-
-
-
-
 //----- (00459064) --------------------------------------------------------
 void ObjectList::InitializeSprites()
 {
@@ -6347,7 +6255,6 @@
   return 1;
 }
 
-
 //----- (0045E03A) --------------------------------------------------------
 unsigned __int16 *__fastcall MakeScreenshot(signed int width, signed int height)
 {
@@ -6530,10 +6437,6 @@
   free(v2);
 }
 
-
-
-
-
 //----- (00460706) --------------------------------------------------------
 void TryLoadLevelFromLOD()
 {
@@ -6590,10 +6493,6 @@
   return false;
 }
 
-
-
-
-
 //----- (0046086A) --------------------------------------------------------
 void Autosave()
 {
@@ -6653,7 +6552,6 @@
   pAllocator->FreeChunk(pSave);
 }
 
-
 //----- (004610AA) --------------------------------------------------------
 void __fastcall PrepareToLoadODM(unsigned int bLoading, OutdoorCamera *a2)
 {
@@ -6847,8 +6745,6 @@
     pMouse->SetCursorBitmapFromItemID(pParty->pPickedItem.uItemID);
 }
 
-
-
 //----- (004613C4) --------------------------------------------------------
 int __cdecl sub_4613C4()
 {
@@ -6883,18 +6779,6 @@
 }
 // 6836C8: using guessed type int 6836C8_num_decorations_6807E8;
 
-
-
-
-
-
-
-
-
-
-
-
-
 //----- (004621DA) --------------------------------------------------------
 int __fastcall int_get_vector_length(signed int a1, signed int a2, signed int a3)
 {
@@ -6925,11 +6809,6 @@
   return (11 * a2 >> 5) + a1 + (v4 >> 2);
 }
 
-
-
-
-
-
 OPENFILENAMEA ofn;
 //----- (0046271C) --------------------------------------------------------
 void __cdecl crt_init_globals_46271C()
@@ -7790,8 +7669,6 @@
     pWindowList[pVisibleWindowsIdxs[v0--] - 1].Release();
 }
 
-
-
 //----- (004646F0) --------------------------------------------------------
 void PrepareWorld(unsigned int this_)
 {
@@ -7858,8 +7735,6 @@
   day_fogrange_2 = 5000;
 }
 
-
-
 //----- (00464866) --------------------------------------------------------
 void __fastcall DoPrepareWorld(unsigned int bLoading, int a2)
 {
@@ -7925,7 +7800,6 @@
   _flushall();
 }
 
-
 //----- (004649EF) --------------------------------------------------------
 int __fastcall ReadWindowsRegistryInt(const char *pKey, int uDefValue)
 {
@@ -8291,9 +8165,6 @@
   }
 }
 
-
-
-
 //----- (004651F4) --------------------------------------------------------
 bool MM7_Initialize()
 {
@@ -8829,9 +8700,6 @@
   return true;
 }
 
-
-
-
 //----- (00465D0B) --------------------------------------------------------
 void __cdecl SecondaryInitialization()
 {
@@ -8935,11 +8803,6 @@
   dword_576E28 = 9;
 }
 
-
-
-
-
-
 void IntegrityTest()
 {
   assert(sizeof(RenderVertexSoft) == 0x30);
@@ -9283,10 +9146,6 @@
   return 1;
 }
 
-
-
-
-
 //----- (004637E0) --------------------------------------------------------
 char __cdecl sub_4637E0_is_there_popup_onscreen()
 {
@@ -9294,8 +9153,6 @@
 }
 // 507BF0: using guessed type int dword_507BF0_is_there_popup_onscreen;
 
-
-
 //----- (00465F5A) --------------------------------------------------------
 void __cdecl CreateAsyncMouse()
 {
@@ -9508,7 +9365,6 @@
     pOutdoorCamera->_485F64();
 }
 
-
 //----- (00466B8C) --------------------------------------------------------
 int __cdecl AbortWithError()
 {
@@ -9582,10 +9438,6 @@
   return uCurrentMenuID;
 }
 
-
-
-
-
 /*
     v17 = 0;
     if ( v4 > -2005532222 )
@@ -10088,16 +9940,12 @@
         }
       }*/
 
-
-
 //----- (00467D5D) --------------------------------------------------------
 int __thiscall sub_467D5D(int _this)
 {
   return *(int *)(_this + 7204);
 }
 
-
-
 //----- (00467E7F) --------------------------------------------------------
 void __thiscall sub_467E7F_EquipBody(unsigned int uEquipType)
 {
@@ -10219,9 +10067,6 @@
            0);
 }
 
-
-
-
 //----- (00468F8A) --------------------------------------------------------
 void __cdecl OnPaperdollLeftClick()
 {
@@ -10752,9 +10597,6 @@
   }
 }
 
-
-
-
 //----- (0046A0A1) --------------------------------------------------------
 int __thiscall UnprojectX(int x)
 {
@@ -11537,7 +11379,6 @@
   return v19;
 }
 
-
 //----- (0046BDA8) --------------------------------------------------------
 unsigned int __cdecl GetGravityStrength()
 {
@@ -11566,8 +11407,6 @@
   }
 }
 
-
-
 //----- (0046BDF1) --------------------------------------------------------
 void __cdecl BLV_UpdateUserInputAndOther()
 {
@@ -11614,9 +11453,6 @@
   check_event_triggers();
 }
 
-
-
-
 //----- (0046BEF1) --------------------------------------------------------
 void SpriteObject::_46BEF1_apply_spells()
 {
@@ -11658,7 +11494,6 @@
   }
 }
 
-
 //----- (0046BFFA) --------------------------------------------------------
 bool __fastcall _46BFFA_check_object_intercept(unsigned int uLayingItemID, signed int a2)
 {
@@ -12691,4 +12526,3 @@
   pAudioPlayer->PlaySound((SoundID)v125, v126, v127, v128, v129, v130, v131, v133);
   return 0;
 }
-
--- a/mm7_3.cpp	Sun Mar 24 21:14:28 2013 +0200
+++ b/mm7_3.cpp	Sun Mar 24 21:15:01 2013 +0200
@@ -43,16 +43,8 @@
 #include "stru298.h"
 #include "texts.h"
 #include "Log.h"
-
 #include "mm7_data.h"
 
-
-
-
-
-
-
-
 //----- (0046E44E) --------------------------------------------------------
 int __thiscall _46E44E_collide_against_faces_and_portals(unsigned int b1)
 {
@@ -492,7 +484,6 @@
   return result;
 }
 
-
 //----- (0046ED1B) --------------------------------------------------------
 int collide_against_floor(int x, int y, int z, unsigned int *pSectorID, unsigned int *pFaceID)
 {
@@ -760,7 +751,6 @@
   return result;
 }
 
-
 //----- (0047050A) --------------------------------------------------------
 int stru141::_47050A(int a2)
 {
@@ -1358,9 +1348,6 @@
   while ( (signed int)v75 < (signed int)uNumActors );
 }
 
-
-
-
 //----- (0047253E) --------------------------------------------------------
 void UpdateObjects()
 {
@@ -2166,7 +2153,6 @@
     EventProcessor(uFaceEvent, 0, 1);
 }
 
-
 //----- (00473893) --------------------------------------------------------
 void __cdecl ODM_ProcessPartyActions()
 {
@@ -3431,8 +3417,6 @@
   return 1;
 }
 
-
-
 //----- (00475665) --------------------------------------------------------
 signed int __thiscall sub_475665(BLVFace *_this, int a2, __int16 a3)
 {
@@ -3836,10 +3820,6 @@
   return 1;
 }
 
-
-
-
-
 //----- (004760D5) --------------------------------------------------------
 PartyAction ActionQueue::Next()
 {
@@ -3853,10 +3833,6 @@
 
   return result;
 }
-
-
-
-
 // 47730C: using guessed type int __stdcall const_1(int);
 
 //----- (0047752B) --------------------------------------------------------
@@ -3882,10 +3858,6 @@
   return v1 + v0->uReputation;
 }
 
-
-
-
-
 //----- (004775ED) --------------------------------------------------------
 int stru6_stru1_indoor_sw_billboard::_4775ED(float a2)
 {
@@ -4491,8 +4463,6 @@
   return v16;
 }
 
-
-
 //----- (004783FA) --------------------------------------------------------
 void __cdecl sub_4783FA_construct_global_73D150()
 {
@@ -4510,8 +4480,6 @@
   while ( v1 );
 }
 
-
-
 //----- (0047840D) --------------------------------------------------------
 char Render::DrawBuildingsD3D()
 {
@@ -5407,9 +5375,6 @@
   return false;
 }
 
-
-
-
 //----- (00479295) --------------------------------------------------------
 int stru148::_479295()
 {
@@ -5551,8 +5516,6 @@
   return result;
 }
 
-
-
 unsigned short *LoadTgaTexture(const wchar_t *filename, int *out_width = nullptr, int *out_height = nullptr)
 {
   #pragma pack(push, 1)
@@ -5632,8 +5595,10 @@
               *skybox_yn, *skybox_yp,
               *skybox_zn, *skybox_zp;
 int            skybox_width, skybox_height;
+
 IDirect3DTexture2   *skybox_texture;
 IDirectDrawSurface4 *skybox_surface;
+
 bool Skybox_Initialize(const wchar_t *skybox_name)
 {
   wchar_t xn_filename[1024], xp_filename[1024],
@@ -5714,15 +5679,16 @@
   return true;
 }
 
-
 struct vector
 {
   float x, y, z;
 };
+
 struct matrix
 {
   float m[4][4];
 };
+
 void VectorNormalize(vector *v)
 {
   float invmag = 1.0f / sqrtf(v->x * v->x + v->y * v->y + v->z * v->z);
@@ -5730,6 +5696,7 @@
   v->y *= invmag;
   v->z *= invmag;
 }
+
 void MatrixRotationAxis(matrix *pout, CONST vector *pv, float angle)
 {
   memset(pout, 0, sizeof(matrix));
@@ -5752,6 +5719,7 @@
    pout->m[1][2] = (1.0f - cos(angle)) * v.z * v.y + sin(angle) * v.x;
     pout->m[2][2] = (1.0f - cos(angle)) * v.z * v.z + cos(angle);
 }
+
 void VectorTransform(const matrix *m, const vector *v, vector *out)
 {
   out->x = m->m[0][0] * v->x + m->m[1][0] * v->y + m->m[2][0] * v->z + m->m[3][0];
@@ -5759,7 +5727,6 @@
   out->z = m->m[0][2] * v->x + m->m[1][2] * v->y + m->m[2][2] * v->z + m->m[3][2];
 }
 
-
 bool DrawSkyD3D_Skybox()
 {
   static bool initialized = false,
@@ -6745,8 +6712,6 @@
   MM7Initialization();
 }
 
-
-
 //----- (0047A825) --------------------------------------------------------
 bool LevelDecoration::_47A825()
 {
@@ -6785,8 +6750,6 @@
   return v1;
 }
 
-
-
 //----- (0047BC6F) --------------------------------------------------------
 unsigned __int16 *__fastcall GetBillboardPalette(RenderBillboard *a1, int a2, signed int a3, int a4)
 {
@@ -6889,13 +6852,6 @@
 // 6BE040: using guessed type int day_fogrange_1;
 // 6BE044: using guessed type int day_fogrange_2;
 
-
-
-
-
-
-
-
 //----- (0047BEB1) --------------------------------------------------------
 int __fastcall sr_sub_47BEB1(signed int a1, stru148 *a2, int terrain_gamma, int a4, int *a5, int *a6, int a7, int a8)
 {
@@ -7207,10 +7163,8 @@
   }
   return result;
 }
-
 // 4D864C: using guessed type char byte_4D864C;
 
-
 //----- (0047C370) --------------------------------------------------------
 unsigned int __cdecl GetLevelFogColor()
 {
@@ -7311,7 +7265,6 @@
   return (-1 - v7) << 24;
 }
 
-
 //----- (0047C4FC) --------------------------------------------------------
 signed int __fastcall GetActorTintColor(int max_dimm, int min_dimm, float distance, int a4, RenderBillboard *a5)
 {
@@ -7452,9 +7405,6 @@
 }
 // 6BE3C4: using guessed type char bUnderwater;
 
-
-
-
 //----- (0047F44B) --------------------------------------------------------
 unsigned int __stdcall WorldPosToGridCellX(signed int sWorldPosX)
 {
@@ -7531,9 +7481,6 @@
   //while ( (signed int)v4 < (signed int)arary_77E5C8 );
 }
 
-
-
-
 //----- (004811A3) --------------------------------------------------------
 void stru148::_4811A3()
 {
@@ -7548,8 +7495,6 @@
   pRenderer->DrawTerrainPolygon(uNumVertices, this, pBitmaps_LOD->pHardwareTextures[uTileBitmapID], 1, 1);
 }
 
-
-
 //----- (00481DB2) --------------------------------------------------------
 char __fastcall sr_sub_481DB2(RenderVertexSoft *a1, signed int a2, stru148 *a3)
 {
@@ -7588,8 +7533,6 @@
 // 50B570: using guessed type int dword_50B570[];
 // 50B638: using guessed type int dword_50B638[];
 
-
-
 //----- (00481E55) --------------------------------------------------------
 void OutdoorCamera::Project(unsigned int uNumVertices)
 {
@@ -7720,8 +7663,6 @@
     return false;
 }
 
-
-
 //----- (004823F4) --------------------------------------------------------
 bool IsTerrainSlopeTooHigh(int pos_x, int pos_z)
 {
@@ -7814,7 +7755,6 @@
   return y3 - v10 > 512;*/
 }
 
-
 //----- (0048257A) --------------------------------------------------------
 int __fastcall GetTerrainHeightsAroundParty2(int a1, int a2, int *a3, int a4)
 {
@@ -7886,7 +7826,6 @@
   return result;
 }
 
-
 //----- (0048276F) --------------------------------------------------------
 void stru148::_48276F_sr()
 {
@@ -8070,7 +8009,6 @@
   return 1;
 }
 
-
 //----- (00482A94) --------------------------------------------------------
 int sr_sub_482A94(Span *_this)
 {
@@ -8703,7 +8641,6 @@
   return 0;
 }
 
-
 //----- (004839BD) --------------------------------------------------------
 signed int __fastcall sr_sub_4839BD(Span *ecx0, unsigned __int16 *pTargetSurface)
 {
@@ -9018,8 +8955,6 @@
 // 6BE0E8: using guessed type int mipmapping_building_mm2;
 // 6BE0EC: using guessed type int mipmapping_building_mm3;
 
-
-
 //----- (0048408A) --------------------------------------------------------
 signed int sr_sub_48408A_prolly_odm_water_no_waves(Span *_this)
 {
@@ -9199,8 +9134,6 @@
   return 1;
 }
 
-
-
 //----- (00484442) --------------------------------------------------------
 signed int sr_sub_484442(Span *_this)
 {
@@ -9365,7 +9298,6 @@
   return 1;
 }
 
-
 //----- (004847EB) --------------------------------------------------------
 int sr_sub_4847EB(Span *_this)
 {
@@ -9740,8 +9672,6 @@
 // 80AA1C: using guessed type int dword_80AA1C;
 // 80AA20: using guessed type int dword_80AA20;
 
-
-
 //----- (00485407) --------------------------------------------------------
 signed int __fastcall sr_sub_485407_prolly_odm_water_wavy(Span *a1)
 {
@@ -9947,7 +9877,6 @@
   return 1;
 }
 
-
 //----- (0048585C) --------------------------------------------------------
 signed int __fastcall sr_sub_48585C_mb_DrawSpan(Span *a1, unsigned __int16 *pRenderTarget, int a4)
 {
@@ -10499,8 +10428,6 @@
     v->y = 0;
 }
 
-
-
 //----- (00485F64) --------------------------------------------------------
 void OutdoorCamera::_485F64()
 {
@@ -10535,7 +10462,6 @@
   camera_rotation_x_int_cosine = stru_5C6E00->Cos(pIndoorCamera->sRotationX);
 }
 
-
 //----- (0048607B) --------------------------------------------------------
 void stru148::_48607B(stru149 *a2)
 {
@@ -10836,7 +10762,6 @@
   return result;
 }
 
-
 //----- (00486A28) --------------------------------------------------------
 void OutdoorCamera::AllocSoftwareDrawBuffers()
 {
@@ -11085,8 +11010,6 @@
   return v7;
 }
 
-
-
 //----- (0043F953) --------------------------------------------------------
 void PrepareBspRenderList_BLV()
 {
@@ -11301,7 +11224,6 @@
         }
 }
 
-
 //----- (0044028F) --------------------------------------------------------
 void PrepareItemsRenderList_BLV()
 {
@@ -11465,8 +11387,6 @@
   }
 }
 
-
-
 //----- (00440639) --------------------------------------------------------
 void AddBspNodeToRenderList(unsigned int node_id)
 {
@@ -11615,8 +11535,6 @@
 }
 // 4E28F8: using guessed type int pCurrentScreen;
 
-
-
 //----- (00441A4E) --------------------------------------------------------
 __int16 __fastcall sub_441A4E(int a1)
 {
@@ -11692,11 +11610,6 @@
   return result;
 }
 
-
-
-
-
-
 //----- (00443801) --------------------------------------------------------
 void Initialize2DA()
 {
@@ -11925,7 +11838,6 @@
 
 }
 
-
 //----- (00443E31) --------------------------------------------------------
 void LoadLevel_InitializeLevelStr()
     {
@@ -11973,7 +11885,6 @@
   }
 }
 
-
 //----- (00443F95) --------------------------------------------------------
 void __cdecl OnMapLeave()
 {
@@ -11993,10 +11904,9 @@
   }
 }
 
-
 //----- (00443FDC) --------------------------------------------------------
 void OnMapLoad()
-	{
+{
 	stru176 *v3; // esi@7
 	__int16 v4; // cx@9
 	__int16 v5; // di@9
@@ -12027,23 +11937,23 @@
 	__int16 v33; // [sp+4Eh] [bp-2h]@9
 
 	for (uint i = 0; i < uLevelEVT_NumEvents; ++i)
-		{
+	{
 		auto pEvent = pLevelEVT_Index[i];
 
 		auto _evt = (_evt_raw *)(pLevelEVT + pEvent.uEventOffsetInEVT);
 
 		if (_evt->_e_type == EVENT_PlaySound)
-			{
+		{
 			pSoundList->LoadSound(EVT_DWORD(_evt->v5), 0);
-			}
+		}
 		else if (_evt->_e_type == EVENT_OnMapReload)
-			{
+		{
 			start_event_seq_number = pEvent.event_sequence_num;
 			EventProcessor(pEvent.uEventID, 0, 0);
 			start_event_seq_number = 0;
-			}
+		}
 		else if (_evt->_e_type == EVENT_OnTimer || _evt->_e_type == EVENT_OnLongTimer)
-			{
+		{
 			v3 = &array_5B5928_timers[dword_5B65C8_timers_count];
 			v20 = pOutdoor->uLastVisitDay;
 			if (uCurrentlyLoadedLevelType == LEVEL_Indoor)
@@ -12066,7 +11976,7 @@
 			v3->field_C = ((unsigned short)_evt->v12 << 8) + _evt->v11;
 			v3->field_E = ((unsigned short)_evt->v12 << 8) + _evt->v11;
 			if (v3->timer_evt_type  == EVENT_OnLongTimer && !(short)v6 )
-				{
+			{
 				if ( v20 )
 					v18 = pParty->uTimePlayed - v20;
 				else
@@ -12074,25 +11984,25 @@
 				v26 = (signed int)(signed __int64)((double)(signed __int64)v18 * 0.234375) / 60 / 60 / 24;
 
 				if ( v26 / 7 / 4 / 12 )
-					{
+				{
 					if ( v3->field_10 )
-						{
+					{
 						++dword_5B65C8_timers_count;
 						v3->field_0_time = 0;
 						continue;
-						}
 					}
+				}
 				if (v26 / 7 / 4 != 0 && v3->field_12 != 0 ||
 					v26 / 7 != 0 && v3->field_14 != 0 ||
 					v26 != 0 || !v20)
-					{
+				{
 					++dword_5B65C8_timers_count;
 					v3->field_0_time = 0;
 					continue;
-					}
 				}
+			}
 			else
-				{
+			{
 				v8 = (signed __int64)((double)(signed __int64)pParty->uTimePlayed * 0.234375);
 				v9 = v8;
 				v10 = (signed int)v8 / 60;
@@ -12118,30 +12028,30 @@
 				weeks = v15;
 				months = v16 % 12;
 				if ( v3->field_10 )
-					{
+				{
 					++years;
-					}
+				}
 				else
-					{
+				{
 					if ( v3->field_12 )
+					{
+						++months;
+					}
+					else
+					{
+						if ( v3->field_14 )
 						{
-						++months;
+							++weeks;
 						}
-					else
+						else
 						{
-						if ( v3->field_14 )
-							{
-							++weeks;
-							}
-						else
-							{
 							++days;
 							minutes = v3->field_18;
 							hours = v3->field_16;
 							seconds = v3->field_1A;
-							}
 						}
 					}
+				}
 				v3->field_0_time = (signed __int64)((double)((seconds
 					+ 60 * minutes
 					+ 3600 * hours
@@ -12151,10 +12061,10 @@
 					* 0.033333335);
 
 				++dword_5B65C8_timers_count;
-				}
 			}
 		}
 	}
+}
 
 //----- (00444360) --------------------------------------------------------
 void __thiscall Level_LoadEvtAndStr(const char *pLevelName)
@@ -12361,9 +12271,6 @@
   return result;
 }
 
-
-
-
 //----- (00444A51) --------------------------------------------------------
 void TransitionUI_Draw()
 {
@@ -12418,7 +12325,6 @@
   _unused_5B5924_is_travel_ui_drawn = true;
 }
 
-
 //----- (00444C8F) --------------------------------------------------------
 void UI_CreateTravelDialogue()
 {
@@ -12534,7 +12440,6 @@
   }
 }
 
-
 //----- (00444FBE) --------------------------------------------------------
 void __cdecl DrawBranchlessDialogueUI()
 {
@@ -12639,7 +12544,6 @@
   pEventTimer->Resume();
 }
 
-
 //----- (00445308) --------------------------------------------------------
 const char *GetProfessionActionText(int a1)
 {
@@ -13013,235 +12917,6 @@
   pRenderer->DrawTextureIndexed(471, 445, (Texture *)(uExitCancelTextureId != -1 ? &pIcons_LOD->pTextures[uExitCancelTextureId] : 0));
 }
 
-//----- (004459F9) --------------------------------------------------------
-NPCData *__fastcall GetNPCData(signed int npcid)
-{
-  unsigned int v1; // esi@1
-  NPCData *result; // eax@5
-  int v3; // esi@9
-  int v4; // ecx@9
-  //int v5; // edx@9
-  //NPCData *v6; // eax@9
-  char *v7; // ebx@14
-  NPCData *v8; // edi@14
-  char v9; // al@22
-  char v10;
-  //std::string v10; // [sp-18h] [bp-2Ch]@4
-  int v11;
-  //const char *v11; // [sp-8h] [bp-1Ch]@4
-  int v12; // [sp-4h] [bp-18h]@4
-  int v13; 
-  char *v14;
-  //std::string *v13; // [sp+Ch] [bp-8h]@4
-  int a3; // [sp+13h] [bp-1h]@4
-  int i;
-
-  /*v1 = npcid;
-  if ( (npcid & 0x80000000u) == 0 )
-  {
-    if ( (signed int)npcid < 5000 )
-    {
-      if ( (signed int)npcid >= 501 )
-      {
-    MessageBoxW(nullptr, L"NPC id exceeds MAX_DATA!", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Events.cpp:1984", 0);
-      }
-      return &pNPCStats->pNewNPCData[v1];
-    }
-    return &pNPCStats->array_13EF4[npcid - 5000];
-  }
-  if ( (signed int)npcid >= 5000 )
-    return &pNPCStats->array_13EF4[npcid - 5000];
-  if ( (sDialogue_SpeakingActorNPC_ID & 0x80000000u) == 0 )
-  {
-    result = 0;
-  }
-  else
-  {
-    v3 = abs((int)sDialogue_SpeakingActorNPC_ID) - 1;
-    v4 = 0;
-    v5 = 0;
-    v6 = pParty->pHirelings;
-    do
-    {
-      if ( v6->pName )
-        pTmpBuf[v4++] = v5;
-      ++v6;
-      ++v5;
-    }
-    while ( (signed int)v6 < (signed int)&pParty->pPickedItem );
-    v13 = 0;
-    if ( (signed int)pNPCStats->uNumNewNPCs > 0 )
-    {
-      v7 = &pTmpBuf[v4];
-      v8 = pNPCStats->pNewNPCData;
-      do
-      {
-        if ( v8->uFlags & 0x80
-          && (!pParty->pHirelings[0].pName || strcmp(v8->pName, pParty->pHirelings[0].pName))
-          && (!pParty->pHirelings[1].pName || strcmp(v8->pName, pParty->pHirelings[1].pName)) )
-          *v7++ = (char)v13 + 2;
-        v13 = (std::string *)((char *)v13 + 1);
-        ++v8;
-      }
-      while ( (signed int)v13 < (signed int)pNPCStats->uNumNewNPCs );
-    }
-    v9 = pTmpBuf[v3];
-    if ( (unsigned __int8)v9 >= 2u )
-      result = &pNPCStats->pNPCData[(unsigned __int8)v9 + 499];
-    else
-      result = &pParty->pHirelings[(unsigned __int8)v9];
-  }
-  return result;*/
-  v1 = npcid;
-  if ( npcid >= 0 )
-  {
-    if ( npcid < 5000 )
-    {
-      if ( npcid >= 501 )
-      {
-        MessageBoxW(nullptr, L"NPC id exceeds MAX_DATA!", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Events.cpp:1984", 0);
-      }
-      return &pNPCStats->pNewNPCData[v1];// - 1];
-    }
-    return &pNPCStats->pAdditionalNPC[npcid - 5000];
-  }
-
-
-  if ( npcid >= 5000 )
-    return &pNPCStats->pAdditionalNPC[npcid - 5000];
-  if (sDialogue_SpeakingActorNPC_ID >= 0)
-  {
-    result = 0;
-  }
-  else
-  {
-    v3 = abs(sDialogue_SpeakingActorNPC_ID) - 1;
-    v4 = 0;
-
-    for (i = 0; i < 2; ++i)
-    {
-      if (pParty->pHirelings[i].pName)
-        pTmpBuf[v4++] = i;
-    }
-
-    if (pNPCStats->uNumNewNPCs > 0)
-    {
-      for (i = 0; i < pNPCStats->uNumNewNPCs; ++i)
-      {
-        if (pNPCStats->pNewNPCData[i].Hired())
-        {
-          if (!pParty->pHirelings[0].pName || strcmp((char *)pNPCStats->pNewNPCData[i].pName, (char *)pParty->pHirelings[0].pName))
-          {
-            if (!pParty->pHirelings[1].pName || strcmp((char *)pNPCStats->pNewNPCData[i].pName, (char *)pParty->pHirelings[1].pName))
-              pTmpBuf[v4++] = i + 2;
-          }
-        }
-      }
-    }
-
-    v9 = pTmpBuf[v3];
-    if ( v9 >= 2 )
-     result = &pNPCStats->pNPCData[499 + v9];
-    else
-      result = &pParty->pHirelings[v9];
-  }
-}
-
-//----- (00445B2C) --------------------------------------------------------
-NPCData *__fastcall GetNewNPCData(signed int npcid, int a2)
-{
-  signed int v2; // esi@1
-  int v3; // edi@1
-  NPCData *result; // eax@5
-  int v5; // esi@9
-  int v6; // ecx@9
-  int v7; // edx@9
-  NPCData *v8; // eax@9
-  NPCData *v9; // edi@14
-  int v10; // ecx@20
-  char v11; // al@23
-  std::string v12; // [sp-18h] [bp-34h]@4
-  const char *v13; // [sp-8h] [bp-24h]@4
-  int v14; // [sp-4h] [bp-20h]@4
-  std::string *v15; // [sp+Ch] [bp-10h]@1
-  char *v16; // [sp+10h] [bp-Ch]@14
-  int v17; // [sp+14h] [bp-8h]@13
-  int a3; // [sp+1Bh] [bp-1h]@4
-
-  v2 = npcid;
-  v3 = a2;
-  v15 = (std::string *)a2;
-  if ( npcid >= 0 )
-  {
-    if ( npcid < 5000 )
-    {
-      if ( npcid >= 501 )
-      {
-    MessageBoxW(nullptr, L"NPC id exceeds MAX_DATA!", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Events.cpp:2040", 0);
-      }
-      *(int *)v3 = v2;
-      return &pNPCStats->pNewNPCData[v2];
-    }
-LABEL_7:
-    *(int *)a2 = npcid - 5000;
-    return &pNPCStats->pAdditionalNPC[npcid - 5000];
-  }
-  if ( npcid >= 5000 )
-    goto LABEL_7;
-  if ( sDialogue_SpeakingActorNPC_ID >= 0 )
-  {
-    *(int *)a2 = 0;
-    result = 0;
-  }
-  else
-  {
-    v5 = abs((int)sDialogue_SpeakingActorNPC_ID) - 1;
-    v6 = 0;
-    v7 = 0;
-    v8 = pParty->pHirelings;
-    do
-    {
-      if ( v8->pName )
-        pTmpBuf[v6++] = v7;
-      ++v8;
-      ++v7;
-    }
-    while ( (signed int)v8 < (signed int)&pParty->pPickedItem );
-    v17 = 0;
-    if ( (signed int)pNPCStats->uNumNewNPCs > 0 )
-    {
-      v9 = pNPCStats->pNewNPCData;
-      v16 = &pTmpBuf[v6];
-      do
-      {
-        if ( v9->Hired()
-          && (!pParty->pHirelings[0].pName || strcmp(v9->pName, pParty->pHirelings[0].pName))
-          && (!pParty->pHirelings[1].pName || strcmp(v9->pName, pParty->pHirelings[1].pName)) )
-        {
-          v10 = (int)v16++;
-          *(char *)v10 = v17 + 2;
-        }
-        ++v17;
-        ++v9;
-      }
-      while ( v17 < (signed int)pNPCStats->uNumNewNPCs );
-      v3 = (int)v15;
-    }
-    v11 = pTmpBuf[v5];
-    if ( (unsigned __int8)v11 >= 2u )
-    {
-      *(int *)v3 = (unsigned __int8)v11 - 2;
-      result = &pNPCStats->pNPCData[(unsigned __int8)pTmpBuf[v5] + 499];
-    }
-    else
-    {
-      *(int *)v3 = (unsigned __int8)v11;
-      result = &pParty->pHirelings[(unsigned __int8)pTmpBuf[v5]];
-    }
-  }
-  return result;
-}
-
 //----- (00445C8B) --------------------------------------------------------
 int __fastcall sub_445C8B(signed int a1)
 {
@@ -13293,7 +12968,6 @@
   return ((unsigned __int8)pTmpBuf[v3] < 2u) + 1;
 }
 
-
 //----- (0044603D) --------------------------------------------------------
 void __cdecl sub_44603D()
 {
@@ -13304,7 +12978,6 @@
   pEventTimer->Resume();
 }
 
-
 //----- (004465DF) --------------------------------------------------------
 int sub_4465DF_check_season(int a1)
 {
@@ -13503,8 +13176,6 @@
   return result;
 }
 
-
-
 //----- (0044861E) --------------------------------------------------------
 void __fastcall sub_44861E_set_texture(unsigned int uFaceCog, const char *pFilename)
 {
@@ -13630,9 +13301,6 @@
   }
 }
 
-
-
-
 //----- (0044882F) --------------------------------------------------------
 void __fastcall SetDecorationSprite(unsigned int uCog, int a2, const char *pFileName)
 {
@@ -13671,7 +13339,6 @@
   }
 }
 
-
 //----- (004488B6) --------------------------------------------------------
 unsigned __int16 DecorationList::GetDecorIdByName(const char *pName)
 {
@@ -13701,7 +13368,6 @@
   return result;
 }
 
-
 //----- (0044892E) --------------------------------------------------------
 void __fastcall sub_44892E_set_faces_bit(int sCogNumber, int bit, int on)
 {
@@ -13780,30 +13446,6 @@
   }
 }
 
-
-
-
-//----- (00448A40) --------------------------------------------------------
-void Actor::ToggleFlag(signed int uActorID, unsigned int uFlag, int bToggle)
-{
-  if ( uActorID >= 0 && uActorID <= (signed int)(uNumActors - 1) )
-  {
-    if ( bToggle )
-    {
-      pActors[uActorID].uAttributes |= uFlag;
-    }
-    else
-    {
-      if ( uFlag == 0x10000 )
-      {
-        if (pActors[uActorID].uAIState == Disabled )
-          pActors[uActorID].uAIState = Standing;
-      }
-      pActors[uActorID].uAttributes &= ~uFlag;
-    }
-  }
-}
-
 //----- (00448A98) --------------------------------------------------------
 void __fastcall ToggleActorGroupFlag(unsigned int uGroupID, unsigned int uFlag, unsigned int bToggle)
 {
@@ -13872,7 +13514,6 @@
   }
 }
 
-
 //----- (00448B45) --------------------------------------------------------
 void __thiscall GameUI_StatusBar_UpdateTimedString(unsigned int bForceHide)
 {
@@ -13988,7 +13629,6 @@
   v->vWorldViewProjY = (double)pViewport->uScreenCenterY - v2 * v->vWorldViewPosition.z;
 }
 
-
 //----- (00448CF4) --------------------------------------------------------
 void __fastcall sub_448CF4_spawn_monsters(__int16 typeindex, __int16 level, int count, int x, int y, int z, int group, unsigned int uUniqueName)
 {
@@ -14035,7 +13675,6 @@
   }
 }
 
-
 //----- (00448DF8) --------------------------------------------------------
 void __fastcall sub_448DF8_cast_spell(int spellnum, int rank, int level, int fromx, int fromy, int fromz, int tox, int toy, int toz)
 {
@@ -14813,7 +14452,6 @@
     pArray[v3 / 8] &= ~set_bit;
 }
 
-
 //----- (0044A56A) --------------------------------------------------------
 void __cdecl Party__CountHirelings()
 {
@@ -14831,7 +14469,6 @@
   }
 }
 
-
 //----- (0044C175) --------------------------------------------------------
 void __fastcall ShowStatusBarString(const char *pString, unsigned int uNumSeconds)
 {
@@ -14854,7 +14491,6 @@
     ShowStatusBarString(pGlobalTXT_LocalizationStrings[521], 2u);// Nothing here
 }
 
-
 //----- (0044C28B) --------------------------------------------------------
 signed int __cdecl const_2()
 {
@@ -14884,7 +14520,6 @@
   return result;
 }
 
-
 //----- (0044C2F4) --------------------------------------------------------
 int LevelDecoration::IsInteractive()
 {
@@ -14941,11 +14576,6 @@
   v1->z = LODWORD(v14);
 }
 
-
-
-
-
-
 //----- (00401000) --------------------------------------------------------
 void __stdcall mm7__vector_constructor(void *a1, int objSize, int numObjs, int (__thiscall *constructor)(int))
 {
@@ -14966,7 +14596,6 @@
   }
 }
 
-
 //----- (004014E6) --------------------------------------------------------
 void MakeActorAIList_ODM()
 {
@@ -16065,9 +15694,6 @@
   }
 }
 
-
-
-
 //----- (0040261D) --------------------------------------------------------
 int stru298::Add(__int16 uID, __int16 a3, __int16 x, __int16 y, __int16 z, char a7, char a8)
 {
@@ -16088,10 +15714,6 @@
   return result;
 }
 
-
-
-
-
 //----- (00402CAE) --------------------------------------------------------
 int stru193_math::Cos(int angle)
 {
@@ -16110,19 +15732,6 @@
     return pCosTable[v2];
 }
 
-
-
-
-
-
-
-
-
-
-
-
-
-
 //----- (00404544) --------------------------------------------------------
 signed int stru262_TurnBased::_404544()
 {
@@ -16272,30 +15881,6 @@
   }
 }
 
-
-//----- (00404828) --------------------------------------------------------
-SpriteObject::SpriteObject()
-{
-  field_22_glow_radius_multiplier = 1;
-  uSoundID = 0;
-  uFacing = 0;
-  vVelocity.z = 0;
-  vVelocity.y = 0;
-  vVelocity.x = 0;
-  uType = 0;
-  uObjectDescID = 0;
-  field_61 = 0;
-  field_60_distance_related_prolly_lod = 0;
-  field_20 = 0;
-  uSpriteFrameID = 0;
-  field_50 = 0;
-  field_4C = 0;
-  field_48 = 0;
-  field_54 = 0;
-}
-
-
-
 //----- (004059DB) --------------------------------------------------------
 signed int stru262_TurnBased::Start()
 {
@@ -16512,4 +16097,3 @@
   }
   return v1->_404544();
 }
-
--- a/mm7_4.cpp	Sun Mar 24 21:14:28 2013 +0200
+++ b/mm7_4.cpp	Sun Mar 24 21:15:01 2013 +0200
@@ -3,7 +3,6 @@
 #include <assert.h>
 
 #include "MM7.h"
-
 #include "MapInfo.h"
 #include "Game.h"
 #include "GUIWindow.h"
@@ -54,23 +53,8 @@
 #include "texts.h"
 #include "Log.h"
 #include "UIHouses.h"
-
 #include "mm7_data.h"
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 //----- (0046CC4B) --------------------------------------------------------
 void __cdecl check_event_triggers()
 {
@@ -842,7 +826,6 @@
   return dword_720F20[v22];
 }
 
-
 //not sure if right- or left-handed coordinate space assumed, so this could be normal of inverse normal
 // for a right-handed system, that would be an inverse normal
 //----- (0046DCC8) --------------------------------------------------------
@@ -916,7 +899,6 @@
   }
 }
 
-
 //----- (0046DEF2) --------------------------------------------------------
 unsigned int __fastcall sub_46DEF2(signed int a2, unsigned int uLayingItemID)
 {
@@ -1452,8 +1434,6 @@
 }
 // 4EC3EC: using guessed type Edge defaultEdge;
 
-
-
 //----- (00487355) --------------------------------------------------------
 bool OutdoorCamera::_487355()
 {
@@ -1476,8 +1456,6 @@
   return result;
 }
 
-
-
 //----- (00487DA9) --------------------------------------------------------
 void __cdecl sub_487DA9()
 {
@@ -1519,10 +1497,6 @@
 }
 // 4EC3EC: using guessed type Edge defaultEdge;
 
-
-
-
-
 //----- (0048958E) --------------------------------------------------------
 stru12_MemoryBlock::stru12_MemoryBlock(int a2)
 {
@@ -1795,10 +1769,6 @@
   this->field_8C = 0;
 }
 
-
-
-
-
 //----- (0048A959) --------------------------------------------------------
 unsigned int ReplaceHSV(unsigned int uColor, float h_replace, float s_replace, float v_replace)
 {
@@ -1822,7 +1792,6 @@
          ((uint)floorf(b * 255.0f + 0.5f) & 0xFF);
 }
 
-
 //----- (0048B561) --------------------------------------------------------
 int _48B561_mess_with_scaling_along_z(/*int a1, */float a2)
 {
@@ -1836,11 +1805,6 @@
   return v5 | (v4 << 16);
 }
 
-
-
-
-
-
 //----- (00491E3A) --------------------------------------------------------
 void __cdecl sub_491E3A()
 {
@@ -1942,9 +1906,6 @@
 }
 // 4ED498: using guessed type char byte_4ED498;
 
-
-
-
 //----- (0049387A) --------------------------------------------------------
 int CycleCharacter(unsigned int _this)
 {
@@ -2380,8 +2341,6 @@
   return result;
 }
 
-
-
 //----- (00493F79) --------------------------------------------------------
 void sub_493F79(stru351_summoned_item *_this, __int64 a2)
 {
@@ -2405,10 +2364,6 @@
   _this->field_18_expire_year = v6 / 0xC + game_starting_year;
 }
 
-
-
-
-
 //----- (00494035) --------------------------------------------------------
 void __cdecl _494035_timed_effects__water_walking_damage__etc()
 {
@@ -2908,8 +2863,6 @@
 }
 // 4EE088: using guessed type __int16 word_4EE088_sound_ids[];
 
-
-
 //----- (00494AED) --------------------------------------------------------
 unsigned int PlayerFrameTable::GetFrameIdByExpression(CHARACTER_EXPRESSION_ID expression)
 {
@@ -3385,8 +3338,6 @@
   return result;
 }
 
-
-
 //----- (00495366) --------------------------------------------------------
 char *__fastcall sub_495366(unsigned __int8 a1, unsigned __int8 a2)
 {
@@ -3895,9 +3846,6 @@
   return pTmpBuf2;
 }
 
-
-
-
 //----- (0049B04D) --------------------------------------------------------
 void stru154::GetFacePlaneAndClassify(ODMFace *a2, BSPVertexBuffer *a3)
 {
@@ -4029,10 +3977,6 @@
   *pOutDist = (double)(v5->pFacePlane.dist & 0xFFFF) / 65535.0f + (double)(v5->pFacePlane.dist >> 16);
 }
 
-
-
-
-
 //----- (0049D700) --------------------------------------------------------
 unsigned int __fastcall GetMaxMipLevels(unsigned int uDim)
 {
@@ -4051,15 +3995,6 @@
   return v3 == 0 ? v2 : 0;
 }
 
-
-
-
-
-
-
-
-
-
 //----- (004A19D8) --------------------------------------------------------
 unsigned int BlendColors(unsigned int a1, unsigned int a2)
 {
@@ -4102,8 +4037,6 @@
   return LOBYTE(v13) | ((LOBYTE(v11) | (((v6 << 8) | v9) << 8)) << 8);*/
 }
 
-
-
 //----- (004A46E6) --------------------------------------------------------
 int __fastcall sr_4A46E6_draw_particle_segment(unsigned int x, signed int y, signed int _z, int a4, unsigned int lightColor)
 {
@@ -4243,7 +4176,6 @@
   return z;
 }
 
-
 //----- (004A57E9) --------------------------------------------------------
 void __cdecl Present_ColorKey()
 {
@@ -4472,8 +4404,6 @@
   }
 }
 
-
-
 //----- (004A7063) --------------------------------------------------------
 int __thiscall sub_4A7063(unsigned int uDiffuse, float a2)
 {
@@ -4521,13 +4451,6 @@
   return v10 | ((v9 | ((v7 | (v4 << 8)) << 8)) << 8);
 }
 
-
-
-
-
-
-
-
 //----- (004AD504) --------------------------------------------------------
 int __fastcall sub_4AD504(signed int sFaceID)
 {
@@ -5506,9 +5429,6 @@
 }
 // 4AE491: using guessed type int __fastcall sub_4AE491(int, int);
 
-
-
-
 //----- (004AE5F1) --------------------------------------------------------
 void __fastcall sub_4AE5F1(unsigned int uFaceID)
 {
@@ -6162,11 +6082,6 @@
   return result;
 }
 
-
-
-
-
-
 //----- (004B1447) --------------------------------------------------------
 Player *__fastcall sub_4B1447_party_fine(int a1, int a2, int a3)
 {
@@ -6309,7 +6224,6 @@
   a1.DrawTitleText(pFontComic, 0xCu, a1.uFrameHeight - LOBYTE(pFontComic->uFontHeight) - 16, 0, pTmpBuf, 3);
 }
 
-
 //----- (004B1784) --------------------------------------------------------
 bool __cdecl sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win()
 {
@@ -6344,7 +6258,6 @@
 }
 // F8B1E0: using guessed type int dword_F8B1E0;
 
-
 //view  item details  in shop?
 //----- (004B1A2D) --------------------------------------------------------
 void __cdecl sub_4B1A2D()
@@ -6548,8 +6461,6 @@
   }
 }
 
-
-
 //----- (004B1ECE) --------------------------------------------------------
 void __cdecl sub_4B1ECE()
 {
@@ -6645,7 +6556,6 @@
 	  v9->uHolderPlayer = v5;
   }
 }
-
 // 4F08EC: using guessed type int dword_4F08EC[];
 // 722B3C: using guessed type int dword_722B3C;
 // 722B44: using guessed type int dword_722B44;
@@ -6930,7 +6840,6 @@
   pVideoPlayer->_4BF5B2();//HouseVideo
 }
 
-
 //----- (004B254D) --------------------------------------------------------
 char *__thiscall _4B254D_SkillMasteryTeacher(int _this)
 {
@@ -7259,8 +7168,6 @@
   return pTmpBuf2;
 }
 
-
-
 //----- (004B29F2) --------------------------------------------------------
 const char * ContractSelectText( int pEventCode )
 	{
@@ -7293,7 +7200,6 @@
   }
 }
 
-
 //----- (004B2A74) --------------------------------------------------------
 void SimpleHouseAndBoatsDialog()
 {
@@ -7620,18 +7526,12 @@
   }
 }
 
-
-
-
-
 //----- (004B36CC) --------------------------------------------------------
 void CreateButtonInColumn( int column_pos, unsigned int control_id )
-	{
+{
      pDialogueWindow->CreateButton( 480, 30 * column_pos + 146, 140, 30,  1,  0, 0x195u,  control_id,  0,   "",   0);
 }
 
-
-
 //----- (004B3A72) --------------------------------------------------------
 void sub_4B3A72( int a1 )
 	{
@@ -7968,7 +7868,6 @@
   dialog_menu_id = HOUSE_DIALOGUE_OTHER;
 }
 
-
 //----- (004B4224) --------------------------------------------------------
 void _4B4224_UpdateNPCTopics( int _this )
 	{
@@ -8090,8 +7989,6 @@
  
 }
 
-
-
 //----- (004B46A5) --------------------------------------------------------
 char __fastcall DrawTextAtStatusBar(const char *sText, int font_color)
 {
@@ -8113,7 +8010,6 @@
   return 1000 * v1;
 }
 
-
 //----- (004BC49B) --------------------------------------------------------
 void OnSelectNPCDialogueOption(DIALOGUE_TYPE newDialogueType)
 {
@@ -8339,8 +8235,6 @@
 	dword_7241C8 = 0;
 }
 
-
-
 //----- (004BDAAF) --------------------------------------------------------
 bool __fastcall sub_4BDAAF(ItemGen *a1, int _2da_idx)
 {
@@ -8445,9 +8339,6 @@
 */
 }
 
-
-
-
 //----- (004B6478) --------------------------------------------------------
 void sub_4B6478()
     {
@@ -8656,10 +8547,6 @@
   return;
 }
 
-
-
-
-
 //----- (00405CFF) --------------------------------------------------------
 void stru262_TurnBased::End(bool bPlaySound)
 {
@@ -8908,9 +8795,6 @@
   }
 }
 
-
-
-
 //----- (0043FDED) --------------------------------------------------------
 void PrepareActorRenderList_BLV()
 {
@@ -9125,9 +9009,6 @@
   }
 }
 
-
-
-
 //----- (00444732) --------------------------------------------------------
 char *GetEventHintString(unsigned int uEventID)
 {
@@ -9183,9 +9064,6 @@
   return result;
 }
 
-
-
-
 //----- (00444839) --------------------------------------------------------
 unsigned int __fastcall sub_444839_move_map(unsigned int a1, int a2, int x, int y, int z, int directiony, int directionx, int a8, const char *pLocationName)
 {
@@ -9289,4 +9167,3 @@
     uCurrentHouse_Animation = v23;
   return result;
 }
-
--- a/mm7_5.cpp	Sun Mar 24 21:14:28 2013 +0200
+++ b/mm7_5.cpp	Sun Mar 24 21:15:01 2013 +0200
@@ -1,7 +1,6 @@
 #include <assert.h>
 
 #include "mm7.h"
-
 #include "MapInfo.h"
 #include "Game.h"
 #include "GUIWindow.h"
@@ -45,24 +44,8 @@
 #include "texts.h"
 #include "Log.h"
 #include "UIHouses.h"
-
 #include "mm7_data.h"
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 //----- (004304E7) --------------------------------------------------------
 void __cdecl GameUI_MsgProc()
 {
@@ -3480,7 +3463,6 @@
   pStru277->_427E01_cast_spell();
 }
 
-
 //----- (004356FF) --------------------------------------------------------
 void __cdecl back_to_game()
 {
@@ -3493,6 +3475,7 @@
     pEventTimer->Resume();
   viewparams->bRedrawGameUI = 1;
 }
+
 //----- (00435748) --------------------------------------------------------
 void __cdecl GUI_MainMenuMessageProc()
 {
@@ -4014,15 +3997,6 @@
   v1->z = v2 * v1->z;
 }
 
-
-
-
-
-
-
-
-
-
 //----- (004385B5) --------------------------------------------------------
 void stru11::CheckCPU()
 {
@@ -4415,8 +4389,6 @@
   memcpy((char *)&v17->cpuid_80000002_registers2[0] + 1, v18, 0x30u);*/
 }
 
-
-
 //----- (00438BDF) --------------------------------------------------------
 bool MonsterStats::BelongsToSupertype(unsigned int uMonsterInfoID, enum MONSTER_SUPERTYPE eSupertype)
 {
@@ -4500,7 +4472,6 @@
   return result;
 }
 
-
 //----- (00438F8F) --------------------------------------------------------
 void __cdecl area_of_effect__damage_evaluate()
 {
@@ -5201,7 +5172,6 @@
 }
 // 4D864C: using guessed type char byte_4D864C;
 
-
 //----- (00439FCB) --------------------------------------------------------
 void __fastcall DamagePlayerFromMonster(unsigned int uObjID, int a2, Vec3_int_ *pPos, unsigned int a4)
 {
@@ -5708,7 +5678,6 @@
   }
 }
 
-
 //----- (0043A97E) --------------------------------------------------------
 void __fastcall sub_43A97E(unsigned int uLayingItemID, signed int a2)
 {
@@ -5799,9 +5768,6 @@
   *z *= 65536 / (v5 | 1);
 }
 
-
-
-
 //----- (0043AE12) --------------------------------------------------------
 double __fastcall sub_43AE12(signed int a1)
 {
@@ -6051,8 +6017,6 @@
   }
 }
 
-
-
 //----- (0043C91D) --------------------------------------------------------
 int __fastcall _43C91D_FormItemTextureFilename(char *a1, signed int a2, int a3, int a4)
 {
@@ -6256,8 +6220,6 @@
   return result;
 }
 
-
-
 //----- (0043ED6F) --------------------------------------------------------
 bool _43ED6F_check_party_races(bool a1)
 {
@@ -6529,7 +6491,6 @@
   return result;
 }
 
-
 //----- (0043F333) --------------------------------------------------------
 void BspRenderer::MakeVisibleSectorList()
 {
@@ -6557,7 +6518,6 @@
   }
 }
 
-
 //----- (0043F515) --------------------------------------------------------
 void FindBillboardsLightLevels_BLV()
 {
@@ -9346,7 +9306,6 @@
   return !v114 || !v113;
 }
 
-
 //----- (00408768) --------------------------------------------------------
 void InitializeActors()
 {
@@ -9435,7 +9394,6 @@
   return result;
 }
 
-
 //----- (00408A27) --------------------------------------------------------
 unsigned int __thiscall SearchAliveActors(unsigned int *pTotalActors)
 {
@@ -9577,7 +9535,6 @@
   return v5;
 }
 
-
 //----- (00409BE8) --------------------------------------------------------
 void __cdecl sub_409BE8()
 {
@@ -9622,12 +9579,6 @@
 // 505888: using guessed type int amuint_505888;
 // 50588C: using guessed type int amuint_50588C;
 
-
-
-
-
-
-
 //----- (0040D75D) --------------------------------------------------------
 char __fastcall pPrimaryWindow_draws_text(int a1, const char *pText, int *pXY)
 {
@@ -9647,8 +9598,6 @@
            0);
 }
 
-
-
 //----- (0040DB27) --------------------------------------------------------
 void __fastcall DrawRect(Vec4_int_ *pXYZW, unsigned __int16 uColor, char bSolidFill)
 {
@@ -9675,9 +9624,6 @@
   pRenderer->EndScene();
 }
 
-
-
-
 //----- (0040DDB1) --------------------------------------------------------
 int __fastcall rand_interval(int a, int b)
 {
@@ -9722,7 +9668,6 @@
   pRenderer->Present();
 }
 
-
 //----- (0040DFA7) --------------------------------------------------------
 int __stdcall retzero_sub_40DFA7(int a1)
 {
@@ -9935,12 +9880,6 @@
   return result;
 }
 
-
-
-
-
-
-
 //----- (0040F82D) --------------------------------------------------------
 void __fastcall ZBuffer_Fill(int *pZBuffer, int uTextureId, int iZValue)
 {
@@ -10037,7 +9976,6 @@
   }
 }
 
-
 //----- (0040F92A) --------------------------------------------------------
 void __fastcall sub_40F92A(int *pZBuffer, Texture *a2, int a3)
 {
--- a/mm7_6.cpp	Sun Mar 24 21:14:28 2013 +0200
+++ b/mm7_6.cpp	Sun Mar 24 21:15:01 2013 +0200
@@ -452,94 +452,6 @@
   return result;
 }
 
-
-
-//----- (004361EF) --------------------------------------------------------
-IndoorCameraD3D::IndoorCameraD3D()
-{
-  IndoorCameraD3D *v1; // esi@1
-  //double v2; // st7@1
-  //double v3; // st6@1
-  //double v4; // st5@1
-  //double v5; // st7@1
-  //double v6; // st6@1
-  //double v7; // st5@1
-
-  v1 = this;
-  //IndoorCameraD3D_Vec3::IndoorCameraD3D_Vec3(&this->field_4);
-  //IndoorCameraD3D_Vec3::IndoorCameraD3D_Vec3(&v1->field_14);
-  //IndoorCameraD3D_Vec3::IndoorCameraD3D_Vec3(&v1->field_24);
-  /*_eh_vector_constructor_iterator_(v1->std__vector_000034_prolly_frustrum,
-    24,
-    6,
-    (void (__thiscall *)(void *))IndoorCameraD3D_Vec4::IndoorCameraD3D_Vec4,
-    (void (__thiscall *)(void *))IndoorCameraD3D_Vec4::dtor);*/
-  //v2 = 0;//(double)pBLVRenderParams->vPartyPos.z;
-  //v3 = 0;//(double)pBLVRenderParams->vPartyPos.y;
-  //v4 = 0;//(double)pBLVRenderParams->vPartyPos.x;
-  v1->field_108 = 0.0;
-  v1->blv_party_x = 0;
-  v1->blv_party_y = 0;
-  v1->blv_party_z = 0;
-  //v5 = 0;//(double)pBLVRenderParams->vPartyPos.z;
-  //v6 = 0;//(double)pBLVRenderParams->vPartyPos.y;
-  //v7 = 300;//(double)(pBLVRenderParams->vPartyPos.x + 300);
-  v1->field_138 = 0.0;
-  v1->blv_party_x_2 = 300;
-  v1->blv_party_y_2 = 0;
-  v1->blv_party_z_2 = 0;
-  v1->field_168 = 0.0;
-  v1->field_198 = 0.0;
-  v1->field_1C8 = 0.0;
-  v1->field_1F8 = 0.0;
-  v1->field_228 = 0.0;
-  v1->field_258 = 0.0;
-  v1->field_288 = 0.0;
-  v1->field_2B8 = 0.0;
-  v1->field_2E8 = 0.0;
-  v1->field_2BC = 0.0;
-  v1->field_2C0 = 0.0;
-  v1->field_2C4 = 0.0;
-  v1->field_318 = 0.0;
-  v1->field_2EC = 0.0;
-  v1->field_2F0 = 0.0;
-  v1->field_2F4 = 0.0;
-  v1->field_348 = 0.0;
-  v1->field_31C = 0.0;
-  v1->field_320 = 0.0;
-  v1->field_324 = 0.0;
-  v1->field_378 = 0.0;
-  v1->field_34C = 0.0;
-  v1->field_350 = 0.0;
-  v1->field_354 = 0.0;
-  for (uint i = 0; i < 16384; ++i)
-  {
-    list_0037C[i].field_0 = 0;
-    list_0037C[i].flt_30 = 0.0f;
-  }
-
-  list_0037C_size = 0;
-  for (uint i = 0; i < 256; ++i)
-    list_E0380[i].mm7__vector_000004_size = 0;
-  /*v10 = v1->list_E0380;
-  v12 = 256;
-  do
-  {
-    v10->mm7__vector_000004_size = 0;
-    //mm7__vector_constructor(
-    //  v10->mm7__vector_000004,
-    //  48,
-    //  64,
-    //  (int (__thiscall *)(int))IndoorCameraD3D_stru1::IndoorCameraD3D_stru1);
-    //++v10;
-    --v12;
-  }
-  while ( v12 );*/
-  list_E0380_size = 0;
-  //v1->vdestructor_ptr = &stru8_pvdtor;
-}
-
-
 //----- (004254D2) --------------------------------------------------------
 int __fastcall sr_4254D2(signed int a1)
 {
@@ -1243,9 +1155,6 @@
   return result;
 }
 
-
-
-
 //----- (004268E3) --------------------------------------------------------
 int __fastcall _4268E3_smthn_to_a1r5g5b5(unsigned int uColor)
 {
@@ -1290,8 +1199,6 @@
 // 50C994: using guessed type int dword_50C994;
 // 50C998: using guessed type int dword_50C998_turnbased_icon_1A;
 
-
-
 //----- (004269A2) --------------------------------------------------------
 int __fastcall sub_4269A2_GivePartyExp(unsigned int a1)
 {
@@ -1703,7 +1610,6 @@
   return result;
 }
 
-
 //----- (0042704B) --------------------------------------------------------
 bool stru319::special_ability_use_check(Actor *pActor, int a2)
 {
@@ -2160,7 +2066,6 @@
   return result;
 }
 
-
 //----- (00427769) --------------------------------------------------------
 bool __fastcall sub_427769_spell(unsigned int uSpellID)
 {
@@ -2486,8 +2391,6 @@
     }
 }
 
-
-
 //----- (00427D48) --------------------------------------------------------
 void stru277::_427D48(unsigned int uPlayerID)
 {
@@ -7604,15 +7507,12 @@
   return v3;
 }
 
-
-
 //----- (0042EB78) --------------------------------------------------------
 int IconFrameTable::GetIconAnimLength(unsigned int uIconID)
 {
   return 8 * this->pIcons[uIconID].uAnimLength;
 }
 
-
 const wchar_t *UIMessage2String(UIMessageType msg)
 {
   #define CASE(xxx) case xxx: _swprintf(b, L"%03X/%s", msg, L#xxx); return b;
@@ -7711,7 +7611,6 @@
   #undef CASE
 }
 
-
 //----- (0042EB8D) --------------------------------------------------------
 void GUIMessageQueue::AddMessageImpl(UIMessageType msg, int param, unsigned int a4, const char *file, int line)
 {
@@ -8106,7 +8005,6 @@
   return 0;
 }
 
-
 //----- (0042F3D6) --------------------------------------------------------
 void InitializeTurnBasedAnimations(void *_this)
 {
@@ -8505,8 +8403,6 @@
   return result;
 }
 
-
-
 //----- (0042FB5C) --------------------------------------------------------
 bool __fastcall sub_42FB5C(signed int a1)
 {
@@ -9133,4 +9029,3 @@
     AsyncKeyboard::LeaveCriticalSection();
   }
 }
-