Attempted to minimise dependencies between header files (to make compilation minorly faster)
This was SVN commit r1490.
This commit is contained in:
parent
24abb51b59
commit
6d7d049d89
@ -17,6 +17,10 @@
|
||||
#include "Hotkey.h"
|
||||
#include "ConfigDB.h"
|
||||
|
||||
#include "Quaternion.h"
|
||||
#include "Unit.h"
|
||||
#include "Model.h"
|
||||
|
||||
#include "sdl.h"
|
||||
#include "input.h"
|
||||
#include "lib.h"
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include "types.h"
|
||||
#include "MapReader.h"
|
||||
#include "UnitManager.h"
|
||||
#include "Unit.h"
|
||||
#include "ObjectManager.h"
|
||||
#include "BaseEntity.h"
|
||||
#include "BaseEntityCollection.h"
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include "types.h"
|
||||
#include "MapWriter.h"
|
||||
#include "UnitManager.h"
|
||||
#include "Unit.h"
|
||||
#include "ObjectManager.h"
|
||||
#include "Model.h"
|
||||
#include "Terrain.h"
|
||||
|
@ -2,6 +2,7 @@
|
||||
#include "graphics/MeshManager.h"
|
||||
#include "CLogger.h"
|
||||
#include "FileUnpacker.h" // to get access to its CError
|
||||
#include "ModelDef.h"
|
||||
|
||||
CMeshManager::CMeshManager()
|
||||
{
|
||||
|
@ -2,16 +2,16 @@
|
||||
#define __H_MESHMANAGER_H__
|
||||
|
||||
#include "Singleton.h"
|
||||
#include "graphics/ModelDef.h"
|
||||
#include "CStr.h"
|
||||
|
||||
#include "boost/shared_ptr.hpp"
|
||||
#include "boost/weak_ptr.hpp"
|
||||
|
||||
//
|
||||
#define g_MeshManager CMeshManager::GetSingleton()
|
||||
|
||||
typedef STL_HASH_MAP<CStr, boost::weak_ptr<CModelDef>, CStr_hash_compare> mesh_map;
|
||||
|
||||
class CModelDef;
|
||||
typedef boost::shared_ptr<CModelDef> CModelDefPtr;
|
||||
typedef STL_HASH_MAP<CStr, boost::weak_ptr<CModelDef>, CStr_hash_compare> mesh_map;
|
||||
|
||||
class CMeshManager : public Singleton<CMeshManager>
|
||||
{
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "Model.h"
|
||||
#include "ModelDef.h"
|
||||
#include "Quaternion.h"
|
||||
#include "Bound.h"
|
||||
#include "SkeletonAnim.h"
|
||||
|
@ -12,11 +12,11 @@
|
||||
#include <vector>
|
||||
|
||||
#include "Texture.h"
|
||||
#include "ModelDef.h"
|
||||
#include "MeshManager.h"
|
||||
#include "RenderableObject.h"
|
||||
#include "SkeletonAnim.h"
|
||||
#include "Material.h"
|
||||
struct SPropPoint;
|
||||
|
||||
#define MODELFLAG_CASTSHADOWS (1<<0)
|
||||
#define MODELFLAG_NOLOOPANIMATION (1<<1)
|
||||
|
@ -125,9 +125,9 @@ public:
|
||||
// prop point data
|
||||
u32 m_NumPropPoints;
|
||||
SPropPoint* m_PropPoints;
|
||||
|
||||
protected:
|
||||
static CModelDef* Load(const char* filename);
|
||||
//CStr m_Filename;
|
||||
static CModelDef* Load(const char* filename);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "MeshManager.h"
|
||||
|
||||
#include "UnitManager.h"
|
||||
#include "Unit.h"
|
||||
|
||||
#include "ps/Xeromyces.h"
|
||||
|
||||
|
@ -6,8 +6,6 @@ class CSkeletonAnim;
|
||||
|
||||
#include <vector>
|
||||
#include "CStr.h"
|
||||
#include "Bound.h"
|
||||
#include "ModelDef.h"
|
||||
|
||||
class CObjectEntry
|
||||
{
|
||||
|
8
source/graphics/Unit.cpp
Normal file
8
source/graphics/Unit.cpp
Normal file
@ -0,0 +1,8 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "Unit.h"
|
||||
#include "Model.h"
|
||||
|
||||
CUnit::~CUnit() {
|
||||
delete m_Model;
|
||||
}
|
@ -2,8 +2,8 @@
|
||||
#define _UNIT_H
|
||||
|
||||
#include <assert.h>
|
||||
#include "Model.h"
|
||||
|
||||
class CModel;
|
||||
class CObjectEntry;
|
||||
class CEntity;
|
||||
|
||||
@ -21,9 +21,7 @@ public:
|
||||
}
|
||||
|
||||
// destructor
|
||||
~CUnit() {
|
||||
delete m_Model;
|
||||
}
|
||||
~CUnit();
|
||||
|
||||
|
||||
// get unit's template object
|
||||
|
@ -11,6 +11,8 @@
|
||||
#include "res/res.h"
|
||||
#include "Model.h"
|
||||
#include "UnitManager.h"
|
||||
#include "Unit.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -10,9 +10,9 @@
|
||||
#define _UNITMANAGER_H
|
||||
|
||||
#include <vector>
|
||||
#include "Unit.h"
|
||||
#include "Singleton.h"
|
||||
|
||||
class CUnit;
|
||||
class CVector3D;
|
||||
|
||||
// access to sole CUnitManager object
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "renderer/Renderer.h"
|
||||
#include "graphics/TextureEntry.h"
|
||||
#include "graphics/TextureManager.h"
|
||||
#include "graphics/Unit.h"
|
||||
|
||||
static unsigned int ScaleColor(unsigned int color,float x)
|
||||
{
|
||||
|
@ -2,8 +2,10 @@
|
||||
#define __H_MINIMAP_H__
|
||||
|
||||
#include "GUI.h"
|
||||
#include "graphics/Terrain.h"
|
||||
#include "graphics/UnitManager.h"
|
||||
#include "Vector2D.h"
|
||||
#include "Vector3D.h"
|
||||
class CTerrain;
|
||||
class CUnitManager;
|
||||
|
||||
class CMiniMap : public IGUIObject
|
||||
{
|
||||
|
@ -8,6 +8,9 @@
|
||||
#include "timer.h"
|
||||
#include "Game.h"
|
||||
#include "Network/NetMessage.h"
|
||||
#include "BoundingObjects.h"
|
||||
#include "Unit.h"
|
||||
#include "Model.h"
|
||||
|
||||
extern CConsole* g_Console;
|
||||
extern int mouse_x, mouse_y;
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "TransparencyRenderer.h"
|
||||
#include "ModelRData.h"
|
||||
#include "Model.h"
|
||||
#include "ModelDef.h"
|
||||
#include "MaterialManager.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include "ObjectManager.h"
|
||||
#include "scripting/JSInterface_Vector3D.h"
|
||||
#include "Parser.h"
|
||||
#include "BaseEntity.h"
|
||||
|
||||
// HEntity
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "Entity.h"
|
||||
#include "EntityManager.h"
|
||||
#include "BaseEntityCollection.h"
|
||||
#include "Unit.h"
|
||||
|
||||
#include "Renderer.h"
|
||||
#include "Model.h"
|
||||
|
@ -34,19 +34,21 @@
|
||||
#include <deque>
|
||||
#include "scripting/ScriptableObject.h"
|
||||
|
||||
#include "BaseEntity.h"
|
||||
#include "Vector2D.h"
|
||||
#include "BoundingObjects.h"
|
||||
#include "Vector3D.h"
|
||||
#include "Unit.h"
|
||||
#include "UnitManager.h"
|
||||
#include "EntityOrders.h"
|
||||
#include "EntityHandles.h"
|
||||
#include "EntityMessage.h"
|
||||
#include "EventHandlers.h"
|
||||
#include "ScriptObject.h"
|
||||
|
||||
#include "EntitySupport.h"
|
||||
|
||||
class CBaseEntity;
|
||||
class CBoundingObject;
|
||||
class CUnit;
|
||||
|
||||
// TODO MT: Put this is /some/ sort of order...
|
||||
|
||||
class CEntity : public CJSObject<CEntity>
|
||||
@ -201,7 +203,7 @@ public:
|
||||
// General entity globals
|
||||
|
||||
|
||||
// In it's current incarnation, inefficient but pretty
|
||||
// In its current incarnation, inefficient but pretty
|
||||
#define SELECTION_TERRAIN_CONFORMANCE
|
||||
|
||||
extern int SELECTION_CIRCLE_POINTS;
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#include "Entity.h"
|
||||
#include "Model.h"
|
||||
#include "ObjectEntry.h"
|
||||
#include "Unit.h"
|
||||
|
||||
#include "Collision.h"
|
||||
#include "PathfindEngine.h"
|
||||
|
@ -10,6 +10,8 @@
|
||||
#include "Network/NetMessage.h"
|
||||
#include "CLogger.h"
|
||||
#include "CConsole.h"
|
||||
#include "Unit.h"
|
||||
#include "Model.h"
|
||||
|
||||
#include "gui/CGUI.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user