From 9cb3521f53b4ac92f93e7119751d1535ed5fcff5 Mon Sep 17 00:00:00 2001 From: "Squishy (C6H12O6+NaCl+H2O)" <106439598+SweetSea-ButImNotSweet@users.noreply.github.com> Date: Fri, 19 Apr 2024 22:32:03 +0700 Subject: [PATCH] Removing unnecessary ``local mino = {...}`` --- main.lua | 7 +++++-- scene/input_config.lua | 5 +---- scene/key_config.lua | 5 +---- scene/name_entry.lua | 2 +- scene/replay.lua | 6 ++---- scene/stick_config.lua | 5 +---- scene/title.lua | 2 +- 7 files changed, 12 insertions(+), 20 deletions(-) diff --git a/main.lua b/main.lua index d5a74e6..21afe63 100644 --- a/main.lua +++ b/main.lua @@ -92,7 +92,10 @@ function love.draw() love.graphics.pop() if DEBUG_showKey then - drawText("Pressed: "..(LastPressedKey or '[NONE]').." | Released: "..(LastReleasedKey or '[NONE]'),0,0,1000,"left") + drawText( + "Pressed: "..(LastPressedKey or '[NONE]').." | Released: "..(LastReleasedKey or '[NONE]'), + 0,0,1000,"left" + ) end end @@ -349,7 +352,7 @@ local main_bg_cur_mino = 1 local main_bg_draw_frame = 0 local main_bg_last_color = nil -function mainBackground() +function MainBackground() if SETTINGS["music"] and not SOUNDS["bgm_title"]:isPlaying() then SOUNDS["bgm_title"]:setVolume(0.3) SOUNDS["bgm_title"]:play() diff --git a/scene/input_config.lua b/scene/input_config.lua index 35da56a..cb60365 100644 --- a/scene/input_config.lua +++ b/scene/input_config.lua @@ -1,9 +1,6 @@ local ConfigScene = SCENE:extend() - ConfigScene.title = "Input Config" -local minos = {'R_d', 'O_d', 'Y_d', 'G_d', 'C_d', 'B_d', 'M_d'} - local menu_screens = { KeyConfigScene, StickConfigScene @@ -21,7 +18,7 @@ end function ConfigScene:update() end function ConfigScene:render() - mainBackground() + MainBackground() if not self.first_time then drawText("Which controls do you want to configure?", 80, 70, 1000) else diff --git a/scene/key_config.lua b/scene/key_config.lua index 9895095..7e32497 100644 --- a/scene/key_config.lua +++ b/scene/key_config.lua @@ -1,11 +1,8 @@ local KeyConfigScene = SCENE:extend() - KeyConfigScene.title = "Key Config" require 'settings' -local minos = {'R_d', 'O_d', 'Y_d', 'G_d', 'C_d', 'B_d', 'M_d'} - local configurable_inputs = { "menu_decide", "menu_back", @@ -51,7 +48,7 @@ function KeyConfigScene:update() end function KeyConfigScene:render() - mainBackground() + MainBackground() for i, input in ipairs(configurable_inputs) do drawText(input_names[input], 40, 50 + i * 20, 200, "left") if self.set_inputs[input] then diff --git a/scene/name_entry.lua b/scene/name_entry.lua index 9240c70..429c94e 100644 --- a/scene/name_entry.lua +++ b/scene/name_entry.lua @@ -49,7 +49,7 @@ function NameEntryScene:drawGradeList(left, top) end function NameEntryScene:render() - mainBackground() + MainBackground() love.graphics.setColor(1, 1, 1, 1) love.graphics.line(216,80,216,80+(16*self.grid.height)) love.graphics.line(216+(16*self.grid.width),80,216+(16*self.grid.width),80+(16*self.grid.height)) diff --git a/scene/replay.lua b/scene/replay.lua index 26e7264..0da476a 100644 --- a/scene/replay.lua +++ b/scene/replay.lua @@ -1,9 +1,7 @@ -require 'funcs' local ReplaySelectScene = SCENE:extend() - ReplaySelectScene.title = "Replay" -local minos = {'R_d', 'O_d', 'Y_d', 'G_d', 'C_d', 'B_d', 'M_d'} +require 'funcs' function ReplaySelectScene:new() self:initList() @@ -43,7 +41,7 @@ function ReplaySelectScene:initList() end function ReplaySelectScene:render() - mainBackground() + MainBackground() love.graphics.setColor(0.4, 1, 1, 0.5) love.graphics.rectangle("fill", 0, 20 + 20 * self.replay_select, 640, 22) diff --git a/scene/stick_config.lua b/scene/stick_config.lua index 4afdbe5..1d583e5 100644 --- a/scene/stick_config.lua +++ b/scene/stick_config.lua @@ -1,11 +1,8 @@ local StickConfigScene = SCENE:extend() - StickConfigScene.title = "Controller Config" require 'settings' -local minos = {'R_d', 'O_d', 'Y_d', 'G_d', 'C_d', 'B_d', 'M_d'} - local configurable_inputs = { "menu_decide", "menu_back", @@ -51,7 +48,7 @@ function StickConfigScene:update() end function StickConfigScene:render() - mainBackground() + MainBackground() for i, input in ipairs(configurable_inputs) do drawText(input_names[input], 40, 50 + i * 20, 200, "left") if self.set_inputs[input] then diff --git a/scene/title.lua b/scene/title.lua index 1b700cb..7c95776 100644 --- a/scene/title.lua +++ b/scene/title.lua @@ -54,7 +54,7 @@ function TitleScene:drawCredits(top, left) end function TitleScene:render() - mainBackground() + MainBackground() love.graphics.setColor(0,0,0,0.7) love.graphics.rectangle("fill", 14, 174, 260, 200, 10, 10) love.graphics.setColor(0,0,0,0.7)