changeset 2336:d6887ee81068

header file include cleanup
author Grumpy7
date Wed, 02 Apr 2014 23:21:34 +0200
parents 6e3ca612f132
children d04017f3d2fa 182effc4b0ee
files Actor.cpp Arcomage.cpp AudioPlayer.cpp CastSpellInfo.cpp Chest.cpp ErrorHandling.h Events.cpp GUIFont.cpp GUIProgressBar.cpp GUIWindow.cpp GUIWindow.h Game.cpp IconFrameTable.cpp Indoor.cpp IndoorCameraD3D.cpp Items.cpp LOD.cpp LOD.h Monsters.cpp Mouse.cpp NPC.cpp OSWindow.cpp Outdoor.cpp Overlays.cpp PaletteManager.cpp Party.cpp Party.h Player.cpp Render.cpp SaveLoad.cpp Spells.cpp SpriteObject.cpp Sprites.cpp Texture.cpp TileTable.cpp TurnEngine.cpp UI/Books/UIMapBook.cpp UI/Books/UINotesBooks.cpp UI/UICharacter.cpp UI/UIGuilds.cpp UI/UIHouses.cpp UI/UIMainMenu.cpp UI/UIPartyCreation.cpp UI/UIPopup.cpp UI/UIRest.cpp UI/UISaveLoad.cpp UI/UIShops.cpp UI/UITransition.cpp UI/UiGame.cpp VideoPlayer.cpp Viewport.cpp mm7_2.cpp mm7_3.cpp mm7_4.cpp mm7_5.cpp mm7_unsorted_subs.h
diffstat 56 files changed, 103 insertions(+), 59 deletions(-) [+]
line wrap: on
line diff
--- a/Actor.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/Actor.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,5 +1,8 @@
 #define _CRT_SECURE_NO_WARNINGS
 
+#include "ErrorHandling.h"
+#include "VectorTypes.h"
+#include "mm7_unsorted_subs.h"
 #include "mm7_data.h"
 #include "DecalBuilder.h"
 
--- a/Arcomage.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/Arcomage.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,5 +1,6 @@
 #define _CRT_SECURE_NO_WARNINGS
 #include <string>
+#include "mm7_unsorted_subs.h"
 
 #include "Render.h"
 #include "Arcomage.h"
--- a/AudioPlayer.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/AudioPlayer.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,5 +1,6 @@
 #define _CRT_SECURE_NO_WARNINGS
 
+#include "mm7_unsorted_subs.h"
 #include <string>
 
 #include "mm7_data.h"
--- a/CastSpellInfo.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/CastSpellInfo.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -26,6 +26,7 @@
 #include "texts.h"
 #include "LOD.h"
 #include "Level/Decoration.h"
+#include "mm7_unsorted_subs.h"
 
 const size_t CastSpellInfoCount = 10;
 std::array<CastSpellInfo, CastSpellInfoCount> pCastSpellInfo;
--- a/Chest.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/Chest.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,5 +1,7 @@
 #define _CRT_SECURE_NO_WARNINGS
 #include <stdio.h>
+#include "mm7_unsorted_subs.h"
+#include "ErrorHandling.h"
 
 #include "BSPModel.h"
 #include "Items.h"
--- a/ErrorHandling.h	Wed Apr 02 22:05:35 2014 +0600
+++ b/ErrorHandling.h	Wed Apr 02 23:21:34 2014 +0200
@@ -7,6 +7,7 @@
 
 
 #include <stdarg.h>
