[Scummvm-devel] RFC: Flexible keymapping via new EVENT_ (post 0.10) (Serhiy Batyuk)
Serhiy Batyuk
sbatyuk at gmail.com
Thu Jul 12 23:20:41 CEST 2007
On 7/12/07, Kostas Nakos wrote:
>
> Are you proposing to:
> 1) Find out all the actions all engines require
> 2) Weed out the duplicates
> 3) Make an enumerated type out of this
>
> or a more complex solution, where the event manager knows about no
> actions (or perhaps only a few such as Pause and Quit), then when an
> engine starts up it notifies the event manager that it can handle X
> actions (together with descriptions etc)? Then all sorts of stuff
> happens between the backends, the event manager and the engine.
I propose declaring UserActionType as an enum which will be extended with
new action types gradually over time as more and more engines will be
converted to the new architecture.
Now, the real action objects (that can be declared as constant, by the way)
defined by UserAction struct (which actually contains the action type,
description, etc.) will be registered in the event manager during the
engine/game start up.
So, this is basically a dynamic approach, because each engine/game has a
list of X actions it can handle and registers/unregisters them with the
event manager during startup/shutdown.
--
Best regards,
Serhiy Batyuk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20070713/7948f0cb/attachment.html>
More information about the Scummvm-devel
mailing list