From a7cc19f9e254d0ee391b2b65ef6da6e471da803c Mon Sep 17 00:00:00 2001 From: Henrique Alves Date: Thu, 25 Apr 2024 23:51:58 +0300 Subject: Adding more API --- sources/core.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 sources/core.h (limited to 'sources/core.h') diff --git a/sources/core.h b/sources/core.h new file mode 100644 index 0000000..7e387de --- /dev/null +++ b/sources/core.h @@ -0,0 +1,14 @@ +#include "raylib.h" +#include "s7.h" +#include +#include + +static s7_pointer rl_is_key_down(s7_scheme *s7, s7_pointer args) { + int key = s7_integer(s7_car(args)); + bool isKey = IsKeyDown(key); + return(s7_make_boolean(s7, isKey)); +} + +static void rl_core_define_methods(s7_scheme *s7) { + s7_define_function(s7, "rl-is-key-down", rl_is_key_down, 1, 0, false, "test"); +} -- cgit v1.2.3