summaryrefslogtreecommitdiff
path: root/heyllama.scm
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-09-22 22:26:45 +0200
committerThomas White <taw@physics.org>2020-09-22 22:26:45 +0200
commit0dbcb75944552bc9943a478d028232d10a6c1e81 (patch)
treebf160c9889713f5d8620f6aa0c019907bcc7a59c /heyllama.scm
parent11240e5b771fbf0aa078922f121954aa6ddf5935 (diff)
Add a sheep
Diffstat (limited to 'heyllama.scm')
-rw-r--r--heyllama.scm14
1 files changed, 14 insertions, 0 deletions
diff --git a/heyllama.scm b/heyllama.scm
index 6eca177..5c65e3a 100644
--- a/heyllama.scm
+++ b/heyllama.scm
@@ -57,6 +57,7 @@
;; -------------- Initial game state --------------
(define llama #f)
+(define sheep #f)
(define tile-map #f)
(define view-pos #v(0.0 0.0))
(define grid (make-grid 64))
@@ -75,6 +76,18 @@
(grid-add grid 'llama 200.0 200.0 50.0 64.0)
+ (set! sheep (make <animal>
+ #:pos #v(400.0 115.0)
+ #:size #v(128.0 128.0)
+ #:draw-offset #v(18 12)
+ #:face-dir 1
+ #:sprite (split-texture (load-image "sheep_walk.png")
+ 80 80
+ #:spacing 48
+ #:margin 24)))
+
+ (grid-add grid 'sheep 400.0 115.0 45.0 45.0)
+
(set! tile-map (load-tile-map "llama.tmx"))
;; Add objects from map to grid
@@ -106,6 +119,7 @@
#:position (vec2* view-pos -1.0))
(draw-animal llama)
+ (draw-animal sheep)
(when show-hitboxes
(let ((col (make-color 0.0 0.0 0.7 0.8)))