3 #include <SDL/SDL_image.h>
4 #include <SDL/SDL_mixer.h>
5 #include "gacela_SDL.h"
8 gacela_SDL_Init (SCM flags)
10 return scm_int2num (SDL_Init (scm_num2int (flags, 0, "SDL_Init")));
17 return SCM_UNSPECIFIED;
21 gacela_SDL_SetVideoMode (SCM width, SCM height, SCM bpp, SCM flags)
23 return scm_int2num ((int)SDL_SetVideoMode (scm_num2int (width, 0, "SDL_SetVideoMode"), \
24 scm_num2int (height, 0, "SDL_SetVideoMde"), \
25 scm_num2int (bpp, 0, "SDL_SetVideoMde"), \
26 scm_num2int (flags, 0, "SDL_SetVideoMde")));
30 gacela_SDL_WM_SetCaption (SCM title, SCM icon)
32 SDL_WM_SetCaption (scm_to_locale_string(title), scm_to_locale_string(icon));
33 return SCM_UNSPECIFIED;
37 SDL_register_functions (void* data)
39 scm_c_define ("SDL_INIT_TIMER", scm_int2num(SDL_INIT_TIMER));
40 scm_c_define ("SDL_INIT_AUDIO", scm_int2num(SDL_INIT_AUDIO));
41 scm_c_define ("SDL_INIT_VIDEO", scm_int2num(SDL_INIT_VIDEO));
42 scm_c_define ("SDL_INIT_CDROM", scm_int2num(SDL_INIT_CDROM));
43 scm_c_define ("SDL_INIT_JOYSTICK", scm_int2num(SDL_INIT_JOYSTICK));
44 scm_c_define ("SDL_INIT_NOPARACHUTE", scm_int2num(SDL_INIT_NOPARACHUTE));
45 scm_c_define ("SDL_INIT_EVENTTHREAD", scm_int2num(SDL_INIT_EVENTTHREAD));
46 scm_c_define ("SDL_INIT_EVERYTHING", scm_int2num(SDL_INIT_EVERYTHING));
48 scm_c_define ("SDL_SWSURFACE", scm_int2num(SDL_SWSURFACE));
49 scm_c_define ("SDL_HWSURFACE", scm_int2num(SDL_HWSURFACE));
50 scm_c_define ("SDL_ASYNCBLIT", scm_int2num(SDL_ASYNCBLIT));
52 scm_c_define ("SDL_ANYFORMAT", scm_int2num(SDL_ANYFORMAT));
53 scm_c_define ("SDL_HWPALETTE", scm_int2num(SDL_HWPALETTE));
54 scm_c_define ("SDL_DOUBLEBUF", scm_int2num(SDL_DOUBLEBUF));
55 scm_c_define ("SDL_FULLSCREEN", scm_int2num(SDL_FULLSCREEN));
56 scm_c_define ("SDL_OPENGL", scm_int2num(SDL_OPENGL));
57 scm_c_define ("SDL_OPENGLBLIT", scm_int2num(SDL_OPENGLBLIT));
58 scm_c_define ("SDL_RESIZABLE", scm_int2num(SDL_RESIZABLE));
59 scm_c_define ("SDL_NOFRAME", scm_int2num(SDL_NOFRAME));
61 scm_c_define ("SDL_HWACCEL", scm_int2num(SDL_HWACCEL));
62 scm_c_define ("SDL_SRCCOLORKEY", scm_int2num(SDL_SRCCOLORKEY));
64 scm_c_define ("SDL_GL_DOUBLEBUFFER", scm_int2num(SDL_GL_DOUBLEBUFFER));
66 scm_c_define ("SDL_DEFAULT_REPEAT_DELAY", scm_int2num(SDL_DEFAULT_REPEAT_DELAY));
67 scm_c_define ("SDL_DEFAULT_REPEAT_INTERVAL", scm_int2num(SDL_DEFAULT_REPEAT_INTERVAL));
69 scm_c_define ("SDL_LIL_ENDIAN", scm_int2num(SDL_LIL_ENDIAN));
70 scm_c_define ("SDL_BIG_ENDIAN", scm_int2num(SDL_BIG_ENDIAN));
72 scm_c_define ("MIX_DEFAULT_FORMAT", scm_int2num(MIX_DEFAULT_FORMAT));
74 scm_c_define_gsubr ("SDL_Init", 1, 0, 0, gacela_SDL_Init);
75 scm_c_define_gsubr ("SDL_Quit", 0, 0, 0, gacela_SDL_Quit);
76 scm_c_define_gsubr ("SDL_SetVideoMode", 4, 0, 0, gacela_SDL_SetVideoMode);
77 scm_c_define_gsubr ("SDL_WM_SetCaption", 2, 0, 0, gacela_SDL_WM_SetCaption);