mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-24 19:49:02 -06:00
Compare commits
No commits in common. "83e197b5d6b40b3c92580402d4fe8ab07490779d" and "47a5a53e23c347e5923b0393470d6c92b0d4957f" have entirely different histories.
83e197b5d6
...
47a5a53e23
@ -40,8 +40,6 @@ function GameScene:update()
|
|||||||
self.game:update(inputs, self.ruleset)
|
self.game:update(inputs, self.ruleset)
|
||||||
self.game.grid:update()
|
self.game.grid:update()
|
||||||
DiscordRPC:update({
|
DiscordRPC:update({
|
||||||
details = self.game.rpc_details,
|
|
||||||
state = self.game.name,
|
|
||||||
largeImageKey = "ingame-"..self.game:getBackground().."00"
|
largeImageKey = "ingame-"..self.game:getBackground().."00"
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
@ -13,12 +13,11 @@ ConfigScene.options = {
|
|||||||
{"world_reverse", "A Button Rotation", false, {"Left", "Auto", "Right"}},
|
{"world_reverse", "A Button Rotation", false, {"Left", "Auto", "Right"}},
|
||||||
{"spawn_positions", "Spawn Positions", false, {"Per ruleset", "In field", "Out of field"}},
|
{"spawn_positions", "Spawn Positions", false, {"Per ruleset", "In field", "Out of field"}},
|
||||||
{"display_gamemode", "Debug Info", false, {"On", "Off"}},
|
{"display_gamemode", "Debug Info", false, {"On", "Off"}},
|
||||||
{"save_replay", "Save Replays", false, {"On", "Off"}},
|
|
||||||
{"smooth_movement", "Smooth Piece Drop", false, {"On", "Off"}},
|
|
||||||
{"diagonal_input", "Diagonal Input", false, {"On", "Off"}},
|
|
||||||
{"das_last_key", "DAS Last Key", false, {"Off", "On"}},
|
{"das_last_key", "DAS Last Key", false, {"Off", "On"}},
|
||||||
{"buffer_lock", "Buffer Drop Type", false, {"Off", "Hold", "Tap"}},
|
{"smooth_movement", "Smooth Piece Drop", false, {"On", "Off"}},
|
||||||
{"synchroes_allowed", "Synchroes", false, {"Per ruleset", "On", "Off"}},
|
{"synchroes_allowed", "Synchroes", false, {"Per ruleset", "On", "Off"}},
|
||||||
|
{"diagonal_input", "Diagonal Input", false, {"On", "Off"}},
|
||||||
|
{"buffer_lock", "Buffer Drop Type", false, {"Off", "Hold", "Tap"}},
|
||||||
{"sfx_volume", "SFX", true, "sfxSlider"},
|
{"sfx_volume", "SFX", true, "sfxSlider"},
|
||||||
{"bgm_volume", "BGM", true, "bgmSlider"},
|
{"bgm_volume", "BGM", true, "bgmSlider"},
|
||||||
}
|
}
|
||||||
@ -34,8 +33,8 @@ function ConfigScene:new()
|
|||||||
state = "Changing game settings",
|
state = "Changing game settings",
|
||||||
})
|
})
|
||||||
|
|
||||||
self.sfxSlider = newSlider(165, 420, 225, config.sfx_volume * 100, 0, 100, function(v) config.sfx_volume = v / 100 end, {width=20, knob="circle", track="roundrect"})
|
self.sfxSlider = newSlider(165, 400, 225, config.sfx_volume * 100, 0, 100, function(v) config.sfx_volume = v / 100 end, {width=20, knob="circle", track="roundrect"})
|
||||||
self.bgmSlider = newSlider(465, 420, 225, config.bgm_volume * 100, 0, 100, function(v) config.bgm_volume = v / 100 end, {width=20, knob="circle", track="roundrect"})
|
self.bgmSlider = newSlider(465, 400, 225, config.bgm_volume * 100, 0, 100, function(v) config.bgm_volume = v / 100 end, {width=20, knob="circle", track="roundrect"})
|
||||||
end
|
end
|
||||||
|
|
||||||
function ConfigScene:update()
|
function ConfigScene:update()
|
||||||
@ -59,7 +58,7 @@ function ConfigScene:render()
|
|||||||
if not ConfigScene.options[self.highlight][3] then
|
if not ConfigScene.options[self.highlight][3] then
|
||||||
love.graphics.rectangle("fill", 25, 98 + self.highlight * 20, 170, 22)
|
love.graphics.rectangle("fill", 25, 98 + self.highlight * 20, 170, 22)
|
||||||
else
|
else
|
||||||
love.graphics.rectangle("fill", 65 + (1+self.highlight-#self.options) * 300, 362, 215, 33)
|
love.graphics.rectangle("fill", 65 + (1+self.highlight-#self.options) * 300, 342, 215, 33)
|
||||||
end
|
end
|
||||||
|
|
||||||
love.graphics.setFont(font_3x5_2)
|
love.graphics.setFont(font_3x5_2)
|
||||||
@ -76,8 +75,8 @@ function ConfigScene:render()
|
|||||||
|
|
||||||
love.graphics.setColor(1, 1, 1, 1)
|
love.graphics.setColor(1, 1, 1, 1)
|
||||||
love.graphics.setFont(font_3x5_3)
|
love.graphics.setFont(font_3x5_3)
|
||||||
love.graphics.print("SFX Volume: " .. math.floor(self.sfxSlider:getValue()) .. "%", 75, 365)
|
love.graphics.print("SFX Volume: " .. math.floor(self.sfxSlider:getValue()) .. "%", 75, 345)
|
||||||
love.graphics.print("BGM Volume: " .. math.floor(self.bgmSlider:getValue()) .. "%", 375, 365)
|
love.graphics.print("BGM Volume: " .. math.floor(self.bgmSlider:getValue()) .. "%", 375, 345)
|
||||||
|
|
||||||
love.graphics.setColor(1, 1, 1, 0.75)
|
love.graphics.setColor(1, 1, 1, 0.75)
|
||||||
self.sfxSlider:draw()
|
self.sfxSlider:draw()
|
||||||
|
@ -51,8 +51,6 @@ function ReplayScene:update()
|
|||||||
self.game:update(input_copy, self.ruleset)
|
self.game:update(input_copy, self.ruleset)
|
||||||
self.game.grid:update()
|
self.game.grid:update()
|
||||||
DiscordRPC:update({
|
DiscordRPC:update({
|
||||||
details = "Viewing a replay",
|
|
||||||
state = self.game.name,
|
|
||||||
largeImageKey = "ingame-"..self.game:getBackground().."00"
|
largeImageKey = "ingame-"..self.game:getBackground().."00"
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
@ -121,15 +121,12 @@ function ReplaySelectScene:render()
|
|||||||
love.graphics.setFont(font_3x5_2)
|
love.graphics.setFont(font_3x5_2)
|
||||||
for idx, replay in ipairs(replays) do
|
for idx, replay in ipairs(replays) do
|
||||||
if(idx >= self.menu_state.replay-9 and idx <= self.menu_state.replay+9) then
|
if(idx >= self.menu_state.replay-9 and idx <= self.menu_state.replay+9) then
|
||||||
local display_string = os.date("%c", replay["timestamp"]).." - "..replay["mode"].." - "..replay["ruleset"]
|
local display_string = os.date("%c", replay["timestamp"]).." "..replay["mode"].." "..replay["ruleset"]
|
||||||
if replay["level"] ~= nil then
|
if replay["level"] ~= nil then
|
||||||
display_string = display_string.." - Level: "..replay["level"]
|
display_string = display_string.." Level: "..replay["level"]
|
||||||
end
|
end
|
||||||
if replay["timer"] ~= nil then
|
if replay["timer"] ~= nil then
|
||||||
display_string = display_string.." - Time: "..formatTime(replay["timer"])
|
display_string = display_string.." Time: "..formatTime(replay["timer"])
|
||||||
end
|
|
||||||
if #display_string > 75 then
|
|
||||||
display_string = display_string:sub(1, 75) .. "..."
|
|
||||||
end
|
end
|
||||||
love.graphics.printf(display_string, 6, (260 - 20*(self.menu_state.replay)) + 20 * idx, 640, "left")
|
love.graphics.printf(display_string, 6, (260 - 20*(self.menu_state.replay)) + 20 * idx, 640, "left")
|
||||||
end
|
end
|
||||||
|
@ -21,7 +21,7 @@ function GameMode:new(secret_inputs)
|
|||||||
self.random_low, self.random_high = love.math.getRandomSeed()
|
self.random_low, self.random_high = love.math.getRandomSeed()
|
||||||
self.random_state = love.math.getRandomState()
|
self.random_state = love.math.getRandomState()
|
||||||
self.secret_inputs = secret_inputs
|
self.secret_inputs = secret_inputs
|
||||||
self.save_replay = config.gamesettings.save_replay == 1
|
self.save_replay = true
|
||||||
|
|
||||||
self.grid = Grid(10, 24)
|
self.grid = Grid(10, 24)
|
||||||
self.randomizer = Randomizer()
|
self.randomizer = Randomizer()
|
||||||
|
Loading…
Reference in New Issue
Block a user