diff --git a/conf.lua b/conf.lua index ca1b1826..63312656 100644 --- a/conf.lua +++ b/conf.lua @@ -32,4 +32,4 @@ function love.conf(t) M.graphics,M.font,M.image=true,true,true M.mouse,M.touch,M.keyboard,M.joystick=true,true,true,true M.physics=false -end +end \ No newline at end of file diff --git a/document/mode.txt b/document/mode.txt index 204498bf..8400c04b 100644 --- a/document/mode.txt +++ b/document/mode.txt @@ -82,9 +82,10 @@ missionKill false 是否开启强制任务 noInitSZO false 是否禁止SZO块开局,如果禁止,开局序列会自动跳过最多连续五个SZO - task NULL 每帧会*继续执行*的函数(或函数列表,依次执行,返回true会把自身从队列里清除)(初始化时会执行一次,可以用来设置场地等),输入玩家对象,注意:使用协程技术 + mesDisp NULL 需要在玩家侧边栏显示的信息(或函数列表,依次执行,可以显示在外面但是强烈不建议),输入玩家对象 dropPiece NULL 放一块后要执行的函数(或函数列表,依次执行),输入玩家对象 - eventSet false 使用预设事件套件名称(字符串),如果指定,套件中的事件将会替换上面这几个事件(如果有) + task NULL 每帧会*继续执行*的函数(或函数列表,依次执行,返回true会把自身从队列里清除)(初始化时会执行一次,可以用来设置场地等),输入玩家对象,注意:使用协程技术 + eventSet false 使用预设事件套件名称(字符串),和上面三个套件会叠加,使用时请小心,尽量不要同时指定太多组件 bg 'none' 背景,只能填写内置背景的名字 bgm 'race' 背景音乐名(或者列表随机,例如{'race','push'}),只能用内置音乐库的音乐名 @@ -94,11 +95,6 @@ 模式初始化函数,一般创建一个玩家即可 无输入 无输出 - mesDisp: - 必选 - 模式显示信息,是一个绘图函数,坐标系原点是玩家对象最左上角 - 输入玩家对象 - 无输出 score: 可选(不填就没有分数保存和计算) @@ -130,19 +126,12 @@ return{--返回一个table,你也可以在之前定义一些常量或者函数 color=COLOR.green,--颜色 env={--模式环境变量 drop=60,lock=60, - eventSet='checkLine_40', + eventSet='checkLine_40',--这个预设eventSet包含了dropPiece和mesDisp,就是40行需要的东西 bg='bg2',bgm='race', }, load=function()--模式加载函数,这里只生成了一个玩家,常用的单人模式可以不写,默认使用这个函数 PLY.newPlayer(1)--1是玩家编号,默认用户控制1号玩家 end, - mesDisp=function(P)--40行模式需要显示的信息 - setFont(55) - local r=40-P.stat.row - if r<0 then r=0 end - mStr(r,63,265)--把计算出来的剩余行数r显示出来 - PLY.draw.drawTargetLine(P,r)--使用自带的境界高度线绘制函数 - end, score=function(P)return{P.stat.time,P.stat.piece}end,--游戏结束时需要保存的本局关键信息 scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end,--把score返回的数据显示出来的方法 comp=function(a,b)return a[1]=100 then P:win('finish') diff --git a/parts/eventsets/checkLine_10.lua b/parts/eventsets/checkLine_10.lua index bbf505a5..b808f990 100644 --- a/parts/eventsets/checkLine_10.lua +++ b/parts/eventsets/checkLine_10.lua @@ -1,4 +1,11 @@ return{ + mesDisp=function(P) + setFont(55) + local r=10-P.stat.row + if r<0 then r=0 end + mStr(r,63,265) + PLY.draw.drawTargetLine(P,r) + end, dropPiece=function(P) if P.stat.row>=10 then P:win('finish') diff --git a/parts/eventsets/checkLine_100.lua b/parts/eventsets/checkLine_100.lua index 337c196e..338d7be7 100644 --- a/parts/eventsets/checkLine_100.lua +++ b/parts/eventsets/checkLine_100.lua @@ -1,4 +1,11 @@ return{ + mesDisp=function(P) + setFont(55) + local r=100-P.stat.row + if r<0 then r=0 end + mStr(r,63,265) + PLY.draw.drawTargetLine(P,r) + end, dropPiece=function(P) if P.stat.row>=100 then P:win('finish') diff --git a/parts/eventsets/checkLine_1000.lua b/parts/eventsets/checkLine_1000.lua index c9e6536a..a42b4141 100644 --- a/parts/eventsets/checkLine_1000.lua +++ b/parts/eventsets/checkLine_1000.lua @@ -1,4 +1,11 @@ return{ + mesDisp=function(P) + setFont(55) + local r=1000-P.stat.row + if r<0 then r=0 end + mStr(r,63,265) + PLY.draw.drawTargetLine(P,r) + end, dropPiece=function(P) if P.stat.row>=1000 then P:win('finish') diff --git a/parts/eventsets/checkLine_20.lua b/parts/eventsets/checkLine_20.lua index b5418596..6d2016a9 100644 --- a/parts/eventsets/checkLine_20.lua +++ b/parts/eventsets/checkLine_20.lua @@ -1,4 +1,11 @@ return{ + mesDisp=function(P) + setFont(55) + local r=20-P.stat.row + if r<0 then r=0 end + mStr(r,63,265) + PLY.draw.drawTargetLine(P,r) + end, dropPiece=function(P) if P.stat.row>=20 then P:win('finish') diff --git a/parts/eventsets/checkLine_200.lua b/parts/eventsets/checkLine_200.lua index 919a31d1..be0b3161 100644 --- a/parts/eventsets/checkLine_200.lua +++ b/parts/eventsets/checkLine_200.lua @@ -1,4 +1,11 @@ return{ + mesDisp=function(P) + setFont(55) + local r=200-P.stat.row + if r<0 then r=0 end + mStr(r,63,265) + PLY.draw.drawTargetLine(P,r) + end, dropPiece=function(P) if P.stat.row>=200 then P:win('finish') diff --git a/parts/eventsets/checkLine_40.lua b/parts/eventsets/checkLine_40.lua index 43e704af..c64995ec 100644 --- a/parts/eventsets/checkLine_40.lua +++ b/parts/eventsets/checkLine_40.lua @@ -1,4 +1,11 @@ return{ + mesDisp=function(P) + setFont(55) + local r=40-P.stat.row + if r<0 then r=0 end + mStr(r,63,265) + PLY.draw.drawTargetLine(P,r) + end, dropPiece=function(P) if P.stat.row>=40 then P:win('finish') diff --git a/parts/eventsets/checkLine_400.lua b/parts/eventsets/checkLine_400.lua index b8b34921..1244ec7a 100644 --- a/parts/eventsets/checkLine_400.lua +++ b/parts/eventsets/checkLine_400.lua @@ -1,4 +1,11 @@ return{ + mesDisp=function(P) + setFont(55) + local r=400-P.stat.row + if r<0 then r=0 end + mStr(r,63,265) + PLY.draw.drawTargetLine(P,r) + end, dropPiece=function(P) if P.stat.row>=400 then P:win('finish') diff --git a/parts/eventsets/classic_fast.lua b/parts/eventsets/classic_fast.lua index e036773c..1e9e5e02 100644 --- a/parts/eventsets/classic_fast.lua +++ b/parts/eventsets/classic_fast.lua @@ -1,5 +1,30 @@ return{ + mesDisp=function(P) + setFont(75) + local r=P.modeData.target*.1 + mStr(r<11 and 18 or r<22 and r+8 or("%02x"):format(r*10-220),63,210) + mText(drawableText.speedLV,63,290) + PLY.draw.drawProgress(P.stat.row,P.modeData.target) + end, task=function(P) + P.gameEnv.das=16 + P.gameEnv.arr=6 + P.gameEnv.sddas=2 + P.gameEnv.sdarr=2 + P.gameEnv.irs=false + P.gameEnv.ims=false + P.gameEnv.drop=3 + P.gameEnv.lock=3 + P.gameEnv.wait=10 + P.gameEnv.fall=25 + P.gameEnv.fieldH=19 + P.gameEnv.nextCount=1 + P.gameEnv.holdCount=0 + P.gameEnv.RS='Classic' + P.gameEnv.sequence='rnd' + P.gameEnv.noTele=true + P.gameEnv.keyCancel={5,6} + P.modeData.target=10 end, dropPiece=function(P) diff --git a/parts/eventsets/defender_l.lua b/parts/eventsets/defender_l.lua index 559a32f1..a90a6318 100644 --- a/parts/eventsets/defender_l.lua +++ b/parts/eventsets/defender_l.lua @@ -1,4 +1,11 @@ return{ + mesDisp=function(P) + setFont(55) + mStr(P.modeData.wave,63,200) + mStr(P.modeData.rpm,63,320) + mText(drawableText.wave,63,260) + mText(drawableText.rpm,63,380) + end, task=function(P) while true do YIELD() diff --git a/parts/eventsets/defender_n.lua b/parts/eventsets/defender_n.lua index 019b968d..9eadcfc5 100644 --- a/parts/eventsets/defender_n.lua +++ b/parts/eventsets/defender_n.lua @@ -1,4 +1,11 @@ return{ + mesDisp=function(P) + setFont(55) + mStr(P.modeData.wave,63,200) + mStr(P.modeData.rpm,63,320) + mText(drawableText.wave,63,260) + mText(drawableText.rpm,63,380) + end, task=function(P) while true do YIELD() diff --git a/parts/eventsets/dig_h.lua b/parts/eventsets/dig_h.lua index 0e10b398..7bf93d95 100644 --- a/parts/eventsets/dig_h.lua +++ b/parts/eventsets/dig_h.lua @@ -1,4 +1,9 @@ return{ + mesDisp=function(P) + setFont(60) + mStr(P.modeData.wave,63,310) + mText(drawableText.wave,63,375) + end, task=function(P) while true do YIELD() diff --git a/parts/eventsets/dig_u.lua b/parts/eventsets/dig_u.lua index 2b4efd42..afa24b01 100644 --- a/parts/eventsets/dig_u.lua +++ b/parts/eventsets/dig_u.lua @@ -1,4 +1,9 @@ return{ + mesDisp=function(P) + setFont(60) + mStr(P.modeData.wave,63,310) + mText(drawableText.wave,63,375) + end, task=function(P) while true do YIELD() diff --git a/parts/eventsets/marathon_bfmax.lua b/parts/eventsets/marathon_bfmax.lua index 507d8eb1..4bfd9362 100644 --- a/parts/eventsets/marathon_bfmax.lua +++ b/parts/eventsets/marathon_bfmax.lua @@ -1,6 +1,10 @@ local dropSpeed={50,40,30,25,20,15,12,9,7,5,4,3,2,1,1,.5,.5,.25,.25} return{ + mesDisp=function(P) + PLY.draw.drawProgress(P.stat.row,P.modeData.target) + PLY.draw.drawTargetLine(P,200-P.stat.row) + end, task=function(P) P.gameEnv.drop=60 P.gameEnv.wait=8 diff --git a/parts/eventsets/marathon_h.lua b/parts/eventsets/marathon_h.lua index c38fbabf..aaebbaea 100644 --- a/parts/eventsets/marathon_h.lua +++ b/parts/eventsets/marathon_h.lua @@ -1,5 +1,9 @@ return { + mesDisp=function(P) + PLY.draw.drawProgress(P.stat.row,P.modeData.target) + PLY.draw.drawTargetLine(P,200-P.stat.row) + end, task=function(P) P.gameEnv.drop=.5 P.gameEnv.wait=8 diff --git a/parts/eventsets/marathon_n.lua b/parts/eventsets/marathon_n.lua index c6b9ba45..bbbdc62d 100644 --- a/parts/eventsets/marathon_n.lua +++ b/parts/eventsets/marathon_n.lua @@ -2,6 +2,10 @@ local dropSpeed={50,40,30,24,18,14,10,8,6,5,4,3,2,1,1,.5,.5,.25,.25} return { + mesDisp=function(P) + PLY.draw.drawProgress(P.stat.row,P.modeData.target) + PLY.draw.drawTargetLine(P,200-P.stat.row) + end, task=function(P) P.gameEnv.drop=60 P.gameEnv.wait=8 diff --git a/parts/eventsets/master_ex.lua b/parts/eventsets/master_ex.lua index 9907131a..ee3fa0d6 100644 --- a/parts/eventsets/master_ex.lua +++ b/parts/eventsets/master_ex.lua @@ -2,6 +2,17 @@ local sectionName={"D","C","B","A","A+","S-","S","S+","S+","SS","SS","U","U","X" local passPoint=16 return{ + mesDisp=function(P) + mText(drawableText.line,63,300) + mText(drawableText.techrash,63,420) + mText(drawableText.grade,63,170) + setFont(55) + mStr(P.modeData.rankName,63,110) + setFont(20) + mStr(("%.1f"):format(P.modeData.rankPoint/10),63,198) + setFont(75) + mStr(P.stat.clears[4],63,340) + end, dropPiece=function(P) if P.modeData.rankPoint<140-passPoint then--If Less then X local R=#P.clearedRow diff --git a/parts/eventsets/master_final.lua b/parts/eventsets/master_final.lua index 30383e5a..d6a9dc16 100644 --- a/parts/eventsets/master_final.lua +++ b/parts/eventsets/master_final.lua @@ -1,4 +1,7 @@ return{ + mesDisp=function(P) + PLY.draw.drawProgress(P.modeData.pt,P.modeData.target) + end, dropPiece=function(P) local D=P.modeData diff --git a/parts/eventsets/master_h.lua b/parts/eventsets/master_h.lua index 7cd7ca14..4c86039c 100644 --- a/parts/eventsets/master_h.lua +++ b/parts/eventsets/master_h.lua @@ -3,6 +3,9 @@ local death_wait={10,9, 8, 7,6, 6,6,5,5,4} local death_fall={10,9, 8, 7,6, 6,5,5,4,4} return{ + mesDisp=function(P) + PLY.draw.drawProgress(P.modeData.pt,P.modeData.target) + end, dropPiece=function(P) local D=P.modeData diff --git a/parts/eventsets/master_l.lua b/parts/eventsets/master_l.lua index bb1ccba6..d915e613 100644 --- a/parts/eventsets/master_l.lua +++ b/parts/eventsets/master_l.lua @@ -3,6 +3,9 @@ local rush_wait={12,10, 9, 8, 7} local rush_fall={18,16,14,13,12} return{ + mesDisp=function(P) + PLY.draw.drawProgress(P.modeData.pt,P.modeData.target) + end, dropPiece=function(P) local D=P.modeData diff --git a/parts/eventsets/master_n.lua b/parts/eventsets/master_n.lua index d0ac4d8f..22550013 100644 --- a/parts/eventsets/master_n.lua +++ b/parts/eventsets/master_n.lua @@ -3,6 +3,9 @@ local rush_wait={12,11,11,10,10, 10,10, 9, 9, 9} local rush_fall={18,16,14,13,12, 12,11,11,10,10} return{ + mesDisp=function(P) + PLY.draw.drawProgress(P.modeData.pt,P.modeData.target) + end, dropPiece=function(P) local D=P.modeData diff --git a/parts/eventsets/master_ph.lua b/parts/eventsets/master_ph.lua index a240507c..510ce64a 100644 --- a/parts/eventsets/master_ph.lua +++ b/parts/eventsets/master_ph.lua @@ -1,5 +1,8 @@ return { + mesDisp=function(P) + PLY.draw.drawProgress(P.modeData.pt,P.modeData.target) + end, dropPiece=function(P) local p=P.modeData.pt+P.lastPiece.row if p>=P.modeData.target then diff --git a/parts/eventsets/master_u.lua b/parts/eventsets/master_u.lua index 6d979d1c..c26f5f3f 100644 --- a/parts/eventsets/master_u.lua +++ b/parts/eventsets/master_u.lua @@ -3,6 +3,9 @@ local death_wait={10, 9, 8,7,6, 6,5,4,4,3} local death_fall={10, 9, 8,7,6, 5,5,4,3,3} return{ + mesDisp=function(P) + PLY.draw.drawProgress(P.modeData.pt,P.modeData.target) + end, dropPiece=function(P) local D=P.modeData diff --git a/parts/eventsets/pc_inf.lua b/parts/eventsets/pc_inf.lua index 7b0c0df4..f48995fa 100644 --- a/parts/eventsets/pc_inf.lua +++ b/parts/eventsets/pc_inf.lua @@ -1,4 +1,9 @@ return{ + mesDisp=function(P) + setFont(60) + mStr(P.stat.pc,63,340) + mText(drawableText.pc,63,410) + end, task=function(P) P.gameEnv.heightLimit=4 end, diff --git a/parts/eventsets/pctrain_l.lua b/parts/eventsets/pctrain_l.lua index 86150772..fe300ac2 100644 --- a/parts/eventsets/pctrain_l.lua +++ b/parts/eventsets/pctrain_l.lua @@ -41,6 +41,11 @@ local function check(P) end end return{ + mesDisp=function(P) + setFont(60) + mStr(P.stat.pc,63,340) + mText(drawableText.pc,63,410) + end, dropPiece=check, task=check, } \ No newline at end of file diff --git a/parts/eventsets/pctrain_n.lua b/parts/eventsets/pctrain_n.lua index 53772e35..b3e254d4 100644 --- a/parts/eventsets/pctrain_n.lua +++ b/parts/eventsets/pctrain_n.lua @@ -32,6 +32,11 @@ local function check(P) end end return{ + mesDisp=function(P) + setFont(60) + mStr(P.stat.pc,63,340) + mText(drawableText.pc,63,410) + end, dropPiece=check, task=check, } \ No newline at end of file diff --git a/parts/eventsets/rhythm_e.lua b/parts/eventsets/rhythm_e.lua index 6a68afa6..a92dedd9 100644 --- a/parts/eventsets/rhythm_e.lua +++ b/parts/eventsets/rhythm_e.lua @@ -1,6 +1,21 @@ +local gc=love.graphics local dropSpeed={[0]=40,33,27,20,16,12,11,10,9,8,7,6,5,4,3,3,2,2,1,1} return{ + mesDisp=function(P) + PLY.draw.drawProgress(P.stat.row,P.modeData.target) + + setFont(30) + mStr(P.modeData.bpm,63,178) + + gc.setLineWidth(4) + gc.circle('line',63,200,30) + + local beat=P.modeData.counter/P.modeData.beatFrame + gc.setColor(1,1,1,1-beat) + gc.setLineWidth(3) + gc.circle('line',63,200,30+45*beat) + end, dropPiece=function(P) if P.stat.row>=P.modeData.target then if P.modeData.target==200 then diff --git a/parts/eventsets/rhythm_h.lua b/parts/eventsets/rhythm_h.lua index 4d65db4c..6dde33ac 100644 --- a/parts/eventsets/rhythm_h.lua +++ b/parts/eventsets/rhythm_h.lua @@ -1,6 +1,21 @@ +local gc=love.graphics local dropSpeed={[0]=30,26,23,20,17,14,12,10,8,6,5,4,3,2,1,1,.5,.5,.25,.25} return{ + mesDisp=function(P) + PLY.draw.drawProgress(P.stat.row,P.modeData.target) + + setFont(30) + mStr(P.modeData.bpm,63,178) + + gc.setLineWidth(4) + gc.circle('line',63,200,30) + + local beat=P.modeData.counter/P.modeData.beatFrame + gc.setColor(1,1,1,1-beat) + gc.setLineWidth(3) + gc.circle('line',63,200,30+45*beat) + end, dropPiece=function(P) if P.stat.row>=P.modeData.target then if P.modeData.target==200 then diff --git a/parts/eventsets/rhythm_u.lua b/parts/eventsets/rhythm_u.lua index b0095234..41bab773 100644 --- a/parts/eventsets/rhythm_u.lua +++ b/parts/eventsets/rhythm_u.lua @@ -1,4 +1,20 @@ +local gc=love.graphics + return{ + mesDisp=function(P) + PLY.draw.drawProgress(P.stat.row,P.modeData.target) + + setFont(30) + mStr(P.modeData.bpm,63,178) + + gc.setLineWidth(4) + gc.circle('line',63,200,30) + + local beat=P.modeData.counter/P.modeData.beatFrame + gc.setColor(1,1,1,1-beat) + gc.setLineWidth(3) + gc.circle('line',63,200,30+45*beat) + end, dropPiece=function(P) if P.stat.row>=P.modeData.target then if P.modeData.target==200 then diff --git a/parts/eventsets/survivor_e.lua b/parts/eventsets/survivor_e.lua index 10448b54..f4fdb2be 100644 --- a/parts/eventsets/survivor_e.lua +++ b/parts/eventsets/survivor_e.lua @@ -1,4 +1,9 @@ return{ + mesDisp=function(P) + setFont(60) + mStr(P.modeData.wave,63,310) + mText(drawableText.wave,63,375) + end, task=function(P) while true do YIELD() diff --git a/parts/eventsets/survivor_h.lua b/parts/eventsets/survivor_h.lua index 2d8792fe..53ee6c4d 100644 --- a/parts/eventsets/survivor_h.lua +++ b/parts/eventsets/survivor_h.lua @@ -1,4 +1,9 @@ return{ + mesDisp=function(P) + setFont(60) + mStr(P.modeData.wave,63,310) + mText(drawableText.wave,63,375) + end, task=function(P) while true do YIELD() diff --git a/parts/eventsets/survivor_l.lua b/parts/eventsets/survivor_l.lua index a78315f9..c9a45b2c 100644 --- a/parts/eventsets/survivor_l.lua +++ b/parts/eventsets/survivor_l.lua @@ -1,4 +1,9 @@ return{ + mesDisp=function(P) + setFont(60) + mStr(P.modeData.wave,63,310) + mText(drawableText.wave,63,375) + end, task=function(P) while true do YIELD() diff --git a/parts/eventsets/survivor_n.lua b/parts/eventsets/survivor_n.lua index c57b325e..5aa163b5 100644 --- a/parts/eventsets/survivor_n.lua +++ b/parts/eventsets/survivor_n.lua @@ -1,4 +1,9 @@ return{ + mesDisp=function(P) + setFont(60) + mStr(P.modeData.wave,63,310) + mText(drawableText.wave,63,375) + end, task=function(P) while true do YIELD() diff --git a/parts/eventsets/survivor_u.lua b/parts/eventsets/survivor_u.lua index d343412f..1f789b1e 100644 --- a/parts/eventsets/survivor_u.lua +++ b/parts/eventsets/survivor_u.lua @@ -1,4 +1,9 @@ return{ + mesDisp=function(P) + setFont(60) + mStr(P.modeData.wave,63,310) + mText(drawableText.wave,63,375) + end, task=function(P) while true do YIELD() diff --git a/parts/eventsets/tsd_e.lua b/parts/eventsets/tsd_e.lua new file mode 100644 index 00000000..8cda1dd2 --- /dev/null +++ b/parts/eventsets/tsd_e.lua @@ -0,0 +1,20 @@ +return{ + mesDisp=function(P) + setFont(60) + mStr(P.modeData.tsd,63,250) + mText(drawableText.tsd,63,315) + end, + dropPiece=function(P) + local C=P.lastPiece + if C.row>0 then + if C.id==5 and C.row==2 and C.spin then + P.modeData.tsd=P.modeData.tsd+1 + else + P:lose() + end + end + end, + task=function(P) + P.modeData.history={} + end, +} \ No newline at end of file diff --git a/parts/eventsets/tsd_h.lua b/parts/eventsets/tsd_h.lua index d49d0440..2aadcd5e 100644 --- a/parts/eventsets/tsd_h.lua +++ b/parts/eventsets/tsd_h.lua @@ -1,4 +1,18 @@ +local gc=love.graphics + return{ + mesDisp=function(P) + setFont(60) + mStr(P.modeData.tsd,63,250) + mText(drawableText.tsd,63,315) + local L=P.modeData.history + if L[1]and L[1]==L[2]and L[1]==L[3]then + PLY.draw.applyField(P) + gc.setColor(1,.5,.5,.2) + gc.rectangle('fill',30*L[1]-30,0,30,600) + PLY.draw.cancelField(P) + end + end, dropPiece=function(P) local C=P.lastPiece if C.row>0 then diff --git a/parts/eventsets/tsd_u.lua b/parts/eventsets/tsd_u.lua index c5dc5c2e..52450ce1 100644 --- a/parts/eventsets/tsd_u.lua +++ b/parts/eventsets/tsd_u.lua @@ -1,4 +1,18 @@ +local gc=love.graphics + return{ + mesDisp=function(P) + setFont(60) + mStr(P.modeData.tsd,63,250) + mText(drawableText.tsd,63,315) + PLY.draw.applyField(P) + local L=P.modeData.history + for i=1,#L do + gc.setColor(1,.5,.5,.3-i*.05) + gc.rectangle('fill',30*L[i]-30,0,30,600) + end + PLY.draw.cancelField(P) + end, dropPiece=function(P) local C=P.lastPiece if C.row>0 then diff --git a/parts/eventsets/ultra.lua b/parts/eventsets/ultra.lua index 2df9e687..d29d124f 100644 --- a/parts/eventsets/ultra.lua +++ b/parts/eventsets/ultra.lua @@ -1,6 +1,14 @@ +local gc=love.graphics local warnTime={60,90,105,115,116,117,118,119,120} return{ + mesDisp=function(P) + gc.setLineWidth(2) + gc.rectangle('line',55,110,32,402) + local T=P.stat.frame/60/120 + gc.setColor(2*T,2-2*T,.2) + gc.rectangle('fill',56,511,30,(T-1)*400) + end, task=function(P) P.modeData.stage=1 while true do diff --git a/parts/globalTables.lua b/parts/globalTables.lua index bb9ffc84..eb344cf6 100644 --- a/parts/globalTables.lua +++ b/parts/globalTables.lua @@ -227,6 +227,8 @@ ROOMENV={ b2bKill=false, easyFresh=true, deepDrop=false, + + eventSet="X", } REPLAY={}--Replay objects (not include stream data) diff --git a/parts/modes/attacker_h.lua b/parts/modes/attacker_h.lua index fa410783..b921a69a 100644 --- a/parts/modes/attacker_h.lua +++ b/parts/modes/attacker_h.lua @@ -8,13 +8,6 @@ return{ eventSet='attacker_h', bg='rainbow2',bgm='shining terminal', }, - mesDisp=function(P) - setFont(55) - mStr(P.modeData.wave,63,200) - mStr("22",63,320) - mText(drawableText.wave,63,260) - mText(drawableText.nextWave,63,380) - end, score=function(P)return{P.modeData.wave,P.stat.time}end, scoreDisp=function(D)return D[1].." Waves "..STRING.time(D[2])end, comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]=200 then diff --git a/parts/modes/marathon_h.lua b/parts/modes/marathon_h.lua index 376ac9ec..08bfd474 100644 --- a/parts/modes/marathon_h.lua +++ b/parts/modes/marathon_h.lua @@ -8,10 +8,6 @@ return{ bg='cubes',bgm='push', }, slowMark=true, - mesDisp=function(P) - PLY.draw.drawProgress(P.stat.row,P.modeData.target) - PLY.draw.drawTargetLine(P,200-P.stat.row) - end, score=function(P)return{math.min(P.stat.row,200),P.stat.time}end, scoreDisp=function(D)return D[1].." Lines "..STRING.time(D[2])end, comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]>b[2]end, diff --git a/parts/modes/master_final.lua b/parts/modes/master_final.lua index 9f287198..977271b5 100644 --- a/parts/modes/master_final.lua +++ b/parts/modes/master_final.lua @@ -10,9 +10,6 @@ return{ bg='lightning',bgm='rectification', }, slowMark=true, - mesDisp=function(P) - PLY.draw.drawProgress(P.modeData.pt,P.modeData.target) - end, score=function(P)return{P.modeData.pt,P.stat.time}end, scoreDisp=function(D)return D[1].."P "..STRING.time(D[2])end, comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]0 then - if C.id==5 and C.row==2 and C.spin then - P.modeData.tsd=P.modeData.tsd+1 - else - P:lose() - end - end -end - return{ color=COLOR.green, env={ drop=1e99,lock=1e99, infHold=true, - dropPiece=check_tsd, ospin=false, + eventSet='tsd_e', bg='matrix',bgm='vapor', }, - mesDisp=function(P) - setFont(60) - mStr(P.modeData.tsd,63,250) - mText(drawableText.tsd,63,315) - end, score=function(P)return{P.modeData.tsd,P.stat.time}end, scoreDisp=function(D)return D[1].."TSD "..STRING.time(D[2])end, comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]end, diff --git a/parts/modes/zen.lua b/parts/modes/zen.lua index e2b912c4..b94662d6 100644 --- a/parts/modes/zen.lua +++ b/parts/modes/zen.lua @@ -6,11 +6,6 @@ return{ eventSet='checkLine_200', bg='bg2',bgm='venus', }, - mesDisp=function(P) - setFont(70) - local R=200-P.stat.row - mStr(R>=0 and R or 0,63,265) - end, score=function(P)return{P.stat.score}end, scoreDisp=function(D)return tostring(D[1])end, comp=function(a,b)return a[1]>b[1]end, diff --git a/parts/player/draw.lua b/parts/player/draw.lua index b6b8df87..aeb13406 100644 --- a/parts/player/draw.lua +++ b/parts/player/draw.lua @@ -891,9 +891,9 @@ function draw.norm(P,repMode) ;(P.type=='remote'and _drawFinesseCombo_remote or _drawFinesseCombo_norm)(P) --Mode informations - if GAME.curMode.mesDisp then - gc_setColor(.97,.97,.97) - GAME.curMode.mesDisp(P,repMode) + gc_setColor(.97,.97,.97) + for i=1,#ENV.mesDisp do + ENV.mesDisp[i](P) end if P.frameRun<180 then _drawStartCounter(P.frameRun)end diff --git a/parts/player/gameEnv0.lua b/parts/player/gameEnv0.lua index 1f081517..d6d07b18 100644 --- a/parts/player/gameEnv0.lua +++ b/parts/player/gameEnv0.lua @@ -59,9 +59,10 @@ return{ mindas=0,minarr=0,minsdarr=0, noInitSZO=false, - task={}, + mesDisp={}, dropPiece={}, - eventSet=false, + task={}, + eventSet="X", bg='none',bgm='race', allowMod=true, diff --git a/parts/player/init.lua b/parts/player/init.lua index b6ca0722..b7c70b38 100644 --- a/parts/player/init.lua +++ b/parts/player/init.lua @@ -265,6 +265,16 @@ local function _loadRemoteEnv(P,confStr)--Load gameEnv end end end +local function _mergeFuncTable(f,L) + if type(f)=='function'then + ins(L,f) + elseif type(f)=='table'then + for i=1,#f do + ins(L,f[i]) + end + end + return L +end local function _applyGameEnv(P)--Finish gameEnv processing local ENV=P.gameEnv @@ -351,13 +361,19 @@ local function _applyGameEnv(P)--Finish gameEnv processing if ENV.center==0 then ENV.center=false end if ENV.lineNum==0 then ENV.lineNum=false end + --Apply events + ENV.mesDisp=_mergeFuncTable(ENV.mesDisp,{}) + ENV.dropPiece=_mergeFuncTable(ENV.dropPiece,{}) + ENV.task=_mergeFuncTable(ENV.task,{}) + --Apply eventSet - if ENV.eventSet then + if ENV.eventSet and ENV.eventSet~="X"then if type(ENV.eventSet)=='string'then local eventSet=require('parts.eventsets.'..ENV.eventSet) if eventSet then for k,v in next,eventSet do - ENV[k]=v + assert(type(ENV[k])=='table',"No eventSet method: "..k) + _mergeFuncTable(v,ENV[k]) end else MES.new('warn',"No event set called: "..ENV.eventSet) @@ -367,9 +383,8 @@ local function _applyGameEnv(P)--Finish gameEnv processing end end - --Apply events - if type(ENV.dropPiece)=='function'then ENV.dropPiece={ENV.dropPiece} else ENV.dropPiece=TABLE.shift(ENV.dropPiece) end - if type(ENV.task)=='function'then P:newTask(ENV.task) else for i=1,#ENV.task do P:newTask(ENV.task[i])end end + --Load tasks + for i=1,#ENV.task do P:newTask(ENV.task[i])end end ---------------------------------------------------- diff --git a/parts/scenes/customGame.lua b/parts/scenes/customGame.lua index 37b169c0..2cb09186 100644 --- a/parts/scenes/customGame.lua +++ b/parts/scenes/customGame.lua @@ -23,6 +23,7 @@ local sList={ lock={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99}, wait={0,1,2,3,4,5,6,7,8,10,15,20,30,60}, fall={0,1,2,3,4,5,6,7,8,10,15,20,30,60}, + eventSet={'X','attacker_h','attacker_u','backfire_0','backfire_120','backfire_30','backfire_60','checkAttack_100','checkLine_10','checkLine_20','checkLine_40','checkLine_100','checkLine_200','checkLine_400','checkLine_1000','checkTurn_1','checkTurn_7','classic_fast','defender_n','defender_l','dig_h','dig_u','marathon_n','marathon_h','master_ex','master_final','master_h','master_n','master_ph','pctrain_n','pctrain_l','pc_inf','rhythm_e','rhythm_h','rhythm_u','survivor_e','survivor_n','survivor_h','survivor_l','survivor_u','tsd_e','tsd_h','tsd_u','ultra'}, } local scene={} @@ -193,7 +194,7 @@ function scene.draw() gc.setColor(1,1,1,sure) gc.draw(TEXTURE.sure,920,50) end - gc.translate(0, WIDGET.scrollPos) + gc.translate(0,WIDGET.scrollPos) end scene.widgetScrollHeight=400 @@ -213,21 +214,21 @@ scene.widgetList={ WIDGET.newText{name="defSeq", x=610,y=220,align='L',color='H',hideF=function()return BAG[1]end}, --Selectors - WIDGET.newSelector{name="opponent", x=170,y=330,w=260,color='R',list=sList.opponent, disp=CUSval("opponent"), code=CUSsto("opponent")}, - WIDGET.newSelector{name="life", x=170,y=410,w=260,color='R',list=sList.life, disp=CUSval("life"), code=CUSsto("life")}, - WIDGET.newSelector{name="pushSpeed", x=170,y=520,w=260,color='V',list=sList.pushSpeed, disp=CUSval("pushSpeed"), code=CUSsto("pushSpeed")}, - WIDGET.newSelector{name="garbageSpeed",x=170,y=600,w=260,color='V',list=sList.pushSpeed, disp=CUSval("garbageSpeed"),code=CUSsto("garbageSpeed")}, - WIDGET.newSelector{name="visible", x=170,y=710,w=260,color='lB',list=sList.visible, disp=CUSval("visible"), code=CUSsto("visible")}, - WIDGET.newSelector{name="freshLimit", x=170,y=790,w=260,color='lB',list=sList.freshLimit,disp=CUSval("freshLimit"), code=CUSsto("freshLimit")}, + WIDGET.newSelector{name="opponent", x=170,y=330,w=260,color='R',list=sList.opponent, disp=CUSval('opponent'), code=CUSsto('opponent')}, + WIDGET.newSelector{name="life", x=170,y=410,w=260,color='R',list=sList.life, disp=CUSval('life'), code=CUSsto('life')}, + WIDGET.newSelector{name="pushSpeed", x=170,y=520,w=260,color='V',list=sList.pushSpeed, disp=CUSval('pushSpeed'), code=CUSsto('pushSpeed')}, + WIDGET.newSelector{name="garbageSpeed",x=170,y=600,w=260,color='V',list=sList.pushSpeed, disp=CUSval('garbageSpeed'),code=CUSsto('garbageSpeed')}, + WIDGET.newSelector{name="visible", x=170,y=710,w=260,color='lB',list=sList.visible, disp=CUSval('visible'), code=CUSsto('visible')}, + WIDGET.newSelector{name="freshLimit", x=170,y=790,w=260,color='lB',list=sList.freshLimit,disp=CUSval('freshLimit'), code=CUSsto('freshLimit')}, - WIDGET.newSelector{name="fieldH", x=450,y=600,w=260,color='N',list=sList.fieldH, disp=CUSval("fieldH"), code=CUSsto("fieldH")}, - WIDGET.newSelector{name="heightLimit", x=450,y=710,w=260,color='S',list=sList.heightLimit,disp=CUSval("heightLimit"), code=CUSsto("heightLimit")}, - WIDGET.newSelector{name="bufferLimit", x=450,y=790,w=260,color='B',list=sList.bufferLimit,disp=CUSval("bufferLimit"), code=CUSsto("bufferLimit")}, + WIDGET.newSelector{name="fieldH", x=450,y=600,w=260,color='N',list=sList.fieldH, disp=CUSval('fieldH'), code=CUSsto('fieldH')}, + WIDGET.newSelector{name="heightLimit", x=450,y=710,w=260,color='S',list=sList.heightLimit,disp=CUSval('heightLimit'), code=CUSsto('heightLimit')}, + WIDGET.newSelector{name="bufferLimit", x=450,y=790,w=260,color='B',list=sList.bufferLimit,disp=CUSval('bufferLimit'), code=CUSsto('bufferLimit')}, - WIDGET.newSelector{name="drop", x=730,y=330,w=260,color='O',list=sList.drop,disp=CUSval("drop"),code=CUSsto("drop")}, - WIDGET.newSelector{name="lock", x=730,y=410,w=260,color='O',list=sList.lock,disp=CUSval("lock"),code=CUSsto("lock")}, - WIDGET.newSelector{name="wait", x=730,y=520,w=260,color='G',list=sList.wait,disp=CUSval("wait"),code=CUSsto("wait")}, - WIDGET.newSelector{name="fall", x=730,y=600,w=260,color='G',list=sList.fall,disp=CUSval("fall"),code=CUSsto("fall")}, + WIDGET.newSelector{name="drop", x=730,y=330,w=260,color='O',list=sList.drop,disp=CUSval('drop'),code=CUSsto('drop')}, + WIDGET.newSelector{name="lock", x=730,y=410,w=260,color='O',list=sList.lock,disp=CUSval('lock'),code=CUSsto('lock')}, + WIDGET.newSelector{name="wait", x=730,y=520,w=260,color='G',list=sList.wait,disp=CUSval('wait'),code=CUSsto('wait')}, + WIDGET.newSelector{name="fall", x=730,y=600,w=260,color='G',list=sList.fall,disp=CUSval('fall'),code=CUSsto('fall')}, --Copy / Paste / Start WIDGET.newButton{name="copy", x=1070,y=300,w=310,h=70,color='lR',font=25,code=pressKey"cC"}, @@ -237,22 +238,25 @@ scene.widgetList={ WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=pressKey"escape"}, --Special rules - WIDGET.newSwitch{name="ospin", x=830, y=750,disp=CUSval("ospin"), code=CUSrev("ospin")}, - WIDGET.newSwitch{name="fineKill", x=830, y=840,disp=CUSval("fineKill"), code=CUSrev("fineKill")}, - WIDGET.newSwitch{name="b2bKill", x=830, y=930,disp=CUSval("b2bKill"), code=CUSrev("b2bKill")}, - WIDGET.newSwitch{name="easyFresh",x=1170,y=750,disp=CUSval("easyFresh"),code=CUSrev("easyFresh")}, - WIDGET.newSwitch{name="deepDrop", x=1170,y=840,disp=CUSval("deepDrop"), code=CUSrev("deepDrop")}, - WIDGET.newSwitch{name="bone", x=1170,y=930,disp=CUSval("bone"), code=CUSrev("bone")}, + WIDGET.newSwitch{name="ospin", x=830, y=750,disp=CUSval('ospin'), code=CUSrev('ospin')}, + WIDGET.newSwitch{name="fineKill", x=830, y=840,disp=CUSval('fineKill'), code=CUSrev('fineKill')}, + WIDGET.newSwitch{name="b2bKill", x=830, y=930,disp=CUSval('b2bKill'), code=CUSrev('b2bKill')}, + WIDGET.newSwitch{name="easyFresh",x=1170,y=750,disp=CUSval('easyFresh'),code=CUSrev('easyFresh')}, + WIDGET.newSwitch{name="deepDrop", x=1170,y=840,disp=CUSval('deepDrop'), code=CUSrev('deepDrop')}, + WIDGET.newSwitch{name="bone", x=1170,y=930,disp=CUSval('bone'), code=CUSrev('bone')}, + + --Rule set + WIDGET.newSelector{name="eventSet",x=310,y=890,w=320,color='H',list=sList.eventSet,disp=CUSval('eventSet'),code=CUSsto('eventSet')}, --Next & Hold - WIDGET.newSlider{name="nextCount",x=140, y=940,w=180,unit=6, disp=CUSval("nextCount"),code=CUSsto("nextCount")}, - WIDGET.newSlider{name="holdCount",x=140, y=1030,w=180,unit=6,disp=CUSval("holdCount"),code=CUSsto("holdCount")}, - WIDGET.newSwitch{name="infHold", x=560, y=940, disp=CUSval("infHold"),code=CUSrev("infHold"),hideF=function()return CUSTOMENV.holdCount==0 end}, - WIDGET.newSwitch{name="phyHold", x=560, y=1030, disp=CUSval("phyHold"),code=CUSrev("phyHold"),hideF=function()return CUSTOMENV.holdCount==0 end}, + WIDGET.newSlider{name="nextCount",x=140, y=960,w=180,unit=6, disp=CUSval('nextCount'),code=CUSsto('nextCount')}, + WIDGET.newSlider{name="holdCount",x=140, y=1030,w=180,unit=6,disp=CUSval('holdCount'),code=CUSsto('holdCount')}, + WIDGET.newSwitch{name="infHold", x=560, y=960, disp=CUSval('infHold'),code=CUSrev('infHold'),hideF=function()return CUSTOMENV.holdCount==0 end}, + WIDGET.newSwitch{name="phyHold", x=560, y=1030, disp=CUSval('phyHold'),code=CUSrev('phyHold'),hideF=function()return CUSTOMENV.holdCount==0 end}, --BG & BGM - WIDGET.newSelector{name="bg", x=840, y=1030,w=250,color='Y',list=BG.getList(),disp=CUSval("bg"),code=function(i)CUSTOMENV.bg=i BG.set(i)end}, - WIDGET.newSelector{name="bgm", x=1120,y=1030,w=250,color='Y',list=BGM.getList(),disp=CUSval("bgm"),code=function(i)CUSTOMENV.bgm=i BGM.play(i)end}, + WIDGET.newSelector{name="bg", x=840, y=1030,w=250,color='Y',list=BG.getList(),disp=CUSval('bg'),code=function(i)CUSTOMENV.bg=i BG.set(i)end}, + WIDGET.newSelector{name="bgm", x=1120,y=1030,w=250,color='Y',list=BGM.getList(),disp=CUSval('bgm'),code=function(i)CUSTOMENV.bgm=i BGM.play(i)end}, } return scene \ No newline at end of file diff --git a/parts/scenes/custom_mission.lua b/parts/scenes/custom_mission.lua index 70bab949..9082241c 100644 --- a/parts/scenes/custom_mission.lua +++ b/parts/scenes/custom_mission.lua @@ -237,7 +237,7 @@ scene.widgetList={ WIDGET.newKey{name="reset", x=1000,y=640,w=90, color='lY',font=50,code=pressKey"delete"}, WIDGET.newButton{name="copy", x=1140,y=440,w=170,h=80,color='lR',font=40,code=pressKey"cC",hideF=function()return #MISSION==0 end}, WIDGET.newButton{name="paste", x=1140,y=540,w=170,h=80,color='lB',font=40,code=pressKey"cV"}, - WIDGET.newSwitch{name="mission",x=1150,y=340,disp=CUSval("missionKill"),code=CUSrev("missionKill")}, + WIDGET.newSwitch{name="mission",x=1150,y=340,disp=CUSval('missionKill'),code=CUSrev('missionKill')}, WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } diff --git a/parts/scenes/custom_sequence.lua b/parts/scenes/custom_sequence.lua index 7c462d5a..1890ce30 100644 --- a/parts/scenes/custom_sequence.lua +++ b/parts/scenes/custom_sequence.lua @@ -193,7 +193,7 @@ scene.widgetList={ WIDGET.newSelector{name="sequence",x=1080,y=60,w=200,color='Y', list={'bag','his','hisPool','c2','rnd','mess','reverb','loop','fixed'}, - disp=CUSval("sequence"),code=CUSsto("sequence") + disp=CUSval('sequence'),code=CUSsto('sequence') }, WIDGET.newKey{name="Z", x=120,y=460,w=80,font=50,code=pressKey(1)}, diff --git a/parts/scenes/music.lua b/parts/scenes/music.lua index d45c2b5f..6c1a64b6 100644 --- a/parts/scenes/music.lua +++ b/parts/scenes/music.lua @@ -106,7 +106,7 @@ scene.widgetList={ code=function(v)BGM.playing:seek(v*BGM.playing:getDuration())end, hideF=function()return not BGM.nowPlay end }, - WIDGET.newSlider{name="bgm", x=760,y=80,w=400,disp=SETval("bgm"),code=function(v)SETTING.bgm=v BGM.freshVolume()end}, + WIDGET.newSlider{name="bgm", x=760,y=80,w=400,disp=SETval('bgm'),code=function(v)SETTING.bgm=v BGM.freshVolume()end}, WIDGET.newButton{name="up", x=200,y=250,w=120,code=pressKey"up",hideF=function()return selected==1 end,fText=GC.DO{32,32,{'setLW',4},{'line',2,28,16,4,30,28}}}, WIDGET.newButton{name="play", x=200,y=390,w=120,code=pressKey"space",fText=GC.DO{64,64,{'fPoly',14+3,10,14+3,54,55+3,32}}}, WIDGET.newButton{name="down", x=200,y=530,w=120,code=pressKey"down",hideF=function()return selected==#bgmList end,fText=GC.DO{32,32,{'setLW',4},{'line',2,4,16,28,30,4}}}, diff --git a/parts/scenes/net_newRoom.lua b/parts/scenes/net_newRoom.lua index bff43997..11921057 100644 --- a/parts/scenes/net_newRoom.lua +++ b/parts/scenes/net_newRoom.lua @@ -72,39 +72,39 @@ scene.widgetList={ descriptionBox, --Selectors - WIDGET.newSelector{name="life", x=170,y=410,w=260,color='R',list=sList.life, disp=ROOMval("life"), code=ROOMsto("life")}, - WIDGET.newSelector{name="pushSpeed", x=170,y=520,w=260,color='V',list=sList.pushSpeed, disp=ROOMval("pushSpeed"), code=ROOMsto("pushSpeed")}, - WIDGET.newSelector{name="garbageSpeed", x=170,y=600,w=260,color='V',list=sList.pushSpeed, disp=ROOMval("garbageSpeed"), code=ROOMsto("garbageSpeed")}, - WIDGET.newSelector{name="visible", x=170,y=710,w=260,color='lB',list=sList.visible, disp=ROOMval("visible"), code=ROOMsto("visible")}, - WIDGET.newSelector{name="freshLimit", x=170,y=790,w=260,color='lB',list=sList.freshLimit, disp=ROOMval("freshLimit"), code=ROOMsto("freshLimit")}, + WIDGET.newSelector{name="life", x=170,y=410,w=260,color='R',list=sList.life, disp=ROOMval('life'), code=ROOMsto('life')}, + WIDGET.newSelector{name="pushSpeed", x=170,y=520,w=260,color='V',list=sList.pushSpeed, disp=ROOMval('pushSpeed'), code=ROOMsto('pushSpeed')}, + WIDGET.newSelector{name="garbageSpeed", x=170,y=600,w=260,color='V',list=sList.pushSpeed, disp=ROOMval('garbageSpeed'), code=ROOMsto('garbageSpeed')}, + WIDGET.newSelector{name="visible", x=170,y=710,w=260,color='lB',list=sList.visible, disp=ROOMval('visible'), code=ROOMsto('visible')}, + WIDGET.newSelector{name="freshLimit", x=170,y=790,w=260,color='lB',list=sList.freshLimit, disp=ROOMval('freshLimit'), code=ROOMsto('freshLimit')}, - WIDGET.newSelector{name="fieldH", x=450,y=600,w=260,color='N',list=sList.fieldH, disp=ROOMval("fieldH"), code=ROOMsto("fieldH")}, - WIDGET.newSelector{name="heightLimit", x=450,y=710,w=260,color='S',list=sList.heightLimit, disp=ROOMval("heightLimit"), code=ROOMsto("heightLimit")}, - WIDGET.newSelector{name="bufferLimit", x=450,y=790,w=260,color='B',list=sList.bufferLimit, disp=ROOMval("bufferLimit"), code=ROOMsto("bufferLimit")}, + WIDGET.newSelector{name="fieldH", x=450,y=600,w=260,color='N',list=sList.fieldH, disp=ROOMval('fieldH'), code=ROOMsto('fieldH')}, + WIDGET.newSelector{name="heightLimit", x=450,y=710,w=260,color='S',list=sList.heightLimit, disp=ROOMval('heightLimit'), code=ROOMsto('heightLimit')}, + WIDGET.newSelector{name="bufferLimit", x=450,y=790,w=260,color='B',list=sList.bufferLimit, disp=ROOMval('bufferLimit'), code=ROOMsto('bufferLimit')}, - WIDGET.newSelector{name="drop", x=730,y=330,w=260,color='O',list=sList.drop,disp=ROOMval("drop"),code=ROOMsto("drop")}, - WIDGET.newSelector{name="lock", x=730,y=410,w=260,color='O',list=sList.lock,disp=ROOMval("lock"),code=ROOMsto("lock")}, - WIDGET.newSelector{name="wait", x=730,y=520,w=260,color='G',list=sList.wait,disp=ROOMval("wait"),code=ROOMsto("wait")}, - WIDGET.newSelector{name="fall", x=730,y=600,w=260,color='G',list=sList.fall,disp=ROOMval("fall"),code=ROOMsto("fall")}, + WIDGET.newSelector{name="drop", x=730,y=330,w=260,color='O',list=sList.drop,disp=ROOMval('drop'),code=ROOMsto('drop')}, + WIDGET.newSelector{name="lock", x=730,y=410,w=260,color='O',list=sList.lock,disp=ROOMval('lock'),code=ROOMsto('lock')}, + WIDGET.newSelector{name="wait", x=730,y=520,w=260,color='G',list=sList.wait,disp=ROOMval('wait'),code=ROOMsto('wait')}, + WIDGET.newSelector{name="fall", x=730,y=600,w=260,color='G',list=sList.fall,disp=ROOMval('fall'),code=ROOMsto('fall')}, --Capacity & Create & Back - WIDGET.newSelector{name="capacity", x=1070,y=330,w=310,color='lY',list={2,3,4,5,7,10,17,31,49,99},disp=ROOMval("capacity"),code=ROOMsto("capacity")}, + WIDGET.newSelector{name="capacity", x=1070,y=330,w=310,color='lY',list={2,3,4,5,7,10,17,31,49,99},disp=ROOMval('capacity'),code=ROOMsto('capacity')}, WIDGET.newButton{name="create", x=1070,y=480,w=310,h=140,color='lN',font=40,code=pressKey"return"}, WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, --Special rules - WIDGET.newSwitch{name="ospin", x=830, y=750,disp=ROOMval("ospin"), code=ROOMrev("ospin")}, - WIDGET.newSwitch{name="fineKill", x=830, y=840,disp=ROOMval("fineKill"), code=ROOMrev("fineKill")}, - WIDGET.newSwitch{name="b2bKill", x=830, y=930,disp=ROOMval("b2bKill"), code=ROOMrev("b2bKill")}, - WIDGET.newSwitch{name="easyFresh", x=1170,y=750,disp=ROOMval("easyFresh"),code=ROOMrev("easyFresh")}, - WIDGET.newSwitch{name="deepDrop", x=1170,y=840,disp=ROOMval("deepDrop"), code=ROOMrev("deepDrop")}, - WIDGET.newSwitch{name="bone", x=1170,y=930,disp=ROOMval("bone"), code=ROOMrev("bone")}, + WIDGET.newSwitch{name="ospin", x=830, y=750,disp=ROOMval('ospin'), code=ROOMrev('ospin')}, + WIDGET.newSwitch{name="fineKill", x=830, y=840,disp=ROOMval('fineKill'), code=ROOMrev('fineKill')}, + WIDGET.newSwitch{name="b2bKill", x=830, y=930,disp=ROOMval('b2bKill'), code=ROOMrev('b2bKill')}, + WIDGET.newSwitch{name="easyFresh", x=1170,y=750,disp=ROOMval('easyFresh'),code=ROOMrev('easyFresh')}, + WIDGET.newSwitch{name="deepDrop", x=1170,y=840,disp=ROOMval('deepDrop'), code=ROOMrev('deepDrop')}, + WIDGET.newSwitch{name="bone", x=1170,y=930,disp=ROOMval('bone'), code=ROOMrev('bone')}, --Next & Hold - WIDGET.newSlider{name="nextCount", x=120,y=940,w=200,unit=6, disp=ROOMval("nextCount"),code=ROOMsto("nextCount")}, - WIDGET.newSlider{name="holdCount", x=120,y=1030,w=200,unit=6, disp=ROOMval("holdCount"),code=ROOMsto("holdCount")}, - WIDGET.newSwitch{name="infHold", x=560,y=940, disp=ROOMval("infHold"),code=ROOMrev("infHold"),hideF=function()return ROOMENV.holdCount==0 end}, - WIDGET.newSwitch{name="phyHold", x=560,y=1030, disp=ROOMval("phyHold"),code=ROOMrev("phyHold"),hideF=function()return ROOMENV.holdCount==0 end}, + WIDGET.newSlider{name="nextCount", x=120,y=940,w=200,unit=6, disp=ROOMval('nextCount'),code=ROOMsto('nextCount')}, + WIDGET.newSlider{name="holdCount", x=120,y=1030,w=200,unit=6, disp=ROOMval('holdCount'),code=ROOMsto('holdCount')}, + WIDGET.newSwitch{name="infHold", x=560,y=940, disp=ROOMval('infHold'),code=ROOMrev('infHold'),hideF=function()return ROOMENV.holdCount==0 end}, + WIDGET.newSwitch{name="phyHold", x=560,y=1030, disp=ROOMval('phyHold'),code=ROOMrev('phyHold'),hideF=function()return ROOMENV.holdCount==0 end}, } return scene \ No newline at end of file diff --git a/parts/scenes/setting_control.lua b/parts/scenes/setting_control.lua index 07079a1d..002f5057 100644 --- a/parts/scenes/setting_control.lua +++ b/parts/scenes/setting_control.lua @@ -84,15 +84,15 @@ scene.widgetList={ WIDGET.newText{name="title", x=80, y=50,font=70,align='L'}, WIDGET.newText{name="preview", x=520, y=610,font=40,align='R'}, - WIDGET.newSlider{name="das", x=250, y=190,w=600,unit=20,disp=SETval("das"), show=_sliderShow,code=SETsto("das")}, - WIDGET.newSlider{name="arr", x=250, y=260,w=525,unit=15,disp=SETval("arr"), show=_sliderShow,code=SETsto("arr")}, - WIDGET.newSlider{name="sddas", x=250, y=330,w=350,unit=10,disp=SETval("sddas"), show=_sliderShow,code=SETsto("sddas")}, - WIDGET.newSlider{name="sdarr", x=250, y=400,w=140,unit=4, disp=SETval("sdarr"), show=_sliderShow,code=SETsto("sdarr")}, - WIDGET.newSlider{name="dascut", x=250, y=470,w=600,unit=20,disp=SETval("dascut"), show=_sliderShow,code=SETsto("dascut")}, - WIDGET.newSlider{name="dropcut",x=250, y=540,w=300,unit=10,disp=SETval("dropcut"),show=_sliderShow,code=SETsto("dropcut")}, - WIDGET.newSwitch{name="ihs", x=1100, y=260, disp=SETval("ihs"), code=SETrev("ihs")}, - WIDGET.newSwitch{name="irs", x=1100, y=330, disp=SETval("irs"), code=SETrev("irs")}, - WIDGET.newSwitch{name="ims", x=1100, y=400, disp=SETval("ims"), code=SETrev("ims")}, + WIDGET.newSlider{name="das", x=250, y=190,w=600,unit=20,disp=SETval('das'), show=_sliderShow,code=SETsto('das')}, + WIDGET.newSlider{name="arr", x=250, y=260,w=525,unit=15,disp=SETval('arr'), show=_sliderShow,code=SETsto('arr')}, + WIDGET.newSlider{name="sddas", x=250, y=330,w=350,unit=10,disp=SETval('sddas'), show=_sliderShow,code=SETsto('sddas')}, + WIDGET.newSlider{name="sdarr", x=250, y=400,w=140,unit=4, disp=SETval('sdarr'), show=_sliderShow,code=SETsto('sdarr')}, + WIDGET.newSlider{name="dascut", x=250, y=470,w=600,unit=20,disp=SETval('dascut'), show=_sliderShow,code=SETsto('dascut')}, + WIDGET.newSlider{name="dropcut",x=250, y=540,w=300,unit=10,disp=SETval('dropcut'),show=_sliderShow,code=SETsto('dropcut')}, + WIDGET.newSwitch{name="ihs", x=1100, y=260, disp=SETval('ihs'), code=SETrev('ihs')}, + WIDGET.newSwitch{name="irs", x=1100, y=330, disp=SETval('irs'), code=SETrev('irs')}, + WIDGET.newSwitch{name="ims", x=1100, y=400, disp=SETval('ims'), code=SETrev('ims')}, WIDGET.newButton{name="reset", x=160, y=640,w=200,h=100,color='lR',font=40, code=function() local _=SETTING diff --git a/parts/scenes/setting_game.lua b/parts/scenes/setting_game.lua index cc82f5d9..3710adf9 100644 --- a/parts/scenes/setting_game.lua +++ b/parts/scenes/setting_game.lua @@ -40,14 +40,14 @@ scene.widgetList={ WIDGET.newButton{name="ctrl", x=290, y=220, w=320,h=80,color='lY',font=35,code=goScene'setting_control'}, WIDGET.newButton{name="key", x=640, y=220, w=320,h=80,color='lG',font=35,code=goScene'setting_key'}, WIDGET.newButton{name="touch", x=990, y=220, w=320,h=80,color='lB',font=35,code=goScene'setting_touch'}, - WIDGET.newSlider{name="reTime", x=330, y=320, w=300,unit=10,disp=SETval("reTime"),code=SETsto("reTime"),show=function(S)return(.5+S.disp()*.25).."s"end}, - WIDGET.newSelector{name="RS", x=300, y=420, w=300,color='S',list={'TRS','SRS','SRS_plus','SRS_X','BiRS','ARS_Z','ASC','ASC_plus','C2','C2_sym','Classic','Classic_plus','None','None_plus'},disp=SETval("RS"),code=SETsto("RS")}, + WIDGET.newSlider{name="reTime", x=330, y=320, w=300,unit=10,disp=SETval('reTime'),code=SETsto('reTime'),show=function(S)return(.5+S.disp()*.25).."s"end}, + WIDGET.newSelector{name="RS", x=300, y=420, w=300,color='S',list={'TRS','SRS','SRS_plus','SRS_X','BiRS','ARS_Z','ASC','ASC_plus','C2','C2_sym','Classic','Classic_plus','None','None_plus'},disp=SETval('RS'),code=SETsto('RS')}, WIDGET.newButton{name="layout", x=250, y=540, w=200,h=70,font=35, code=goScene'setting_skin'}, - WIDGET.newSwitch{name="autoPause", x=1060, y=320, disp=SETval("autoPause"),code=SETrev("autoPause")}, - WIDGET.newSelector{name="menuPos", x=980, y=420, w=300,color='O',list={'left','middle','right'},disp=SETval("menuPos"),code=SETsto("menuPos")}, - WIDGET.newSwitch{name="swap", x=1060, y=520, disp=SETval("swap"), code=SETrev("swap")}, - WIDGET.newSwitch{name="autoSave", x=600, y=800, disp=SETval("autoSave"), code=SETrev("autoSave")}, - WIDGET.newSwitch{name="simpMode", x=1060, y=800, disp=SETval("simpMode"), + WIDGET.newSwitch{name="autoPause", x=1060, y=320, disp=SETval('autoPause'),code=SETrev('autoPause')}, + WIDGET.newSelector{name="menuPos", x=980, y=420, w=300,color='O',list={'left','middle','right'},disp=SETval('menuPos'),code=SETsto('menuPos')}, + WIDGET.newSwitch{name="swap", x=1060, y=520, disp=SETval('swap'), code=SETrev('swap')}, + WIDGET.newSwitch{name="autoSave", x=600, y=800, disp=SETval('autoSave'), code=SETrev('autoSave')}, + WIDGET.newSwitch{name="simpMode", x=1060, y=800, disp=SETval('simpMode'), code=function() SETTING.simpMode=not SETTING.simpMode for i=1,#SCN.stack,2 do diff --git a/parts/scenes/setting_sound.lua b/parts/scenes/setting_sound.lua index 0d1c4dfc..53e633a5 100644 --- a/parts/scenes/setting_sound.lua +++ b/parts/scenes/setting_sound.lua @@ -72,13 +72,13 @@ scene.widgetList={ WIDGET.newButton{name="game", x=200, y=80,w=240,h=80,color='lC',font=35,code=swapScene('setting_game','swipeR')}, WIDGET.newButton{name="graphic",x=1080,y=80,w=240,h=80,color='lC',font=35,code=swapScene('setting_video','swipeL')}, - WIDGET.newSlider{name="bgm", x=300, y=190,w=420,color='lG',disp=SETval("bgm"),code=function(v)SETTING.bgm=v BGM.freshVolume()end}, - WIDGET.newSlider{name="sfx", x=300, y=260,w=420,color='lC',change=function()SFX.play('blip_1')end,disp=SETval("sfx"),code=SETsto("sfx")}, - WIDGET.newSlider{name="stereo", x=300, y=330,w=420,color='lC',change=function()SFX.play('move',1,-1)SFX.play('lock',1,1)end,disp=SETval("stereo"),code=SETsto("stereo"),hideF=function()return SETTING.sx==0 end}, - WIDGET.newSlider{name="spawn", x=300, y=400,w=420,color='lC',change=function()SFX.fplay('spawn_'..math.random(7),SETTING.sfx_spawn)end,disp=SETval("sfx_spawn"),code=SETsto("sfx_spawn")}, - WIDGET.newSlider{name="warn", x=300, y=470,w=420,color='lC',change=function()SFX.fplay('warning',SETTING.sfx_warn)end,disp=SETval("sfx_warn"),code=SETsto("sfx_warn")}, - WIDGET.newSlider{name="vib", x=300, y=540,w=420,color='lN',unit=10,change=function()VIB(2)end,disp=SETval("vib"),code=SETsto("vib")}, - WIDGET.newSlider{name="voc", x=300, y=610,w=420,color='lN',change=function()VOC.play('test')end,disp=SETval("voc"),code=SETsto("voc")}, + WIDGET.newSlider{name="bgm", x=300, y=190,w=420,color='lG',disp=SETval('bgm'),code=function(v)SETTING.bgm=v BGM.freshVolume()end}, + WIDGET.newSlider{name="sfx", x=300, y=260,w=420,color='lC',change=function()SFX.play('blip_1')end,disp=SETval('sfx'),code=SETsto('sfx')}, + WIDGET.newSlider{name="stereo", x=300, y=330,w=420,color='lC',change=function()SFX.play('move',1,-1)SFX.play('lock',1,1)end,disp=SETval('stereo'),code=SETsto('stereo'),hideF=function()return SETTING.sx==0 end}, + WIDGET.newSlider{name="spawn", x=300, y=400,w=420,color='lC',change=function()SFX.fplay('spawn_'..math.random(7),SETTING.sfx_spawn)end,disp=SETval('sfx_spawn'),code=SETsto('sfx_spawn')}, + WIDGET.newSlider{name="warn", x=300, y=470,w=420,color='lC',change=function()SFX.fplay('warning',SETTING.sfx_warn)end,disp=SETval('sfx_warn'),code=SETsto('sfx_warn')}, + WIDGET.newSlider{name="vib", x=300, y=540,w=420,color='lN',unit=10,change=function()VIB(2)end,disp=SETval('vib'),code=SETsto('vib')}, + WIDGET.newSlider{name="voc", x=300, y=610,w=420,color='lN',change=function()VOC.play('test')end,disp=SETval('voc'),code=SETsto('voc')}, WIDGET.newKey{name="mute", x=1160,y=180,w=80,color='lR',fText=TEXTURE.mute, code=function() @@ -93,7 +93,7 @@ scene.widgetList={ end BGM.freshVolume() end}, - WIDGET.newSwitch{name="fine", x=1150,y=270,disp=SETval("fine"),code=function()SETTING.fine=not SETTING.fine if SETTING.fine then SFX.play('finesseError',.6)end end}, + WIDGET.newSwitch{name="fine", x=1150,y=270,disp=SETval('fine'),code=function()SETTING.fine=not SETTING.fine if SETTING.fine then SFX.play('finesseError',.6)end end}, WIDGET.newSelector{name="cv", x=1100,y=380,w=200,list={'miya','naki','xiaoya'},disp=function()return cv end,code=function(i)cv=i end}, WIDGET.newButton{name="apply", x=1100,y=460,w=180,h=80,code=function()SETTING.cv=cv VOC.loadAll()end,hideF=function()return SETTING.cv==cv end}, diff --git a/parts/scenes/setting_touchSwitch.lua b/parts/scenes/setting_touchSwitch.lua index 3b817237..b5a8275b 100644 --- a/parts/scenes/setting_touchSwitch.lua +++ b/parts/scenes/setting_touchSwitch.lua @@ -44,16 +44,16 @@ scene.widgetList={ WIDGET.newButton{name="norm", x=840, y=80, w=240,h=80, font=35,code=function()for i=1,20 do VK_org[i].ava=i<11 end end}, WIDGET.newButton{name="pro", x=1120, y=80, w=240,h=80, font=35,code=function()for i=1,20 do VK_org[i].ava=true end end}, - WIDGET.newSwitch{name="hide", x=1150, y=200, font=40,disp=SETval("VKSwitch"),code=SETrev("VKSwitch")}, - WIDGET.newSwitch{name="icon", x=1150, y=300, font=40,disp=SETval("VKIcon"),code=SETrev("VKIcon"),hideF=_notShow}, - WIDGET.newSlider{name="sfx", x=830, y=380, w=400, font=35,change=function()SFX.play('virtualKey',SETTING.VKSFX)end,disp=SETval("VKSFX"),code=SETsto("VKSFX"),hideF=_notShow}, - WIDGET.newSlider{name="vib", x=830, y=450, w=400,unit=6, font=35,change=function()VIB(SETTING.VKVIB)end,disp=SETval("VKVIB"),code=SETsto("VKVIB"),hideF=_notShow}, - WIDGET.newSlider{name="alpha", x=830, y=520, w=400, font=40,disp=SETval("VKAlpha"),code=SETsto("VKAlpha"),hideF=_notShow}, + WIDGET.newSwitch{name="hide", x=1150, y=200, font=40,disp=SETval('VKSwitch'),code=SETrev('VKSwitch')}, + WIDGET.newSwitch{name="icon", x=1150, y=300, font=40,disp=SETval('VKIcon'),code=SETrev('VKIcon'),hideF=_notShow}, + WIDGET.newSlider{name="sfx", x=830, y=380, w=400, font=35,change=function()SFX.play('virtualKey',SETTING.VKSFX)end,disp=SETval('VKSFX'),code=SETsto('VKSFX'),hideF=_notShow}, + WIDGET.newSlider{name="vib", x=830, y=450, w=400,unit=6, font=35,change=function()VIB(SETTING.VKVIB)end,disp=SETval('VKVIB'),code=SETsto('VKVIB'),hideF=_notShow}, + WIDGET.newSlider{name="alpha", x=830, y=520, w=400, font=40,disp=SETval('VKAlpha'),code=SETsto('VKAlpha'),hideF=_notShow}, - WIDGET.newSwitch{name="track", x=360, y=720, font=35,disp=SETval("VKTrack"),code=SETrev("VKTrack"),hideF=_notShow}, - WIDGET.newSwitch{name="dodge", x=800, y=720, font=35,disp=SETval("VKDodge"),code=SETrev("VKDodge"),hideF=_notTrack}, - WIDGET.newSlider{name="tchW", x=140, y=860, w=1000, font=35,disp=SETval("VKTchW"),code=function(i)SETTING.VKTchW=i SETTING.VKCurW=math.max(SETTING.VKCurW,i)end,hideF=_notTrack}, - WIDGET.newSlider{name="curW", x=140, y=930, w=1000, font=35,disp=SETval("VKCurW"),code=function(i)SETTING.VKCurW=i SETTING.VKTchW=math.min(SETTING.VKTchW,i)end,hideF=_notTrack}, + WIDGET.newSwitch{name="track", x=360, y=720, font=35,disp=SETval('VKTrack'),code=SETrev('VKTrack'),hideF=_notShow}, + WIDGET.newSwitch{name="dodge", x=800, y=720, font=35,disp=SETval('VKDodge'),code=SETrev('VKDodge'),hideF=_notTrack}, + WIDGET.newSlider{name="tchW", x=140, y=860, w=1000, font=35,disp=SETval('VKTchW'),code=function(i)SETTING.VKTchW=i SETTING.VKCurW=math.max(SETTING.VKCurW,i)end,hideF=_notTrack}, + WIDGET.newSlider{name="curW", x=140, y=930, w=1000, font=35,disp=SETval('VKCurW'),code=function(i)SETTING.VKCurW=i SETTING.VKTchW=math.min(SETTING.VKTchW,i)end,hideF=_notTrack}, WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80,fText=TEXTURE.back,code=backScene}, } diff --git a/parts/scenes/setting_video.lua b/parts/scenes/setting_video.lua index 90cd8ac3..21b705eb 100644 --- a/parts/scenes/setting_video.lua +++ b/parts/scenes/setting_video.lua @@ -38,39 +38,39 @@ scene.widgetList={ WIDGET.newButton{name="sound", x=200,y=80,w=240,h=80,color='lC',font=35,code=swapScene('setting_sound','swipeR')}, WIDGET.newButton{name="game", x=1080,y=80,w=240,h=80,color='lC',font=35,code=swapScene('setting_game','swipeL')}, - WIDGET.newSwitch{name="block", x=380,y=180,disp=SETval("block"),code=SETrev("block")}, - WIDGET.newSwitch{name="smooth", x=380,y=250,disp=SETval("smooth"),code=SETrev("smooth")}, - WIDGET.newSwitch{name="upEdge", x=380,y=320,disp=SETval("upEdge"),code=SETrev("upEdge")}, - WIDGET.newSwitch{name="bagLine", x=380,y=390,disp=SETval("bagLine"),code=SETrev("bagLine")}, + WIDGET.newSwitch{name="block", x=380,y=180,disp=SETval('block'),code=SETrev('block')}, + WIDGET.newSwitch{name="smooth", x=380,y=250,disp=SETval('smooth'),code=SETrev('smooth')}, + WIDGET.newSwitch{name="upEdge", x=380,y=320,disp=SETval('upEdge'),code=SETrev('upEdge')}, + WIDGET.newSwitch{name="bagLine", x=380,y=390,disp=SETval('bagLine'),code=SETrev('bagLine')}, - WIDGET.newSelector{name="ghostType", x=915,y=180,w=350,list={'color','gray','colorCell','grayCell','colorLine','grayLine'},disp=SETval("ghostType"),code=SETsto("ghostType")}, - WIDGET.newSlider{name="ghost", x=740,y=240,w=350,unit=1,disp=SETval("ghost"), show="percent",code=SETsto("ghost")}, - WIDGET.newSlider{name="center", x=740,y=300,w=350,unit=1,disp=SETval("center"), show="percent",code=SETsto("center")}, - WIDGET.newSlider{name="grid", x=740,y=360,w=350,unit=.4,disp=SETval("grid"), show="percent",code=SETsto("grid")}, - WIDGET.newSlider{name="lineNum", x=740,y=420,w=350,unit=1,disp=SETval("lineNum"), show="percent",code=SETsto("lineNum")}, + WIDGET.newSelector{name="ghostType", x=915,y=180,w=350,list={'color','gray','colorCell','grayCell','colorLine','grayLine'},disp=SETval('ghostType'),code=SETsto('ghostType')}, + WIDGET.newSlider{name="ghost", x=740,y=240,w=350,unit=1,disp=SETval('ghost'), show="percent",code=SETsto('ghost')}, + WIDGET.newSlider{name="center", x=740,y=300,w=350,unit=1,disp=SETval('center'), show="percent",code=SETsto('center')}, + WIDGET.newSlider{name="grid", x=740,y=360,w=350,unit=.4,disp=SETval('grid'), show="percent",code=SETsto('grid')}, + WIDGET.newSlider{name="lineNum", x=740,y=420,w=350,unit=1,disp=SETval('lineNum'), show="percent",code=SETsto('lineNum')}, - WIDGET.newSlider{name="lockFX", x=330,y=460,w=540,unit=5,disp=SETval("lockFX"), code=SETsto("lockFX")}, - WIDGET.newSlider{name="dropFX", x=330,y=520,w=540,unit=5,disp=SETval("dropFX"), code=SETsto("dropFX")}, - WIDGET.newSlider{name="moveFX", x=330,y=580,w=540,unit=5,disp=SETval("moveFX"), code=SETsto("moveFX")}, - WIDGET.newSlider{name="clearFX", x=330,y=640,w=540,unit=5,disp=SETval("clearFX"), code=SETsto("clearFX")}, - WIDGET.newSlider{name="splashFX", x=330,y=700,w=540,unit=5,disp=SETval("splashFX"), code=SETsto("splashFX")}, - WIDGET.newSlider{name="shakeFX", x=330,y=760,w=540,unit=5,disp=SETval("shakeFX"), code=SETsto("shakeFX")}, - WIDGET.newSlider{name="atkFX", x=330,y=820,w=540,unit=5,disp=SETval("atkFX"), code=SETsto("atkFX")}, - WIDGET.newSelector{name="frame", x=600,y=890,w=460,list={8,10,13,17,22,29,37,47,62,80,100},disp=SETval("frameMul"),code=SETsto("frameMul")}, + WIDGET.newSlider{name="lockFX", x=330,y=460,w=540,unit=5,disp=SETval('lockFX'), code=SETsto('lockFX')}, + WIDGET.newSlider{name="dropFX", x=330,y=520,w=540,unit=5,disp=SETval('dropFX'), code=SETsto('dropFX')}, + WIDGET.newSlider{name="moveFX", x=330,y=580,w=540,unit=5,disp=SETval('moveFX'), code=SETsto('moveFX')}, + WIDGET.newSlider{name="clearFX", x=330,y=640,w=540,unit=5,disp=SETval('clearFX'), code=SETsto('clearFX')}, + WIDGET.newSlider{name="splashFX", x=330,y=700,w=540,unit=5,disp=SETval('splashFX'), code=SETsto('splashFX')}, + WIDGET.newSlider{name="shakeFX", x=330,y=760,w=540,unit=5,disp=SETval('shakeFX'), code=SETsto('shakeFX')}, + WIDGET.newSlider{name="atkFX", x=330,y=820,w=540,unit=5,disp=SETval('atkFX'), code=SETsto('atkFX')}, + WIDGET.newSelector{name="frame", x=600,y=890,w=460,list={8,10,13,17,22,29,37,47,62,80,100},disp=SETval('frameMul'),code=SETsto('frameMul')}, - WIDGET.newSwitch{name="text", x=450,y=980,disp=SETval("text"), code=SETrev("text")}, - WIDGET.newSwitch{name="score", x=450,y=1030,disp=SETval("score"), code=SETrev("score")}, - WIDGET.newSwitch{name="bufferWarn", x=450,y=1100,disp=SETval("bufferWarn"), code=SETrev("bufferWarn")}, - WIDGET.newSwitch{name="showSpike", x=450,y=1150,disp=SETval("showSpike"), code=SETrev("showSpike")}, - WIDGET.newSwitch{name="nextPos", x=450,y=1220,disp=SETval("nextPos"), code=SETrev("nextPos")}, - WIDGET.newSwitch{name="highCam", x=450,y=1270,disp=SETval("highCam"), code=SETrev("highCam")}, - WIDGET.newSwitch{name="warn", x=450,y=1340,disp=SETval("warn"), code=SETrev("warn")}, + WIDGET.newSwitch{name="text", x=450,y=980,disp=SETval('text'), code=SETrev('text')}, + WIDGET.newSwitch{name="score", x=450,y=1030,disp=SETval('score'), code=SETrev('score')}, + WIDGET.newSwitch{name="bufferWarn", x=450,y=1100,disp=SETval('bufferWarn'), code=SETrev('bufferWarn')}, + WIDGET.newSwitch{name="showSpike", x=450,y=1150,disp=SETval('showSpike'), code=SETrev('showSpike')}, + WIDGET.newSwitch{name="nextPos", x=450,y=1220,disp=SETval('nextPos'), code=SETrev('nextPos')}, + WIDGET.newSwitch{name="highCam", x=450,y=1270,disp=SETval('highCam'), code=SETrev('highCam')}, + WIDGET.newSwitch{name="warn", x=450,y=1340,disp=SETval('warn'), code=SETrev('warn')}, - WIDGET.newSwitch{name="clickFX", x=950,y=980,disp=SETval("clickFX"), code=SETrev("clickFX")}, - WIDGET.newSwitch{name="power", x=950,y=1070,disp=SETval("powerInfo"), code=SETrev("powerInfo")}, - WIDGET.newSwitch{name="clean", x=950,y=1160,disp=SETval("cleanCanvas"), code=SETrev("cleanCanvas")}, - WIDGET.newSwitch{name="fullscreen", x=950,y=1250,disp=SETval("fullscreen"), code=switchFullscreen}, - WIDGET.newSwitch{name="bg", x=950,y=1340,disp=SETval("bg"), + WIDGET.newSwitch{name="clickFX", x=950,y=980,disp=SETval('clickFX'), code=SETrev('clickFX')}, + WIDGET.newSwitch{name="power", x=950,y=1070,disp=SETval('powerInfo'), code=SETrev('powerInfo')}, + WIDGET.newSwitch{name="clean", x=950,y=1160,disp=SETval('cleanCanvas'), code=SETrev('cleanCanvas')}, + WIDGET.newSwitch{name="fullscreen", x=950,y=1250,disp=SETval('fullscreen'), code=switchFullscreen}, + WIDGET.newSwitch{name="bg", x=950,y=1340,disp=SETval('bg'), code=function() BG.set('none') SETTING.bg=not SETTING.bg @@ -79,12 +79,12 @@ scene.widgetList={ WIDGET.newSelector{name="blockSatur", x=800,y=1440,w=300,color='lN', list={'normal','soft','gray','light','color'}, - disp=SETval("blockSatur"), + disp=SETval('blockSatur'), code=function(v)SETTING.blockSatur=v;applyBlockSatur(SETTING.blockSatur)end }, WIDGET.newSelector{name="fieldSatur", x=800,y=1540,w=300,color='lN', list={'normal','soft','gray','light','color'}, - disp=SETval("fieldSatur"), + disp=SETval('fieldSatur'), code=function(v)SETTING.fieldSatur=v;applyFieldSatur(SETTING.fieldSatur)end }, diff --git a/parts/scenes/sound.lua b/parts/scenes/sound.lua index 771d30a0..1028bd77 100644 --- a/parts/scenes/sound.lua +++ b/parts/scenes/sound.lua @@ -40,8 +40,8 @@ end scene.widgetList={ WIDGET.newText{name="title", x=30, y=15,font=70,align='L'}, - WIDGET.newSlider{name="sfx", x=510, y=60,w=330,font=35,change=function()SFX.play('blip_1')end,disp=SETval("sfx"),sound=false,code=SETsto("sfx")}, - WIDGET.newSlider{name="voc", x=510, y=120,w=330,font=35,change=function()VOC.play('test')end,disp=SETval("voc"),sound=false,code=SETsto("voc")}, + WIDGET.newSlider{name="sfx", x=510, y=60,w=330,font=35,change=function()SFX.play('blip_1')end,disp=SETval('sfx'),sound=false,code=SETsto('sfx')}, + WIDGET.newSlider{name="voc", x=510, y=120,w=330,font=35,change=function()VOC.play('test')end,disp=SETval('voc'),sound=false,code=SETsto('voc')}, WIDGET.newKey{name="move", x=110, y=140,w=160,h=50,font=20,sound=false,code=function()SFX.play('move')end}, WIDGET.newKey{name="lock", x=110, y=205,w=160,h=50,font=20,sound=false,code=function()SFX.play('lock')end},