0.11.2:Pong(操作错误导致只能用覆盖文件代替合并分支)(非0.11.2最终版)

This commit is contained in:
MrZ626
2020-10-06 18:09:45 +08:00
parent 71fec8b497
commit 09d78e52f6
39 changed files with 1250 additions and 822 deletions

View File

@@ -28,7 +28,7 @@ BGM.list={
"race","push","way","reason",
"newera","oxygen","infinite","down",
"secret7th","secret8th",
"shining terminal","distortion","far",
"waterfall","shining terminal","distortion","far",
"rockblock","cruelty","final","8-bit happiness","end",
"how feeling",
}

View File

@@ -178,7 +178,7 @@ function love.touchreleased(id,x,y)
end
if(x-lastX)^2+(y-lastY)^2<26 then
if touchClick[SCN.cur]then
touchClick[SCN.cur](x,y,k)
touchClick[SCN.cur](x,y)
end
sysFX.newRipple(.3,x,y,30)
end
@@ -375,17 +375,17 @@ function love.errorhandler(msg)
needDraw=true
elseif E=="focus"then
needDraw=true
elseif E=="touchDown"or E=="keyDown"or E=="mouseDown"then
elseif E=="touchpressed"or E=="keypressed"or E=="mousepressed"then
if count<3 then
count=count+1
SFX.play("ready")
else
local code=loadstring(love.system.getClipboardText())
if code then
if code()then
SFX.play("reach")
end
SFX.play("start")
code()
SFX.play("reach")
else
SFX.play("finesseError")
end
count=0
end

View File

