123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|573|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz Max -> BMax Keyboard Checking

Sat, 09 Jan 2010, 05:01
Jayenkai
God damnit, they had to screw up my lovely scancode list, didn't they!!

*sigh*

OK, if you have BlitzMax running, start a new test proggy, add a little loop with this in it so you can test each key..


And then lob these functions down the bottom.



Give it all a whirl, and let me know if it's missing anything important, along with the names and numbers of those keys.

Thanks all.

Note : I'm 100% expecting the "Not letters and numbers" keys to be all out of order, because a few of them already are, on my keyboard!!

-=-=-
''Load, Next List!''
Tue, 12 Jan 2010, 02:39
Afr0
FFS, use BlitzMax as it's supposed to be used instead of trying to make it into something it's not!!

-=-=-
Afr0 Games

Project Dollhouse on Github - Please fork!
Tue, 12 Jan 2010, 04:31
Jayenkai
Some people prefer to learn things.
Tue, 12 Jan 2010, 04:47
Afr0
This is not an effective way to learn BlitzMax. You're trying to recreate Blitz/Blitz3D in BlitzMax, based on what you already know. It'll make programming in BlitzMax slow and cumbersome, and in the end will not allow you to learn the language effectively (if at all).

-=-=-
Afr0 Games

Project Dollhouse on Github - Please fork!
Tue, 12 Jan 2010, 05:05
Jayenkai
No, I'm trying to get good redefinable keys, whilst returning a value that I can use to draw different images with text overlays for the illustrations of what keys the player has set for their controls.

It'd be a total bitch if you had..

"If Player1Up = Key_Up and KeyDown(Key_Up) then Move player 1 up."
and then repeated that for every key, every player and every direction.

What I've done is referenced everything by a number, so I can shove the numbers in an array, return a name for the screen, and use the number for that teensy tiny itty bitty little function at the bottom of the code.


I'd like to know if the button names are accurate on other systems, but no buggers helping me as usual.



-=-=-
''Load, Next List!''
Tue, 12 Jan 2010, 05:25
Afr0
I don't see why the button names wouldn't be valid on other systems, save for Macs.
At least throw the functions in a class, and make GetKey() work on an internal array...

-=-=-
Afr0 Games

Project Dollhouse on Github - Please fork!
Tue, 12 Jan 2010, 05:55
JL235
If supply a compiled version of the programs with output then I'd imagine you'll get more people testing. Not everyone has BMax installed, that's the reason why I'm not testing it.

Are those KEY constants definined by you or BMax? If it's BMax then I'd presume they are right and just move on.
Tue, 12 Jan 2010, 05:59
Jayenkai
Except that on my keyboard, Tilde and Quotes are already wrong, and mine's just English. I can only imagine things getting worse from there on in.

And, I can't really do a compiled version for.. let's say Mac, because.. I ain't got one!

-=-=-
''Load, Next List!''
Tue, 12 Jan 2010, 06:01
JL235
You could ask Cower to build a copy for you. He has BMax and a Mac!