From b4770b50612bade51a802a2ff4de7df93cee8383 Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Thu, 7 May 2020 12:38:32 +0200 Subject: [PATCH] color --- src/color.cpp | 38 ++++++++++++++++++-------------------- src/color.h | 12 ++++-------- 2 files changed, 22 insertions(+), 28 deletions(-) diff --git a/src/color.cpp b/src/color.cpp index 63448b3..d21704d 100644 --- a/src/color.cpp +++ b/src/color.cpp @@ -23,25 +23,23 @@ #include #include "color.h" -extern "C" { - - SCM - scm_from_color (irr::video::SColor color) - { - return scm_list_4 (scm_from_uint32 (color.getAlpha ()), - scm_from_uint32 (color.getRed ()), - scm_from_uint32 (color.getGreen ()), - scm_from_uint32 (color.getBlue ())); - } - - irr::video::SColor - scm_to_color (SCM color) - { - return irr::video::SColor - (scm_to_uint32 (scm_car (color)), - scm_to_uint32 (scm_cadr (color)), - scm_to_uint32 (scm_caddr (color)), - scm_to_uint32 (scm_cadddr (color))); - } +SCM +scm_from_color (irr::video::SColor color) +{ + return scm_list_4 (scm_from_uint32 (color.getAlpha ()), + scm_from_uint32 (color.getRed ()), + scm_from_uint32 (color.getGreen ()), + scm_from_uint32 (color.getBlue ())); +} + + +irr::video::SColor +scm_to_color (SCM color) +{ + return irr::video::SColor + (scm_to_uint32 (scm_car (color)), + scm_to_uint32 (scm_cadr (color)), + scm_to_uint32 (scm_caddr (color)), + scm_to_uint32 (scm_cadddr (color))); } diff --git a/src/color.h b/src/color.h index 3dbbfe9..bab6a93 100644 --- a/src/color.h +++ b/src/color.h @@ -25,14 +25,10 @@ #include #include -extern "C" { +SCM +scm_from_color (irr::video::SColor color); - SCM - scm_from_color (irr::video::SColor color); - - irr::video::SColor - scm_to_color (SCM color); - -} +irr::video::SColor +scm_to_color (SCM color); #endif -- 2.39.5