changeset 1018:9ac94d00012e

Merge
author Grumpy7
date Tue, 21 May 2013 02:24:31 +0200
parents af20650a052f (diff) c8c5224164da (current diff)
children 3413ad40cc88
files Actor.cpp Chest.cpp Events.cpp GUIButton.cpp GUIWindow.cpp GUIWindow.h Indoor.cpp Indoor.h Items.cpp LOD.cpp Mouse.cpp Player.cpp UIBooks.cpp UICharacter.cpp UIHouses.cpp UIOptions.cpp UIPartyCreation.cpp UIPopup.cpp UiGame.cpp VideoPlayer.cpp mm7_1.cpp mm7_2.cpp mm7_4.cpp mm7_5.cpp mm7_6.cpp mm7_data.cpp mm7_data.h
diffstat 61 files changed, 380 insertions(+), 387 deletions(-) [+]
line wrap: on
line diff
--- a/Actor.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/Actor.cpp	Tue May 21 02:24:31 2013 +0200
@@ -1,9 +1,15 @@
 #include <assert.h>
 
+
+#include "VideoPlayer.h"
+#include "DecalBuilder.h"
+
+#include "Sprites.h"
+#include "stru6.h"
+
+
 #include "Actor.h"
-#include "SpriteObject.h"
 #include "Math.h"
-#include "Party.h"
 #include "Outdoor.h"
 #include "AudioPlayer.h"
 #include "Game.h"
@@ -22,6 +28,7 @@
 #include "GUIFont.h"
 
 #include "MM7.h"
+#include "SpriteObject.h"
 
 
 
--- a/Actor.h	Sun May 19 20:39:45 2013 +0400
+++ b/Actor.h	Tue May 21 02:24:31 2013 +0200
@@ -1,8 +1,7 @@
 #pragma once
-#include "VectorTypes.h"
-#include "Items.h"
 #include "Monsters.h"
 #include "Spells.h"
+#include "Items.h"
 
 
 
--- a/Arcomage.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/Arcomage.cpp	Tue May 21 02:24:31 2013 +0200
@@ -1,5 +1,6 @@
 #include <string>
 
+#include "LightmapBuilder.h"
 #include "Arcomage.h"
 #include "VideoPlayer.h"
 #include "AudioPlayer.h"
@@ -13,7 +14,6 @@
 #include "Events2D.h"
 #include "VectorTypes.h"
 #include "texts.h"
-#include "mm7_data.h"
 
 
 
--- a/AudioPlayer.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/AudioPlayer.cpp	Tue May 21 02:24:31 2013 +0200
@@ -1,6 +1,9 @@
 #include <string>
 #include <assert.h>
 
+#include "stru11.h"
+
+#include "VideoPlayer.h"
 #include "AudioPlayer.h"
 #include "Allocator.h"
 #include "FrameTableInc.h"
@@ -14,13 +17,11 @@
 #include "OSInfo.h"
 #include "Math.h"
 #include "MapInfo.h"
-#include "Actor.h"
 #include "GUIWindow.h"
 #include "Log.h"
 
 #include "Bink_Smacker.h"
 
