From 5aca9dce8c6cce89df3147a6f942620155010c8d Mon Sep 17 00:00:00 2001 From: Gregory Montoir Date: Sun, 1 Apr 2007 17:36:13 +0000 Subject: added the instance of EventManager returned by OSystem::getEventManager as a member of the Engine base class. This allows to simply the code a bit and should more efficient too (ie. less virtual function chain calls, obj->getA()->getB()). Also updated several engines to make use of it. svn-id: r26357 --- engines/saga/input.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'engines/saga/input.cpp') diff --git a/engines/saga/input.cpp b/engines/saga/input.cpp index 3f9495ce8c..e0216ba2fa 100644 --- a/engines/saga/input.cpp +++ b/engines/saga/input.cpp @@ -40,8 +40,7 @@ namespace Saga { int SagaEngine::processInput() { Common::Event event; - Common::EventManager *eventMan = _system->getEventManager(); - while (eventMan->pollEvent(event)) { + while (_eventMan->pollEvent(event)) { switch (event.type) { case Common::EVENT_KEYDOWN: if (event.kbd.flags == Common::KBD_CTRL) { @@ -153,7 +152,7 @@ int SagaEngine::processInput() { } Point SagaEngine::mousePos() const { - return _system->getEventManager()->getMousePos(); + return _eventMan->getMousePos(); } } // End of namespace Saga -- cgit v1.2.3