summaryrefslogtreecommitdiff
path: root/scripts/main.scm
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 /scripts/main.scm
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 'scripts/main.scm')
-rw-r--r--scripts/main.scm25
1 files changed, 11 insertions, 14 deletions
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)
+ )