diff options
author | Gregory Montoir | 2007-04-01 17:36:13 +0000 |
---|---|---|
committer | Gregory Montoir | 2007-04-01 17:36:13 +0000 |
commit | 5aca9dce8c6cce89df3147a6f942620155010c8d (patch) | |
tree | 28dbee0d5addb8e49c839e5eba11733b0fe26fa5 /engines/touche | |
parent | 852971cfe62b59ff1f2e7451402a34fa6f8db958 (diff) | |
download | scummvm-rg350-5aca9dce8c6cce89df3147a6f942620155010c8d.tar.gz scummvm-rg350-5aca9dce8c6cce89df3147a6f942620155010c8d.tar.bz2 scummvm-rg350-5aca9dce8c6cce89df3147a6f942620155010c8d.zip |
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
Diffstat (limited to 'engines/touche')
-rw-r--r-- | engines/touche/touche.cpp | 6 | ||||
-rw-r--r-- | engines/touche/touche.h | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp index 895bb0da6c..54503f2235 100644 --- a/engines/touche/touche.cpp +++ b/engines/touche/touche.cpp @@ -237,10 +237,8 @@ void ToucheEngine::writeConfigurationSettings() { ConfMan.flushToDisk(); } -Common::Point ToucheEngine::getMousePos() { - Common::EventManager *eventMan = _system->getEventManager(); - - return eventMan->getMousePos(); +Common::Point ToucheEngine::getMousePos() const { + return _eventMan->getMousePos(); } void ToucheEngine::mainLoop() { diff --git a/engines/touche/touche.h b/engines/touche/touche.h index 371f55d9bb..04fb42d80a 100644 --- a/engines/touche/touche.h +++ b/engines/touche/touche.h @@ -611,7 +611,7 @@ protected: int displayQuitDialog(); void displayTextMode(int str); - Common::Point getMousePos(); + Common::Point getMousePos() const; MidiPlayer *_midiPlayer; |