summaryrefslogtreecommitdiff
path: root/examples/tilemap.scm
diff options
context:
space:
mode:
Diffstat (limited to 'examples/tilemap.scm')
-rw-r--r--examples/tilemap.scm19
1 files changed, 9 insertions, 10 deletions
diff --git a/examples/tilemap.scm b/examples/tilemap.scm
index 7c32b11..2e6bdf9 100644
--- a/examples/tilemap.scm
+++ b/examples/tilemap.scm
@@ -24,16 +24,15 @@
(sly window)
(sly signal)
(sly utils)
+ (sly render)
(sly render camera)
(sly render color)
- (sly render model)
(sly render mesh)
(sly render shader)
(sly render sprite)
(sly render texture)
(sly render tileset)
(sly render tile-map)
- (sly render scene)
(sly math vector)
(sly math tween)
(sly input keyboard))
@@ -90,16 +89,16 @@
(193 225 225 226 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65)
(225 225 176 242 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65))))
-(define model
- (model-move (v- (vector2 320 240)
- (v* (vector2 tile-width tile-height)
- (vector2 10 15/2)))
- (list->model (compile-tile-layer map-tiles 32 32))))
+(define render
+ (move (v- (vector2 320 240)
+ (v* (vector2 tile-width tile-height)
+ (vector2 10 15/2)))
+ (list->renderer (compile-tile-layer map-tiles 32 32))))
-(define camera
- (orthographic-camera 640 480))
+(define camera (2d-camera #:area (make-rect 0 0 640 480)))
-(define-signal scene (make-scene camera model))
+(define-signal scene
+ (with-camera camera render))
(with-window (make-window #:title "Tilemap")
(run-game-loop scene))