(clines "#include <SDL/SDL_mixer.h>")
(clines "#include <SDL/SDL_rotozoom.h>")
-;;; These are the flags which may be passed to SDL_Init()
-(defconstant SDL_INIT_TIMER #x00000001)
-(defconstant SDL_INIT_AUDIO #x00000010)
-(defconstant SDL_INIT_VIDEO #x00000020)
-(defconstant SDL_INIT_CDROM #x00000100)
-(defconstant SDL_INIT_JOYSTICK #x00000200)
-(defconstant SDL_INIT_NOPARACHUTE #x00100000)
-(defconstant SDL_INIT_EVENTTHREAD #x01000000)
-(defconstant SDL_INIT_EVERYTHING #x0000FFFF)
-
-
-;;; These are the currently supported flags for the SDL_surface
-;;; Available for SDL_CreateRGBSurface() or SDL_SetVideoMode()
-(defconstant SDL_SWSURFACE #x00000000)
-(defconstant SDL_HWSURFACE #x00000001)
-(defconstant SDL_ASYNCBLIT #x00000004)
-
-
-;;; Available for SDL_SetVideoMode()
-(defconstant SDL_ANYFORMAT #x10000000)
-(defconstant SDL_HWPALETTE #x20000000)
-(defconstant SDL_DOUBLEBUF #x40000000)
-(defconstant SDL_FULLSCREEN #x80000000)
-(defconstant SDL_OPENGL #x00000002)
-(defconstant SDL_OPENGLBLIT #x0000000A)
-(defconstant SDL_RESIZABLE #x00000010)
-(defconstant SDL_NOFRAME #x00000020)
-
-;;; Used internally (read-only)
-(defconstant SDL_HWACCEL #x00000100)
-(defconstant SDL_SRCCOLORKEY #x00001000)
-
-;;; For setting the OpenGL window attributes
-(defconstant SDL_GL_DOUBLEBUFFER 5)
-
-;;; Keyboard
-(defconstant SDL_DEFAULT_REPEAT_DELAY 500)
-(defconstant SDL_DEFAULT_REPEAT_INTERVAL 30)
-
-;;; The two types of endianness
-(defconstant SDL_LIL_ENDIAN 1234)
-(defconstant SDL_BIG_ENDIAN 4321)
-
+;;; SDL constants as functions
+(mapcconst int "int" "SDL_INIT_TIMER")
+(mapcconst int "int" "SDL_INIT_AUDIO")
+(mapcconst int "int" "SDL_INIT_VIDEO")
+(mapcconst int "int" "SDL_INIT_CDROM")
+(mapcconst int "int" "SDL_INIT_JOYSTICK")
+(mapcconst int "int" "SDL_INIT_NOPARACHUTE")
+(mapcconst int "int" "SDL_INIT_EVENTTHREAD")
+(mapcconst int "int" "SDL_INIT_EVERYTHING")
+
+(mapcconst int "int" "SDL_SWSURFACE")
+(mapcconst int "int" "SDL_HWSURFACE")
+(mapcconst int "int" "SDL_ASYNCBLIT")
+
+(mapcconst int "int" "SDL_ANYFORMAT")
+(mapcconst int "int" "SDL_HWPALETTE")
+(mapcconst int "int" "SDL_DOUBLEBUF")
+(mapcconst int "int" "SDL_FULLSCREEN")
+(mapcconst int "int" "SDL_OPENGL")
+(mapcconst int "int" "SDL_OPENGLBLIT")
+(mapcconst int "int" "SDL_RESIZABLE")
+(mapcconst int "int" "SDL_NOFRAME")
+
+(mapcconst int "int" "SDL_HWACCEL")
+(mapcconst int "int" "SDL_SRCCOLORKEY")
+
+(mapcconst int "int" "SDL_GL_DOUBLEBUFFER")
+
+(mapcconst int "int" "SDL_DEFAULT_REPEAT_DELAY")
+(mapcconst int "int" "SDL_DEFAULT_REPEAT_INTERVAL")
+
+(mapcconst int "int" "SDL_LIL_ENDIAN")
+(mapcconst int "int" "SDL_BIG_ENDIAN")
;;; SDL Functions
(defcfun "int gacela_SDL_Init (int flags)" 0