+#include <stdio.h>
 inline __declspec(noreturn) void Error_impl_(const char *filename, const char *functionname, int line,
                                              const char *format, ...)
 {
--- a/Events.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/Events.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,5 +1,7 @@
 #define _CRT_SECURE_NO_WARNINGS
 #include <stdlib.h>
+#include "mm7_unsorted_subs.h"
+#include "ErrorHandling.h"
 
 #include "Weather.h"
 #include "Texture.h"
--- a/GUIFont.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/GUIFont.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,5 +1,6 @@
 #define _CRT_SECURE_NO_WARNINGS
 #include <string>
+#include "ErrorHandling.h"
 
 #include "LOD.h"
 #include "GUIFont.h"
--- a/GUIProgressBar.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/GUIProgressBar.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,5 +1,6 @@
 #define _CRT_SECURE_NO_WARNINGS
 #include "GUIProgressBar.h"
+#include "ErrorHandling.h"
 #include "LOD.h"
 #include "Mouse.h"
 #include "Party.h"
--- a/GUIWindow.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/GUIWindow.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,4 +1,6 @@
 #define _CRT_SECURE_NO_WARNINGS
+#include "ErrorHandling.h"
+#include "mm7_unsorted_subs.h"
 #include "GUIWindow.h"
 #include "GUIFont.h"
 #include "Party.h"
--- a/GUIWindow.h	Wed Apr 02 22:05:35 2014 +0600
+++ b/GUIWindow.h	Wed Apr 02 23:21:34 2014 +0200
@@ -589,6 +589,7 @@
 
 
 
+void UI_OnMouseRightClick(Vec2_int_ *_this);
 
 void __fastcall DrawPopupWindow(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight); // idb
 void DrawMM7CopyrightWindow();
--- a/Game.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/Game.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,4 +1,5 @@
 #define _CRT_SECURE_NO_WARNINGS
+#include "mm7_unsorted_subs.h"
 #include "Vis.h"
 #include "Weather.h"
 #include "LightmapBuilder.h"
--- a/IconFrameTable.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/IconFrameTable.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,4 +1,5 @@
 #define _CRT_SECURE_NO_WARNINGS
+#include "ErrorHandling.h"
 #include "IconFrameTable.h"
 #include "LOD.h"
 #include "mm7_data.h"
--- a/Indoor.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/Indoor.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,4 +1,6 @@
 #define _CRT_SECURE_NO_WARNINGS
+#include "ErrorHandling.h"
+#include "mm7_unsorted_subs.h"
 #include "LightmapBuilder.h"
 #include "DecalBuilder.h"
 #include "stru9.h"
--- a/IndoorCameraD3D.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/IndoorCameraD3D.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,4 +1,5 @@
 #define _CRT_SECURE_NO_WARNINGS
+#include "ErrorHandling.h"
 #include "IndoorCameraD3D.h"
 #include "VectorTypes.h"
 #include "Game.h"
--- a/Items.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/Items.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,6 +1,8 @@
 #define _CRT_SECURE_NO_WARNINGS
 #include <stdlib.h>
 #include <string>
+#include "mm7_unsorted_subs.h"
+#include "ErrorHandling.h"
 
 #include "Items.h"
 #include "MapInfo.h"
--- a/LOD.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/LOD.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,8 +1,10 @@
 #define _CRT_SECURE_NO_WARNINGS
+#include "ErrorHandling.h"
 #include "LOD.h"
 #include "Render.h"
 #include "PaletteManager.h"
 #include "Viewport.h"
+#include "mm7_data.h"
 
 #include "mm7_data.h"
 #include "mm7_unsorted_subs.h"
@@ -2860,6 +2862,18 @@
 //  }
 //  return v4;
 }
+
+Texture * LODFile_IconsBitmaps::GetTexture( int idx )
+{
+  Assert(idx < MAX_LOD_TEXTURES, "Texture index out of bounds (%u)", idx);
+  if (idx == -1) 
+  {
+    //Log::Warning(L"Texture id = %d missing", idx);
+    return pTextures + LoadDummyTexture();
+  }
+  return pTextures + idx;
+}
+
 //----- (0046082C) --------------------------------------------------------
 bool Initialize_GamesLOD_NewLOD()
 {
--- a/LOD.h	Wed Apr 02 22:05:35 2014 +0600
+++ b/LOD.h	Wed Apr 02 23:21:34 2014 +0200
@@ -4,7 +4,6 @@
 
 #include "Log.h"
 #include "Texture.h"
-#include "ErrorHandling.h"
 
 class Sprite;
 
@@ -177,16 +176,7 @@
     return LoadTextureFromLOD(&pTextures[uNumLoadedFiles], "pending", TEXTURE_16BIT_PALETTE);
   }
 
