mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-12-22 21:09:03 -06:00
Rulesets can offset next queue draws (read below)
A ruleset can now have offsets for where pieces should be drawn in queue No rulesets use this *yet*
This commit is contained in:
parent
818743fe77
commit
5d022f9037
@ -501,8 +501,8 @@ function GameMode:drawNextQueue(ruleset)
|
||||
local colourscheme = ({ruleset.colourscheme, ColourSchemes.Arika, ColourSchemes.TTC})[config.gamesettings.piece_colour]
|
||||
function drawPiece(piece, skin, offsets, pos_x, pos_y)
|
||||
for index, offset in pairs(offsets) do
|
||||
local x = offset.x + ruleset.spawn_positions[piece].x
|
||||
local y = offset.y + 4.7
|
||||
local x = offset.x + ruleset.draw_offsets[piece].x + ruleset.spawn_positions[piece].x
|
||||
local y = offset.y + ruleset.draw_offsets[piece].y + 4.7
|
||||
love.graphics.draw(blocks[skin][colourscheme[piece]], pos_x+x*16, pos_y+y*16)
|
||||
end
|
||||
end
|
||||
|
@ -48,6 +48,27 @@ PAIRS.big_spawn_positions = {
|
||||
[18] = { x=2, y=3 },
|
||||
}
|
||||
|
||||
PAIRS.draw_offsets = {
|
||||
[1] = { x=0, y=0 },
|
||||
[2] = { x=0, y=0 },
|
||||
[3] = { x=0, y=0 },
|
||||
[4] = { x=0, y=0 },
|
||||
[5] = { x=0, y=0 },
|
||||
[6] = { x=0, y=0 },
|
||||
[7] = { x=0, y=0 },
|
||||
[8] = { x=0, y=0 },
|
||||
[9] = { x=0, y=0 },
|
||||
[10] = { x=0, y=0 },
|
||||
[11] = { x=0, y=0 },
|
||||
[12] = { x=0, y=0 },
|
||||
[13] = { x=0, y=0 },
|
||||
[14] = { x=0, y=0 },
|
||||
[15] = { x=0, y=0 },
|
||||
[16] = { x=0, y=0 },
|
||||
[17] = { x=0, y=0 },
|
||||
[18] = { x=0, y=0 },
|
||||
}
|
||||
|
||||
PAIRS.next_sounds = {
|
||||
[1] = "I",
|
||||
[2] = "O",
|
||||
|
@ -34,6 +34,16 @@ Ruleset.next_sounds = {
|
||||
T = "T"
|
||||
}
|
||||
|
||||
Ruleset.draw_offsets = {
|
||||
I = { x=0, y=0 },
|
||||
J = { x=0, y=0 },
|
||||
L = { x=0, y=0 },
|
||||
O = { x=0, y=0 },
|
||||
S = { x=0, y=0 },
|
||||
T = { x=0, y=0 },
|
||||
Z = { x=0, y=0 },
|
||||
}
|
||||
|
||||
Ruleset.pieces = 7
|
||||
|
||||
-- Component functions.
|
||||
|
Loading…
Reference in New Issue
Block a user