0ad/source/ps/World.h
Ykkrosh ee3243ff92 # Fixes for simulation speed in scenario edtior. Various code cleanups.
Game, Simulation, etc: Separated 'update' and 'interpolate', and made
'update' return whether it's going fast enough (so callers can decide to
do more updates per render). Changed some time variables to 'double' so
they have enough precision in long games.
Atlas: Added "Fast" playback button. Made simulation sometimes go at
real-time speed, if it's just slightly too slow at rendering.
VertexBuffer: Removed some non-useful glGetError calls.
Entity: Commented out redundant Tick code. Fixed syntax error in
disabled code that confused the IDE.
Aura: Changed string code again, to simply use ASCII instead of UTF-16.
(SpiderMonkey seems to handle it just as efficiently, for small
strings.)
Misc: Some more minor header-file cleanup.
SVN log: Added feed link.

This was SVN commit r4807.
2007-01-24 20:17:28 +00:00

68 lines
1.4 KiB
C++

#ifndef _ps_World_H
#define _ps_World_H
#include "ps/Errors.h"
#ifndef ERROR_GROUP_GAME_DEFINED
#define ERROR_GROUP_GAME_DEFINED
ERROR_GROUP(Game);
#endif
ERROR_SUBGROUP(Game, World);
ERROR_TYPE(Game_World, MapLoadFailed);
class CGame;
class CGameAttributes;
class CUnitManager;
class CEntityManager;
class CProjectileManager;
class CLOSManager;
class CTerritoryManager;
class CTerrain;
class CWorld
{
CGame *m_pGame;
CTerrain *m_Terrain;
CUnitManager *m_UnitManager;
CEntityManager *m_EntityManager;
CProjectileManager *m_ProjectileManager;
CLOSManager *m_LOSManager;
CTerritoryManager *m_TerritoryManager;
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; }
inline CTerritoryManager *GetTerritoryManager()
{ return m_TerritoryManager; }
NO_COPY_CTOR(CWorld);
};
// rationale: see definition.
class CLightEnv;
extern CLightEnv g_LightEnv;
#endif