diff options
author | David Thompson <dthompson2@worcester.edu> | 2018-08-19 22:49:12 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2018-08-23 08:01:11 -0400 |
commit | d60cca3ccff443e10fabe9a01045e4fd7169d563 (patch) | |
tree | 458bfbaaf6eace0d78c0da77d3a4773f0c43ab6b /examples/nine-patch.scm | |
parent | e63653308851008788b460e16c542cf20c4b059f (diff) |
Make the game loop modular!
This is really cool! Now users can plug in whatever backend they'd
like and are not forced to use SDL and OpenGL. Thanks to Chris Webber
for showing me the Lux library for Racket that does exactly this.
* chickadee.scm (run-game): Remove all SDL/OpenGL code, replace with
generic render/update keyword arguments.
(run-game/sdl): New procedure.
* examples/lines.scm: Update for API breakage.
* examples/nine-patch.scm: Ditto.
* examples/sprite.scm: Ditto.
* examples/text.scm: Ditto.
* examples/tiled.scm: Ditto.
Diffstat (limited to 'examples/nine-patch.scm')
-rw-r--r-- | examples/nine-patch.scm | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/examples/nine-patch.scm b/examples/nine-patch.scm index 5255d34..ed03cab 100644 --- a/examples/nine-patch.scm +++ b/examples/nine-patch.scm @@ -16,8 +16,4 @@ (draw-nine-patch image (make-rect 192.0 192.0 256.0 96.0) #:margin 6) (draw-text font "I am error." (vec2 200.0 266.0))) -(add-hook! load-hook load) -(add-hook! draw-hook draw) -(add-hook! quit-hook abort-game) - -(run-game) +(run-game/sdl #:load load #:draw draw) |