rnd-20001125-2-src
[rocksndiamonds.git] / src / sdl.h
index 69d2f20b299b589f90bb8b0d6ef770330e920e9a..0fe26e037508f54e4642e8b4de757df51be8fbe9 100644 (file)
--- a/src/sdl.h
+++ b/src/sdl.h
 #define SDL_H
 
 #include "SDL.h"
+
+#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"
+#endif
+
+
+/* definitions needed for "system.c" */
+
+#define SURFACE_FLAGS          (SDL_SWSURFACE)
+
+
+/* system dependent definitions */
+
+#define PLATFORM_STRING                "SDL"
+#define FULLSCREEN_STATUS      FULLSCREEN_AVAILABLE
 
 
 /* SDL type definitions */
@@ -90,8 +109,10 @@ typedef int                 Colormap;
 #define KEY_Meta_R             SDLK_RMETA
 #define KEY_Alt_L              SDLK_LALT
 #define KEY_Alt_R              SDLK_RALT
+#define KEY_Super_L            SDLK_LSUPER
+#define KEY_Super_R            SDLK_RSUPER
 #define KEY_Mode_switch                SDLK_MODE
-#define KEY_Multi_key          KEY_UNDEFINED           /* undefined */
+#define KEY_Multi_key          SDLK_RCTRL
 
 #define KEY_BackSpace          SDLK_BACKSPACE
 #define KEY_Delete             SDLK_DELETE
@@ -101,6 +122,7 @@ typedef int                 Colormap;
 #define KEY_End                        SDLK_END
 #define KEY_Page_Up            SDLK_PAGEUP
 #define KEY_Page_Down          SDLK_PAGEDOWN
+#define KEY_Menu               SDLK_MENU
 
 #define KEY_space              SDLK_SPACE
 #define KEY_exclam             SDLK_EXCLAIM
@@ -281,6 +303,8 @@ typedef int                 Colormap;
 
 /* SDL function definitions */
 
+inline void SDLInitBufferedDisplay(DrawBuffer *, DrawWindow *);
+inline boolean SDLSetVideoMode(DrawBuffer *);
 inline void SDLCopyArea(SDL_Surface *, SDL_Surface *,
                         int, int, int, int, int, int);
 inline void SDLFillRectangle(SDL_Surface *, int, int, int, int, unsigned int);