This commit is contained in:
TERPYDERP32 2023-03-25 23:29:01 -05:00
commit ee2ae12148
37 changed files with 963 additions and 302 deletions

BIN
res/bgm/blitz.mp3 Normal file

Binary file not shown.

BIN
res/se/multiplier_up.wav Normal file

Binary file not shown.

View File

@ -33,15 +33,16 @@ function FourWideGame:drawScoringInfo()
love.graphics.setColor(1, 1, 1, 1)
local text_x = 160
love.graphics.setFont(font_3x5_2)
if config["side_next"] then
love.graphics.printf("NEXT", 240, 72, 40, "left")
love.graphics.printf("NEXT", 144, 72, 40, "left")
else
love.graphics.printf("NEXT", 64, 40, 40, "left")
end
local text_x = config["side_next"] and 236 or 160
love.graphics.setFont(font_3x5_2)
love.graphics.print(
self.das.direction .. " " ..
self.das.frames .. " " ..

View File

@ -96,13 +96,16 @@ end
function MarathonWBGame:drawScoringInfo()
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setFont(font_3x5_2)
if config["side_next"] then
love.graphics.printf("NEXT", 240, 72, 40, "left")
else
love.graphics.printf("NEXT", 64, 40, 40, "left")
end
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 .. " " ..
@ -110,9 +113,9 @@ function MarathonWBGame:drawScoringInfo()
strTrueValues(self.prev_inputs)
)
love.graphics.print("SCORE", 240, 140)
love.graphics.print("KEYSTROKES", 240, 200)
love.graphics.print("keys/piece", 240, 270)
love.graphics.print("SCORE", text_x, 140)
love.graphics.print("KEYSTROKES", text_x, 200)
love.graphics.print("keys/piece", text_x, 270)
if self.message_timer > 0 then
love.graphics.printf(self.message, 64, 400, 160, "center")
@ -120,18 +123,18 @@ function MarathonWBGame:drawScoringInfo()
end
love.graphics.setFont(font_3x5_3)
love.graphics.print(self.score, 240, 160)
love.graphics.print(self.score, text_x, 160)
love.graphics.print(
string.format("%.04f", self.keystrokes / math.max(self.pieces, 1)),
240, 290
text_x, 290
)
love.graphics.print("B2B " .. tostring(self.b2b), 240, 330)
love.graphics.print("B2B " .. tostring(self.b2b), text_x, 330)
love.graphics.setFont(font_8x11)
love.graphics.printf(formatTime(self.frames), 64, 420, 160, "center")
love.graphics.setFont(font_3x5_4)
love.graphics.print(math.max(300 - self.keystrokes, 0), 240, 220)
love.graphics.print(math.max(300 - self.keystrokes, 0), text_x, 220)
end

View File

