1
0
forked from 0ad/0ad

Attempted to minimise dependencies between header files (to make compilation minorly faster)

This was SVN commit r1490.
This commit is contained in:
Ykkrosh 2004-12-12 19:43:55 +00:00
parent 24abb51b59
commit 6d7d049d89
23 changed files with 50 additions and 20 deletions

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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()
{

View File

@ -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>
{

View File

@ -9,6 +9,7 @@
#include "precompiled.h"
#include "Model.h"
#include "ModelDef.h"
#include "Quaternion.h"
#include "Bound.h"
#include "SkeletonAnim.h"

View File

@ -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)

View File

@ -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

View File

@ -9,6 +9,7 @@
#include "MeshManager.h"
#include "UnitManager.h"
#include "Unit.h"
#include "ps/Xeromyces.h"

View File

@ -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
View File

@ -0,0 +1,8 @@
#include "precompiled.h"
#include "Unit.h"
#include "Model.h"
CUnit::~CUnit() {
delete m_Model;
}

View File

@ -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

View File

@ -11,6 +11,8 @@
#include "res/res.h"
#include "Model.h"
#include "UnitManager.h"
#include "Unit.h"
#include <algorithm>
///////////////////////////////////////////////////////////////////////////////

View File

@ -10,9 +10,9 @@
#define _UNITMANAGER_H
#include <vector>
#include "Unit.h"
#include "Singleton.h"
class CUnit;
class CVector3D;
// access to sole CUnitManager object

View File

@ -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)
{

View File

@ -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
{

View File

@ -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;

View File

@ -7,6 +7,7 @@
#include "TransparencyRenderer.h"
#include "ModelRData.h"
#include "Model.h"
#include "ModelDef.h"
#include "MaterialManager.h"
///////////////////////////////////////////////////////////////////

View File

@ -4,6 +4,7 @@
#include "ObjectManager.h"
#include "scripting/JSInterface_Vector3D.h"
#include "Parser.h"
#include "BaseEntity.h"
// HEntity

View File

@ -5,6 +5,7 @@
#include "Entity.h"
#include "EntityManager.h"
#include "BaseEntityCollection.h"
#include "Unit.h"
#include "Renderer.h"
#include "Model.h"

View File

@ -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;

View File

@ -4,6 +4,8 @@
#include "Entity.h"
#include "Model.h"
#include "ObjectEntry.h"
#include "Unit.h"
#include "Collision.h"
#include "PathfindEngine.h"

View File

@ -10,6 +10,8 @@
#include "Network/NetMessage.h"
#include "CLogger.h"
#include "CConsole.h"
#include "Unit.h"
#include "Model.h"
#include "gui/CGUI.h"