]> git.jsancho.org Git - guile-irrlicht.git/blobdiff - src/video-driver.cpp
Use pointers directly from guile to C and viceversa
[guile-irrlicht.git] / src / video-driver.cpp
index ef7dd573e939e6fe07f978da2ad5cb6a425b8836..bd01f6ea7fce5ebee3a45d4ade6b4f94eaa1bfdd 100644 (file)
@@ -59,14 +59,14 @@ extern "C" {
   irr_video_beginScene (SCM wrapped_video_driver,
                         SCM rest)
   {
-    SCM back_buffer = scm_from_bool(1);
-    SCM z_buffer = scm_from_bool(1);
+    SCM back_buffer = SCM_BOOL_T;
+    SCM z_buffer = SCM_BOOL_T;
     SCM color = scm_list_4 (scm_from_uint32 (255),
                             scm_from_uint32 (0),
                             scm_from_uint32 (0),
                             scm_from_uint32 (0));
-    SCM video_data = scm_from_bool(0);
-    SCM source_rect = scm_from_bool(0);
+    SCM video_data = SCM_BOOL_F;
+    SCM source_rect = SCM_UNDEFINED;
 
     scm_c_bind_keyword_arguments ("begin-scene", rest, (scm_t_keyword_arguments_flags)0,
                                   scm_from_utf8_keyword ("back-buffer"), &back_buffer,
@@ -78,7 +78,7 @@ extern "C" {
 
     irr::video::IVideoDriver* driver = unwrap_video_driver (wrapped_video_driver);
     irr::core::rect<irr::s32>* sourceRectAddress = 0;
-    if (!scm_is_false (source_rect))
+    if (source_rect != SCM_UNDEFINED)
       {
         irr::core::rect<irr::s32> sourceRect = scm_to_rect_s32 (source_rect);
         sourceRectAddress = &sourceRect;