-
Notifications
You must be signed in to change notification settings - Fork 0
/
colorframes.lua
46 lines (29 loc) · 672 Bytes
/
colorframes.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
saveColorFrames=function ()
--we save all frame numbers that have are flagged cfs
local cfs={}
for i=1,maxframe
do
if frames[i].cf==true then
table.insert(cfs,i)
end
end
love.filesystem.write(conf.prjfld..'projectcfs.lua',serialize(cfs))
end
loadColorFrames=function()
local cfs = {}
cfsFsInfo=love.filesystem.getInfo(conf.prjfld..'projectcfs.lua')
print('cfs file ')
print(cfsFsInfo)
if cfsFsInfo then
cfs=love.filesystem.load(conf.prjfld..'projectcfs.lua')()
else
-- highscores=defaulths()
print('no cfs file')
end
print(cfs)
for i,num in ipairs(cfs)
do
print('set frame '..num..' as cf')
frames[num].cf=true
end
end