Fix syntax error and formatting.
This commit is contained in:
parent
7772d40b2e
commit
7e2ba3daa8
35
wrap.fnl
35
wrap.fnl
|
@ -13,26 +13,25 @@
|
||||||
(mode.activate ...)))
|
(mode.activate ...)))
|
||||||
|
|
||||||
(fn love.load []
|
(fn love.load []
|
||||||
(: canvas :setFilter "nearest" "nearest")
|
(canvas:setFilter "nearest" "nearest")
|
||||||
(repl.start))
|
(repl.start))
|
||||||
|
|
||||||
(fn love.draw []
|
(fn love.draw []
|
||||||
;; the canvas allows you to get sharp pixel-art style scaling; if you
|
;; the canvas allows you to get sharp pixel-art style scaling; if you
|
||||||
;; don't want that, just skip that and call mode.draw directly.
|
;; don't want that, just skip that and call mode.draw directly.
|
||||||
(love.graphics.setCanvas canvas)
|
(love.graphics.setCanvas canvas)
|
||||||
(love.graphics.clear)
|
(love.graphics.clear)
|
||||||
(love.graphics.setColor 1 1 1)
|
(love.graphics.setColor 1 1 1)
|
||||||
(mode.draw)
|
(mode.draw)
|
||||||
(love.graphics.setCanvas)
|
(love.graphics.setCanvas)
|
||||||
(love.graphics.setColor 1 1 1)
|
(love.graphics.setColor 1 1 1)
|
||||||
(love.graphics.draw canvas 0 0 0 scale scale))
|
(love.graphics.draw canvas 0 0 0 scale scale))
|
||||||
|
|
||||||
(fn love.update[dt]
|
(fn love.update [dt]
|
||||||
(mode.update dt set-mode))
|
(mode.update dt set-mode))
|
||||||
|
|
||||||
(fn love.keypressed [key]
|
(fn love.keypressed [key]
|
||||||
(if
|
(if (and (love.keyboard.isDown "lctrl" "rctrl" "capslock") (= key "q"))
|
||||||
(and (love.keyboard.isDown "lctrl" "rctrl" "capslock") (= key "q"))
|
(love.event.quit)
|
||||||
(love.event.quit)
|
;; add what each keypress should do in each mode
|
||||||
;; add what each keypress should do in each mode
|
(mode.keypressed key set-mode)))
|
||||||
(mode.keypressed key set-mode)))
|
|
||||||
|
|
Loading…
Reference in a new issue