-#include "mm7_data.h"
 #include "MM7.h"
 
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CShow.cpp	Tue May 21 02:24:31 2013 +0200
@@ -0,0 +1,80 @@
+#include "CShow.h"
+
+#include "VideoPlayer.h"
+#include "Mouse.h"
+
+void CShow::PlayMovie( MovieType eVideo, bool bShowMouseAfterPlayback )
+{
+    int v3; // edx@5
+    const char *Name; // ecx@5
+    //std::string v5; // [sp-18h] [bp-24h]@4
+    //signed int v6; // [sp-Ch] [bp-18h]@10
+    int ScreenSizeFlag; // [sp-8h] [bp-14h]@4
+    //int v8; // [sp-4h] [bp-10h]@4
+    //char v9; // [sp+0h] [bp-Ch]@14
+    //char v10; // [sp+4h] [bp-8h]@4
+    //int a3; // [sp+Bh] [bp-1h]@14
+
+    if (bNoVideo)
+        return;
+
+    if (pAsyncMouse)
+        pAsyncMouse->Suspend();
+    switch ( eVideo )
+    {
+    case MOVIE_Invalid:
+        MessageBoxW(nullptr, L"No movie", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Show.cpp:40", 0);
+        break;
+    case MOVIE_3DOLogo:
+        ScreenSizeFlag = 0;
+        v3 = 0;
+        Name = "3dologo";
+        VideoPlayer::MovieLoop(Name, v3, ScreenSizeFlag, 1);
+        break;
+    case MOVIE_NWCLogo:
+        ScreenSizeFlag = 1;
+        v3 = 0;
+        Name = "new world logo";
+        VideoPlayer::MovieLoop(Name, v3, ScreenSizeFlag, 1);
+        break;
+    case MOVIE_JVC:
+        ScreenSizeFlag = 1;
+        v3 = 0;
+        Name = "jvc";
+        VideoPlayer::MovieLoop(Name, v3, ScreenSizeFlag, 1);
+        break;
+    case MOVIE_Intro:
+        ScreenSizeFlag = 1;
+        v3 = 0;
+        Name = "Intro";
+        VideoPlayer::MovieLoop(Name, v3, ScreenSizeFlag, 1);
+        break;
+    case MOVIE_Emerald:
+        ScreenSizeFlag = 1;
+        v3 = 0;
+        Name = "Intro Post";
+        VideoPlayer::MovieLoop(Name, v3, ScreenSizeFlag, 1);
+        break;
+    case MOVIE_Death:
+        ScreenSizeFlag = 1;
+        v3 = 2;
+        Name = "losegame";
+        VideoPlayer::MovieLoop(Name, v3, ScreenSizeFlag, 1);
+        break;
+    case MOVIE_Outro:
+        ScreenSizeFlag = 1;
+        v3 = 20;
+        Name = "end_seq1";
+        VideoPlayer::MovieLoop(Name, v3, ScreenSizeFlag, 1);
+        break;
+    default:
+        MessageBoxW(nullptr, L"Invalid movie requested in CShow::Run()", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Show.cpp:72", 0);
+        break;
+    }
+    if ( bShowMouseAfterPlayback )
+    {
+        if (pAsyncMouse)
+            pAsyncMouse->Resume();
+    }
+}
+
--- a/CShow.h	Sun May 19 20:39:45 2013 +0400
+++ b/CShow.h	Tue May 21 02:24:31 2013 +0200
@@ -1,6 +1,4 @@
 #pragma once
-#include "VideoPlayer.h"
-#include "Mouse.h"
 
 
 
@@ -29,80 +27,7 @@
 
   
   //----- (004A952D) --------------------------------------------------------
-  void CShow::PlayMovie(MovieType eVideo, bool bShowMouseAfterPlayback)
-  {
-  int v3; // edx@5
-  const char *Name; // ecx@5
-  //std::string v5; // [sp-18h] [bp-24h]@4
-  //signed int v6; // [sp-Ch] [bp-18h]@10
-  int ScreenSizeFlag; // [sp-8h] [bp-14h]@4
-  //int v8; // [sp-4h] [bp-10h]@4
-  //char v9; // [sp+0h] [bp-Ch]@14
-  //char v10; // [sp+4h] [bp-8h]@4
-  //int a3; // [sp+Bh] [bp-1h]@14
-
-  if (bNoVideo)
-    return;
-
-  if (pAsyncMouse)
-    pAsyncMouse->Suspend();
-  switch ( eVideo )
-  {
-    case MOVIE_Invalid:
-      MessageBoxW(nullptr, L"No movie", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Show.cpp:40", 0);
-      break;
-    case MOVIE_3DOLogo:
-      ScreenSizeFlag = 0;
-      v3 = 0;
-      Name = "3dologo";
-      VideoPlayer::MovieLoop(Name, v3, ScreenSizeFlag, 1);
-      break;
-    case MOVIE_NWCLogo:
-      ScreenSizeFlag = 1;
-      v3 = 0;
-      Name = "new world logo";
-      VideoPlayer::MovieLoop(Name, v3, ScreenSizeFlag, 1);
-      break;
-    case MOVIE_JVC:
-      ScreenSizeFlag = 1;
-      v3 = 0;
-      Name = "jvc";
-      VideoPlayer::MovieLoop(Name, v3, ScreenSizeFlag, 1);
-      break;
-    case MOVIE_Intro:
-      ScreenSizeFlag = 1;
-      v3 = 0;
-      Name = "Intro";
-      VideoPlayer::MovieLoop(Name, v3, ScreenSizeFlag, 1);
-      break;
-    case MOVIE_Emerald:
-      ScreenSizeFlag = 1;
-      v3 = 0;
-      Name = "Intro Post";
-      VideoPlayer::MovieLoop(Name, v3, ScreenSizeFlag, 1);
-      break;
-    case MOVIE_Death:
-      ScreenSizeFlag = 1;
-      v3 = 2;
-      Name = "losegame";
-      VideoPlayer::MovieLoop(Name, v3, ScreenSizeFlag, 1);
-      break;
-    case MOVIE_Outro:
-      ScreenSizeFlag = 1;
-      v3 = 20;
-      Name = "end_seq1";
-      VideoPlayer::MovieLoop(Name, v3, ScreenSizeFlag, 1);
-      break;
-    default:
-      MessageBoxW(nullptr, L"Invalid movie requested in CShow::Run()", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Show.cpp:72", 0);
-      break;
-  }
-  if ( bShowMouseAfterPlayback )
-  {
-    if (pAsyncMouse)
-      pAsyncMouse->Resume();
-  }
-}
+  void CShow::PlayMovie(MovieType eVideo, bool bShowMouseAfterPlayback);
 
 
   void (__thiscall ***vdestructor_ptr)(CShow *, bool);
--- a/Chest.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/Chest.cpp	Tue May 21 02:24:31 2013 +0200
@@ -1,13 +1,14 @@
 #include <stdio.h>
 #include <assert.h>
 
+#include "BSPModel.h"
+#include "Items.h"
 #include "Chest.h"
 #include "FrameTableInc.h"
 #include "Allocator.h"
 #include "LOD.h"
 #include "MapInfo.h"
 #include "Actor.h"
-#include "Indoor.h"
 #include "Outdoor.h"
 #include "DecorationList.h"
 #include "Party.h"
@@ -17,10 +18,10 @@
 #include "ObjectList.h"
 #include "GUIWindow.h"
 #include "Time.h"
-#include "Overlays.h"
 
 #include "mm7_data.h"
 #include "MM7.h"
+#include "SpriteObject.h"
 
 
 
--- a/Chest.h	Sun May 19 20:39:45 2013 +0400
+++ b/Chest.h	Tue May 21 02:24:31 2013 +0200
@@ -1,5 +1,4 @@
 #pragma once
-#include "Items.h"
 
 
 
--- a/DecalBuilder.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/DecalBuilder.cpp	Tue May 21 02:24:31 2013 +0200
@@ -7,7 +7,7 @@
 
 #include "mm7_data.h"
 
-
+#include "stru9.h"
 
 
 
--- a/Events.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/Events.cpp	Tue May 21 02:24:31 2013 +0200
@@ -1,15 +1,16 @@
 #include <assert.h>
 #include <stdlib.h>
 
+#include "VideoPlayer.h"
+#include "Mouse.h"
+
 #include "MapInfo.h"
 #include "Game.h"
 #include "GUIWindow.h"
-#include "GUIFont.h"
 #include "GUIProgressBar.h"
 #include "Chest.h"
 #include "stru176.h"
 #include "LOD.h"
-#include "NPC.h"
 #include "Actor.h"
 #include "Party.h"
 #include "Math.h"
@@ -17,16 +18,12 @@
 #include "Indoor.h"
 #include "Viewport.h"
 #include "texts.h"
-#include "Texture.h"
 #include "Allocator.h"
-#include "mm7_data.h"
 #include "stru123.h"
 #include "stru159.h"
 #include "Events.h"
 #include "Events2D.h"
 #include "UIHouses.h"
-#include "Weather.h"
-#include "Party.h"
 #include "MM7.h"
 
 
--- a/GUIButton.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/GUIButton.cpp	Tue May 21 02:24:31 2013 +0200
@@ -1,6 +1,5 @@
 #include "GUIWindow.h"
 #include "GUIFont.h"
-#include "Allocator.h"
 
 #include "mm7_data.h"
 
--- a/GUIWindow.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/GUIWindow.cpp	Tue May 21 02:24:31 2013 +0200
@@ -15,7 +15,6 @@
 #include "Render.h"
 #include "PlayerFrameTable.h"
 #include "SaveLoad.h"
-#include "FactionTable.h"
 #include "StorylineTextTable.h"
 #include "Events2D.h"
 #include "UIHouses.h"
--- a/GUIWindow.h	Sun May 19 20:39:45 2013 +0400
+++ b/GUIWindow.h	Tue May 21 02:24:31 2013 +0200
@@ -1,5 +1,4 @@
 #pragma once
-#include "Items.h"
 #include "Player.h"
 
 
--- a/Game.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/Game.cpp	Tue May 21 02:24:31 2013 +0200
@@ -1,10 +1,23 @@
 #include <assert.h>
 
+#include "Vis.h"
+
+#include "LightmapBuilder.h"
+#include "DecalBuilder.h"
+#include "ParticleEngine.h"
+#include "Mouse.h"
+#include "Keyboard.h"
+#include "CShow.h"
+#include "GammaControl.h"
+#include "stru6.h"
+#include "stru9.h"
+#include "stru10.h"
+#include "stru11.h"
+#include "stru12.h"
+
 #include "Game.h"
 #include "Party.h"
 #include "IndoorCamera.h"
-#include "Math.h"
-#include "LightmapBuilder.h"
 #include "Viewport.h"
 #include "Time.h"
 #include "Outdoor.h"
@@ -13,14 +26,12 @@
 #include "LOD.h"
 #include "OSInfo.h"
 #include "GUIWindow.h"
-#include "Party.h"
 #include "TurnEngine.h"
 #include "VideoPlayer.h"
 #include "Bink_Smacker.h"
 #include "Events.h"
 #include "Arcomage.h"
 #include "texts.h"
-#include "Actor.h"
 #include "GUIFont.h"
 #include "Log.h"
 
--- a/Game.h	Sun May 19 20:39:45 2013 +0400
+++ b/Game.h	Tue May 21 02:24:31 2013 +0200
@@ -1,19 +1,5 @@
 #pragma once
-#include "LightmapBuilder.h"
-#include "DecalBuilder.h"
-#include "ParticleEngine.h"
-#include "Vis.h"
-#include "Mouse.h"
-#include "Keyboard.h"
-#include "IndoorCameraD3D.h"
-#include "CShow.h"
-#include "GammaControl.h"
-#include "stru6.h"
-#include "stru9.h"
-#include "stru10.h"
-#include "stru11.h"
-#include "stru12.h"
-
+#include "VectorTypes.h"
 
 
 #define GAME_FLAGS_1_DRAW_BLV_DEBUGS    0x08
@@ -80,6 +66,20 @@
 };
 #pragma pack(pop)
 
+
+class Vis;
+class LightmapBuilder;
+class ParticleEngine;
+class Mouse;
+class Keyboard;
+class ThreadWard;
+class CShow;
+class GammaController;
+struct stru9;
+struct stru10;
+struct stru11;
+struct stru12;
+
 /*  104 */
 #pragma pack(push, 1)
 struct Game
@@ -90,6 +90,7 @@
 protected: Game();
 protected: virtual ~Game();
 
+
 public:
   void _44E904();
   bool InitializeGammaController();
--- a/GammaControl.h	Sun May 19 20:39:45 2013 +0400
+++ b/GammaControl.h	Tue May 21 02:24:31 2013 +0200
@@ -1,5 +1,5 @@
 #pragma once
-#include "Render.h"
+#include "lib\legacy_dx\d3d.h"
 
 #pragma pack(push, 1)
 struct GammaController
--- a/Indoor.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/Indoor.cpp	Tue May 21 02:24:31 2013 +0200
@@ -1,7 +1,13 @@
 #include <assert.h>
 
+#include "LightmapBuilder.h"
+#include "DecalBuilder.h"
+#include "ParticleEngine.h"
+#include "stru9.h"
+#include "stru10.h"
+
+#include "BSPModel.h"
 #include "Outdoor.h"
-#include "Render.h"
 #include "SpriteObject.h"
 #include "Events.h"
 #include "Game.h"
@@ -23,8 +29,6 @@
 #include "PaletteManager.h"
 #include "MapInfo.h"
 #include "IndoorCamera.h"
-#include "GUIWindow.h"
-#include "GUIFont.h"
 
 #include "mm7_data.h"
 #include "MM7.h"
--- a/Indoor.h	Sun May 19 20:39:45 2013 +0400
+++ b/Indoor.h	Tue May 21 02:24:31 2013 +0200
@@ -1,6 +1,5 @@
 #pragma once
 #include "VectorTypes.h"
-#include "IndoorCameraD3D.h"
 #include "Weather.h"
 
 
--- a/IndoorCameraD3D.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/IndoorCameraD3D.cpp	Tue May 21 02:24:31 2013 +0200
@@ -9,6 +9,8 @@
 #include "LOD.h"
 #include "mm7_data.h"
 
+#include "stru9.h"
+
 //----- (004361EF) --------------------------------------------------------
 IndoorCameraD3D::IndoorCameraD3D()
 {
--- a/Indoor_stuff.h	Sun May 19 20:39:45 2013 +0400
+++ b/Indoor_stuff.h	Tue May 21 02:24:31 2013 +0200
@@ -1,6 +1,6 @@
 #pragma once
 #include "Render.h"
-
+#include "IndoorCameraD3D.h"
 
 
 
--- a/Items.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/Items.cpp	Tue May 21 02:24:31 2013 +0200
@@ -3,7 +3,6 @@
 
 #include "Items.h"
 #include "MapInfo.h"
-#include "FrameTableInc.h"
 #include "Allocator.h"
 #include "GUIWindow.h"
 #include "Events2D.h"
--- a/LOD.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/LOD.cpp	Tue May 21 02:24:31 2013 +0200
@@ -3,10 +3,10 @@
 #include "Allocator.h"
 #include "PaletteManager.h"
 #include "Viewport.h"
-#include "Log.h"
 
 #include "mm7_data.h"
 
+#include "Sprites.h"
 
 
 
--- a/LightmapBuilder.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/LightmapBuilder.cpp	Tue May 21 02:24:31 2013 +0200
@@ -4,10 +4,13 @@
 #include "Outdoor.h"
 #include "Log.h"
 
+#include "OutdoorCamera.h"
+
 #include "mm7_data.h"
 
 
 
+#include "stru9.h"
 
 
 
--- a/MM7.h	Sun May 19 20:39:45 2013 +0400
+++ b/MM7.h	Tue May 21 02:24:31 2013 +0200
@@ -1,5 +1,4 @@
 #pragma once
-#include "OSAPI.h"
 #include <math.h>
 #include <stdio.h>
 #include <stdarg.h>
--- a/MapInfo.h	Sun May 19 20:39:45 2013 +0400
+++ b/MapInfo.h	Tue May 21 02:24:31 2013 +0200
@@ -98,6 +98,7 @@
 extern struct MapStats *pMapStats;
 
 
+extern MapStartPoint uLevel_StartingPointType; // weak
 
 
 void TeleportToStartingPoint(MapStartPoint point); // idb
--- a/Mouse.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/Mouse.cpp	Tue May 21 02:24:31 2013 +0200
@@ -1,13 +1,14 @@
 #include "OSAPI.h"
 
+#include "VideoPlayer.h"
+#include "Vis.h"
 #include "Mouse.h"
 #include "Items.h"
 #include "Party.h"
 #include "LOD.h"
 #include "Game.h"
-#include "Texture.h"
 
-
+#include "stru11.h"
 
 
 
--- a/NPC.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/NPC.cpp	Tue May 21 02:24:31 2013 +0200
@@ -1,14 +1,13 @@
-#include <string.h>
-#include <stdlib.h>
+
 
 #include "Allocator.h"
 #include "texts.h"
-#include "Party.h"
 #include "LOD.h"
 #include "Autonotes.h"
 #include "Awards.h"
 #include "mm7_data.h"
 #include "MM7.h"
+#include "Party.h"
 #include "NPC.h"
 
 int pDialogueNPCCount;
--- a/Outdoor.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/Outdoor.cpp	Tue May 21 02:24:31 2013 +0200
@@ -1,18 +1,19 @@
 #include <assert.h>
 
+#include "stru6.h"
+
+#include "Sprites.h"
+#include "LightmapBuilder.h"
 #include "Outdoor.h"
 #include "Party.h"
 #include "SpriteObject.h"
 #include "LOD.h"
-#include "Render.h"
 #include "Allocator.h"
-#include "Weather.h"
 #include "PaletteManager.h"
 #include "GUIProgressBar.h"
 #include "AudioPlayer.h"
 #include "IndoorCamera.h"
 #include "DecorationList.h"
-#include "TileFrameTable.h"
 #include "Math.h"
 #include "ObjectList.h"
 #include "Game.h"
@@ -27,8 +28,9 @@
 #include "MM7.h"
 
 
-
-
+#include "MapInfo.h"
+#include "OutdoorCamera.h"
+#include "BSPModel.h"
 
 MapStartPoint uLevel_StartingPointType; // weak
 
--- a/Outdoor.h	Sun May 19 20:39:45 2013 +0400
+++ b/Outdoor.h	Tue May 21 02:24:31 2013 +0200
@@ -1,12 +1,9 @@
 #pragma
-#include "BSPModel.h"
-#include "OutdoorCamera.h"
+
 #include "Indoor.h"
 #include "TileFrameTable.h"
-#include "MapInfo.h"
 #include "Weather.h"
 
-
 #define DAY_ATTRIB_FOG  1
 
 /*  256 */
@@ -268,8 +265,6 @@
 
 
 
-extern MapStartPoint uLevel_StartingPointType; // weak
-
 
 
 
--- a/ParticleEngine.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/ParticleEngine.cpp	Tue May 21 02:24:31 2013 +0200
@@ -8,6 +8,8 @@
 #include "Math.h"
 #include "LOD.h"
 
+#include "Sprites.h"
+#include "OutdoorCamera.h"
 #include "mm7_data.h"
 
 //----- (0048AAC5) --------------------------------------------------------
--- a/Player.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/Player.cpp	Tue May 21 02:24:31 2013 +0200
@@ -1,14 +1,15 @@
 #include <assert.h>
 
+#include "stru6.h"
+
+
 #include "OSAPI.h"
 #include "Player.h"
 #include "PlayerFrameTable.h"
-#include "Texture.h"
 #include "AudioPlayer.h"
 #include "Party.h"
 #include "Log.h"
 #include "LOD.h"
-#include "Monsters.h" 
 #include "GUIWindow.h"
 #include "Viewport.h"
 #include "Actor.h"
--- a/Render.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/Render.cpp	Tue May 21 02:24:31 2013 +0200
@@ -1,5 +1,13 @@
 #include <assert.h>
 
+#include "VideoPlayer.h"
+#include "Sprites.h"
+#include "Mouse.h"
+#include "GammaControl.h"
+#include "stru6.h"
+
+#include "DecalBuilder.h"
+#include "ParticleEngine.h"
 #include "Render.h"
 #include "OutdoorCamera.h"
 #include "IndoorCamera.h"
--- a/Render.h	Sun May 19 20:39:45 2013 +0400
+++ b/Render.h	Tue May 21 02:24:31 2013 +0200
@@ -4,7 +4,6 @@
 #include "lib\legacy_dx\d3d.h"
 #include "OSAPI.h"
 
-#include "Sprites.h"
 #include "VectorTypes.h"
 
 struct stru148;
@@ -46,7 +45,8 @@
   Vec2_float_ texcoord;
 };
 
-
+class Sprite;
+class SpriteFrame;
 
 /*  161 */
 #pragma pack(push, 1)
--- a/SaveLoad.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/SaveLoad.cpp	Tue May 21 02:24:31 2013 +0200
@@ -3,7 +3,7 @@
 #include <assert.h>
 
 #include "SaveLoad.h"
-#include "NPC.h"
+#include "BSPModel.h"
 #include "Party.h"
 #include "LOD.h"
 #include "Outdoor.h"
--- a/Spells.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/Spells.cpp	Tue May 21 02:24:31 2013 +0200
@@ -4,7 +4,6 @@
 #include "Overlays.h"
 #include "Allocator.h"
 #include "LOD.h"
-#include "stru123.h"
 #include "texts.h"
 
 #include "mm7_data.h"
--- a/SpriteObject.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/SpriteObject.cpp	Tue May 21 02:24:31 2013 +0200
@@ -1,5 +1,6 @@
 #include <assert.h>
 
+#include "BSPModel.h"
 #include "SpriteObject.h"
 #include "Party.h"
 #include "TurnEngine.h"
--- a/Sprites.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/Sprites.cpp	Tue May 21 02:24:31 2013 +0200
@@ -1,4 +1,5 @@
 #include <string.h>
+#include <algorithm>
 
 #include "Allocator.h"
 #include "Sprites.h"
@@ -217,75 +218,43 @@
 
 //----- (0044D813) --------------------------------------------------------
 signed int SpriteFrameTable::FastFindSprite( char *pSpriteName )
-    {
-  SpriteFrameTable *v2; // esi@1
-  int v3; // eax@1
+{
   signed int result; // eax@2
 
-  v2 = this;
-  BinarySearch(0, this->uNumEFrames, pSpriteName);
-  v3 = v2->field_8;
-  if ( v3 < 0 )
+  int searchResult = BinarySearch(pSpriteName);
+  if ( searchResult < 0 )
     result = 0;
   else
-    result = v2->pSpriteEFrames[v3];
+      result = this->pSpriteEFrames[searchResult];
   return result;
 }
 
 //----- (0044D83A) --------------------------------------------------------
-void SpriteFrameTable::BinarySearch(int a2, int a3, const char *pSpriteName)
+int SpriteFrameTable::BinarySearch( const char *pSpriteName )
 {
-  int v4; // ebx@1
-  SpriteFrameTable *v5; // edi@1
-  int v6; // esi@2
-  int v7; // eax@2
-  int a2a; // [sp+14h] [bp+8h]@2
-
-  v4 = a2;
-  v5 = this;
-  while ( 1 )
-  {
-    a2a = a3 - v4;
-    v6 = (a3 - v4) / 2 + v4;
-    v7 = _strcmpi(pSpriteName, v5->pSpritePFrames[v6]->pIconName);
-    if ( !v7 )
-      v5->field_8 = v6;
-    if ( v4 == a3 )
-      break;
-    if ( v7 >= 0 )
+    int startPos = 0;
+    int endPos = uNumEFrames;
+    while ( 1 )
     {
-      if ( a2a <= 4 )
-      {
-        while ( v4 < a3 )
+        int searchRange = endPos - startPos;
+        int middleFrameIndex = (endPos - startPos) / 2 + startPos;
+        int comparisonResult = _stricmp(pSpriteName, this->pSpritePFrames[middleFrameIndex]->pIconName);
+        if ( !comparisonResult )
         {
-          if ( !_strcmpi(pSpriteName, v5->pSpritePFrames[v4]->pIconName) )
-          {
-LABEL_19:
-            v5->field_8 = v4;
-            return;
-          }
-          ++v4;
+            return middleFrameIndex;
+        }
+        if ( startPos == endPos )
+        {
+            return -1;
         }
-        break;
-      }
-      v4 += (a3 - v4) / 2;
+        if ( comparisonResult >= 0 )
+        {
+            startPos += max(((endPos - startPos) / 2), 1);
+        }
+        else{
+            endPos = max(((endPos - startPos) / 2), 1) + startPos;
+        }
     }
-    else
-    {
-      if ( a2a <= 4 )
-      {
-        while ( v4 < a3 )
-        {
-          if ( !_strcmpi(pSpriteName, v5->pSpritePFrames[v4]->pIconName) )
-            goto LABEL_19;
-          ++v4;
-        }
-        break;
-      }
-      a3 = (a3 - v4) / 2 + v4;
-    }
-  }
-  v5->field_8 = -1;
 }
 
 //----- (0044D8D0) --------------------------------------------------------
--- a/Sprites.h	Sun May 19 20:39:45 2013 +0400
+++ b/Sprites.h	Tue May 21 02:24:31 2013 +0200
@@ -5,18 +5,18 @@
 #pragma pack(push, 1)
 struct Sprite  //28h
 {
-  void Release();
+    void Release();
 
-  const char *pName;  //0
-  int uPaletteID; //4
-  struct IDirectDrawSurface4 *pTextureSurface;  //8
-  struct IDirect3DTexture2 *pTexture;   //ch
-  int uAreaX;  //10h
-  int uAreaY;  //14h
-  int uBufferWidth;  //18h
-  int uBufferHeight;  //1ch
-  int uAreaWidth;  //20h
-  int uAreaHeight; //24h
+    const char *pName;  //0
+    int uPaletteID; //4
+    struct IDirectDrawSurface4 *pTextureSurface;  //8
+    struct IDirect3DTexture2 *pTexture;   //ch
+    int uAreaX;  //10h
+    int uAreaY;  //14h
+    int uBufferWidth;  //18h
+    int uBufferHeight;  //1ch
+    int uAreaWidth;  //20h
+    int uAreaHeight; //24h
 };
 #pragma pack(pop)
 
@@ -25,17 +25,17 @@
 #pragma pack(push, 1)
 struct SpriteFrame
 {
-  char pIconName[12]; 
-  char pTextureName[12]; //c
-  __int16 pHwSpriteIDs[8]; //18h
-  int scale; //28h
-  int uFlags; //2c
-  __int16 uGlowRadius; //30
-  __int16 uPaletteID;  //32
-  __int16 uPaletteIndex;
-  __int16 uAnimTime;
-  __int16 uAnimLength;
-  __int16 _pad;
+    char pIconName[12]; 
+    char pTextureName[12]; //c
+    __int16 pHwSpriteIDs[8]; //18h
+    int scale; //28h
+    int uFlags; //2c
+    __int16 uGlowRadius; //30
+    __int16 uPaletteID;  //32
+    __int16 uPaletteIndex;
+    __int16 uAnimTime;
+    __int16 uAnimLength;
+    __int16 _pad;
 };
 #pragma pack(pop)
 
@@ -43,31 +43,31 @@
 #pragma pack(push, 1)
 struct SpriteFrameTable
 {
-  //----- (0044D4BA) --------------------------------------------------------
-  inline SpriteFrameTable()
-  {
-    uNumSpriteFrames = 0;
-    pSpriteSFrames = nullptr;
-    pSpritePFrames = nullptr;
-    pSpriteEFrames = nullptr;
-  }
-  void ToFile();
-  void FromFile(void *pSerialized);
-  bool FromFileTxt(const char *Args);
-  void ReleaseSFrames();
-  void ResetSomeSpriteFlags();
-  void InitializeSprite(signed int uSpriteID);
-  signed int FastFindSprite(char *pSpriteName);
-  void BinarySearch(int a2, int a3, const char *pSpriteName);
-  SpriteFrame *GetFrame(unsigned int uSpriteID, unsigned int uTime);
-  SpriteFrame *GetFrameBy_x(unsigned int uSpriteID, signed int a3);
+    //----- (0044D4BA) --------------------------------------------------------
+    inline SpriteFrameTable()
+    {
+        uNumSpriteFrames = 0;
+        pSpriteSFrames = nullptr;
+        pSpritePFrames = nullptr;
+        pSpriteEFrames = nullptr;
+    }
+    void ToFile();
+    void FromFile(void *pSerialized);
+    bool FromFileTxt(const char *Args);
+    void ReleaseSFrames();
+    void ResetSomeSpriteFlags();
+    void InitializeSprite(signed int uSpriteID);
+    signed int FastFindSprite(char *pSpriteName);
+    int BinarySearch(const char *pSpriteName);
+    SpriteFrame *GetFrame(unsigned int uSpriteID, unsigned int uTime);
+    SpriteFrame *GetFrameBy_x(unsigned int uSpriteID, signed int a3);
 
-  signed int uNumSpriteFrames;
-  unsigned int uNumEFrames;//field_4;
-  int field_8;
-  struct SpriteFrame *pSpriteSFrames;  //0c
-  struct SpriteFrame **pSpritePFrames; //10h
-  __int16 *pSpriteEFrames; //14h
+    signed int uNumSpriteFrames;
+    unsigned int uNumEFrames;//field_4;
+    int unused_field;          //field_8
+    struct SpriteFrame *pSpriteSFrames;  //0c
+    struct SpriteFrame **pSpritePFrames; //10h
+    __int16 *pSpriteEFrames; //14h
 };
 #pragma pack(pop)
 
--- a/UIBooks.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/UIBooks.cpp	Tue May 21 02:24:31 2013 +0200
@@ -2,43 +2,21 @@
 
 #include "MM7.h"
 
+#include "Mouse.h"
+
 #include "MapInfo.h"
-#include "Game.h"
 #include "GUIWindow.h"
 #include "GUIFont.h"
-#include "GUIProgressBar.h"
 #include "Party.h"
 #include "AudioPlayer.h"
 #include "Outdoor.h"
-#include "IndoorCamera.h"
-#include "Overlays.h"
-#include "Monsters.h"
-#include "Arcomage.h"
 #include "LOD.h"
-#include "Actor.h"
 #include "Allocator.h"
-#include "Events.h"
 #include "Viewport.h"
-#include "FrameTableInc.h"
 #include "Math.h"
-#include "SpriteObject.h"
-#include "ObjectList.h"
-#include "Chest.h"
-#include "PaletteManager.h"
-#include "DecorationList.h"
-#include "SaveLoad.h"
-#include "stru123.h"
-#include "Time.h"
-#include "IconFrameTable.h"
 #include "Awards.h"
 #include "Autonotes.h"
-#include "stru160.h"
-#include "TurnEngine.h"
-#include "CastSpellInfo.h"
-#include "Weather.h"
-#include "stru298.h"
 #include "StorylineTextTable.h"
-#include "Events2D.h"
 #include "texts.h"
 
 #include "mm7_data.h"
--- a/UICharacter.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/UICharacter.cpp	Tue May 21 02:24:31 2013 +0200
@@ -11,34 +11,11 @@
 #include "AudioPlayer.h"
 #include "Outdoor.h"
 #include "IndoorCamera.h"
-#include "Overlays.h"
-#include "Monsters.h"
-#include "Arcomage.h"
 #include "LOD.h"
-#include "Actor.h"
-#include "Allocator.h"
-#include "Events.h"
 #include "Viewport.h"
-#include "FrameTableInc.h"
-#include "Math.h"
-#include "SpriteObject.h"
-#include "ObjectList.h"
-#include "Chest.h"
-#include "PaletteManager.h"
-#include "DecorationList.h"
-#include "SaveLoad.h"
-#include "stru123.h"
 #include "Time.h"
-#include "IconFrameTable.h"
 #include "Awards.h"
-#include "Autonotes.h"
-#include "stru160.h"
-#include "TurnEngine.h"
 #include "CastSpellInfo.h"
-#include "Weather.h"
-#include "stru298.h"
-#include "StorylineTextTable.h"
-#include "Events2D.h"
 #include "texts.h"
 
 #include "mm7_data.h"
--- a/UIHouses.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/UIHouses.cpp	Tue May 21 02:24:31 2013 +0200
@@ -26,6 +26,7 @@
 #include "mm7_data.h"
 #include "Game.h"
 
+#include "stru159.h"
 int uHouse_ExitPic; // weak
 
 int dword_591080; // weak
--- a/UIHouses.h	Sun May 19 20:39:45 2013 +0400
+++ b/UIHouses.h	Tue May 21 02:24:31 2013 +0200
@@ -1,5 +1,4 @@
 #pragma once
-#include "stru159.h"
 
 enum HOUSE_DIALOGUE_MENU: unsigned __int32
 {
@@ -135,6 +134,5 @@
 
 extern int uHouse_ExitPic; // weak
 extern int dword_591080; // weak
-extern  const stru159 pAnimatedRooms[196];
 extern int in_current_building_type; // 00F8B198
 extern HOUSE_DIALOGUE_MENU dialog_menu_id; // 00F8B19C
\ No newline at end of file
--- a/UIMainMenu.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/UIMainMenu.cpp	Tue May 21 02:24:31 2013 +0200
@@ -2,6 +2,9 @@
 
 #include "MM7.h"
 
+#include "Mouse.h"
+#include "Keyboard.h"
+
 #include "MapInfo.h"
 #include "Game.h"
 #include "GUIWindow.h"
--- a/UIOptions.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/UIOptions.cpp	Tue May 21 02:24:31 2013 +0200
@@ -2,6 +2,13 @@
 
 #include "MM7.h"
 
+#include "Keyboard.h"
+#include "IndoorCameraD3D.h"
+#include "CShow.h"
+#include "GammaControl.h"
+#include "stru6.h"
+#include "stru9.h"
+
 #include "MapInfo.h"
 #include "Game.h"
 #include "GUIWindow.h"
--- a/UIPartyCreation.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/UIPartyCreation.cpp	Tue May 21 02:24:31 2013 +0200
@@ -2,6 +2,20 @@
 
 #include "MM7.h"
 
+#include "LightmapBuilder.h"
+#include "DecalBuilder.h"
+#include "ParticleEngine.h"
+#include "Mouse.h"
+#include "Keyboard.h"
+#include "IndoorCameraD3D.h"
+#include "CShow.h"
+#include "GammaControl.h"
+#include "stru6.h"
+#include "stru9.h"
+#include "stru10.h"
+#include "stru11.h"
+#include "stru12.h"
+
 #include "MapInfo.h"
 #include "Game.h"
 #include "GUIWindow.h"
--- a/UIPopup.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/UIPopup.cpp	Tue May 21 02:24:31 2013 +0200
@@ -2,6 +2,10 @@
 
 #include "MM7.h"
 
+#include "Mouse.h"
+
+#include "Sprites.h"
+#include "Vis.h"
 #include "MapInfo.h"
 #include "Game.h"
 #include "GUIWindow.h"
--- a/UISaveLoad.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/UISaveLoad.cpp	Tue May 21 02:24:31 2013 +0200
@@ -2,6 +2,9 @@
 #include <io.h>
 #include "MM7.h"
 
+#include "Mouse.h"
+#include "Keyboard.h"
+
 #include "MapInfo.h"
 #include "Game.h"
 #include "GUIWindow.h"
--- a/UiGame.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/UiGame.cpp	Tue May 21 02:24:31 2013 +0200
@@ -2,6 +2,22 @@
 
 #include "MM7.h"
 
+#include "BSPModel.h"
+#include "LightmapBuilder.h"
+#include "DecalBuilder.h"
+#include "ParticleEngine.h"
+#include "Mouse.h"
+#include "Keyboard.h"
+#include "IndoorCameraD3D.h"
+#include "CShow.h"
+#include "GammaControl.h"
+#include "stru6.h"
+#include "stru9.h"
+#include "stru10.h"
+#include "stru11.h"
+#include "stru12.h"
+
+#include "Vis.h"
 #include "MapInfo.h"
 #include "Game.h"
 #include "GUIWindow.h"
--- a/VideoPlayer.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/VideoPlayer.cpp	Tue May 21 02:24:31 2013 +0200
@@ -2,6 +2,9 @@
 
 #include "Bink_Smacker.h"
 
+#include "CShow.h"
+#include "Mouse.h"
+
 #include "OSInfo.h"
 #include "VideoPlayer.h"
 #include "AudioPlayer.h"
--- a/Vis.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/Vis.cpp	Tue May 21 02:24:31 2013 +0200
@@ -1,5 +1,6 @@
 #include <assert.h>
 
+#include "BSPModel.h"
 #include "Vis.h"
 #include "Outdoor.h"
 #include "Game.h"
--- a/mm7_1.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/mm7_1.cpp	Tue May 21 02:24:31 2013 +0200
@@ -7,44 +7,31 @@
 //#include <defs.h>
 #include <assert.h>
 
+#include "VideoPlayer.h"
+#include "BSPModel.h"
+#include "Mouse.h"
+
+#include "Vis.h"
 #include "MM7.h"
-#include "MapInfo.h"
 #include "Game.h"
 #include "GUIWindow.h"
-#include "GUIFont.h"
-#include "GUIProgressBar.h"
 #include "Party.h"
 #include "AudioPlayer.h"
 #include "Outdoor.h"
-#include "IndoorCamera.h"
 #include "Overlays.h"
-#include "Monsters.h"
-#include "Arcomage.h"
 #include "LOD.h"
 #include "Actor.h"
 #include "Allocator.h"
 #include "Events.h"
 #include "Viewport.h"
-#include "FrameTableInc.h"
-#include "Math.h"
 #include "SpriteObject.h"
 #include "ObjectList.h"
 #include "Chest.h"
-#include "PaletteManager.h"
 #include "DecorationList.h"
-#include "SaveLoad.h"
 #include "stru123.h"
 #include "Time.h"
 #include "IconFrameTable.h"
-#include "Awards.h"
-#include "Autonotes.h"
-#include "stru160.h"
 #include "TurnEngine.h"
-#include "CastSpellInfo.h"
-#include "Weather.h"
-#include "stru298.h"
-#include "StorylineTextTable.h"
-#include "Events2D.h"
 #include "texts.h"
 #include "UIHouses.h"
 #include "mm7_data.h"
--- a/mm7_2.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/mm7_2.cpp	Tue May 21 02:24:31 2013 +0200
@@ -1,7 +1,24 @@
 #include <io.h>
 #include <direct.h>
 #include <assert.h>
-
+#include <windows.h>
+
+
+#include "VideoPlayer.h"
+#include "Sprites.h"
+#include "BSPModel.h"
+#include "OutdoorCamera.h"
+
+#include "LightmapBuilder.h"
+#include "DecalBuilder.h"
+#include "ParticleEngine.h"
+#include "Mouse.h"
+#include "Keyboard.h"
+#include "CShow.h"
+#include "GammaControl.h"
+#include "stru6.h"
+
+#include "Vis.h"
 #include "MapInfo.h"
 #include "Game.h"
 #include "GUIWindow.h"
@@ -11,7 +28,6 @@
 #include "Outdoor.h"
 #include "IndoorCamera.h"
 #include "Overlays.h"
-#include "Monsters.h"
 #include "Arcomage.h"
 #include "LOD.h"
 #include "Actor.h"
@@ -32,20 +48,14 @@
 #include "IconFrameTable.h"
 #include "GUIProgressBar.h"
 #include "Bink_Smacker.h"
-#include "TileFrameTable.h"
 #include "PlayerFrameTable.h"
-#include "Awards.h"
-#include "Autonotes.h"
-#include "stru160.h"
 #include "TurnEngine.h"
 #include "FactionTable.h"
 #include "StorylineTextTable.h"
 #include "Random.h"
 #include "CastSpellInfo.h"
 #include "stru298.h"
-#include "stru12.h"
 #include "Events2D.h"
-#include "stru159.h"
 #include "Log.h"
 #include "UIHouses.h"
 #include "texts.h"
--- a/mm7_3.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/mm7_3.cpp	Tue May 21 02:24:31 2013 +0200
@@ -1,5 +1,17 @@
 #include <assert.h>
 
+
+#include "VideoPlayer.h"
+#include "Sprites.h"
+#include "BSPModel.h"
+#include "OutdoorCamera.h"
+#include "LightmapBuilder.h"
+#include "DecalBuilder.h"
+#include "ParticleEngine.h"
+#include "Mouse.h"
+#include "Keyboard.h"
+#include "stru6.h"
+
 #include "MapInfo.h"
 #include "Game.h"
 #include "GUIWindow.h"
@@ -10,33 +22,23 @@
 #include "Outdoor.h"
 #include "IndoorCamera.h"
 #include "Overlays.h"
-#include "Monsters.h"
-#include "Arcomage.h"
 #include "LOD.h"
 #include "Actor.h"
 #include "Allocator.h"
 #include "Events.h"
 #include "Viewport.h"
-#include "FrameTableInc.h"
 #include "Math.h"
 #include "SpriteObject.h"
 #include "ObjectList.h"
-#include "Chest.h"
 #include "PaletteManager.h"
 #include "DecorationList.h"
-#include "SaveLoad.h"
 #include "stru123.h"
 #include "Time.h"
 #include "IconFrameTable.h"
 #include "TurnEngine.h"
-#include "Awards.h"
-#include "Autonotes.h"
-#include "stru160.h"
-#include "Weather.h"
 #include "stru220.h"
 #include "Events2D.h"
 #include "stru176.h"
-#include "stru159.h"
 #include "stru298.h"
 #include "texts.h"
 #include "Log.h"
--- a/mm7_4.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/mm7_4.cpp	Tue May 21 02:24:31 2013 +0200
@@ -1,7 +1,15 @@
-#include <io.h>
-#include <direct.h>
 #include <assert.h>
 
+#include "VideoPlayer.h"
+#include "Sprites.h"
+#include "BSPModel.h"
+#include "OutdoorCamera.h"
+#include "Mouse.h"
+#include "stru6.h"
+#include "stru11.h"
+#include "stru12.h"
+
+#include "LightmapBuilder.h"
 #include "MM7.h"
 #include "MapInfo.h"
 #include "Game.h"
@@ -11,9 +19,6 @@
 #include "AudioPlayer.h"
 #include "Outdoor.h"
 #include "IndoorCamera.h"
-#include "Overlays.h"
-#include "Monsters.h"
-#include "Arcomage.h"
 #include "LOD.h"
 #include "Actor.h"
 #include "Allocator.h"
@@ -23,27 +28,12 @@
 #include "Math.h"
 #include "SpriteObject.h"
 #include "ObjectList.h"
-#include "Chest.h"
-#include "PaletteManager.h"
 #include "DecorationList.h"
-#include "SaveLoad.h"
-#include "stru123.h"
 #include "Time.h"
 #include "IconFrameTable.h"
-#include "GUIProgressBar.h"
-#include "Bink_Smacker.h"
-#include "TileFrameTable.h"
 #include "PlayerFrameTable.h"
 #include "Awards.h"
-#include "Autonotes.h"
-#include "stru160.h"
 #include "TurnEngine.h"
-#include "FactionTable.h"
-#include "StorylineTextTable.h"
-#include "Random.h"
-#include "CastSpellInfo.h"
-#include "stru298.h"
-#include "stru12.h"
 #include "Events2D.h"
 #include "stru159.h"
 #include "texts.h"
--- a/mm7_5.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/mm7_5.cpp	Tue May 21 02:24:31 2013 +0200
@@ -1,7 +1,19 @@
 #include <assert.h>
 
+#include "VideoPlayer.h"
+#include "Sprites.h"
+#include "MapInfo.h"
+#include "BSPModel.h"
+#include "OutdoorCamera.h"
+#include "LightmapBuilder.h"
+#include "DecalBuilder.h"
+#include "Mouse.h"
+#include "Keyboard.h"
+#include "GammaControl.h"
+#include "stru11.h"
+
+#include "Vis.h"
 #include "mm7.h"
-#include "MapInfo.h"
 #include "Game.h"
 #include "GUIWindow.h"
 #include "GUIFont.h"
@@ -9,13 +21,9 @@
 #include "Party.h"
 #include "AudioPlayer.h"
 #include "Outdoor.h"
-#include "IndoorCamera.h"
-#include "Overlays.h"
-#include "Monsters.h"
 #include "Arcomage.h"
 #include "LOD.h"
 #include "Actor.h"
-#include "Allocator.h"
 #include "Events.h"
 #include "Viewport.h"
 #include "FrameTableInc.h"
@@ -24,19 +32,11 @@
 #include "ObjectList.h"
 #include "Chest.h"
 #include "PaletteManager.h"
-#include "DecorationList.h"
 #include "SaveLoad.h"
-#include "stru123.h"
 #include "Time.h"
-#include "IconFrameTable.h"
-#include "Awards.h"
-#include "Autonotes.h"
-#include "stru160.h"
 #include "TurnEngine.h"
 #include "CastSpellInfo.h"
-#include "Weather.h"
 #include "stru298.h"
-#include "StorylineTextTable.h"
 #include "Events2D.h"
 #include "texts.h"
 #include "Log.h"
--- a/mm7_6.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/mm7_6.cpp	Tue May 21 02:24:31 2013 +0200
@@ -1,44 +1,37 @@
 #include "MM7.h"
 
-#include "MapInfo.h"
+
+
+#include "Sprites.h"
+#include "BSPModel.h"
+#include "OutdoorCamera.h"
+#include "Mouse.h"
+#include "Keyboard.h"
+#include "stru6.h"
+
+#include "Vis.h"
 #include "Game.h"
 #include "GUIWindow.h"
 #include "GUIFont.h"
-#include "GUIProgressBar.h"
 #include "Party.h"
 #include "AudioPlayer.h"
 #include "Outdoor.h"
-#include "IndoorCamera.h"
 #include "Overlays.h"
-#include "Monsters.h"
-#include "Arcomage.h"
 #include "LOD.h"
 #include "Actor.h"
-#include "Allocator.h"
 #include "Events.h"
 #include "Viewport.h"
-#include "FrameTableInc.h"
 #include "Math.h"
 #include "SpriteObject.h"
 #include "ObjectList.h"
-#include "Chest.h"
-#include "PaletteManager.h"
-#include "DecorationList.h"
-#include "SaveLoad.h"
 #include "stru123.h"
 #include "Time.h"
 #include "IconFrameTable.h"
 #include "Awards.h"
-#include "Autonotes.h"
-#include "stru160.h"
 #include "TurnEngine.h"
 #include "CastSpellInfo.h"
-#include "Weather.h"
 #include "stru298.h"
 #include "texts.h"
-#include "StorylineTextTable.h"
-#include "Events2D.h"
-#include "Log.h"
 
 #include "mm7_data.h"
 
--- a/mm7_data.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/mm7_data.cpp	Tue May 21 02:24:31 2013 +0200
@@ -1,7 +1,5 @@
 #include "mm7_data.h"
 
-#include "NPC.h"
-#include "Actor.h"
 #include "GUIWindow.h"
 #include "Party.h"
 
--- a/mm7_data.h	Sun May 19 20:39:45 2013 +0400
+++ b/mm7_data.h	Tue May 21 02:24:31 2013 +0200
@@ -1,8 +1,7 @@
 #pragma once
 #include <string>
+#include "VectorTypes.h"
 #include "OSAPI.h"
-#include "SpriteObject.h"
-#include "VectorTypes.h"
 
 typedef char _UNKNOWN;
 
--- a/stru11.h	Sun May 19 20:39:45 2013 +0400
+++ b/stru11.h	Tue May 21 02:24:31 2013 +0200
@@ -1,6 +1,7 @@
 #pragma once
 
 
+#include "mm7_data.h"
 /*  128 */
 #pragma pack(push, 1)
 struct stru11
--- a/stru159.h	Sun May 19 20:39:45 2013 +0400
+++ b/stru159.h	Tue May 21 02:24:31 2013 +0200
@@ -14,3 +14,6 @@
   unsigned __int16 padding_e;
 };
 #pragma pack(pop)
+
+
+extern  const stru159 pAnimatedRooms[196];
\ No newline at end of file
--- a/stru6.cpp	Sun May 19 20:39:45 2013 +0400
+++ b/stru6.cpp	Tue May 21 02:24:31 2013 +0200
@@ -1,4 +1,7 @@
 #include "stru6.h"
+
+#include "mm7_data.h"
+#include "LightmapBuilder.h"
 #include "SpriteObject.h"
 #include "IndoorCameraD3D.h"
 #include "ParticleEngine.h"