diff --git a/tetris/modes/gamemode.lua b/tetris/modes/gamemode.lua index 2c805e3..c230932 100644 --- a/tetris/modes/gamemode.lua +++ b/tetris/modes/gamemode.lua @@ -720,7 +720,7 @@ function GameMode:drawNextQueue(ruleset) local skin = self.next_queue[i].skin local rotation = self.next_queue[i].orientation if config.side_next then -- next at side - drawPiece(next_piece, skin, ruleset.block_offsets[next_piece][rotation], 192, -16+i*48) + drawPiece(next_piece, skin, ruleset.block_offsets[next_piece][rotation], 192, -10+i*48) else -- next at top drawPiece(next_piece, skin, ruleset.block_offsets[next_piece][rotation], -16+i*80, -32) end diff --git a/tetris/modes/marathon_2020.lua b/tetris/modes/marathon_2020.lua index 7994ecf..d307ef7 100644 --- a/tetris/modes/marathon_2020.lua +++ b/tetris/modes/marathon_2020.lua @@ -439,11 +439,16 @@ function Marathon2020Game:sectionColourFunction(section) end function Marathon2020Game:drawScoringInfo() - Marathon2020Game.super.drawScoringInfo(self) - local current_section = getSectionForLevel(self.level) - local text_x = config["side_next"] and 320 or 240 + + if config["side_next"] then + love.graphics.printf("NEXT", 240, 72, 40, "left") + else + love.graphics.printf("NEXT", 64, 40, 40, "left") + end + local text_x = config["side_next"] and 316 or 240 + love.graphics.setFont(font_3x5_2) love.graphics.printf("GRADE", text_x, 100, 40, "left") love.graphics.printf("GRADE PTS.", text_x, 200, 90, "left") diff --git a/tetris/modes/marathon_a1.lua b/tetris/modes/marathon_a1.lua index 2f93443..db00c66 100644 --- a/tetris/modes/marathon_a1.lua +++ b/tetris/modes/marathon_a1.lua @@ -189,7 +189,6 @@ function MarathonA1Game:drawGrid() end function MarathonA1Game:drawScoringInfo() - MarathonA1Game.super.drawScoringInfo(self) love.graphics.setColor(1, 1, 1, 1) love.graphics.setFont(font_3x5_2) @@ -198,30 +197,39 @@ function MarathonA1Game:drawScoringInfo() self.das.frames .. " " .. strTrueValues(self.prev_inputs) ) - love.graphics.printf("NEXT", 64, 40, 40, "left") - love.graphics.printf("GRADE", 240, 120, 40, "left") - love.graphics.printf("SCORE", 240, 200, 40, "left") - love.graphics.printf("NEXT RANK", 240, 260, 90, "left") - love.graphics.printf("LEVEL", 240, 320, 40, "left") + + if config["side_next"] then + love.graphics.printf("NEXT", 240, 72, 40, "left") + else + love.graphics.printf("NEXT", 64, 40, 40, "left") + end + + local text_x = config["side_next"] and 316 or 240 + + love.graphics.setFont(font_3x5_2) + love.graphics.printf("GRADE", text_x, 120, 40, "left") + love.graphics.printf("SCORE", text_x, 200, 40, "left") + love.graphics.printf("NEXT RANK", text_x, 260, 90, "left") + love.graphics.printf("LEVEL", text_x, 320, 40, "left") local sg = self.grid:checkSecretGrade() if sg >= 5 then - love.graphics.printf("SECRET GRADE", 240, 430, 180, "left") + love.graphics.printf("SECRET GRADE", text_x, 430, 180, "left") end if self.bravos > 0 then love.graphics.printf("BRAVO", 300, 120, 40, "left") end love.graphics.setFont(font_3x5_3) - love.graphics.printf(self.score, 240, 220, 90, "left") + love.graphics.printf(self.score, text_x, 220, 90, "left") if self.gm_conditions["level300"] and self.gm_conditions["level500"] and self.gm_conditions["level999"] then - love.graphics.printf("GM", 240, 140, 90, "left") + love.graphics.printf("GM", text_x, 140, 90, "left") else - love.graphics.printf(getRankForScore(self.score).rank, 240, 140, 90, "left") + love.graphics.printf(getRankForScore(self.score).rank, text_x, 140, 90, "left") end - love.graphics.printf(getRankForScore(self.score).next, 240, 280, 90, "left") - love.graphics.printf(self.level, 240, 340, 40, "right") - love.graphics.printf(self:getSectionEndLevel(), 240, 370, 40, "right") + love.graphics.printf(getRankForScore(self.score).next, text_x, 280, 90, "left") + love.graphics.printf(self.level, text_x, 340, 40, "right") + love.graphics.printf(self:getSectionEndLevel(), text_x, 370, 40, "right") if sg >= 5 then - love.graphics.printf(self.SGnames[sg], 240, 450, 180, "left") + love.graphics.printf(self.SGnames[sg], text_x, 450, 180, "left") end if self.bravos > 0 then love.graphics.printf(self.bravos, 300, 140, 40, "left") end diff --git a/tetris/modes/marathon_a2.lua b/tetris/modes/marathon_a2.lua index 7d45f49..996fda3 100644 --- a/tetris/modes/marathon_a2.lua +++ b/tetris/modes/marathon_a2.lua @@ -353,10 +353,19 @@ function MarathonA2Game:drawScoringInfo() self.das.frames .. " " .. strTrueValues(self.prev_inputs) ) - love.graphics.printf("NEXT", 64, 40, 40, "left") - love.graphics.printf("GRADE", 240, 120, 40, "left") - love.graphics.printf("SCORE", 240, 200, 40, "left") - love.graphics.printf("LEVEL", 240, 320, 40, "left") + + if config["side_next"] then + love.graphics.printf("NEXT", 240, 72, 40, "left") + else + love.graphics.printf("NEXT", 64, 40, 40, "left") + end + + local text_x = config["side_next"] and 316 or 240 + + love.graphics.setFont(font_3x5_2) + love.graphics.printf("GRADE", text_x, 120, 40, "left") + love.graphics.printf("SCORE", text_x, 200, 40, "left") + love.graphics.printf("LEVEL", text_x, 320, 40, "left") local sg = self.grid:checkSecretGrade() if sg >= 5 then love.graphics.printf("SECRET GRADE", 240, 430, 180, "left") @@ -372,13 +381,13 @@ function MarathonA2Game:drawScoringInfo() else love.graphics.setColor(0, 1, 0, 1) end end end - love.graphics.printf(self:getLetterGrade(), 240, 140, 90, "left") + love.graphics.printf(self:getLetterGrade(), text_x, 140, 90, "left") love.graphics.setColor(1, 1, 1, 1) - love.graphics.printf(self.score, 240, 220, 90, "left") - love.graphics.printf(self.level, 240, 340, 40, "right") - love.graphics.printf(self:getSectionEndLevel(), 240, 370, 40, "right") + love.graphics.printf(self.score, text_x, 220, 90, "left") + love.graphics.printf(self.level, text_x, 340, 40, "right") + love.graphics.printf(self:getSectionEndLevel(), text_x, 370, 40, "right") if sg >= 5 then - love.graphics.printf(self.SGnames[sg], 240, 450, 180, "left") + love.graphics.printf(self.SGnames[sg], text_x, 450, 180, "left") end love.graphics.setFont(font_8x11) diff --git a/tetris/modes/marathon_a3.lua b/tetris/modes/marathon_a3.lua index e3c787a..6c38e8d 100644 --- a/tetris/modes/marathon_a3.lua +++ b/tetris/modes/marathon_a3.lua @@ -421,13 +421,22 @@ function MarathonA3Game:drawScoringInfo() self.das.frames .. " " .. strTrueValues(self.prev_inputs) ) - love.graphics.printf("NEXT", 64, 40, 40, "left") - love.graphics.printf("GRADE", 240, 120, 40, "left") - love.graphics.printf("SCORE", 240, 200, 40, "left") - love.graphics.printf("LEVEL", 240, 320, 40, "left") + + if config["side_next"] then + love.graphics.printf("NEXT", 240, 72, 40, "left") + else + love.graphics.printf("NEXT", 64, 40, 40, "left") + end + + local text_x = config["side_next"] and 316 or 240 + + love.graphics.setFont(font_3x5_2) + love.graphics.printf("GRADE", text_x, 120, 40, "left") + love.graphics.printf("SCORE", text_x, 200, 40, "left") + love.graphics.printf("LEVEL", text_x, 320, 40, "left") local sg = self.grid:checkSecretGrade() if sg >= 5 then - love.graphics.printf("SECRET GRADE", 240, 430, 180, "left") + love.graphics.printf("SECRET GRADE", text_x, 430, 180, "left") end -- draw section time data @@ -466,15 +475,15 @@ function MarathonA3Game:drawScoringInfo() end love.graphics.setFont(font_3x5_3) - love.graphics.printf(self.score, 240, 220, 90, "left") + love.graphics.printf(self.score, text_x, 220, 90, "left") if self.roll_frames > 3238 then love.graphics.setColor(1, 0.5, 0, 1) elseif self.level >= 999 then love.graphics.setColor(0, 1, 0, 1) end - love.graphics.printf(self:getLetterGrade(), 240, 140, 90, "left") + love.graphics.printf(self:getLetterGrade(), text_x, 140, 90, "left") love.graphics.setColor(1, 1, 1, 1) - love.graphics.printf(self.level, 240, 340, 40, "right") - love.graphics.printf(self:getSectionEndLevel(), 240, 370, 40, "right") + love.graphics.printf(self.level, text_x, 340, 40, "right") + love.graphics.printf(self:getSectionEndLevel(), text_x, 370, 40, "right") if sg >= 5 then - love.graphics.printf(self.SGnames[sg], 240, 450, 180, "left") + love.graphics.printf(self.SGnames[sg], text_x, 450, 180, "left") end love.graphics.setFont(font_8x11) diff --git a/tetris/modes/phantom_mania.lua b/tetris/modes/phantom_mania.lua index 5bab937..e6f2fc1 100644 --- a/tetris/modes/phantom_mania.lua +++ b/tetris/modes/phantom_mania.lua @@ -176,9 +176,14 @@ local function getLetterGrade(level, clear) end function PhantomManiaGame:drawScoringInfo() - PhantomManiaGame.super.drawScoringInfo(self) + + if config["side_next"] then + love.graphics.printf("NEXT", 240, 72, 40, "left") + else + love.graphics.printf("NEXT", 64, 40, 40, "left") + end - local text_x = config["side_next"] and 320 or 240 + local text_x = config["side_next"] and 316 or 240 love.graphics.setFont(font_3x5_2) if getLetterGrade(self.level, self.clear) ~= "" then diff --git a/tetris/modes/phantom_mania2.lua b/tetris/modes/phantom_mania2.lua index 12ca98b..9bb3892 100644 --- a/tetris/modes/phantom_mania2.lua +++ b/tetris/modes/phantom_mania2.lua @@ -297,15 +297,21 @@ function PhantomMania2Game:drawScoringInfo() love.graphics.setColor(1, 1, 1, 1) - local text_x = config["side_next"] and 320 or 240 + if config["side_next"] then + love.graphics.printf("NEXT", 240, 72, 40, "left") + else + love.graphics.printf("NEXT", 64, 40, 40, "left") + end + local text_x = config["side_next"] and 316 or 240 + love.graphics.setFont(font_3x5_2) love.graphics.printf("GRADE", text_x, 120, 40, "left") love.graphics.printf("SCORE", text_x, 200, 40, "left") love.graphics.printf("LEVEL", text_x, 320, 40, "left") local sg = self.grid:checkSecretGrade() if sg >= 5 then - love.graphics.printf("SECRET GRADE", 240, 430, 180, "left") + love.graphics.printf("SECRET GRADE", text_x, 430, 180, "left") end self:drawSectionTimesWithSplits(math.floor(self.level / 100) + 1) @@ -326,7 +332,7 @@ function PhantomMania2Game:drawScoringInfo() end if sg >= 5 then - love.graphics.printf(self.SGnames[sg], 240, 450, 180, "left") + love.graphics.printf(self.SGnames[sg], text_x, 450, 180, "left") end end diff --git a/tetris/modes/race_40.lua b/tetris/modes/race_40.lua index 5fadb67..02cd599 100644 --- a/tetris/modes/race_40.lua +++ b/tetris/modes/race_40.lua @@ -122,13 +122,19 @@ function Race40Game:getSecretGrade(sg) end function Race40Game:drawScoringInfo() - Race40Game.super.drawScoringInfo(self) + -- Race40Game.super.drawScoringInfo(self) love.graphics.setColor(1, 1, 1, 1) - local text_x = config["side_next"] and 320 or 240 + if config["side_next"] then + love.graphics.printf("NEXT", 240, 72, 40, "left") + else + love.graphics.printf("NEXT", 64, 40, 40, "left") + end + + local text_x = config["side_next"] and 316 or 240 love.graphics.setFont(font_3x5_2) - love.graphics.printf("NEXT", 64, 40, 40, "left") + -- love.graphics.printf("NEXT", 64, 40, 40, "left") love.graphics.printf("LINES", text_x, 320, 40, "left") love.graphics.printf("line/min", text_x, 160, 80, "left") love.graphics.printf("piece/sec", text_x, 220, 80, "left") @@ -141,8 +147,8 @@ function Race40Game:drawScoringInfo() love.graphics.printf(string.format("%.02f", self.lines / math.max(1, self.frames) * 3600), text_x, 180, 80, "left") love.graphics.printf(string.format("%.04f", self.pieces / math.max(1, self.frames) * 60), text_x, 240, 80, "left") if sg >= 7 or self.upstacked then - love.graphics.printf(self:getSecretGrade(sg), 240, 450, 180, "left") - end + love.graphics.printf(self:getSecretGrade(sg), 240, 450, 180, "left") + end love.graphics.setFont(font_3x5_4) love.graphics.printf(math.max(0, self.line_goal - self.lines), text_x, 340, 40, "left") diff --git a/tetris/modes/strategy.lua b/tetris/modes/strategy.lua index 2eb83bd..c73679a 100644 --- a/tetris/modes/strategy.lua +++ b/tetris/modes/strategy.lua @@ -114,12 +114,17 @@ function StrategyGame:drawGrid() end function StrategyGame:drawScoringInfo() - StrategyGame.super.drawScoringInfo(self) love.graphics.setColor(1, 1, 1, 1) - local text_x = config["side_next"] and 320 or 240 + if config["side_next"] then + love.graphics.printf("NEXT", 240, 72, 40, "left") + else + love.graphics.printf("NEXT", 64, 40, 40, "left") + end + local text_x = config["side_next"] and 316 or 240 + love.graphics.setFont(font_3x5_2) love.graphics.printf("SCORE", text_x, 200, 40, "left") love.graphics.printf("LEVEL", text_x, 320, 40, "left") diff --git a/tetris/modes/survival_2020.lua b/tetris/modes/survival_2020.lua index 76e7fa3..1485570 100644 --- a/tetris/modes/survival_2020.lua +++ b/tetris/modes/survival_2020.lua @@ -223,12 +223,17 @@ local function getLetterGrade(grade) end function Survival2020Game:drawScoringInfo() - Survival2020Game.super.drawScoringInfo(self) love.graphics.setColor(1, 1, 1, 1) - local text_x = config["side_next"] and 320 or 240 + if config["side_next"] then + love.graphics.printf("NEXT", 240, 72, 40, "left") + else + love.graphics.printf("NEXT", 64, 40, 40, "left") + end + local text_x = config["side_next"] and 316 or 240 + love.graphics.setFont(font_3x5_2) love.graphics.printf("GRADE", text_x, 120, 40, "left") love.graphics.printf("SCORE", text_x, 200, 40, "left") diff --git a/tetris/modes/survival_a2.lua b/tetris/modes/survival_a2.lua index 5a6faf8..4e1f072 100644 --- a/tetris/modes/survival_a2.lua +++ b/tetris/modes/survival_a2.lua @@ -138,7 +138,13 @@ function SurvivalA2Game:drawScoringInfo() SurvivalA2Game.super.drawScoringInfo(self) love.graphics.setColor(1, 1, 1, 1) - local text_x = config["side_next"] and 320 or 240 + if config["side_next"] then + love.graphics.printf("NEXT", 240, 72, 40, "left") + else + love.graphics.printf("NEXT", 64, 40, 40, "left") + end + + local text_x = config["side_next"] and 316 or 240 love.graphics.setFont(font_3x5_2) love.graphics.print( @@ -146,7 +152,6 @@ function SurvivalA2Game:drawScoringInfo() self.das.frames .. " " .. strTrueValues(self.prev_inputs) ) - love.graphics.printf("NEXT", 64, 40, 40, "left") if self:getLetterGrade() ~= "" then love.graphics.printf("GRADE", text_x, 120, 40, "left") end love.graphics.printf("SCORE", text_x, 200, 40, "left") love.graphics.printf("LEVEL", text_x, 320, 40, "left") diff --git a/tetris/modes/survival_a3.lua b/tetris/modes/survival_a3.lua index 25b6ceb..893d932 100644 --- a/tetris/modes/survival_a3.lua +++ b/tetris/modes/survival_a3.lua @@ -212,12 +212,17 @@ local function getLetterGrade(grade) end function SurvivalA3Game:drawScoringInfo() - SurvivalA3Game.super.drawScoringInfo(self) love.graphics.setColor(1, 1, 1, 1) - local text_x = config["side_next"] and 320 or 240 + if config["side_next"] then + love.graphics.printf("NEXT", 240, 72, 40, "left") + else + love.graphics.printf("NEXT", 64, 40, 40, "left") + end + local text_x = config["side_next"] and 316 or 240 + love.graphics.setFont(font_3x5_2) love.graphics.printf("GRADE", text_x, 120, 40, "left") love.graphics.printf("SCORE", text_x, 200, 40, "left") diff --git a/tetris/modes/survival_ax.lua b/tetris/modes/survival_ax.lua index f3c37ac..5b5b617 100644 --- a/tetris/modes/survival_ax.lua +++ b/tetris/modes/survival_ax.lua @@ -129,15 +129,20 @@ end function SurvivalAXGame:drawScoringInfo() SurvivalAXGame.super.drawScoringInfo(self) - love.graphics.setColor(1, 1, 1, 1) + if config["side_next"] then + love.graphics.printf("NEXT", 240, 72, 40, "left") + else + love.graphics.printf("NEXT", 64, 40, 40, "left") + end + local text_x = config["side_next"] and 316 or 240 + love.graphics.setFont(font_3x5_2) love.graphics.print( self.das.direction .. " " .. self.das.frames .. " " .. strTrueValues(self.prev_inputs) ) - love.graphics.printf("NEXT", 64, 40, 40, "left") if self.lines < 150 then love.graphics.printf("TIME LEFT", 240, 250, 80, "left") end love.graphics.printf("LINES", 240, 320, 40, "left")