再次更新录像加载和转换流程

This commit is contained in:
MrZ626
2021-06-28 15:44:50 +08:00
parent a1f32ca333
commit 6f74595305
4 changed files with 16 additions and 16 deletions

View File

@@ -409,8 +409,6 @@ function DATA.parseReplay(fileName,ifFull)
seed=metaData.seed,
setting=metaData.setting,
mod=metaData.mod,
modeName=("%s %s"):format(text.modes[metaData.mode][1],text.modes[metaData.mode][2]),
}
if ifFull then rep.data=fileData end
do return rep end

View File

@@ -128,21 +128,14 @@ local loadingThread=coroutine.wrap(function()
}YIELD()
upFloor()
for i=1,#MODES do
local m=MODES[i]--Mode template
local M=require("parts.modes."..m.name)--Mode file
MODES[m.name],MODES[i]=M
for k,v in next,m do
M[k]=v
end
M.records=FILE.load("record/"..m.name..".rec")or M.score and{}
if m.icon then
if not modeIcons[m.icon]then
modeIcons[m.icon]=gc.newImage("media/image/modeicon/"..m.icon..".png")
for _,M in next,MODES do
M.records=FILE.load("record/"..M.name..".rec")or M.score and{}
if M.icon then
if not modeIcons[M.icon]then
modeIcons[M.icon]=gc.newImage("media/image/modeicon/"..M.icon..".png")
end
M.icon=modeIcons[m.icon]
M.icon=modeIcons[M.icon]
end
if i%5==0 then YIELD()end
end
upFloor()

View File

@@ -17,7 +17,8 @@ local listBox=WIDGET.newListBox{name="list",x=50,y=50,w=1200,h=520,lineH=40,draw
if rep.available then
gc_setColor(.9,.9,1)
gc_print(rep.modeName,310,-2)
local modeName=text.modes[rep.mode]
gc_print(modeName and modeName[1].." "..modeName[2]or rep.mode,310,-2)
setFont(20)
gc_setColor(1,1,.8)
gc_print(rep.date,80,6)