|
@ -110,6 +110,8 @@ SDL_Color color={255,125,0}; |
|
|
|
|
|
|
|
|
TTF_Font *font; |
|
|
TTF_Font *font; |
|
|
|
|
|
|
|
|
|
|
|
SDL_Joystick *joystick; |
|
|
|
|
|
|
|
|
/** \brief Hier Raeumen wir nach Programablauf auf.
|
|
|
/** \brief Hier Raeumen wir nach Programablauf auf.
|
|
|
* |
|
|
* |
|
|
* \param returnCode Der Zurueckzugebende Return Code |
|
|
* \param returnCode Der Zurueckzugebende Return Code |
|
@ -121,6 +123,8 @@ void Quit( int returnCode ) |
|
|
Mix_HaltMusic(); |
|
|
Mix_HaltMusic(); |
|
|
Mix_FreeMusic(music); |
|
|
Mix_FreeMusic(music); |
|
|
music = NULL; |
|
|
music = NULL; |
|
|
|
|
|
|
|
|
|
|
|
SDL_JoystickClose(joystick); |
|
|
|
|
|
|
|
|
SDL_FreeSurface(panel); |
|
|
SDL_FreeSurface(panel); |
|
|
SDL_FreeSurface(text); |
|
|
SDL_FreeSurface(text); |
|
@ -610,7 +614,7 @@ int main( int argc, char **argv ) |
|
|
|
|
|
|
|
|
printf("\033[33m sdljpd: \033[32m Parrallel port found at 0x%x. \033[m \n", port_adr); |
|
|
printf("\033[33m sdljpd: \033[32m Parrallel port found at 0x%x. \033[m \n", port_adr); |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
|
|
|
filefoo(); |
|
|
filefoo(); |
|
|
|
|
|
|
|
|
if(TTF_Init()==-1) { |
|
|
if(TTF_Init()==-1) { |
|
@ -627,7 +631,7 @@ int main( int argc, char **argv ) |
|
|
|
|
|
|
|
|
/* sprintf(wmcapt,"glpong - %s vs ", player_a );*/ |
|
|
/* sprintf(wmcapt,"glpong - %s vs ", player_a );*/ |
|
|
/* initialize SDL */ |
|
|
/* initialize SDL */ |
|
|
if ( SDL_Init( SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0 ) |
|
|
if ( SDL_Init( SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK) < 0 ) |
|
|
{ |
|
|
{ |
|
|
fprintf( stderr, "Video initialization failed: %s\n", |
|
|
fprintf( stderr, "Video initialization failed: %s\n", |
|
|
SDL_GetError( ) ); |
|
|
SDL_GetError( ) ); |
|
@ -652,7 +656,16 @@ int main( int argc, char **argv ) |
|
|
SDL_GetError( ) ); |
|
|
SDL_GetError( ) ); |
|
|
Quit( 1 ); |
|
|
Quit( 1 ); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(joystick = SDL_JoystickOpen (0) == NULL) { |
|
|
|
|
|
printf("Unable to open joystick!\n"); |
|
|
|
|
|
exit(1); |
|
|
|
|
|
} |
|
|
|
|
|
/*
|
|
|
|
|
|
//SDL_JoystickEventState (SDL_ENABLE);
|
|
|
|
|
|
// this will alter the behaviour of the event queue of the sdl system
|
|
|
|
|
|
SDL_JoystickEventState ( SDL_QUERY ); |
|
|
|
|
|
*/ |
|
|
SDL_WM_SetCaption(wmcapt, NULL); |
|
|
SDL_WM_SetCaption(wmcapt, NULL); |
|
|
/*SDL_WM_SetIcon(SDL_LoadBMP("glpong.bmp"),NULL);*/ |
|
|
/*SDL_WM_SetIcon(SDL_LoadBMP("glpong.bmp"),NULL);*/ |
|
|
|
|
|
|
|
|