@ -153,7 +153,16 @@ function BeginnerA2Game:drawScoringInfo()
self.piece_time .. " " ..
strTrueValues(self.prev_inputs)
)
love.graphics.printf("NEXT", 64, 40, 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("SCORE", 240, 200, 40, "left")
love.graphics.printf("LEVEL", 240, 320, 40, "left")
local sg = self.grid:checkSecretGrade()

448
tetris/modes/blitz.lua Normal file
View File

@ -0,0 +1,448 @@
--[[
Blitz Mode
Design by MattMayuga
Spaghetti code by terpyderp
Music from Bejeweled Twist
HSV to RGB code copied from https://gist.github.com/GigsD4X/8513963 because I'm lazy and stupid lol.
]]--
require 'funcs'
local GameMode = require 'tetris.modes.gamemode'
local Piece = require 'tetris.components.piece'
local Bag7Randomiser = require 'tetris.randomizers.bag7noSZOstart'
local Blitz = GameMode:extend()
sounds.blitz = {
multi_up = love.audio.newSource("res/se/multiplier_up.wav", "static")
}
bgm.blitz = {
blitz = love.audio.newSource("res/bgm/blitz.mp3", "stream"),
}
Blitz.name = "Blitz"
Blitz.hash = "Blitz"
Blitz.tagline = "How many points can you get in 5 minutes? Do cool tricks, get All Clears, increase your score multiplier and bring your best game to reach higher speed levels and gain more points in this action-packed mode!"
local scoreTable = {
250, -- Single
750,
1250,
2000, -- Quadruple
3750, -- Quintuple
1000, -- T-Spin Zero
2000,
3000,
4000, -- T-Spin Triple
250, -- T-Spin Mini Zero
750,
1000, -- T-Spin Mini Double
2000, -- All Clear Single
3000,
4500,
5000,
6000, -- All Clear Quintuple
8000, -- B2B AC Quadruple
9000 -- B2B AC Quintuple
}
local chainActions = {
3, 4, 6, 8, 10, 10, 10, 10, 10, 10, 10
}
local SRSTPiece = {
{ {x=0, y=0}, {x=-1, y=0}, {x=1, y=0}, {x=0, y=-1} },
{ {x=0, y=0}, {x=0, y=-1}, {x=0, y=1}, {x=1, y=0} },
{ {x=0, y=0}, {x=1, y=0}, {x=-1, y=0}, {x=0, y=1} },
{ {x=0, y=0}, {x=0, y=1}, {x=0, y=-1}, {x=-1, y=0} },
}
local ARSTPiece = {
{ {x=0, y=0}, {x=-1, y=0}, {x=1, y=0}, {x=0, y=-1} },
{ {x=0, y=-1}, {x=0, y=0}, {x=1, y=-1}, {x=0, y=-2} },
{ {x=0, y=-1}, {x=-1, y=-1}, {x=1, y=-1}, {x=0, y=0} },
{ {x=0, y=-1}, {x=0, y=0}, {x=-1, y=-1}, {x=0, y=-2} },
}
function Blitz:new()
Blitz.super:new()
self.lines = 0
self.frames = 18000
self.pieces = 0
self.roll_frames = 0
self.upstacked = false
self.activeTime = 0
self.framesButBackwards = 0
-- blitz mode variables
self.score = 0
self.b2b = 0
self.b2bMulti = 1
self.multi = 1
self.chain = 0
self.lastLineCount = 4
self.lastPieceTime = 0
self.rainbowMode = 0 -- 0 = not started, 1 = active, 2 = finished
self.tSpin = 0 -- 0 = none, 1 = normal, 2 = mini
self.randomizer = Bag7Randomiser()
self.lock_drop = true
self.lock_hard_drop = true
self.instant_hard_drop = true
self.instant_soft_drop = false
self.enable_hold = true
self.next_queue_length = 5
self.immobile_spin_bonus = true
end
function Blitz:getDropSpeed() return 20 end
function Blitz:getARR() return config.arr end
function Blitz:getARE() return 0 end
function Blitz:getLineARE() return self:getARE() end
function Blitz:getDasLimit() return config.das end
function Blitz:getLineClearDelay() return 0 end
function Blitz:getLockDelay() return 30 end
function Blitz:getGravity() return 1/64 end
function Blitz:getDasCutDelay() return config.dcd end
function Blitz:getBackground() return 3 end
function Blitz:advanceOneFrame()
if self.ready_frames == 0 then
if self.frames == 18000 then
switchBGM("blitz", "blitz")
end
end
if self.clear then
self.roll_frames = self.roll_frames + 1
if self.roll_frames > 360 then
self.completed = true
end
return false
elseif self.ready_frames == 0 then
self.frames = self.frames - 1
if self.frames <= 0 then
self.clear = true
end
end
self.framesButBackwards = self.framesButBackwards + 1
return true
end
function Blitz:onPieceLock(piece, cleared_row_count)
self.super:onPieceLock()
self.pieces = self.pieces + 1
allClear = self.grid:checkForBravo(cleared_row_count)
-- detect what kind of T piece the ruleset has (either 0-SRS, 1-ARS, or 2-idk) (pain)
if piece.shape == "T" then
SRS = true
for i,v in ipairs(self.ruleset.block_offsets.T) do -- for every rotation of the T
for ii,vv in ipairs(v) do -- for every block in the T
if #(v) == 4 then
if vv.x ~= SRSTPiece[i][ii].x and vv.y ~= SRSTPiece[i][ii].y then
SRS = false
break
end
else
SRS = false
break
end
end
end
if SRS then
self.rulesetType = 0
else
ARS = true
for i,v in ipairs(self.ruleset.block_offsets.T) do -- for every rotation of the T
for ii,vv in ipairs(v) do -- for every block in the T
if #(v) == 4 then
if vv.x ~= ARSTPiece[i][ii].x and vv.y ~= ARSTPiece[i][ii].y then
ARS = false
break
end
else
ARS = false
break
end
end
end
if ARS then
self.rulesetType = 1
else
self.rulesetType = 2
end
end
end
-- 4-corner T-Spin detection (also pain)
if self.rulesetType == 2 then -- just be lazy and do immobile if it's not SRS or ARS
if self.piece.spin and self.piece.shape == "T" then
self.tSpin = 1
else
self.tSpin = 0
end
else
if self.rulesetType == 0 then tempYOffset = 0
else tempYOffset = -1
end
if piece.shape == "T" and piece.last_rotated then
topCount = 0
bottomCount = 0
if self.grid:isOccupied(piece.position.x+1, piece.position.y+1) then
if piece.rotation <= 1 then bottomCount = bottomCount + 1
else topCount = topCount + 1
end
end
if self.grid:isOccupied(piece.position.x+1, piece.position.y-1+tempYOffset) then
if piece.rotation <= 1 then topCount = topCount + 1
else bottomCount = bottomCount + 1
end
end
if self.grid:isOccupied(piece.position.x-1, piece.position.y+1+tempYOffset) then
if piece.rotation == 1 or piece.rotation == 2 then topCount = topCount + 1
else bottomCount = bottomCount + 1
end
end
if self.grid:isOccupied(piece.position.x-1, piece.position.y-1+tempYOffset) then
if piece.rotation == 1 or piece.rotation == 2 then bottomCount = bottomCount + 1
else topCount = topCount + 1
end
end
if topCount == 2 and bottomCount >= 1 then
self.tSpin = 1 -- normal
elseif topCount == 1 and bottomCount == 2 then
self.tSpin = 2 -- mini
else
self.tSpin = 0 -- none
end
else
self.tSpin = 0
end
end
-- updates the multiplier for back to back
if self.b2b > 0 then self.b2bMulti = 1.5
else self.b2bMulti = 1
end
-- updates the score
-- if it's a T spin
if self.tSpin == 1 then
self.score = self.score + scoreTable[cleared_row_count+6] * self.b2bMulti * self.multi
-- if it's a T spin mini
elseif self.tSpin == 2 then
self.score = self.score + scoreTable[cleared_row_count+10] * self.b2bMulti * self.multi
-- if it's an all clear
elseif self.grid:checkForBravo(cleared_row_count) then
if self.b2b > 0 and cleared_row_count >= 4 then
self.score = self.score + scoreTable[cleared_row_count+14] * self.multi
else
self.score = self.score + scoreTable[cleared_row_count+12] * self.multi
end
-- if it's a quad or quin
elseif cleared_row_count >= 4 then
self.score = self.score + scoreTable[cleared_row_count] * self.b2bMulti * self.multi
-- if it's none of the above and it clears at least one line
elseif cleared_row_count > 0 then
self.score = self.score + scoreTable[cleared_row_count] * self.multi
end
-- raises the chain count if necessary
-- if it's an all clear
if allClear then
self.chain = self.chain + 12
-- if at least 4 lines are cleared or it's a T-Spin
elseif self.tSpin ~= 0 or cleared_row_count >= 4 then
if self.b2b > 10 then
self.chain = self.chain + 2
else
self.chain = self.chain + 1
end
-- if 3 lines are cleared
elseif cleared_row_count >= 3 then
self.chain = self.chain + 1
end
-- decreases the multiplier or chain meter if necessary
if self.lastLineCount < 3 and (cleared_row_count < 3 and cleared_row_count ~= 0) and not allClear then
if self.chain < 1 then
if self.multi > 1 then
self.multi = self.multi - 1
self.rainbowMode = 0
end
else
if self.rainbowMode == 2 then
self.rainbowMode = 0
self.multi = 9
end
self.chain = 0
end
elseif self.lastPieceTime >= 180 and self.activeTime >= 180 and self.multi > 1 then
self.multi = self.multi - 1
end
-- increases the multiplier if necessary
if self.multi < 10 then
while self.chain >= chainActions[self.multi] do
self.chain = self.chain - chainActions[self.multi]
self.multi = self.multi + 1
playSE("blitz", "multi_up")
end
elseif self.rainbowMode == 0 then
if self.chain >= chainActions[10] then
self.rainbowMode = 1
self.chain = self.chain - chainActions[10]
playSE("blitz", "multi_up")
end
elseif self.rainbowMode == 1 then
if self.chain >= chainActions[11] then
self.score = self.score + 300000
self.chain = 10
self.rainbowMode = 2
playSE("blitz", "multi_up")
end
end
-- updates back to back
if self.tSpin ~= 0 or cleared_row_count >= 4 then
self.b2b = self.b2b + 1
elseif cleared_row_count > 0 and cleared_row_count < 4 then
self.b2b = 0
end
-- print("chain: " .. tostring(self.chain) .. " multiplier: " .. tostring(self.multi) .. " rainbow mode: " .. tostring(self.rainbowMode) .. " lastLineCount: " .. tostring(self.lastLineCount))
-- update some other stuff
self.lastPieceTime = self.activeTime
self.activeTime = 0
if self.tSpin ~= 0 then
self.lastLineCount = 4 -- if it works it's not stupid right?
elseif cleared_row_count ~= 0 then
self.lastLineCount = cleared_row_count
end
if self.rainbowMode == 2 then
self.chain = chainActions[11]
end
end
function Blitz:onLineClear(cleared_row_count)
if not self.clear then
self.lines = self.lines + cleared_row_count
end
end
function Blitz:drawGrid(ruleset)
self.grid:draw()
if self.piece ~= nil then
self:drawGhostPiece(ruleset)
end
end
function Blitz:getHighscoreData()
return {
level = self.level,
frames = self.frames,
}
end
function Blitz:drawScoringInfo()
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.printf("SCORE", text_x, 72, 80, "left")
love.graphics.printf("PPS", text_x, 132, 80, "left")
love.graphics.printf("LINES", text_x, 192, 40, "left")
love.graphics.setFont(font_3x5_3)
love.graphics.printf(self.score, text_x, 92, 80, "left")
love.graphics.printf(string.format("%.04f", self.pieces / math.max(1, self.framesButBackwards) * 60), text_x, 152, 80, "left")
love.graphics.printf(math.max(0, self.lines), text_x, 212, 40, "left")
-- draw chain meter
if self.rainbowMode == 1 then
self.red, self.green, self.blue = Blitz:HSVToRGB(((-self.frames+180000)*2)%360, 1, 1)
else
self.red, self.green, self.blue = Blitz:HSVToRGB((-self.multi*36)+395, 1, 1)
end
love.graphics.setColor(self.red/4, self.blue/4, self.green/4)
love.graphics.rectangle("fill", 240, 382, 160, 24)
love.graphics.setColor(self.red, self.blue, self.green)
love.graphics.rectangle("fill", 240, 382, (self.chain/chainActions[self.multi])*160, 24)
love.graphics.setColor(0, 0, 0)
love.graphics.setLineWidth(4)
love.graphics.rectangle("line", 240, 382, 160, 24)
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setFont(font_3x5_2)
love.graphics.printf(tostring(self.chain) .. " / " .. tostring(chainActions[self.multi]), 240, 412, 160, "center")
-- draw multiplier
love.graphics.setFont(font_3x5_3)
love.graphics.printf("MULTI: X" .. tostring(self.multi), 240, 352, 400, "left")
love.graphics.setColor(1, 1, 1, 1)
end
function Blitz:whilePieceActive()
self.activeTime = self.activeTime + 1
end
-- copied from https://gist.github.com/GigsD4X/8513963
function Blitz:HSVToRGB( hue, saturation, value )
-- Returns the RGB equivalent of the given HSV-defined color
-- (adapted from some code found around the web)
-- If it's achromatic, just return the value
if saturation == 0 then
return value, value, value;
end;
-- Get the hue sector
local hue_sector = math.floor( hue / 60 );
local hue_sector_offset = ( hue / 60 ) - hue_sector;
local p = value * ( 1 - saturation );
local q = value * ( 1 - saturation * hue_sector_offset );
local t = value * ( 1 - saturation * ( 1 - hue_sector_offset ) );
if hue_sector == 0 then
return value, t, p;
elseif hue_sector == 1 then
return q, value, p;
elseif hue_sector == 2 then
return p, value, t;
elseif hue_sector == 3 then
return p, q, value;
elseif hue_sector == 4 then
return t, p, value;
elseif hue_sector == 5 then
return value, p, q;
end;
end;
return Blitz

View File

@ -278,11 +278,16 @@ function SurvivalCKGame:getLetterGrade()
end
function SurvivalCKGame:drawScoringInfo()
SurvivalCKGame.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")

View File

@ -122,12 +122,6 @@ function ComboChallenge:drawScoringInfo()
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setFont(font_3x5_2)
if config["side_next"] then
love.graphics.printf("NEXT", 240, 72, 40, "left")
else
love.graphics.printf("NEXT", 64, 40, 40, "left")
end
love.graphics.print(
self.das.direction .. " " ..
self.das.frames .. " " ..
@ -135,14 +129,23 @@ function ComboChallenge:drawScoringInfo()
self.drop_bonus
)
love.graphics.print("SKIPS", 200, 120)
love.graphics.print("MAX COMBO", 200, 200)
love.graphics.print("COMBO", 200, 280)
if config["side_next"] then
love.graphics.printf("NEXT", 144, 72, 40, "left")
else
love.graphics.printf("NEXT", 64, 40, 40, "left")
end
local text_x = config["side_next"] and 236 or 160
love.graphics.setFont(font_3x5_2)
love.graphics.print("SKIPS", text_x, 120)
love.graphics.print("MAX COMBO", text_x, 200)
love.graphics.print("COMBO", text_x, 280)
love.graphics.setFont(font_3x5_4)
love.graphics.print(self.skips, 200, 140)
love.graphics.print(self.max_combo, 200, 220)
love.graphics.print(self.combo, 200, 300)
love.graphics.print(self.skips, text_x, 140)
love.graphics.print(self.max_combo, text_x, 220)
love.graphics.print(self.combo, text_x, 300)
love.graphics.setFont(font_8x11)
love.graphics.setColor(

View File

@ -205,30 +205,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

View File

@ -106,20 +106,27 @@ end
function CreditsA3Game:drawScoringInfo()
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setFont(font_3x5_2)
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")
love.graphics.printf("ROLLS COMPLETED", 240, 170, 120, "left")
love.graphics.printf("TIME LEFT", 240, 250, 80, "left")
love.graphics.printf("NORM", 240, 320, 40, "left")
love.graphics.printf("ROLLS COMPLETED", text_x, 170, 120, "left")
love.graphics.printf("TIME LEFT", text_x, 250, 80, "left")
love.graphics.printf("NORM", text_x, 320, 40, "left")
love.graphics.setFont(font_3x5_3)
love.graphics.printf(self.section, 240, 190, 160, "left")
love.graphics.printf(self.section, text_x, 190, 160, "left")
-- draw time left, flash red if necessary
local time_left = self.section_time_limit - self.frames
@ -132,14 +139,14 @@ function CreditsA3Game:drawScoringInfo()
end
end
love.graphics.printf(formatTime(time_left), 240, 270, 160, "left")
love.graphics.printf(formatTime(time_left), text_x, 270, 160, "left")
love.graphics.setColor(1, 1, 1, 1)
love.graphics.printf(self.norm, 240, 340, 40, "right")
love.graphics.printf(self.norm, text_x, 340, 40, "right")
if self.game_over or self.roll_frames > 0 then
love.graphics.printf("60", 240, 370, 40, "right")
love.graphics.printf("60", text_x, 370, 40, "right")
else
love.graphics.printf("44", 240, 370, 40, "right")
love.graphics.printf("44", text_x, 370, 40, "right")
end
end

View File

@ -233,25 +233,32 @@ function DemonModeGame:drawScoringInfo()
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setFont(font_3x5_2)
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.grade ~= 0 then love.graphics.printf("GRADE", 240, 120, 40, "left") end
love.graphics.printf("SCORE", 240, 200, 40, "left")
love.graphics.printf("LEVEL", 240, 320, 40, "left")
if self.grade ~= 0 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")
-- draw section time data
local current_section = getSectionForLevel(self.level)
self:drawSectionTimesWithSecondary(current_section)
love.graphics.setFont(font_3x5_3)
love.graphics.printf(self.score, 240, 220, 90, "left")
love.graphics.printf(self:getLetterGrade(), 240, 140, 90, "left")
love.graphics.printf(string.format("%.2f", self.level / 100), 240, 340, 70, "right")
love.graphics.printf(self.score, text_x, 220, 90, "left")
love.graphics.printf(self:getLetterGrade(), text_x, 140, 90, "left")
love.graphics.printf(string.format("%.2f", self.level / 100), text_x, 340, 70, "right")
end
function DemonModeGame:getHighscoreData()

View File

@ -24,10 +24,10 @@ function GLock:new()
end
function GLock:getARE()
if (self.pieces < 250) then return 23
if (self.pieces < 250) then return 23
elseif (self.pieces < 275) then return 20
elseif (self.pieces < 285) then return 23
elseif (self.pieces < 305) then return 14
elseif (self.pieces < 285) then return 23
elseif (self.pieces < 305) then return 14
elseif (self.pieces < 315) then return 20
elseif (self.pieces < 340) then return 14
elseif (self.pieces < 350) then return 20
@ -36,7 +36,7 @@ function GLock:getARE()
elseif (self.pieces < 430) then return 12
elseif (self.pieces < 445) then return 16
elseif (self.pieces < 475) then return 10
else return 8
else return 8
end
end
@ -89,7 +89,7 @@ function GLock:getLineClearDelay()
end
function GLock:getLockDelay()
if (self.pieces < 285) then return 30
if (self.pieces < 285) then return 30
elseif (self.pieces < 305) then return 25
elseif (self.pieces < 315) then return 30
elseif (self.pieces < 340) then return 25
@ -100,11 +100,11 @@ function GLock:getLockDelay()
elseif (self.pieces < 445) then return 30
elseif (self.pieces < 475) then return 17
else return 15
end
end
end
function GLock:getGravity()
if (self.pieces < 20) then return 64/256
if (self.pieces < 20) then return 64/256
elseif (self.pieces < 50) then return 2
elseif (self.pieces < 65) then return 64/256
elseif (self.pieces < 115) then return 4
@ -196,21 +196,28 @@ end
function GLock:drawScoringInfo()
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")
love.graphics.printf("GRADE", 240, 120, 40, "left")
love.graphics.printf("SECTION", 240, 200, 60, "left")
love.graphics.printf("PIECES", 240, 320, 60, "left")
love.graphics.printf("GRADE", text_x, 120, 40, "left")
love.graphics.printf("SECTION", text_x, 200, 60, "left")
love.graphics.printf("PIECES", text_x, 320, 60, "left")
if self:getGSectionState() then
love.graphics.printf("G-SECTION", 240, 220, 90, "left")
love.graphics.printf("G-SECTION", text_x, 220, 90, "left")
else
love.graphics.printf("N-SECTION", 240, 220, 90, "left")
love.graphics.printf("N-SECTION", text_x, 220, 90, "left")
end
love.graphics.setFont(font_3x5_3)
@ -218,14 +225,14 @@ function GLock:drawScoringInfo()
if self:getGSection() == 11 then
-- blame gizmo4487 for this time
-- he's a legend
if self.frames <= frameTime(5,19) then love.graphics.printf("GM", 240, 140, 90, "left")
else love.graphics.printf("M", 240, 140, 90, "left") end
if self.frames <= frameTime(5,19) then love.graphics.printf("GM", text_x, 140, 90, "left")
else love.graphics.printf("M", text_x, 140, 90, "left") end
else
love.graphics.printf("G"..1+self:getGSection(), 240, 140, 90, "left")
love.graphics.printf("G"..1+self:getGSection(), text_x, 140, 90, "left")
end
love.graphics.printf(self.pieces, 240, 340, 40, "right")
love.graphics.printf(self:getSectionEndLevel(), 240, 370, 40, "right")
love.graphics.printf(self.pieces, text_x, 340, 40, "right")
love.graphics.printf(self:getSectionEndLevel(), text_x, 370, 40, "right")
love.graphics.setFont(font_8x11)
love.graphics.printf(formatTime(self.frames), 64, 420, 160, "center")
@ -234,23 +241,23 @@ end
function GLock:getSectionEndLevel()
if self.pieces < 20 then return 20
elseif self.pieces < 50 then return 50
elseif self.pieces < 65 then return 65
elseif self.pieces < 65 then return 65
elseif self.pieces < 115 then return 115
elseif self.pieces < 130 then return 130
elseif self.pieces < 130 then return 130
elseif self.pieces < 180 then return 180
elseif self.pieces < 195 then return 195
elseif self.pieces < 195 then return 195
elseif self.pieces < 235 then return 235
elseif self.pieces < 250 then return 250
elseif self.pieces < 250 then return 250
elseif self.pieces < 275 then return 275
elseif self.pieces < 285 then return 285
elseif self.pieces < 285 then return 285
elseif self.pieces < 305 then return 305
elseif self.pieces < 315 then return 315
elseif self.pieces < 315 then return 315
elseif self.pieces < 340 then return 340
elseif self.pieces < 350 then return 350
elseif self.pieces < 380 then return 380
elseif self.pieces < 395 then return 395
elseif self.pieces < 395 then return 395
elseif self.pieces < 430 then return 430
elseif self.pieces < 445 then return 445
elseif self.pieces < 445 then return 445
elseif self.pieces < 475 then return 475
else return 500 end
end
@ -280,7 +287,7 @@ function GLock:getGSectionState()
end
function GLock:getGSection()
if (self.pieces < 50) then return 0
if (self.pieces < 50) then return 0
elseif (self.pieces < 115) then return 1
elseif (self.pieces < 180) then return 2
elseif (self.pieces < 235) then return 3

View File

@ -253,9 +253,17 @@ function TheTrueHero:drawScoringInfo()
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.printf("ATTACK NUMBER", 240, 150, 200, "left")
love.graphics.printf("ATTACK", 240, 230, 200, "left")
love.graphics.printf("ATTACK NUMBER", text_x, 150, 200, "left")
love.graphics.printf("ATTACK", text_x, 230, 200, "left")
love.graphics.setFont(font_3x5_3)
if self.attack_number > 0 then
@ -263,11 +271,11 @@ function TheTrueHero:drawScoringInfo()
string.sub(formatTime(
self.section_times[Mod1(self.attack_number, #self.section_times)] - self.section_frames
), -4, -1)
), 240, 170, 200, "left")
), text_x, 170, 200, "left")
end
love.graphics.printf(
self.attacks[self.current_attack] or "",
240, 250, 200, "left"
text_x, 250, 200, "left"
)
love.graphics.setFont(font_3x5_4)
@ -278,7 +286,7 @@ function TheTrueHero:drawScoringInfo()
self.var == 0 and {0.3, 1, 0.3, 1} or {1, 0.3, 0.3, 1}
) or {1, 1, 1, 1}
)
love.graphics.printf(self.var, 240, 280, 200, "left")
love.graphics.printf(self.var, text_x, 280, 200, "left")
love.graphics.setColor(1, 1, 1, 1)
end
end

