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
HandleClientMessageEvent((ClientMessageEvent *) event);
break;
-#ifdef USE_SDL_LIBRARY
+#ifdef USE_SDL_JOYSTICK
case SDL_JOYAXISMOTION:
case SDL_JOYBUTTONDOWN:
case SDL_JOYBUTTONUP:
void InitJoysticks()
{
-#ifdef USE_SDL_LIBRARY
+#ifdef USE_SDL_JOYSTICK
static boolean sdl_joystick_subsystem_initialized = FALSE;
#endif
joystick_status = JOYSTICK_OFF;
-#ifdef USE_SDL_LIBRARY
+#ifdef USE_SDL_JOYSTICK
if (!sdl_joystick_subsystem_initialized)
{
joystick_status = JOYSTICK_AVAILABLE;
}
-#else /* !USE_SDL_LIBRARY */
+#else /* !USE_SDL_JOYSTICK */
#ifndef MSDOS
for (i=0; i<MAX_PLAYERS; i++)
}
#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} };
return result;
}
-#else /* !USE_SDL_LIBRARY */
+#else /* !USE_SDL_JOYSTICK */
void CheckJoystickData()
{
}
#endif /* MSDOS */
-#endif /* !USE_SDL_LIBRARY */
+#endif /* !USE_SDL_JOYSTICK */
int JoystickButton(int player_nr)
{
#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);
/* | 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;
SDL_QuitSubSystem(SDL_INIT_VIDEO|SDL_INIT_JOYSTICK);
}
-#endif /* USE_SDL_LIBRARY */
+#endif /* USE_SDL_JOYSTICK */
/* +-----------------------------------------------------------------------+ */
/* | SDL TEST STUFF | */
#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();
#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
#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"