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/scumm/input.cpp | 3 +-- engines/scumm/scumm.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'engines/scumm') diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp index 4b317098f4..54feafb115 100644 --- a/engines/scumm/input.cpp +++ b/engines/scumm/input.cpp @@ -57,8 +57,7 @@ enum MouseButtonStatus { void ScummEngine::parseEvents() { Common::Event event; - Common::EventManager *eventMan = _system->getEventManager(); - while (eventMan->pollEvent(event)) { + while (_eventMan->pollEvent(event)) { switch (event.type) { case Common::EVENT_KEYDOWN: diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 5298593a1e..9ff08d7e5b 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -851,8 +851,7 @@ int ScummEngine_vCUPhe::go() { void ScummEngine_vCUPhe::parseEvents() { Common::Event event; - Common::EventManager *eventMan = _system->getEventManager(); - while (eventMan->pollEvent(event)) { + while (_eventMan->pollEvent(event)) { switch (event.type) { case Common::EVENT_QUIT: _quit = true; -- cgit v1.2.3