From: Javier Sancho Date: Sat, 11 Apr 2020 11:42:23 +0000 (+0200) Subject: SCM booleans X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=437db80e9b374e32d0bb5f7beeb4516fc1dd65c3;p=guile-irrlicht.git SCM booleans --- diff --git a/src/device.cpp b/src/device.cpp index b60ec44..f9c0d6a 100644 --- a/src/device.cpp +++ b/src/device.cpp @@ -54,10 +54,10 @@ extern "C" { SCM window_size = scm_list_2 (scm_from_uint32 (640), scm_from_uint32 (480)); SCM bits = scm_from_uint32 (16); - SCM fullscreen = scm_from_bool (0); - SCM stencilbuffer = scm_from_bool (0); - SCM vsync = scm_from_bool (0); - SCM receiver = scm_from_bool (0); + SCM fullscreen = SCM_BOOL_F; + SCM stencilbuffer = SCM_BOOL_F; + SCM vsync = SCM_BOOL_F; + SCM receiver = SCM_BOOL_F; scm_c_bind_keyword_arguments ("create-device", rest, (scm_t_keyword_arguments_flags)0, scm_from_utf8_keyword ("device-type"), &device_type, diff --git a/src/file-system.cpp b/src/file-system.cpp index a421fd3..4c643ae 100644 --- a/src/file-system.cpp +++ b/src/file-system.cpp @@ -48,11 +48,11 @@ extern "C" { SCM filename, SCM rest) { - SCM ignore_case = scm_from_bool (1); - SCM ignore_paths = scm_from_bool (1); + SCM ignore_case = SCM_BOOL_T; + SCM ignore_paths = SCM_BOOL_T; SCM archive_type = scm_from_utf8_symbol ("unknown"); SCM password = scm_from_utf8_string (""); - SCM ret_archive = scm_from_bool (0); + SCM ret_archive = SCM_BOOL_F; scm_c_bind_keyword_arguments ("add-file-archive!", rest, (scm_t_keyword_arguments_flags)0, scm_from_utf8_keyword ("ignore-case"), &ignore_case, diff --git a/src/gui-environment.cpp b/src/gui-environment.cpp index dfe3a0a..011e9d7 100644 --- a/src/gui-environment.cpp +++ b/src/gui-environment.cpp @@ -67,11 +67,11 @@ extern "C" { SCM rectangle, SCM rest) { - SCM border = scm_from_bool (0); - SCM word_wrap = scm_from_bool (1); - SCM parent = scm_from_bool (0); + SCM border = SCM_BOOL_F; + SCM word_wrap = SCM_BOOL_T; + SCM parent = SCM_BOOL_F; SCM id = scm_from_int32 (-1); - SCM fill_background = scm_from_bool (0); + SCM fill_background = SCM_BOOL_F; scm_c_bind_keyword_arguments ("add-static-text!", rest, (scm_t_keyword_arguments_flags)0, scm_from_utf8_keyword ("border"), &border, diff --git a/src/material.cpp b/src/material.cpp index 1d4e92a..eccf8aa 100644 --- a/src/material.cpp +++ b/src/material.cpp @@ -64,16 +64,16 @@ extern "C" { SCM blend_operation = scm_from_utf8_symbol ("none"); SCM polygon_offset_factor = scm_from_uint8 (0); SCM polygon_offset_direction = scm_from_utf8_symbol ("front"); - SCM wireframe = scm_from_bool (0); - SCM point_cloud = scm_from_bool (0); - SCM gouraud_shading = scm_from_bool (1); - SCM lighting = scm_from_bool (1); - SCM z_write_enable = scm_from_bool (1); - SCM backface_culling = scm_from_bool (1); - SCM frontface_culling = scm_from_bool (0); - SCM fog_enable = scm_from_bool (0); - SCM normalize_normals = scm_from_bool (0); - SCM use_mip_maps = scm_from_bool (1); + SCM wireframe = SCM_BOOL_F; + SCM point_cloud = SCM_BOOL_F; + SCM gouraud_shading = SCM_BOOL_T; + SCM lighting = SCM_BOOL_T; + SCM z_write_enable = SCM_BOOL_T; + SCM backface_culling = SCM_BOOL_T; + SCM frontface_culling = SCM_BOOL_F; + SCM fog_enable = SCM_BOOL_F; + SCM normalize_normals = SCM_BOOL_F; + SCM use_mip_maps = SCM_BOOL_T; scm_c_bind_keyword_arguments ("make-material", rest, (scm_t_keyword_arguments_flags)0, diff --git a/src/scene-manager.cpp b/src/scene-manager.cpp index 0d4caeb..03ae21d 100644 --- a/src/scene-manager.cpp +++ b/src/scene-manager.cpp @@ -68,7 +68,7 @@ extern "C" { SCM mesh, SCM rest) { - SCM parent = scm_from_bool (0); + SCM parent = SCM_BOOL_F; SCM id = scm_from_int32 (-1); SCM position = scm_list_3 (scm_from_double (0), scm_from_double (0), @@ -79,7 +79,7 @@ extern "C" { SCM scale = scm_list_3 (scm_from_double (1), scm_from_double (1), scm_from_double (1)); - SCM also_add_if_mesh_pointer_zero = scm_from_bool (0); + SCM also_add_if_mesh_pointer_zero = SCM_BOOL_F; scm_c_bind_keyword_arguments ("add-animated-mesh-scene-node!", rest, (scm_t_keyword_arguments_flags)0, scm_from_utf8_keyword ("parent"), &parent, @@ -106,7 +106,7 @@ extern "C" { irr_scene_addCameraSceneNode (SCM wrapped_scene_manager, SCM rest) { - SCM parent = scm_from_bool (0); + SCM parent = SCM_BOOL_F; SCM position = scm_list_3 (scm_from_double (0), scm_from_double (0), scm_from_double (0)); @@ -114,7 +114,7 @@ extern "C" { scm_from_double (0), scm_from_double (100)); SCM id = scm_from_int32 (-1); - SCM make_active = scm_from_bool (1); + SCM make_active = SCM_BOOL_T; scm_c_bind_keyword_arguments ("add-camera-scene-node!", rest, (scm_t_keyword_arguments_flags)0, scm_from_utf8_keyword ("parent"), &parent, @@ -138,16 +138,16 @@ extern "C" { irr_scene_addCameraSceneNodeFPS (SCM wrapped_scene_manager, SCM rest) { - SCM parent = scm_from_bool (0); + SCM parent = SCM_BOOL_F; SCM rotate_speed = scm_from_double (100); SCM move_speed = scm_from_double (0.5); SCM id = scm_from_int32 (-1); - SCM key_map_array = scm_from_bool (0); + SCM key_map_array = SCM_BOOL_F; SCM key_map_size = scm_from_int32 (0); - SCM no_vertical_movement = scm_from_bool (0); + SCM no_vertical_movement = SCM_BOOL_F; SCM jump_speed = scm_from_double (0); - SCM invert_mouse = scm_from_bool (0); - SCM make_active = scm_from_bool (1); + SCM invert_mouse = SCM_BOOL_F; + SCM make_active = SCM_BOOL_T; scm_c_bind_keyword_arguments ("add-camera-scene-node-fps!", rest, (scm_t_keyword_arguments_flags)0, scm_from_utf8_keyword ("parent"), &parent, @@ -182,7 +182,7 @@ extern "C" { SCM rest) { SCM size = scm_from_double (10); - SCM parent = scm_from_bool (0); + SCM parent = SCM_BOOL_F; SCM id = scm_from_int32 (-1); SCM position = scm_list_3 (scm_from_double (0), scm_from_double (0), @@ -321,10 +321,10 @@ extern "C" { SCM wrapped_mesh, SCM rest) { - SCM parent = scm_from_bool (0); + SCM parent = SCM_BOOL_F; SCM id = scm_from_int32 (-1); SCM minimal_polys_per_node = scm_from_int32 (256); - SCM also_add_if_mesh_pointer_zero = scm_from_bool (0); + SCM also_add_if_mesh_pointer_zero = SCM_BOOL_F; scm_c_bind_keyword_arguments ("add-octree-scene-node!", rest, (scm_t_keyword_arguments_flags)0, scm_from_utf8_keyword ("parent"), &parent, @@ -360,7 +360,7 @@ extern "C" { { SCM radius = scm_from_double (5.0); SCM poly_count = scm_from_int32 (16); - SCM parent = scm_from_bool (0); + SCM parent = SCM_BOOL_F; SCM id = scm_from_int32 (-1); SCM position = scm_list_3 (scm_from_double (0), scm_from_double (0), @@ -436,8 +436,8 @@ extern "C" { SCM time_for_way, SCM rest) { - SCM loop = scm_from_bool (0); - SCM pingpong = scm_from_bool (0); + SCM loop = SCM_BOOL_F; + SCM pingpong = SCM_BOOL_F; scm_c_bind_keyword_arguments ("create-fly-straight-animator", rest, (scm_t_keyword_arguments_flags)0, scm_from_utf8_keyword ("loop"), &loop,