@@ -86,7 +86,7 @@ local langList={
"落在最左:","落在最右:","列在最左:","列在最右:",
},
load={[0]="加载完成","加载语音ing","加载音乐ing","加载音效ing","加载图片ing","加载模式ing","加载乱七八糟的东西ing"},
load={[0]="加载完成","加载语音ing","加载音乐ing","加载音效ing","加载图片ing","加载字体ing","加载模式ing","加载乱七八糟的东西ing"},
pauseStat={
"时间:",
"按键/旋转/暂存:",
@@ -174,6 +174,7 @@ local langList={
setting="设置",
lang="言/A",
music="音乐室",
minigame="小游戏",
quit="退出",
},
mode={
@@ -201,6 +202,8 @@ local langList={
bg="背景",
bgm="音乐",
copy="复制序列+场地+任务",
paste="粘贴序列+场地+任务",
clear="开始-消除",
puzzle="开始-拼图",
@@ -223,9 +226,6 @@ local langList={
life="命数",
pushSpeed="上涨速度",
copy="复制序列+场地+任务",
paste="粘贴序列+场地+任务",
basic="←基本规则",
sequence="序列设置(Tab)→",
back="返回",
@@ -410,6 +410,7 @@ local langList={
minigame={
p15="15 Puzzle",
schulte_G="舒尔特方格",
pong="Pong",
back="返回",
},
p15={
@@ -429,6 +430,10 @@ local langList={
tapFX="点击动画",
back="返回",
},
pong={
reset="重置",
back="返回",
},
help={
dict="小Z词典",
staff="制作人员",
@@ -466,6 +471,11 @@ local langList={
["sprint_10"]= {"竞速", "10L", "消除10行"},
["sprint_20"]= {"竞速", "20L", "消除20行"},
["sprint_40"]= {"竞速", "40L", "消除40行"},
["dig_10"]= {"挖掘", "10L", "挖掘10行"},
["dig_40"]= {"挖掘", "40L", "挖掘40行"},
["dig_100"]= {"挖掘", "100L", "挖掘100行"},
["dig_400"]= {"挖掘", "400L", "挖掘400行"},
["dig_1000"]= {"挖掘", "1000L", "挖掘1000行"},
["sprint_100"]= {"竞速", "100L", "消除100行"},
["sprint_400"]= {"竞速", "400L", "消除400行"},
["sprint_1000"]= {"竞速", "1000L", "消除1000行"},
@@ -520,13 +530,13 @@ local langList={
["pcchallenge_hard"]= {"全清挑战", "困难", "100行内刷PC"},
["pcchallenge_lunatic"]={"全清挑战", "疯狂", "100行内刷PC"},
["tech_normal"]= {"科研", "普通", "禁止断B2B"},
["tech_normal+"]= {"科研", "普通+", "仅允许spin与PC"},
["tech_normal2"]= {"科研", "普通+", "仅允许spin与PC"},
["tech_hard"]= {"科研", "困难", "禁止断B2B"},
["tech_hard+"]= {"科研", "困难+", "仅允许spin与PC"},
["tech_hard2"]= {"科研", "困难+", "仅允许spin与PC"},
["tech_lunatic"]= {"科研", "疯狂", "禁止断B2B"},
["tech_lunatic+"]= {"科研", "疯狂+", "仅允许spin与PC"},
["tech_lunatic2"]= {"科研", "疯狂+", "仅允许spin与PC"},
["tech_finesse"]= {"科研", "极简", "强制最简操作"},
["tech_finesse+"]= {"科研", "极简+", "禁止普通消除,强制最简操作"},
["tech_finesse2"]= {"科研", "极简+", "禁止普通消除,强制最简操作"},
["tsd_easy"]= {"TSD挑战", "简单", "你能连续做几个TSD?"},
["tsd_hard"]= {"TSD挑战", "困难", "你能连续做几个TSD?"},
["tsd_ultimate"]= {"TSD挑战", "极限", "你能连续做几个TSD?"},
@@ -537,7 +547,7 @@ local langList={
["custom_clear"]= {"自定义", "普通", "画点什么然后把它消除!"},
["custom_puzzle"]= {"自定义", "拼图", "画点什么然后把它拼出来吧!"},
["sprintPenta"]= {"竞速", "五联块", "伤脑筋十八块"},
["sprintMPH"]= {"竞速", "MPH", "很经典"},
["sprintMPH"]= {"竞速", "MPH", "纯随机\n无预览\n无暂存"},
},
},
{
@@ -627,7 +637,7 @@ local langList={
"落在最左:","落在最右:","列在最左:","列在最右:",
},
load={[0]="加载完成","正在加载语音","正在加载音乐","正在加载音效","正在加载图片","正在加载模式","正在加载乱七八糟的东西"},
load={[0]="加载完成","正在加载语音","正在加载音乐","正在加载音效","正在加载图片","正在加载字体","正在加载模式","正在加载乱七八糟的东西"},
pauseStat={
"时间:",
"按键/旋转/暂存:",
@@ -713,6 +723,7 @@ local langList={
setting="设置",
lang="言/A",
music="音乐室",
minigame="小游戏",
quit="退出",
},
mode={
@@ -740,6 +751,8 @@ local langList={
bg="背景",
bgm="音乐",
copy="复制序列+场地+任务",
paste="粘贴序列+场地+任务",
clear="开始-消除",
puzzle="开始-拼图",
@@ -762,9 +775,6 @@ local langList={
life="命数",
pushSpeed="上涨速度",
copy="复制序列+场地+任务",
paste="粘贴序列+场地+任务",
basic="←基本规则",
sequence="序列设置(Tab)→",
back="返回",
@@ -949,6 +959,7 @@ local langList={
minigame={
p15="15 Puzzle",
schulte_G="舒尔特方格",
pong="Pong",
back="返回",
},
p15={
@@ -968,6 +979,10 @@ local langList={
tapFX="点击动画",
back="返回",
},
pong={
reset="重置",
back="返回",
},
help={
dict="小Z词典",
staff="制作人员",
@@ -1005,6 +1020,11 @@ local langList={
["sprint_10"]= {"竞速", "10行", "消除10行"},
["sprint_20"]= {"竞速", "20行", "消除20行"},
["sprint_40"]= {"竞速", "40行", "消除40行"},
["dig_10"]= {"挖掘", "10L", "挖掘10行"},
["dig_40"]= {"挖掘", "40L", "挖掘40行"},
["dig_100"]= {"挖掘", "100L", "挖掘100行"},
["dig_400"]= {"挖掘", "400L", "挖掘400行"},
["dig_1000"]= {"挖掘", "1000L", "挖掘1000行"},
["sprint_100"]= {"竞速", "100行", "消除100行"},
["sprint_400"]= {"竞速", "400行", "消除400行"},
["sprint_1000"]= {"竞速", "1000行", "消除1000行"},
@@ -1059,13 +1079,13 @@ local langList={
["pcchallenge_hard"]= {"全清挑战", "困难", "100行内刷全清"},
["pcchallenge_lunatic"]={"全清挑战", "疯狂", "100行内刷全清"},
["tech_normal"]= {"科研", "普通", "禁止断B2B"},
["tech_normal+"]= {"科研", "普通+", "仅允许回旋与全清"},
["tech_normal2"]= {"科研", "普通+", "仅允许回旋与全清"},
["tech_hard"]= {"科研", "困难", "禁止断B2B"},
["tech_hard+"]= {"科研", "困难+", "仅允许回旋与全清"},
["tech_hard2"]= {"科研", "困难+", "仅允许回旋与全清"},
["tech_lunatic"]= {"科研", "疯狂", "禁止断B2B"},
["tech_lunatic+"]= {"科研", "疯狂+", "仅允许spin与PC"},
["tech_lunatic2"]= {"科研", "疯狂+", "仅允许spin与PC"},
["tech_finesse"]= {"科研", "极简", "强制最简操作"},
["tech_finesse+"]= {"科研", "极简+", "禁止普通消除,强制最简操作"},
["tech_finesse2"]= {"科研", "极简+", "禁止普通消除,强制最简操作"},
["tsd_easy"]= {"T2挑战", "简单", "你能连续做几个T旋双清?"},
["tsd_hard"]= {"T2挑战", "困难", "你能连续做几个T旋双清?"},
["tsd_ultimate"]= {"T2挑战", "极限", "你能连续做几个T旋双清?"},
@@ -1076,7 +1096,7 @@ local langList={
["custom_clear"]= {"自定义", "普通", "画点什么然后把它消除!"},
["custom_puzzle"]= {"自定义", "拼图", "画点什么然后把它拼出来吧!"},
["sprintPenta"]= {"竞速", "五联块", "伤脑筋十八块"},
["sprintMPH"]= {"竞速", "纯净", "很经典"},
["sprintMPH"]= {"竞速", "纯净", "纯随机\n无预览\n无暂存"},
},
},
{
@@ -1163,7 +1183,7 @@ local langList={
"Instant Left:","Instant Right:","Sonic Drop:","Down 1:","Down 4:","Down 10:",
"Left Drop:","Right Drop:","Left Zangi:","Right Zangi:",
},
load={[0]="Finished","Loading voice","Loading BGM","Loading SFX","Loading images","Loading modes","Loading other things"},
load={[0]="Finished","Loading voice","Loading BGM","Loading SFX","Loading images","Loading fonts","Loading modes","Loading other things"},
pauseStat={
"Time:",
"Key/Rot./Hold:",
@@ -1249,6 +1269,7 @@ local langList={
setting="Settings",
lang="言/A",
music="Music Room",
minigame="Mini Games",
quit="Exit",
},
mode={
@@ -1276,6 +1297,8 @@ local langList={
bg="Background",
bgm="Music",
copy="Copy Seq+Field+Misn",
paste="Paste Seq+Field+Misn",
clear="Start-Clear",
puzzle="Start-Puzzle",
@@ -1298,9 +1321,6 @@ local langList={
life="Life",
pushSpeed="Garbage Speed",
copy="Copy Seq+Field+Misn",
paste="Paste Seq+Field+Misn",
basic="←Basic",
sequence="SEQ. (Tab)→",
back="Back",
@@ -1485,6 +1505,7 @@ local langList={
minigame={
p15="15 Puzzle",
schulte_G="Schulte Grid",
pong="Pong",
back="Back",
},
p15={
@@ -1504,6 +1525,10 @@ local langList={
tapFX="tap FX",
back="Back",
},
pong={
reset="Restart",
back="Back",
},
help={
dict="little Z",
staff="Staff",
@@ -1541,6 +1566,11 @@ local langList={
["sprint_10"]= {"Sprint", "10L", "Clear 10 lines!"},
["sprint_20"]= {"Sprint", "20L", "Clear 20 lines!"},
["sprint_40"]= {"Sprint", "40L", "Clear 40 lines!"},
["dig_10"]= {"Dig", "10L", "Dig 10 lines"},
["dig_40"]= {"Dig", "40L", "Dig 40 lines"},
["dig_100"]= {"Dig", "100L", "Dig 100 lines"},
["dig_400"]= {"Dig", "400L", "Dig 400 lines"},
["dig_1000"]= {"Dig", "1000L", "Dig 1000 lines"},
["sprint_100"]= {"Sprint", "100L", "Clear 100 lines!"},
["sprint_400"]= {"Sprint", "400L", "Clear 400 lines!"},
["sprint_1000"]= {"Sprint", "1000L", "Clear 1000 lines!"},
@@ -1595,13 +1625,13 @@ local langList={
["pcchallenge_hard"]= {"PC Challenge", "HARD", "Get PCs within 100 lines!"},
["pcchallenge_lunatic"]={"PC Challenge", "LUNATIC", "Get PCs within 100 lines!"},
["tech_normal"]= {"Tech", "NORMAL", "Keep the B2B chain!"},
["tech_normal+"]= {"Tech", "NORMAL+", "Spin & PC only"},
["tech_normal2"]= {"Tech", "NORMAL+", "Spin & PC only"},
["tech_hard"]= {"Tech", "HARD", "Keep the B2B chain!"},
["tech_hard+"]= {"Tech", "HARD+", "Spin & PC only"},
["tech_hard2"]= {"Tech", "HARD+", "Spin & PC only"},
["tech_lunatic"]= {"Tech", "LUNATIC", "Keep the B2B chain!"},
["tech_lunatic+"]= {"Tech", "LUNATIC+", "Spin & PC only"},
["tech_lunatic2"]= {"Tech", "LUNATIC+", "Spin & PC only"},
["tech_finesse"]= {"Tech", "FINESSE", "No finesse faults!"},
["tech_finesse+"]= {"Tech", "FINESSE+", "No normal clears, no finesse faults!"},
["tech_finesse2"]= {"Tech", "FINESSE+", "No normal clears, no finesse faults!"},
["tsd_easy"]= {"TSD Challenge", "EASY", "T-spin-doubles only!"},
["tsd_hard"]= {"TSD Challenge", "HARD", "T-spin-doubles only!"},
["tsd_ultimate"]= {"TSD Challenge", "ULTIMATE", "T-spin-doubles only!"},
@@ -1611,7 +1641,7 @@ local langList={
["infinite_dig"]= {"Infinite: Dig", "", "Dig, dig, dig."},
["custom_clear"]= {"Custom", "NORMAL", "Draw something then clear it!!"},
["custom_puzzle"]= {"Custom", "PUZZLE", "Draw something then stack it!!"},
["sprintPenta"]= {"Sprint", "Pentomino", "Clear 40 lines.\n18 pentominoes in each bag."},
["sprintPenta"]= {"Sprint", "Pentomino", "Clear 40 lines with 18 pentominoes."},
["sprintMPH"]= {"Sprint", "MPH", "Memoriyless\nPreviewless\nHoldless"},
},
},
@@ -1699,7 +1729,7 @@ local langList={
"|←:","→|:","↓_:","↓1:","↓4:","↓10:",
"←↓→↓:","→↓↓:","←↓→↓:","→↓←↓:",
},
load={[0]="___","_vocie_","_BGM_","_SFX_","_images_","_modes_","_???_"},
load={[0]="___","_vocie_","_BGM_","_SFX_","_images_","_fonts_","_modes_","_???_"},
pauseStat={
"~:",
"=/''/[ ]:",
@@ -1785,6 +1815,7 @@ local langList={
setting="_?_",
lang="言/A",
music="~~~",
minigame="^_^",
quit="X",
},
mode={
@@ -1811,6 +1842,8 @@ local langList={
bg="{~}",
bgm="(~)",
copy="Copy Seq+Field+Misn",
paste="Paste Seq+Field+Misn",
clear="Start-Clear",
puzzle="Start-Puzzle",
@@ -1833,9 +1866,6 @@ local langList={
life="<R>",
pushSpeed="_↑_↑_",
copy="Copy Seq+Field+Misn",
paste="Paste Seq+Field+Misn",
basic="←Basic",
sequence="Seq (Tab)→",
back="X",
@@ -2020,6 +2050,7 @@ local langList={
minigame={
p15="15 Puzzle",
schulte_G="Schulte Grid",
pong="Pong",
back="X",
},
p15={
@@ -2039,6 +2070,10 @@ local langList={
tapFX="↓ !",
back="X",
},
pong={
reset="R",
back="X",
},
help={
dict="z",
staff="Orz",
@@ -2074,6 +2109,11 @@ local langList={
["sprint_10"]= {"Sprint", "10L", "Clear 10 lines!"},
["sprint_20"]= {"Sprint", "20L", "Clear 20 lines!"},
["sprint_40"]= {"Sprint", "40L", "Clear 40 lines!"},
["dig_10"]= {"Dig", "10L", "Dig 10 lines"},
["dig_40"]= {"Dig", "40L", "Dig 40 lines"},
["dig_100"]= {"Dig", "100L", "Dig 100 lines"},
["dig_400"]= {"Dig", "400L", "Dig 400 lines"},
["dig_1000"]= {"Dig", "1000L", "Dig 1000 lines"},
["sprint_100"]= {"Sprint", "100L", "Clear 100 lines!"},
["sprint_400"]= {"Sprint", "400L", "Clear 400 lines!"},
["sprint_1000"]= {"Sprint", "1000L", "Clear 1000 lines!"},
@@ -2128,13 +2168,13 @@ local langList={
["pcchallenge_hard"]= {"PC Challenge", "HARD", "Get PCs within 100 lines!"},
["pcchallenge_lunatic"]={"PC Challenge", "LUNATIC", "Get PCs within 100 lines!"},
["tech_normal"]= {"Tech", "NORMAL", "Keep the B2B chain!"},
["tech_normal+"]= {"Tech", "NORMAL+", "Spin & PC only"},
["tech_normal2"]= {"Tech", "NORMAL+", "Spin & PC only"},
["tech_hard"]= {"Tech", "HARD", "Keep the B2B chain!"},
["tech_hard+"]= {"Tech", "HARD+", "Spin & PC only"},
["tech_hard2"]= {"Tech", "HARD+", "Spin & PC only"},
["tech_lunatic"]= {"Tech", "LUNATIC", "Keep the B2B chain!"},
["tech_lunatic+"]= {"Tech", "LUNATIC+", "Spin & PC only"},
["tech_lunatic2"]= {"Tech", "LUNATIC+", "Spin & PC only"},
["tech_finesse"]= {"Tech", "FINESSE", "No finesse faults!"},
["tech_finesse+"]= {"Tech", "FINESSE+", "No normal clears, no finesse faults!"},
["tech_finesse2"]= {"Tech", "FINESSE+", "No normal clears, no finesse faults!"},
["tsd_easy"]= {"TSD Challenge", "EASY", "T-spin-doubles only!"},
["tsd_hard"]= {"TSD Challenge", "HARD", "T-spin-doubles only!"},
["tsd_ultimate"]= {"TSD Challenge", "ULTIMATE", "T-spin-doubles only!"},
@@ -2235,7 +2275,7 @@ local langList={
"落在最左:","落在最右:","列在最左:","列在最右:",
},
load={[0]="加载完成","加载语音ing","加载音乐ing","加载音效ing","加载图片ing","加载模式ing","加载乱七八糟的东西ing"},
load={[0]="加载完成","加载语音ing","加载音乐ing","加载音效ing","加载图片ing","加载字体ing","加载模式ing","加载乱七八糟的东西ing"},
pauseStat={
"时间:",
"按键/旋转/暂存:",
@@ -2320,6 +2360,7 @@ local langList={
setting="设置",
lang="言/A",
music="音乐室",
minigame="小游戏",
quit="退出",
},
mode={
@@ -2347,6 +2388,8 @@ local langList={
bg="背景",
bgm="音乐",
copy="复制序列+场地+任务",
paste="粘贴序列+场地+任务",
clear="开始-消除",
puzzle="开始-拼图",
@@ -2369,9 +2412,6 @@ local langList={
life="命数",
pushSpeed="上涨速度",
copy="复制序列+场地+任务",
paste="粘贴序列+场地+任务",
basic="←基本规则",
sequence="序列设置(Tab)→",
back="返回",
@@ -2556,6 +2596,7 @@ local langList={
minigame={
p15="15 Puzzle",
schulte_G="舒尔特方格",
pong="Pong",
back="返回",
},
p15={
@@ -2575,6 +2616,10 @@ local langList={
tapFX="动画",
back="返回",
},
pong={
reset="重置",
back="返回",
},
help={
dict="小Z词典",
staff="制作人员",
@@ -2612,11 +2657,16 @@ local langList={
["sprint_10"]= {"竞速", "10L", "消10行"},
["sprint_20"]= {"竞速", "20L", "消20行"},
["sprint_40"]= {"竞速", "40L", "消40行"},
["dig_10"]= {"挖掘", "10L", "挖10行"},
["dig_40"]= {"挖掘", "40L", "挖40行"},
["dig_100"]= {"挖掘", "100L", "挖100行"},
["dig_400"]= {"挖掘", "400L", "挖400行"},
["dig_1000"]= {"挖掘", "1000L", "挖1000行"},
["sprint_100"]= {"竞速", "100L", "消100行"},
["sprint_400"]= {"竞速", "400L", "消400行"},
["sprint_1000"]= {"竞速", "1000L", "消1000行"},
["drought_normal"]= {"干旱", "100L", "哟,就不行了?"},
["drought_lunatic"]= {"干旱", "100L", "可牛逼了嗷"},
["drought_normal"]= {"干旱", "100L", "放轻松,简单得很"},
["drought_lunatic"]= {"干旱", "100L", "有趣的要来了"},
["marathon_normal"]= {"马拉松", "普通", "休闲模式"},
["marathon_hard"]= {"马拉松", "困难", "休闲模式"},
["solo_1"]= {"单挑", "简单", "鲨AI"},
@@ -2666,13 +2716,13 @@ local langList={
["pcchallenge_hard"]= {"全清挑战", "困难", "100行内刷PC"},
["pcchallenge_lunatic"]={"全清挑战", "疯狂", "100行内刷PC"},
["tech_normal"]= {"科研", "普通", "禁止断B2B"},
["tech_normal+"]= {"科研", "普通+", "仅允许spin与PC"},
["tech_normal2"]= {"科研", "普通+", "仅允许spin与PC"},
["tech_hard"]= {"科研", "困难", "禁止断B2B"},
["tech_hard+"]= {"科研", "困难+", "仅允许spin与PC"},
["tech_hard2"]= {"科研", "困难+", "仅允许spin与PC"},
["tech_lunatic"]= {"科研", "疯狂", "禁止断B2B"},
["tech_lunatic+"]= {"科研", "疯狂+", "仅允许spin与PC"},
["tech_lunatic2"]= {"科研", "疯狂+", "仅允许spin与PC"},
["tech_finesse"]= {"科研", "极简", "强制最简操作"},
["tech_finesse+"]= {"科研", "极简+", "禁止普通消除,强制最简操作"},
["tech_finesse2"]= {"科研", "极简+", "禁止普通消除,强制最简操作"},
["tsd_easy"]= {"TSD挑战", "简单", "刷T2"},
["tsd_hard"]= {"TSD挑战", "困难", "刷T2"},
["tsd_ultimate"]= {"TSD挑战", "极限", "刷T2"},
@@ -2683,7 +2733,7 @@ local langList={
["custom_clear"]= {"自定义", "普通", "试验场"},
["custom_puzzle"]= {"自定义", "拼图", "宁就是方块艺术家"},
["sprintPenta"]= {"竞速", "五联块", "离谱"},
["sprintMPH"]= {"竞速", "无脑", "听说你反应很快?"},
["sprintMPH"]= {"竞速", "纯净", "听说你反应很快?"},
},
},
}

View File

@@ -91,10 +91,12 @@ function SFX.fplay(s,vol,pos)
S:play()
end
function SFX.reset()
for _,L in next,sfx do
for i=#v,2,-1 do
if not L[i]:isPlaying()then
rem(L,i)
for _,L in next,SFX.list do
if type(L)=="table"then
for i=#L,1,-1 do
if not L[i]:isPlaying()then
rem(L,i)
end
end
end
end

View File

@@ -1,7 +1,6 @@
local gc=love.graphics
local int=math.floor
local format=string.format
local find=string.find
local sub,find,format=string.sub,string.find,string.format
do--setFont
local newFont=gc.setNewFont
@@ -10,33 +9,36 @@ do--setFont
if love.filesystem.getInfo("font.ttf")then
local fontData=love.filesystem.newFile("font.ttf")
function setFont(s)
local f=fontCache[s]
if s~=currentFontSize then
if f then
setNewFont(f)
else
f=newFont(fontData,s)
fontCache[s]=f
setNewFont(f)
if not fontCache[s]then
fontCache[s]=newFont(fontData,s)
end
setNewFont(fontCache[s])
currentFontSize=s
end
return f
end
function getFont(s)
if not fontCache[s]then
fontCache[s]=newFont(fontData,s)
end
return fontCache[s]
end
else
function setFont(s)
local f=fontCache[s]
if s~=currentFontSize then
if f then
setNewFont(f)
else
f=newFont(s)
fontCache[s]=f
setNewFont(f)
if not fontCache[s]then
fontCache[s]=newFont(s)
end
setNewFont(fontCache[s])
currentFontSize=s
end
return f
end
function getFont(s)
if not fontCache[s]then
fontCache[s]=newFont(s)
end
return fontCache[s]
end
end
end
@@ -96,7 +98,7 @@ do--HTTPrequest
url=url,
sink=ltn12.sink.table(data)
}
if not res then
if code~=200 then
LOG.print("NET ERROR: code="..(code or"nil"))
end
return data[1]
@@ -428,7 +430,7 @@ do--json
["{"] = parse_object
}
parse = function(str, idx)
function parse(str, idx)
local chr = str:sub(idx, idx)
local f = char_func_map[chr]
if f then return f(str, idx) end

View File

@@ -12,7 +12,7 @@ local text={
}
function text:reset()
if type(self.text)=="string"then
self.text=gc.newText(setFont(self.font or 30),self.text)
self.text=gc.newText(getFont(self.font or 30),self.text)
end
end
function text:draw()

View File

@@ -142,16 +142,16 @@ local Widgets={
newButton({name="play", x=640,y=600,w=180,h=90, color="lGreen", font=40,code=pressKey("space"),hide=function()return not sceneTemp.pass end}),
},
main={
newButton({name="play", x=150,y=280,w=200,h=160,color="lRed", font=55,code=goScene("mode")}),
newButton({name="setting", x=370,y=280,w=200,h=160,color="lBlue", font=45,code=goScene("setting_game")}),
newButton({name="custom", x=590,y=280,w=200,h=160,color="lOrange",font=43,code=goScene("custom_basic"),hide=function()return not modeRanks.marathon_normal end}),
newButton({name="help", x=150,y=460,w=200,h=160,color="lYellow",font=50,code=goScene("help")}),
newButton({name="stat", x=370,y=460,w=200,h=160,color="lCyan", font=43,code=goScene("stat")}),
newButton({name="qplay", x=590,y=460,w=200,h=160,color="lGreen", font=45,code=function()SCN.push()loadGame(stat.lastPlay,true)end}),
newButton({name="lang", x=150,y=600,w=200,h=80,color="lGreen", font=45,code=goScene("setting_lang")}),
newButton({name="music", x=370,y=600,w=200,h=80,color="lPurple", font=30,code=goScene("music")}),
newButton({name="quit", x=590,y=600,w=200,h=80,color="lGrey", font=45,code=function()VOC.play("bye")SCN.swapTo("quit","slowFade")end}),
newButton({name="minigame", x=780,y=600,w=80, color="black", code=goScene("minigame")}),
newButton({name="play", x=150,y=270,w=200,h=160,color="lRed", font=55,code=goScene("mode")}),
newButton({name="setting", x=370,y=270,w=200,h=160,color="lBlue", font=45,code=goScene("setting_game")}),
newButton({name="custom", x=590,y=270,w=200,h=160,color="lOrange",font=45,code=goScene("custom_basic"),hide=function()return not modeRanks.marathon_normal end}),
newButton({name="help", x=150,y=450,w=200,h=160,color="lYellow",font=50,code=goScene("help")}),
newButton({name="stat", x=370,y=450,w=200,h=160,color="lCyan", font=40,code=goScene("stat")}),
newButton({name="qplay", x=590,y=450,w=200,h=160,color="lGreen", font=45,code=function()SCN.push()loadGame(stat.lastPlay,true)end}),
newButton({name="lang", x=150,y=590,w=200,h=80,color="lGreen", font=45,code=goScene("setting_lang")}),
newButton({name="music", x=370,y=590,w=200,h=80,color="lPurple", font=30,code=goScene("music")}),
newButton({name="quit", x=590,y=590,w=200,h=80,color="lGrey", font=45,code=function()VOC.play("bye")SCN.swapTo("quit","slowFade")end}),
newKey({name="minigame", x=370,y=670,w=200,h=60,color="dGrey", font=30,code=goScene("minigame")}),
},
mode={
newButton({name="start", x=1040,y=655,w=180,h=80,color="white", font=40,code=pressKey("return"),hide=function()return not mapCam.sel end}),
@@ -188,7 +188,9 @@ local Widgets={
newSelector({name="bg", x=1140, y=460, w=220,color="yellow", list=CUSlist.bg, disp=CUSval("bg"), code=function(i)customEnv.bg=i BG.set(i)end}),
newSelector({name="bgm", x=1140, y=540, w=220,color="yellow", list=CUSlist.bgm, disp=CUSval("bgm"), code=function(i)customEnv.bgm=i BGM.play(i)end}),
--Start
--Copy/Paste/Start
newButton({name="copy", x=560, y=530, w=300,h=100, color="lRed", font=25,code=pressKey("cC")}),
newButton({name="paste", x=870, y=530, w=300,h=100, color="lBlue", font=25,code=pressKey("cV")}),
newButton({name="clear", x=560, y=640, w=300,h=100, color="lYellow", font=40,code=pressKey("return")}),
newButton({name="puzzle", x=870, y=640, w=300,h=100, color="lMagenta", font=40,code=pressKey("return2")}),
@@ -200,11 +202,11 @@ local Widgets={
--Rule
newSlider({name="mindas", x=180, y=150,w=400,unit=15,font=25, disp=CUSval("mindas"), code=CUSsto("mindas")}),
newSlider({name="minarr", x=180, y=220,w=400,unit=10,font=25, disp=CUSval("minarr"), code=CUSsto("minarr")}),
newSlider({name="minsdarr", x=180, y=290,w=200,unit=4, font=22, disp=CUSval("minsdarr"),code=CUSsto("minsdarr")}),
newSlider({name="minsdarr", x=180, y=290,w=200,unit=4, font=20, disp=CUSval("minsdarr"),code=CUSsto("minsdarr")}),
newSwitch({name="ospin", x=260, y=380, font=30, disp=CUSval("ospin"), code=CUSrev("ospin")}),
newSwitch({name="noTele", x=260, y=460, font=25, disp=CUSval("noTele"), code=CUSrev("noTele")}),
newSwitch({name="fineKill", x=260, y=530, font=22, disp=CUSval("fineKill"),code=CUSrev("fineKill")}),
newSwitch({name="easyFresh", x=260, y=600, font=18, disp=CUSval("easyFresh"),code=CUSrev("easyFresh")}),
newSwitch({name="fineKill", x=260, y=530, font=20, disp=CUSval("fineKill"),code=CUSrev("fineKill")}),
newSwitch({name="easyFresh", x=260, y=600, font=20, disp=CUSval("easyFresh"),code=CUSrev("easyFresh")}),
newSelector({name="visible", x=800, y=160,w=260,color="lBlue", list=CUSlist.visible, disp=CUSval("visible"), code=CUSsto("visible")}),
newSelector({name="target", x=800, y=260,w=260,color="green", list=CUSlist.target, disp=CUSval("target"), code=CUSsto("target")}),
newSelector({name="freshLimit", x=800, y=360,w=260,color="purple", list=CUSlist.freshLimit,disp=CUSval("freshLimit"),code=CUSsto("freshLimit")}),
@@ -212,10 +214,6 @@ local Widgets={
newSelector({name="life", x=1100, y=260,w=260,color="red", list=CUSlist.life, disp=CUSval("life"), code=CUSsto("life")}),
newSelector({name="pushSpeed", x=1100, y=360,w=260,color="red", list=CUSlist.pushSpeed, disp=CUSval("pushSpeed"),code=CUSsto("pushSpeed")}),
--Copy/Paste
newButton({name="copy", x=560, y=640, w=300,h=100, color="lRed", font=25,code=pressKey("cC")}),
newButton({name="paste", x=870, y=640, w=300,h=100, color="lBlue", font=25,code=pressKey("cV")}),
newButton({name="basic", x=900, y=60, w=220,h=80, color="lBlue", font=25,code=swapScene("custom_basic","swipeR")}),
newButton({name="sequence", x=1140, y=60, w=220,h=80, color="lBlue", font=25,code=swapScene("custom_seq","swipeL")}),
newButton({name="back", x=1140, y=640, w=170,h=80, color="white", font=40,code=BACK}),
@@ -352,7 +350,7 @@ local Widgets={
newButton({name="setting", x=1120, y=70, w=240,h=90, color="lBlue", font=35,code=pressKey("s")}),
newButton({name="replay", x=640, y=250, w=240,h=100,color="lYellow",font=30,code=pressKey("p"),hide=function()return not(game.result or game.replaying)or #players>1 end}),
newButton({name="resume", x=640, y=367, w=240,h=100,color="lGreen", font=30,code=pressKey("escape")}),
newButton({name="restart", x=640, y=483, w=240,h=100,color="lRed", font=33,code=pressKey("r")}),
newButton({name="restart", x=640, y=483, w=240,h=100,color="lRed", font=35,code=pressKey("r")}),
newButton({name="quit", x=640, y=600, w=240,h=100,color="white", font=35,code=BACK}),
},
setting_game={
@@ -384,12 +382,12 @@ local Widgets={
newSwitch({name="grid", x=700, y=240, disp=SETval("grid"), code=SETrev("grid")}),
newSwitch({name="bagLine", x=700, y=300, disp=SETval("bagLine"), code=SETrev("bagLine")}),
newSlider({name="lockFX", x=350, y=350,w=373,unit=5, font=32,disp=SETval("lockFX"), code=SETsto("lockFX")}),
newSlider({name="dropFX", x=350, y=400,w=373,unit=5, font=32,disp=SETval("dropFX"), code=SETsto("dropFX")}),
newSlider({name="moveFX", x=350, y=450,w=373,unit=5, font=32,disp=SETval("moveFX"), code=SETsto("moveFX")}),
newSlider({name="clearFX", x=350, y=500,w=373,unit=5, font=32,disp=SETval("clearFX"), code=SETsto("clearFX")}),
newSlider({name="shakeFX", x=350, y=550,w=373,unit=5, font=32,disp=SETval("shakeFX"), code=SETsto("shakeFX")}),
newSlider({name="atkFX", x=350, y=600,w=373,unit=5, font=32,disp=SETval("atkFX"), code=SETsto("atkFX")}),
newSlider({name="lockFX", x=350, y=350,w=373,unit=5, font=30,disp=SETval("lockFX"), code=SETsto("lockFX")}),
newSlider({name="dropFX", x=350, y=400,w=373,unit=5, font=30,disp=SETval("dropFX"), code=SETsto("dropFX")}),
newSlider({name="moveFX", x=350, y=450,w=373,unit=5, font=30,disp=SETval("moveFX"), code=SETsto("moveFX")}),
newSlider({name="clearFX", x=350, y=500,w=373,unit=5, font=30,disp=SETval("clearFX"), code=SETsto("clearFX")}),
newSlider({name="shakeFX", x=350, y=550,w=373,unit=5, font=30,disp=SETval("shakeFX"), code=SETsto("shakeFX")}),
newSlider({name="atkFX", x=350, y=600,w=373,unit=5, font=30,disp=SETval("atkFX"), code=SETsto("atkFX")}),
newSlider({name="frame", x=350, y=650,w=373,unit=10,font=30,
disp=function()
return setting.frameMul>35 and setting.frameMul/10 or setting.frameMul/5-4
@@ -429,8 +427,8 @@ local Widgets={
newSlider({name="stereo", x=180, y=500,w=400, font=35,change=function()SFX.play("move",1,-1)SFX.play("lock",1,1)end,disp=SETval("stereo"),code=SETsto("stereo"),hide=function()return setting.sfx==0 end}),
newSlider({name="spawn", x=180, y=300,w=400, font=30,change=function()SFX.fplay("spawn_"..rnd(7),setting.spawn)end,disp=SETval("spawn"), code=SETsto("spawn")}),
newSlider({name="bgm", x=180, y=400,w=400, font=35,change=function()BGM.freshVolume()end, disp=SETval("bgm"), code=SETsto("bgm")}),
newSlider({name="vib", x=750, y=200,w=400, unit=5, font=28,change=function()VIB(2)end, disp=SETval("vib"), code=SETsto("vib")}),
newSlider({name="voc", x=750, y=300,w=400, font=32,change=function()VOC.play("test")end, disp=SETval("voc"), code=SETsto("voc")}),
newSlider({name="vib", x=750, y=200,w=400, unit=5, font=25,change=function()VIB(2)end, disp=SETval("vib"), code=SETsto("vib")}),
newSlider({name="voc", x=750, y=300,w=400, font=35,change=function()VOC.play("test")end, disp=SETval("voc"), code=SETsto("voc")}),
newButton({name="back", x=1140, y=640,w=170,h=80,color="white", font=40,code=BACK}),
},
setting_control={
@@ -564,7 +562,7 @@ local Widgets={
newSlider({name="sfx", x=800, y=380, w=180, font=40,change=function()SFX.play("virtualKey",setting.VKSFX)end,disp=SETval("VKSFX"),code=SETsto("VKSFX")}),
newSlider({name="vib", x=800, y=460, w=180,unit=2, font=40,change=function()VIB(setting.VKVIB)end,disp=SETval("VKVIB"),code=SETsto("VKVIB")}),
newSwitch({name="icon", x=850, y=300, font=40,disp=SETval("VKIcon"),code=SETrev("VKIcon")}),
newButton({name="tkset", x=1120, y=420, w=240,h=80,color="white",font=32,
newButton({name="tkset", x=1120, y=420, w=240,h=80,color="white",font=30,
code=function()
SCN.go("setting_trackSetting")
end,
@@ -589,8 +587,9 @@ local Widgets={
newButton({name="back", x=640, y=600,w=200,h=80,color="white", font=35,code=BACK}),
},
minigame={
newButton({name="p15", x=640, y=100,w=350,h=120,color="white",font=40,code=goScene("p15")}),
newButton({name="p15", x=240, y=250,w=350,h=120,color="white",font=40,code=goScene("p15")}),
newButton({name="schulte_G",x=640, y=250,w=350,h=120,color="white",font=40,code=goScene("schulte_G")}),
newButton({name="pong", x=1040, y=250,w=350,h=120,color="white",font=40,code=goScene("pong")}),
newButton({name="back", x=1140, y=640,w=170,h=80,color="white", font=40,code=BACK}),
},
p15={
@@ -603,25 +602,28 @@ local Widgets={
newButton({name="back", x=1140,y=640,w=170,h=80,color="white", font=40,code=BACK}),
},
schulte_G={
newButton({name="reset", x=160,y=100,w=180,h=100,color="lGreen", font=40,code=pressKey("r"),hide=function()return sceneTemp.state==0 end}),
newButton({name="reset", x=160,y=100,w=180,h=100,color="lGreen", font=40,code=pressKey("space"),hide=function()return sceneTemp.state==0 end}),
newSlider({name="rank", x=130,y=250,w=150,unit=3,show=false, font=40,disp=function()return sceneTemp.rank-3 end, code=function(v)sceneTemp.rank=v+3 end,hide=function()return sceneTemp.state>0 end}),
newSwitch({name="blind", x=240,y=330,w=60, font=40,disp=function()return sceneTemp.blind end, code=pressKey("q"),hide=function()return sceneTemp.state==1 end}),
newSwitch({name="disappear",x=240,y=420,w=60, font=40,disp=function()return sceneTemp.disappear end, code=pressKey("w"),hide=function()return sceneTemp.state==1 end}),
newSwitch({name="tapFX", x=240,y=510,w=60, font=40,disp=function()return sceneTemp.tapFX end, code=pressKey("e"),hide=function()return sceneTemp.state==1 end}),
newButton({name="back", x=1140,y=640,w=170,h=80,color="white", font=40,code=BACK}),
},
pong={
newKey({name="reset", x=640,y=45,w=150,h=50,color="white", font=35,code=pressKey("r")}),
newKey({name="back", x=640,y=675,w=150,h=50,color="white", font=35,code=BACK}),
},
help={
newButton({name="dict", x=1140, y=410,w=220,h=70,color="white",font=35,code=goScene("dict")}),
newButton({name="staff", x=1140, y=490,w=220,h=70,color="white",font=35,code=goScene("staff")}),
newButton({name="his", x=1140, y=570,w=220,h=70,color="white",font=35,code=goScene("history")}),
newButton({name="qq", x=1140, y=650,w=220,h=70,color="white",font=35,code=function()love.system.openURL("tencent://message/?uin=1046101471&Site=&Menu=yes")end,hide=mobileHide}),
newButton({name="back", x=640, y=600,w=200,h=80,color="white",font=35,code=BACK}),
newButton({name="back", x=640, y=600,w=170,h=80,color="white",font=35,code=BACK}),
},
dict={
newKey({name="hideKB", x=1050, y=90,w=120,h=120,color="white",font=40,code=pressKey("kb"),hide=function()return not sceneTemp.select end}),
newButton({name="back", x=1190, y=90,w=120,h=120,color="white",font=40,code=BACK}),
newKeyboard({name="kb", x=40, y=280,w=1200,h=420,hide=function()return sceneTemp.select end}),
newKeyboard({name="kb", x=400, y=360,w=840,h=340,hide=function()return not sceneTemp.select or sceneTemp.hideKB end}),
newKey({name="hideKB", x=940,y=70,w=240,h=80,color="white",font=40,code=pressKey("kb"),hide=function()return not sceneTemp.select end}),
newButton({name="back", x=1165,y=70,w=170,h=80,color="white",font=40,code=BACK}),
newKeyboard({name="kb", x=310,y=325,w=940,h=370,hide=function()return sceneTemp.hideKB end}),
},
staff={
newButton({name="back", x=1140, y=640,w=170,h=80,color="white",font=40,code=BACK}),