Paul,
I have your tutorial program running on the GP2X console but can only exit with the START key. Is that normal or should the program exit with any other keys? (X?)
Thanks,
Joe
Paul,
I have your tutorial program running on the GP2X console but can only exit with the START key. Is that normal or should the program exit with any other keys? (X?)
Thanks,
Joe
Hi Joe,
in Paul's example there is the following procedure
[pascal]
Procedure ProcessJoyButtonUp(JoyButtonEvent: TSDL_JoyButtonEvent; Var AFinished: Boolean);
Begin
Case JoyButtonEvent.button Of
// exit program if gp2x 'Start' key is pressed
VK_START : AFinished := True;
Else
End;
End;[/pascal]
if you change VK_START to one of the other keys defined at the top of the dpr, it should react to that to exit.
Paul, should those VK_* constants be included in sdl.pas? If I moved them there, inside a GP2X IFDEF, would that be ok? Also should they follow some kind of SDL naming convention? possibly SDLK_*?
That is great news!Originally Posted by JoeDonth
Sorry about the trouble you had compiling it for Win32...
Using the START key seems to be a 'standard'? I think for the GP2X, at least for the built in programs...
Of course you could use anything really :-)
cheers,
Paul.
Games:
Seafox
Pages:
Syntax Error Software
itch.io page
Online Chess
http://gameknot.com/#paul_nicholls
Hi :-)Originally Posted by savage
Putting the GP2X keys into the SDL sounds like a good idea :-)
I have renamed them for you already to make them more readable as well as more SDL-like.
SDLK_GP2X_UP = 0;
SDLK_GP2X_UPLEFT = 1;
SDLK_GP2X_LEFT = 2;
SDLK_GP2X_DOWNLEFT = 3;
SDLK_GP2X_DOWN = 4;
SDLK_GP2X_DOWNRIGHT = 5;
SDLK_GP2X_RIGHT = 6;
SDLK_GP2X_UPRIGHT = 7;
SDLK_GP2X_START = 8;
SDLK_GP2X_SELECT = 9;
SDLK_GP2X_L = 10;
SDLK_GP2X_R = 11;
SDLK_GP2X_A = 12;
SDLK_GP2X_B = 13;
SDLK_GP2X_Y = 14;
SDLK_GP2X_X = 15;
SDLK_GP2X_VOLUP = 16;
SDLK_GP2X_VOLDOWN = 17;
SDLK_GP2X_CLICK = 18;
I think those names are better than what I had...more clear.
cheers,
Paul.
Games:
Seafox
Pages:
Syntax Error Software
itch.io page
Online Chess
http://gameknot.com/#paul_nicholls
You're da man!Originally Posted by savage
cheers,
Paul.
Games:
Seafox
Pages:
Syntax Error Software
itch.io page
Online Chess
http://gameknot.com/#paul_nicholls
Paul and savage,
I wanted to thank both of you for helping get started programming the GP2X with Pascal. I have a better understanding of how the pieces come together now.
I know that assisting a newbie can be frustrating at times and I really appreciate your kindness as well as your knowledge.
Regards,
Joe
These have now been checked into CVS and can be downloaded fromOriginally Posted by paul_nicholls
http://jedi-sdl.cvs.sourceforge.net/...?revision=1.28
Bookmarks