mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-24 04:49:02 -06:00
Compare commits
No commits in common. "df19129228bb8c1845bd3c4766021c5e76be01ea" and "8d7ccae2bc7baf546e94717dd43572566a4bd596" have entirely different histories.
df19129228
...
8d7ccae2bc
@ -1 +1 @@
|
||||
version = "v0.3.3"
|
||||
version = "v0.3.2"
|
13
main.lua
13
main.lua
@ -1,4 +1,5 @@
|
||||
function love.load()
|
||||
math.randomseed(os.time())
|
||||
highscores = {}
|
||||
love.graphics.setDefaultFilter("linear", "nearest")
|
||||
require "load.rpc"
|
||||
@ -23,11 +24,6 @@ function love.load()
|
||||
-- used for screenshots
|
||||
GLOBAL_CANVAS = love.graphics.newCanvas()
|
||||
|
||||
-- aliasing to prevent people using math.random by accident
|
||||
math.random = love.math.random
|
||||
math.randomseed = love.math.setRandomSeed
|
||||
math.randomseed(os.time())
|
||||
|
||||
-- init config
|
||||
initConfig()
|
||||
|
||||
@ -289,16 +285,13 @@ function love.focus(f)
|
||||
end
|
||||
|
||||
function love.resize(w, h)
|
||||
GLOBAL_CANVAS:release()
|
||||
GLOBAL_CANVAS = love.graphics.newCanvas(w, h)
|
||||
GLOBAL_CANVAS:release()
|
||||
GLOBAL_CANVAS = love.graphics.newCanvas(w, h)
|
||||
end
|
||||
|
||||
-- higher values of TARGET_FPS will make the game run "faster"
|
||||
-- since the game is mostly designed for 60 FPS
|
||||
local TARGET_FPS = 60
|
||||
local FRAME_DURATION = 1.0 / TARGET_FPS
|
||||
|
||||
-- custom run function; optimizes game by syncing draw/update calls
|
||||
function love.run()
|
||||
if love.load then love.load(love.arg.parseGameArguments(arg), arg) end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user