From 001d37b257b126dd6ef1dced70f94ff3d2806d28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Dziwi=C5=84ski?= Date: Sat, 16 Feb 2013 22:37:43 +0100 Subject: CInstanceManager refactoring * removed classes managed by CInstanceManager except for CObject, CPyro, CBrain and CPhysics because of dependencies * refactored instance searching to use existing singleton instances of CApplication, CEngine and CRobotMain and calling their getter functions --- src/object/robotmain.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/object/robotmain.h') diff --git a/src/object/robotmain.h b/src/object/robotmain.h index cb0cd7f..6a45473 100644 --- a/src/object/robotmain.h +++ b/src/object/robotmain.h @@ -71,12 +71,10 @@ enum Phase }; -class CInstanceManager; class CEventQueue; class CSoundInterface; -namespace Gfx -{ +namespace Gfx { class CEngine; class CLightManager; class CWater; @@ -84,17 +82,16 @@ class CCloud; class CLightning; class CPlanet; class CTerrain; -}; +} -namespace Ui -{ +namespace Ui { class CMainDialog; class CMainShort; class CMainMap; class CInterface; class CDisplayText; class CDisplayInfo; -}; +} struct EndTake @@ -178,9 +175,14 @@ const int AXIS_INVALID = -1; class CRobotMain : public CSingleton { public: - CRobotMain(CInstanceManager* iMan, CApplication* app); + CRobotMain(CApplication* app); ~CRobotMain(); + Gfx::CCamera* GetCamera(); + Gfx::CTerrain* GetTerrain(); + Ui::CInterface* GetInterface(); + Ui::CDisplayText* GetDisplayText(); + void CreateIni(); //! Sets the default input bindings (key and axes) @@ -358,7 +360,6 @@ protected: void Convert(); void CreateScene(bool soluce, bool fixScene, bool resetObject); - void CreateModel(); Math::Vector LookatPoint(Math::Vector eye, float angleH, float angleV, float length); CObject* CreateObject(Math::Vector pos, float angle, float zoom, float height, ObjectType type, float power=1.0f, @@ -390,7 +391,6 @@ protected: void UpdateSpeedLabel(); protected: - CInstanceManager* m_iMan; CApplication* m_app; CEventQueue* m_eventQueue; CMainMovie* m_movie; -- cgit v1.2.3-1-g7c22