-  inline Texture *GetTexture(int idx)
-  {
-    Assert(idx < MAX_LOD_TEXTURES, "Texture index out of bounds (%u)", idx);
-    if (idx == -1) 
-    {
-      //Log::Warning(L"Texture id = %d missing", idx);
-      return pTextures + LoadDummyTexture();
-    }
-    return pTextures + idx;
-  }
+  Texture *GetTexture(int idx);
 
 
   /*FILE *pFile;
--- a/Monsters.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/Monsters.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -2,6 +2,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
+#include "ErrorHandling.h"
 
 #include "Monsters.h"
 #include "FrameTableInc.h"
--- a/Mouse.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/Mouse.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,4 +1,5 @@
 #define _CRT_SECURE_NO_WARNINGS
+#include "mm7_unsorted_subs.h"
 #include "Texture.h"
 #include "mm7_data.h"
 #include "Render.h"
--- a/NPC.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/NPC.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,4 +1,5 @@
 #define _CRT_SECURE_NO_WARNINGS
+#include "mm7_unsorted_subs.h"
 #include "texts.h"
 #include "LOD.h"
 #include "Autonotes.h"
--- a/OSWindow.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/OSWindow.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,4 +1,5 @@
 #define _CRT_SECURE_NO_WARNINGS
+#include "mm7_unsorted_subs.h"
 #include "OSWindow.h"
 #include "mm7_data.h"
 #include "Arcomage.h"
--- a/Outdoor.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/Outdoor.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,4 +1,6 @@
 #define _CRT_SECURE_NO_WARNINGS
+#include "ErrorHandling.h"
+#include "mm7_unsorted_subs.h"
 #include "stru6.h"
 #include "Weather.h"
 #include "Sprites.h"
--- a/Overlays.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/Overlays.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,5 +1,6 @@
 #define _CRT_SECURE_NO_WARNINGS
 #include <stdlib.h>
+#include "ErrorHandling.h"
 
 #include "Overlays.h"
 #include "Sprites.h"
--- a/PaletteManager.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/PaletteManager.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,4 +1,5 @@
 #define _CRT_SECURE_NO_WARNINGS
+#include "ErrorHandling.h"
 #include "PaletteManager.h"
 #include "Texture.h"
 #include "Game.h"
--- a/Party.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/Party.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,4 +1,6 @@
 #define _CRT_SECURE_NO_WARNINGS
+#include "ErrorHandling.h"
+#include "mm7_unsorted_subs.h"
 #include "Party.h"
 #include "MapInfo.h"
 #include "Timer.h"
@@ -871,6 +873,11 @@
   viewparams->bRedrawGameUI = 1;
 }
 
+bool TestPartyQuestBit( PARTY_QUEST_BITS bit )
+{
+  return _449B57_test_bit(pParty->_quest_bits, bit);
+}
+
 //----- (0047752B) --------------------------------------------------------
 int Party::GetPartyReputation()
 {
--- a/Party.h	Wed Apr 02 22:05:35 2014 +0600
+++ b/Party.h	Wed Apr 02 23:21:34 2014 +0200
@@ -1,15 +1,13 @@
 #pragma once
 #include "Player.h"
 #include "NPC.h"
-#include "mm7_data.h"
-#include "mm7_unsorted_subs.h"
 #include <array>
 
 
 
 #define PARTY_AUTONOTES_BIT__EMERALD_FIRE_FOUNTAIN 2
 
-enum PARTY_QUEST_BITS: uint16
+enum PARTY_QUEST_BITS: uint16_t
 {
   PARTY_QUEST_EMERALD_RED_POTION_ACTIVE = 1,
   PARTY_QUEST_EMERALD_SEASHELL_ACTIVE = 2,
@@ -324,7 +322,4 @@
 
 extern struct ActionQueue *pPartyActionQueue;
 
-inline bool TestPartyQuestBit(PARTY_QUEST_BITS bit)
-{
-  return _449B57_test_bit(pParty->_quest_bits, bit);
-}
+bool TestPartyQuestBit(PARTY_QUEST_BITS bit);
--- a/Player.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/Player.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,5 +1,8 @@
 #define _CRT_SECURE_NO_WARNINGS
+#include "VectorTypes.h"
 #include "stru6.h"
+#include "mm7_unsorted_subs.h"
+#include "ErrorHandling.h"
 
 #include "Player.h"
 #include "PlayerFrameTable.h"
--- a/Render.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/Render.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,4 +1,6 @@
 #define _CRT_SECURE_NO_WARNINGS
+#include "mm7_unsorted_subs.h"
+#include "ErrorHandling.h"
 
 #include "Render.h"
 #include "Outdoor_stuff.h"
--- a/SaveLoad.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/SaveLoad.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,6 +1,8 @@
 #define _CRT_SECURE_NO_WARNINGS
 #include <io.h>
 #include <direct.h>
+#include "mm7_unsorted_subs.h"
+#include "ErrorHandling.h"
 
 #include "SaveLoad.h"
 #include "BSPModel.h"
--- a/Spells.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/Spells.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,5 +1,7 @@
 #define _CRT_SECURE_NO_WARNINGS
 #include <stdlib.h>
+#include "mm7_unsorted_subs.h"
+#include "ErrorHandling.h"
 
 #include "Spells.h"
 #include "Overlays.h"
--- a/SpriteObject.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/SpriteObject.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -16,6 +16,7 @@
 #include "Events.h"
 #include "AudioPlayer.h"
 #include "Level/Decoration.h"
+#include "mm7_unsorted_subs.h"
 
 #include "mm7_data.h"
 #include "MM7.h"
--- a/Sprites.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/Sprites.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,6 +1,7 @@
 #define _CRT_SECURE_NO_WARNINGS
 #include <string.h>
 #include <algorithm>
+#include "ErrorHandling.h"
 
 #include "Sprites.h"
 #include "PaletteManager.h"
--- a/Texture.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/Texture.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -6,6 +6,7 @@
 #include "LOD.h"
 #include "PaletteManager.h"
 #include "Render.h"
+#include "ErrorHandling.h"
 
 #include "mm7_data.h"
 #include "mm7_unsorted_subs.h"
--- a/TileTable.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/TileTable.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "ErrorHandling.h"
 #include "TileFrameTable.h"
 #include "FrameTableInc.h"
 #include "PaletteManager.h"
--- a/TurnEngine.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/TurnEngine.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,5 +1,6 @@
 #define _CRT_SECURE_NO_WARNINGS
 
+#include "mm7_unsorted_subs.h"
 #include "MM7.h"
 #include "mm7_data.h"
 #include "Actor.h"
--- a/UI/Books/UIMapBook.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/UI/Books/UIMapBook.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,4 +1,5 @@
 #define _CRT_SECURE_NO_WARNINGS
+#include "..\..\mm7_unsorted_subs.h"
 #include "..\..\MM7.h"
 #include "..\..\Render.h"
 #include "..\..\Mouse.h"
--- a/UI/Books/UINotesBooks.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/UI/Books/UINotesBooks.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,4 +1,5 @@
 #define _CRT_SECURE_NO_WARNINGS
+#include "..\..\mm7_unsorted_subs.h"
 #include "..\..\MM7.h"
 #include "..\..\Render.h"
 #include "..\..\Mouse.h"
--- a/UI/UICharacter.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/UI/UICharacter.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,5 +1,6 @@
 #define _CRT_SECURE_NO_WARNINGS
 #include <algorithm> 
+#include "..\mm7_unsorted_subs.h"
 #include "..\MM7.h"
 #include "..\MapInfo.h"
 #include "..\Game.h"
--- a/UI/UIGuilds.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/UI/UIGuilds.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,4 +1,5 @@
 #define _CRT_SECURE_NO_WARNINGS
+#include "..\mm7_unsorted_subs.h"
 #include "..\Items.h"
 #include "..\GUIWindow.h"
 #include "..\mm7_data.h"
--- a/UI/UIHouses.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/UI/UIHouses.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,6 +1,8 @@
 #define _CRT_SECURE_NO_WARNINGS
+#include "..\mm7_unsorted_subs.h"
 #include "..\Texture.h"
 #include "..\mm7_data.h"
+#include "..\ErrorHandling.h"
 #include "UIHouses.h"
 #include "..\Party.h"
 #include "..\texts.h"
--- a/UI/UIMainMenu.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/UI/UIMainMenu.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,6 +1,7 @@
 #define _CRT_SECURE_NO_WARNINGS
 #include "..\Mouse.h"
 #include "..\Keyboard.h"
+#include "..\ErrorHandling.h"
 
 #include "..\GUIWindow.h"
 #include "..\GUIFont.h"
--- a/UI/UIPartyCreation.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/UI/UIPartyCreation.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,6 +1,8 @@
 #define _CRT_SECURE_NO_WARNINGS
+#include "..\mm7_unsorted_subs.h"
 #include "..\Mouse.h"
 #include "..\Keyboard.h"
+#include "..\ErrorHandling.h"
 
 #include "..\Game.h"
 #include "..\GUIWindow.h"
--- a/UI/UIPopup.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/UI/UIPopup.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,5 +1,6 @@
 #define _CRT_SECURE_NO_WARNINGS
 #include "..\MM7.h"
+#include "..\mm7_unsorted_subs.h"
 
 #include "..\Mouse.h"
 
--- a/UI/UIRest.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/UI/UIRest.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,4 +1,5 @@
 #define _CRT_SECURE_NO_WARNINGS
+#include "..\mm7_unsorted_subs.h"
 #include "..\GUIWindow.h"
 #include "..\GUIFont.h"
 #include "..\Party.h"
--- a/UI/UISaveLoad.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/UI/UISaveLoad.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -2,6 +2,7 @@
 #include <io.h>
 
 #include "..\MM7.h"
+#include "..\ErrorHandling.h"
 
 #include "..\Keyboard.h"
 
--- a/UI/UIShops.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/UI/UIShops.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,4 +1,5 @@
 #define _CRT_SECURE_NO_WARNINGS
+#include "..\mm7_unsorted_subs.h"
 #include "..\Items.h"
 #include "..\GUIWindow.h"
 #include "..\mm7_data.h"
--- a/UI/UITransition.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/UI/UITransition.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,6 +1,8 @@
 #define _CRT_SECURE_NO_WARNINGS
 #include <io.h>
 
+#include "..\ErrorHandling.h"
+#include "..\mm7_unsorted_subs.h"
 #include "..\mm7_data.h"
 #include "..\VideoPlayer.h"
 #include "..\MapInfo.h"
--- a/UI/UiGame.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/UI/UiGame.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,6 +1,8 @@
 #define _CRT_SECURE_NO_WARNINGS
+#include "..\mm7_unsorted_subs.h"
 #include "..\Texture.h"
 #include "..\MM7.h"
+#include "..\ErrorHandling.h"
 
 #include "..\Mouse.h"
 #include "..\Keyboard.h"
--- a/VideoPlayer.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/VideoPlayer.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,5 +1,6 @@
 #define _CRT_SECURE_NO_WARNINGS
 
+#include "mm7_unsorted_subs.h"
 #include "Bink_Smacker.h"
 
 #include "mm7_data.h"
--- a/Viewport.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/Viewport.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,6 +1,7 @@
 #define _CRT_SECURE_NO_WARNINGS
 #include "Viewport.h"
 
+#include "mm7_unsorted_subs.h"
 #include "Party.h"
 #include "Indoor.h"
 #include "OurMath.h"
--- a/mm7_2.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/mm7_2.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,15 +1,11 @@
 #define _CRT_SECURE_NO_WARNINGS
 #include <io.h>
 #include <direct.h>
-
-#include "OSAPI.h"
-
-#include "Texture.h"
+#include "mm7_unsorted_subs.h"
+
+
 #include "mm7_data.h"
-#include "mm7_unsorted_subs.h"
-#include "VideoPlayer.h"
 #include "Sprites.h"
-#include "BSPModel.h"
 
 #include "LightmapBuilder.h"
 #include "DecalBuilder.h"
@@ -20,7 +16,6 @@
 #include "GammaControl.h"
 #include "stru6.h"
 
-#include "Actor.h"
 #include "Vis.h"
 #include "MapInfo.h"
 #include "Game.h"
@@ -36,7 +31,6 @@
 #include "Actor.h"
 #include "Events.h"
 #include "Viewport.h"
-#include "FrameTableInc.h"
 #include "OurMath.h"
 #include "SpriteObject.h"
 #include "ObjectList.h"
@@ -57,8 +51,6 @@
 #include "Random.h"
 #include "CastSpellInfo.h"
 #include "stru298.h"
-#include "Events2D.h"
-#include "Log.h"
 #include "UI\UIHouses.h"
 #include "texts.h"
 #include "MM7.h"
--- a/mm7_3.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/mm7_3.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,16 +1,8 @@
 #define _CRT_SECURE_NO_WARNINGS
+#include "ErrorHandling.h"
 #include "Weather.h"
-#include "Texture.h"
-#include "mm7_data.h"
 #include "Sprites.h"
-#include "BSPModel.h"
-#include "LightmapBuilder.h"
-#include "DecalBuilder.h"
-#include "ParticleEngine.h"
-#include "Mouse.h"
-#include "Keyboard.h"
 #include "stru6.h"
-#include "FactionTable.h"
 #include "MapInfo.h"
 #include "Game.h"
 #include "GUIWindow.h"
@@ -30,17 +22,15 @@
 #include "ObjectList.h"
 #include "PaletteManager.h"
 #include "DecorationList.h"
-#include "stru123.h"
 #include "Timer.h"
-#include "IconFrameTable.h"
 #include "TurnEngine.h"
 #include "Events2D.h"
 #include "stru176.h"
 #include "stru298.h"
 #include "texts.h"
-#include "Log.h"
-#include "Lights.h"
 #include "Level/Decoration.h"
+#include "mm7_unsorted_subs.h"
+#include "mm7_data.h"
 
 #include "MM7.h"
 
--- a/mm7_4.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/mm7_4.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,14 +1,8 @@
 #define _CRT_SECURE_NO_WARNINGS
-#include "mm7_data.h"
+
+#include "ErrorHandling.h"
+#include "VectorTypes.h"
 #include "mm7_unsorted_subs.h"
-#include "Texture.h"
-#include "VideoPlayer.h"
-#include "Sprites.h"
-#include "BSPModel.h"
-#include "Mouse.h"
-#include "stru6.h"
-
-#include "LightmapBuilder.h"
 #include "MM7.h"
 #include "MapInfo.h"
 #include "Game.h"
@@ -28,17 +22,13 @@
 #include "ObjectList.h"
 #include "DecorationList.h"
 #include "Timer.h"
-#include "IconFrameTable.h"
 #include "PlayerFrameTable.h"
 #include "Awards.h"
-#include "TurnEngine.h"
-#include "Events2D.h"
-#include "stru159.h"
 #include "texts.h"
-#include "Log.h"
 #include "UI\UIHouses.h"
 #include "Lights.h"
 #include "Level/Decoration.h"
+#include "mm7_data.h"
 
 //----- (0046CC4B) --------------------------------------------------------
 void check_event_triggers()
--- a/mm7_5.cpp	Wed Apr 02 22:05:35 2014 +0600
+++ b/mm7_5.cpp	Wed Apr 02 23:21:34 2014 +0200
@@ -1,5 +1,5 @@
 #define _CRT_SECURE_NO_WARNINGS
-#include "MapInfo.h"
+#include "ErrorHandling.h"
 #include "LightmapBuilder.h"
 #include "mm7.h"
 #include "GUIWindow.h"
@@ -14,6 +14,8 @@
 #include "stru298.h"
 #include "Lights.h"
 #include "Level/Decoration.h"
+#include "mm7_unsorted_subs.h"
+#include "mm7_data.h"
 
 
 //----- (004356FF) --------------------------------------------------------
--- a/mm7_unsorted_subs.h	Wed Apr 02 22:05:35 2014 +0600
+++ b/mm7_unsorted_subs.h	Wed Apr 02 23:21:34 2014 +0200
@@ -1,5 +1,6 @@
 #pragma once
-
+#include <stdint.h>
+#include <math.h>
 
 
 //-------------------------------------------------------------------------
@@ -40,7 +41,6 @@
 void uGameUIFontMain_initialize();
 void uGameUIFontShadow_initialize();
 void Inventory_ItemPopupAndAlchemy();
-void UI_OnMouseRightClick(struct Vec2_int_ *_this);
 void UI_OnMouseLeftClick(int *pXY); // idb
 unsigned int UI_GetHealthManaAndOtherQualitiesStringColor(signed int current_pos, signed int base_pos);
 unsigned int __fastcall GetSizeInInventorySlots(unsigned int uNumPixels);