]> git.jsancho.org Git - gacela.git/commitdiff
(no commit message)
authorjsancho <devnull@localhost>
Thu, 5 May 2011 19:42:31 +0000 (19:42 +0000)
committerjsancho <devnull@localhost>
Thu, 5 May 2011 19:42:31 +0000 (19:42 +0000)
src/gacela_SDL.c

index 98b4a5ccf2107ea90d241ca7f030d2775a61c92a..cc929c46d50a78c2ef474b45497072c4fc057b1f 100644 (file)
@@ -1,5 +1,7 @@
 #include <libguile.h>
 #include <SDL/SDL.h>
+#include <SDL/SDL_image.h>
+#include <SDL/SDL_mixer.h>
 #include "gacela_SDL.h"
 
 SCM
@@ -18,12 +20,19 @@ gacela_SDL_Quit ()
 SCM
 gacela_SDL_SetVideoMode (SCM width, SCM height, SCM bpp, SCM flags)
 {
-  return scm_int2num (SDL_SetVideoMode (scm_num2int (width, 0, "SDL_SetVideoMode"), \
+  return scm_int2num ((int)SDL_SetVideoMode (scm_num2int (width, 0, "SDL_SetVideoMode"), \
                                        scm_num2int (height, 0, "SDL_SetVideoMde"), \
                                        scm_num2int (bpp, 0, "SDL_SetVideoMde"), \
                                        scm_num2int (flags, 0, "SDL_SetVideoMde")));
 }
 
+SCM
+gacela_SDL_WM_SetCaption (SCM title, SCM icon)
+{
+  SDL_WM_SetCaption (scm_to_locale_string(title), scm_to_locale_string(icon));
+  return SCM_UNSPECIFIED;
+}
+
 void*
 SDL_register_functions (void* data)
 {
@@ -47,9 +56,25 @@ SDL_register_functions (void* data)
   scm_c_define ("SDL_OPENGL", scm_int2num(SDL_OPENGL));
   scm_c_define ("SDL_OPENGLBLIT", scm_int2num(SDL_OPENGLBLIT));
   scm_c_define ("SDL_RESIZABLE", scm_int2num(SDL_RESIZABLE));
+  scm_c_define ("SDL_NOFRAME", scm_int2num(SDL_NOFRAME));
+
+  scm_c_define ("SDL_HWACCEL", scm_int2num(SDL_HWACCEL));
+  scm_c_define ("SDL_SRCCOLORKEY", scm_int2num(SDL_SRCCOLORKEY));
+
+  scm_c_define ("SDL_GL_DOUBLEBUFFER", scm_int2num(SDL_GL_DOUBLEBUFFER));
+
+  scm_c_define ("SDL_DEFAULT_REPEAT_DELAY", scm_int2num(SDL_DEFAULT_REPEAT_DELAY));
+  scm_c_define ("SDL_DEFAULT_REPEAT_INTERVAL", scm_int2num(SDL_DEFAULT_REPEAT_INTERVAL));
+
+  scm_c_define ("SDL_LIL_ENDIAN", scm_int2num(SDL_LIL_ENDIAN));
+  scm_c_define ("SDL_BIG_ENDIAN", scm_int2num(SDL_BIG_ENDIAN));
+
+  scm_c_define ("MIX_DEFAULT_FORMAT", scm_int2num(MIX_DEFAULT_FORMAT));
 
   scm_c_define_gsubr ("SDL_Init", 1, 0, 0, gacela_SDL_Init);
   scm_c_define_gsubr ("SDL_Quit", 0, 0, 0, gacela_SDL_Quit);
   scm_c_define_gsubr ("SDL_SetVideoMode", 4, 0, 0, gacela_SDL_SetVideoMode);
+  scm_c_define_gsubr ("SDL_WM_SetCaption", 2, 0, 0, gacela_SDL_WM_SetCaption);
+
   return NULL;
 }