-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata.lua
More file actions
44 lines (44 loc) · 1.15 KB
/
data.lua
File metadata and controls
44 lines (44 loc) · 1.15 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
require("lib/TSerial")
local Enums = require("enums")
local data = {
Scaling = 2,
BootType = Enums.BootNormal,
BackgroundType = Enums.BackgroundNormal,
LastScreen = Enums.Menu,
ActiveScreen = Enums.Menu,
NextScreen = Enums.Menu,
FadeType = Enums.FadeBlack,
Volume = 1.0,
InstantPrompts = false,
InvertScrollWheel = false,
Generate = {
Output = "",
PluginTestActive = false,
PluginTest = "",
Debugging = false,
TransitionsActive = false,
Transitions = {},
MinStream = "0.2",
MaxStream = "0.4",
Clips = "20",
Width = "640",
Height = "480",
FPS = "30",
Sources = {}
}
}
local info = love.filesystem.getInfo("settings.txt")
if not info then --does not exist
love.filesystem.write("settings.txt", "{}")
end
local unpack = TSerial.unpack(love.filesystem.read("settings.txt"), true)
for k,v in pairs(unpack) do data[k] = v end --combine data and unpack tables
if data.Scaling < 1 then
data.Scaling = 1
end
data.Version = {
Major = 1,
Minor = 3,
Patch = 3
}
return data