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 --- scripts/main.scm | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'scripts/main.scm') diff --git a/scripts/main.scm b/scripts/main.scm index 96053b1..095fa98 100644 --- a/scripts/main.scm +++ b/scripts/main.scm @@ -1,17 +1,14 @@ (define a 0) -(define b 0) +(define b (rl-load-texture)) -(define update - (lambda () - (set! a (+ a 1)) - (set! b (rl-load-texture)) - ;;(display b) - ;;(gc) - )) +(define (update) + (cond ((rl-is-key-down 262) (set! b (rl-load-texture))) ;; right + ((rl-is-key-down 263) (set! a (+ a 1))) ;; left + ((rl-is-key-down 264) (gc)) ;; down + ) + ) -(define draw - (lambda () - (rl-draw-text (number->string a)) - (display "ue") - (rl-draw-texture b) - )) +(define (draw) + (rl-draw-text (number->string a)) +; (rl-draw-texture b) + ) -- cgit v1.2.3