Compare commits

...

4 Commits

Author SHA1 Message Date
MrZ_26
4bff742b98 0.9.2:全局更新 2020-07-23 22:16:02 +08:00
MrZ_26
b97319afe0 0.9.2:方向键选择控件 2020-07-23 15:12:17 +08:00
MrZ_26
bb2c732529 0.9.2:调试界面,新背景,布局微调 2020-07-23 00:42:47 +08:00
MrZ_26
ae650bd1ff 0.9.2:调试界面,新背景,布局微调 2020-07-21 00:16:15 +08:00
65 changed files with 1319 additions and 793 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -44,21 +44,6 @@ back.rgb={
)
end,
}--Changing pure color
back.strap={
init=function()
t=0
end,
update=function(dt)
t=t+dt
end,
draw=function()
SHADER.strap:send("t",t*.626)
gc.setColor(.4,.626,.626)
gc.setShader(SHADER.strap)
gc.rectangle("fill",0,0,scr.w,scr.h)
gc.setShader()
end,
}--Horizonal ranbow
back.flink={
init=function()
t=0
@@ -95,78 +80,77 @@ back.aura={
back.game1={
init=function()
t=0
BG.resize(scr.w,scr.h)
BG.resize(scr.w)
end,
resize=function(w,h)
SHADER.rainbow:send("w",w*scr.dpi)
SHADER.rainbow:send("h",h*scr.dpi)
resize=function(w)
SHADER.gradient1:send("w",w*scr.dpi)
end,
update=function(dt)
t=t+dt
end,
draw=function()
SHADER.rainbow:send("t",t)
gc.setColor(.6,.6,.6)
gc.setShader(SHADER.rainbow)
SHADER.gradient1:send("t",t)
gc.setShader(SHADER.gradient1)
gc.rectangle("fill",0,0,scr.w,scr.h)
gc.setShader()
end,
}--Rolling rainbow
}--Horizonal red-blue gradient
back.game2={
init=function()
t=0
BG.resize(scr.w,scr.h)
BG.resize(nil,scr.h)
end,
resize=function(w,h)
SHADER.rainbow:send("w",w*scr.dpi)
SHADER.rainbow:send("h",h*scr.dpi)
SHADER.gradient2:send("h",h*scr.dpi)
end,
update=function(dt)
t=t+dt
end,
draw=function()
SHADER.rainbow:send("t",t)
gc.setColor(.7,.4,.4)
gc.setShader(SHADER.rainbow)
SHADER.gradient2:send("t",t)
gc.setShader(SHADER.gradient2)
gc.rectangle("fill",0,0,scr.w,scr.h)
gc.setShader()
end,
}--Red rolling rainbow
}--Vertical red-green gradient
back.game3={
init=function()
t=0
BG.resize(scr.w,scr.h)
end,
resize=function(w,h)
SHADER.rainbow:send("w",w*scr.dpi)
SHADER.rainbow:send("h",h*scr.dpi)
SHADER.rgb1:send("w",w*scr.dpi)
SHADER.rgb1:send("h",h*scr.dpi)
end,
update=function(dt)
t=t+dt
end,
draw=function()
SHADER.rainbow:send("t",t)
gc.setColor(.5,.5,.8)
gc.setShader(SHADER.rainbow)
SHADER.rgb1:send("t",t)
gc.setShader(SHADER.rgb1)
gc.rectangle("fill",0,0,scr.w,scr.h)
gc.setShader()
end,
}--Blue rolling rainbow
}--Colorful RGB
back.game4={
init=function()
t=0
BG.resize(scr.w,scr.h)
end,
resize=function(w,h)
SHADER.rgb2:send("w",w*scr.dpi)
SHADER.rgb2:send("h",h*scr.dpi)
end,
update=function(dt)
t=t+dt
end,
draw=function()
SHADER.strap:send("t",t*1.26)
gc.setColor(.5,.626,.74)
gc.setShader(SHADER.strap)
SHADER.rgb2:send("t",t)
gc.setShader(SHADER.rgb2)
gc.rectangle("fill",0,0,scr.w,scr.h)
gc.setShader()
end,
}--Blue strap
}--Blue RGB
back.game5={
init=function()
t=0
@@ -189,7 +173,7 @@ back.game6={
t=0
colorLib=_G.SKIN.libColor
colorSet=_G.setting.skin
miniBlock=_G.miniBlock
blockImg=_G.TEXTURE.miniBlock
end,
update=function(dt)
t=t+dt
@@ -202,7 +186,7 @@ back.game6={
local R=7-int(t*.5)%7
local _=colorLib[colorSet[R]]
gc.setColor(_[1],_[2],_[3],.1)
gc.draw(miniBlock[R],640,360,t%3.1416*6,400,400,scs[R][0][2]-.5,#blocks[R][0]-scs[R][0][1]+.5)
gc.draw(blockImg[R],640,360,t%3.1416*6,400,400,scs[R][0][2]-.5,#blocks[R][0]-scs[R][0][1]+.5)
end,
}--Fast lightning + spining tetromino
@@ -284,7 +268,7 @@ BG={
update=NULL,
draw=back.none.draw,
}
function BG.set(bg)
function BG.set(bg,data)
if bg==BG.cur or not setting.bg then return end
if BG.discard then
BG.discard()

View File

@@ -1,4 +1,4 @@
return{
local color={
red={1,0,0},
green={0,1,0},
blue={.2,.2,1},
@@ -10,17 +10,21 @@ return{
lightRed={1,.5,.5},
lightGreen={.5,1,.5},
lightBlue={.6,.6,1},
lightYellow={1,1,.5},
lightMagenta={1,.5,1},
lightCyan={.5,1,1},
lightMagenta={1,.5,1},
lightYellow={1,1,.5},
lightPurple={.8,.4,1},
lightOrange={1,.7,.3},
lightGrey={.8,.8,.8},
darkRed={.6,0,0},
darkGreen={0,.6,0},
darkBlue={0,0,.6},
darkYellow={.6,.6,0},
darkMagenta={.6,0,.6},
darkCyan={0,.6,.6},
darkMagenta={.6,0,.6},
darkYellow={.6,.6,0},
darkPurple={.3,0,.6},
darkOrange={.6,.4,0},
darkGrey={.3,.3,.3},
black={0,0,0},
@@ -30,9 +34,26 @@ return{
water={0,1,.6},
bronze={.7,.4,0},
white={1,1,1},
lightOrange={1,.7,.3},
darkOrange={.6,.4,0},
purple={.5,0,1},
lightPurple={.8,.4,1},
darkPurple={.3,0,.6},
}
}
color.lRed= color.lightRed
color.lGreen= color.lightGreen
color.lBlue= color.lightBlue
color.lCyan= color.lightCyan
color.lMagenta= color.lightMagenta
color.lYellow= color.lightYellow
color.lPurple= color.lightPurple
color.lOrange= color.lightOrange
color.lGrey= color.lightGrey
color.dRed= color.darkRed
color.dGreen= color.darkGreen
color.dBlue= color.darkBlue
color.dCyan= color.darkCyan
color.dMagenta= color.darkMagenta
color.dYellow= color.darkYellow
color.dPurple= color.darkPurple
color.dOrange= color.darkOrange
color.dGrey= color.darkGrey
return color

View File

@@ -1,7 +1,7 @@
local IMG={
batteryImage="/mess/power.png",
titleImage="mess/title.png",
coloredTitleImage="mess/title_colored.png",
title="mess/title.png",
title_color="mess/title_colored.png",
dialCircle="mess/dialCircle.png",
dialNeedle="mess/dialNeedle.png",
badgeIcon="mess/badge.png",

View File

@@ -218,7 +218,7 @@ function mouseClick.mode(x,y,k)
cam.x=cam.x-180
end
elseif _ then
loadGame(_)
keyDown.mode("return")
end
end
cam.keyCtrl=false
@@ -247,8 +247,20 @@ end
function keyDown.mode(key)
if key=="return"then
if mapCam.sel then
if mapCam.sel=="custom_clear"or mapCam.sel=="custom_puzzle"then
if customSel[11]>1 then
if customSel[7]==5 then
TEXT.show(text.ai_fixed,640,360,50,"appear")
return
elseif #preBag>0 then
TEXT.show(text.ai_prebag,640,360,50,"appear")
return
end
end
end
mapCam.keyCtrl=false
SCN.push()loadGame(mapCam.sel)
SCN.push()
loadGame(mapCam.sel)
end
elseif key=="escape"then
if mapCam.sel then
@@ -290,8 +302,8 @@ end
local customSet={
{3,20,1,1,7,1,1,1,3,4,1,2,3},
{5,20,1,1,7,1,1,1,8,3,8,3,3},
{1,22,1,1,7,3,1,1,8,4,1,7,7},
{3,20,1,1,7,1,1,3,8,3,1,7,8},
{1,22,1,1,7,3,1,1,8,4,1,6,7},
{3,20,1,1,7,1,1,3,8,3,1,6,8},
{25,11,8,11,4,1,2,1,8,3,1,4,9},
}
function keyDown.custom(key)
@@ -316,6 +328,8 @@ function keyDown.custom(key)
end
elseif key=="q"then
SCN.goto("sequence")
elseif key=="e"then
SCN.swapTo("draw")
elseif #key==1 then
local T=tonumber(key)
if T and T>=1 and T<=5 then
@@ -442,6 +456,8 @@ function keyDown.draw(key)
if sx and sy then
preField[sy][sx]=pen
end
elseif key=="e"then
SCN.swapTo("custom")
elseif key=="escape"then
SCN.back()
elseif key=="c"and kb.isDown("lctrl","rctrl")then
@@ -696,7 +712,16 @@ function gamepadUp.play(key)
end
end
function touchDown.help(id,x,y)
function keyDown.staff(key,RESET)
if key=="escape"then
SCN.back()
elseif key=="\122"then
if RESET or kb.isDown("\109")and kb.isDown("\114")then
SCN.goto("debug")
end
end
end
function touchDown.staff(id,x,y)
local pw=sceneTemp.pw
local t=pw%4
if
@@ -707,8 +732,7 @@ function touchDown.help(id,x,y)
then
pw=pw+1
if pw==8 then
marking=nil
SFX.play("reach")
SCN.goto("debug")
end
else
pw=x<640 and y<360==1 and 1 or 0
@@ -716,66 +740,6 @@ function touchDown.help(id,x,y)
sceneTemp.pw=pw
end
function keyDown.staff(key,RESET)
if key=="escape"then
SCN.back()
elseif key=="\122"then
if RESET or kb.isDown("\109")and kb.isDown("\114")then
sceneTemp.ct=sceneTemp.ct+1
if sceneTemp.ct==5 then
TEXT.show("What are you up to?",640,200,40,"appear",.5)
elseif sceneTemp.ct==10 then
TEXT.show("Stop what you are doing.",640,200,40,"flicker",.5)
elseif sceneTemp.ct==16 then
TEXT.show("RESET ALL DATA?",640,200,40,"appear",.3,.2)
elseif sceneTemp.ct==20 then
TEXT.show("SURE?????",640,200,40,"beat",.3,.2)
elseif sceneTemp.ct==26 then
local L=love.filesystem.getDirectoryItems("")
for i=1,#L do
local s=L[i]
if s:sub(-4)==".dat"then
love.filesystem.remove(s)
end
end
SFX.play("lock")
SFX.play("clear_4")
SFX.play("finesseError_long")
SCN.back()
TEXT.clear()
end
sceneTemp.v=-6.26
marking=nil
SFX.play("reach")
end
end
end
function touchDown.staff(id,x,y)
if #tc.getTouches()==5 then
keyDown.staff('\122',true)
end
end
function keyDown.stat(key)
if key=="u"and kb.isDown("lshift","rshift")then
touchDown.stat()
end
end
function touchDown.stat(id,x,y)
local s=sceneTemp
s.count=s.count+1
if rnd()<.0626 and s.count>26 then
for name,M in next,Modes do
if not modeRanks[name]then
modeRanks[name]=M.score and 0 or 6
end
end
FILE.saveUnlock()
TEXT.show("DEV:\85\78\76\79\67\75\65\76\76",640,360,60,"stretch",.6)
SFX.play("clear_4")
end
end
function wheelMoved.history(x,y)
wheelScroll(y)
end
@@ -1088,7 +1052,7 @@ function love.run()
local R=int(r)%7+1
_=SKIN.libColor[setting.skin[R]]
gc.setColor(_[1],_[2],_[3],min(1-abs(1-r%1*2),.3))
gc.draw(miniBlock[R],mx,my,Timer()%3.1416*4,20,20,scs[2*R]-.5,#blocks[R][0]-scs[2*R-1]+.5)
gc.draw(TEXTURE.miniBlock[R],mx,my,Timer()%3.1416*4,20,20,scs[2*R]-.5,#blocks[R][0]-scs[2*R-1]+.5)
gc.setColor(1,1,1,.5)gc.circle("fill",mx,my,5)
gc.setColor(1,1,1)gc.circle("fill",mx,my,3)
end--Awesome mouse!

View File

@@ -1,7 +1,7 @@
local langList={
{
anykey="按任意键继续",
newVersion="检测到更新!存档格式已修改",
newVersion="检测到更新!",
marking="游戏作者:MrZ_26\n任何视频/直播不得出现此水印\n任何转述声明无效",
lang="中文",
atkModeName={"随机","徽章","击杀","反击"},
@@ -71,6 +71,8 @@ local langList={
nowPlaying="正在播放:",
page="页面:",
ai_fixed="不能同时开启AI和固定序列",
ai_prebag="不能同时开启AI和自定义序列",
settingSaved="设置已保存",
settingSavingError="设置保存失败:",
keyMapSaved="键位设置已保存",
@@ -81,6 +83,10 @@ local langList={
unlockSavingError="解锁保存失败:",
recSavingError="纪录保存失败:",
ai_fixed="不能同时开启AI和固定序列",
ai_prebag="不能同时开启AI和自定义序列",
switchSpawnSFX="请开启方块出生音效",
needRestart="重新开始以生效",
copySuccess="已复制到剪切板",
dataCorrupted="数据损坏",
@@ -146,14 +152,13 @@ local langList={
"",
"使用LOVE2D引擎",
"错误或者建议请附带截图发送到内测群或者作者邮箱~",
"仅通过内测群822023725进行免费下载/更新",
"仅通过内测群1080457319进行免费下载/更新",
"其他渠道获得游戏皆有被修改/加广告/植入病毒的风险,程序只申请了震动&联网权限!",
"若由于被修改的本游戏产生的各种损失作者不负责(我怎么负责啊跟我有啥关系)",
"请从正规途径获得最新版,游戏现为免费,不过有打赏当然感谢啦~",
},
staff={
"作者:MrZ 邮箱:1046101471@qq.com",
"",
"使用LOVE2D引擎",
"",
"程序:MrZ, FinnTenzor",
@@ -161,10 +166,11 @@ local langList={
"音乐:MrZ, (T0722)",
"音效:MrZ",
"语音:Miya, MrZ",
"官网:渣渣120",
"",
"特别感谢:",
"Flyz, Farter, 蕴空之灵,",
"Teatube, [所有内测人员]",
"茶管, 思竣, [所有内测人员]",
},
used=[[
使用工具:
@@ -176,7 +182,7 @@ local langList={
simple-love-lights[dylhunn]
]],
support="支持作者",
group="官方QQ群(如果没有被暗改的话就是这个):822023725",
group="官方QQ群(如果没有被暗改的话就是这个):1080457319",
WidgetText={
main={
play="开始",
@@ -210,8 +216,8 @@ local langList={
set3="无尽(3)",
set4="隐形(4)",
set5="极限(5)",
seq="高级设置(q)",
draw="初始场地编辑",
seq="高级设置(Q)",
draw="初始场地(E)",
back="返回",
},
sequence={
@@ -231,7 +237,7 @@ local langList={
demo="不显示×",
copy="复制",
paste="粘贴",
custom="参数",
custom="参数(E)",
back="返回",
},
play={
@@ -256,7 +262,6 @@ local langList={
quickR="快速重新开始",
swap="组合键切换攻击模式",
fine="极简操作提示音",
spawn="方块生成音",
back="返回",
},
setting_video={
@@ -284,10 +289,11 @@ local langList={
game="←游戏设置",
graphic="画面设置→",
sfx="音效",
stereo="立体声",
spawn="方块生成",
bgm="音乐",
vib="震动",
voc="语音",
stereo="立体声",
back="返回",
},
setting_control={
@@ -364,6 +370,12 @@ local langList={
path="打开存储目录",
back="返回",
},
debug={
killWTM="关闭水印",
unlock="解锁全模式",
reset="清空所有数据",
back="返回",
},
},
modes={
["sprint_10"]= {"竞速", "10L", "消除10行"},
@@ -400,7 +412,8 @@ local langList={
["blind_normal"]= {"隐形", "全隐", "挺强大脑"},
["blind_hard"]= {"隐形", "瞬隐", "很强大脑"},
["blind_lunatic"]= {"隐形", "瞬隐+", "最强大脑"},
["blind_ultimate"]= {"隐形", "", "你准备好了吗"},
["blind_ultimate"]= {"隐形", "啊这", "你准备好了吗"},
["blind_wtf"]= {"隐形", "不会吧", "还没准备好"},
["classic_fast"]= {"高速经典", "CTWC", "高速经典"},
["survivor_easy"]= {"生存", "简单", "你能存活多久?"},
["survivor_normal"]= {"生存", "普通", "你能存活多久?"},
@@ -427,12 +440,12 @@ local langList={
["tech_hard+"]= {"科研", "困难+", "仅允许spin与PC"},
["tech_lunatic"]= {"科研", "疯狂", "禁止断B2B"},
["tech_lunatic+"]= {"科研", "疯狂+", "仅允许spin与PC"},
["tech_ultimate"]= {"科研", "", "强制最简操作"},
["tech_ultimate+"]= {"科研", "+", "禁止普通消除,强制最简操作"},
["tech_finesse"]= {"科研", "", "强制最简操作"},
["tech_finesse+"]= {"科研", "+", "禁止普通消除,强制最简操作"},
["tsd_easy"]= {"TSD挑战", "简单", "你能连续做几个TSD?"},
["tsd_hard"]= {"TSD挑战", "困难", "你能连续做几个TSD?"},
["tsd_ultimate"]= {"TSD挑战", "极限", "你能连续做几个TSD?"},
["zen"]= {"", "", "不限时200行"},
["zen"]= {"", "200", "不限时200行"},
["ultra"]= {"限时打分", "挑战", "在两分钟内尽可能拿到最多的分数"},
["infinite"]= {"无尽", "", "沙盒"},
["infinite_dig"]= {"无尽:挖掘", "", "挖呀挖呀挖"},
@@ -443,7 +456,7 @@ local langList={
},
{
anykey="按任意键继续",
newVersion="检测到更新!存档格式已修改",
newVersion="检测到更新!",
marking="游戏作者:MrZ_26\n任何视频/直播不得出现此水印\n任何转述声明无效",
lang="全中文",
atkModeName={"随机","徽章","击杀","反击"},
@@ -511,6 +524,8 @@ local langList={
nowPlaying="正在播放:",
page="页面:",
ai_fixed="不能同时开启电脑玩家和固定序列",
ai_prebag="不能同时开启电脑玩家和自定义序列",
settingSaved="设置已保存",
settingSavingError="设置保存失败:",
keyMapSaved="键位设置已保存",
@@ -521,6 +536,10 @@ local langList={
unlockSavingError="解锁保存失败:",
recSavingError="纪录保存失败:",
ai_fixed="不能同时开启电脑玩家和固定序列",
ai_prebag="不能同时开启电脑玩家和自定义序列",
switchSpawnSFX="请开启方块出生音效",
needRestart="重新开始以生效",
copySuccess="已复制到剪切板",
dataCorrupted="数据损坏",
@@ -585,25 +604,25 @@ local langList={
"从TO/C2/KOS/TGM3/JS等方块获得过灵感",
"",
"错误或者建议请附带截图发送到内测群或者作者邮箱~",
"仅通过内测群822023725进行免费下载/更新",
"仅通过内测群1080457319进行免费下载/更新",
"其他渠道获得游戏皆有被修改/加广告/植入病毒的风险,程序只申请了震动&联网权限!",
"若由于被修改的本游戏产生的各种损失作者不负责(我怎么负责啊跟我有啥关系)",
"请从正规途径获得最新版,游戏现为免费,不过有打赏当然感谢啦~",
},
staff={
"作者:MrZ 邮箱:1046101471@qq.com",
"",
"使用LOVE2D引擎",
"",
"程序:MrZ, FinnTenzor",
"美术:MrZ, (Gnyar)",
"美术:MrZ, (T0722, Gnyar)",
"音乐:MrZ, (T0722)",
"音效:MrZ",
"语音:Miya, MrZ",
"官网:渣渣120",
"",
"特别感谢:",
"Flyz, Farter, 蕴空之灵,",
"Teatube, [所有内测人员]",
"茶管, 思竣, [所有内测人员]",
},
used=[[
使用工具:
@@ -615,7 +634,7 @@ local langList={
simple-love-lights[dylhunn]
]],
support="支持作者",
group="官方QQ群(如果没有被暗改的话就是这个):822023725",
group="官方QQ群(如果没有被暗改的话就是这个):1080457319",
WidgetText={
main={
play="开始",
@@ -649,8 +668,8 @@ local langList={
set3="无尽(3)",
set4="隐形(4)",
set5="极限(5)",
seq="高级设置(q)",
draw="初始场地编辑",
seq="高级设置(Q)",
draw="初始场地(E)",
back="返回",
},
sequence={
@@ -695,7 +714,6 @@ local langList={
quickR="快速重新开始",
swap="组合键切换攻击模式",
fine="极简操作提示音",
spawn="方块生成音",
back="返回",
},
setting_video={
@@ -723,10 +741,11 @@ local langList={
game="←游戏设置",
graphic="画面设置→",
sfx="音效",
stereo="立体声",
spawn="方块生成",
bgm="音乐",
vib="震动",
voc="语音",
stereo="立体声",
back="返回",
},
setting_control={
@@ -803,6 +822,12 @@ local langList={
path="打开存储目录",
back="返回",
},
debug={
killWTM="关闭水印",
unlock="解锁全模式",
reset="清空所有数据",
back="返回",
},
},
modes={
["sprint_10"]= {"竞速", "10行", "消除10行"},
@@ -839,7 +864,8 @@ local langList={
["blind_normal"]= {"隐形", "全隐", "挺强大脑"},
["blind_hard"]= {"隐形", "瞬隐", "很强大脑"},
["blind_lunatic"]= {"隐形", "瞬隐+", "超强大脑"},
["blind_ultimate"]= {"隐形", "", "你准备好了吗"},
["blind_ultimate"]= {"隐形", "啊这", "你准备好了吗"},
["blind_wtf"]= {"隐形", "不会吧", "还没准备好"},
["classic_fast"]= {"高速经典", "CTWC", "高速经典"},
["survivor_easy"]= {"生存", "简单", "你能存活多久?"},
["survivor_normal"]= {"生存", "普通", "你能存活多久?"},
@@ -866,12 +892,12 @@ local langList={
["tech_hard+"]= {"科研", "困难+", "仅允许回旋与全清"},
["tech_lunatic"]= {"科研", "疯狂", "禁止断B2B"},
["tech_lunatic+"]= {"科研", "疯狂+", "仅允许spin与PC"},
["tech_ultimate"]= {"科研", "", "强制最简操作"},
["tech_ultimate+"]= {"科研", "+", "禁止普通消除,强制最简操作"},
["tech_finesse"]= {"科研", "", "强制最简操作"},
["tech_finesse+"]= {"科研", "+", "禁止普通消除,强制最简操作"},
["tsd_easy"]= {"T2挑战", "简单", "你能连续做几个T旋双清?"},
["tsd_hard"]= {"T2挑战", "困难", "你能连续做几个T旋双清?"},
["tsd_ultimate"]= {"T2挑战", "极限", "你能连续做几个T旋双清?"},
["zen"]= {"", "", "不限时200行"},
["zen"]= {"", "200", "不限时200行"},
["ultra"]= {"限时打分", "挑战", "在两分钟内尽可能拿到最多的分数"},
["infinite"]= {"无尽", "", "沙盒"},
["infinite_dig"]= {"无尽:挖掘", "", "挖呀挖呀挖"},
@@ -882,7 +908,7 @@ local langList={
},
{
anykey="Press any button",
newVersion="Updating detected! Saving format updated",
newVersion="Updating detected!",
marking="Game Author:MrZ_26\nIllegal recording if see this\nAny explanation invalid",
lang="English",
atkModeName={"Random","Badges","K.O.s","Attackers"},
@@ -950,6 +976,8 @@ local langList={
nowPlaying="Now Playing:",
page="Page:",
ai_fixed="AI is incompatible with fixed sequence",
ai_prebag="AI is incompatible with custom sequence",
settingSaved="Settings Saved",
settingSavingError="Failed to save settings:",
keyMapSaved="Key settings saved",
@@ -960,6 +988,10 @@ local langList={
unlockSavingError="Failed to save unlock:",
recSavingError="Failed to save record:",
ai_fixed="AI is incompatible with fixed sequence",
ai_prebag="AI is incompatible with custom sequence",
switchSpawnSFX="Switch on spawn SFX to play",
needRestart="Effective after restart",
copySuccess="Copied successfully",
dataCorrupted="Data corrupted",
@@ -1028,7 +1060,6 @@ local langList={
},
staff={
"Author: MrZ E-mail: 1046101471@qq.com",
"",
"Powered by LOVE2D",
"",
"Program: MrZ, FinnTenzor",
@@ -1036,14 +1067,15 @@ local langList={
"Music: MrZ, (T0722)",
"Sound: MrZ",
"Voice: Miya, MrZ",
"Web: 渣渣120",
"",
"Special Thanks:",
"Flyz, Farter, 蕴空之灵,",
"Teatube, [All test staff]",
"Teatube, 思竣, [All test staff]",
},
used="Tool used:\n\tBeepbox\n\tGFIE\n\tGoldwave\nLib used:\n\tCold_Clear[MinusKelvin]\n\tsimple-love-lights[dylhunn]",
support="Support author",
group="Official QQ Group(if not hacked):822023725",
group="Official QQ Group(if not hacked):1080457319",
WidgetText={
main={
play="Play",
@@ -1077,8 +1109,8 @@ local langList={
set3="Inf. (3)",
set4="Blind (4)",
set5="Master (5)",
seq="Advanced(q)",
draw="Field Edit",
seq="Advanced(Q)",
draw="Field Edit(E)",
back="Back",
},
sequence={
@@ -1098,7 +1130,7 @@ local langList={
demo="Don't show ×",
copy="Copy",
paste="Paste",
custom="Args",
custom="Args(E)",
back="Back",
},
play={
@@ -1123,7 +1155,6 @@ local langList={
quickR="Quick Retry",
swap="Key Combination (Change Atk. Mode)",
fine="Finesse Error Sound",
spawn="Piece Spawning Sound",
back="Back",
},
setting_video={
@@ -1151,10 +1182,11 @@ local langList={
game="←Game",
graphic="Video→",
sfx="SFX",
stereo="Stereo",
spawn="Spawning",
bgm="BGM",
vib="Vibration",
voc="Voice",
stereo="Stereo",
back="Back",
},
setting_control={
@@ -1231,6 +1263,12 @@ local langList={
path="Open Data Folder",
back="Back",
},
debug={
killWTM="kill watermark",
unlock="unlock all",
reset="reset all",
back="Back",
},
},
modes={
["sprint_10"]= {"Sprint", "10L", "Clear 10 lines!"},
@@ -1267,7 +1305,8 @@ local langList={
["blind_normal"]= {"Blind", "ALL", "For intermediate players."},
["blind_hard"]= {"Blind", "SUDDEN", "For experienced players."},
["blind_lunatic"]= {"Blind", "SUDDEN+", "For professionals."},
["blind_ultimate"]= {"Blind", "", "R U Ready?"},
["blind_ultimate"]= {"Blind", "?", "R U Ready?"},
["blind_wtf"]= {"Blind", "WTF", "i m not ready"},
["classic_fast"]= {"Classic", "CTWC", "High-speed classic mode."},
["survivor_easy"]= {"Survivor", "EASY", "How long can you survive?"},
["survivor_normal"]= {"Survivor", "NORMAL", "How long can you survive?"},
@@ -1294,12 +1333,12 @@ local langList={
["tech_hard+"]= {"Tech", "HARD+", "Spin & PC only"},
["tech_lunatic"]= {"Tech", "LUNATIC", "Keep the B2B chain!"},
["tech_lunatic+"]= {"Tech", "LUNATIC+", "Spin & PC only"},
["tech_ultimate"]= {"Tech", "ULTIMATE", "No finesse faults!"},
["tech_ultimate+"]= {"Tech", "ULTIMATE+", "No normal clears, no finesse faults!"},
["tech_finesse"]= {"Tech", "FINESSE", "No finesse faults!"},
["tech_finesse+"]= {"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!"},
["zen"]= {"Zen", "", "200 lines without a time limit."},
["zen"]= {"Zen", "200", "200 lines without a time limit."},
["ultra"]= {"Ultra", "EXTRA", "Get the highest score within 2 min."},
["infinite"]= {"Infinite", "", "Sandbox mode."},
["infinite_dig"]= {"Infinite: Dig", "", "Dig, dig, dig."},
@@ -1310,7 +1349,7 @@ local langList={
},
{
anykey="↓□↓",
newVersion="&!!! ___!",
newVersion="&!!!",
marking="Game Author:MrZ_26\nIllegal recording if see this\nAny explanation invalid",
lang="?????",
atkModeName={"?","( )","!","←→"},
@@ -1378,6 +1417,8 @@ local langList={
nowPlaying="~:",
page=":",
ai_fixed="X!!!",
ai_prebag="X!!!",
settingSaved="~~~",
settingSavingError="x!:",
keyMapSaved="~~~",
@@ -1456,7 +1497,6 @@ local langList={
},
staff={
"Author: MrZ E-mail: 1046101471@qq.com",
"",
"Powered by LOVE2D",
"",
"Program: MrZ, FinnTenzor",
@@ -1464,14 +1504,15 @@ local langList={
"Music: MrZ, (T0722)",
"Sound: MrZ",
"Voice: Miya, MrZ",
"Web: 渣渣120",
"",
"Special Thanks:",
"Flyz, Farter, 蕴空之灵,",
"Teatube, [All test staff]",
"Teatube, 思竣, [All test staff]",
},
used="Tool used:\n\tBeepbox\n\tGFIE\n\tGoldwave\nLib used:\n\tCold_Clear[MinusKelvin]\n\tsimple-love-lights[dylhunn]",
support="Support author",
group="Official QQ Group(if not hacked):822023725",
group="Official QQ Group(if not hacked):1080457319",
WidgetText={
main={
play="!!!",
@@ -1505,8 +1546,8 @@ local langList={
set3="Inf. (3)",
set4="Blind (4)",
set5="Master (5)",
seq="Advanced(q)",
draw="Field Edit",
seq="Advanced(Q)",
draw="####(E)",
back="X",
},
sequence={
@@ -1526,7 +1567,7 @@ local langList={
demo="X ×",
copy="→__",
paste="__→",
custom="_?_",
custom="_?_(E)",
back="X",
},
play={
@@ -1578,10 +1619,11 @@ local langList={
game="←Game",
graphic="Video→",
sfx="#!#",
stereo="←~→",
spawn="#[]#",
bgm="#~#",
vib="=~=",
voc="~~~",
stereo="←~→",
back="X",
},
setting_control={
@@ -1658,6 +1700,12 @@ local langList={
path="_$_",
back="X",
},
debug={
killWTM="kill watermark",
unlock="unlock all",
reset="reset all",
back="X",
},
},
modes={
["sprint_10"]= {"Sprint", "10L", "Clear 10 lines!"},
@@ -1694,7 +1742,8 @@ local langList={
["blind_normal"]= {"Blind", "ALL", "For intermediate players."},
["blind_hard"]= {"Blind", "SUDDEN", "For experienced players."},
["blind_lunatic"]= {"Blind", "SUDDEN+", "For professionals."},
["blind_ultimate"]= {"Blind", "", "R U Ready?"},
["blind_ultimate"]= {"Blind", "?", "R U Ready?"},
["blind_wtf"]= {"Blind", "WTF", "i m not ready"},
["classic_fast"]= {"Classic", "CTWC", "High-speed classic mode."},
["survivor_easy"]= {"Survivor", "EASY", "How long can you survive?"},
["survivor_normal"]= {"Survivor", "NORMAL", "How long can you survive?"},
@@ -1721,12 +1770,12 @@ local langList={
["tech_hard+"]= {"Tech", "HARD+", "Spin & PC only"},
["tech_lunatic"]= {"Tech", "LUNATIC", "Keep the B2B chain!"},
["tech_lunatic+"]= {"Tech", "LUNATIC+", "Spin & PC only"},
["tech_ultimate"]= {"Tech", "ULTIMATE", "No finesse faults!"},
["tech_ultimate+"]= {"Tech", "ULTIMATE+", "No normal clears, no finesse faults!"},
["tech_finesse"]= {"Tech", "FINESSE", "No finesse faults!"},
["tech_finesse+"]= {"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!"},
["zen"]= {"Zen", "", "200 lines without a time limit."},
["zen"]= {"Zen", "200", "200 lines without a time limit."},
["ultra"]= {"Ultra", "EXTRA", "Get the highest score within 2 min."},
["infinite"]= {"Infinite", "", "Sandbox mode."},
["infinite_dig"]= {"Infinite: Dig", "", "Dig, dig, dig."},
@@ -1806,7 +1855,7 @@ function LANG.set(l)
text=langList[l]
for S,L in next,Widgets do
for N,W in next,L do
W.text=text.WidgetText[S][N]
W.text=text.WidgetText[S][W.name]
end
end
for _,s in next,drawableTextLoad do

View File

@@ -29,13 +29,6 @@ local miniTitle_rect={
{14,8,1,6},{19,8,1,6},{15,9,1,1},{16,10,1,1},{17,11,1,1},{18,12,1,1},
{21,8,5,1},{21,13,5,1},{21,9,1,4},{25,9,1,4},
}
local function stencil_miniTitle()
for i=1,#miniTitle_rect do
local a,b,c,d=unpack(miniTitle_rect[i])
gc.rectangle("fill",250+a*30,150+b*30,c*30,d*30)
end
end
FX_attack={}--Attack beam
FX_badge={}--Badge thrown
local function drawAtkPointer(x,y)
@@ -55,7 +48,7 @@ local function VirtualkeyPreview()
gc.setColor(c,1,c,setting.VKAlpha*.1)
gc.setLineWidth(B.r*.07)
gc.circle("line",B.x,B.y,B.r,10)
if setting.VKIcon then gc.draw(VKIcon[i],B.x,B.y,nil,B.r*.025,nil,18,18)end
if setting.VKIcon then gc.draw(TEXTURE.VKIcon[i],B.x,B.y,nil,B.r*.025,nil,18,18)end
end
end
end
@@ -65,6 +58,7 @@ local function drawVirtualkey()
local a=setting.VKAlpha*.1
local _
if setting.VKIcon then
local icons=TEXTURE.VKIcon
for i=1,#V do
if V[i].ava then
local B=V[i]
@@ -72,7 +66,7 @@ local function drawVirtualkey()
gc.setLineWidth(B.r*.07)
gc.circle("line",B.x,B.y,B.r,10)--Button outline
_=V[i].pressTime
gc.draw(VKIcon[i],B.x,B.y,nil,B.r*.026+_*.08,nil,18,18)--icon
gc.draw(icons[i],B.x,B.y,nil,B.r*.026+_*.08,nil,18,18)--icon
if _>0 then
gc.setColor(1,1,1,a*_*.08)
gc.circle("fill",B.x,B.y,B.r*.94,10)--Glow
@@ -115,33 +109,69 @@ function Pnt.load()
setFont(25)
mStr(S.tip,640,400)
end
local titleTransform={
function(t)
gc.translate(0,max(50-t,0)^2/25)
end,
function(t)
gc.translate(0,-max(50-t,0)^2/25)
end,
function(t,i)
local d=max(50-t,0)
gc.translate(sin(Timer()*3+626*i)*d,cos(Timer()*3+626*i)*d)
end,
function(t,i)
local d=max(50-t,0)
gc.translate(sin(Timer()*3+626*i)*d,-cos(Timer()*3+626*i)*d)
end,
function(t)
gc.setColor(1,1,1,min(t*.02,1)+rnd()*.2)
end,
}
function Pnt.intro()
local T=sceneTemp
gc.stencil(stencil_miniTitle,"replace",1)
gc.setStencilTest("equal",1)
gc.setColor(1,1,1,min(T,80)*.005)
gc.push("transform")
gc.translate(250,150)
gc.scale(30)
gc.rectangle("fill",0,0,26,14)
gc.pop()
gc.setColor(1,1,1,.06)
for i=41,5,-2 do
gc.setLineWidth(i)
gc.line(200+(T-80)*25,130,(T-80)*25,590)
local s=sceneTemp
local t=s.t1
local T=(t+110)%300
if T<30 then
gc.setLineWidth(4+(30-T)^1.626/62)
else
gc.setLineWidth(4)
end
local L=title
gc.push("transform")
gc.translate(126,226)
for i=1,8 do
local T=t-i*15
if T>0 then
gc.push("transform")
gc.setColor(1,1,1,min(T*.025,1))
titleTransform[s.r[i]](T,i)
local dt=(t+62-5*i)%300
if dt<20 then
gc.translate(0,abs(10-dt)-10)
end
gc.polygon("line",L[i])
gc.pop()
end
gc.setStencilTest()
if T>=80 then
gc.setColor(1,1,1,.5+sin((T-95)/30*3.142)*.5)
end
gc.pop()
t=s.t2
if t>=80 then
gc.setColor(1,1,1,.6+sin((t-80)*.0626)*.3)
mText(drawableText.anykey,640,615+sin(Timer()*3)*5)
end
end
function Pnt.main()
gc.setColor(1,1,1)
gc.draw(IMG.coloredTitleImage,60,30,nil,1.3)
gc.draw(IMG.title_color,60,30,nil,1.3)
setFont(30)
gc.print(gameVersion,70,125)
gc.print(system,610,100)
local L=text.modes[stat.lastPlay]
setFont(25)
gc.print(L[1],700,470)
gc.print(L[2],700,500)
players[1]:draw()
end
function Pnt.mode()
@@ -265,7 +295,7 @@ function Pnt.mode()
end
if cam.keyCtrl then
gc.setColor(1,1,1)
gc.draw(mapCross,460-20,360-20)
gc.draw(TEXTURE.mapCross,460-20,360-20)
end
end
function Pnt.music()
@@ -280,7 +310,7 @@ function Pnt.music()
for i=1,BGM.len do
gc.print(BGM.list[i],50,90+30*i)
end
gc.draw(IMG.titleImage,640,310,nil,1.5,nil,206,35)
gc.draw(IMG.title,640,310,nil,1.5,nil,206,35)
if BGM.nowPlay then
setFont(45)
gc.setColor(sin(Timer()*.5)*.2+.8,sin(Timer()*.7)*.2+.8,sin(Timer())*.2+.8)
@@ -288,7 +318,7 @@ function Pnt.music()
local t=-Timer()%2.3/2
if t<1 then
gc.setColor(1,1,1,t)
gc.draw(IMG.coloredTitleImage,640,310,nil,1.5+.1-.1*t,1.5+.3-.3*t,206,35)
gc.draw(IMG.title_color,640,310,nil,1.5+.1-.1*t,1.5+.3-.3*t,206,35)
end
end
end
@@ -318,15 +348,15 @@ function Pnt.sequence()
setFont(30)
local bag=preBag
local len=#bag
setFont(40)
gc.print(len,120,300)
local L=miniBlock
local L=TEXTURE.miniBlock
local x,y=120,126
local cx,cy=120,126
for i=1,len do
local B=miniBlock[bag[i]]
local B=L[bag[i]]
gc.draw(B,x,y,nil,15,15,0,B:getHeight()*.5)
x=x+B:getWidth()*15+10
if x>1126 then
@@ -528,7 +558,7 @@ function Pnt.pause()
setFont(26)
for i=1,10 do
gc.print(text.pauseStat[i],40,210+40*i)
gc.printf(_[i],245,210+40*i,250,"right")
gc.printf(_[i],195,210+40*i,300,"right")
end
end
@@ -539,13 +569,28 @@ function Pnt.pause()
gc.push("transform")
gc.translate(1026,400)
--axes
--Polygon
gc.push("transform")
gc.scale((3-2*T)*T)
gc.setColor(1,1,1,T*(.5+.3*sin(Timer()*6.26)))gc.polygon("line",S.standard)
_=S.color
gc.setColor(_[1],_[2],_[3],T*.626)
_=S.val
for i=1,9,2 do
gc.polygon("fill",0,0,_[i],_[i+1],_[i+2],_[i+3])
end
gc.polygon("fill",0,0,_[11],_[12],_[1],_[2])
gc.setColor(1,1,1,T)gc.polygon("line",S.val)
gc.pop()
--Axes
gc.setColor(1,1,1,T)
for i=1,3 do
local x,y=hexList[2*i-1],hexList[2*i]
gc.line(-x,-y,x,y)
end
--Texts
local C
_=Timer()%6.2832
if _>3.1416 then
@@ -560,16 +605,6 @@ function Pnt.pause()
for i=1,6 do
mStr(C[i],_[2*i-1],_[2*i])
end
gc.scale((3-2*T)*T)
gc.setColor(1,1,1,T*(.5+.3*sin(Timer()*6.26)))gc.polygon("line",S.standard)
_=S.color
gc.setColor(_[1],_[2],_[3],T)
_=S.val
for i=1,9,2 do
gc.polygon("fill",0,0,_[i],_[i+1],_[i+2],_[i+3])
end
gc.polygon("fill",0,0,_[11],_[12],_[1],_[2])
gc.setColor(1,1,1,T)gc.polygon("line",S.val)
gc.pop()
end
end
@@ -699,7 +734,7 @@ function Pnt.setting_skin()
gc.circle("fill",-10+140*N,340,sin(Timer()*10)+5)
end
for i=1,6 do
gc.draw(blockSkin[11+i],1110,100+60*i,nil,2)
gc.draw(blockSkin[11+i],570+60*i,610,nil,2)
end
gc.draw(drawableText.setting_skin,80,50)
end
@@ -734,7 +769,7 @@ function Pnt.help()
end
setFont(19)
gc.print(text.used,30,330)
gc.draw(IMG.titleImage,280,610,.1,1+.05*sin(Timer()*2.6),nil,206,35)
gc.draw(IMG.title,280,610,.1,1+.05*sin(Timer()*2.6),nil,206,35)
gc.setLineWidth(3)
gc.rectangle("line",18,18,263,263)
gc.rectangle("line",1012,18,250,250)
@@ -750,17 +785,12 @@ end
function Pnt.staff()
local L=text.staff
local t=sceneTemp.time
if t>0 then
setFont(40)
for i=1,#L do
mStr(L[i],640,800+80*i-t*40)
end
mDraw(IMG.coloredTitleImage,640,800-t*40,nil,2)
mDraw(IMG.coloredTitleImage,640,2160-t*40,nil,2)
else
setFont(60)
mStr("Don't tell this to anyone.",640,-100-t*40)
setFont(40)
for i=1,#L do
mStr(L[i],640,800+80*i-t*40)
end
mDraw(IMG.title_color,640,800-t*40,nil,2)
mDraw(IMG.title_color,640,2160-t*40,nil,2)
end
function Pnt.stat()
local chart=sceneTemp.chart
@@ -803,7 +833,7 @@ function Pnt.stat()
gc.line(40,240+40*y,600,240+40*y)
end
gc.draw(IMG.titleImage,260,615,.2+.04*sin(Timer()*3),nil,nil,206,35)
gc.draw(IMG.title,260,615,.2+.04*sin(Timer()*3),nil,nil,206,35)
end
function Pnt.history()
gc.setColor(.2,.2,.2,.7)

View File

@@ -1,7 +1,7 @@
local gc=love.graphics
local int,log=math.floor,math.log
local sin,cos=math.sin,math.cos
local max,format=math.max,string.format
local int,max,log=math.floor,math.max,math.log
local rnd,sin,cos=math.random,math.sin,math.cos
local format=string.format
local scr=scr
local SCN={
cur="load",--Current scene
@@ -32,12 +32,19 @@ function sceneInit.load()
#Modes,
1,
},
skip=false,--if skipping
skip=false,--If skipped
}
end
function sceneInit.intro()
BG.set("space")
sceneTemp=0--animation timer
sceneTemp={
t1=0,--Timer 1
t2=0,--Timer 2
r={},--Random animation type
}
for i=1,8 do
sceneTemp.r[i]=rnd(5)
end
BGM.play("blank")
end
function sceneInit.main()
@@ -47,13 +54,13 @@ function sceneInit.main()
modeEnv={}
if not players[1]then
PLY.newDemoPlayer(1,900,35,1.1)
end--create demo player
end--Create demo player
end
function sceneInit.music()
if BGM.nowPlay then
for i=1,BGM.len do
if BGM.list[i]==BGM.nowPlay then
sceneTemp=i--music select
sceneTemp=i--Music selected
return
end
end
@@ -74,7 +81,7 @@ function sceneInit.mode(org)
end
end
function sceneInit.custom()
sceneTemp=1--option select
sceneTemp=1--Option selected
destroyPlayers()
BG.set(customRange.bg[customSel[12]])
BGM.play(customRange.bgm[customSel[13]])
@@ -128,19 +135,22 @@ function sceneInit.pause(org)
radar={
(S.off+S.dig)/S.time*60,--DefPM
(S.off)/S.time*60, --OffPM
S.atk/S.time*60, --AtkPM
S.send/S.time*60, --SendPM
S.piece/S.time*24, --LinePM
S.dig/S.time*60, --DigPM
S.atk/S.time*60, --AtkPM
S.send/S.time*60, --SendPM
S.piece/S.time*24, --LinePM
S.dig/S.time*60, --DigPM
},
val={1/80,1/40,1/60,1/60,1/100,1/40},
timing=org=="play",
}
local _=sceneTemp
local A,B=_.radar,_.val
--Normalize Values
for i=1,6 do
B[i]=B[i]*A[i]if B[i]>1.26 then B[i]=1.26+(B[i]-1.26)*.26 end
end--normalize vals
B[i]=B[i]*A[i]if B[i]>1.26 then B[i]=1.26+log(B[i]-.26,10)end
end
for i=1,6 do
A[i]=format("%.2f",A[i])..text.radarData[i]
end
@@ -187,7 +197,7 @@ function sceneInit.setting_control()
dir=1,
wait=30,
}
BG.set("strap")
BG.set("game1")
end
function sceneInit.setting_key()
sceneTemp={
@@ -208,16 +218,13 @@ function sceneInit.setting_touchSwitch()
BG.set("matrix")
end
function sceneInit.help()
sceneTemp={
pw=0,
}
BG.set("space")
end
function sceneInit.staff()
sceneTemp={
pw=0,
time=0,
v=1,
ct=0,
}
BG.set("space")
end
@@ -234,7 +241,6 @@ function sceneInit.stat()
end
end
sceneTemp={
count=0,
chart={
A1=S.spin,A2=S.clear,
X1=X1,X2=X2,
@@ -259,12 +265,21 @@ function sceneInit.stat()
end
end
function sceneInit.history()
BG.set("strap")
BG.set("game1")
sceneTemp={require("parts/updateLog"),1}--scroll pos
end
function sceneInit.debug()
sceneTemp={
ct=0,
}
end
function sceneInit.quit()
love.timer.sleep(.3)
love.event.quit()
if rnd()>.000626 then
love.timer.sleep(.3)
love.event.quit()
else
error("So lucky! 0.0626 precent to get this!!! You can quit the game now.")
end
end

View File

@@ -36,8 +36,8 @@ end
function SFX.fieldPlay(s,v,P)
SFX.play(s,v,(P.curX+P.sc[2]-6.5)*.15)
end
function SFX.play(s,v,pos)
if setting.sfx==0 then return end
function SFX.play(s,vol,pos,force)
if setting.sfx==0 and not force then return end
local S=SFX.list[s]--source list
if not S then return end
local n=1
@@ -58,7 +58,11 @@ function SFX.play(s,v,pos)
S:setPosition(0,0,0)
end
end
S:setVolume((v or 1)*setting.sfx*.1)
if not force then
S:setVolume((vol or 1)*setting.sfx*.1)
else
S:setVolume(vol*.1)
end
S:play()
end
function SFX.reset()

View File

@@ -6,7 +6,9 @@ return{
alpha=N("alpha"),
warning=N("warning"),
rainbow=N("rainbow"),
strap=N("strap"),
aura=N("aura"),
gradient1=N("grad1"),--Horizonal red-blue gradient
gradient2=N("grad2"),--Vertical red-green gradient
rgb1=N("rgb1"),--colorful RGB
rgb2=N("rgb2"),--blue RGB
}

View File

@@ -0,0 +1,10 @@
extern float t,w;
vec4 effect(vec4 color,Image text,vec2 pos,vec2 scr_pos){
float x=scr_pos.x/w;
return vec4(
.8-x*.6,
.3+.2*sin(t),
.15+x*.7,
1.
);
}

View File

@@ -0,0 +1,10 @@
extern float t,h;
vec4 effect(vec4 color,Image text,vec2 pos,vec2 scr_pos){
float y=scr_pos.y/h;
return vec4(
.8-y*.6,
.2+y*.4,
.3+.1*sin(t),
1.
);
}

View File

@@ -1,15 +0,0 @@
#define PI 3.14159265
extern float w,h;
extern float t;
vec4 effect(vec4 color,Image text,vec2 pos,vec2 scr_pos){
float x=scr_pos.x-w/2.;
float y=scr_pos.y-h/2.;
float a=(step(0.,x)*2.-1.)*PI+atan(y,x)+PI*0.5+t*0.626;
return vec4(
color.r*(sin(a+PI*0./3.)*0.3+0.5),
color.g*(sin(a+PI*2./3.)*0.3+0.5),
color.b*(sin(a+PI*4./3.)*0.3+0.5),
1.
);
}

View File

@@ -0,0 +1,11 @@
extern float t,w,h;
vec4 effect(vec4 color,Image text,vec2 pos,vec2 scr_pos){
float x=scr_pos.x/w;
float y=scr_pos.y/h;
return vec4(
.8-y*.6-.2*sin(t/6.26),
.3+.1*sin(t),
.2+x*.6,
1.
);
}

View File

@@ -0,0 +1,11 @@
extern float t,w,h;
vec4 effect(vec4 color,Image text,vec2 pos,vec2 scr_pos){
float x=scr_pos.x/w;
float y=scr_pos.y/h;
return vec4(
.4-y*.3-.1*sin(t/6.26),
.2+.1*sin(t),
abs(.7-x*1.2+y*.5*sin(t/16.)),
1.
);
}

View File

@@ -1,11 +0,0 @@
#define PI 3.14159265
extern float t;
vec4 effect(vec4 color,Image text,vec2 pos,vec2 scr_pos){
float x=scr_pos.x/262.+t;
return vec4(
color.r*(sin(x+PI*0./3.)*0.3+0.5),
color.g*(sin(x+PI*2./3.)*0.3+0.5),
color.b*(sin(x+PI*4./3.)*0.3+0.5),
1.
);
}

View File

@@ -55,8 +55,9 @@ function Tmr.load()
until not S.skip and Timer()-t>.01
end
function Tmr.intro()
sceneTemp=sceneTemp+1
if sceneTemp==200 then sceneTemp=80 end
local s=sceneTemp
s.t1=s.t1+1
s.t2=s.t2+1
end
function Tmr.main(dt)
players[1]:update(dt)

View File

@@ -32,7 +32,7 @@ function toTime(s)
end
end
function mStr(s,x,y)
gc.printf(s,x-400,y,800,"center")
gc.printf(s,x-450,y,900,"center")
end
function mText(s,x,y)
gc.draw(s,x-s:getWidth()*.5,y)

View File

@@ -1,8 +1,9 @@
local gc=love.graphics
local kb=love.keyboard
local int=math.floor
local int,abs=math.floor,math.abs
local format=string.format
local next=next
local color=color
local EMPTY={}
local button={
@@ -15,6 +16,9 @@ end
function button:isAbove(x,y)
return x>self.x-self.ATV and x<self.x+self.w+2*self.ATV and y>self.y-self.ATV and y<self.y+self.h+2*self.ATV
end
function button:getCenter()
return self.x+self.w*.5,self.y+self.h*.5
end
function button:FX()
sysFX.new("ripple",.16,self.x-self.ATV,self.y-self.ATV,self.w+2*self.ATV,self.h+2*self.ATV)
end
@@ -65,6 +69,9 @@ end
function switch:isAbove(x,y)
return x>self.x and x<self.x+50 and y>self.y-25 and y<self.y+25
end
function switch:getCenter()
return self.x,self.y
end
function switch:update()
local _=self.ATV
if WIDGET.sel==self then if _<8 then self.ATV=_+1 end
@@ -77,6 +84,8 @@ function switch:update()
end
function switch:draw()
local x,y=self.x,self.y-25
--Checked
if self.ATV>0 then
gc.setColor(1,1,1,self.ATV*.08)
gc.rectangle("fill",x,y,50,50)
@@ -86,11 +95,13 @@ function switch:draw()
gc.setLineWidth(6)
gc.line(x+5,y+25,x+18,y+38,x+45,y+11)
end
--checked
--Frame
gc.setLineWidth(4)
gc.setColor(1,1,1,.6+self.ATV*.05)
gc.rectangle("line",x,y,50,50)
--frame
--Text
local t=self.text
if t then
gc.setColor(1,1,1)
@@ -114,11 +125,15 @@ end
function slider:isAbove(x,y)
return x>self.x-10 and x<self.x+self.w+10 and y>self.y-20 and y<self.y+20
end
function slider:getCenter()
return self.x+self.w*(self.pos/self.unit),self.y
end
function slider:update()
local _=self.ATV
if WIDGET.sel==self then
if self.ATV<6 then self.ATV=self.ATV+1 end
if _<6 then self.ATV=_+1 end
else
if self.ATV>0 then self.ATV=self.ATV-1 end
if _>0 then self.ATV=_-1 end
end
if not(self.hide and self.hide())then
self.pos=self.pos*.7+self.disp()*.3
@@ -126,6 +141,8 @@ function slider:update()
end
function slider:draw()
local x,y=self.x,self.y
--Units
gc.setColor(1,1,1,.5+self.ATV*.06)
gc.setLineWidth(2)
local x1,x2=x,x+self.w
@@ -133,17 +150,20 @@ function slider:draw()
local x=x1+(x2-x1)*p/self.unit
gc.line(x,y+7,x,y-7)
end
--units
--Axis
gc.setLineWidth(4)
gc.line(x1,y,x2,y)
--axis
--Text
local t=self.text
if t then
gc.setColor(1,1,1)
setFont(self.font)
gc.printf(t,x-312,y-self.font*.7,300,"right")
end
--text
--Block
local x,y,w,h=x1+(x2-x1)*self.pos/self.unit-10-self.ATV*.5,y-16-self.ATV,20+self.ATV,32+2*self.ATV
gc.setColor(.8,.8,.8)
gc.rectangle("fill",x,y,w,h)
@@ -152,7 +172,6 @@ function slider:draw()
gc.setColor(1,1,1,self.ATV*.16)
gc.rectangle("line",x+1,y+1,w-2,h-2)
end
--block
end
function slider:getInfo()
print(format("x=%d,y=%d,w=%d",self.x,self.y,self.w))
@@ -172,36 +191,96 @@ function WIDGET.set(L)
end
WIDGET.new={}
function WIDGET.new.button(x,y,w,h,color,font,code,hide,N)
function WIDGET.newText(D)
local _={
x=x-w*.5,y=y-h*.5,
w=w,h=h,
color=color,
font=font,
code=code,
hide=hide,
next=N,
name= D.name,
x= D.x,
y= D.y,
align= D.align,
color= color[D.color]or D.color,
font= D.font,
hide= D.hide,
}for k,v in next,button do _[k]=v end return _
end
function WIDGET.new.switch(x,y,font,disp,code,hide,N)
function WIDGET.newImage(D)
local _={
x=x,y=y,font=font,
disp=disp,
code=code,
hide=hide,
next=N,
name= D.name,
x= D.x-w*.5,
y= D.y-h*.5,
w= D.w,
h= D.h,
color= color[D.color]or D.color,
font= D.font,
code= D.code,
hide= D.hide,
}for k,v in next,button do _[k]=v end return _
end
function WIDGET.newButton(D)
local _={
name= D.name,
x= D.x-D.w*.5,
y= D.y-D.h*.5,
w= D.w,
h= D.h,
resCtr={
D.x,D.y,
D.x-D.w*.35,D.y-D.h*.35,
D.x-D.w*.35,D.y+D.h*.35,
D.x+D.w*.35,D.y-D.h*.35,
D.x+D.w*.35,D.y+D.h*.35,
},
color= color[D.color]or D.color,
font= D.font,
code= D.code,
hide= D.hide,
}for k,v in next,button do _[k]=v end return _
end
function WIDGET.newSwitch(D)
local _={
name= D.name,
x= D.x,
y= D.y,
cx= D.x+25,
cy= D.y,
resCtr={
D.x+25,D.y,
},
font= D.font,
disp= D.disp,
code= D.code,
hide= D.hide,
}for k,v in next,switch do _[k]=v end return _
end
function WIDGET.new.slider(x,y,w,unit,font,change,disp,code,hide,N)
function WIDGET.newSlider(D)
local _={
x=x,y=y,
w=w,unit=unit,
font=font,
change=change,
disp=disp,
code=code,
hide=hide,
next=N,
name= D.name,
x= D.x,
y= D.y,
w= D.w,
cx= D.x+D.w*.5,
cy= D.y,
resCtr={
D.x,D.y,
D.x+D.w*.25,D.y,
D.x+D.w*.5,D.y,
D.x+D.w*.75,D.y,
D.x+D.w,D.y,
},
unit= D.unit,
font= D.font,
change= D.change,
disp= D.disp,
code= D.code,
hide= D.hide,
}for k,v in next,slider do _[k]=v end return _
end
@@ -247,27 +326,74 @@ function WIDGET.drag(x,y,dx,dy)
end
end
function WIDGET.keyPressed(i)
if i=="tab"then
if i=="space"or i=="return"then
if WIDGET.sel then
WIDGET.sel=kb.isDown("lshift")and WIDGET.sel.prev or WIDGET.sel.next or WIDGET.sel
else
WIDGET.sel=select(2,next(WIDGET.active))
WIDGET.press()
end
elseif i=="space"or i=="return"then
if WIDGET.sel then
WIDGET.press(WIDGET.sel)
end
elseif i=="left"or i=="right"then
local W=WIDGET.sel
if W then
if W.type=="slider"then
local p=W.disp()
local P=i=="left"and(p>0 and p-1)or p<W.unit and p+1
if p==P or not P then return end
W.code(P)
if W.change then W.change()end
elseif kb.isDown("lshift","lalt","lctrl")then
--when hold [↑], control slider with left/right
if i=="left"or i=="right"then
local W=WIDGET.sel
if W then
if W.type=="slider"then
local p=W.disp()
local P=i=="left"and(p>0 and p-1)or p<W.unit and p+1
if p==P or not P then return end
W.code(P)
if W.change then W.change()end
end
end
end
elseif i=="up"or i=="down"or i=="left"or i=="right"then
if WIDGET.sel then
local W=WIDGET.sel
local WX,WY=W:getCenter()
local dir=(i=="right"or i=="down")and 1 or -1
local tar
local minDist=1e99
if i=="left"or i=="right"then
for i=1,#WIDGET.active do
local W1=WIDGET.active[i]
if W~=W1 then
local L=W1.resCtr
for j=1,#L,2 do
local x,y=L[j],L[j+1]
local dist=(x-WX)*dir
if dist>10 then
dist=dist+abs(y-WY)*6.26
if dist<minDist then
minDist=dist
tar=W1
end
end
end
end
end
else
for i=1,#WIDGET.active do
local W1=WIDGET.active[i]
if W~=W1 then
local L=W1.resCtr
for j=1,#L,2 do
local x,y=L[j],L[j+1]
local dist=(y-WY)*dir
if dist>10 then
dist=dist+abs(x-WX)*6.26
if dist<minDist then
minDist=dist
tar=W1
end
end
end
end
end
end
if tar then
WIDGET.sel=tar
end
else
WIDGET.sel=WIDGET.active[1]
end
end
end
function WIDGET.gamepadPressed(i)
@@ -296,7 +422,9 @@ function WIDGET.gamepadPressed(i)
end
function WIDGET.update()
for _,W in next,WIDGET.active do W:update()end
for _,W in next,WIDGET.active do
W:update()
end
end
function WIDGET.draw()
for _,W in next,WIDGET.active do

View File

@@ -74,7 +74,7 @@ local virtualkeySet={
},--PC key feedback(top&in a row)
}
--lambda Funcs for widgets,delete at file end
--Lambda Funcs for widgets,delete at file end
local function SETval(k) return function()return setting[k] end end
local function SETsto(k) return function(i)setting[k]=i end end
local function SETrev(k) return function()setting[k]=not setting[k] end end
@@ -86,248 +86,261 @@ local function nextDir(n) return function()SKIN.rotate(n) end end
local function VKAdisp(n) return function()return VK_org[n].ava end end
local function VKAcode(n) return function()VK_org[n].ava=not VK_org[n].ava end end
local function setLang(n) return function()LANG.set(n)setting.lang=n end end
local newButton,newSwitch,newSlider=WIDGET.new.button,WIDGET.new.switch,WIDGET.new.slider
--newXXX
newText=WIDGET.newText
newImage=WIDGET.newImage
newButton=WIDGET.newButton
newSwitch=WIDGET.newSwitch
newSlider=WIDGET.newSlider
local C=color
--All widgets
local Widgets={
load={},intro={},quit={},
main={
play= newButton(150,280,200,160,C.lightRed, 55,function()SCN.goto("mode")end, nil,"setting"),
setting=newButton(370,280,200,160,C.lightBlue, 45,function()SCN.goto("setting_game")end, nil,"music"),
music= newButton(590,280,200,160,C.lightPurple, 32,function()SCN.goto("music")end, nil,"help"),
help= newButton(150,460,200,160,C.lightYellow, 50,function()SCN.goto("help")end, nil,"stat"),
stat= newButton(370,460,200,160,C.lightCyan, 43,function()SCN.goto("stat")end, nil,"qplay"),
qplay= newButton(590,460,200,160,C.lightOrange, 43,function()SCN.push()loadGame(stat.lastPlay)end, nil,"lang"),
lang= newButton(150,610,160,100,C.lightGreen, 45,function()SCN.goto("setting_lang")end, nil,"quit"),
quit= newButton(590,610,160,100,C.lightGrey, 45,function()VOC.play("bye")SCN.swapTo("quit","slowFade")end,nil,"play"),
newButton({name="play", x=150,y=280,w=200,h=160,color="lRed", font=55,code=function()SCN.goto("mode")end}),
newButton({name="setting", x=370,y=280,w=200,h=160,color="lBlue", font=45,code=function()SCN.goto("setting_game")end}),
newButton({name="music", x=590,y=280,w=200,h=160,color="lPurple",font=32,code=function()SCN.goto("music")end}),
newButton({name="help", x=150,y=460,w=200,h=160,color="lYellow",font=50,code=function()SCN.goto("help")end}),
newButton({name="stat", x=370,y=460,w=200,h=160,color="lCyan", font=43,code=function()SCN.goto("stat")end}),
newButton({name="qplay", x=590,y=460,w=200,h=160,color="lOrange",font=43,code=function()SCN.push()loadGame(stat.lastPlay)end}),
newButton({name="lang", x=150,y=610,w=160,h=100,color="lGreen", font=45,code=function()SCN.goto("setting_lang")end}),
newButton({name="quit", x=590,y=610,w=160,h=100,color="lGrey", font=45,code=function()VOC.play("bye")SCN.swapTo("quit","slowFade")end}),
},
mode={
setting=newButton(1100, 540,240,90,C.lightGreen, 40,function()SCN.goto("custom")end,function()return mapCam.sel~="custom_clear" and mapCam.sel~="custom_puzzle" end),
start= newButton(1040, 655,180,80,C.lightGrey, 40,function()if mapCam.sel then SCN.push()loadGame(mapCam.sel)end end,function()return not mapCam.sel end),
back= newButton(1200, 655,120,80,C.white, 40,BACK),
newButton({name="setting",x=1100,y=540,w=240,h=90,color="lGreen", font=40,code=function()
SCN.goto("custom")
end,
hide=function()
return mapCam.sel~="custom_clear" and mapCam.sel~="custom_puzzle"
end}),
newButton({name="start", x=1040,y=655,w=180,h=80,color="lGrey", font=40,code=pressKey("return"),hide=function()return not mapCam.sel end}),
newButton({name="back", x=1200,y=655,w=120,h=80,color="white", font=40,code=BACK}),
},
music={
bgm= newSlider(760, 80,400,10,35,function()BGM.freshVolume()end,SETval("bgm"),SETsto("bgm")),
up= newButton(1100, 200,120,120,C.white, 55,pressKey("up")),
play= newButton(1100, 340,120,120,C.white, 35,pressKey("space"),function()return setting.bgm==0 end),
down= newButton(1100, 480,120,120,C.white, 55,pressKey("down")),
back= newButton(640, 630,230,90, C.white, 40,BACK),
newSlider({name="bgm", x=760, y=80, w=400,unit=10, font=35,change=function()BGM.freshVolume()end,disp=SETval("bgm"),code=SETsto("bgm")}),
newButton({name="up", x=1100, y=200, w=120,h=120, color="white", font=55,code=pressKey("up")}),
newButton({name="play", x=1100, y=340, w=120,h=120, color="white", font=35,code=pressKey("space"),hide=function()return setting.bgm==0 end}),
newButton({name="down", x=1100, y=480, w=120,h=120, color="white", font=55,code=pressKey("down")}),
newButton({name="back", x=640, y=630, w=230,h=90, color="white", font=40,code=BACK}),
},
custom={
up= newButton(1140, 100,100,100,C.white, 45,function()sceneTemp=(sceneTemp-2)%#customID+1 end),
down= newButton(1140, 340,100,100,C.white, 45,function()sceneTemp=sceneTemp%#customID+1 end),
left= newButton(1080, 220,100,100,C.white, 45,pressKey("left")),
right= newButton(1200, 220,100,100,C.white, 45,pressKey("right")),
newButton({name="up", x=1140, y=100, w=100,h=100, color="white", font=45,code=function()sceneTemp=(sceneTemp-2)%#customID+1 end}),
newButton({name="down", x=1140, y=340, w=100,h=100, color="white", font=45,code=function()sceneTemp=sceneTemp%#customID+1 end}),
newButton({name="left", x=1080, y=220, w=100,h=100, color="white", font=45,code=pressKey("left")}),
newButton({name="right", x=1200, y=220, w=100,h=100, color="white", font=45,code=pressKey("right")}),
set1= newButton(940, 320,260,70, C.lightYellow, 32,pressKey("1")),
set2= newButton(940, 400,260,70, C.lightYellow, 32,pressKey("2")),
set3= newButton(940, 480,260,70, C.lightYellow, 32,pressKey("3")),
set4= newButton(940, 560,260,70, C.lightYellow, 32,pressKey("4")),
set5= newButton(940, 640,260,70, C.lightYellow, 32,pressKey("5")),
newButton({name="set1", x=940, y=320, w=260,h=70, color="lYellow",font=32,code=pressKey("1")}),
newButton({name="set2", x=940, y=400, w=260,h=70, color="lYellow",font=32,code=pressKey("2")}),
newButton({name="set3", x=940, y=480, w=260,h=70, color="lYellow",font=32,code=pressKey("3")}),
newButton({name="set4", x=940, y=560, w=260,h=70, color="lYellow",font=32,code=pressKey("4")}),
newButton({name="set5", x=940, y=640, w=260,h=70, color="lYellow",font=32,code=pressKey("5")}),
seq= newButton(665, 415,200,40, C.lightGreen, 30,function()SCN.goto("sequence")end),
draw= newButton(150, 80, 220,80, C.white, 35,function()SCN.swapTo("draw")end),
back= newButton(1200, 640,120,120,C.white, 35,BACK),
newButton({name="seq", x=665, y=415, w=200,h=40, color="lGreen", font=30,code=pressKey("q")}),
newButton({name="draw", x=150, y=80, w=220,h=80, color="white", font=35,code=pressKey("e")}),
newButton({name="back", x=1200, y=640, w=120,h=120, color="white", font=35,code=BACK}),
},
sequence={
Z= newButton(150, 440,90, 90,C.white, 50,pressKey(1)),
S= newButton(250, 440,90, 90,C.white, 50,pressKey(2)),
J= newButton(350, 440,90, 90,C.white, 50,pressKey(3)),
L= newButton(450, 440,90, 90,C.white, 50,pressKey(4)),
T= newButton(550, 440,90, 90,C.white, 50,pressKey(5)),
O= newButton(650, 440,90, 90,C.white, 50,pressKey(6)),
I= newButton(750, 440,90, 90,C.white, 50,pressKey(7)),
newButton({name="Z", x=150, y=440, w=90,h=90, color="white", font=50,code=pressKey(1)}),
newButton({name="S", x=250, y=440, w=90,h=90, color="white", font=50,code=pressKey(2)}),
newButton({name="J", x=350, y=440, w=90,h=90, color="white", font=50,code=pressKey(3)}),
newButton({name="L", x=450, y=440, w=90,h=90, color="white", font=50,code=pressKey(4)}),
newButton({name="T", x=550, y=440, w=90,h=90, color="white", font=50,code=pressKey(5)}),
newButton({name="O", x=650, y=440, w=90,h=90, color="white", font=50,code=pressKey(6)}),
newButton({name="I", x=750, y=440, w=90,h=90, color="white", font=50,code=pressKey(7)}),
Z5= newButton(150, 540,90, 90,C.white, 50,pressKey(8)),
S5= newButton(250, 540,90, 90,C.white, 50,pressKey(9)),
P= newButton(350, 540,90, 90,C.white, 50,pressKey(10)),
Q= newButton(450, 540,90, 90,C.white, 50,pressKey(11)),
F= newButton(550, 540,90, 90,C.white, 50,pressKey(12)),
E= newButton(650, 540,90, 90,C.white, 50,pressKey(13)),
T5= newButton(750, 540,90, 90,C.white, 50,pressKey(14)),
U= newButton(850, 540,90, 90,C.white, 50,pressKey(15)),
V= newButton(950, 540,90, 90,C.white, 50,pressKey(16)),
W= newButton(150, 640,90, 90,C.white, 50,pressKey(17)),
X= newButton(250, 640,90, 90,C.white, 50,pressKey(18)),
J5= newButton(350, 640,90, 90,C.white, 50,pressKey(19)),
L5= newButton(450, 640,90, 90,C.white, 50,pressKey(20)),
R= newButton(550, 640,90, 90,C.white, 50,pressKey(21)),
Y= newButton(650, 640,90, 90,C.white, 50,pressKey(22)),
N= newButton(750, 640,90, 90,C.white, 50,pressKey(23)),
H= newButton(850, 640,90, 90,C.white, 50,pressKey(24)),
I5= newButton(950, 640,90, 90,C.white, 50,pressKey(25)),
newButton({name="Z5", x=150, y=540, w=90,h=90, color="dGrey",font=50,code=pressKey(8)}),
newButton({name="S5", x=250, y=540, w=90,h=90, color="dGrey",font=50,code=pressKey(9)}),
newButton({name="P", x=350, y=540, w=90,h=90, color="dGrey",font=50,code=pressKey(10)}),
newButton({name="Q", x=450, y=540, w=90,h=90, color="dGrey",font=50,code=pressKey(11)}),
newButton({name="F", x=550, y=540, w=90,h=90, color="dGrey",font=50,code=pressKey(12)}),
newButton({name="E", x=650, y=540, w=90,h=90, color="dGrey",font=50,code=pressKey(13)}),
newButton({name="T5", x=750, y=540, w=90,h=90, color="dGrey",font=50,code=pressKey(14)}),
newButton({name="U", x=850, y=540, w=90,h=90, color="dGrey",font=50,code=pressKey(15)}),
newButton({name="V", x=950, y=540, w=90,h=90, color="dGrey",font=50,code=pressKey(16)}),
newButton({name="W", x=150, y=640, w=90,h=90, color="dGrey",font=50,code=pressKey(17)}),
newButton({name="X", x=250, y=640, w=90,h=90, color="dGrey",font=50,code=pressKey(18)}),
newButton({name="J5", x=350, y=640, w=90,h=90, color="dGrey",font=50,code=pressKey(19)}),
newButton({name="L5", x=450, y=640, w=90,h=90, color="dGrey",font=50,code=pressKey(20)}),
newButton({name="R", x=550, y=640, w=90,h=90, color="dGrey",font=50,code=pressKey(21)}),
newButton({name="Y", x=650, y=640, w=90,h=90, color="dGrey",font=50,code=pressKey(22)}),
newButton({name="N", x=750, y=640, w=90,h=90, color="dGrey",font=50,code=pressKey(23)}),
newButton({name="H", x=850, y=640, w=90,h=90, color="dGrey",font=50,code=pressKey(24)}),
newButton({name="I5", x=950, y=640, w=90,h=90, color="dGrey",font=50,code=pressKey(25)}),
left= newButton(850, 440,90, 90,C.lightGreen, 55,pressKey("left")),
right= newButton(950, 440,90, 90,C.lightGreen, 55,pressKey("right")),
backsp= newButton(1050, 440,90, 90,C.lightRed, 50,pressKey("backspace")),
reset= newButton(1050, 540,90, 90,C.lightRed, 50,pressKey("delete")),
back= newButton(1200, 640,120,120,C.white, 35,BACK),
newButton({name="left", x=850, y=440, w=90,h=90, color="lGreen", font=55,code=pressKey("left")}),
newButton({name="right", x=950, y=440, w=90,h=90, color="lGreen", font=55,code=pressKey("right")}),
newButton({name="backsp", x=1050, y=440, w=90,h=90, color="lRed", font=50,code=pressKey("backspace")}),
newButton({name="reset", x=1050, y=540, w=90,h=90, color="lRed", font=50,code=pressKey("delete")}),
newButton({name="back", x=1200, y=640, w=120,h=120, color="white", font=35,code=BACK}),
},
draw={
b1= newButton(500+65*1, 150,58,58,C.red, 30,setPen(1)),--B1
b2= newButton(500+65*2, 150,58,58,C.orange, 30,setPen(2)),--B2
b3= newButton(500+65*3, 150,58,58,C.yellow, 30,setPen(3)),--B3
b4= newButton(500+65*4, 150,58,58,C.grass, 30,setPen(4)),--B4
b5= newButton(500+65*5, 150,58,58,C.green, 30,setPen(5)),--B5
b6= newButton(500+65*6, 150,58,58,C.water, 30,setPen(6)),--B6
b7= newButton(500+65*7, 150,58,58,C.cyan, 30,setPen(7)),--B7
b8= newButton(500+65*8, 150,58,58,C.blue, 30,setPen(8)),--B8
b9= newButton(500+65*9, 150,58,58,C.purple, 30,setPen(9)),--B9
b10= newButton(500+65*10,150,58,58,C.magenta, 30,setPen(10)),--B10
b11= newButton(500+65*11,150,58,58,C.pink, 30,setPen(11)),--B11
newButton({name="b1", x=500+65*1, y=150,w=58,h=58, color="red", font=30,code=setPen(1)}),--B1
newButton({name="b2", x=500+65*2, y=150,w=58,h=58, color="orange", font=30,code=setPen(2)}),--B2
newButton({name="b3", x=500+65*3, y=150,w=58,h=58, color="yellow", font=30,code=setPen(3)}),--B3
newButton({name="b4", x=500+65*4, y=150,w=58,h=58, color="grass", font=30,code=setPen(4)}),--B4
newButton({name="b5", x=500+65*5, y=150,w=58,h=58, color="green", font=30,code=setPen(5)}),--B5
newButton({name="b6", x=500+65*6, y=150,w=58,h=58, color="water", font=30,code=setPen(6)}),--B6
newButton({name="b7", x=500+65*7, y=150,w=58,h=58, color="cyan", font=30,code=setPen(7)}),--B7
newButton({name="b8", x=500+65*8, y=150,w=58,h=58, color="blue", font=30,code=setPen(8)}),--B8
newButton({name="b9", x=500+65*9, y=150,w=58,h=58, color="purple", font=30,code=setPen(9)}),--B9
newButton({name="b10", x=500+65*10,y=150,w=58,h=58, color="magenta",font=30,code=setPen(10)}),--B10
newButton({name="b11", x=500+65*11,y=150,w=58,h=58, color="pink", font=30,code=setPen(11)}),--B11
b12= newButton(500+65*1, 230,58,58,C.darkGrey, 30,setPen(12)),--Bone
b13= newButton(500+65*2, 230,58,58,C.grey, 30,setPen(13)),--GB1
b14= newButton(500+65*3, 230,58,58,C.lightGrey, 30,setPen(14)),--GB2
b15= newButton(500+65*4, 230,58,58,C.darkPurple, 30,setPen(15)),--GB3
b16= newButton(500+65*5, 230,58,58,C.darkRed, 30,setPen(16)),--GB4
b17= newButton(500+65*6, 230,58,58,C.darkGreen, 30,setPen(17)),--GB5
newButton({name="b12", x=500+65*1, y=230,w=58,h=58, color="dGrey", font=30,code=setPen(12)}),--Bone
newButton({name="b13", x=500+65*2, y=230,w=58,h=58, color="grey", font=30,code=setPen(13)}),--GB1
newButton({name="b14", x=500+65*3, y=230,w=58,h=58, color="lGrey", font=30,code=setPen(14)}),--GB2
newButton({name="b15", x=500+65*4, y=230,w=58,h=58, color="dPurple",font=30,code=setPen(15)}),--GB3
newButton({name="b16", x=500+65*5, y=230,w=58,h=58, color="dRed", font=30,code=setPen(16)}),--GB4
newButton({name="b17", x=500+65*6, y=230,w=58,h=58, color="dGreen", font=30,code=setPen(17)}),--GB5
any= newButton(600, 360,120,120,C.lightGrey, 40,setPen(0)),
space= newButton(730, 360,120,120,C.grey, 65,setPen(-1)),
clear= newButton(1200, 500,120,120,C.white, 40,pressKey("delete")),
demo= newSwitch(755, 640,30,function()return sceneTemp.demo end,function()sceneTemp.demo=not sceneTemp.demo end),
copy= newButton(920, 640,120,120,C.lightRed, 35,function()copyBoard()end),
paste= newButton(1060, 640,120,120,C.lightBlue, 35,function()pasteBoard()end),
custom= newButton(110, 80, 140,80, C.white, 35,function()SCN.goto("custom")end),
back= newButton(1200, 640,120,120,C.white, 35,BACK),
newButton({name="any", x=600, y=360, w=120,h=120, color="lGrey", font=40,code=setPen(0)}),
newButton({name="space", x=730, y=360, w=120,h=120, color="grey", font=65,code=setPen(-1)}),
newButton({name="clear", x=1200, y=500, w=120,h=120, color="white", font=40,code=pressKey("delete")}),
newSwitch({name="demo", x=755, y=640, font=30,disp=function()return sceneTemp.demo end,code=function()sceneTemp.demo=not sceneTemp.demo end}),
newButton({name="copy", x=920, y=640, w=120,h=120, color="lRed", font=35,code=function()copyBoard()end}),
newButton({name="paste", x=1060, y=640, w=120,h=120, color="lBlue", font=35,code=function()pasteBoard()end}),
newButton({name="custom", x=110, y=80, w=140,h=80, color="white", font=35,code=function()SCN.goto("custom")end}),
newButton({name="back", x=1200, y=640, w=120,h=120, color="white", font=35,code=BACK}),
},
play={
pause= newButton(1235,45,80,80,C.white,25,function()pauseGame()end),
newButton({name="pause", x=1235, y=45, w=80,h=80, color="white", font=25,code=function()pauseGame()end}),
},
pause={
resume= newButton(640,290,240,100,C.white,30,function()resumeGame()end),
restart=newButton(640,445,240,100,C.white,33,function()
newButton({name="resume", x=640,y=290,w=240,h=100,color="white",font=30,code=function()resumeGame()end}),
newButton({name="restart", x=640,y=445,w=240,h=100,color="white",font=33,code=function()
TASK.removeTask_code(TICK.autoPause)
mergeStat(stat,players[1].stat)
resetGameData()
SCN.swapTo("play","none")
end),
setting=newButton(1120,70,240,90,C.lightBlue,35,function()
end}),
newButton({name="setting", x=1120, y=70, w=240,h=90, color="lBlue",font=35,code=function()
SCN.goto("setting_sound")
end),
quit= newButton(640,600,240,100,C.white,35,BACK),
end}),
newButton({name="quit", x=640, y=600, w=240,h=100,color="white",font=35,code=BACK}),
},
setting_game={
graphic=newButton(200,80,240,80,C.lightCyan,35,function()SCN.swapTo("setting_video")end, nil,"sound"),
sound= newButton(1080,80,240,80,C.lightCyan,35,function()SCN.swapTo("setting_sound")end, nil,"ctrl"),
ctrl= newButton(290,220,320,80,C.lightYellow,35,function()SCN.goto("setting_control")end, nil,"key"),
key= newButton(640,220,320,80,C.lightGreen,35,function()SCN.goto("setting_key")end, nil,"touch"),
touch= newButton(990,220,320,80,C.lightBlue,35,function()SCN.goto("setting_touch")end, nil,"reTime"),
reTime= newSlider(350,340,300,10,30,nil, SETval("reTime"), SETsto("reTime"), nil,"maxNext"),
maxNext=newSlider(350,440,300,6,30,nil, SETval("maxNext"), SETsto("maxNext"), nil,"autoPause"),
autoPause=newSwitch(350,540,20, SETval("autoPause"), SETrev("autoPause"), nil,"layout"),
layout= newButton(590,540,140,70,C.white,35,function()
newButton({name="graphic", x=200, y=80, w=240,h=80, color="lCyan", font=35,code=function()SCN.swapTo("setting_video")end}),
newButton({name="sound", x=1080, y=80, w=240,h=80, color="lCyan", font=35,code=function()SCN.swapTo("setting_sound")end}),
newButton({name="ctrl", x=290, y=220, w=320,h=80, color="lYellow",font=35,code=function()SCN.goto("setting_control")end}),
newButton({name="key", x=640, y=220, w=320,h=80, color="lGreen", font=35,code=function()SCN.goto("setting_key")end}),
newButton({name="touch", x=990, y=220, w=320,h=80, color="lBlue", font=35,code=function()SCN.goto("setting_touch")end}),
newSlider({name="reTime", x=350, y=340, w=300,unit=10, font=30,disp=SETval("reTime"), code=SETsto("reTime")}),
newSlider({name="maxNext", x=350, y=440, w=300,unit=6, font=30,disp=SETval("maxNext"), code=SETsto("maxNext")}),
newSwitch({name="autoPause",x=350, y=540, font=20,disp=SETval("autoPause"),code=SETrev("autoPause")}),
newButton({name="layout", x=590, y=540, w=140,h=70,color="white", font=35,code=function()
SCN.goto("setting_skin")
end,nil,"quickR"),
quickR= newSwitch(1050,320,35, SETval("quickR"), SETrev("quickR"), nil,"swap"),
swap= newSwitch(1050,400,20, SETval("swap"), SETrev("swap"), nil,"fine"),
fine= newSwitch(1050,480,20, SETval("fine"), SETrev("fine"), nil,"spawn"),
spawn= newSwitch(1050,560,20, SETval("spawn"), SETrev("spawn"), nil,"back"),
back= newButton(1140,650,200,80,C.white,40,BACK, nil,"graphic"),
end}),
newSwitch({name="quickR", x=1050,y=320,font=35, disp=SETval("quickR"), code=SETrev("quickR")}),
newSwitch({name="swap", x=1050,y=400,font=20, disp=SETval("swap"), code=SETrev("swap")}),
newSwitch({name="fine", x=1050,y=480,font=20, disp=SETval("fine"), code=SETrev("fine")}),
newButton({name="back", x=1140,y=650,w=200,h=80,color="white",font=40,code=BACK}),
},
setting_video={
sound= newButton(200,80,240,80,C.lightCyan,35,function()SCN.swapTo("setting_sound")end, nil,"game"),
game= newButton(1080,80,240,80,C.lightCyan,35,function()SCN.swapTo("setting_game")end, nil,"ghost"),
ghost= newSwitch(250,180,35, SETval("ghost"), SETrev("ghost"), nil,"smooth"),
smooth= newSwitch(250,260,25, SETval("smooth"), SETrev("smooth"), nil,"center"),
center= newSwitch(500,180,35, SETval("center"), SETrev("center"), nil,"grid"),
grid= newSwitch(500,260,30, SETval("grid"), SETrev("grid"), nil,"bagLine"),
bagLine=newSwitch(730,180,30, SETval("bagLine"), SETrev("bagLine"), nil,"lockFX"),
lockFX= newSlider(350,340,373,3,32,nil, SETval("lockFX"), SETsto("lockFX"), nil,"dropFX"),
dropFX= newSlider(350,400,373,5,32,nil, SETval("dropFX"), SETsto("dropFX"), nil,"clearFX"),
clearFX=newSlider(350,460,373,3,32,nil, SETval("clearFX"), SETsto("clearFX"), nil,"shakeFX"),
shakeFX=newSlider(350,520,373,5,32,nil, SETval("shakeFX"), SETsto("shakeFX"), nil,"atkFX"),
atkFX= newSlider(350,580,373,5,32,nil, SETval("atkFX"), SETsto("atkFX"), nil,"frame"),
frame= newSlider(350,640,373,10,30,nil,function()return setting.frameMul>35 and setting.frameMul/10 or setting.frameMul/5-4 end,function(i)setting.frameMul=i<5 and 5*i+20 or 10*i end,nil,"text"),
text= newSwitch(1050,180,35,SETval("text"),SETrev("text"),nil,"warn"),
warn= newSwitch(1050,260,35,SETval("warn"),SETrev("warn"),nil,"fullscreen"),
fullscreen=newSwitch(1050,340,35,SETval("fullscreen"),function()
newButton({name="sound", x=200, y=80,w=240,h=80,color="lCyan",font=35,code=function()SCN.swapTo("setting_sound")end}),
newButton({name="game", x=1080, y=80,w=240,h=80,color="lCyan",font=35,code=function()SCN.swapTo("setting_game")end}),
newSwitch({name="ghost", x=250, y=180,font=35, disp=SETval("ghost"), code=SETrev("ghost")}),
newSwitch({name="smooth", x=250, y=260,font=25, disp=SETval("smooth"), code=SETrev("smooth")}),
newSwitch({name="center", x=500, y=180,font=35, disp=SETval("center"), code=SETrev("center")}),
newSwitch({name="grid", x=500, y=260,font=30, disp=SETval("grid"), code=SETrev("grid")}),
newSwitch({name="bagLine", x=730, y=180,font=30, disp=SETval("bagLine"), code=SETrev("bagLine")}),
newSlider({name="lockFX", x=350, y=340,w=373,unit=3, 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="clearFX", x=350, y=460,w=373,unit=3, font=32,disp=SETval("clearFX"), code=SETsto("clearFX")}),
newSlider({name="shakeFX", x=350, y=520,w=373,unit=5, font=32,disp=SETval("shakeFX"), code=SETsto("shakeFX")}),
newSlider({name="atkFX", x=350, y=580,w=373,unit=5, font=32,disp=SETval("atkFX"), code=SETsto("atkFX")}),
newSlider({name="frame", x=350, y=640,w=373,unit=10,font=30,disp=function()
return setting.frameMul>35 and setting.frameMul/10 or setting.frameMul/5-4
end,
code=function(i)setting.frameMul=i<5 and 5*i+20 or 10*i end}),
newSwitch({name="text", x=1050, y=180, font=35,disp=SETval("text"),code=SETrev("text")}),
newSwitch({name="warn", x=1050, y=260, font=35,disp=SETval("warn"),code=SETrev("warn")}),
newSwitch({name="fullscreen",x=1050,y=340, font=35,disp=SETval("fullscreen"),code=function()
setting.fullscreen=not setting.fullscreen
love.window.setFullscreen(setting.fullscreen)
love.resize(love.graphics.getWidth(),love.graphics.getHeight())
end,nil,"bg"),
bg= newSwitch(1050,420,35,SETval("bg"),function()
end}),
newSwitch({name="bg", x=1050, y=420, font=35,disp=SETval("bg"),code=function()
BG.set("none")
setting.bg=not setting.bg
BG.set("space")
end,nil,"power"),
power= newSwitch(1050,500,35,SETval("powerInfo"),function()
end}),
newSwitch({name="power", x=1050, y=500,font=35,disp=SETval("powerInfo"),code=function()
setting.powerInfo=not setting.powerInfo
end,nil,"back"),
back= newButton(1140,650,200,80,C.white,40,BACK,nil,"sound"),
end}),
newButton({name="back", x=1140, y=650,w=200,h=80,color="white",font=40,code=BACK}),
},
setting_sound={
game= newButton(200,80,240,80,C.lightCyan,35,function()SCN.swapTo("setting_game")end, nil,"graphic"),
graphic=newButton(1080,80,240,80,C.lightCyan,35,function()SCN.swapTo("setting_video")end, nil,"sfx"),
sfx= newSlider(180,250,400,10,35,function()SFX.play("blip_1")end, SETval("sfx"), SETsto("sfx"), nil,"bgm"),
bgm= newSlider(750,250,400,10,35,function()BGM.freshVolume()end, SETval("bgm"), SETsto("bgm"), nil,"vib"),
vib= newSlider(180,440,400,5 ,28,function()VIB(2)end, SETval("vib"), SETsto("vib"), nil,"voc"),
voc= newSlider(750,440,400,10,32,function()VOC.play("nya")end, SETval("voc"), SETsto("voc"), nil,"stereo"),
stereo= newSlider(180,630,400,10,35,function()SFX.play("move",1,-1)SFX.play("lock",1,1)end, SETval("stereo"), SETsto("stereo"),function()return setting.sfx==0 end,"back"),
back= newButton(1140,650,200,80,C.white,40,BACK,nil,"game"),
newButton({name="game", x=200, y=80,w=240,h=80,color="lCyan",font=35,code=function()SCN.swapTo("setting_game")end}),
newButton({name="graphic", x=1080, y=80,w=240,h=80,color="lCyan",font=35,code=function()SCN.swapTo("setting_video")end}),
newSlider({name="sfx", x=180, y=200,w=400,unit=10,font=35,change=function()SFX.play("blip_1")end, disp=SETval("sfx"), code=SETsto("sfx")}),
newSlider({name="stereo", x=180, y=500,w=400,unit=10,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,unit=10,font=30,change=function()SFX.play("spawn_1",setting.spawn,nil,true)end, disp=SETval("spawn"), code=SETsto("spawn")}),
newSlider({name="bgm", x=180, y=400,w=400,unit=10,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,unit=10,font=32,change=function()VOC.play("nya")end, disp=SETval("voc"), code=SETsto("voc")}),
newButton({name="back", x=1140, y=650,w=200,h=80,color="white",font=40,code=BACK}),
},
setting_control={
das= newSlider(226,200,910, 26, 30,nil,SETval("das"), SETsto("das"), nil,"arr"),
arr= newSlider(226,290,525, 15, 30,nil,SETval("arr"), SETsto("arr"), nil,"sddas"),
sddas= newSlider(226,380,350, 10, 30,nil,SETval("sddas"), SETsto("sddas"),nil,"sdarr"),
sdarr= newSlider(226,470,140, 4, 30,nil,SETval("sdarr"), SETsto("sdarr"),nil,"ihs"),
ihs= newSwitch(1100,290,30, SETval("ihs"), SETrev("ihs"),nil,"irs"),
irs= newSwitch(1100,380,30, SETval("irs"), SETrev("irs"),nil,"ihs"),
ims= newSwitch(1100,470,30, SETval("ims"), SETrev("ims"),nil,"reset"),
reset= newButton(160,580,200, 100,C.lightRed,40,function()
newSlider({name="das", x=226, y=200,w=910, unit=26, font=30,disp=SETval("das"), code=SETsto("das")}),
newSlider({name="arr", x=226, y=290,w=525, unit=15, font=30,disp=SETval("arr"), code=SETsto("arr")}),
newSlider({name="sddas", x=226, y=380,w=350, unit=10, font=30,disp=SETval("sddas"), code=SETsto("sddas")}),
newSlider({name="sdarr", x=226, y=470,w=140, unit=4, font=30,disp=SETval("sdarr"), code=SETsto("sdarr")}),
newSwitch({name="ihs", x=1100, y=290,font=30, disp=SETval("ihs"), code=SETrev("ihs")}),
newSwitch({name="irs", x=1100, y=380,font=30, disp=SETval("irs"), code=SETrev("irs")}),
newSwitch({name="ims", x=1100, y=470,font=30, disp=SETval("ims"), code=SETrev("ims")}),
newButton({name="reset", x=160, y=580,w=200,h=100,color="lRed",font=40,code=function()
local _=setting
_.das,_.arr=10,2
_.sddas,_.sdarr=0,2
_.ihs,_.irs,_.ims=false,false,false
end,nil,"back"),
back= newButton(1140,650,200,80,C.white,40,BACK,nil,"das"),
end}),
newButton({name="back", x=1140,y=650,w=200,h=80,color="white",font=40,code=BACK}),
},
setting_key={
back=newButton(1140,650,200,80,C.white,45,BACK),
newButton({name="back", x=1140,y=650,w=200,h=80,color="white",font=45,code=BACK}),
},
setting_skin={
prev= newButton(700,100,140,100,C.white,50,function()SKIN.prevSet()end),
next= newButton(860,100,140,100,C.white,50,function()SKIN.nextSet()end),
prev1= newButton(130,230,90,65,C.white,30,prevSkin(1)),
prev2= newButton(270,230,90,65,C.white,30,prevSkin(2)),
prev3= newButton(410,230,90,65,C.white,30,prevSkin(3)),
prev4= newButton(550,230,90,65,C.white,30,prevSkin(4)),
prev5= newButton(690,230,90,65,C.white,30,prevSkin(5)),
prev6= newButton(830,230,90,65,C.white,30,prevSkin(6)),
prev7= newButton(970,230,90,65,C.white,30,prevSkin(7)),
newButton({name="prev", x=700,y=100,w=140,h=100,color="white",font=50,code=function()SKIN.prevSet()end}),
newButton({name="next", x=860,y=100,w=140,h=100,color="white",font=50,code=function()SKIN.nextSet()end}),
newButton({name="prev1", x=130,y=230,w=90,h=65,color="white",font=30,code=prevSkin(1)}),
newButton({name="prev2", x=270,y=230,w=90,h=65,color="white",font=30,code=prevSkin(2)}),
newButton({name="prev3", x=410,y=230,w=90,h=65,color="white",font=30,code=prevSkin(3)}),
newButton({name="prev4", x=550,y=230,w=90,h=65,color="white",font=30,code=prevSkin(4)}),
newButton({name="prev5", x=690,y=230,w=90,h=65,color="white",font=30,code=prevSkin(5)}),
newButton({name="prev6", x=830,y=230,w=90,h=65,color="white",font=30,code=prevSkin(6)}),
newButton({name="prev7", x=970,y=230,w=90,h=65,color="white",font=30,code=prevSkin(7)}),
next1= newButton(130,450,90,65,C.white,30,nextSkin(1)),
next2= newButton(270,450,90,65,C.white,30,nextSkin(2)),
next3= newButton(410,450,90,65,C.white,30,nextSkin(3)),
next4= newButton(550,450,90,65,C.white,30,nextSkin(4)),
next5= newButton(690,450,90,65,C.white,30,nextSkin(5)),
next6= newButton(830,450,90,65,C.white,30,nextSkin(6)),
next7= newButton(970,450,90,65,C.white,30,nextSkin(7)),
newButton({name="next1", x=130,y=450,w=90,h=65,color="white",font=30,code=nextSkin(1)}),
newButton({name="next2", x=270,y=450,w=90,h=65,color="white",font=30,code=nextSkin(2)}),
newButton({name="next3", x=410,y=450,w=90,h=65,color="white",font=30,code=nextSkin(3)}),
newButton({name="next4", x=550,y=450,w=90,h=65,color="white",font=30,code=nextSkin(4)}),
newButton({name="next5", x=690,y=450,w=90,h=65,color="white",font=30,code=nextSkin(5)}),
newButton({name="next6", x=830,y=450,w=90,h=65,color="white",font=30,code=nextSkin(6)}),
newButton({name="next7", x=970,y=450,w=90,h=65,color="white",font=30,code=nextSkin(7)}),
spin1= newButton(130,540,90,65,C.white,30,nextDir(1)),
spin2= newButton(270,540,90,65,C.white,30,nextDir(2)),
spin3= newButton(410,540,90,65,C.white,30,nextDir(3)),
spin4= newButton(550,540,90,65,C.white,30,nextDir(4)),
spin5= newButton(690,540,90,65,C.white,30,nextDir(5)),
--spin6=newButton(825,540,90,65,C.white,30,nextDir(6)),--cannot rotate O
spin7= newButton(970,540,90,65,C.white,30,nextDir(7)),
newButton({name="spin1", x=130,y=540,w=90,h=65,color="white",font=30,code=nextDir(1)}),
newButton({name="spin2", x=270,y=540,w=90,h=65,color="white",font=30,code=nextDir(2)}),
newButton({name="spin3", x=410,y=540,w=90,h=65,color="white",font=30,code=nextDir(3)}),
newButton({name="spin4", x=550,y=540,w=90,h=65,color="white",font=30,code=nextDir(4)}),
newButton({name="spin5", x=690,y=540,w=90,h=65,color="white",font=30,code=nextDir(5)}),
--newButton({name="spin6",x=825,y=540,w=90,h=65,color="white",font=30,code=nextDir(6)}),--cannot rotate O
newButton({name="spin7", x=970,y=540,w=90,h=65,color="white",font=30,code=nextDir(7)}),
skinR= newButton(200,640,220,80,C.lightPurple,35,function()
newButton({name="skinR", x=200,y=640,w=220,h=80,color="lPurple",font=35,code=function()
setting.skin={1,5,8,2,10,3,7,1,5,5,1,8,2,10,3,7,10,7,8,2,8,2,1,5,3}
SFX.play("rotate")
end),
faceR= newButton(480,640,220,80,C.lightRed,35,function()
end}),
newButton({name="faceR", x=480,y=640,w=220,h=80,color="lRed",font=35,code=function()
for i=1,25 do
setting.face[i]=0
end
SFX.play("hold")
end),
back= newButton(1140,650,200,80,C.white,40,BACK),
end}),
newButton({name="back", x=1140,y=650,w=200,h=80,color="white",font=40,code=BACK}),
},
setting_touch={
default=newButton(520,80,170,80,C.white,35,function()
newButton({name="default", x=520,y=80,w=170,h=80,color="white",font=35,code=function()
local D=virtualkeySet[sceneTemp.default]
for i=1,#VK_org do
VK_org[i].ava=false
@@ -342,100 +355,134 @@ local Widgets={
end--Replace keys
sceneTemp.default=sceneTemp.default%5+1
sceneTemp.sel=nil
end),
snap= newButton(760,80,170,80,C.white,35,function()
end}),
newButton({name="snap", x=760,y=80,w=170,h=80,color="white",font=35,code=function()
sceneTemp.snap=sceneTemp.snap%6+1
end),
option= newButton(520,180,170,80,C.white,40,function()
end}),
newButton({name="option", x=520,y=180,w=170,h=80,color="white",font=40,code=function()
SCN.goto("setting_touchSwitch")
end),
back= newButton(760,180,170,80,C.white,40,BACK),
size= newSlider(450,265,460,14,40,nil,function()
return VK_org[sceneTemp.sel].r/10-1
end,
function(v)
if sceneTemp.sel then
VK_org[sceneTemp.sel].r=10+v*10
end
end}),
newButton({name="back", x=760,y=180,w=170,h=80,color="white",font=40,code=BACK}),
newSlider({name="size", x=450,y=265,w=460,unit=14,font=40,disp=function()
return VK_org[sceneTemp.sel].r/10-1
end,
function()return not sceneTemp.sel end),
code=function(v)
if sceneTemp.sel then
VK_org[sceneTemp.sel].r=10+v*10
end
end,
hide=function()
return not sceneTemp.sel
end}),
},
setting_touchSwitch={
b1= newSwitch(280,80, 35,VKAdisp(1),VKAcode(1)),
b2= newSwitch(280,140, 35,VKAdisp(2),VKAcode(2)),
b3= newSwitch(280,200, 35,VKAdisp(3),VKAcode(3)),
b4= newSwitch(280,260, 35,VKAdisp(4),VKAcode(4)),
b5= newSwitch(280,320, 35,VKAdisp(5),VKAcode(5)),
b6= newSwitch(280,380, 35,VKAdisp(6),VKAcode(6)),
b7= newSwitch(280,440, 35,VKAdisp(7),VKAcode(7)),
b8= newSwitch(280,500, 35,VKAdisp(8),VKAcode(8)),
b9= newSwitch(280,560, 35,VKAdisp(9),VKAcode(9)),
b10= newSwitch(280,620, 35,VKAdisp(10),VKAcode(10)),
b11= newSwitch(620,80, 35,VKAdisp(11),VKAcode(11)),
b12= newSwitch(620,140, 35,VKAdisp(12),VKAcode(12)),
b13= newSwitch(620,200, 35,VKAdisp(13),VKAcode(13)),
b14= newSwitch(620,260, 35,VKAdisp(14),VKAcode(14)),
b15= newSwitch(620,320, 35,VKAdisp(15),VKAcode(15)),
b16= newSwitch(620,380, 35,VKAdisp(16),VKAcode(16)),
b17= newSwitch(620,440, 35,VKAdisp(17),VKAcode(17)),
b18= newSwitch(620,500, 35,VKAdisp(18),VKAcode(18)),
b19= newSwitch(620,560, 35,VKAdisp(19),VKAcode(19)),
b20= newSwitch(620,620, 35,VKAdisp(20),VKAcode(20)),
norm= newButton(840,100, 240,80,C.white,35,function()for i=1,20 do VK_org[i].ava=i<11 end end),
pro= newButton(1120,100, 240,80,C.white,35,function()for i=1,20 do VK_org[i].ava=true end end),
hide= newSwitch(1170,200, 40,SETval("VKSwitch"),SETrev("VKSwitch")),
track= newSwitch(1170,300, 35,SETval("VKTrack"),SETrev("VKTrack")),
sfx= newSlider(800,380,180,4,40,function()SFX.play("virtualKey",setting.VKSFX*.25)end,SETval("VKSFX"),SETsto("VKSFX")),
vib= newSlider(800,460,180,2,40,function()VIB(setting.VKVIB)end,SETval("VKVIB"),SETsto("VKVIB")),
icon= newSwitch(850,300, 40,SETval("VKIcon"),SETrev("VKIcon")),
tkset= newButton(1120,420,240,80,C.white,32,function()
newSwitch({name="b1", x=280, y=80, font=35,disp=VKAdisp(1),code=VKAcode(1)}),
newSwitch({name="b2", x=280, y=140, font=35,disp=VKAdisp(2),code=VKAcode(2)}),
newSwitch({name="b3", x=280, y=200, font=35,disp=VKAdisp(3),code=VKAcode(3)}),
newSwitch({name="b4", x=280, y=260, font=35,disp=VKAdisp(4),code=VKAcode(4)}),
newSwitch({name="b5", x=280, y=320, font=35,disp=VKAdisp(5),code=VKAcode(5)}),
newSwitch({name="b6", x=280, y=380, font=35,disp=VKAdisp(6),code=VKAcode(6)}),
newSwitch({name="b7", x=280, y=440, font=35,disp=VKAdisp(7),code=VKAcode(7)}),
newSwitch({name="b8", x=280, y=500, font=35,disp=VKAdisp(8),code=VKAcode(8)}),
newSwitch({name="b9", x=280, y=560, font=35,disp=VKAdisp(9),code=VKAcode(9)}),
newSwitch({name="b10", x=280, y=620, font=35,disp=VKAdisp(10),code=VKAcode(10)}),
newSwitch({name="b11", x=620, y=80, font=35,disp=VKAdisp(11),code=VKAcode(11)}),
newSwitch({name="b12", x=620, y=140, font=35,disp=VKAdisp(12),code=VKAcode(12)}),
newSwitch({name="b13", x=620, y=200, font=35,disp=VKAdisp(13),code=VKAcode(13)}),
newSwitch({name="b14", x=620, y=260, font=35,disp=VKAdisp(14),code=VKAcode(14)}),
newSwitch({name="b15", x=620, y=320, font=35,disp=VKAdisp(15),code=VKAcode(15)}),
newSwitch({name="b16", x=620, y=380, font=35,disp=VKAdisp(16),code=VKAcode(16)}),
newSwitch({name="b17", x=620, y=440, font=35,disp=VKAdisp(17),code=VKAcode(17)}),
newSwitch({name="b18", x=620, y=500, font=35,disp=VKAdisp(18),code=VKAcode(18)}),
newSwitch({name="b19", x=620, y=560, font=35,disp=VKAdisp(19),code=VKAcode(19)}),
newSwitch({name="b20", x=620, y=620, font=35,disp=VKAdisp(20),code=VKAcode(20)}),
newButton({name="norm", x=840, y=100, w=240,h=80,color="white",font=35,code=function()for i=1,20 do VK_org[i].ava=i<11 end end}),
newButton({name="pro", x=1120, y=100, w=240,h=80,color="white",font=35,code=function()for i=1,20 do VK_org[i].ava=true end end}),
newSwitch({name="hide", x=1170, y=200, font=40,disp=SETval("VKSwitch"),code=SETrev("VKSwitch")}),
newSwitch({name="track", x=1170, y=300, font=35,disp=SETval("VKTrack"),code=SETrev("VKTrack")}),
newSlider({name="sfx", x=800, y=380, w=180,unit=4,font=40,change=function()SFX.play("virtualKey",setting.VKSFX*.25)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,code=function()
SCN.goto("setting_trackSetting")
end,function()return not setting.VKTrack end),
alpha= newSlider(840,540,400,10,40,nil,SETval("VKAlpha"),SETsto("VKAlpha")),
back= newButton(1120,620,200,80,C.white,45,BACK),
end,hide=function()return not setting.VKTrack end}),
newSlider({name="alpha", x=840, y=540, w=400,unit=10,font=40,disp=SETval("VKAlpha"),code=SETsto("VKAlpha")}),
newButton({name="back", x=1120, y=620, w=200,h=80,color="white",font=45,code=BACK}),
},
setting_trackSetting={
VKDodge=newSwitch(400,200, 35,SETval("VKDodge"),SETrev("VKDodge")),
VKTchW= newSlider(140,310,1000,10,35,nil,SETval("VKTchW"),function(i)setting.VKTchW=i;setting.VKCurW=math.max(setting.VKCurW,i)end),
VKCurW= newSlider(140,370,1000,10,35,nil,SETval("VKCurW"),function(i)setting.VKCurW=i;setting.VKTchW=math.min(setting.VKTchW,i)end),
back= newButton(1080,600,240,80,C.white,45,BACK),
newSwitch({name="VKDodge", x=400, y=200, font=35,SETval("VKDodge"),SETrev("VKDodge")}),
newSlider({name="VKTchW", x=140, y=310, w=1000, unit=10,font=35,disp=SETval("VKTchW"),code=function(i)setting.VKTchW=i;setting.VKCurW=math.max(setting.VKCurW,i)end}),
newSlider({name="VKCurW", x=140, y=370, w=1000, unit=10,font=35,disp=SETval("VKCurW"),code=function(i)setting.VKCurW=i;setting.VKTchW=math.min(setting.VKTchW,i)end}),
newButton({name="back", x=1080, y=600, w=240, h=80,color="white",font=45,code=BACK}),
},
setting_lang={
chi= newButton(160,100,200,120,C.white,45,setLang(1),nil,"chi2"),
chi2= newButton(380,100,200,120,C.white,45,setLang(2),nil,"eng"),
eng= newButton(600,100,200,120,C.white,45,setLang(3),nil,"str"),
str= newButton(820,100,200,120,C.white,45,setLang(4),nil,"back"),
back= newButton(640,600,200,80,C.white,40,BACK,nil,"chi"),
newButton({name="chi", x=160, y=100,w=200,h=120,color="white",font=45,code=setLang(1)}),
newButton({name="chi2", x=380, y=100,w=200,h=120,color="white",font=45,code=setLang(2)}),
newButton({name="eng", x=600, y=100,w=200,h=120,color="white",font=45,code=setLang(3)}),
newButton({name="str", x=820, y=100,w=200,h=120,color="white",font=45,code=setLang(4)}),
newButton({name="back", x=640, y=600,w=200,h=80,color="white",font=40,code=BACK}),
},
help={
staff= newButton(980,500,150,80,C.white,32,function()SCN.goto("staff")end,nil,"his"),
his= newButton(1160,500,150,80,C.white,32,function()SCN.goto("history")end,nil,"qq"),
qq= newButton(980,600,150,80,C.white,32,function()love.system.openURL("tencent://message/?uin=1046101471&Site=&Menu=yes")end,mobileHide,"back"),
back= newButton(640,600,200,80,C.white,40,BACK,nil,"staff"),
newButton({name="staff", x=980, y=500,w=150,h=80,color="white",font=32,code=function()SCN.goto("staff")end}),
newButton({name="his", x=1160, y=500,w=150,h=80,color="white",font=32,code=function()SCN.goto("history")end}),
newButton({name="qq", x=1070, y=600,w=200,h=80,color="white",font=32,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=40,code=BACK}),
},
staff={
back= newButton(1160,630,150,80,C.white,40,BACK),
newButton({name="back", x=1160, y=630,w=150,h=80,color="white",font=40,code=BACK}),
},
history={
prev= newButton(1155,170,180,180,C.white,65,pressKey("up"),function()return sceneTemp[2]==1 end),
next= newButton(1155,400,180,180,C.white,65,pressKey("down"),function()return sceneTemp[2]==#sceneTemp[1]end),
back= newButton(1155,600,180,90,C.white,40,BACK),
newButton({name="prev", x=1155, y=170,w=180,h=180,color="white",font=65,code=pressKey("up"),hide=function()return sceneTemp[2]==1 end}),
newButton({name="next", x=1155, y=400,w=180,h=180,color="white",font=65,code=pressKey("down"),hide=function()return sceneTemp[2]==#sceneTemp[1]end}),
newButton({name="back", x=1155, y=600,w=180,h=90,color="white",font=40,code=BACK}),
},
stat={
path= newButton(980,620,250,80,C.white,25,function()love.system.openURL(love.filesystem.getSaveDirectory())end,mobileHide,"back"),
back= newButton(640,620,200,80,C.white,40,BACK,nil,"path"),
newButton({name="path", x=980, y=620,w=250,h=80,color="white",font=25,code=function()love.system.openURL(love.filesystem.getSaveDirectory())end,hide=mobileHide}),
newButton({name="back", x=640, y=620,w=200,h=80,color="white",font=40,code=BACK}),
},
debug={
newButton({name="killWTM", x=340, y=200,w=260,h=100,color="white",font=35,code=function()
marking=nil
TEXT.show("\68\69\86\58\87\97\116\101\114\109\97\114\107\32\82\101\109\111\118\101\100",640,360,60,"stretch",.6)
SFX.play("clear")
end}),
newButton({name="unlock", x=640,y=200,w=260,h=100,color="white",font=40,code=function()
for name,M in next,Modes do
if not modeRanks[name]then
modeRanks[name]=M.score and 0 or 6
end
end
FILE.saveUnlock()
TEXT.show("\68\69\86\58\85\78\76\79\67\75\65\76\76",640,360,60,"stretch",.6)
SFX.play("clear_2")
end}),
newButton({name="reset", x=940,y=200,w=260,h=100,color="white",font=40,code=function()
sceneTemp.ct=sceneTemp.ct+1
if sceneTemp.ct==1 then
TEXT.show("RESET ALL DATA?",640,360,50,"appear",.5)
elseif sceneTemp.ct==5 then
TEXT.show("SURE?????",640,360,80,"beat",.5)
elseif sceneTemp.ct==10 then
local L=love.filesystem.getDirectoryItems("")
for i=1,#L do
local s=L[i]
if s:sub(-4)==".dat"then
love.filesystem.remove(s)
end
end
SFX.play("clear_4")SFX.play("finesseError_long")
TEXT.clear()
TEXT.show("ALL SAVING FILE DELETED",640,360,60,"stretch",.4)
SCN.back()
end
end}),
newButton({name="back", x=640,y=620,w=200,h=80,color="white",font=40,code=BACK}),
},
}
--Remove temp vars
mobileHide,SETval,SETsto,SETrev=nil
pressKey,setPen,prevSkin,nextSkin=nil
nextDir,VKAdisp,VKAcode,setLang=nil
newButton,newSwitch,newSlider=nil
for _,L in next,Widgets do
for _,W in next,L do
if W.next then
W.next,L[W.next].prev=L[W.next],W
end
end
end
newText,newImage,newButton,newSwitch,newSlider=nil
return Widgets

View File

@@ -1,4 +1,4 @@
gameVersion="Alpha V0.9.1"
gameVersion="Alpha V0.9.2"
function love.conf(t)
t.identity="Techmino"--saving folder
t.version="11.1"

BIN
image/mess/title_new.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View File

@@ -1,6 +1,11 @@
--[[
Techmino is my first "huge project"
optimization is welcomed if you also love tetromino game
______ __ _
/_ __/___ _____ / /_ ____ ___ (_)____ ____
/ / / _ \ / ___// __ \ / __ `__ \ / // __ \ / __ \
/ / / __// /__ / / / // / / / / // // / / // /_/ /
/_/ \___/ \___//_/ /_//_/ /_/ /_//_//_/ /_/ \____/
Techmino is my first "huge project"
optimization is welcomed if you also love tetromino game
]]
--Global Setting & Vars
@@ -43,9 +48,9 @@ freeRow= require("parts/freeRow")
require("parts/list")
require("parts/gametoolfunc")
require("parts/texture")
require("parts/default_data")
TEXTURE=require("parts/texture")
SKIN= require("parts/skin")
PLY= require("parts/player")
AIfunc= require("parts/ai")
@@ -79,28 +84,11 @@ if fs.getInfo("data.dat")then FILE.loadData()end
if fs.getInfo("key.dat")then FILE.loadKeyMap()end
if fs.getInfo("virtualkey.dat")then FILE.loadVK()end
if fs.getInfo("tech_ultimate.dat")then fs.remove("tech_ultimate.dat")end
if fs.getInfo("tech_ultimate+.dat")then fs.remove("tech_ultimate+.dat")end
--update data file
S=stat
S.clear_B,S.clear_S=nil
if not S.clear[1][5]then
for i=1,7 do
S.clear[i][5]=0
S.spin[i][5]=0
end
for i=8,25 do
S.clear[i]={0,0,0,0,0}
S.spin[i]={0,0,0,0,0}
end
end
if not S.off then
S.off=S.recv-S.pend
end
if S.clear[1][4]>0 then
for i=1,6 do
S.clear[7][4]=S.clear[7][4]+S.clear[i][4]
S.clear[i][4]=0
end
end
while #modeRanks>73 do
table.remove(modeRanks)
end
@@ -111,13 +99,10 @@ if modeRanks[1]then--rename key of modeRanks
L[Modes[i].name],L[i]=L[i]
end
end
if setting.skin[10]==5 then
setting.skin[10],setting.skin[11]=1,5
if S.version=="Alpha V0.9.1"or type(setting.spawn)~="number"then
setting.spawn=0
end
if S.version~=gameVersion then
if S.version then
setting.spawn=true
end
S.version=gameVersion
TEXT.show(text.newVersion,640,200,30,"fly",.3)
end

View File

@@ -34,7 +34,7 @@ return{
end
end
end,
bg="game3",bgm="push",
bg="game4",bgm="push",
},
pauseLimit=true,
load=function()

View File

@@ -23,7 +23,7 @@ return{
mStr(P.stat.row,-81,220)
mStr(P.stat.clears[4],-81,340)
gc.setColor(1,1,1,.2)
gc.draw(IMG.electric,-26,120,0,2.6)
gc.draw(IMG.electric,-26,106,0,2.6)
end,
score=function(P)return{min(P.stat.row or 200),P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,

View File

@@ -24,7 +24,7 @@ return{
mStr(P.stat.row,-81,220)
mStr(P.stat.clears[4],-81,340)
gc.setColor(1,1,1,.2)
gc.draw(IMG.electric,-26,120,0,2.6)
gc.draw(IMG.electric,-26,106,0,2.6)
end,
score=function(P)return{min(P.stat.row or 200),P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,

View File

@@ -22,7 +22,7 @@ return{
mStr(P.stat.row,-81,220)
mStr(P.stat.clears[4],-81,340)
gc.setColor(1,1,1,.2)
gc.draw(IMG.electric,-26,120,0,2.6)
gc.draw(IMG.electric,-26,106,0,2.6)
end,
score=function(P)return{min(P.stat.row or 200),P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,

View File

@@ -4,7 +4,6 @@ return{
color=color.red,
env={
drop=30,lock=60,
fall=5,
block=false,
center=false,ghost=false,
dropFX=0,lockFX=0,
@@ -25,7 +24,7 @@ return{
mStr(P.stat.row,-81,220)
mStr(P.stat.clears[4],-81,340)
gc.setColor(1,1,1,.2)
gc.draw(IMG.electric,-26,120,0,2.6)
gc.draw(IMG.electric,-26,106,0,2.6)
end,
score=function(P)return{min(P.stat.row or 200),P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,

59
modes/blind_wtf.lua Normal file
View File

@@ -0,0 +1,59 @@
local gc=love.graphics
local sin,min=math.sin,math.min
local Timer=love.timer.getTime
return{
color=color.red,
env={
drop=30,lock=60,
next=1,
block=false,
center=false,ghost=false,
dropFX=0,lockFX=0,
visible="none",
dropPiece=PLY.reach_winCheck,
freshLimit=15,
target=100,
bg="none",bgm="secret7th",
},
pauseLimit=true,
load=function()
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
if not game.result then
gc.clear(.26,.26,.26)
end
--MD Figure
local t=Timer()
gc.setColor(.6+.3*sin(t*1.26),.6+.3*sin(t*2.6),.6+.3*sin(t*1.626),.2)
gc.draw(IMG.electric,-162,-8,0,3.2)
--Texts
gc.setColor(.8,.8,.8)
mText(drawableText.line,-81,300)
mText(drawableText.techrash,-81,420)
setFont(75)
mStr(P.stat.row,-81,220)
mStr(P.stat.clears[4],-81,340)
--"Field"
gc.setColor(.5,.5,.5)
gc.rectangle("line",-1,-11,302,612)
gc.rectangle("line",301,0,15,601)
gc.rectangle("line",-16,-3,15,604)
end,
score=function(P)return{min(P.stat.row or 200),P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.row
return
L>=100 and 5 or
L>=60 and 4 or
L>=30 and 3 or
L>=10 and 2 or
L>=5 and 1 or
L>=1 and 0
end,
}

View File

@@ -12,7 +12,11 @@ return{
end
modeEnv._20G=modeEnv.drop==0
modeEnv.oncehold=customSel[6]==1
if preBag[1]then modeEnv.bag=preBag end
if preBag[1]then
modeEnv.bag=preBag
else
modeEnv.bag=nil
end
PLY.newPlayer(1,340,15)
local L=modeEnv.opponent
if L~=0 then

View File

@@ -37,7 +37,7 @@ return{
end
end
end,
bg="game3",bgm="way",
bg="game4",bgm="way",
},
pauseLimit=true,
load=function()

View File

@@ -113,8 +113,8 @@ return{
if L>=100 then
local T=P.stat.time
return
T<=70 and 5 or
T<=110 and 4 or
T<=90 and 5 or
T<=105 and 4 or
T<=160 and 3 or
T<=240 and 2 or
1

View File

@@ -21,7 +21,7 @@ return{
mindas=7,minarr=1,minsdarr=1,
drop=.5,wait=8,fall=20,
target=50,dropPiece=check,
bg="strap",bgm="push",
bg="game2",bgm="push",
},
pauseLimit=true,
slowMark=true,

View File

@@ -21,7 +21,7 @@ return{
wait=8,fall=20,
target=10,dropPiece=check_LVup,
mindas=7,minarr=1,minsdarr=1,
bg="strap",bgm="push",
bg="game2",bgm="push",
},
pauseLimit=true,
slowMark=true,

View File

@@ -47,7 +47,7 @@ return{
fall=rush_fall[1],
dropPiece=score,
freshLimit=15,
bg="strap",bgm="secret8th",
bg="game1",bgm="secret8th",
},
slowMark=true,
load=function()

View File

@@ -16,7 +16,7 @@ return{
drop=1e99,lock=1e99,
oncehold=false,
dropPiece=update_round,
bg="game2",bgm="push",
bg="game3",bgm="push",
},
load=function()
PLY.newPlayer(1,340,15)

View File

@@ -16,7 +16,7 @@ return{
drop=1e99,lock=1e99,
oncehold=false,
dropPiece=update_round,
bg="game2",bgm="push",
bg="game3",bgm="push",
},
load=function()
PLY.newPlayer(1,340,15)

View File

@@ -16,7 +16,7 @@ return{
drop=1e99,lock=1e99,
oncehold=false,
dropPiece=update_round,
bg="game2",bgm="push",
bg="game3",bgm="push",
},
load=function()
PLY.newPlayer(1,340,15)

View File

@@ -16,7 +16,7 @@ return{
drop=1e99,lock=1e99,
oncehold=false,
dropPiece=update_round,
bg="game2",bgm="push",
bg="game3",bgm="push",
},
load=function()
PLY.newPlayer(1,340,15)

View File

@@ -16,7 +16,7 @@ return{
drop=1e99,lock=1e99,
oncehold=false,
dropPiece=update_round,
bg="game2",bgm="push",
bg="game3",bgm="push",
},
load=function()
PLY.newPlayer(1,340,15)

View File

@@ -5,7 +5,7 @@ return{
env={
drop=60,lock=60,
target=10,dropPiece=PLY.reach_winCheck,
bg="strap",bgm="race",
bg="game2",bgm="race",
},
load=function()
PLY.newPlayer(1,340,15)

View File

@@ -5,7 +5,7 @@ return{
env={
drop=60,lock=60,
target=100,dropPiece=PLY.reach_winCheck,
bg="strap",bgm="race",
bg="game2",bgm="race",
},
load=function()
PLY.newPlayer(1,340,15)

View File

@@ -5,7 +5,7 @@ return{
env={
drop=60,lock=60,
target=1000,dropPiece=PLY.reach_winCheck,
bg="strap",bgm="push",
bg="game3",bgm="push",
},
load=function()
PLY.newPlayer(1,340,15)

View File

@@ -5,7 +5,7 @@ return{
env={
drop=60,lock=60,
target=20,dropPiece=PLY.reach_winCheck,
bg="strap",bgm="race",
bg="game2",bgm="race",
},
load=function()
PLY.newPlayer(1,340,15)

View File

@@ -5,7 +5,7 @@ return{
env={
drop=60,lock=60,
target=40,dropPiece=PLY.reach_winCheck,
bg="strap",bgm="race",
bg="game2",bgm="race",
},
load=function()
PLY.newPlayer(1,340,15)

View File

@@ -5,7 +5,7 @@ return{
env={
drop=60,lock=60,
target=400,dropPiece=PLY.reach_winCheck,
bg="strap",bgm="push",
bg="game3",bgm="push",
},
load=function()
PLY.newPlayer(1,340,15)

View File

@@ -4,7 +4,7 @@ return{
drop=120,lock=120,
oncehold=false,target=200,
dropPiece=PLY.reach_winCheck,
bg="strap",bgm="infinite",
bg="game2",bgm="infinite",
},
load=function()
PLY.newPlayer(1,340,15)

View File

@@ -18,7 +18,7 @@ local Timer=love.timer.getTime
local blockPos={4,4,4,4,4,5,4}
local scs={{1,2},{1,2},{1,2},{1,2},{1,2},{1.5,1.5},{0.5,2.5}}
-------------------------------------------------Cold clear
local CCblockID={4,3,5,6,1,2,0}
local CCblockID={4,3,6,5,1,2,0}
if system=="Windows"then
require("CCloader")
BOT={
@@ -73,7 +73,10 @@ if system=="Windows"then
P.curX,P.curY=blockPos[P.cur.id],21+ceil(P.fieldBeneath/30)-P.r+min(int(#P.field*.2),2)
P:newNext()
BOT.addNext(P.AI_bot,CCblockID[P.next[P.AIdata.next].id])
local id=CCblockID[P.next[P.AIdata.next].id]
if id then
BOT.addNext(P.AI_bot,id)
end
collectgarbage()
end
end
@@ -205,7 +208,15 @@ return{
end
local best={x=1,dir=0,hold=false,score=-1e99}
for ifhold=0,P.gameEnv.hold and 1 or 0 do
local bn=ifhold==0 and P.cur.id or P.hd and P.hd.id or P.next[1]and P.next[1].id
--Get block id
local bn
if ifhold==0 then
bn=P.cur and P.cur.id
else
bn=P.hd and P.hd.id or P.next[1]and P.next[1].id
end
if not bn then goto CTN end
for dir=0,dirCount[bn] do--each dir
local cb=blocks[bn][dir]
for cx=1,11-#cb[1]do--each pos
@@ -229,8 +240,9 @@ return{
resetField(field_org,Tfield,cy)
end
end
::CTN::
end
if not best.bn then return 1 end
while #Tfield>0 do
freeRow.discard(rem(Tfield,1))
end--Release cache

View File

@@ -1,4 +1,4 @@
local s={
setting={
--game
das=10,arr=2,
sddas=0,sdarr=2,
@@ -9,7 +9,6 @@ local s={
quickR=true,
swap=true,
fine=false,
spawn=false,
lang=1,
skinSet=1,
skin={1,5,8,2,10,3,7,1,5,1,5,8,2,10,3,7,10,7,8,2,8,2,1,5,3},
@@ -34,6 +33,7 @@ local s={
--sound
sfx=10,
spawn=0,
bgm=7,
stereo=6,
vib=0,
@@ -51,11 +51,10 @@ local s={
VKAlpha=3,
}
for i=1,25 do
s.face[i]=0
setting.face[i]=0
end
setting=s
s={
stat={
version=gameVersion,
run=0,game=0,time=0,
key=0,rotate=0,hold=0,
@@ -68,10 +67,9 @@ s={
lastPlay="sprint_10",--last played mode ID
}
for i=1,25 do
s.clear[i]={0,0,0,0,0}
s.spin[i]={0,0,0,0,0}
stat.clear[i]={0,0,0,0,0}
stat.spin[i]={0,0,0,0,0}
end
stat=s
keyMap={
{"left","right","x","z","c","up","down","space","tab","r"},{},

View File

@@ -67,23 +67,31 @@ function copyBoard()
TEXT.show(text.copySuccess,350,360,40,"appear",.5)
end
function pasteBoard()
local str=love.system.getClipboardText()
local _
local fX,fY=1,1--*ptr for Field(r*10+(c-1))
local _,Bid
--Read data
local str=love.system.getClipboardText()
local p=find(str,":")--ptr*
if p then str=sub(str,p+1)end
_,str=pcall(data.decode,"string","base64",str)
if not _ then goto ERROR end
_,str=pcall(data.decompress,"string","deflate",str)
if not _ then goto ERROR end
p=1
while true do
_=byte(str,p)--1byte
if not _ then
if fX~=1 then goto ERROR
else break
if fX~=1 then
goto ERROR
else
fY=fY+1
break
end
end--str end
__=_%32-1--block id
if __>17 then goto ERROR end--illegal blockid
_=int(_/32)--mode id
@@ -91,8 +99,9 @@ function pasteBoard()
if fX<10 then
fX=fX+1
else
if fY==20 then break end
fX=1;fY=fY+1
fY=fY+1
if fY>20 then break end
fX=1
end
p=p+1
end
@@ -215,7 +224,6 @@ function resumeGame()
SCN.swapTo("play","none")
end
function loadGame(M)
print(M)
--rec={}
stat.lastPlay=M
curMode=Modes[M]

View File

@@ -3,28 +3,27 @@ if setting.lang==1 or setting.lang==2 then
L={
"ZS JL T O I",
"uid:225238922",
"tetr.js 也很好玩!",
"tetr.io 也很好玩!",
"tetr.js也很好玩!",
"tetr.io也很好玩!",
"Techminohaowan",
"Techmino 好玩!",
"S T S D 必 ",
"STSD必",
"REGRET!!",
"osu好玩!",
"O spin Triple!",
"nullpomino 也很好玩!",
"Naki 可爱!",
"nullpomino也很好玩!",
"Naki 可爱",
"Miya:喵!",
"Miya 可爱!",
"LrL RlR LLr RRl RRR LLL FFF RfR RRf rFF",
"Let-The-Bass-Kick!",
"l-=-1",
"jstris 也很好玩!",
"jstris也很好玩!",
"iced,永远的神",
"DT炮=TSD+TST炮",
"COOL!!",
"CLASSIC SEXY RUSSIAN BLOCKS",
"BT炮=beta炮",
"bdg tql wsl",
"B2B2B2B存在吗?",
"B2B2B???",
"Am G F G",
@@ -32,6 +31,7 @@ if setting.lang==1 or setting.lang==2 then
"注意到\"旋转\"到底对方块做了些什么吗?",
"有疑问? 先看设置有没有你想要的",
"有建议的话可以把信息反馈给作者~",
"音乐都是瞎写的,觉得不好听就把BGM关了罢",
"学会使用两个旋转键, 三个更好",
"享受特色旋转系统!",
"无聊翻翻设置是好习惯",
@@ -46,9 +46,11 @@ if setting.lang==1 or setting.lang==2 then
"你可以从统计页面打开游戏存档目录",
"你好 世界!",
"魔方好玩!",
"免费吃鸡方块",
"秘密数字:626",
"每个虚拟按键都可以隐藏/显示",
"每个块的出现方向可以自定义",
"没专业美术,程序员审美警告",
"联网还没做呢, 别急",
"键位是可以自定义的",
"合群了就会消失, 但是消失不代表没有意义",
@@ -59,14 +61,19 @@ if setting.lang==1 or setting.lang==2 then
"戴上耳机以获得最佳体验",
"大满贯10连击消四全清!",
"车车人在此",
"茶娘可爱",
"草(日本语)",
"不要在上课时玩游戏!",
"不要盯着bug不放",
"不要按F10",
"不是动画,真的在加载!",
"别问游戏名怎么取的,问就是随便想的",
"本游戏难度上限很高, 做好心理准备",
"本游戏可不是休闲游戏",
"啊这,不会吧不会吧",
"626r/s",
"40行世界纪录:15.654s",
"4+4+4+4+2+2+1=17",
"3.1415926535897932384",
"26连T2来一个?",
"20G本质是一套全新的游戏规则",
@@ -77,7 +84,6 @@ if setting.lang==1 or setting.lang==2 then
"11renPC!",
"<方块研究所>有一个Nspire-CX版本!",
"↑↑↓↓←→←→BABA",
'"免费吃鸡方块"',
"(RUR'U')R'FR2U'R'U'(RUR'F')",
}
elseif setting.lang==3 then
@@ -90,6 +96,7 @@ elseif setting.lang==3 then
"Who is diao",
"What about 26 TSDs?",
"What about 20 PCs?",
"Warning: Programmer Art",
"Try to use two rotate button,three better",
"This in not a casual game",
"This game can be very hard,be mentally perpared",
@@ -98,6 +105,7 @@ elseif setting.lang==3 then
"Techmino=Technique+Tetromino",
"Techmino is so fun!",
"Techmino has a Nspire-CX edition!",
"switch stupid music off if they make you awful",
"Small DAS&ARR can make you faster,if you can control block correctly",
"Secret num:626",
"Rubik's cube is fun!",
@@ -110,7 +118,6 @@ elseif setting.lang==3 then
"O spin triple!",
"Nothing will happen when some special day come",
"Not animation,real loading!",
"Naki so cute!",
"Miya:Nya!",
"Miya so cute!",
"Minesweeper is fun!",
@@ -146,6 +153,8 @@ elseif setting.lang==3 then
"Also try jstris!",
"ALLSPIN!",
"少女祈禱中",
"40L WR: 15.654s",
"4+4+4+4+2+2+1=17",
"3.1415926535897932384",
"225238922 Bilibili cheers!",
"20G actually is a brand new game rule",

View File

@@ -97,7 +97,7 @@ local TRS={
[13]={{ 0,-1},{ 0, 1},{ 1, 0}},
[31]={{ 0, 1},{ 0,-1},{-1, 0}},
},--J
{},--L
{},--L
{
[01]={{-1, 0},{-1, 1},{ 0,-2},{-1,-2},{-1,-1}},
[10]={{ 1, 0},{ 1,-1},{ 0, 2},{ 1, 2},{ 0,-1},{ 1, 1}},
@@ -152,10 +152,10 @@ local TRS={
[10]={{ 2, 0},{-1, 0},{-1,-2},{ 2, 1},{ 0, 2}},
[03]={{ 0, 1},{-1, 0},{ 2, 0},{ 2,-1},{-1, 2}},
[30]={{-2, 0},{ 1, 0},{ 1,-2},{-2, 1},{ 0, 2}},
[12]={{-1, 0},{ 2, 0},{-1, 2},{ 2,-1}},
[21]={{-2, 0},{ 1, 0},{ 1,-2},{-2, 1}},
[32]={{ 1, 0},{-2, 0},{ 1,-2},{-2,-1}},
[23]={{ 2, 0},{-1, 0},{-1,-2},{ 2, 1}},
[12]={{-1, 0},{ 2, 0},{ 0,-1},{-1, 2},{ 2,-1}},
[21]={{-2, 0},{ 1, 0},{ 0, 1},{ 1,-2},{-2, 1}},
[32]={{ 1, 0},{-2, 0},{ 0,-1},{ 1, 2},{-2,-1}},
[23]={{ 2, 0},{-1, 0},{ 0, 1},{-1,-2},{ 2, 1}},
[02]={{-1, 0},{ 1, 0},{ 0,-1},{ 0, 1}},
[20]={{ 1, 0},{-1, 0},{ 0, 1},{ 0,-1}},
[13]={{ 0,-1},{-1, 0},{ 1, 0},{ 0, 1}},

View File

@@ -1,3 +1,151 @@
snapLevelValue={1,10,20,40,60,80}
title={
{
53, 60,
1035, 0,
964, 218,
660, 218,
391, 1300,
231, 1154,
415, 218,
0, 218,
},
{
716, 290,
1429, 290,
1312, 462,
875, 489,
821, 695,
1148, 712,
1017, 902,
761, 924,
707, 1127,
1106, 1101,
1198, 1300,
465, 1300,
},
{
1516, 287,
2102, 290,
2036, 464,
1598, 465,
1322, 905,
1395, 1102,
1819, 1064,
1743, 1280,
1286, 1310,
1106, 902,
},
{
2179, 290,
2411, 290,
2272, 688,
2674, 666,
2801, 290,
3041, 290,
2693, 1280,
2464, 1280,
2601, 879,
2199, 897,
2056, 1280,
1828, 1280,
},
{
3123, 290,
3480, 290,
3496, 480,
3664, 290,
4017, 294,
3682, 1270,
3453, 1280,
3697, 578,
3458, 843,
3304, 842,
3251, 561,
3001, 1280,
2779, 1280,
},
{
4088, 290,
4677, 290,
4599, 501,
4426, 502,
4219, 1069,
4388, 1070,
4317, 1280,
3753, 1280,
3822, 1068,
3978, 1068,
4194, 504,
4016, 504,
},
{
4747, 290,
4978, 295,
4921, 464,
5186, 850,
5366, 290,
5599, 295,
5288, 1280,
5051, 1280,
5106, 1102,
4836, 709,
4641, 1280,
4406, 1280,
},
{
5814, 290,
6370, 295,
6471, 415,
6238, 1156,
6058, 1280,
5507, 1280,
5404, 1154,
5635, 416,
-- -- 5814, 290,
-- -- 5878, 463,
5770, 542,
5617, 1030,
5676, 1105,
5995, 1106,
6100, 1029,
6255, 541,
6199, 465,
5878, 463,
},
}
title2={}
for i=1,#title do title2[i]=title[i]end
title2[5]={
3123, 290,
3480, 290,
3496, 480,
3664, 290,
4017, 294,
3682, 1270,
3652, 1270,
3678, 1240,
3682, 1230,
3648, 1230,
3644, 1240,
3665, 1240,
3631, 1280,
3453, 1280,
3697, 578,
3458, 843,
3304, 842,
3251, 561,
3001, 1280,
2779, 1280,
}
for _,C in next,title do
for i=1,#C do
C[i]=C[i]*.1626
end
end
customID={
"drop","lock",
"wait","fall",
@@ -20,7 +168,51 @@ customRange={
target={10,20,40,100,200,500,1000,1e99},
freshLimit={0,8,15,1e99},
opponent={0,1,2,3,4,5,11,12,13,14,15,16},
bg={"none","game1","game2","game3","strap","aura","rgb","glow","matrix"},
bg={"none","game1","game2","game3","aura","rgb","glow","matrix"},
bgm={"blank","way","race","newera","push","reason","infinite","secret7th","secret8th","rockblock"},
}
snapLevelValue={1,10,20,40,60,80}
local function T(s,t)return love.graphics.newText(setFont(s),t)end
drawableText={
question=T(100,"?"),
bpm=T(15,"BPM"),kpm=T(15,"KPM"),
speedLV=T(20,"speed level"),
atk=T(20,"Attack"),
eff=T(20,"Efficiency"),
tsd=T(35,"TSD"),
line=T(25,"Lines"),
techrash=T(25,"Techrash"),
grade=T(25,"Grade"),
wave=T(30,"Wave"),
rpm=T(35,"RPM"),
nextWave=T(30,"Next"),
combo=T(20,"Combo"),
mxcmb=T(20,"Max Combo"),
pc=T(20,"Perfect Clear"),
ko=T(25,"KO"),
D=T(100,"D"),
C=T(100,"C"),
B=T(100,"B"),
A=T(100,"A"),
S=T(100,"S"),
modeName=T(30),levelName=T(30),
anykey=T(40),
next=T(40),hold=T(40),
win=T(120),finish=T(120),
lose=T(120),pause=T(120),
custom=T(80),sequence=T(80),
setting_game=T(80),setting_video=T(80),setting_sound=T(80),
setting_control=T(70),setting_skin=T(70),
preview=T(40),
keyboard=T(25),joystick=T(25),
ctrlSetHelp=T(30),
musicRoom=T(80),
nowPlaying=T(50),
VKTchW=T(30),VKOrgW=T(30),VKCurW=T(30),
noScore=T(45),
highScore=T(30),
}

View File

@@ -36,7 +36,8 @@ return{
{name="blind_normal", x=150, y=-800, size=35,shape=1,icon="blind", unlock={"blind_hard"}},
{name="blind_hard", x=150, y=-900, size=35,shape=1,icon="blind", unlock={"blind_lunatic"}},
{name="blind_lunatic", x=150, y=-1000, size=35,shape=1,icon="blind", unlock={"blind_ultimate"}},
{name="blind_ultimate", x=150, y=-1100, size=35,shape=1,icon="blind", unlock={}},
{name="blind_ultimate", x=150, y=-1100, size=35,shape=2,icon="blind", unlock={"blind_wtf"}},
{name="blind_wtf", x=150, y=-1200, size=35,shape=2,icon="blind", unlock={}},
{name="classic_fast", x=-300, y=-1200, size=40,shape=2,icon="classic", unlock={}},
@@ -63,22 +64,22 @@ return{
{name="pcchallenge_normal", x=800, y=-100, size=35,shape=1,icon="pcchallenge", unlock={"pcchallenge_hard"}},
{name="pcchallenge_hard", x=1000, y=-100, size=35,shape=1,icon="pcchallenge", unlock={"pcchallenge_lunatic"}},
{name="pcchallenge_lunatic",x=1200, y=-100, size=35,shape=1,icon="pcchallenge", unlock={}},
{name="tech_normal", x=400, y=-100, size=35,shape=1,icon="tech", unlock={"tech_normal+","tech_hard"}},
{name="tech_normal", x=400, y=-150, size=35,shape=1,icon="tech", unlock={"tech_normal+","tech_hard","tech_finesse"}},
{name="tech_finesse", x=800, y=50, size=35,shape=1,icon="tech", unlock={"tech_finesse+"}},
{name="tech_finesse+", x=1000, y=50, size=35,shape=1,icon="tech", unlock={}},
{name="tech_normal+", x=650, y=150, size=35,shape=1,icon="tech", unlock={"tsd_easy"}},
{name="tsd_easy", x=800, y=250, size=35,shape=1,icon="tsd", unlock={"tsd_hard"}},
{name="tsd_hard", x=1000, y=250, size=35,shape=1,icon="tsd", unlock={"tsd_ultimate"}},
{name="tsd_ultimate", x=1200, y=250, size=35,shape=1,icon="tsd", unlock={}},
{name="tech_hard", x=400, y=50, size=35,shape=1,icon="tech", unlock={"tech_hard+","tech_lunatic"}},
{name="tech_hard+", x=250, y=50, size=35,shape=1,icon="tech", unlock={}},
{name="tech_lunatic", x=400, y=200, size=35,shape=1,icon="tech", unlock={"tech_lunatic+","tech_ultimate"}},
{name="tech_lunatic", x=400, y=200, size=35,shape=1,icon="tech", unlock={"tech_lunatic+"}},
{name="tech_lunatic+", x=250, y=200, size=35,shape=1,icon="tech", unlock={}},
{name="tech_ultimate", x=400, y=350, size=35,shape=1,icon="tech", unlock={"tech_ultimate+"}},
{name="tech_ultimate+", x=250, y=350, size=35,shape=1,icon="tech", unlock={}},
{name="tsd_easy", x=800, y=200, size=35,shape=1,icon="tsd", unlock={"tsd_hard"}},
{name="tsd_hard", x=1000, y=200, size=35,shape=1,icon="tsd", unlock={"tsd_ultimate"}},
{name="tsd_ultimate", x=1200, y=200, size=35,shape=1,icon="tsd", unlock={}},
{name="zen", x=-900, y=-600, size=35,shape=1,icon="zen", unlock={"ultra","infinite","infinite_dig"}},
{name="ultra", x=-1100, y=-400, size=35,shape=1,icon="ultra", unlock={}},
{name="infinite", x=-900, y=-400, size=35,shape=1,icon="infinite", unlock={}},
{name="infinite_dig", x=-1100, y=-600, size=35,shape=1,icon="infinite_dig",unlock={}},
{name="zen", x=-800, y=-600, size=35,shape=1,icon="zen", unlock={"ultra","infinite","infinite_dig"}},
{name="ultra", x=-1000, y=-400, size=35,shape=1,icon="ultra", unlock={}},
{name="infinite", x=-800, y=-400, size=35,shape=1,icon="infinite", unlock={}},
{name="infinite_dig", x=-1000, y=-600, size=35,shape=1,icon="infinite_dig",unlock={}},
{name="custom_clear", x=200, y=-350, size=45,shape=3,icon="custom", unlock={}},
{name="custom_puzzle", x=200, y=-200, size=45,shape=3,icon="puzzle", unlock={}},
{name="sprintPenta", x=-200, y=-200, size=45,shape=3,icon="sprint", unlock={}},

View File

@@ -692,15 +692,15 @@ local function Pdraw_norm(P)
--Draw Hold
if P.gameEnv.hold then
gc.setColor(0,0,0,.4)gc.rectangle("fill",-143,36,124,80)
gc.setColor(1,1,1)gc.rectangle("line",-143,36,124,80)
mText(drawableText.hold,-81,-15)
gc.setColor(0,0,0,.4)gc.rectangle("fill",-140,36,124,80)
gc.setColor(1,1,1)gc.rectangle("line",-140,36,124,80)
mText(drawableText.hold,-78,-15)
if P.hd then
if P.holded then gc.setColor(.6,.5,.5)end
local B=P.hd.bk
for i=1,#B do for j=1,#B[1]do
if B[i][j]then
drawPixel(i+17.5-#B*.5,j-2.7-#B[1]*.5,P.hd.color)
drawPixel(i+17.5-#B*.5,j-2.6-#B[1]*.5,P.hd.color)
end
end end
end
@@ -709,15 +709,15 @@ local function Pdraw_norm(P)
--Draw Next(s)
local N=P.gameEnv.next*72
if P.gameEnv.next>0 then
gc.setColor(0,0,0,.4)gc.rectangle("fill",319,36,124,N)
gc.setColor(1,1,1)gc.rectangle("line",319,36,124,N)
mText(drawableText.next,381,-15)
gc.setColor(0,0,0,.4)gc.rectangle("fill",316,36,124,N)
gc.setColor(1,1,1)gc.rectangle("line",316,36,124,N)
mText(drawableText.next,378,-15)
N=1
while N<=P.gameEnv.next and P.next[N]do
local b,c=P.next[N].bk,P.next[N].color
for i=1,#b do for j=1,#b[1] do
if b[i][j]then
drawPixel(i+20-2.4*N-#b*.5,j+12.7-#b[1]*.5,c)
drawPixel(i+20-2.4*N-#b*.5,j+12.6-#b[1]*.5,c)
end
end end
N=N+1
@@ -731,7 +731,7 @@ local function Pdraw_norm(P)
gc.setColor(.8,.5,.5)
for i=C,N-1,L do
local y=72*i+36
gc.line(321+P.fieldOff.x,y,441,y)
gc.line(318+P.fieldOff.x,y,438,y)
end
end
@@ -745,18 +745,23 @@ local function Pdraw_norm(P)
mStr(int(count/60+1),0,0)
gc.pop()
end--Draw starting counter
TEXT.draw(P.bonus)--Bonus texts
--Bonus texts
TEXT.draw(P.bonus)
--Speed dials
setFont(25)
drawDial(360,520,P.dropSpeed)
drawDial(405,575,P.keySpeed)
drawDial(360,510,P.dropSpeed)
drawDial(405,565,P.keySpeed)
gc.setColor(1,1,1)
gc.draw(drawableText.bpm,390,480)
gc.draw(drawableText.kpm,344,573)
mStr(format("%.2f",P.stat.time),-81,518)--Time
mStr(P.score1,-81,560)--Score
gc.draw(drawableText.bpm,390,490)
gc.draw(drawableText.kpm,344,583)
--Speed dials
--Other messages
gc.setColor(1,1,1)
curMode.mesDisp(P)--Other messages
curMode.mesDisp(P)
if modeEnv.royaleMode then
if P.atkMode then
@@ -773,6 +778,7 @@ local function Pdraw_norm(P)
gc.pop()
end
local function Pdraw_small(P)
--draw content
P.frameWait=P.frameWait-1
if P.frameWait==0 then
P.frameWait=10
@@ -781,16 +787,20 @@ local function Pdraw_small(P)
gc.push("transform")
gc.origin()
gc.setColor(1,1,1,P.result and max(20-P.endCounter,0)*.05 or 1)
--Field
local F=P.field
for j=1,#F do
for i=1,10 do if F[j][i]>0 then
gc.draw(blockSkinMini[F[j][i]],6*i-6,120-6*j)
end end
end--Field
end
--Draw boarder
if P.alive then
gc.setLineWidth(2)
gc.setColor(frameColor[P.strength])gc.rectangle("line",1,1,58,118)
end--Draw boarder
end
if modeEnv.royaleMode then
gc.setColor(1,1,1)
for i=1,P.strength do
@@ -804,11 +814,11 @@ local function Pdraw_small(P)
end
gc.pop()
gc.setCanvas()
--draw content
end
--draw Canvas
gc.setColor(1,1,1)
gc.draw(P.canvas,P.x,P.y,nil,P.size*10)
--draw Canvas
if P.killMark then
gc.setLineWidth(3)
gc.setColor(1,0,0,min(P.endCounter,25)*.04)
@@ -861,38 +871,43 @@ local function Pdraw_demo(P)
drawFXs(P)
if P.cur and P.waiting==-1 then
--Draw ghost
gc.setColor(1,1,1,.3)
for i=1,P.r do for j=1,P.c do
if P.cur.bk[i][j]then
drawPixel(i+P.y_img-1,j+P.curX-1,curColor)
end
end end
--Ghost draw
--Draw block
gc.setColor(1,1,1)
for i=1,P.r do for j=1,P.c do
if P.cur.bk[i][j]then
drawPixel(i+P.curY-1,j+P.curX-1,curColor)
end
end end--Block
end end
end
--Draw hold
local blockImg=TEXTURE.miniBlock
if P.hd then
local id=P.hd.id
_=P.color[id]
gc.setColor(_[1],_[2],_[3],.3)
_=miniBlock[id]
_=blockImg[id]
gc.draw(_,15,30,nil,16,nil,0,_:getHeight()*.5)
end--Hold
end
--Draw next
local N=1
while N<=P.gameEnv.next and P.next[N]do
local id=P.next[N].id
_=P.color[id]
gc.setColor(_[1],_[2],_[3],.3)
_=miniBlock[id]
_=blockImg[id]
gc.draw(_,285,40*N-10,nil,16,nil,_:getWidth(),_:getHeight()*.5)
N=N+1
end--Next
end
gc.setColor(1,1,1)
gc.translate(-P.fieldOff.x,-P.fieldOff.y)
@@ -1121,7 +1136,7 @@ function player.garbageRise(P,color,amount,pos)
P.fieldBeneath=P.fieldBeneath+amount*30
P.curY=P.curY+amount
P.garbageBeneath=P.garbageBeneath+amount
P:freshgho()
P.y_img=P.y_img+amount
for i=1,#P.clearingRow do
P.clearingRow[i]=P.clearingRow[i]+amount
end
@@ -1155,7 +1170,7 @@ function player.pushLine(P,L,mir)
end
P.fieldBeneath=P.fieldBeneath+120
P.curY=P.curY+#L
P:freshgho()
P.y_img=P.y_img+#L
end
function player.pushNext(P,L,mir)
for i=1,#L do
@@ -1211,6 +1226,7 @@ function player.changeAtk(P,R)
end
end
function player.freshgho(P)
if not P.cur then return end
P.y_img=min(#P.field+1,P.curY)
if P.gameEnv._20G or P.keyPressing[7]and P.gameEnv.sdarr==0 then
while not P:ifoverlap(P.cur.bk,P.curX,P.y_img-1)do
@@ -1297,8 +1313,8 @@ function player.resetBlock(P)
local id=C.id
local face=P.gameEnv.face[id]
local sc=scs[id][face]
P.sc=sc --spin center
P.dir=face --block direction
P.sc=sc --spin center
P.dir=face --block direction
P.r,P.c=#C.bk,#C.bk[1] --row/column
P.curX=int(6-P.c*.5)
local y=21+ceil(P.fieldBeneath/30)
@@ -1309,6 +1325,10 @@ function player.resetBlock(P)
P.curX=x
end
end--IMS
if P.human and id<8 then
SFX.play("spawn_"..id,setting.spawn,nil,true)
end
end
function player.hold(P,ifpre)
if not P.holded and (ifpre or P.waiting==-1) and P.gameEnv.hold then
@@ -1338,7 +1358,12 @@ function player.hold(P,ifpre)
if C then
P.cur=C
P.pieceCount=P.pieceCount+1
if P.AI_mode=="CC"then BOT.addNext(P.AI_bot,CCblockID[P.next[P.AIdata.next].id])end
if P.AI_mode=="CC"then
local next=P.next[P.AIdata.next]
if next then
BOT.addNext(P.AI_bot,CCblockID[next.id])
end
end
else
P.holded=false
end
@@ -1348,9 +1373,6 @@ function player.hold(P,ifpre)
P:freshgho()
P.dropDelay,P.lockDelay,P.freshTime=P.gameEnv.drop,P.gameEnv.lock,max(P.freshTime-5,0)
if P:ifoverlap(P.cur.bk,P.curX,P.curY)then P:lock()P:lose()end
if P.human and setting.spawn then
SFX.play("spawn_"..C.id)
end
end
if P.human then
@@ -1374,7 +1396,12 @@ function player.popNext(P)--pop next queue to hand
P:newNext()
if P.cur then
P.pieceCount=P.pieceCount+1
if P.AI_mode=="CC"then BOT.addNext(P.AI_bot,CCblockID[P.next[P.AIdata.next].id])end
if P.AI_mode=="CC"then
local next=P.next[P.AIdata.next]
if next then
BOT.addNext(P.AI_bot,CCblockID[next.id])
end
end
local _=P.keyPressing
if _[8]and P.gameEnv.hold and P.gameEnv.ihs then
P:hold(true)
@@ -1406,9 +1433,6 @@ function player.popNext(P)--pop next queue to hand
end
if _[6]then P.act.hardDrop(P)_[6]=false end--IHdS
if P.human and setting.spawn then
SFX.play("spawn_"..P.cur.id)
end
end
end
function player.drop(P)--Place piece
@@ -2572,7 +2596,7 @@ function PLY.newAIPlayer(id,x,y,size,AIdata)
ENV.face={0,0,0,0,0,0,0}
ENV.skin={1,5,8,2,10,3,7}
prepareSequence(P)
P.human=false
loadAI(P,AIdata)
end

View File

@@ -1,27 +1,26 @@
local gc=love.graphics
local N=gc.newImage
local int=math.floor
local function T(s,t)return gc.newText(setFont(s),t)end
local function C(x,y)
local _=gc.newCanvas(x,y)
gc.setCanvas(_)
return _
end
local c
local TEXTURE={}
gc.setDefaultFilter("nearest","nearest")
gc.setColor(1,1,1)
local VKI=N("/image/virtualkey.png")
VKIcon={}
local VKI=gc.newImage("/image/virtualkey.png")
TEXTURE.VKIcon={}
for i=1,20 do
VKIcon[i]=C(36,36)
TEXTURE.VKIcon[i]=C(36,36)
gc.draw(VKI,(i-1)%5*-36,int((i-1)*.2)*-36)
end
miniBlock={}
TEXTURE.miniBlock={}
for i=1,25 do
local b=blocks[i][0]
miniBlock[i]=C(#b[1],#b)
TEXTURE.miniBlock[i]=C(#b[1],#b)
for y=1,#b do for x=1,#b[1]do
if b[y][x]then
gc.rectangle("fill",x-1,#b-y,1,1)
@@ -29,56 +28,12 @@ for i=1,25 do
end end
end
mapCross=C(40,40)
TEXTURE.mapCross=C(40,40)
gc.setColor(1,1,1)
gc.setLineWidth(4)
gc.line(0,20,40,20)
gc.line(20,0,20,40)
gc.setDefaultFilter("linear","linear")
drawableText={
question=T(100,"?"),
bpm=T(15,"BPM"),kpm=T(15,"KPM"),
speedLV=T(20,"speed level"),
atk=T(20,"Attack"),
eff=T(20,"Efficiency"),
tsd=T(35,"TSD"),
line=T(25,"Lines"),
techrash=T(25,"Techrash"),
grade=T(25,"Grade"),
wave=T(30,"Wave"),
rpm=T(35,"RPM"),
nextWave=T(30,"Next"),
combo=T(20,"Combo"),
mxcmb=T(20,"Max Combo"),
pc=T(20,"Perfect Clear"),
ko=T(25,"KO"),
D=T(100,"D"),
C=T(100,"C"),
B=T(100,"B"),
A=T(100,"A"),
S=T(100,"S"),
modeName=T(30),levelName=T(30),
anykey=T(40),
next=T(40),hold=T(40),
win=T(120),finish=T(120),
lose=T(120),pause=T(120),
custom=T(80),sequence=T(80),
setting_game=T(80),setting_video=T(80),setting_sound=T(80),
setting_control=T(70),setting_skin=T(70),
preview=T(40),
keyboard=T(25),joystick=T(25),
ctrlSetHelp=T(30),
musicRoom=T(80),
nowPlaying=T(50),
VKTchW=T(30),VKOrgW=T(30),VKCurW=T(30),
noScore=T(45),
highScore=T(30),
}
gc.setCanvas()
gc.setCanvas()
return TEXTURE

View File

@@ -17,6 +17,7 @@ local S=[=[
HAGE KANOBU 闪电和拐棍 葡萄味的曼妥思
世界沃德 蓝绿 天生的魔法师 琳雨空
T8779.易缄 吃水榴莲 诗情画意 星姐阿夸双推Man暗炎
[*Y] [*炎]
Thanks!!!
Future outlook:
@@ -69,12 +70,30 @@ Future outlook:
more graphic FXs & 3D features & animations
network game
new AI: task-Z
0.9.1: next piece SFX
0.9.2: Global Update
new:
next piece spawn SFX
code:
render background to canvas first, not redering each frame
independent spawning volume setting
select widgets with arrow keys
display last played mode on title screen
new blind mode (extremely hard)
mode map changed
[debug page]
change:
three little better backgrounds instead of stupid rainbow
kick list of i-piece little changed
no extremly huge radar chart in pause page
new in-game layout
new setting page layout
fixed:
error in infinite-dig
CC's sudden death sometimes
missing the top line when paste field
error when AI used all nexts
error when play default-bag game after played with custom sequence
0.9.1: Piece Spawn SFX
new:
piece spawn SFX
fixed:
error when moving [nothing] when arr>0
error when complete master-advanced