Re: [AD] New event proposals

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 1/19/06, Peter Wang <tjaden@xxxxxxxxxx> wrote:
How does it allow an infinite number of user events?  The limit on the
number of event types right now is due to the use of the event enum
for event masks, which restricts us to 32 event types in total.
I don't think the design will be "cleaner" normally.  Most event sources
generate events which have no equivalents in other event sources.  You
would need a separate al_get_next_event(queue, ...) call to each.

 al_get_next_event would take void * as second parameter and event would be in queue as type-size-raw data. But I overlooked fact that even enums are also used as masks.

And actually, AL_BUTTON is missing some useful information, e.g. when a
mouse button is clicked you almost always want to know the cursor
position.

If you want port your game to platform without mouse (consoles) or just want to support gamepads. You'll probably separate movement (so it can be emulated, for example with analog stick) and buttons (which will be mapped to gamepad buttons). Even if there is mouse nothing guaranties user will map action (like firing) to mouse button.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/