[asciilib] setting up graphics backend

This commit is contained in:
2021-04-24 18:50:08 -06:00
parent 064715939a
commit 7a5c47a951
6 changed files with 40 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
(defnew [:String title
:Int width
:Int height
:Int letterWidth
:Int letterHeight
:GameLogic gameLogic
:GraphicsBackend _graphicsBackend]
[graphics (new Graphics width height)
logic gameLogic
graphicsBackend _graphicsBackend]
(graphicsBackend.initialize title width height letterWidth letterHeight))
(defmethod update [:Float deltaSeconds]
(gameLogic.update deltaSeconds))
(defmethod draw []
(graphicsBackend.draw graphics))