On 7/12/07, <b class="gmail_sendername">Kostas Nakos</b> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Are you proposing to:<br>1) Find out all the actions all engines require<br>2) Weed out the duplicates<br>3) Make an enumerated type out of this<br><br>or a more complex solution, where the event manager knows about no<br>
actions (or perhaps only a few such as Pause and Quit), then when an<br>engine starts up it notifies the event manager that it can handle X<br>actions (together with descriptions etc)? Then all sorts of stuff<br>happens between the backends, the event manager and the engine.
</blockquote><div><br>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.<br>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.
<br>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.<br></div><br></div><br>-- <br>Best regards,
<br>Serhiy Batyuk