summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sly/game.scm19
1 files changed, 18 insertions, 1 deletions
diff --git a/sly/game.scm b/sly/game.scm
index 66f0893..d4e6a2c 100644
--- a/sly/game.scm
+++ b/sly/game.scm
@@ -37,7 +37,13 @@
#:use-module (sly math vector)
#:use-module (sly window)
#:use-module (sly render)
- #:export (game-start-hook
+ #:use-module (sly records)
+ #:export (game
+ game?
+ game-window
+ game-scene
+
+ game-start-hook
draw-hook
after-game-loop-error-hook
game-started?
@@ -48,6 +54,17 @@
;;;
+;;; Game specification
+;;;
+
+(define-record-type* <game>
+ %game game
+ game?
+ (window game-window (make-window))
+ (scene game-scene #f))
+
+
+;;;
;;; Hooks and initializers
;;;