View File

@ -109,31 +109,38 @@ end
function IntervalTrainingGame:drawScoringInfo()
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setFont(font_3x5_2)
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")
love.graphics.printf("TIME LEFT", 240, 250, 80, "left")
love.graphics.printf("LEVEL", 240, 320, 40, "left")
love.graphics.printf("TIME LEFT", text_x, 250, 80, "left")
love.graphics.printf("LEVEL", text_x, 320, 40, "left")
local current_section = math.floor(self.level / 100) + 1
self:drawSectionTimesWithSplits(current_section)
love.graphics.setFont(font_3x5_3)
love.graphics.printf(self.level, 240, 340, 50, "right")
love.graphics.printf(self.level, text_x, 340, 50, "right")
-- draw time left, flash red if necessary
local time_left = self.section_time_limit - math.max(self:getSectionTime(), 0)
if not self.game_over and time_left < frameTime(0,10) and time_left % 4 < 2 then
love.graphics.setColor(1, 0.3, 0.3, 1)
end
love.graphics.printf(formatTime(time_left), 240, 270, 160, "left")
love.graphics.printf(formatTime(time_left), text_x, 270, 160, "left")
love.graphics.setColor(1, 1, 1, 1)
love.graphics.printf(self:getSectionEndLevel(), 240, 370, 50, "right")
love.graphics.printf(self:getSectionEndLevel(), text_x, 370, 50, "right")
end
function IntervalTrainingGame:getSectionEndLevel()

