From b644c8e457255ddccb53c9ba2fcc9de6fbcb3539 Mon Sep 17 00:00:00 2001 From: Ishaan Bhardwaj Date: Wed, 10 Feb 2021 22:46:58 -0500 Subject: [PATCH] Revert "Default line clear animation set to fadeout" Please, reminder to self, TEST YOUR COMMITS. This reverts commit 288961e12a699824dc81dc4c5d6859e36aaa4b39. --- tetris/modes/gamemode.lua | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/tetris/modes/gamemode.lua b/tetris/modes/gamemode.lua index 360061a..8780470 100644 --- a/tetris/modes/gamemode.lua +++ b/tetris/modes/gamemode.lua @@ -58,14 +58,6 @@ function GameMode:new(secret_inputs) "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "S9", "GM" } - self.line_clear_animation = function(x, y, skin, colour) - return { - 1, 1, 1, - -0.25 + 1.25 * (self.lcd / self:getLineClearDelay()), - skin, colour, - 48 + x * 16, y * 16 - } - end -- variables related to configurable parameters self.drop_locked = false self.hard_drop_locked = false @@ -551,7 +543,7 @@ function GameMode:drawLineClearAnimation() -- returns: table with RGBA, skin, colour, x, y -- Fadeout (default) - --[[ + -- [[ function animation(x, y, skin, colour) return { 1, 1, 1, @@ -593,7 +585,7 @@ function GameMode:drawLineClearAnimation() for y, row in pairs(self.cleared_block_table) do for x, block in pairs(row) do - local animation_table = self.line_clear_animation(x, y, block.skin, block.colour) + local animation_table = animation(x, y, block.skin, block.colour) love.graphics.setColor( animation_table[1], animation_table[2], animation_table[3], animation_table[4]