[Scummvm-devel] [Scummvm-cvs-logs] SF.net SVN: scummvm: [26345] scummvm/trunk/engines/touche
Gregory Montoir
cyx at users.sourceforge.net
Sun Apr 1 15:50:02 CEST 2007
eriktorbjorn at users.sourceforge.net wrote:
> Revision: 26345
> http://scummvm.svn.sourceforge.net/scummvm/?rev=26345&view=rev
> Author: eriktorbjorn
> Date: 2007-04-01 06:31:11 -0700 (Sun, 01 Apr 2007)
>
> Log Message:
> -----------
> Use the event manager to track the mouse position.
>
> Modified Paths:
> --------------
> scummvm/trunk/engines/touche/touche.cpp
> scummvm/trunk/engines/touche/touche.h
>
> Modified: scummvm/trunk/engines/touche/touche.cpp
> ===================================================================
> --- scummvm/trunk/engines/touche/touche.cpp 2007-04-01 13:16:29 UTC (rev 26344)
> +++ scummvm/trunk/engines/touche/touche.cpp 2007-04-01 13:31:11 UTC (rev 26345)
> @@ -237,6 +237,12 @@
> ConfMan.flushToDisk();
> }
>
> +Common::Point ToucheEngine::getMousePos() {
> + Common::EventManager *eventMan = _system->getEventManager();
> +
> + return eventMan->getMousePos();
> +}
> +
What about introducing a "_eventMan" member/field to the "Engine" base
class initialized with _system->getEventManager() (similar to
to the existing TimerManager & SaveFileManager members) ?
That would allow to simplify the code a bit, be more efficient and
also give a hint to the engine authors they can/should use it.
Gregory
More information about the Scummvm-devel
mailing list