View File

@ -124,25 +124,32 @@ function JokerGame:drawGrid() self.grid:drawOutline() end
function JokerGame:drawScoringInfo()
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setFont(font_3x5_2)
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")
love.graphics.printf("TIME LIMIT", 240, 120, 80, "left")
love.graphics.printf("LEVEL", 240, 200, 40, "left")
love.graphics.printf("STOCK", 240, 280, 40, "left")
love.graphics.printf("TIME LIMIT", text_x, 120, 80, "left")
love.graphics.printf("LEVEL", text_x, 200, 40, "left")
love.graphics.printf("STOCK", text_x, 280, 40, "left")
love.graphics.setFont(font_3x5_3)
if not self.game_over and self.time_limit < frameTime(0,10) and self.time_limit % 4 < 2 then
love.graphics.setColor(1, 0.3, 0.3, 1)
end
love.graphics.printf(formatTime(self.time_limit), 240, 140, 120, "left")
love.graphics.printf(formatTime(self.time_limit), text_x, 140, 120, "left")
love.graphics.setColor(1, 1, 1, 1)
love.graphics.printf(self.level, 240, 220, 90, "left")
love.graphics.printf(math.max(self.stock, 0), 240, 300, 90, "left")
love.graphics.printf(self.level, text_x, 220, 90, "left")
love.graphics.printf(math.max(self.stock, 0), text_x, 300, 90, "left")
if (self.ready_frames ~= 0) then
love.graphics.printf(
"RUSH: " .. (rush and "ON" or "OFF"),

View File

@ -92,28 +92,35 @@ function KamuiGame:drawGrid() self.grid:draw() end
function KamuiGame:drawScoringInfo()
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setFont(font_3x5_2)
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")
love.graphics.printf("TIME LEFT", 240, 250, 80, "left")
love.graphics.printf("LEVEL", 240, 320, 40, "left")
love.graphics.printf("TIME LEFT", text_x, 250, 80, "left")
love.graphics.printf("LEVEL", text_x, 320, 40, "left")
local current_section = math.floor(self.level / 100) + 1
self:drawSectionTimesWithSplits(current_section)
love.graphics.setFont(font_3x5_3)
love.graphics.printf(self.level, 240, 340, 40, "right")
love.graphics.printf(self.level == 500 and self.level or (math.floor(self.level / 100) + 1) * 100, 240, 370, 40, "right")
love.graphics.printf(self.level, text_x, 340, 40, "right")
love.graphics.printf(self.level == 500 and self.level or (math.floor(self.level / 100) + 1) * 100, text_x, 370, 40, "right")
-- draw time left, flash red if necessary
if not self.game_over and self.time_limit < frameTime(0,10) and time_left % 4 < 2 then
love.graphics.setColor(1, 0.3, 0.3, 1)
end
love.graphics.printf(formatTime(self.time_limit), 240, 270, 160, "left")
love.graphics.printf(formatTime(self.time_limit), text_x, 270, 160, "left")
love.graphics.setColor(1, 1, 1, 1)
end

View File

@ -153,29 +153,36 @@ end
function KonohaGame:drawScoringInfo()
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setFont(font_3x5_2)
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")
love.graphics.printf("TIME LIMIT", 240, 120, 120, "left")
love.graphics.printf("BRAVOS", 240, 200, 50, "left")
love.graphics.printf("LEVEL", 240, 320, 40, "left")
love.graphics.printf("TIME LIMIT", text_x, 120, 120, "left")
love.graphics.printf("BRAVOS", text_x, 200, 50, "left")
love.graphics.printf("LEVEL", text_x, 320, 40, "left")
love.graphics.setFont(font_3x5_3)
if not self.game_over and self.time_limit < frameTime(0,10) and self.time_limit % 4 < 2 then
love.graphics.setColor(1, 0.3, 0.3, 1)
end
love.graphics.printf(formatTime(self.time_limit), 240, 140, 120, "right")
love.graphics.printf(formatTime(self.time_limit), text_x, 140, 120, "right")
love.graphics.setColor(1, 1, 1, 1)
if self.last_bonus_display_time > 0 then
love.graphics.printf("+"..formatTime(self.last_bonus_amount), 240, 160, 120, "right")
love.graphics.printf("+"..formatTime(self.last_bonus_amount), text_x, 160, 120, "right")
end
love.graphics.printf(self.bravos, 240, 220, 90, "left")
love.graphics.printf(self.level, 240, 340, 50, "right")
love.graphics.printf(self:getSectionEndLevel(), 240, 370, 50, "right")
love.graphics.printf(self.bravos, text_x, 220, 90, "left")
love.graphics.printf(self.level, text_x, 340, 50, "right")
love.graphics.printf(self:getSectionEndLevel(), text_x, 370, 50, "right")
love.graphics.setFont(font_8x11)
love.graphics.printf(formatTime(self.frames), 64, 420, 160, "center")

View File

@ -122,16 +122,23 @@ end
function MarathonWLJGame:drawScoringInfo()
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setFont(font_3x5_2)
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")
love.graphics.printf("LINES", 240, 120, 40, "left")
love.graphics.printf("SCORE", 240, 200, 40, "left")
love.graphics.printf("LEVEL", 240, 320, 40, "left")
love.graphics.printf("LINES", text_x, 120, 40, "left")
love.graphics.printf("SCORE", text_x, 200, 40, "left")
love.graphics.printf("LEVEL", text_x, 320, 40, "left")
if self.message_timer > 0 then
love.graphics.printf(self.message, 64, 400, 160, "center")
@ -139,10 +146,10 @@ function MarathonWLJGame:drawScoringInfo()
end
love.graphics.setFont(font_3x5_3)
love.graphics.printf(self.lines, 240, 140, 90, "left")
love.graphics.printf(self.score, 240, 220, 90, "left")
love.graphics.printf(self.pieces, 240, 340, 50, "right")
love.graphics.printf(self:getSectionEndLevel(), 240, 370, 50, "right")
love.graphics.printf(self.lines, text_x, 140, 90, "left")
love.graphics.printf(self.score, text_x, 220, 90, "left")
love.graphics.printf(self.pieces, text_x, 340, 50, "right")
love.graphics.printf(self:getSectionEndLevel(), text_x, 370, 50, "right")
love.graphics.setFont(font_8x11)
love.graphics.printf(formatTime(self.frames), 64, 420, 160, "center")

View File

@ -139,30 +139,37 @@ end
function MarathonC88Game:drawScoringInfo()
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setFont(font_3x5_2)
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 .. " " ..
(self.line_clears ~= 0 and math.floor(self.tetrises * 100 / self.line_clears) or 0) .. "% " ..
strTrueValues(self.prev_inputs)
)
love.graphics.printf("NEXT", 64, 40, 40, "left")
love.graphics.printf("SCORE", 240, 120, 40, "left")
love.graphics.printf("LINES", 240, 200, 40, "left")
love.graphics.printf("LEVEL", 240, 280, 40, "left")
love.graphics.printf("SCORE", text_x, 120, 40, "left")
love.graphics.printf("LINES", text_x, 200, 40, "left")
love.graphics.printf("LEVEL", text_x, 280, 40, "left")
if self.gravity_multiplier ~= 1 and self:getGravity() < 20 then
love.graphics.printf(
self.gravity_multiplier .. "x GRAVITY ACTIVE!",
240, 350, 150, "left"
text_x, 350, 150, "left"
)
end
love.graphics.setFont(font_3x5_3)
if self.score >= 999999 then love.graphics.setColor(1, 1, 0, 1) end
love.graphics.printf(self.score, 240, 140, 90, "left")
love.graphics.printf(self.score, text_x, 140, 90, "left")
love.graphics.setColor(1, 1, 1, 1)
love.graphics.printf(self.lines, 240, 220, 90, "left")
love.graphics.printf(self.level, 240, 300, 90, "left")
love.graphics.printf(self.lines, text_x, 220, 90, "left")
love.graphics.printf(self.level, text_x, 300, 90, "left")
love.graphics.setFont(font_8x11)
love.graphics.printf(formatTime(self.frames), 64, 420, 160, "center")

