From 55183fc87f645a5a36a1d5a2be8c4052c9ef425f Mon Sep 17 00:00:00 2001 From: Aki Date: Sat, 20 Aug 2016 19:02:03 +0200 Subject: Cleanup --- main.lua | 3 --- 1 file changed, 3 deletions(-) (limited to 'main.lua') diff --git a/main.lua b/main.lua index cb66aa0..8c6eb8e 100644 --- a/main.lua +++ b/main.lua @@ -44,7 +44,6 @@ require "music" debug = false -- LÖVE2D callbacks --- Load function love.load() -- Graphics love.graphics.setBackgroundColor(90, 90, 90) @@ -59,11 +58,9 @@ function love.load() -- Scene Scene = Menu:new() end --- Update function love.update(dt) Scene:update(dt) end --- Draw function love.draw() Scene:draw() if debug then -- cgit v1.1 From 92c040a9c0104623b19f8f5d6590a260190b4492 Mon Sep 17 00:00:00 2001 From: Aki Date: Fri, 30 Sep 2016 16:35:05 +0200 Subject: Added Settings module scrap --- main.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'main.lua') diff --git a/main.lua b/main.lua index 8c6eb8e..ab1c755 100644 --- a/main.lua +++ b/main.lua @@ -39,6 +39,7 @@ require "camera" require "menu" require "controller" require "music" +require "settings" -- Temporary debug debug = false @@ -53,8 +54,9 @@ function love.load() Bold = love.graphics.newImageFont("assets/font-big.png", " 0123456789AEFILNORSTUW", -2) Font:setLineHeight(9/16) love.graphics.setFont(Font) - -- Controller + -- Modules Controller.load() + Settings.load() -- Scene Scene = Menu:new() end @@ -84,7 +86,7 @@ function Controller.controlpressed(set, action, key) -- pass to current Scene Scene:controlpressed(set, action, key) -- globals - if key == "escape" or key == "f1" then + if key == "escape" then love.event.quit() end if key == "f5" then -- cgit v1.1 From 9f1854ed3365eacec0b49017d619eb02ab0f52fb Mon Sep 17 00:00:00 2001 From: Aki Date: Thu, 6 Oct 2016 14:21:28 +0200 Subject: Fixed debug information displaying with wrong font --- main.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'main.lua') diff --git a/main.lua b/main.lua index ab1c755..93d0408 100644 --- a/main.lua +++ b/main.lua @@ -67,6 +67,7 @@ function love.draw() Scene:draw() if debug then local scale = getScale() + love.graphics.setFont(Font) love.graphics.setColor(255, 0, 0, 255) love.graphics.print("Debug ON", 10, 10, 0, scale, scale) love.graphics.setColor(255, 255, 255, 255) @@ -96,6 +97,4 @@ end function Controller.controlreleased(set, action, key) -- pass to current Scene Scene:controlreleased(set, action, key) -end - - +end \ No newline at end of file -- cgit v1.1 From 7e567d1fc37d8e65e4e8fe5c7ece2cea8a6567b1 Mon Sep 17 00:00:00 2001 From: Aki Date: Mon, 10 Oct 2016 22:33:34 +0200 Subject: Load controller sets from file --- main.lua | 1 - 1 file changed, 1 deletion(-) (limited to 'main.lua') diff --git a/main.lua b/main.lua index 93d0408..3e28d90 100644 --- a/main.lua +++ b/main.lua @@ -75,7 +75,6 @@ function love.draw() end end -- Pass input to Controller -function love.joystickadded(joystick) Controller.joystickadded(joystick) end function love.gamepadaxis(joystick, axis, value) Controller.gamepadaxis(joystick, axis, value) end function love.gamepadpressed(joystick, key) Controller.gamepadpressed(joystick, key) end function love.gamepadreleased(joystick, key) Controller.gamepadreleased(joystick, key) end -- cgit v1.1 From 73bcd524906c51d43b22b3ea68c64b38f130bea6 Mon Sep 17 00:00:00 2001 From: Aki Date: Tue, 20 Dec 2016 06:02:05 +0100 Subject: I have no idea why I have put everything in one commit --- main.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'main.lua') diff --git a/main.lua b/main.lua index 3e28d90..deff1a1 100644 --- a/main.lua +++ b/main.lua @@ -74,6 +74,9 @@ function love.draw() love.graphics.print("Current FPS: "..tostring(love.timer.getFPS()), 10, 10+9*scale, 0, scale, scale) end end +function love.quit() + Settings.save() +end -- Pass input to Controller function love.gamepadaxis(joystick, axis, value) Controller.gamepadaxis(joystick, axis, value) end function love.gamepadpressed(joystick, key) Controller.gamepadpressed(joystick, key) end -- cgit v1.1