rnd-20000901-2-src
authorHolger Schemel <info@artsoft.org>
Fri, 1 Sep 2000 18:14:28 +0000 (20:14 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:34:53 +0000 (10:34 +0200)
src/Makefile
src/events.c
src/init.c
src/joystick.c
src/joystick.h
src/main.c
src/screens.c
src/sdl.h

index 0dad3f3d1736052ae23dc01a92c028db28fd65d3..1c20496f6469e9d2041e0202a411ca2e965ad9e6 100644 (file)
@@ -36,8 +36,8 @@ endif
 
 USE_SDL = true
 # USE_SDL = false
-USE_SDL_OLD_LIBS = true
-USE_SDL_OLD_LIBS = false
+USE_SDL_OLD_LIBS = true
+USE_SDL_OLD_LIBS = false
 
 ifeq ($(USE_SDL_OLD_LIBS),true)
 SDL_EXTRA_LIBS = -lIMG -lmixer
index a46f3548117071086e8be052b6024e40e7c0647b..d3f8196bac56506101241334fdca3e5a20b564a3 100644 (file)
@@ -121,7 +121,7 @@ void HandleOtherEvents(Event *event)
       HandleClientMessageEvent((ClientMessageEvent *) event);
       break;
 
-#ifdef USE_SDL_LIBRARY
+#ifdef USE_SDL_JOYSTICK
     case SDL_JOYAXISMOTION:
     case SDL_JOYBUTTONDOWN:
     case SDL_JOYBUTTONUP:
index 7d97072ef0ac2b236aafdbc5019135e943632810..f1c7ffd9c297f78a313cd408a3ed079bf1af37e3 100644 (file)
@@ -282,7 +282,7 @@ void InitSoundServer()
 
 void InitJoysticks()
 {
-#ifdef USE_SDL_LIBRARY
+#ifdef USE_SDL_JOYSTICK
   static boolean sdl_joystick_subsystem_initialized = FALSE;
 #endif
 
@@ -293,7 +293,7 @@ void InitJoysticks()
 
   joystick_status = JOYSTICK_OFF;
 
-#ifdef USE_SDL_LIBRARY
+#ifdef USE_SDL_JOYSTICK
 
   if (!sdl_joystick_subsystem_initialized)
   {
@@ -333,7 +333,7 @@ void InitJoysticks()
     joystick_status = JOYSTICK_AVAILABLE;
   }
 
-#else /* !USE_SDL_LIBRARY */
+#else /* !USE_SDL_JOYSTICK */
 
 #ifndef MSDOS
   for (i=0; i<MAX_PLAYERS; i++)
index c069289a6beea6b674f3a6b4646104b0b46a800a..00d497f352b1cf938cdc726ea60277e02da9ab65 100644 (file)
@@ -40,7 +40,7 @@ static int JoystickPosition(int middle, int margin, int actual)
 }
 #endif
 
-#ifdef USE_SDL_LIBRARY
+#ifdef USE_SDL_JOYSTICK
 
 static SDL_Joystick *sdl_joystick[MAX_PLAYERS] = { NULL, NULL, NULL, NULL };
 static int sdl_js_axis[MAX_PLAYERS][2]   = { {0, 0}, {0, 0}, {0, 0}, {0, 0} };
@@ -205,7 +205,7 @@ int Joystick(int player_nr)
   return result;
 }
 
-#else /* !USE_SDL_LIBRARY */
+#else /* !USE_SDL_JOYSTICK */
 
 void CheckJoystickData()
 {
@@ -363,7 +363,7 @@ int Joystick(int player_nr)
 }
 #endif /* MSDOS */
 
-#endif /* !USE_SDL_LIBRARY */
+#endif /* !USE_SDL_JOYSTICK */
 
 int JoystickButton(int player_nr)
 {
index 068543595f6802233a75e78e77323dd7390e8c8e..0bbb22bff4460a9136e7c37fd548259f9f87ba85 100644 (file)
@@ -74,7 +74,7 @@
 #endif
 
 
-#ifdef USE_SDL_LIBRARY
+#ifdef USE_SDL_JOYSTICK
 SDL_Joystick *Get_SDL_Joystick(int);
 boolean Open_SDL_Joystick(int);
 void Close_SDL_Joystick(int);
index b00e20a28ef67f89800e2897503ce700ea369f4c..94c0d8496aa67c6feb3d3593711dc2271afcfb7c 100644 (file)
@@ -572,7 +572,7 @@ char *element_info[] =
 /* | SDL TEST STUFF                                                        | */
 /* +-----------------------------------------------------------------------+ */
 
-#ifdef USE_SDL_LIBRARY
+#ifdef USE_SDL_JOYSTICK
 
 SDL_Surface *sdl_screen, *sdl_image_tmp, *sdl_image, *sdl_image_masked;
 SDL_Surface *sdl_image2_tmp, *sdl_image2, *sdl_image2_masked;
@@ -936,7 +936,7 @@ void TEST_SDL_JOYSTICK()
   SDL_QuitSubSystem(SDL_INIT_VIDEO|SDL_INIT_JOYSTICK);
 }
 
-#endif /* USE_SDL_LIBRARY */
+#endif /* USE_SDL_JOYSTICK */
 
 /* +-----------------------------------------------------------------------+ */
 /* | SDL TEST STUFF                                                        | */
@@ -958,7 +958,7 @@ int main(int argc, char *argv[])
 #endif
 
 #if 0
-#ifdef USE_SDL_LIBRARY
+#ifdef USE_SDL_JOYSTICK
   /*
   TEST_SDL_BLIT_RECT((WIN_XSIZE - TILEX)/2, (WIN_YSIZE - TILEY)/2);
   TEST_SDL_EVENT_LOOP();
index d6ecb554bb3fc24f06e3988bc459b8c117d76e7d..57bfb001979859d1dea0748f2796ec82ad9e1340 100644 (file)
@@ -2108,7 +2108,7 @@ void CalibrateJoystick(int player_nr)
 
 #ifndef MSDOS
 
-#ifdef USE_SDL_LIBRARY
+#ifdef USE_SDL_JOYSTICK
     joy_ctrl.x = Get_SDL_Joystick_Axis(joystick_fd, 0);
     joy_ctrl.y = Get_SDL_Joystick_Axis(joystick_fd, 1);
 #else
index 3c9ee80c679273eecdcc5311c948ab09ae3b9efa..e706ee9d129c5ec3d65c308b000509089c411026 100644 (file)
--- a/src/sdl.h
+++ b/src/sdl.h
@@ -20,6 +20,7 @@
 #if SDL_MAJOR_VERSION >= 1 && SDL_MINOR_VERSION >= 1
 #include "SDL_image.h"
 #include "SDL_mixer.h"
+#define USE_SDL_JOYSTICK
 #else
 #include "IMG.h"
 #include "mixer.h"