View File

@ -188,24 +188,31 @@ end
function MarathonC89Game:drawScoringInfo()
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setFont(font_3x5_2)
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 .. " " ..
(self.line_clears ~= 0 and math.floor(self.tetrises * 100 / self.line_clears) or 0) .. "% " ..
strTrueValues(self.prev_inputs)
)
love.graphics.printf("NEXT", 64, 40, 40, "left")
love.graphics.printf("LINES", 240, 120, 40, "left")
love.graphics.printf("SCORE", 240, 200, 40, "left")
love.graphics.printf("LEVEL", 240, 280, 40, "left")
love.graphics.printf("LINES", text_x, 120, 40, "left")
love.graphics.printf("SCORE", text_x, 200, 40, "left")
love.graphics.printf("LEVEL", text_x, 280, 40, "left")
love.graphics.setFont(font_3x5_3)
love.graphics.printf(self.lines, 240, 140, 90, "left")
love.graphics.printf(self.lines, text_x, 140, 90, "left")
if self.score >= 999999 then love.graphics.setColor(1, 1, 0, 1) end
love.graphics.printf(self.score, 240, 220, 90, "left")
love.graphics.printf(self.score, text_x, 220, 90, "left")
love.graphics.setColor(1, 1, 1, 1)
love.graphics.printf(self.level, 240, 300, 90, "left")
love.graphics.printf(self.level, text_x, 300, 90, "left")
love.graphics.setFont(font_8x11)
love.graphics.printf(formatTime(self.frames), 64, 420, 160, "center")

View File

