From: Javier Sancho Date: Tue, 28 Apr 2020 06:35:41 +0000 (+0200) Subject: Optional parameters are SCM_UNDEFINED X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=e793a98b7a84ae3a5ff2ededb0625e55cf991f0f;p=guile-irrlicht.git Optional parameters are SCM_UNDEFINED --- diff --git a/src/gui-in-out-fader.cpp b/src/gui-in-out-fader.cpp index fb8a9e3..41dfc3f 100644 --- a/src/gui-in-out-fader.cpp +++ b/src/gui-in-out-fader.cpp @@ -44,7 +44,7 @@ extern "C" { SCM dest_color) { irr::gui::IGUIInOutFader* fader = unwrap_gui_in_out_fader (wrapped_in_out_fader); - if (scm_is_false (dest_color)) + if (dest_color == SCM_UNDEFINED) { fader->setColor (scm_to_color (color)); } diff --git a/src/gui.cpp b/src/gui.cpp index 997d28b..cd8eef3 100644 --- a/src/gui.cpp +++ b/src/gui.cpp @@ -147,7 +147,7 @@ extern "C" { // Params: color and dest_color (optional) return irr_gui_IGUIInOutFader_setColor (wrapped_obj, color, dest_color); } - else if (gui_skin_p (wrapped_obj) && !scm_is_false (dest_color)) + else if (gui_skin_p (wrapped_obj) && dest_color != SCM_UNDEFINED) { // Params: which and new_color return irr_gui_IGUISkin_setColor (wrapped_obj, color, dest_color); diff --git a/src/video-driver.cpp b/src/video-driver.cpp index ef7dd57..85a720e 100644 --- a/src/video-driver.cpp +++ b/src/video-driver.cpp @@ -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_BOOL_F; scm_c_bind_keyword_arguments ("begin-scene", rest, (scm_t_keyword_arguments_flags)0, scm_from_utf8_keyword ("back-buffer"), &back_buffer,