1
0
forked from 0ad/0ad
0ad/source/ps/World.h
Ykkrosh f45c44ca09 Rotated various things (terrain texture UVs, default light and camera angles) by 45 degrees.
Map XML: Store camera position. Stopped using DTDs (because they make it
too hard to change the XML structure without breaking all the old XML
files).
Game.h: Include fewer files, to make compilation sometimes faster.
World: Changed some things to not be singletons, since they were
(ab)used as CWorld members.

This was SVN commit r3670.
2006-03-21 20:55:45 +00:00

63 lines
1.3 KiB
C++
Executable File

#ifndef _ps_World_H
#define _ps_World_H
#include "Terrain.h"
class CGame;
class CGameAttributes;
class CUnitManager;
class CEntityManager;
class CProjectileManager;
class CLOSManager;
class CWorld
{
CGame *m_pGame;
CTerrain m_Terrain;
CUnitManager *m_UnitManager;
CEntityManager *m_EntityManager;
CProjectileManager *m_ProjectileManager;
CLOSManager *m_LOSManager;
public:
CWorld(CGame *pGame);
~CWorld();
void RegisterInit(CGameAttributes *pGameAttributes);
/*
Initialize the World - load the map and all objects
*/
void Initialize(CGameAttributes *pGameAttributes);
// provided for JS _rewritemaps function
void RewriteMap();
inline CTerrain *GetTerrain()
{ return &m_Terrain; }
inline CUnitManager *GetUnitManager()
{ return m_UnitManager; }
inline CEntityManager *GetEntityManager()
{ return m_EntityManager; }
inline CProjectileManager *GetProjectileManager()
{ return m_ProjectileManager; }
inline CLOSManager *GetLOSManager()
{ return m_LOSManager; }
private:
// squelch "unable to generate" warnings
CWorld(const CWorld& rhs);
const CWorld& operator=(const CWorld& rhs);
};
#include "Game.h"
ERROR_SUBGROUP(Game, World);
ERROR_TYPE(Game_World, MapLoadFailed);
// rationale: see definition.
class CLightEnv;
extern CLightEnv g_LightEnv;
#endif