summaryrefslogtreecommitdiff
path: root/sources/core.h
diff options
context:
space:
mode:
authorHenrique Alves <henrique.alves@itsjungle.xyz>2024-04-25 23:51:58 +0300
committerHenrique Alves <henrique.alves@itsjungle.xyz>2024-04-25 23:51:58 +0300
commita7cc19f9e254d0ee391b2b65ef6da6e471da803c (patch)
tree5ef2d2c1974c4500942f78e38eccc06b38fafecb /sources/core.h
parent3f382e6e0a494baaf3d4d104c1af0630fb3817a9 (diff)
downloadgamejam-slgj-2024-a7cc19f9e254d0ee391b2b65ef6da6e471da803c.tar.gz
gamejam-slgj-2024-a7cc19f9e254d0ee391b2b65ef6da6e471da803c.tar.bz2
gamejam-slgj-2024-a7cc19f9e254d0ee391b2b65ef6da6e471da803c.zip
Adding more API
Diffstat (limited to 'sources/core.h')
-rw-r--r--sources/core.h14
1 files changed, 14 insertions, 0 deletions
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 <stdio.h>
+#include <stdlib.h>
+
+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");
+}