summaryrefslogtreecommitdiff
path: root/examples/sprite.scm
blob: 92ab3645d1d6bab97460d39bd6cf70b58c12cf95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
(use-modules (chickadee)
             (chickadee math vector)
             (chickadee render sprite)
             (chickadee render texture))

(define sprite #f)

(define (load)
  (set! sprite (load-image "images/chickadee.png")))

(define (draw alpha)
  (draw-sprite sprite (vec2 256.0 176.0)))

(add-hook! load-hook load)
(add-hook! draw-hook draw)
(add-hook! quit-hook abort-game)

(run-game)