From c9b60c569f2ad015f043667c44ff9f43d50ec2e5 Mon Sep 17 00:00:00 2001 From: equa Date: Tue, 20 Apr 2021 18:20:05 -0500 Subject: death screen --- lib/main.fnl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lib/main.fnl') diff --git a/lib/main.fnl b/lib/main.fnl index 71319b8..9af1bb8 100644 --- a/lib/main.fnl +++ b/lib/main.fnl @@ -2,6 +2,7 @@ (local proto (require :lib.proto)) (local state (require :lib.state)) (local game (require :lib.game)) +(local font (require :lib.font)) (local profi (require :vendor.ProFi)) (local profi? false) @@ -14,6 +15,7 @@ :lib.bullet :lib.cells :lib.game + :lib.death :lib.main]) ;; the @@ -25,8 +27,7 @@ (set love.frame 0)) (love.keyboard.setKeyRepeat true) (global the-state (state.init game)) - (global messages (or messages {})) - (print "a")) + (global messages (or messages {}))) (fn love.draw [] (match (pcall #(state.draw the-state)) @@ -36,7 +37,9 @@ (print (.. "draw \n" x)) (love.graphics.print (.. "draw: \n" x)))) (love.graphics.reset) + ;; (love.graphics.setFont font.small) (love.graphics.print (love.timer.getFPS)) + ;; (love.graphics.print :soko font.big 100 100) (when true ;; debug stuff (love.graphics.print (table.concat (lume.map messages #$.msg) @@ -58,7 +61,8 @@ (os.exit))) ;; TODO: make state changes actually possible (match (pcall #(state.update the-state)) - (true x) nil + (true next) (global the-state next) + (true nil) nil (false x) (do (print (.. "update: \n" x)) (table.insert messages -- cgit 1.3.0-6-gf8a5