diff options
author | henriquelalves <henriquelalves@gmail.com> | 2024-05-26 14:39:55 +0300 |
---|---|---|
committer | henriquelalves <henriquelalves@gmail.com> | 2024-05-26 14:39:55 +0300 |
commit | 56a3d75bbbd80512f76817a05eebaabdcaf37ae2 (patch) | |
tree | f6e3b87c484ebe3df51d6e43d9e76b4ded9efb01 /sources/rl/shapes.h | |
parent | 0a89a84956311f17648bb443e429dab25d35f0cc (diff) | |
download | gamejam-slgj-2024-56a3d75bbbd80512f76817a05eebaabdcaf37ae2.tar.gz gamejam-slgj-2024-56a3d75bbbd80512f76817a05eebaabdcaf37ae2.tar.bz2 gamejam-slgj-2024-56a3d75bbbd80512f76817a05eebaabdcaf37ae2.zip |
Update for SLGJ 2024
Diffstat (limited to 'sources/rl/shapes.h')
-rw-r--r-- | sources/rl/shapes.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sources/rl/shapes.h b/sources/rl/shapes.h index 10d38eb..47e736c 100644 --- a/sources/rl/shapes.h +++ b/sources/rl/shapes.h @@ -15,6 +15,20 @@ static s7_pointer rl_draw_rectangle(s7_scheme *s7, s7_pointer args) { return(NULL); } +static s7_pointer rl_draw_line(s7_scheme *s7, s7_pointer args) { + Color *c = (Color *)s7_c_object_value(s7_car(s7_cdr(s7_cdr(s7_cdr(s7_cdr(args)))))); + + DrawLine(s7_real(s7_car(args)), + s7_real(s7_car(s7_cdr(args))), + s7_real(s7_car(s7_cdr(s7_cdr(args)))), + s7_real(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"); + s7_define_function(s7, "rl-draw-line", rl_draw_line, 5, 0, false, "test"); } |