1. Keyboard & Fasttracker2.08 support.
- Posted by Tor Bernhard Gausen <tor.gausen at C2I.NET> Dec 14, 1998
- 357 views
Does anyone know how to read the keyboard as if it was a big gamepad? I mean, without those annoying inkey-buffers, delays and repetitions etc. Seems like this is some kind of a problem. I found a mod-player for Euphoria, but have anyone made a XM player yet? I would die for an option to include that lovely SB-16 32-bit mixing of 32 channels. & BTW, Thanx to Ralf for pointing me to #A0000 ! Tor Gausen
2. Re: Keyboard & Fasttracker2.08 support.
- Posted by Ralf Nieuwenhuijsen <nieuwen at XS4ALL.NL> Dec 14, 1998
- 351 views
- Last edited Dec 15, 1998
>Does anyone know how to read the keyboard as if it was >a big gamepad? I mean, without those annoying inkey-buffers, >delays and repetitions etc. >Seems like this is some kind of a problem. Attached is a little file called event.e and keyread.e The last is by Micheal Bolin and does just what you want. No inkey-buffers at all. Instead it (the function get_keys in keyread.e) returns all currently pressed keys (scancodes!) in a sequence. (ordered by which one was pressed first). Event.e is an interface that uses keyread.e It allows you to set an initial delay and an repeat-delay for each key on the keyboard (scancode of the key!). You can use it like this: include event.e event_scankey (1, {10,5}, routine_id ("quit_proc")) The routine to call is quit_proc. It will receive the pressed key (1 in this case) as an integer argument. The sequence {10,5} means, initial buffer 10 after that use a buffer of 5. You can offcourse also set it to {0,0}. The biggest advantage is not the freedom to set the delays to any custom value, but to be able to set a different delay for every key! This means arrow keys can have a really quick response, while toggle keys like a flashlight or something can have the normal type of delays. (otherwise it would be impossible to use it effectively: Can you hold down a key for 0.0001 sec ?? so that it only triggers once ??) During your game (or your program, depends) you need to call. update_events () It will call the associated routines for each key pressed. I think this will help you out. Offcourse the credits go to Micheal Bolin, who wrote the actual ASM keyhandler. >I found a mod-player for Euphoria, but have anyone >made a XM player yet? I would die for an option to >include that lovely SB-16 32-bit mixing of 32 channels. Nope, no one has yet made it, so why dont you give it a shot ? I have some files describing its file-format laying around.. >& BTW, Thanx to Ralf for pointing me to #A0000 ! You're welcome. Good luck all, Ralf > > >Tor Gausen >
3. Re: Keyboard & Fasttracker2.08 support.
- Posted by Ralf Nieuwenhuijsen <nieuwen at XS4ALL.NL> Dec 14, 1998
- 353 views
- Last edited Dec 15, 1998
As always I forgot to attach them. Ralf N. nieuwen at xs4all.nl ralf_n at email.com http://www.xs4all.nl/~nieuwen ..and the message bord is at.. (( I make it all a litter more intuitive soon.. so many things to do.. ))