Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25

Thread: fpc4gp2x: GP2X Console Development

  1. #11

    fpc4gp2x: GP2X Console Development

    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

  2. #12

    fpc4gp2x: GP2X Console Development

    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.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  3. #13

    fpc4gp2x: GP2X Console Development

    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_*?
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  4. #14

    fpc4gp2x: GP2X Console Development

    Quote Originally Posted by JoeDonth
    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
    That is great news!
    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.

  5. #15

    fpc4gp2x: GP2X Console Development

    Quote Originally Posted by savage
    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_*?
    Hi :-)
    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.

  6. #16

    fpc4gp2x: GP2X Console Development

    Excellent I'll try and check it into CVS this week-end.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  7. #17

    fpc4gp2x: GP2X Console Development

    Quote Originally Posted by savage
    Excellent I'll try and check it into CVS this week-end.
    You're da man!
    cheers,
    Paul.

  8. #18

    fpc4gp2x: GP2X Console Development

    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

  9. #19

    fpc4gp2x: GP2X Console Development

    No problem Joe,
    Just make sure you keep us posted with what you are up to? We all love screenshots of gameplay videos .
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  10. #20

    fpc4gp2x: GP2X Console Development

    Quote Originally Posted by paul_nicholls
    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;
    These have now been checked into CVS and can be downloaded from
    http://jedi-sdl.cvs.sourceforge.net/...?revision=1.28
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •