blob: fd299b7cc1cdbd3121921305b2712dd2fd9fe39b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
(use-modules (chickadee)
(chickadee math vector)
(chickadee render font))
(define font #f)
(define (load)
(set! font (load-font "fonts/good_neighbors_starling.xml")))
(define (draw alpha)
(draw-text font "(draw-text font \"Hello, world!\" (vec2 100.0 200.0))"
(vec2 100.0 200.0))
(draw-text font "Chickadee is a game development toolkit for Guile Scheme."
(vec2 100.0 150.0))
(draw-text font "The quick brown fox jumps over the lazy dog"
(vec2 100.0 100.0)))
(define (key-press key scan modifiers repeat?)
(when (eq? key 'q)
(abort-game)))
(run-game/sdl #:load load #:draw draw #:key-press key-press)
|