From: jsancho Date: Thu, 5 May 2011 19:42:31 +0000 (+0000) Subject: (no commit message) X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=059fcc73ff0fbd7a3797c84a9357743fd9eac5ac;p=gacela.git --- diff --git a/src/gacela_SDL.c b/src/gacela_SDL.c index 98b4a5c..cc929c4 100644 --- a/src/gacela_SDL.c +++ b/src/gacela_SDL.c @@ -1,5 +1,7 @@ #include #include +#include +#include #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; }