@ -271,29 +271,35 @@ end
function MarathonC99Game:drawScoringInfo()
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setFont(font_3x5_2)
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) ..
self.drop_bonus
)
love.graphics.printf("NEXT", 64, 40, 40, "left")
love.graphics.printf("LEVEL "..self.level, 240, 120, 80, "left")
love.graphics.printf("LINES", 240, 190, 200, "left")
love.graphics.printf(self.lines.."/300", 240, 210, 200, "left")
love.graphics.printf("LEVEL "..self.level, text_x, 120, 80, "left")
love.graphics.printf("LINES", text_x, 190, 200, "left")
love.graphics.printf(self.lines.."/300", text_x, 210, 200, "left")
if(self.level ~= 15 and self.level ~= 17) then
xp = -0.5
love.graphics.setColor(0,1,0,1)
for i=1,lines_to_next_level[self.level]-self.lines_to_next_level do
love.graphics.printf("|", 240+xp*5, 165, 30, "left")
love.graphics.printf("|", text_x+xp*5, 165, 30, "left")
xp = xp+1
end
love.graphics.setColor(0,0.5,0,1)
for i=1,self.lines_to_next_level do
love.graphics.printf("|", 240+xp*5, 165, 30, "left")
love.graphics.printf("|", text_x+xp*5, 165, 30, "left")
xp = xp+1
end
end
@ -317,7 +323,7 @@ function MarathonC99Game:drawScoringInfo()
slot_popup.slotnum .. " " ..
slot_popup.slotnum .. " " ..
slot_popup.slotnum,
240, 80, 100, "left")
text_x, 80, 100, "left")
love.graphics.setColor(1,1,1,1)
else
@ -333,17 +339,17 @@ function MarathonC99Game:drawScoringInfo()
(self.slots[1] and self.slots[1] or math.random(4)) .. " " ..
(self.slots[2] and self.slots[2] or math.random(4)) .. " " ..
math.random(4),
240, 80, 100, "left")
text_x, 80, 100, "left")
love.graphics.setColor(1,1,1,1)
end
end
love.graphics.setFont(font_3x5_3)
love.graphics.setColor(1, 1, 1, 1)
level_names[17] = self.roll_frames == frameTime(3,19) and "THE EDGE OF THE WORLD" or formatTime(frameTime(3,19) - self.roll_frames)
love.graphics.printf(level_names[self.level], 240, 137, 200, "left")
love.graphics.printf(level_names[self.level], text_x, 137, 200, "left")
love.graphics.setFont(font_3x5_2)
love.graphics.setFont(font_8x11)
love.graphics.printf(formatTime(self.frames), 240, 300, 160, "left")
love.graphics.printf(formatTime(self.frames), text_x, 300, 160, "left")
end

View File

@ -183,16 +183,23 @@ end
function MarathonGFGame:drawScoringInfo()
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setFont(font_3x5_2)
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")
love.graphics.printf("SCORE", 240, 180, 80, "left")
love.graphics.printf("LEVEL", 240, 250, 80, "left")
love.graphics.printf("LINES", 240, 320, 40, "left")
love.graphics.printf("SCORE", text_x, 180, 80, "left")
love.graphics.printf("LEVEL", text_x, 250, 80, "left")
love.graphics.printf("LINES", text_x, 320, 40, "left")
local current_section = math.floor(self.lines / 10) + 1
self:drawSectionTimesWithSplits(current_section)
@ -203,14 +210,14 @@ function MarathonGFGame:drawScoringInfo()
end
love.graphics.setFont(font_3x5_3)
love.graphics.printf(self.score, 240, 200, 120, "left")
love.graphics.printf(self.lines, 240, 340, 40, "right")
love.graphics.printf(self.clear and self.lines or self:getSectionEndLines(), 240, 370, 40, "right")
love.graphics.printf(self.score, text_x, 200, 120, "left")
love.graphics.printf(self.lines, text_x, 340, 40, "right")
love.graphics.printf(self.clear and self.lines or self:getSectionEndLines(), text_x, 370, 40, "right")
if not self.game_over and self.clear and self.roll_frames % 4 < 2 then
love.graphics.setColor(1, 1, 0.3, 1)
end
love.graphics.printf(math.floor(self.lines / 10) + 1, 240, 270, 160, "left")
love.graphics.printf(math.floor(self.lines / 10) + 1, text_x, 270, 160, "left")
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setFont(font_8x11)

View File

