@@ -32,6 +32,7 @@ local listBox=WIDGET.newListBox{name='list',x=50,y=50,w=1200,h=520,lineH=40,draw
|
||||
end}
|
||||
|
||||
local scene={}
|
||||
local mods={}
|
||||
|
||||
local function _playRep(fileName)
|
||||
local rep=DATA.parseReplay(fileName,true)
|
||||
@@ -40,11 +41,12 @@ local function _playRep(fileName)
|
||||
elseif MODES[rep.mode] then
|
||||
GAME.seed=rep.seed
|
||||
GAME.setting=rep.setting
|
||||
TABLE.cut(GAME.mod)
|
||||
for i=1,#MODOPT do MODOPT[i].sel=0 end
|
||||
if #mods==0 then
|
||||
mods=GAME.mod
|
||||
end
|
||||
GAME.mod=TABLE.new(0,#MODOPT)
|
||||
for _,m in next,rep.mod do
|
||||
MODOPT[m[1]+1].sel=m[2]
|
||||
table.insert(GAME.mod,MODOPT[m[1]+1])
|
||||
GAME.mod[m[1]+1]=m[2]
|
||||
end
|
||||
GAME.rep={}
|
||||
DATA.pumpRecording(rep.data,GAME.rep)
|
||||
@@ -74,8 +76,9 @@ function scene.enter()
|
||||
_updateButtonVisibility()
|
||||
end
|
||||
function scene.leave()
|
||||
for i=1,#MODOPT do MODOPT[i].sel=0 end
|
||||
TABLE.cut(GAME.mod)
|
||||
if #mods>0 then
|
||||
GAME.mod,mods=mods,{}
|
||||
end
|
||||
end
|
||||
|
||||
function scene.keyDown(key)
|
||||
|
||||
Reference in New Issue
Block a user