Removing unnecessary `local mino = {...}`

This commit is contained in:
Squishy (C6H12O6+NaCl+H2O)
2024-04-19 22:32:03 +07:00
parent 35edf8fbd6
commit 9cb3521f53
7 changed files with 12 additions and 20 deletions

View File

@@ -92,7 +92,10 @@ function love.draw()
love.graphics.pop() love.graphics.pop()
if DEBUG_showKey then 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
end end
@@ -349,7 +352,7 @@ local main_bg_cur_mino = 1
local main_bg_draw_frame = 0 local main_bg_draw_frame = 0
local main_bg_last_color = nil local main_bg_last_color = nil
function mainBackground() function MainBackground()
if SETTINGS["music"] and not SOUNDS["bgm_title"]:isPlaying() then if SETTINGS["music"] and not SOUNDS["bgm_title"]:isPlaying() then
SOUNDS["bgm_title"]:setVolume(0.3) SOUNDS["bgm_title"]:setVolume(0.3)
SOUNDS["bgm_title"]:play() SOUNDS["bgm_title"]:play()

View File

@@ -1,9 +1,6 @@
local ConfigScene = SCENE:extend() local ConfigScene = SCENE:extend()
ConfigScene.title = "Input Config" ConfigScene.title = "Input Config"
local minos = {'R_d', 'O_d', 'Y_d', 'G_d', 'C_d', 'B_d', 'M_d'}
local menu_screens = { local menu_screens = {
KeyConfigScene, KeyConfigScene,
StickConfigScene StickConfigScene
@@ -21,7 +18,7 @@ end
function ConfigScene:update() end function ConfigScene:update() end
function ConfigScene:render() function ConfigScene:render()
mainBackground() MainBackground()
if not self.first_time then if not self.first_time then
drawText("Which controls do you want to configure?", 80, 70, 1000) drawText("Which controls do you want to configure?", 80, 70, 1000)
else else

View File

@@ -1,11 +1,8 @@
local KeyConfigScene = SCENE:extend() local KeyConfigScene = SCENE:extend()
KeyConfigScene.title = "Key Config" KeyConfigScene.title = "Key Config"
require 'settings' require 'settings'
local minos = {'R_d', 'O_d', 'Y_d', 'G_d', 'C_d', 'B_d', 'M_d'}
local configurable_inputs = { local configurable_inputs = {
"menu_decide", "menu_decide",
"menu_back", "menu_back",
@@ -51,7 +48,7 @@ function KeyConfigScene:update()
end end
function KeyConfigScene:render() function KeyConfigScene:render()
mainBackground() MainBackground()
for i, input in ipairs(configurable_inputs) do for i, input in ipairs(configurable_inputs) do
drawText(input_names[input], 40, 50 + i * 20, 200, "left") drawText(input_names[input], 40, 50 + i * 20, 200, "left")
if self.set_inputs[input] then if self.set_inputs[input] then

View File

@@ -49,7 +49,7 @@ function NameEntryScene:drawGradeList(left, top)
end end
function NameEntryScene:render() function NameEntryScene:render()
mainBackground() MainBackground()
love.graphics.setColor(1, 1, 1, 1) love.graphics.setColor(1, 1, 1, 1)
love.graphics.line(216,80,216,80+(16*self.grid.height)) 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)) love.graphics.line(216+(16*self.grid.width),80,216+(16*self.grid.width),80+(16*self.grid.height))

View File

@@ -1,9 +1,7 @@
require 'funcs'
local ReplaySelectScene = SCENE:extend() local ReplaySelectScene = SCENE:extend()
ReplaySelectScene.title = "Replay" ReplaySelectScene.title = "Replay"
local minos = {'R_d', 'O_d', 'Y_d', 'G_d', 'C_d', 'B_d', 'M_d'} require 'funcs'
function ReplaySelectScene:new() function ReplaySelectScene:new()
self:initList() self:initList()
@@ -43,7 +41,7 @@ function ReplaySelectScene:initList()
end end
function ReplaySelectScene:render() function ReplaySelectScene:render()
mainBackground() MainBackground()
love.graphics.setColor(0.4, 1, 1, 0.5) love.graphics.setColor(0.4, 1, 1, 0.5)
love.graphics.rectangle("fill", 0, 20 + 20 * self.replay_select, 640, 22) love.graphics.rectangle("fill", 0, 20 + 20 * self.replay_select, 640, 22)

View File

@@ -1,11 +1,8 @@
local StickConfigScene = SCENE:extend() local StickConfigScene = SCENE:extend()
StickConfigScene.title = "Controller Config" StickConfigScene.title = "Controller Config"
require 'settings' require 'settings'
local minos = {'R_d', 'O_d', 'Y_d', 'G_d', 'C_d', 'B_d', 'M_d'}
local configurable_inputs = { local configurable_inputs = {
"menu_decide", "menu_decide",
"menu_back", "menu_back",
@@ -51,7 +48,7 @@ function StickConfigScene:update()
end end
function StickConfigScene:render() function StickConfigScene:render()
mainBackground() MainBackground()
for i, input in ipairs(configurable_inputs) do for i, input in ipairs(configurable_inputs) do
drawText(input_names[input], 40, 50 + i * 20, 200, "left") drawText(input_names[input], 40, 50 + i * 20, 200, "left")
if self.set_inputs[input] then if self.set_inputs[input] then

View File

@@ -54,7 +54,7 @@ function TitleScene:drawCredits(top, left)
end end
function TitleScene:render() function TitleScene:render()
mainBackground() MainBackground()
love.graphics.setColor(0,0,0,0.7) love.graphics.setColor(0,0,0,0.7)
love.graphics.rectangle("fill", 14, 174, 260, 200, 10, 10) love.graphics.rectangle("fill", 14, 174, 260, 200, 10, 10)
love.graphics.setColor(0,0,0,0.7) love.graphics.setColor(0,0,0,0.7)