From 3bf7daabc2414bda8c1ac040cd711811e3b5b6de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurij=20Podgor=C5=A1ek?= Date: Wed, 23 Nov 2022 04:14:31 +0100 Subject: [PATCH] WIP chickadee port --- anim.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 anim.scm diff --git a/anim.scm b/anim.scm new file mode 100644 index 0000000..2c6ac4e --- /dev/null +++ b/anim.scm @@ -0,0 +1,44 @@ +(use-modules (chickadee) + (chickadee graphics color) + (chickadee graphics sprite) + (chickadee graphics text) + (chickadee graphics path) + (chickadee math vector) + (chickadee math rect) + (system repl coop-server)) + +(define repl (spawn-coop-repl-server)) + +(define (update dt) + (poll-coop-repl-server repl)) + +(define tekst "Nekaaaaj") +(define stevec 0) +(define (draw alpha) + (set! stevec (+ stevec 1)) + (dodaj-objekte) + (obj-anim) + (izrisi)) + +(define (dodaj-objekte) + '()) + +(define (obj-anim) + (display stevec) + '()) +(define (izrisi) + (draw-canvas + (make-canvas + (with-style ((stroke-color green) + (stroke-width 4.0)) + (stroke (circle (vec2 100.0 100.0) stevec)) + )))) + +(define (reset-stevec) + (set! stevec 0)) + +(reset-stevec) + +(run-game + #:draw draw + #:update update)