-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.lua
86 lines (63 loc) · 1.52 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
require("helper.aliases")
class_base= require("helper.classic")
console =require("helper.console")
game =require("game")
debuger = {
on = function()
if debuger.no_print then
return
else
--print("Not able to turn debuger on , start in debug mode")
end
end,
off = function()
if debuger.no_print then
return
else
-- print("Not able to turn debuger off , start in debug mode")
end
end,
start = function() if debuger.no_print then return else print("Not able to start debuging , start in debug mode")end end,
no_print = nil
}
local maj,min,rev=love.getVersion()
if maj >= 11 then
require("helper.cindy").applyPatch()
end
function love.load(args)
for idx, arg in pairs(args) do
if arg == "-debug" then
debuger = require("mobdebug")
debuger.start()
debuger.off()
break
end
end
--love.window.setMode(80*tile_size,50*tile_size)
game.load()
--love.keyboard.setKeyRepeat(true)
end
function love.update(dt)
game.update(dt)
end
function love.draw()
game.draw()
end
function love.keypressed(k,s,r)
game.keyHandle(k,s,r,true)
if key == "escape" then
love.event.quit()
end
end
function love.keyreleased(k)
game.keyHandle(k,0,0,false)
end
function love.mousepressed(x,y,btn,t)
game.MouseHandle(x,y,btn,t)
end
function love.mousemoved(x,y,dx,dy)
game.MouseMoved(x,y)
end
function love.textinput(txt)
game.TextInput(txt)
end