summaryrefslogtreecommitdiff
path: root/sources/shapes.h
diff options
context:
space:
mode:
authorHenrique Alves <henrique.alves@itsjungle.xyz>2024-04-28 21:07:01 +0300
committerHenrique Alves <henrique.alves@itsjungle.xyz>2024-04-28 21:07:01 +0300
commitf6e3396a5a653c3ae124afcd74bac5c9c7e50ae1 (patch)
tree99bc7592c4184363c4d6a985d6c6dbc07688d71a /sources/shapes.h
parent0d0db3e51ec95ab94befad01cbec0860acf8ffe1 (diff)
downloadgamejam-slgj-2024-f6e3396a5a653c3ae124afcd74bac5c9c7e50ae1.tar.gz
gamejam-slgj-2024-f6e3396a5a653c3ae124afcd74bac5c9c7e50ae1.tar.bz2
gamejam-slgj-2024-f6e3396a5a653c3ae124afcd74bac5c9c7e50ae1.zip
(wip) Basic textbox API
Diffstat (limited to 'sources/shapes.h')
-rw-r--r--sources/shapes.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/sources/shapes.h b/sources/shapes.h
new file mode 100644
index 0000000..dc73011
--- /dev/null
+++ b/sources/shapes.h
@@ -0,0 +1,20 @@
+#include "raylib.h"
+#include "s7.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+static s7_pointer rl_draw_rectangle(s7_scheme *s7, s7_pointer args) {
+ Color *c = (Color *)s7_c_object_value(s7_car(s7_cdr(s7_cdr(s7_cdr(s7_cdr(args))))));
+
+ DrawRectangle(s7_integer(s7_car(args)),
+ s7_integer(s7_car(s7_cdr(args))),
+ s7_integer(s7_car(s7_cdr(s7_cdr(args)))),
+ s7_integer(s7_car(s7_cdr(s7_cdr(s7_cdr(args))))),
+ *c);
+
+ return(NULL);
+}
+
+static void rl_shapes_define_methods(s7_scheme *s7) {
+ s7_define_function(s7, "rl-draw-rectangle", rl_draw_rectangle, 5, 0, false, "test");
+}