@ -324,17 +324,24 @@ end
function MarathonSTGame:drawScoringInfo()
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setFont(font_3x5_2)
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")
love.graphics.printf("GRADE", 240, 120, 40, "left")
love.graphics.printf("GRADE POINTS", 240, 180, 120, "left")
love.graphics.printf("GRADE", text_x, 120, 40, "left")
love.graphics.printf("GRADE POINTS", text_x, 180, 120, "left")
if self.level >= 600 then
love.graphics.printf("MULTIPLIER", 240, 240, 80, "left")
love.graphics.printf("MULTIPLIER", text_x, 240, 80, "left")
end
if self.boost_message_time > 0 then
love.graphics.setColor(
@ -346,19 +353,19 @@ function MarathonSTGame:drawScoringInfo()
love.graphics.setColor(1, 1, 1, 1)
self.boost_message_time = self.boost_message_time - 1
end
love.graphics.printf("LEVEL", 240, 320, 40, "left")
love.graphics.printf("LEVEL", text_x, 320, 40, "left")
local current_section = math.floor(self.level / 100) + 1
self:drawSectionTimesWithSplits(current_section, 15)
love.graphics.setFont(font_3x5_3)
love.graphics.printf(self:getLetterGrade(), 240, 140, 90, "left")
love.graphics.printf(self.grade_points, 240, 200, 90, "left")
love.graphics.printf(self:getLetterGrade(), text_x, 140, 90, "left")
love.graphics.printf(self.grade_points, text_x, 200, 90, "left")
if self.level >= 600 then
love.graphics.printf(string.format("%.02f", self.grade_point_multiplier / 100) .. "x", 240, 260, 90, "left")
love.graphics.printf(string.format("%.02f", self.grade_point_multiplier / 100) .. "x", text_x, 260, 90, "left")
end
love.graphics.printf(self.level, 240, 340, 50, "right")
love.graphics.printf(self.clear and self.level or self:getSectionEndLevel(), 240, 370, 50, "right")
love.graphics.printf(self.level, text_x, 340, 50, "right")
love.graphics.printf(self.clear and self.level or self:getSectionEndLevel(), text_x, 370, 50, "right")
love.graphics.setFont(font_8x11)
love.graphics.printf(formatTime(self.frames), 64, 420, 160, "center")

View File

@ -139,24 +139,29 @@ function MarathonWCBGame:drawScoringInfo()
MarathonWCBGame.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
love.graphics.setFont(font_3x5_2)
love.graphics.printf("NEXT", 64, 40, 40, "left")
local text_x = config["side_next"] and 316 or 240
love.graphics.setFont(font_3x5_2)
love.graphics.printf("lines", text_x, 160, 80, "left")
love.graphics.printf("pieces", text_x, 220, 80, "left")
love.graphics.printf("piece/sec", text_x, 280, 80, "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
love.graphics.setFont(font_3x5_3)
love.graphics.printf(self.lines, text_x, 180, 80, "left")
love.graphics.printf(self.pieces, text_x, 240, 80, "left")
love.graphics.printf(self.pieces, text_x, text_x, 80, "left")
love.graphics.printf(string.format("%.04f", self.pieces / math.max(1, self.frames) * 60), text_x, 300, 80, "left")
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

View File

@ -199,38 +199,45 @@ end
function NESTGMMode:drawScoringInfo()
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setFont(font_3x5_2)
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")
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("LINES", 240, 320, 40, "left")
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("LINES", 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
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:getGrade()[1] == 19 then
love.graphics.printf("GM", 240, 140, 90, "left")
love.graphics.printf("GM", text_x, 140, 90, "left")
elseif self:getGrade()[1] == 18 then
love.graphics.printf("M", 240, 140, 90, "left")
love.graphics.printf("M", text_x, 140, 90, "left")
else
love.graphics.printf(
self.SGnames[self:getGrade()[1] + 1], 240, 140, 90, "left"
self.SGnames[self:getGrade()[1] + 1], text_x, 140, 90, "left"
)
end
love.graphics.printf(self:getGrade()[2], 240, 280, 90, "left")
love.graphics.printf(math.min(300, self.lines), 240, 340, 40, "right")
love.graphics.printf(self:getSectionEndLines(), 240, 370, 40, "right")
love.graphics.printf(self:getGrade()[2], text_x, 280, 90, "left")
love.graphics.printf(math.min(300, self.lines), text_x, 340, 40, "right")
love.graphics.printf(self:getSectionEndLines(), 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)

View File

@ -73,19 +73,26 @@ end
function NightOfNights:drawScoringInfo()
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setFont(font_3x5_2)
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")
love.graphics.printf("LINES", 240, 160, 80, "left")
love.graphics.printf("PIECES", 240, 240, 80, "left")
love.graphics.printf("LINES", text_x, 160, 80, "left")
love.graphics.printf("PIECES", text_x, 240, 80, "left")
love.graphics.setFont(font_3x5_4)
love.graphics.printf(self.lines, 240, 180, 90, "left")
love.graphics.printf(self.pieces, 240, 260, 90, "left")
love.graphics.printf(self.lines, text_x, 180, 90, "left")
love.graphics.printf(self.pieces, text_x, 260, 90, "left")
love.graphics.setFont(font_8x11)
love.graphics.printf(formatTime(self.frames), 64, 420, 160, "center")

View File

@ -329,15 +329,21 @@ function PhantomManiaNXGame: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
love.graphics.setFont(font_3x5_2)
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
if(self.coolregret_timer > 0) then
@ -361,7 +367,7 @@ function PhantomManiaNXGame:drawScoringInfo()
love.graphics.printf(math.floor(self.level / 100 + 1) * 100, text_x, 370, 50, "right")
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

View File

@ -116,29 +116,36 @@ function ProGame:drawScoringInfo()
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setFont(font_3x5_2)
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 < 200 then love.graphics.printf("TIME LEFT", 240, 250, 80, "left") end
love.graphics.printf("LINES", 240, 320, 40, "left")
if self.lines < 200 then love.graphics.printf("TIME LEFT", text_x, 250, 80, "left") end
love.graphics.printf("LINES", text_x, 320, 40, "left")
local current_section = math.floor(self.lines / 20) + 1
self:drawSectionTimesWithSplits(current_section)
love.graphics.setFont(font_3x5_3)
love.graphics.printf(self.lines, 240, 340, 40, "right")
love.graphics.printf(self.clear and self.lines or self:getSectionEndLines(), 240, 370, 40, "right")
love.graphics.printf(self.lines, text_x, 340, 40, "right")
love.graphics.printf(self.clear and self.lines or self:getSectionEndLines(), text_x, 370, 40, "right")
-- draw time left, flash red if necessary
local time_left = self.section_time_limit - math.max(self:getSectionTime(), 0)
if not self.game_over and not self.clear and time_left < frameTime(0,10) and time_left % 4 < 2 then
love.graphics.setColor(1, 0.3, 0.3, 1)
end
if self.lines < 200 then love.graphics.printf(formatTime(time_left), 240, 270, 160, "left") end
if self.lines < 200 then love.graphics.printf(formatTime(time_left), text_x, 270, 160, "left") end
love.graphics.setColor(1, 1, 1, 1)
end

View File

@ -171,38 +171,45 @@ function ArcadeScoreAttack:drawScoringInfo()
ArcadeScoreAttack.super.drawScoringInfo(self)
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setFont(font_3x5_2)
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")
love.graphics.printf("SCORE", 240, 100, 40, "left")
love.graphics.printf("LINES", 240, 165, 40, "left")
love.graphics.printf("MULTIPLIER" , 240, 220, 153, "right")
love.graphics.printf("LEVEL" , 240, 240, 153, "left")
love.graphics.printf("QUADS x (1 + ", 240, 260, 160, "left")
love.graphics.printf("CHAIN x (1 + ", 240, 280, 160, "left")
love.graphics.printf("TOTAL =" , 240, 310, 153, "left")
love.graphics.printf("TIME REMAINING", 240, 350, 120, "left")
love.graphics.printf("SCORE", text_x, 100, 40, "left")
love.graphics.printf("LINES", text_x, 165, 40, "left")
love.graphics.printf("MULTIPLIER" , text_x, 220, 153, "right")
love.graphics.printf("LEVEL" , text_x, text_x, 153, "left")
love.graphics.printf("QUADS x (1 + ", text_x, 260, 160, "left")
love.graphics.printf("CHAIN x (1 + ", text_x, 280, 160, "left")
love.graphics.printf("TOTAL =" , text_x, 310, 153, "left")
love.graphics.printf("TIME REMAINING", text_x, 350, 120, "left")
love.graphics.printf(self.level .." ", 240, 240, 153, "right")
love.graphics.printf(self.quads ..")", 240, 260, 160, "right")
love.graphics.printf(self.chain ..")", 240, 280, 160, "right")
love.graphics.printf(self.multiplier.." ", 240, 310, 153, "right")
love.graphics.printf(self.level .." ", text_x, 240, 153, "right")
love.graphics.printf(self.quads ..")", text_x, 260, 160, "right")
love.graphics.printf(self.chain ..")", text_x, 280, 160, "right")
love.graphics.printf(self.multiplier.." ", text_x, 310, 153, "right")
love.graphics.setFont(font_3x5_3)
local li = levelchanges[self.level]
if li == math.huge then
love.graphics.printf(self.lines, 240, 190, 40, "left")
love.graphics.printf(self.lines, text_x, 190, 40, "left")
else
love.graphics.printf(self.lines.."/"..li, 240, 185, 100, "left")
love.graphics.printf(self.lines.."/"..li, text_x, 185, 100, "left")
end
love.graphics.printf(formatTime(self.timeleft), 240, 370, 150, "left")
love.graphics.printf(formatTime(self.timeleft), text_x, 370, 150, "left")
love.graphics.setFont(font_3x5_4)
love.graphics.printf(comma(self.score), 240, 120, 300, "left")
love.graphics.printf(comma(self.score), text_x, 120, 300, "left")
love.graphics.setFont(font_8x11)
love.graphics.printf(formatTime(self.frames), 64, 420, 160, "center")

View File

@ -145,27 +145,34 @@ end
function ScoreDrainGame:drawScoringInfo()
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setFont(font_3x5_2)
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")
love.graphics.printf("DRAIN RATE", 240, 90, 80, "left")
love.graphics.printf("SCORE", 240, 170, 40, "left")
love.graphics.printf("TIME LEFT", 240, 250, 80, "left")
love.graphics.printf("LEVEL", 240, 320, 40, "left")
love.graphics.printf("DRAIN RATE", text_x, 90, 80, "left")
love.graphics.printf("SCORE", text_x, 170, 40, "left")
love.graphics.printf("TIME LEFT", text_x, 250, 80, "left")
love.graphics.printf("LEVEL", text_x, 320, 40, "left")
love.graphics.setFont(font_3x5_3)
love.graphics.printf(math.floor(self.drain_rate).."/s", 240, 110, 120, "left")
love.graphics.printf(math.floor(self.drain_rate).."/s", text_x, 110, 120, "left")
local frames_left = self.score / self.drain_rate * 60
if frames_left <= 600 and frames_left % 4 < 2 and not self.game_over then love.graphics.setColor(1, 0.3, 0.3, 1) end
love.graphics.printf(formatTime(frames_left), 240, 270, 120, "left")
love.graphics.printf(formatTime(frames_left), text_x, 270, 120, "left")
love.graphics.setColor(1, 1, 1, 1)
love.graphics.printf(math.floor(self.score), 240, 190, 90, "left")
love.graphics.printf(self.level, 240, 340, 50, "right")
love.graphics.printf(self:getSectionEndLevel(), 240, 370, 50, "right")
love.graphics.printf(math.floor(self.score), text_x, 190, 90, "left")
love.graphics.printf(self.level, text_x, 340, 50, "right")
love.graphics.printf(self:getSectionEndLevel(), text_x, 370, 50, "right")
love.graphics.setFont(font_8x11)
love.graphics.printf(formatTime(self.frames), 64, 420, 160, "center")

View File

@ -92,10 +92,15 @@ end
function LudicrousSpeed: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
love.graphics.setFont(font_3x5_2)
love.graphics.printf("NEXT", 64, 40, 40, "left")
local text_x = config["side_next"] and 316 or 240
love.graphics.setFont(font_3x5_2)
love.graphics.printf("LINES", text_x, 120, 80, "left")
love.graphics.printf("piece/sec", text_x, 180, 80, "left")
love.graphics.printf("REQUIRED PPS", text_x, 240, 120, "left")

View File

@ -66,17 +66,24 @@ function SquareMode:onPieceLock(piece, cleared_row_count)
end
function SquareMode:drawScoringInfo()
SquareMode.super.drawScoringInfo(self)
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setFont(font_3x5_4)
love.graphics.printf(self.lines, 240, 160, 150, "left")
love.graphics.printf(self.squares, 240, 230, 150, "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("LINES", 240, 200, 150, "left")
love.graphics.printf("SQUARES", 240, 270, 150, "left")
love.graphics.printf(self.lines, text_x, 160, 150, "left")
love.graphics.printf(self.squares, text_x, 230, 150, "left")
love.graphics.setFont(font_3x5_2)
love.graphics.printf("LINES", text_x, 200, 150, "left")
love.graphics.printf("SQUARES", text_x, 270, 150, "left")
end
function SquareMode:drawGrid()

View File

@ -169,23 +169,29 @@ end
function StrategyPFGame:drawScoringInfo()
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setFont(font_3x5_2)
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")
love.graphics.printf("GRADE", 240, 120, 40, "left")
love.graphics.printf("REMAINING PIECES", 240, 200, 150, "left")
love.graphics.printf("LEVEL", 240, 320, 40, "left")
love.graphics.printf("GRADE", text_x, 120, 40, "left")
love.graphics.printf("REMAINING PIECES", text_x, 200, 150, "left")
love.graphics.printf("LEVEL", text_x, 320, 40, "left")
love.graphics.printf("PIECES USED", 64, 420, 160, "left")
if self.bravos > 0 then love.graphics.printf("BRAVO", 300, 120, 40, "left") end
love.graphics.setFont(font_3x5_3)
love.graphics.printf(self:getRank(), 240, 140, 120, "left")
love.graphics.printf(self:getRank(), text_x, 140, 120, "left")
if self.level<1500 then
if self.remaining<=25 then
love.graphics.setColor(1, 1, 0, 1)
@ -193,14 +199,14 @@ function StrategyPFGame:drawScoringInfo()
love.graphics.setColor(1, 0, 0, 1)
end
end
love.graphics.printf(self.remaining.."/"..self:getPieceLimit(), 240, 220, 80, "left")
love.graphics.printf(self.remaining.."/"..self:getPieceLimit(), text_x, 220, 80, "left")
love.graphics.setColor(1, 1, 1, 1)
else
love.graphics.printf(self.remaining, 240, 220, 80, "left")
love.graphics.printf(self.remaining, text_x, 220, 80, "left")
end
love.graphics.printf(self.level, 240, 340, 50, "right")
love.graphics.printf(self:getSectionEndLevel(), 240, 370, 50, "right")
love.graphics.printf(self.level, text_x, 340, 50, "right")
love.graphics.printf(self:getSectionEndLevel(), text_x, 370, 50, "right")
if self.bravos > 0 then love.graphics.printf(self.bravos, 300, 140, 40, "left") end
love.graphics.setFont(font_8x11)

View File

@ -86,29 +86,36 @@ function SurvivalAXHGame:drawScoringInfo()
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setFont(font_3x5_2)
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 < 200 then love.graphics.printf("TIME LEFT", 240, 250, 80, "left") end
love.graphics.printf("LINES", 240, 320, 40, "left")
if self.lines < 200 then love.graphics.printf("TIME LEFT", text_x, 250, 80, "left") end
love.graphics.printf("LINES", text_x, 320, 40, "left")
local current_section = math.floor(self.lines / 10) + 1
self:drawSectionTimesWithSplits(current_section)
love.graphics.setFont(font_3x5_3)
love.graphics.printf(self.lines, 240, 340, 40, "right")
love.graphics.printf(self.clear and self.lines or self:getSectionEndLines(), 240, 370, 40, "right")
love.graphics.printf(self.lines, text_x, 340, 40, "right")
love.graphics.printf(self.clear and self.lines or self:getSectionEndLines(), text_x, 370, 40, "right")
-- draw time left, flash red if necessary
local time_left = self:getSectionTimeLimit() - math.max(self:getSectionTime(), 0)
if not self.game_over and not self.clear and time_left < frameTime(0,10) and time_left % 4 < 2 then
love.graphics.setColor(1, 0.3, 0.3, 1)
end
if self.lines < 200 then love.graphics.printf(formatTime(time_left), 240, 270, 160, "left") end
if self.lines < 200 then love.graphics.printf(formatTime(time_left), text_x, 270, 160, "left") end
love.graphics.setColor(1, 1, 1, 1)
end

View File

@ -95,22 +95,29 @@ end
function SurvivalGTEGame:drawScoringInfo()
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setFont(font_3x5_2)
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")
love.graphics.printf("SPEED LEVEL", 240, 280, 160, "left")
love.graphics.printf("LINES", 240, 350, 160, "left")
love.graphics.printf("SPEED LEVEL", text_x, 280, 160, "left")
love.graphics.printf("LINES", text_x, 350, 160, "left")
love.graphics.setFont(font_3x5_3)
love.graphics.printf(
"M" .. math.min(30, math.floor(self.lines / 10) + 1),
240, 300, 160, "left"
text_x, 300, 160, "left"
)
love.graphics.printf(self.lines, 240, 370, 160, "left")
love.graphics.printf(self.lines, text_x, 370, 160, "left")
love.graphics.setFont(font_8x11)
love.graphics.printf(formatTime(self.frames), 64, 420, 160, "center")

View File

@ -185,26 +185,33 @@ end
function TGMPlusGame:drawScoringInfo()
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setFont(font_3x5_2)
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")
love.graphics.printf("SCORE", 240, 200, 40, "left")
love.graphics.printf("LEVEL", 240, 320, 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
love.graphics.setFont(font_3x5_3)
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)

View File

@ -111,23 +111,23 @@ function ZenMode:onPieceLock(piece, cleared_row_count)
end
function ZenMode:drawScoringInfo()
local text_x = config["side_next"] and 320 or 240
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setFont(font_3x5_2)
if config["side_next"] then
love.graphics.printf("NEXT", 240, 72, 40, "left")
else
love.graphics.printf("NEXT", 64, 40, 40, "left")
end
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("SCORE", text_x, 100, 40, "left")
love.graphics.printf("PIECES", text_x, 280, 80, "left")
love.graphics.printf("LINES", text_x, 340, 40, "left")
@ -139,7 +139,7 @@ function ZenMode:drawScoringInfo()
end
local sg = self.grid:checkSecretGrade()
if sg >= 7 or self.upstacked then
love.graphics.printf("SECRET GRADE", 240, 430, 180, "left")
love.graphics.printf("SECRET GRADE", text_x, 430, 180, "left")
end
love.graphics.setFont(font_3x5_3)
@ -151,7 +151,7 @@ function ZenMode:drawScoringInfo()
love.graphics.printf(self.b2b .. " / " .. self.combo, text_x, 180, 80, "left")
love.graphics.printf(self.bravos, text_x, 240, 80, "left")
if sg >= 7 or self.upstacked then
love.graphics.printf(self:getSecretGrade(sg), 240, 450, 180, "left")
love.graphics.printf(self:getSecretGrade(sg), text_x, 450, 180, "left")
end
love.graphics.setFont(font_3x5_4)