GLBasic forum

Main forum => GLBasic - en => Topic started by: phil on 2007-Feb-19

Title: Help With Gp2x Buttons Config
Post by: phil on 2007-Feb-19
Here is what ive found

//This list is usefull to know when you are programming for gp2x
//key(203) = Stick to Left      (arrow key)pc
//key(205) = Stick to Right      (arrow key)pc
//key(200) = Stick to Up      (arrow key)pc
//key(208) = Stick to Down      (arrow key)pc
//key(29) = A Button         (control)pc
//key() = B Button      
//key() = X Button
//key() = Y Button   
//key() = Start Button   
//key() = Select Button      
//key() = L Button         
//key() = R Button      

Can anyone add any more PLZ???
Title: Help With Gp2x Buttons Config
Post by: Kitty Hello on 2007-Feb-19
See manual for KEY command.
Title: Help With Gp2x Buttons Config
Post by: Devlin on 2007-Feb-19
Alternatively, add this function to your code :)

Code (glbasic) Select
FUNCTION aliases:
//                   PC Key     : GP2X key
vk_space=57       // Space bar  : Joy click
vk_up=200         // Arrow Up   : Joy Up
vk_down=208       // Arrow Down : Joy Down
vk_left=203       // Arrow Left : Joy Left
vk_right=205      // Arrow Right: Joy Right
vk_a=30           // Letter 'A' : A Face button
vk_b=32           // Letter 'D' : B Face button
vk_x=31           // Letter 'S' : X Face button
vk_y=17           // Letter 'W' : Y Face button
vk_l=42           // Left Shift : Left Shoulder
vk_r=54           // Right Shift: Right Shoulder
vk_start=28       // Enter      : Start button
vk_select=15      // Tab        : Select button
vk_volup=201      // Page Down  : Volume Up
vk_voldown=209    // Page Up    : Volume Down
vk_escape=1       // Escape     : Volume Up&Down
vk_none=0         // No key     : No key

white   = RGB(255,255,255)
cyan    = RGB(0,255,255)
magenta = RGB(255,0,255)
ENDFUNCTION // KEYMAP
Don't forget to call it at the beginning of your code!
Title: Help With Gp2x Buttons Config
Post by: Kitty Hello on 2007-Feb-19
Nice. Or see this thread: http://www.glbasic.com/forum/viewtopic.php?pid=3063#p3063
Title: Help With Gp2x Buttons Config
Post by: phil on 2007-Feb-19
Thanks everyone!!!!
Title: Help With Gp2x Buttons Config
Post by: DMusta1ne on 2007-Mar-20
I should not open a new Gp2x help topic, so I'll wrote my question here. I know that GlBasic has network funcions, my question is : this functions works on games compiled for Gp2x? what kind of networks? Thanks
Title: Help With Gp2x Buttons Config
Post by: Kitty Hello on 2007-Mar-21
I have not tested them. They worked on Linux last time I tested, but it seems there's a bug right now, so they don't even work on Windows at the moment.
Title: Help With Gp2x Buttons Config
Post by: DMusta1ne on 2007-Mar-21
Thanks again. I oly got to say that if this Sdk features 3d and network functions suitables for the gp2x, Glbasic will be a very reputed sdk. Keep on workin! ;)
Title: Help With Gp2x Buttons Config
Post by: Kitty Hello on 2007-Mar-21
Well, the GP2X will never be a great 3D game platform. Even if they ported Quake and Egoboo. The power is very limited for 3D. However for 2D games it's awesome, and for this GLBasic is a perfect choice if you want it fast and easy.
Title: Help With Gp2x Buttons Config
Post by: DMusta1ne on 2007-Mar-21
The only reason for me to start programmin in glbasic is the 3d features and the network funcitions, if those doesn't work properlly on gp2x, better keep on with Fenix, that is a good ide to programm 2d games, and its more familiar to me, and its gnu. I hope u dont take the post in the wrong way, i saw the demo games and glbasic is a great ide to program 3d games in pc, but is not a big deal 4 me if i can't port those games to gp2x. Thanks anyway ^^