From c7d0034f9bac55fde9080dacf08417296eda73ec Mon Sep 17 00:00:00 2001 From: Ishaan Bhardwaj Date: Wed, 11 Aug 2021 19:44:57 -0400 Subject: [PATCH] Two changes to gamemode.lua (read comments) Shape is now passed as an argument to ruleset:getDefaultOrientation() Fixed the comment for GameMode:transformScreen() --- tetris/modes/gamemode.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tetris/modes/gamemode.lua b/tetris/modes/gamemode.lua index 231013e..187315d 100644 --- a/tetris/modes/gamemode.lua +++ b/tetris/modes/gamemode.lua @@ -518,7 +518,7 @@ function GameMode:hold(inputs, ruleset, ihs) self.hold_queue = { skin = self.piece.skin, shape = self.piece.shape, - orientation = ruleset:getDefaultOrientation(), + orientation = ruleset:getDefaultOrientation(self.piece.shape), } end if data == nil then @@ -901,9 +901,10 @@ end function GameMode:drawCustom() end -- transforms specified in here will transform the whole screen --- if you want a transform for a particular component, specify --- it in that component's draw function and then make sure to --- reset it to origin at the end of that component's draw call! +-- if you want a transform for a particular component, push the +-- default transform by using love.graphics.push(), do your +-- transform, and then love.graphics.pop() at the end of that +-- component's draw call! function GameMode:transformScreen() end function GameMode:draw(paused)