Re: [AD] [ alleg-Bugs-2333410 ] think of a way to allocate user event type numbers. |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: "Coordination of admins/developers of the game programming library Allegro" <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] [ alleg-Bugs-2333410 ] think of a way to allocate user event type numbers.
- From: "Milan Mimica" <milan.mimica@xxxxxxxxxx>
- Date: Fri, 12 Dec 2008 09:47:39 +0200
2008/12/11 Evert Glebbeek <eglebbk@xxxxxxxxxx>:
> On 11 Dec 2008, at 15:49, Milan Mimica wrote:
>> How about this:
>> #define ALLEGRO_EVENT_ID(a,b,c,d,e,f) ((((a)-0x41)<<25) \
>> | (((b)-0x41)<<20) \
>> | (((c)-0x41)<<15) \
>> | (((d)-0x41)<<10) \
>> | (((e)-0x41)<<5) \
>> | ((f)-0x41))
>>
>> It uniquely codes any of the upper case letters and [\]^_`. Leaves
>> 2 bits for
>> something...
>
> Leaves out numbers though (based on your description), which isn't
> particularly nice.
Doesn't leave out numbers, except the two bits at the end. It takes
values in range from 'A' to '`'.
--
Milan Mimica
http://sparklet.sf.net