-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.lua
More file actions
47 lines (43 loc) · 1.06 KB
/
main.lua
File metadata and controls
47 lines (43 loc) · 1.06 KB
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
---------------------------
--Hexagonal field
---------------------------
--by spellsweaver@gmail.com
----------------------------
--1.3.5
----------------------------
--Libraries
local utf8 = require("utf8")
local states = require("states")
local geometry = require("hexagonalGeometryHelper")
require("fonts")
--Functions
local deepcopy = require("deepcopy")
local button = require("button")
--Models
local hexfieldModel = require("models/hexfieldModel")
local optionsModel = require("models/optionsModel")
local graphicsModel = require("models/graphicsModel")
local window = require("windowHelper")
function autosave()
hexfieldModel.save("autosave.hxm")
optionsModel.save()
return false
end
function love.load()
states.setup()
window.initialize()
geometry.recountDimensions()
love.window.setTitle ("Hexagonal field")
hexfieldModel.reset()
love.filesystem.createDirectory("maps")
graphicsModel.preload()
optionsModel.initialize()
states.switch("map")
end
function love.resize()
window.update()
geometry.recountDimensions()
end
function love.quit()
autosave()
end