1
0
forked from 0ad/0ad
0ad/source/ps/World.h
olsner 09f47d6820 Core Classes Reorganization:
- g_Terrain and g_Camera totally eradicated as globals, is now m_Terrain
of CWorld and m_Camera of CGameView
- terrainMain.cpp is almost completely empty with functionality moved
into the relevant core classes
- Miscellaneous global functions moved into Core Classes (mostly
GameView)

This was SVN commit r865.
2004-07-31 15:57:18 +00:00

42 lines
817 B
C++
Executable File

#ifndef _ps_World_H
#define _ps_World_H
#include "Terrain.h"
#include "UnitManager.h"
class CGame;
class CGameAttributes;
class CWorld
{
CGame *m_pGame;
// These both point to the respective g_* globals - the plan is to remove
// the globals and move them into CWorld members as soon as all code has
// been converted
CTerrain m_Terrain;
CUnitManager &m_UnitManager;
public:
inline CWorld(CGame *pGame):
m_pGame(pGame),
m_Terrain(),
m_UnitManager(g_UnitMan)
{}
/*
Initialize the World - load the map and all objects
*/
void Initialize(CGameAttributes *pGameAttributes);
inline CTerrain *GetTerrain()
{ return &m_Terrain; }
inline CUnitManager *GetUnitManager()
{ return &m_UnitManager; }
};
#include "Game.h"
ERROR_SUBGROUP(Game, World);
ERROR_TYPE(Game_World, MapLoadFailed);
#endif