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/ui/map.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/ui/map.cpp') diff --git a/src/ui/map.cpp b/src/ui/map.cpp index b852976..33d0fb1 100644 --- a/src/ui/map.cpp +++ b/src/ui/map.cpp @@ -15,8 +15,6 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// map.cpp - #include "ui/map.h" @@ -31,9 +29,9 @@ namespace Ui { CMap::CMap() : CControl() { - m_main = static_cast(m_iMan->SearchInstance(CLASS_MAIN)); - m_terrain = static_cast(m_iMan->SearchInstance(CLASS_TERRAIN)); - m_water = static_cast(m_iMan->SearchInstance(CLASS_WATER)); + m_main = CRobotMain::GetInstancePointer(); + m_terrain = m_main->GetTerrain(); + m_water = Gfx::CEngine::GetInstancePointer()->GetWater(); m_bEnable = true; m_time = 0.0f; -- cgit v1.2.3-1-g7c22