From 696da3fa3faee0555bd77c304b6b70357fd4639f Mon Sep 17 00:00:00 2001 From: Ishaan Bhardwaj Date: Sun, 6 Dec 2020 11:27:44 -0500 Subject: [PATCH] Marathon 2020 colour function removed --- tetris/modes/gamemode.lua | 5 +---- tetris/modes/marathon_2020.lua | 10 +--------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/tetris/modes/gamemode.lua b/tetris/modes/gamemode.lua index 71d3e22..8ba4d0e 100644 --- a/tetris/modes/gamemode.lua +++ b/tetris/modes/gamemode.lua @@ -524,7 +524,7 @@ function GameMode:drawSectionTimes(current_section) love.graphics.printf(formatTime(self.frames - self.section_start_time), section_x, 40 + 20 * current_section, 90, "left") end -function GameMode:drawSectionTimesWithSecondary(current_section, section_colour_function) +function GameMode:drawSectionTimesWithSecondary(current_section) local section_x = 530 local section_secondary_x = 440 @@ -535,9 +535,6 @@ function GameMode:drawSectionTimesWithSecondary(current_section, section_colour_ end for section, time in pairs(self.secondary_section_times) do - if self.section_colour_function then - love.graphics.setColor(self:section_colour_function(section)) - end if section > 0 then love.graphics.printf(formatTime(time), section_secondary_x, 40 + 20 * section, 90, "left") end diff --git a/tetris/modes/marathon_2020.lua b/tetris/modes/marathon_2020.lua index 091e0bc..22d4adc 100644 --- a/tetris/modes/marathon_2020.lua +++ b/tetris/modes/marathon_2020.lua @@ -423,14 +423,6 @@ function Marathon2020Game:drawGrid() end end -function Marathon2020Game:sectionColourFunction(section) - if self.section_status[section] == "cool" then - return { 0, 1, 0, 1 } - else - return { 1, 1, 1, 1 } - end -end - function Marathon2020Game:drawScoringInfo() Marathon2020Game.super.drawScoringInfo(self) @@ -442,7 +434,7 @@ function Marathon2020Game:drawScoringInfo() love.graphics.printf("GRADE PTS.", text_x, 200, 90, "left") love.graphics.printf("LEVEL", text_x, 320, 40, "left") - self:drawSectionTimesWithSecondary(current_section, self.sectionColourFunction) + self:drawSectionTimesWithSecondary(current_section) if (self.cool_timer > 0) then love.graphics.printf("COOL!!", 64, 400, 160, "center")