Hook up game and game-manager
This commit is contained in:
parent
098b64dfc2
commit
355f41a2cc
1 changed files with 8 additions and 11 deletions
19
game.scm
19
game.scm
|
@ -56,26 +56,23 @@
|
||||||
(define game-width 640.0)
|
(define game-width 640.0)
|
||||||
(define game-height 480.0)
|
(define game-height 480.0)
|
||||||
|
|
||||||
|
(define game-images `(('player . ,(make-image "assets/sprites/player.png"))
|
||||||
|
('barrel . ,(make-image "assets/sprites/barrel.png"))
|
||||||
|
('bricks . ,(make-image "assets/sprites/bricks.png"))
|
||||||
|
('stones . ,(make-image "assets/sprites/stones.png"))
|
||||||
|
('card-back . ,(make-image "assets/sprites/bricks.png"))))
|
||||||
|
|
||||||
(parameterize ((*logger* pk))
|
(parameterize ((*logger* pk))
|
||||||
(parameterize ((*media-library* (create-media-library)))
|
(parameterize ((*media-library* (create-media-library)))
|
||||||
|
|
||||||
(define game-images `(('player . ,(make-image "assets/sprites/player.png"))
|
|
||||||
('barrel . ,(make-image "assets/sprites/barrel.png"))
|
|
||||||
('bricks . ,(make-image "assets/sprites/bricks.png"))
|
|
||||||
('stones . ,(make-image "assets/sprites/stones.png"))
|
|
||||||
('card-back . ,(make-image "assets/sprites/bricks.png"))))
|
|
||||||
|
|
||||||
(add-images! (get-media-library) game-images)
|
(add-images! (get-media-library) game-images)
|
||||||
|
|
||||||
(write-log! "Creating entity manager")
|
(write-log! "Creating entity manager")
|
||||||
(define e-manager
|
(define e-manager
|
||||||
(create-entity-manager #;(init-game-entities)
|
(create-entity-manager (init-game-entities)))
|
||||||
))
|
|
||||||
|
|
||||||
(write-log! "Creating system manager")
|
(write-log! "Creating system manager")
|
||||||
(define s-manager
|
(define s-manager
|
||||||
(create-system-manager #;(init-game-systems context)
|
(create-system-manager (init-game-systems draw-image context)))
|
||||||
))
|
|
||||||
|
|
||||||
(write-log! "Creating game")
|
(write-log! "Creating game")
|
||||||
(define game (make-game e-manager s-manager 0))
|
(define game (make-game e-manager s-manager 0))
|
||||||
|
|
Loading…
Reference in a new issue