summaryrefslogtreecommitdiff
path: root/examples/simple.scm
diff options
context:
space:
mode:
Diffstat (limited to 'examples/simple.scm')
-rw-r--r--examples/simple.scm21
1 files changed, 11 insertions, 10 deletions
diff --git a/examples/simple.scm b/examples/simple.scm
index e4de293..0f3760b 100644
--- a/examples/simple.scm
+++ b/examples/simple.scm
@@ -1,5 +1,5 @@
;;; Sly
-;;; Copyright (C) 2013, 2014 David Thompson <dthompson2@worcester.edu>
+;;; Copyright (C) 2013, 2014, 2015 David Thompson <dthompson2@worcester.edu>
;;;
;;; This program is free software: you can redistribute it and/or
;;; modify it under the terms of the GNU General Public License as
@@ -19,22 +19,23 @@
(sly window)
(sly utils)
(sly signal)
+ (sly math rect)
(sly math vector)
+ (sly render)
(sly render camera)
- (sly render model)
- (sly render sprite)
(sly render color)
- (sly render scene))
+ (sly render shader)
+ (sly render sprite)
+ (sly render texture))
(load "common.scm")
-(define model
- (model-move (vector2 320 240)
- (load-sprite "images/p1_front.png")))
-
-(define camera (orthographic-camera 640 480))
+(define sprite (load-sprite "images/p1_front.png"))
-(define-signal scene (make-scene camera model))
+(define-signal scene
+ (with-camera (2d-camera #:area (make-rect 0 0 640 480))
+ (move (vector2 320 240)
+ (render-sprite sprite))))
(with-window (make-window #:title "Simple Sprite Demo")
(run-game-loop scene))