From f791534c00a8eb83e110631a08d6dbf4e6af2868 Mon Sep 17 00:00:00 2001 From: Alexander Griffith Date: Mon, 1 Feb 2021 20:20:29 -0500 Subject: [PATCH] cleanup top level folder --- mode-intro.lua | 76 -------------------------------------------------- sample.fnl | 4 --- sample.lua | 2 -- wrap.lua | 76 -------------------------------------------------- 4 files changed, 158 deletions(-) delete mode 100644 mode-intro.lua delete mode 100644 sample.fnl delete mode 100644 sample.lua delete mode 100644 wrap.lua diff --git a/mode-intro.lua b/mode-intro.lua deleted file mode 100644 index bcbbd97..0000000 --- a/mode-intro.lua +++ /dev/null @@ -1,76 +0,0 @@ - local counter = 0 local time = 0 - - - local function draw(message) - return love.graphics.print(("This window should close in %0.2f seconds"):format((3 - time)), 32, 16) end - - - - - - - - - local function keypressed(key, set_mode) - return love.event.quit() end local function update(dt, set_mode) if (counter < 65535) then counter = (counter + 1) else counter = 0 end time = (time + dt) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if (time > 3) then return love.event.quit() end end return {draw = draw, keypressed = keypressed, update = update} diff --git a/sample.fnl b/sample.fnl deleted file mode 100644 index f8badcb..0000000 --- a/sample.fnl +++ /dev/null @@ -1,4 +0,0 @@ -(fn a [b c] - (+ b c)) - -{: a} diff --git a/sample.lua b/sample.lua deleted file mode 100644 index 2f5e835..0000000 --- a/sample.lua +++ /dev/null @@ -1,2 +0,0 @@ - local function a(b, c) - return (b + c) end return {a = a} diff --git a/wrap.lua b/wrap.lua deleted file mode 100644 index fdfae10..0000000 --- a/wrap.lua +++ /dev/null @@ -1,76 +0,0 @@ - local repl = require("lib.stdio") - local canvas = nil do local w, h = love.window.getMode() - canvas = love.graphics.newCanvas(w, h) end local scale = 1 - - - - - local mode = require("mode-intro") - - local function set_mode(mode_name, ...) - mode = require(mode_name) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if mode.activate then return mode.activate(...) end end love.load = function() canvas:setFilter("nearest", "nearest") return repl.start() end love.draw = function() love.graphics.setCanvas(canvas) love.graphics.clear() love.graphics.setColor(1, 1, 1) mode.draw() love.graphics.setCanvas() love.graphics.setColor(1, 1, 1) return love.graphics.draw(canvas, 0, 0, 0, scale, scale) end love.update = function(dt) return mode.update(dt, set_mode) end love.keypressed = function(key) if (love.keyboard.isDown("lctrl", "rctrl", "capslock") and (key == "q")) then return love.event.quit() else return mode.keypressed(key, set_mode) end end return love.keypressed