return SCM_UNSPECIFIED;
}
+SCM
+gacela_SDL_Flip (SCM screen)
+{
+ return scm_from_int (SDL_Flip ((SDL_Surface *)scm_to_int (screen)));
+}
+
+SCM
+gacela_SDL_FreeSurface (SCM surface)
+{
+ SDL_FreeSurface ((SDL_Surface *)scm_to_int (surface));
+ return SCM_UNSPECIFIED;
+}
+
+SCM
+gacela_SDL_Delay (SCM ms)
+{
+ SDL_Delay (scm_to_int (ms));
+ return SCM_UNSPECIFIED;
+}
+
+SCM
+gacela_SDL_GetTicks ()
+{
+ return scm_from_int (SDL_GetTicks ());
+}
+
+SCM
+gacela_SDL_DisplayFormat (SCM surface)
+{
+ return scm_from_int ((int)SDL_DisplayFormat ((SDL_Surface *)scm_to_int (surface)));
+}
+
+SCM
+gacela_SDL_MapRGB (SCM format, SCM r, SCM g, SCM b)
+{
+ return scm_from_int (SDL_MapRGB ((SDL_PixelFormat *)scm_to_int (format), scm_to_int (r), scm_to_int (g), scm_to_int (b)));
+}
+
+SCM
+gacela_SDL_SetColorKey (SCM surface, SCM flag, SCM key)
+{
+ return scm_from_int (SDL_SetColorKey ((SDL_Surface *)scm_to_int (surface), scm_to_int (flag), scm_to_int (key)));
+}
+
+SCM
+gacela_SDL_LoadBMP (SCM file)
+{
+ return scm_from_int ((int)SDL_LoadBMP (scm_to_locale_string (file)));
+}
+
+SCM
+gacela_IMG_Load (SCM filename)
+{
+ return scm_from_int ((int)IMG_Load (scm_to_locale_string (filename)));
+}
+
+SCM
+gacela_SDL_GetVideoInfo ()
+{
+ const SDL_VideoInfo *info;
+ SCM vi;
+
+ info = SDL_GetVideoInfo ();
+ ('nil vi)
+ ((cons (int info->blit_hw) vi) vi) (':blit_hw label) ((cons label vi) vi)
+ ((cons (int info->hw_available) vi) vi) (':hw_available label) ((cons label vi) vi)
+ "return vi;")
+
void*
SDL_register_functions (void* data)
{
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);
+ scm_c_define_gsubr ("SDL_Flip", 1, 0, 0, gacela_SDL_Flip);
+ scm_c_define_gsubr ("SDL_FreeSurface", 1, 0, 0, gacela_SDL_FreeSurface);
+ scm_c_define_gsubr ("SDL_Delay", 1, 0, 0, gacela_SDL_Delay);
+ scm_c_define_gsubr ("SDL_GetTicks", 0, 0, 0, gacela_SDL_GetTicks);
+ scm_c_define_gsubr ("SDL_DisplayFormat", 1, 0, 0, gacela_SDL_DisplayFormat);
+ scm_c_define_gsubr ("SDL_MapRGB", 4, 0, 0, gacela_SDL_MapRGB);
+ scm_c_define_gsubr ("SDL_SetColorKey", 3, 0, 0, gacela_SDL_SetColorKey);
+ scm_c_define_gsubr ("SDL_LoadBMP", 1, 0, 0, gacela_SDL_LoadBMP);
+ scm_c_define_gsubr ("IMG_Load", 1, 0, 0, gacela_IMG_Load);
return NULL;
}