-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.lua
44 lines (35 loc) · 962 Bytes
/
main.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
io.stdout:setvbuf("no")
-- lazy to do a util btw
function string.starts(String, Start)
return string.sub(String, 1, string.len(Start)) == Start
end
function table.has_value(tab, val)
for index, value in ipairs(tab) do
if value == val then
return true
end
end
return false
end
paths = require "src.paths"
utils = require "src.utils"
sprite = require "src.sprite"
local titlestate = require "src.states.titlestate"
lovebpm = require "libs.lovebpm"
xml = require("libs.xmlSimple").newParser()
-- json = require "libs.dkjson"
-- cache assets
confirmSnd = paths.getSound("confirmMenu")
function love.load()
titlestate.load()
end
function love.update(dt)
dt = math.min(dt, 1 / 30)
titlestate.update(dt)
end
function love.draw()
titlestate.draw()
end
function love.keypressed(key, scancode, isrepeat)
titlestate.keypressed(key, scancode, isrepeat)
end