summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
Diffstat (limited to 'sources')
-rw-r--r--sources/main.c12
-rw-r--r--sources/rl/core.h (renamed from sources/core.h)8
-rw-r--r--sources/rl/shapes.h (renamed from sources/shapes.h)2
-rw-r--r--sources/rl/text.h (renamed from sources/text.h)2
-rw-r--r--sources/rl/texture.h (renamed from sources/texture.h)0
-rw-r--r--sources/rl/types.h (renamed from sources/types.h)2
-rw-r--r--sources/s7/s7.c (renamed from sources/s7.c)0
-rw-r--r--sources/s7/s7.h (renamed from sources/s7.h)0
8 files changed, 16 insertions, 10 deletions
diff --git a/sources/main.c b/sources/main.c
index 5556460..b248f24 100644
--- a/sources/main.c
+++ b/sources/main.c
@@ -4,12 +4,12 @@
#endif
#include "raylib.h"
-#include "s7.h"
-#include "types.h"
-#include "text.h"
-#include "texture.h"
-#include "core.h"
-#include "shapes.h"
+#include "s7/s7.h"
+#include "rl/types.h"
+#include "rl/text.h"
+#include "rl/texture.h"
+#include "rl/core.h"
+#include "rl/shapes.h"
#include <math.h>
#include <stdio.h>
diff --git a/sources/core.h b/sources/rl/core.h
index 3717a60..09c5555 100644
--- a/sources/core.h
+++ b/sources/rl/core.h
@@ -1,5 +1,5 @@
#include "raylib.h"
-#include "s7.h"
+#include "s7/s7.h"
#include <stdio.h>
#include <stdlib.h>
@@ -22,8 +22,14 @@ static s7_pointer rl_get_char_pressed(s7_scheme *s7, s7_pointer args) {
return(s7_make_integer(s7, key));
}
+static s7_pointer rl_get_key_pressed(s7_scheme *s7, s7_pointer args) {
+ int key = GetKeyPressed();
+ return(s7_make_integer(s7, key));
+}
+
static void rl_core_define_methods(s7_scheme *s7) {
s7_define_function(s7, "rl-is-key-down", rl_is_key_down, 1, 0, false, "(rl-is-key-down KEY)");
s7_define_function(s7, "rl-get-mouse-position", rl_get_mouse_position, 0, 0, false, "(rl-get-mouse-position)");
s7_define_function(s7, "rl-get-char-pressed", rl_get_char_pressed, 0, 0, false, "(rl-get-char-pressed)");
+ s7_define_function(s7, "rl-get-key-pressed", rl_get_key_pressed, 0, 0, false, "(rl-get-key-pressed)");
}
diff --git a/sources/shapes.h b/sources/rl/shapes.h
index dc73011..0033a5b 100644
--- a/sources/shapes.h
+++ b/sources/rl/shapes.h
@@ -1,5 +1,5 @@
#include "raylib.h"
-#include "s7.h"
+#include "s7/s7.h"
#include <stdio.h>
#include <stdlib.h>
diff --git a/sources/text.h b/sources/rl/text.h
index 0759d2f..6fd53e2 100644
--- a/sources/text.h
+++ b/sources/rl/text.h
@@ -1,5 +1,5 @@
#include "raylib.h"
-#include "s7.h"
+#include "s7/s7.h"
#include <stdio.h>
#include <stdlib.h>
diff --git a/sources/texture.h b/sources/rl/texture.h
index 8dfb996..8dfb996 100644
--- a/sources/texture.h
+++ b/sources/rl/texture.h
diff --git a/sources/types.h b/sources/rl/types.h
index 7f8acc4..4a7244f 100644
--- a/sources/types.h
+++ b/sources/rl/types.h
@@ -1,5 +1,5 @@
#include "raylib.h"
-#include "s7.h"
+#include "s7/s7.h"
#include <stdio.h>
#include <stdlib.h>
diff --git a/sources/s7.c b/sources/s7/s7.c
index a13d857..a13d857 100644
--- a/sources/s7.c
+++ b/sources/s7/s7.c
diff --git a/sources/s7.h b/sources/s7/s7.h
index 97008da..97008da 100644
--- a/sources/s7.h
+++ b/sources/s7/s7.h