diff --git a/source/graphics/ObjectEntry.h b/source/graphics/ObjectEntry.h index 8ded245b8b..34882d04e0 100644 --- a/source/graphics/ObjectEntry.h +++ b/source/graphics/ObjectEntry.h @@ -4,7 +4,7 @@ class CModel; class CSkeletonAnim; class CObjectBase; -class CMeshManager; +class CObjectManager; struct SPropPoint; #include @@ -14,8 +14,6 @@ struct SPropPoint; #include "ps/CStr.h" #include "ps/Overlay.h" -class CObjectManager; - class CObjectEntry { public: diff --git a/source/graphics/UnitManager.cpp b/source/graphics/UnitManager.cpp index e50b3c3713..b990ee439c 100644 --- a/source/graphics/UnitManager.cpp +++ b/source/graphics/UnitManager.cpp @@ -16,6 +16,8 @@ #include "Unit.h" #include "ObjectManager.h" #include "ObjectEntry.h" +#include "ps/Game.h" +#include "ps/World.h" #include "simulation/Entity.h" #include "simulation/LOSManager.h" diff --git a/source/gui/MiniMap.cpp b/source/gui/MiniMap.cpp index 0b53aa6522..ed2c5bc190 100644 --- a/source/gui/MiniMap.cpp +++ b/source/gui/MiniMap.cpp @@ -13,10 +13,12 @@ #include "graphics/UnitManager.h" #include "lib/ogl.h" #include "lib/sdl.h" +#include "network/NetMessage.h" #include "ps/Game.h" #include "ps/Interact.h" -#include "network/NetMessage.h" +#include "ps/Player.h" #include "ps/Profile.h" +#include "ps/World.h" #include "renderer/Renderer.h" #include "renderer/WaterManager.h" #include "scripting/GameEvents.h" diff --git a/source/network/Network.h b/source/network/Network.h index 5a4647a4db..8ec19a4d84 100644 --- a/source/network/Network.h +++ b/source/network/Network.h @@ -47,7 +47,6 @@ MORE INFO #include "ps/Pyrogenesis.h" #include "ps/ThreadUtil.h" -#include "ps/Singleton.h" #include "StreamSocket.h" diff --git a/source/pch/atlas/precompiled.h b/source/pch/atlas/precompiled.h index 18a6cda481..de65d5782d 100644 --- a/source/pch/atlas/precompiled.h +++ b/source/pch/atlas/precompiled.h @@ -6,7 +6,5 @@ #include "tools/atlas/GameInterface/Messages.h" #include "ps/CStr.h" -#include "ps/Errors.h" -#include "graphics/GameView.h" #endif // HAVE_PCH diff --git a/source/ps/Font.h b/source/ps/Font.h index a848cc499d..5bf37fe3f9 100644 --- a/source/ps/Font.h +++ b/source/ps/Font.h @@ -1,13 +1,9 @@ #ifndef _FONT_H #define _FONT_H -#include "ps/Singleton.h" -#include "ps/CStr.h" - #include "lib/res/handle.h" -#include -#include +class CStrW; /* diff --git a/source/ps/Game.cpp b/source/ps/Game.cpp index a774f45c0b..42d8609a1b 100644 --- a/source/ps/Game.cpp +++ b/source/ps/Game.cpp @@ -49,6 +49,8 @@ CGame::CGame(): m_Time(0), m_SimRate(1.0f) { + // Need to set the CObjectManager references after various objects have + // been initialised, so do it here rather than via the initialisers above. m_World->GetUnitManager().SetObjectManager(m_GameView->GetObjectManager()); } diff --git a/source/renderer/PatchRData.cpp b/source/renderer/PatchRData.cpp index d1f9cf1325..55bf43061d 100644 --- a/source/renderer/PatchRData.cpp +++ b/source/renderer/PatchRData.cpp @@ -11,6 +11,8 @@ #include "AlphaMapCalculator.h" #include "ps/CLogger.h" #include "ps/Profile.h" +#include "ps/Game.h" +#include "ps/World.h" #include "maths/MathUtil.h" #include "simulation/LOSManager.h" #include "graphics/Patch.h" diff --git a/source/renderer/TerrainRenderer.cpp b/source/renderer/TerrainRenderer.cpp index 69da5af8cf..2fc4b90e7b 100644 --- a/source/renderer/TerrainRenderer.cpp +++ b/source/renderer/TerrainRenderer.cpp @@ -22,6 +22,7 @@ #include "ps/Game.h" #include "ps/Profile.h" #include "ps/Pyrogenesis.h" // MICROLOG +#include "ps/World.h" #include "simulation/LOSManager.h" diff --git a/source/simulation/EntityTemplate.h b/source/simulation/EntityTemplate.h index 5ef1d235ef..bbf9731ac8 100644 --- a/source/simulation/EntityTemplate.h +++ b/source/simulation/EntityTemplate.h @@ -36,12 +36,12 @@ public: CPlayer* m_player; // Which player this template is for, or null for the no-player template // used to read unmodified values for upgrades and such. - CEntityTemplate( CPlayer* player ); + CEntityTemplate(CPlayer* player); ~CEntityTemplate(); // Load from XML - bool loadXML( const CStr& filename ); + bool loadXML(const CStr& filename); // Load a tree of properties from an XML (XMB) node. - void XMLLoadProperty( const CXeromyces& XeroFile, const XMBElement& Source, const CStrW& BasePropertyName ); + void XMLLoadProperty(const CXeromyces& XeroFile, const XMBElement& Source, const CStrW& BasePropertyName); // Base stats CEntityTemplate* m_base; @@ -64,7 +64,7 @@ public: CBoundingObject::EBoundingType m_bound_type; // Sound properties - typedef STL_HASH_MAP SoundGroupTable; + typedef STL_HASH_MAP SoundGroupTable; SoundGroupTable m_SoundGroupTable; //SP properties @@ -165,9 +165,9 @@ public: // Script-bound functions // Get script execution contexts - always run in the context of the entity that fired it. - JSObject* GetScriptExecContext( IEventTarget* target ); + JSObject* GetScriptExecContext(IEventTarget* target); - jsval ToString( JSContext* cx, uintN argc, jsval* argv ); + jsval ToString(JSContext* cx, uintN argc, jsval* argv); static void ScriptingInit(); diff --git a/source/simulation/LOSManager.h b/source/simulation/LOSManager.h index 3131f1f121..ea2cebcb5e 100644 --- a/source/simulation/LOSManager.h +++ b/source/simulation/LOSManager.h @@ -16,11 +16,6 @@ #ifndef LOS_MANAGER_INCLUDED #define LOS_MANAGER_INCLUDED -#include "ps/Singleton.h" -#include "ps/Game.h" -#include "ps/World.h" -#include "ps/Player.h" - class CUnit; class CEntity; class CPlayer; diff --git a/source/simulation/Projectile.h b/source/simulation/Projectile.h index 3a93603916..ef5adec6b7 100644 --- a/source/simulation/Projectile.h +++ b/source/simulation/Projectile.h @@ -9,7 +9,6 @@ #include "maths/Vector3D.h" #include "ps/Vector2D.h" -#include "ps/Singleton.h" #include "scripting/ScriptableObject.h" #include "scripting/DOMEvent.h" #include "ScriptObject.h" diff --git a/source/tools/atlas/GameInterface/Handlers/MapHandlers.cpp b/source/tools/atlas/GameInterface/Handlers/MapHandlers.cpp index b4a2e1537c..ec87d44da2 100644 --- a/source/tools/atlas/GameInterface/Handlers/MapHandlers.cpp +++ b/source/tools/atlas/GameInterface/Handlers/MapHandlers.cpp @@ -12,6 +12,7 @@ #include "ps/Game.h" #include "ps/GameAttributes.h" #include "ps/Loader.h" +#include "ps/World.h" #include "renderer/Renderer.h" #include "simulation/LOSManager.h" #include "simulation/Simulation.h"