]> git.jsancho.org Git - gacela.git/blob - games/guybrush/guybrush.scm
Preparing new version 0.6
[gacela.git] / games / guybrush / guybrush.scm
1 #!/usr/bin/guile \
2 -e gacela-script -s
3 !#
4
5 (use-modules (gacela gacela))
6 (init-gacela)
7
8 (set-game-properties! #:title "Guybrush")
9
10 (define-mob (guybrush
11              (guy (load-texture "guybrush.png"))
12              (x 0)
13              (y (+ (- (/ (assoc-ref (get-game-properties) 'height) 2))
14                    (/ (assoc-ref (get-texture-properties guy) 'height) 2))))
15
16   (cond ((key? 'left) (set! x (- x 10))))
17   (cond ((key? 'right) (set! x (+ x 10))))
18
19   (translate x y)
20   (draw-texture guy))
21
22 (show-mob (guybrush))
23