Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4652be7067 | ||
|
|
ed0f8031d0 |
2
conf.lua
2
conf.lua
@@ -1,4 +1,4 @@
|
||||
gameVersion="Alpha V0.8.12"
|
||||
gameVersion="Alpha V0.8.14"
|
||||
function love.conf(t)
|
||||
t.identity="Techmino"--SaveDir name
|
||||
t.version="11.1"
|
||||
|
||||
@@ -11,7 +11,8 @@ setting={
|
||||
--game
|
||||
|
||||
ghost=true,center=true,
|
||||
smo=true,grid=false,
|
||||
smooth=true,grid=false,
|
||||
lockFX=2,
|
||||
dropFX=3,
|
||||
shakeFX=2,
|
||||
atkFX=3,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
游戏方法:
|
||||
控制系统提供的一个个四联方块(左右移动和旋转90,180,270度),每填满场地的一行就会将其消除,根据消除方式会给对手攻击(如果有对手的话)
|
||||
系统会提供的一个个四联骨牌("方块",总共7种),玩家需要控制(左右移动和旋转90,180,270度),每填满场地的一行就会将其消除,根据消除方式会给对手攻击(如果有对手的话)
|
||||
活到最后或者完成目标即胜利.
|
||||
|
||||
旋转系统:
|
||||
@@ -16,8 +16,8 @@ spin判定:
|
||||
特殊消除:
|
||||
spin1/2/3攻击2/4/6,若mini则减半
|
||||
B2B:加1(techrash/spin1/spin2)或2(spin3)攻击
|
||||
B3B:在B2B效果之上再+1攻击和+1额外抵挡
|
||||
连击:0,0,1,1,2,2,3,3,4,4,3……
|
||||
B3B:在B2B效果之上消四再加1,spin再加0.5*消行数攻击,二者都+1额外抵挡
|
||||
连击:0,0,1,1,2,2,2,3,3,4,3,2…(后面都是2)
|
||||
特殊消除会增加B2B点数,让之后的特殊消除获得B2B(B3B)增益(详细说明见下文)
|
||||
PC:将上述伤害之和开根号,再+6~10(本局内递增)+2额外抵挡(注:本局消行数>4时会将B2B点数拉满)
|
||||
根据上述规则计算后,向下取整,攻击打出
|
||||
|
||||
4
file.lua
4
file.lua
@@ -148,7 +148,9 @@ function loadSetting()
|
||||
local F=FILE.setting
|
||||
if F:open("r")then
|
||||
local s=F:read()
|
||||
if s:sub(1,6)~="return"then s="return{"..s.."}"end
|
||||
if s:sub(1,6)~="return"then
|
||||
s="return{"..s:gsub("\n",",").."}"
|
||||
end
|
||||
s=loadstring(s)
|
||||
F:close()
|
||||
if s then
|
||||
|
||||
@@ -72,9 +72,11 @@ return{
|
||||
setting_game="游戏设置",
|
||||
setting_graphic="画面设置",
|
||||
setting_sound="声音设置",
|
||||
setting_control="控制设置",
|
||||
setting_skin="外观设置",
|
||||
preview="预览",
|
||||
keyboard="键盘",joystick="手柄",
|
||||
ctrlSetHelp="方向键选择/翻页,回车修改,esc返回",
|
||||
blockLayout="外观设置",
|
||||
musicRoom="音乐室",
|
||||
nowPlaying="正在播放:",
|
||||
|
||||
@@ -147,7 +149,7 @@ return{
|
||||
"特别感谢:Flyz,Farter,196,Teatube,T830,[所有内测人员]和 你!",
|
||||
"",
|
||||
"错误或者建议请附带截图发送到内测群或者作者邮箱~",
|
||||
"游戏现在仅通过内测群1057456078进行免费下载/更新",
|
||||
"仅通过唯一内测群1057456078进行免费下载/更新",
|
||||
"其他渠道获得游戏皆有被修改/植入病毒的风险,程序只申请了震动&联网权限!",
|
||||
"若由于被修改的本游戏产生的各种损失作者不负责(我怎么负责啊跟我有啥关系)",
|
||||
"请从正规途径获得最新版,游戏现为免费,不过有打赏当然感谢啦~",
|
||||
@@ -201,18 +203,6 @@ return{
|
||||
},
|
||||
draw={
|
||||
any="不定",
|
||||
block1="Z",
|
||||
block2="S",
|
||||
block3="L",
|
||||
block4="J",
|
||||
block5="T",
|
||||
block6="O",
|
||||
block7="I",
|
||||
gb1="■",
|
||||
gb2="■",
|
||||
gb3="■",
|
||||
gb4="■",
|
||||
gb5="■",
|
||||
space="×",
|
||||
clear="清除",
|
||||
demo="不显示×",
|
||||
@@ -232,16 +222,12 @@ return{
|
||||
setting_game={
|
||||
graphic="←画面设置",
|
||||
sound="声音设置→",
|
||||
reset="重置DAS/ARR",
|
||||
dasD="-",dasU="+",
|
||||
arrD="-",arrU="+",
|
||||
sddasD="-",sddasU="+",
|
||||
sdarrD="-",sdarrU="+",
|
||||
ctrl="控制设置",
|
||||
reTime="开局等待时间",
|
||||
maxNext="最大预览数量",
|
||||
autoPause="自动暂停",
|
||||
layout="外观",
|
||||
ctrl="键位设置",
|
||||
key="键位设置",
|
||||
touch="触屏设置",
|
||||
quickR="快速重新开始",
|
||||
autoPause="自动暂停",
|
||||
@@ -257,7 +243,8 @@ return{
|
||||
center="旋转中心",
|
||||
bg="背景",
|
||||
bgspace="星空背景",
|
||||
smo="平滑下落",
|
||||
smooth="平滑下落",
|
||||
lockFX="锁定特效等级",
|
||||
dropFX="下落特效等级",
|
||||
shakeFX="晃动特效等级",
|
||||
atkFX="攻击特效等级",
|
||||
@@ -275,6 +262,12 @@ return{
|
||||
stereo="立体声",
|
||||
back=BK,
|
||||
},
|
||||
setting_control={
|
||||
das="DAS",arr="ARR",
|
||||
sddas="软降DAS",sdarr="软降ARR",
|
||||
reset="重置",
|
||||
back=BK,
|
||||
},
|
||||
setting_key={
|
||||
back=BK,
|
||||
},
|
||||
@@ -287,7 +280,8 @@ return{
|
||||
prev5="↑",next5="↓",spin5="R",
|
||||
prev6="↑",next6="↓",spin6="R",
|
||||
prev7="↑",next7="↓",spin7="R",
|
||||
reset="重置方向",
|
||||
skinR="重置配色",
|
||||
faceR="重置方向",
|
||||
back=BK,
|
||||
},
|
||||
setting_touch={
|
||||
|
||||
@@ -66,15 +66,15 @@ return{
|
||||
freshLimit={0,8,15,"∞"},
|
||||
opponent={"无电脑","9S Lv1","9S Lv2","9S Lv3","9S Lv4","9S Lv5","CC Lv1","CC Lv2","CC Lv3","CC Lv4","CC Lv5","CC Lv6"},
|
||||
},
|
||||
softdropdas="软降DAS:",
|
||||
softdroparr="软降ARR:",
|
||||
snapLevelName={"无吸附","10px吸附","20px吸附","40px吸附","60px吸附","80px吸附"},
|
||||
setting_game="游戏设置",
|
||||
setting_graphic="画面设置",
|
||||
setting_sound="声音设置",
|
||||
setting_control="控制设置",
|
||||
setting_skin="外观设置",
|
||||
preview="预览",
|
||||
keyboard="键盘",joystick="手柄",
|
||||
ctrlSetHelp="方向键选择/翻页,回车修改,esc返回",
|
||||
blockLayout="外观设置",
|
||||
musicRoom="音乐室",
|
||||
nowPlaying="正在播放:",
|
||||
|
||||
@@ -147,7 +147,7 @@ return{
|
||||
"特别感谢:Flyz,Farter,196,Teatube,T830,[所有内测人员]和 你!",
|
||||
"",
|
||||
"错误或者建议请附带截图发送到内测群或者作者邮箱~",
|
||||
"游戏现在仅通过内测群1057456078进行免费下载/更新",
|
||||
"仅通过唯一内测群1057456078进行免费下载/更新",
|
||||
"其他渠道获得游戏皆有被修改/植入病毒的风险,程序只申请了震动&联网权限!",
|
||||
"若由于被修改的本游戏产生的各种损失作者不负责(我怎么负责啊跟我有啥关系)",
|
||||
"请从正规途径获得最新版,游戏现为免费,不过有打赏当然感谢啦~",
|
||||
@@ -201,18 +201,6 @@ return{
|
||||
},
|
||||
draw={
|
||||
any="不定",
|
||||
block1="Z",
|
||||
block2="S",
|
||||
block3="L",
|
||||
block4="J",
|
||||
block5="T",
|
||||
block6="O",
|
||||
block7="I",
|
||||
gb1="■",
|
||||
gb2="■",
|
||||
gb3="■",
|
||||
gb4="■",
|
||||
gb5="■",
|
||||
space="×",
|
||||
clear="清除",
|
||||
demo="不显示×",
|
||||
@@ -232,16 +220,12 @@ return{
|
||||
setting_game={
|
||||
graphic="←画面设置",
|
||||
sound="声音设置→",
|
||||
reset="重置DAS/ARR",
|
||||
dasD="-",dasU="+",
|
||||
arrD="-",arrU="+",
|
||||
sddasD="-",sddasU="+",
|
||||
sdarrD="-",sdarrU="+",
|
||||
ctrl="控制设置",
|
||||
reTime="开局等待时间",
|
||||
maxNext="最大预览数量",
|
||||
autoPause="自动暂停",
|
||||
layout="外观",
|
||||
ctrl="键位设置",
|
||||
key="键位设置",
|
||||
touch="触屏设置",
|
||||
quickR="快速重新开始",
|
||||
swap="组合键切换攻击模式",
|
||||
@@ -256,7 +240,8 @@ return{
|
||||
center="旋转中心",
|
||||
bg="背景",
|
||||
bgspace="星空背景",
|
||||
smo="平滑下落",
|
||||
smooth="平滑下落",
|
||||
lockFX="锁定特效等级",
|
||||
dropFX="下落特效等级",
|
||||
shakeFX="晃动特效等级",
|
||||
atkFX="攻击特效等级",
|
||||
@@ -274,6 +259,12 @@ return{
|
||||
stereo="立体声",
|
||||
back=BK,
|
||||
},
|
||||
setting_control={
|
||||
das="首次移动延迟",arr="移动重复延迟",
|
||||
sddas="首次软降延迟",sdarr="软降重复延迟",
|
||||
reset="重置",
|
||||
back=BK,
|
||||
},
|
||||
setting_key={
|
||||
back=BK,
|
||||
},
|
||||
@@ -286,7 +277,8 @@ return{
|
||||
prev5="↑",next5="↓",spin5="转",
|
||||
prev6="↑",next6="↓",spin6="转",
|
||||
prev7="↑",next7="↓",spin7="转",
|
||||
reset="重置方向",
|
||||
skinR="重置配色",
|
||||
faceR="重置方向",
|
||||
back=BK,
|
||||
},
|
||||
setting_touch={
|
||||
|
||||
@@ -64,14 +64,14 @@ return{
|
||||
freshLimit={0,8,15,"∞"},
|
||||
opponent={"No CPU","9S Lv1","9S Lv2","9S Lv3","9S Lv4","9S Lv5","CC Lv1","CC Lv2","CC Lv3","CC Lv4","CC Lv5","CC Lv6"},
|
||||
},
|
||||
softdropdas="Down DAS:",
|
||||
softdroparr="Down ARR:",
|
||||
snapLevelName={"Free pos","Snap-10","Snap-20","Snap-40","Snap-60","Snap-80"},
|
||||
setting_game="Game setting",
|
||||
setting_graphic="Graphic setting",
|
||||
setting_sound="Sound setting",
|
||||
setting_control="Control Setting",
|
||||
setting_skin="Layout Setting",
|
||||
preview="Preview",
|
||||
keyboard="Keyboard",joystick="Joystick",
|
||||
blockLayout="Layout Setting",
|
||||
ctrlSetHelp="Arrowkey to select/change slot,Enter to change,Esc back",
|
||||
musicRoom="Music Room",
|
||||
nowPlaying="Now Playing:",
|
||||
@@ -145,7 +145,7 @@ return{
|
||||
"Special thanks:Flyz,Farter,196,Teatube,T830,[all test staff] and YOU!",
|
||||
"",
|
||||
"Any bugs/suggestions to my E-mail.(may with screenshot)",
|
||||
"Newest game only released in alpha-test group FREE",
|
||||
"Only released in test group for FREE",
|
||||
"Game downloaded from other way may implanted with virous",
|
||||
"Only network/vibrating permission applied",
|
||||
"Author is not responsible for any loss by eddited game",
|
||||
@@ -199,18 +199,6 @@ Lib used:
|
||||
},
|
||||
draw={
|
||||
any="Erase",
|
||||
block1="Z",
|
||||
block2="S",
|
||||
block3="L",
|
||||
block4="J",
|
||||
block5="T",
|
||||
block6="O",
|
||||
block7="I",
|
||||
gb1="■",
|
||||
gb2="■",
|
||||
gb3="■",
|
||||
gb4="■",
|
||||
gb5="■",
|
||||
space="×",
|
||||
clear="Clear",
|
||||
demo="Don't show ×",
|
||||
@@ -230,16 +218,12 @@ Lib used:
|
||||
setting_game={
|
||||
graphic="←Graphic",
|
||||
sound="Sound→",
|
||||
reset="Reset DAS/ARR",
|
||||
dasD="-",dasU="+",
|
||||
arrD="-",arrU="+",
|
||||
sddasD="-",sddasU="+",
|
||||
sdarrD="-",sdarrU="+",
|
||||
ctrl="Control setting",
|
||||
reTime="Delay before game",
|
||||
maxNext="Max next count",
|
||||
autoPause="Auto pause",
|
||||
layout="Layout",
|
||||
ctrl="Key Setting",
|
||||
key="Key Setting",
|
||||
touch="Touch Setting",
|
||||
quickR="Quick restart",
|
||||
autoPause="Auto pause",
|
||||
@@ -255,7 +239,8 @@ Lib used:
|
||||
center="Center",
|
||||
bg="Background",
|
||||
bgspace="BG space",
|
||||
smo="Smoooth drop",
|
||||
smooth="Smooth drop",
|
||||
lockFX="Lock FX level",
|
||||
dropFX="Drop FX level",
|
||||
shakeFX="Shake FX level",
|
||||
atkFX="ATK FX level",
|
||||
@@ -273,6 +258,12 @@ Lib used:
|
||||
stereo="Stereo",
|
||||
back=BK,
|
||||
},
|
||||
setting_control={
|
||||
das="DAS",arr="ARR",
|
||||
sddas="softdrop DAS",sdarr="softdrop ARR",
|
||||
reset="Reset",
|
||||
back=BK,
|
||||
},
|
||||
setting_key={
|
||||
back=BK,
|
||||
},
|
||||
@@ -285,7 +276,8 @@ Lib used:
|
||||
prev5="↑",next5="↓",spin5="R",
|
||||
prev6="↑",next6="↓",spin6="R",
|
||||
prev7="↑",next7="↓",spin7="R",
|
||||
reset="reset Dir",
|
||||
skinR="reset Color",
|
||||
faceR="reset Dir",
|
||||
back=BK,
|
||||
},
|
||||
setting_touch={
|
||||
|
||||
116
main.lua
116
main.lua
@@ -37,16 +37,10 @@ mapCam={
|
||||
zoomK=nil,
|
||||
--for auto zooming when enter/leave scene
|
||||
}
|
||||
blockColor={}
|
||||
curBG="none"
|
||||
voiceQueue={free=0}
|
||||
texts={}
|
||||
widget_sel=nil--selected widget object
|
||||
virtualkeyDown,virtualkeyPressTime={},{}
|
||||
for i=1,20 do
|
||||
virtualkeyDown[i]=X
|
||||
virtualkeyPressTime[i]=0
|
||||
end
|
||||
|
||||
kb.setKeyRepeat(true)
|
||||
kb.setTextInput(false)
|
||||
@@ -56,7 +50,7 @@ ms.setVisible(false)
|
||||
customSel={1,22,1,1,7,3,1,1,8,4,1,1,1}
|
||||
preField={h=20}
|
||||
for i=1,20 do preField[i]={0,0,0,0,0,0,0,0,0,0}end
|
||||
blockSkin,blockSkinMini={},{}
|
||||
-- blockSkin,blockSkinMini={},{}--redefined in skin.change
|
||||
--Game system Vars
|
||||
-------------------------------------------------------------
|
||||
require("parts/list")
|
||||
@@ -184,6 +178,16 @@ local touchDown,touchUp,touchMove={},{},{}
|
||||
local keyDown,keyUp={},{}
|
||||
local gamepadDown,gamepadUp={},{}
|
||||
|
||||
function mouseDown.load()
|
||||
sceneTemp.skip=true
|
||||
end
|
||||
function keyDown.load()
|
||||
sceneTemp.skip=true
|
||||
end
|
||||
function touchDown.load()
|
||||
sceneTemp.skip=true
|
||||
end
|
||||
|
||||
function mouseDown.intro(x,y,k)
|
||||
if k==2 then
|
||||
VOICE("bye")
|
||||
@@ -406,23 +410,13 @@ function touchMove.draw(id,x,y,dx,dy)
|
||||
end
|
||||
end
|
||||
local penKey={
|
||||
["1"]=1,["2"]=2,["3"]=3,
|
||||
q=4, w=5, e=6,
|
||||
a=7, s=9, d=10,
|
||||
z=11, x=12, c=13,
|
||||
tab=0, backspace=0,
|
||||
lshift=-1, lalt=-1,
|
||||
q=1,w=2,e=3,r=4,t=5,y=6,u=7,i=8,o=9,p=10,["["]=11,
|
||||
a=12,s=13,d=14,f=15,g=16,h=17,
|
||||
z=0,x=-1,
|
||||
}
|
||||
function keyDown.draw(key)
|
||||
local sx,sy,pen=sceneTemp.x,sceneTemp.y,sceneTemp.pen
|
||||
if key=="delete"then
|
||||
if sceneTemp.sure>15 then
|
||||
for y=1,20 do for x=1,10 do preField[y][x]=0 end end
|
||||
sceneTemp.sure=0
|
||||
else
|
||||
sceneTemp.sure=50
|
||||
end
|
||||
elseif key=="up"or key=="down"or key=="left"or key=="right"then
|
||||
if key=="up"or key=="down"or key=="left"or key=="right"then
|
||||
if not sx then sx=1 end
|
||||
if not sy then sy=1 end
|
||||
if key=="up"and sy<20 then sy=sy+1
|
||||
@@ -433,6 +427,13 @@ function keyDown.draw(key)
|
||||
if kb.isDown("space")then
|
||||
preField[sy][sx]=pen
|
||||
end
|
||||
elseif key=="delete"then
|
||||
if sceneTemp.sure>20 then
|
||||
for y=1,20 do for x=1,10 do preField[y][x]=0 end end
|
||||
sceneTemp.sure=0
|
||||
else
|
||||
sceneTemp.sure=50
|
||||
end
|
||||
elseif key=="space"then
|
||||
if sx and sy then
|
||||
preField[sy][sx]=pen
|
||||
@@ -626,13 +627,12 @@ function touchDown.play(id,x,y)
|
||||
local t=onVirtualkey(x,y)
|
||||
if t then
|
||||
players[1]:pressKey(t)
|
||||
virtualkeyDown[t]=true
|
||||
virtualkeyPressTime[t]=10
|
||||
virtualkey[t].isDown=true
|
||||
virtualkey[t].pressTime=10
|
||||
if setting.VKTrack then
|
||||
local B=virtualkey[t]
|
||||
--按钮软碰撞(做不来hhh随便做一个,效果还行!)
|
||||
if setting.VKDodge then
|
||||
for i=1,#virtualkey do
|
||||
if setting.VKDodge then--按钮软碰撞(做不来hhh随便做一个,效果还行!)
|
||||
for i=1,#virtualkey do
|
||||
local b=virtualkey[i]
|
||||
local d=B.r+b.r-((B.x-b.x)^2+(B.y-b.y)^2)^.5--碰撞深度(负数=间隔距离)
|
||||
if d>0 then
|
||||
@@ -644,8 +644,8 @@ function touchDown.play(id,x,y)
|
||||
local O=VK_org[t]
|
||||
local _FW,_CW=setting.VKTchW*.1,1-setting.VKCurW*.1
|
||||
local _OW=1-_FW-_CW
|
||||
B.x,B.y=x*_FW+B.x*_CW+O.x*_OW,y*_FW+B.y*_CW+O.y*_OW
|
||||
--按钮自动跟随:手指位置,当前位置,原始位置,权重取决于设置
|
||||
B.x,B.y=x*_FW+B.x*_CW+O.x*_OW,y*_FW+B.y*_CW+O.y*_OW
|
||||
end
|
||||
VIB(0)
|
||||
end
|
||||
@@ -677,7 +677,7 @@ function touchMove.play(id,x,y,dx,dy)
|
||||
end
|
||||
function keyDown.play(key)
|
||||
if key=="escape"then
|
||||
(frame<180 and back or pauseGame)()
|
||||
(frame<180 and scene.back or pauseGame)()
|
||||
return
|
||||
end
|
||||
local m=keyMap
|
||||
@@ -686,8 +686,8 @@ function keyDown.play(key)
|
||||
if key==m[2*p-1][k]or key==m[2*p][k]then
|
||||
players[p]:pressKey(k)
|
||||
if p==1 then
|
||||
virtualkeyDown[k]=true
|
||||
virtualkeyPressTime[k]=10
|
||||
virtualkey[k].isDown=true
|
||||
virtualkey[k].pressTime=10
|
||||
end
|
||||
return
|
||||
end
|
||||
@@ -700,6 +700,7 @@ function keyUp.play(key)
|
||||
for k=1,20 do
|
||||
if key==m[2*p-1][k]or key==m[2*p][k]then
|
||||
players[p]:releaseKey(k)
|
||||
if p==1 then virtualkey[k].isDown=false end
|
||||
return
|
||||
end
|
||||
end
|
||||
@@ -713,8 +714,8 @@ function gamepadDown.play(key)
|
||||
if key==m[2*p+7][k]or key==m[2*p+8][k]then
|
||||
players[p]:pressKey(k)
|
||||
if p==1 then
|
||||
virtualkeyDown[k]=true
|
||||
virtualkeyPressTime[k]=10
|
||||
virtualkey[k].isDown=true
|
||||
virtualkey[k].pressTime=10
|
||||
end
|
||||
return
|
||||
end
|
||||
@@ -727,20 +728,20 @@ function gamepadUp.play(key)
|
||||
for k=1,20 do
|
||||
if key==m[2*p+7][k]or key==m[2*p+8][k]then
|
||||
players[p]:releaseKey(k)
|
||||
if p==1 then virtualkey[k].isDown=false end
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function wheelMoved.history(x,y)
|
||||
wheelScroll(y)
|
||||
end
|
||||
function keyDown.history(key)
|
||||
if key=="up"then
|
||||
sceneTemp[2]=max(sceneTemp[2]-10,1)
|
||||
sceneTemp[2]=max(sceneTemp[2]-3,1)
|
||||
elseif key=="down"then
|
||||
sceneTemp[2]=min(sceneTemp[2]+10,#sceneTemp[1]-22)
|
||||
sceneTemp[2]=min(sceneTemp[2]+3,#sceneTemp[1]-22)
|
||||
elseif key=="escape"then
|
||||
scene.back()
|
||||
end
|
||||
@@ -822,7 +823,7 @@ local function widgetControl_gamepad(i)
|
||||
end
|
||||
end
|
||||
end
|
||||
local lastX,lastY--last clickDown pos
|
||||
local lastX,lastY=0,0--last clickDown pos
|
||||
function love.mousepressed(x,y,k,t,num)
|
||||
if t then return end
|
||||
mouseShow=true
|
||||
@@ -839,8 +840,7 @@ function love.mousepressed(x,y,k,t,num)
|
||||
widgetPress(widget_sel,mx,my)
|
||||
end
|
||||
end
|
||||
lastX=mx
|
||||
lastY=my
|
||||
lastX,lastY=mx,my
|
||||
end
|
||||
function love.mousemoved(x,y,dx,dy,t)
|
||||
if t then return end
|
||||
@@ -851,8 +851,10 @@ function love.mousemoved(x,y,dx,dy,t)
|
||||
if mouseMove[scene.cur]then
|
||||
mouseMove[scene.cur](mx,my,dx,dy)
|
||||
end
|
||||
if ms.isDown(1)and widget_sel then
|
||||
widgetDrag(widget_sel,mx,my,dx,dy)
|
||||
if ms.isDown(1) then
|
||||
if widget_sel then
|
||||
widgetDrag(widget_sel,mx,my,dx,dy)
|
||||
end
|
||||
else
|
||||
widget_sel=nil
|
||||
for _,W in next,Widget[scene.cur]do
|
||||
@@ -900,18 +902,19 @@ function love.touchmoved(id,x,y,dx,dy)
|
||||
touchMove[scene.cur](id,x,y,dx/scr.k,dy/scr.k)
|
||||
end
|
||||
if widget_sel then
|
||||
widgetDrag(widget_sel,x,y,dx,dy)
|
||||
if touching then
|
||||
widgetDrag(widget_sel,x,y,dx,dy)
|
||||
end
|
||||
else
|
||||
widget_sel=nil
|
||||
for _,W in next,Widget[scene.cur]do
|
||||
if not(W.hide and W.hide())and W:isAbove(x,y)then
|
||||
widget_sel=W
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
if not widget_sel then
|
||||
touching=nil
|
||||
if not widget_sel then
|
||||
touching=nil
|
||||
end
|
||||
end
|
||||
end
|
||||
function love.touchreleased(id,x,y)
|
||||
@@ -937,6 +940,7 @@ function love.keypressed(i)
|
||||
if i=="f8"then devMode=0
|
||||
elseif i=="f9"then devMode=1
|
||||
elseif i=="f10"then devMode=2
|
||||
elseif i=="f11"then devMode=3
|
||||
elseif devMode==2 then
|
||||
if i=="k"then
|
||||
for i=1,8 do
|
||||
@@ -1086,8 +1090,8 @@ local function love_update(dt)
|
||||
local S=scene.swap
|
||||
S.time=S.time-1
|
||||
if S.time==S.mid then
|
||||
scene.init(S.tar,scene.cur)
|
||||
scene.cur=S.tar
|
||||
scene.init(S.tar)
|
||||
for _,W in next,Widget[S.tar]do
|
||||
W:reset()
|
||||
end--重置控件
|
||||
@@ -1099,8 +1103,8 @@ local function love_update(dt)
|
||||
scene.swapping=false
|
||||
end
|
||||
end
|
||||
local i=Tmr[scene.cur]
|
||||
if i then i(dt)end
|
||||
local _=Tmr[scene.cur]
|
||||
if _ then _(dt)end
|
||||
for i=#Task,1,-1 do
|
||||
local T=Task[i]
|
||||
if T.code(T.P,T.data)then
|
||||
@@ -1144,9 +1148,10 @@ local function love_update(dt)
|
||||
end
|
||||
end
|
||||
end
|
||||
--更新控件
|
||||
for _,W in next,Widget[scene.cur]do
|
||||
W:update()
|
||||
end--更新控件
|
||||
end
|
||||
end
|
||||
local scs={1,2,1,2,1,2,1,2,1,2,1.5,1.5,.5,2.5}
|
||||
local FPS=love.timer.getFPS
|
||||
@@ -1167,7 +1172,7 @@ local function love_draw()
|
||||
if mouseShow then
|
||||
local r=Timer()*.5
|
||||
local R=int(r)%7+1
|
||||
local _=blockColor[R]
|
||||
local _=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.setColor(1,1,1,.5)gc.circle("fill",mx,my,5)
|
||||
@@ -1214,6 +1219,9 @@ local function love_draw()
|
||||
gc.print("Mouse:"..mx.." "..my,5,_-60)
|
||||
gc.print("Voices:"..#voiceQueue,5,_-80)
|
||||
gc.print("Tasks:"..#Task,5,_-100)
|
||||
if devMode==3 then
|
||||
love.timer.sleep(.5)
|
||||
end
|
||||
end--DEV info
|
||||
end
|
||||
love.draw,love.update=NULL,NULL
|
||||
@@ -1285,6 +1293,7 @@ function love.errorhandler(msg)
|
||||
local function _(_)CAP=gc.newImage(_)end
|
||||
gc.captureScreenshot(_)
|
||||
gc.present()
|
||||
setting.sfx=setting.voc--only for error "voice" played with voice volume,not saved
|
||||
if SFX.list.error then SFX.play("error",.8)end
|
||||
local BGcolor=rnd()>.026 and{.3,.5,.9},{.62,.3,.926}
|
||||
local needDraw=true
|
||||
@@ -1312,6 +1321,7 @@ function love.errorhandler(msg)
|
||||
setFont(38)gc.printf(text.errorMsg,100,200,1280-100)
|
||||
setFont(20)
|
||||
gc.print(system.."-"..gameVersion,100,660)
|
||||
gc.print("scene:"..scene.cur,400,660)
|
||||
gc.printf(err[1],626,360,1260-626)
|
||||
gc.print("TRACEBACK",626,426)
|
||||
for i=4,#err-2 do
|
||||
@@ -1325,10 +1335,4 @@ function love.errorhandler(msg)
|
||||
end
|
||||
end
|
||||
-------------------------------------------------------------Reset data relied on setting
|
||||
for _=1,7 do
|
||||
blockColor[_]=skin.libColor[setting.skin[_]]
|
||||
end
|
||||
for _=8,17 do
|
||||
blockColor[_]=skin.libColor[_]
|
||||
end
|
||||
changeLanguage(setting.lang)
|
||||
@@ -38,6 +38,7 @@ return{
|
||||
next=1,hold=false,
|
||||
sequence="rnd",
|
||||
freshLimit=0,
|
||||
face={0,0,2,2,2,0,0},
|
||||
target=10,dropPiece=check_LVup,
|
||||
bg="rgb",bgm="rockblock",
|
||||
},
|
||||
|
||||
@@ -7,7 +7,7 @@ local function puzzleCheck(P)
|
||||
local a,b=preField[y][x],L and L[x]or 0
|
||||
if a~=0 then
|
||||
if a==-1 then if b>0 then return end
|
||||
elseif a<8 then if a~=b then return end
|
||||
elseif a<12 then if a~=b then return end
|
||||
elseif a>7 then if b==0 then return end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -51,7 +51,7 @@ return{
|
||||
end
|
||||
end
|
||||
end,
|
||||
bg="game4",bgm="way",
|
||||
bg="game4",bgm="shining terminal",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
|
||||
@@ -52,6 +52,6 @@ return{
|
||||
W>=80 and 3 or
|
||||
W>=50 and 2 or
|
||||
W>=20 and 1 or
|
||||
L>=5 and 0
|
||||
P.stat.row>=5 and 0
|
||||
end,
|
||||
}
|
||||
@@ -51,6 +51,6 @@ return{
|
||||
W>=80 and 3 or
|
||||
W>=50 and 2 or
|
||||
W>=20 and 1 or
|
||||
L>=5 and 0
|
||||
P.stat.row>=5 and 0
|
||||
end,
|
||||
}
|
||||
143
paint.lua
143
paint.lua
@@ -1,9 +1,11 @@
|
||||
local gc=love.graphics
|
||||
local setFont=setFont
|
||||
local int,ceil,rnd,max,min,sin=math.floor,math.ceil,math.random,math.max,math.min,math.sin
|
||||
local int,ceil,rnd,abs=math.floor,math.ceil,math.random,math.abs
|
||||
local max,min,sin=math.max,math.min,math.sin
|
||||
local format=string.format
|
||||
|
||||
local Timer=love.timer.getTime
|
||||
local mStr=mStr
|
||||
local scr=scr
|
||||
local scs=require("parts/spinCenters")
|
||||
local modeRankColor={
|
||||
@@ -57,21 +59,38 @@ local function VirtualkeyPreview()
|
||||
end
|
||||
end
|
||||
local function drawVirtualkey()
|
||||
local V=virtualkey
|
||||
local a=setting.VKAlpha*.1
|
||||
for i=1,#virtualkey do
|
||||
local B=virtualkey[i]
|
||||
if B.ava then
|
||||
local _=virtualkeyDown[i]and gc.setColor(.7,.7,.7,a)or gc.setColor(1,1,1,a)--Dark magic
|
||||
gc.setLineWidth(B.r*.07)
|
||||
local ΔY=virtualkeyPressTime[i]
|
||||
gc.circle("line",B.x,B.y+ΔY,B.r)--Outline circle
|
||||
if setting.VKIcon then
|
||||
gc.draw(VKIcon[i],B.x,B.y+ΔY,nil,B.r*.025,nil,18,18)
|
||||
end--Icon
|
||||
if ΔY>0 then
|
||||
gc.setColor(1,1,1,a*ΔY*.1)
|
||||
gc.circle("line",B.x,B.y,B.r*(1.4-ΔY*.04))
|
||||
end--Ripple
|
||||
if setting.VKIcon then
|
||||
for i=1,#V do
|
||||
if V[i].ava then
|
||||
local B=V[i]
|
||||
gc.setColor(1,1,1,a)
|
||||
gc.setLineWidth(B.r*.07)
|
||||
gc.circle("line",B.x,B.y,B.r)--Button outline
|
||||
local _=V[i].pressTime
|
||||
gc.draw(VKIcon[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)--Glow
|
||||
gc.circle("line",B.x,B.y,B.r*(1.4-_*.04))--Ripple
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
for i=1,#V do
|
||||
if V[i].ava then
|
||||
local B=V[i]
|
||||
gc.setColor(1,1,1,a)
|
||||
gc.setLineWidth(B.r*.07)
|
||||
gc.circle("line",B.x,B.y,B.r)
|
||||
local _=V[i].pressTime
|
||||
if _>0 then
|
||||
gc.setColor(1,1,1,a*_*.08)
|
||||
gc.circle("fill",B.x,B.y,B.r*.94)
|
||||
gc.circle("line",B.x,B.y,B.r*(1.4-_*.04))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -134,17 +153,18 @@ function Pnt.BG.game5()
|
||||
else gc.clear(0,0,0)
|
||||
end
|
||||
end--Lightning
|
||||
local miniBlockColor={}
|
||||
function Pnt.BG.game6()
|
||||
local t=1.2-Timer()%10%3%1.2
|
||||
if t<.3 then gc.clear(t,t,t)
|
||||
else gc.clear(0,0,0)
|
||||
end
|
||||
local R=7-int(Timer()*.5)%7
|
||||
local _=blockColor[R]
|
||||
local _=miniBlockColor[R]
|
||||
gc.setColor(_[1],_[2],_[3],.1)
|
||||
gc.draw(miniBlock[R],640,360,Timer()%3.1416*6,400,400,scs[R][0][2]-.5,#blocks[R][0]-scs[R][0][1]+.5)
|
||||
end--Fast lightning&spining tetromino
|
||||
local matrixT={}for i=1,20 do matrixT[i]={}for j=1,20 do matrixT[i][j]=love.math.noise(i,j)+2 end end
|
||||
local matrixT={}for i=1,50 do matrixT[i]={}for j=1,50 do matrixT[i][j]=love.math.noise(i,j)+2 end end
|
||||
function Pnt.BG.matrix()
|
||||
gc.scale(scr.k)
|
||||
gc.clear(.15,.15,.15)
|
||||
@@ -227,8 +247,8 @@ function Pnt.mode()
|
||||
if c then
|
||||
gc.setColor(c)
|
||||
else
|
||||
c=.5+sin(Timer()*6+_)*.2
|
||||
S=S*(.8+c*.5)
|
||||
c=.5+sin(Timer()*6.26-_)*.2
|
||||
S=S*(.9+c*.4)
|
||||
gc.setColor(c,c,c)
|
||||
end
|
||||
if M.shape==1 then--Rectangle
|
||||
@@ -353,7 +373,6 @@ function Pnt.custom()
|
||||
end
|
||||
end
|
||||
end
|
||||
local blockSkin=blockSkin
|
||||
function Pnt.draw()
|
||||
local sx,sy=sceneTemp.x,sceneTemp.y
|
||||
gc.translate(200,60)
|
||||
@@ -382,17 +401,23 @@ function Pnt.draw()
|
||||
local pen=sceneTemp.pen
|
||||
if pen>0 then
|
||||
gc.setLineWidth(13)
|
||||
gc.setColor(blockColor[pen])
|
||||
gc.rectangle("line",745,460,70,70)
|
||||
gc.setColor(skin.libColor[pen])
|
||||
gc.rectangle("line",565,460,70,70)
|
||||
elseif pen==-1 then
|
||||
gc.setLineWidth(5)
|
||||
gc.setColor(.9,.9,.9)
|
||||
gc.line(755,470,805,520)
|
||||
gc.line(755,520,805,470)
|
||||
gc.line(575,470,625,520)
|
||||
gc.line(575,520,625,470)
|
||||
end
|
||||
if sceneTemp.sure>0 then
|
||||
gc.setColor(1,1,1,sceneTemp.sure*.02)
|
||||
gc.draw(drawableText.question,660,11)
|
||||
gc.draw(drawableText.question,1040,430)
|
||||
end
|
||||
setFont(40)
|
||||
for i=1,7 do
|
||||
local _=setting.skin[i]
|
||||
gc.setColor(skin.libColor[_])
|
||||
mStr(text.block[i],500+65*_,65)
|
||||
end
|
||||
end
|
||||
function Pnt.play()
|
||||
@@ -463,20 +488,21 @@ function Pnt.play()
|
||||
end
|
||||
function Pnt.pause()
|
||||
Pnt.play()
|
||||
local _=pauseTimer*.02
|
||||
if gameResult then _=_*.6 end
|
||||
gc.setColor(.15,.15,.15,_)
|
||||
local T=sceneTemp.timer*.02
|
||||
local t=T
|
||||
if gameResult then t=t*.6 end
|
||||
gc.setColor(.15,.15,.15,t)
|
||||
gc.push("transform")
|
||||
gc.origin()
|
||||
gc.rectangle("fill",0,0,scr.w,scr.h)
|
||||
gc.pop()
|
||||
setFont(25)
|
||||
gc.setColor(1,1,1,pauseTimer*.02)
|
||||
gc.setColor(1,1,1,T)
|
||||
if pauseCount>0 then
|
||||
_=curMode.pauseLimit and pauseTime>30
|
||||
if _ then gc.setColor(1,.4,.4,pauseTimer*.02)end
|
||||
t=curMode.pauseLimit and pauseTime>30
|
||||
if t then gc.setColor(1,.4,.4,T)end
|
||||
gc.print(text.pauseCount..":["..pauseCount.."] "..format("%.2f",pauseTime).."s",110,150)
|
||||
if _ then gc.setColor(1,1,1,pauseTimer*.02)end
|
||||
if t then gc.setColor(1,1,1,T)end
|
||||
end
|
||||
for i=1,7 do
|
||||
gc.print(text.pauseStat[i],95,30*i+310)
|
||||
@@ -487,21 +513,15 @@ function Pnt.pause()
|
||||
gc.print(sceneTemp[i],1050,30*i+100)
|
||||
end
|
||||
_=drawableText.modeName
|
||||
gc.draw(_,120,230)
|
||||
gc.draw(_,100,230)
|
||||
gc.draw(drawableText.levelName,135+_:getWidth(),230)
|
||||
setFont(35)
|
||||
mDraw(gameResult and drawableText[gameResult]or drawableText.pause,640,50-10*(5-pauseTimer*.1)^1.5)
|
||||
mDraw(gameResult and drawableText[gameResult]or drawableText.pause,640,50-10*(5-sceneTemp.timer*.1)^1.5)
|
||||
end
|
||||
function Pnt.setting_game()
|
||||
gc.setColor(1,1,1)
|
||||
mDraw(drawableText.setting_game,640,15)
|
||||
setFont(33)
|
||||
mStr("DAS:"..setting.das.."F",340,205)
|
||||
mStr("ARR:"..setting.arr.."F",660,205)
|
||||
setFont(22)
|
||||
mStr(text.softdropdas..setting.sddas.."F",340,323)
|
||||
mStr(text.softdroparr..setting.sdarr.."F",660,323)
|
||||
gc.draw(blockSkin[7-int(Timer()*2)%7],720,570,Timer()%6.28319,2,nil,15,15)
|
||||
gc.draw(blockSkin[int(Timer()*2)%11+1],720,540,Timer()%6.28319,2,nil,15,15)
|
||||
end
|
||||
function Pnt.setting_graphic()
|
||||
gc.setColor(1,1,1)
|
||||
@@ -522,6 +542,41 @@ function Pnt.setting_sound()
|
||||
gc.draw(miya.f4,129,98+3*sin(t*.7))
|
||||
gc.translate(-x,-y)
|
||||
end
|
||||
function Pnt.setting_control()
|
||||
--Testing grid line
|
||||
gc.setLineWidth(4)
|
||||
gc.setColor(1,1,1,.4)
|
||||
gc.line(550,540,950,540)
|
||||
gc.line(550,580,950,580)
|
||||
gc.line(550,620,950,620)
|
||||
for x=590,910,40 do
|
||||
gc.line(x,530,x,630)
|
||||
end
|
||||
gc.setColor(1,1,1)
|
||||
gc.line(550,530,550,630)
|
||||
gc.line(950,530,950,630)
|
||||
|
||||
--Texts
|
||||
gc.draw(drawableText.setting_control,80,50)
|
||||
setFont(50)
|
||||
gc.printf(text.preview,320,540,200,"right")
|
||||
|
||||
--Floating number
|
||||
setFont(30)
|
||||
local _=setting
|
||||
mStr(_.das,226+35*_.das,150)
|
||||
mStr(_.arr,226+35*_.arr,240)
|
||||
mStr(_.sddas,226+35*_.sddas,330)
|
||||
mStr(_.sdarr,226+35*_.sdarr,420)
|
||||
|
||||
--Testing O mino
|
||||
_=blockSkin[setting.skin[6]]
|
||||
local x=550+40*sceneTemp.pos
|
||||
gc.draw(_,x,540,nil,40/30)
|
||||
gc.draw(_,x,580,nil,40/30)
|
||||
gc.draw(_,x+40,540,nil,40/30)
|
||||
gc.draw(_,x+40,580,nil,40/30)
|
||||
end
|
||||
function Pnt.setting_key()
|
||||
local s=sceneTemp
|
||||
local a=.3+sin(Timer()*15)*.1
|
||||
@@ -582,15 +637,15 @@ function Pnt.setting_skin()
|
||||
local col=#B[1]
|
||||
for i=1,#B do for j=1,col do
|
||||
if B[i][j]then
|
||||
gc.draw(blockSkin[N],x+30*j,y-30*i)
|
||||
gc.draw(blockSkin[setting.skin[N]],x+30*j,y-30*i)
|
||||
end
|
||||
end end
|
||||
gc.circle("fill",-15+140*N,350,sin(Timer()*10)+5)
|
||||
end
|
||||
for i=1,5 do
|
||||
gc.draw(blockSkin[8+i],1110,140+60*i,nil,2)
|
||||
gc.draw(blockSkin[12+i],1110,140+60*i,nil,2)
|
||||
end
|
||||
gc.draw(drawableText.blockLayout,80,50)
|
||||
gc.draw(drawableText.setting_skin,80,50)
|
||||
end
|
||||
function Pnt.setting_touch()
|
||||
gc.setColor(1,1,1)
|
||||
|
||||
@@ -28,13 +28,15 @@ if setting.lang==1 then
|
||||
"使用love2d引擎制作",
|
||||
"有疑问?先看设置有没有你想要的",
|
||||
"有建议的话可以把信息反馈给作者~",
|
||||
"不要按F8",
|
||||
"不要按F10",
|
||||
"秘密数字:626",
|
||||
"CLASSIC SEXY RUSSIAN BLOCKS",
|
||||
"戴上耳机以获得最佳体验",
|
||||
"少女祈祷中",
|
||||
"按键/点击以全力加载,跳过动画",
|
||||
"LrL,RlR LLr,RRl RRR/LLL F!!",--ZSLJTTI
|
||||
"(第一次才准)今日幸运数字:"..math.random(100,626),
|
||||
"RUR'U'R'FR2U'R'U'RUR'F'",
|
||||
"Am G F G",
|
||||
}
|
||||
elseif setting.lang==2 then
|
||||
L={
|
||||
@@ -65,13 +67,15 @@ elseif setting.lang==2 then
|
||||
"使用love2d引擎制作",
|
||||
"有疑问?先看设置有没有你想要的",
|
||||
"有建议的话可以把信息反馈给作者~",
|
||||
"不要按F8",
|
||||
"不要按F10",
|
||||
"秘密数字:626",
|
||||
"CLASSIC SEXY RUSSIAN BLOCKS",
|
||||
"戴上耳机以获得最佳体验",
|
||||
"少女祈祷中",
|
||||
"LrL,RlR LLr,RRl RRR/LLL F!!",--ZSLJTTI
|
||||
"(第一次才准)今日幸运数字:"..math.random(100,626),
|
||||
"按键/点击以全力加载,跳过动画",
|
||||
"LrL,RlR LLr,RRl RRR/LLL F!!",
|
||||
"RUR'U'R'FR2U'R'U'RUR'F'",
|
||||
"Am G F G",
|
||||
}
|
||||
elseif setting.lang==3 then
|
||||
L={
|
||||
@@ -102,13 +106,16 @@ elseif setting.lang==3 then
|
||||
"Powered by love2d",
|
||||
"Find out what's in the setting!",
|
||||
"Any suggestions to author!",
|
||||
"DO NOT PRESS F8",
|
||||
"DO NOT PRESS F10",
|
||||
"Secret num:626",
|
||||
"Techmino=Technique+Tetromino",
|
||||
"CLASSIC SEXY RUSSIAN BLOCKS",
|
||||
"Headphones for better experience",
|
||||
"少女祈禱中",
|
||||
"LrL,RlR LLr,RRl RRR/LLL F!!",--ZSLJTTI
|
||||
"any-key/click to skip loading animation",
|
||||
"RUR'U'R'FR2U'R'U'RUR'F'",
|
||||
"Am G F G",
|
||||
"LrL,RlR LLr,RRl RRR/LLL F!!",
|
||||
}
|
||||
end
|
||||
return L[math.random(#L)]
|
||||
@@ -3,8 +3,8 @@
|
||||
--https://github.com/mattdesl/lwjgl-basics/wiki/2D-Pixel-Perfect-Shadows
|
||||
local gc=love.graphics
|
||||
local C=gc.clear
|
||||
local shadowMapShader=gc.newShader("parts/shader/shadowMap.cs")--Shader for caculating the 1D shadow map.
|
||||
local lightRenderShader=gc.newShader("parts/shader/lightRender.cs")--Shader for rendering blurred lights and shadows.
|
||||
local shadowMapShader=gc.newShader("shader/shadowMap.cs")--Shader for caculating the 1D shadow map.
|
||||
local lightRenderShader=gc.newShader("shader/lightRender.cs")--Shader for rendering blurred lights and shadows.
|
||||
Lights={}--Lightsource objects
|
||||
local Lights=Lights
|
||||
--Private--
|
||||
|
||||
@@ -32,6 +32,7 @@ color={
|
||||
darkCyan={0,.6,.6},
|
||||
darkGrey={.3,.3,.3},
|
||||
|
||||
black={0,0,0},
|
||||
orange={1,.6,0},
|
||||
pink={1,0,.6},
|
||||
grass={.6,1,0},
|
||||
|
||||
@@ -1,13 +1,3 @@
|
||||
local O,_=true,false
|
||||
local L={
|
||||
{{_,O,O},{O,O,_}}, --Z
|
||||
{{O,O,_},{_,O,O}}, --S
|
||||
{{O,O,O},{_,_,O}}, --L
|
||||
{{O,O,O},{O,_,_}}, --J
|
||||
{{O,O,O},{_,O,_}}, --T
|
||||
{{O,O},{O,O}}, --O
|
||||
{{O,O,O,O}}, --I
|
||||
}
|
||||
local function RotCW(B)
|
||||
local N={}
|
||||
local r,c=#B,#B[1]--row,col
|
||||
@@ -19,14 +9,16 @@ local function RotCW(B)
|
||||
end
|
||||
return N
|
||||
end
|
||||
|
||||
-- [1,1,1]
|
||||
-- [0,0,1]--r=2,c=3
|
||||
-- ↓ (Y inv)
|
||||
-- [1,1]
|
||||
-- [1,0]
|
||||
-- [1,0]
|
||||
|
||||
local O,_=true,false
|
||||
local L={
|
||||
{{_,O,O},{O,O,_}}, --Z
|
||||
{{O,O,_},{_,O,O}}, --S
|
||||
{{O,O,O},{_,_,O}}, --L
|
||||
{{O,O,O},{O,_,_}}, --J
|
||||
{{O,O,O},{_,O,_}}, --T
|
||||
{{O,O},{O,O}}, --O
|
||||
{{O,O,O,O}}, --I
|
||||
}
|
||||
for i=1,#L do
|
||||
local B=L[i]
|
||||
L[i]={[0]=B}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
gc=love.graphics
|
||||
shader_glow=gc.newShader("parts/shader/glow.cs")
|
||||
shader_glow=gc.newShader("shader/glow.cs")
|
||||
@@ -34,7 +34,7 @@ skin.libColor={
|
||||
color.purple,
|
||||
color.magenta,
|
||||
color.pink,
|
||||
color.darkGreen,
|
||||
color.darkGrey,
|
||||
color.grey,
|
||||
color.lightGrey,
|
||||
color.darkPurple,
|
||||
@@ -70,14 +70,14 @@ function skin.load()
|
||||
gc.setLineWidth(3)
|
||||
for i=1,11 do
|
||||
puzzleMark[i]=C(30,30)
|
||||
local _=blockColor[i]
|
||||
local _=skin.libColor[i]
|
||||
gc.setColor(_[1],_[2],_[3],.6)
|
||||
gc.rectangle("line",5,5,20,20)
|
||||
gc.rectangle("line",10,10,10,10)
|
||||
end
|
||||
for i=12,17 do
|
||||
puzzleMark[i]=C(30,30)
|
||||
gc.setColor(blockColor[i])
|
||||
gc.setColor(skin.libColor[i])
|
||||
gc.rectangle("line",7,7,16,16)
|
||||
end
|
||||
local _=C(30,30)
|
||||
@@ -109,30 +109,17 @@ end
|
||||
function skin.prev(i)--prev skin for [i]
|
||||
local _=setting.skin
|
||||
_[i]=(_[i]-2)%11+1
|
||||
skin.adjust(i,_[i])
|
||||
end
|
||||
function skin.next(i)--next skin for [i]
|
||||
local _=setting.skin
|
||||
_[i]=_[i]%11+1
|
||||
skin.adjust(i,_[i])
|
||||
end
|
||||
function skin.rotate(i)--change direction of [i]
|
||||
setting.face[i]=(setting.face[i]+1)%4
|
||||
SFX.play("rotate")
|
||||
end
|
||||
function skin.change(i)--change to skin_set[i]
|
||||
for _=1,7 do
|
||||
skin.adjust(_,setting.skin[_])
|
||||
end
|
||||
for _=8,13 do
|
||||
blockSkin[_]=skin.lib[i][_+4]
|
||||
blockSkinMini[_]=skin.libMini[i][_+4]
|
||||
end
|
||||
end
|
||||
function skin.adjust(i,id)--load color/image/image_mini of [i] from lib
|
||||
local S=setting.skinSet
|
||||
blockSkin[i]=skin.lib[S][id]
|
||||
blockSkinMini[i]=skin.libMini[S][id]
|
||||
blockColor[i]=skin.libColor[id]
|
||||
blockSkin=skin.lib[i]
|
||||
blockSkinMini=skin.libMini[i]
|
||||
end
|
||||
return skin
|
||||
@@ -13,8 +13,9 @@ local function newPlanet()
|
||||
planet.y=H*.5+sin(a)*(R+r)
|
||||
planet.vx=-cos(a+rnd()-.5)*.0626
|
||||
planet.vy=-sin(a+rnd()-.5)*.0626
|
||||
planet.R=.7+rnd()*.2
|
||||
planet.G=.7+rnd()*.1
|
||||
planet.R=.7+rnd()*.22
|
||||
planet.G=planet.R+rnd()*.16-.1
|
||||
planet.B=.7+rnd()*.2
|
||||
end
|
||||
|
||||
local space={}--LIB
|
||||
@@ -50,9 +51,9 @@ function space.draw()
|
||||
if not stars[1]then return end
|
||||
gc.translate(-50,-50)
|
||||
gc.setLineWidth(7)
|
||||
gc.setColor(planet.R,planet.G,.6,.1626)
|
||||
gc.setColor(planet.R,planet.G,planet.B,.1626)
|
||||
gc.circle("line",planet.x,planet.y,planet.r+1)
|
||||
gc.setColor(planet.R,planet.G,.6,.26)
|
||||
gc.setColor(planet.R,.6,planet.B,.26)
|
||||
gc.circle("fill",planet.x,planet.y,planet.r)
|
||||
gc.setColor(.9,.9,.9)
|
||||
for i=1,2600,5 do
|
||||
|
||||
@@ -1,19 +1,6 @@
|
||||
local min=math.min
|
||||
local mini=love.window.isMinimized
|
||||
local task={}
|
||||
function task.pauseGame()
|
||||
if not mini()then
|
||||
pauseTimer=pauseTimer+1
|
||||
end
|
||||
return pauseTimer==50
|
||||
end
|
||||
function task.resumeGame()
|
||||
pauseTimer=pauseTimer-1
|
||||
if pauseTimer==0 then
|
||||
scene.swapTo("play","none")
|
||||
return true
|
||||
end
|
||||
end
|
||||
function task.finish(P)
|
||||
if scene.cur~="play"then return true end
|
||||
P.endCounter=P.endCounter+1
|
||||
@@ -81,15 +68,4 @@ function task.bgmFadeIn(_,id)
|
||||
src:setVolume(v)
|
||||
if v>=setting.bgm*.1 then return true end
|
||||
end
|
||||
function task.settingSaved(_,T)
|
||||
T[1]=T[1]-1
|
||||
if T[1]==0 then
|
||||
if scene.cur=="main"then
|
||||
TEXT(text.settingSaved,370,330,28,"appear")
|
||||
else
|
||||
TEXT(text.needRestart,1130,130,28,"appear")
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
return task
|
||||
522
player.lua
522
player.lua
File diff suppressed because it is too large
Load Diff
24
scene.lua
24
scene.lua
@@ -19,6 +19,7 @@ local sceneInit={
|
||||
1,--Loading counter
|
||||
#voiceName,--Loading bar lenth(current)
|
||||
require("parts/getTip"),--tip
|
||||
skip=false,--if skipping
|
||||
}
|
||||
end,
|
||||
intro=function()
|
||||
@@ -46,12 +47,12 @@ local sceneInit={
|
||||
sceneTemp=1
|
||||
end
|
||||
end,
|
||||
mode=function()
|
||||
mode=function(org)
|
||||
curBG="none"
|
||||
BGM.play("blank")
|
||||
destroyPlayers()
|
||||
local cam=mapCam
|
||||
cam.zoomK=scene.swap.tar=="mode"and 5 or 1
|
||||
cam.zoomK=org=="main"and 5 or 1
|
||||
if cam.sel then
|
||||
local M=modes[cam.sel]
|
||||
cam.x,cam.y=M.x*cam.k+180,M.y*cam.k
|
||||
@@ -82,9 +83,10 @@ local sceneInit={
|
||||
end
|
||||
curBG=modeEnv.bg
|
||||
end,
|
||||
pause=function()
|
||||
pause=function(org)
|
||||
local S=players[1].stat
|
||||
sceneTemp={
|
||||
timer=org=="play"and 0 or 50,
|
||||
toTime(S.time),
|
||||
S.key.."/"..S.rotate.."/"..S.hold,
|
||||
S.piece.." "..(int(S.piece/S.time*100)*.01).."PPS",
|
||||
@@ -98,7 +100,7 @@ local sceneInit={
|
||||
S.pc,
|
||||
format("%.3f",S.atk/S.row),
|
||||
S.extraPiece,
|
||||
format("%.2f",100*max(1-S.extraRate/S.piece,0)),
|
||||
format("%.2f%%",100*max(1-S.extraRate/S.piece,0)),
|
||||
}
|
||||
end,
|
||||
setting_game=function()
|
||||
@@ -111,6 +113,16 @@ local sceneInit={
|
||||
sceneTemp={last=0,jump=0}--last sound time,animation count(10→0)
|
||||
curBG="none"
|
||||
end,
|
||||
setting_control=function()
|
||||
sceneTemp={
|
||||
das=setting.das,
|
||||
arr=setting.arr,
|
||||
pos=0,
|
||||
dir=1,
|
||||
wait=30,
|
||||
}
|
||||
curBG="strap"
|
||||
end,
|
||||
setting_key=function()
|
||||
sceneTemp={
|
||||
board=1,
|
||||
@@ -195,8 +207,8 @@ local backFunc={
|
||||
setting_graphic=function()saveSetting()end,
|
||||
setting_sound= function()saveSetting()end,
|
||||
}
|
||||
function scene.init(s)
|
||||
if sceneInit[s]then sceneInit[s]()end
|
||||
function scene.init(s,org)
|
||||
if sceneInit[s]then sceneInit[s](org)end
|
||||
end
|
||||
function scene.push(tar,style)
|
||||
if not scene.swapping then
|
||||
|
||||
@@ -10,6 +10,7 @@ end
|
||||
local c
|
||||
|
||||
gc.setDefaultFilter("nearest","nearest")
|
||||
gc.setColor(1,1,1)
|
||||
local VKI=N("/image/virtualkey.png")
|
||||
VKIcon={}
|
||||
for i=1,#actName do
|
||||
@@ -18,7 +19,6 @@ for i=1,#actName do
|
||||
end
|
||||
|
||||
miniBlock={}
|
||||
gc.setColor(1,1,1)
|
||||
for i=1,7 do
|
||||
local b=blocks[i][0]
|
||||
miniBlock[i]=C(#b[1],#b)
|
||||
@@ -74,9 +74,10 @@ drawableText={
|
||||
|
||||
custom=T(80),
|
||||
setting_game=T(80),setting_graphic=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),
|
||||
blockLayout=T(70),
|
||||
musicRoom=T(80),
|
||||
nowPlaying=T(50),
|
||||
VKTchW=T(30),VKOrgW=T(30),VKCurW=T(30),
|
||||
|
||||
45
timer.lua
45
timer.lua
@@ -82,6 +82,7 @@ function Tmr.load()
|
||||
scene.swapTo("intro","none")
|
||||
end
|
||||
end
|
||||
if L.skip and not scene.swapping then goto R end
|
||||
end
|
||||
function Tmr.intro()
|
||||
sceneTemp=sceneTemp+1
|
||||
@@ -220,8 +221,9 @@ function Tmr.play(dt)
|
||||
end
|
||||
end
|
||||
for i=1,#virtualkey do
|
||||
if virtualkeyPressTime[i]>0 then
|
||||
virtualkeyPressTime[i]=virtualkeyPressTime[i]-1
|
||||
local _=virtualkey[i]
|
||||
if _.pressTime>0 then
|
||||
_.pressTime=_.pressTime-1
|
||||
end
|
||||
end
|
||||
|
||||
@@ -235,10 +237,14 @@ function Tmr.play(dt)
|
||||
local P=players[p]
|
||||
if P.keyPressing[1]then
|
||||
if P.moving>0 then P.moving=0 end
|
||||
P.moving=P.moving-1
|
||||
if -P.moving<=P.gameEnv.das then
|
||||
P.moving=P.moving-1
|
||||
end
|
||||
elseif P.keyPressing[2]then
|
||||
if P.moving<0 then P.moving=0 end
|
||||
P.moving=P.moving+1
|
||||
if P.moving<=P.gameEnv.das then
|
||||
P.moving=P.moving+1
|
||||
end
|
||||
else
|
||||
P.moving=0
|
||||
end
|
||||
@@ -266,6 +272,9 @@ function Tmr.pause(dt)
|
||||
if not gameResult then
|
||||
pauseTime=pauseTime+dt
|
||||
end
|
||||
if sceneTemp.timer<50 then
|
||||
sceneTemp.timer=sceneTemp.timer+1
|
||||
end
|
||||
end
|
||||
function Tmr.setting_sound()
|
||||
local t=sceneTemp.jump
|
||||
@@ -273,4 +282,32 @@ function Tmr.setting_sound()
|
||||
sceneTemp.jump=t-1
|
||||
end
|
||||
end
|
||||
function Tmr.setting_control()
|
||||
local T=sceneTemp
|
||||
if T.wait>0 then
|
||||
T.wait=T.wait-1
|
||||
if T.wait==0 then
|
||||
T.pos=T.pos+T.dir
|
||||
else
|
||||
return
|
||||
end
|
||||
end
|
||||
if T.das>0 then
|
||||
T.das=T.das-1
|
||||
else
|
||||
T.arr=T.arr-1
|
||||
if T.arr==0 then
|
||||
T.pos=T.pos+T.dir
|
||||
T.arr=setting.arr
|
||||
elseif T.arr==-1 then
|
||||
T.pos=T.dir>0 and 8 or 0
|
||||
T.arr=setting.arr
|
||||
end
|
||||
if T.pos%8==0 then
|
||||
T.dir=-T.dir
|
||||
T.wait=20
|
||||
T.das=setting.das
|
||||
end
|
||||
end
|
||||
end
|
||||
return Tmr
|
||||
42
toolfunc.lua
42
toolfunc.lua
@@ -55,9 +55,10 @@ local drawableTextLoad={
|
||||
"setting_graphic",
|
||||
"setting_sound",
|
||||
"setting_sound",
|
||||
"setting_control",
|
||||
"setting_skin",
|
||||
"keyboard","joystick",
|
||||
"ctrlSetHelp",
|
||||
"blockLayout",
|
||||
"musicRoom",
|
||||
"nowPlaying",
|
||||
"VKTchW","VKOrgW","VKCurW",
|
||||
@@ -97,6 +98,8 @@ function restoreVirtualKey()
|
||||
B.x=O.x
|
||||
B.y=O.y
|
||||
B.r=O.r
|
||||
B.isDown=false
|
||||
B.pressTime=0
|
||||
end
|
||||
if not modeEnv.Fkey then
|
||||
virtualkey[9].ava=false
|
||||
@@ -117,12 +120,9 @@ function copyBoard()
|
||||
for y=1,H do
|
||||
local S=""
|
||||
local L=preField[y]
|
||||
for x=1,10,2 do
|
||||
local H=L[x]
|
||||
local L=L[x+1]
|
||||
if H<8 then H=H+1 end
|
||||
if L<8 then L=L+1 end
|
||||
S=S..char(H*16+L)
|
||||
for x=1,10 do
|
||||
local _=L[x]+1
|
||||
S=S..char(_)
|
||||
end
|
||||
str=str..S
|
||||
end
|
||||
@@ -132,7 +132,7 @@ end
|
||||
function pasteBoard()
|
||||
local str=love.system.getClipboardText()
|
||||
local fX,fY=1,1--*ptr for Field(r*10+(c-1))
|
||||
local _,__
|
||||
local _,Bid
|
||||
local p=find(str,":")--ptr*
|
||||
if p then str=sub(str,p+1)end
|
||||
_,str=pcall(data.decode,"string","base64",str)
|
||||
@@ -147,13 +147,12 @@ function pasteBoard()
|
||||
else goto FINISH
|
||||
end
|
||||
end--str end
|
||||
__=_%16--low4b
|
||||
_=(_-__)/16--high4b
|
||||
if _>13 or __>13 then goto ERROR end--illegal blockid
|
||||
if _<9 then _=_-1 end if __<9 then __=__-1 end
|
||||
preField[fY][fX]=_;preField[fY][fX+1]=__
|
||||
if fX<9 then
|
||||
fX=fX+2
|
||||
__=_%32-1--block id
|
||||
if __>16 then goto ERROR end--illegal blockid
|
||||
_=int(_/32)--mode id
|
||||
preField[fY][fX]=__
|
||||
if fX<10 then
|
||||
fX=fX+1
|
||||
else
|
||||
if fY==20 then goto FINISH end
|
||||
fX=1;fY=fY+1
|
||||
@@ -255,9 +254,8 @@ function royaleLevelup()
|
||||
end
|
||||
end
|
||||
function pauseGame()
|
||||
if pauseTimer==0 then
|
||||
if not scene.swapping then
|
||||
restartCount=0--Avoid strange darkness
|
||||
newTask(Event_task.pauseGame)
|
||||
if not gameResult then
|
||||
pauseCount=pauseCount+1
|
||||
end
|
||||
@@ -273,9 +271,7 @@ function pauseGame()
|
||||
end
|
||||
end
|
||||
function resumeGame()
|
||||
if pauseTimer==50 then
|
||||
newTask(Event_task.resumeGame)
|
||||
end
|
||||
scene.swapTo("play","none")
|
||||
end
|
||||
function loadGame(M)
|
||||
--rec={}
|
||||
@@ -291,7 +287,6 @@ function loadGame(M)
|
||||
end
|
||||
function resetPartGameData()
|
||||
gameResult=false
|
||||
pauseTimer=0
|
||||
frame=150-setting.reTime*15
|
||||
destroyPlayers()
|
||||
curMode.load()
|
||||
@@ -326,7 +321,6 @@ function resetPartGameData()
|
||||
end
|
||||
function resetGameData()
|
||||
gameResult=false
|
||||
pauseTimer=0--Pause timer for animation
|
||||
frame=150-setting.reTime*15
|
||||
garbageSpeed=1
|
||||
pauseTime=0--Time paused
|
||||
@@ -356,10 +350,6 @@ function resetGameData()
|
||||
restoreVirtualKey()
|
||||
stat.game=stat.game+1
|
||||
freeRow.reset(30*#players)
|
||||
for i=1,20 do
|
||||
virtualkeyDown[i]=X
|
||||
virtualkeyPressTime[i]=0
|
||||
end
|
||||
SFX.play("ready")
|
||||
collectgarbage()
|
||||
end
|
||||
|
||||
@@ -1,23 +1,28 @@
|
||||
local S=[=[
|
||||
"Patron"(rmb10+)(ordered by first char):
|
||||
10元
|
||||
八零哥
|
||||
Fireboos
|
||||
gggf127
|
||||
金巧
|
||||
乐↗乐↘
|
||||
立斐
|
||||
仁参
|
||||
Sasoric"
|
||||
Sasoric
|
||||
sfqr
|
||||
时雪
|
||||
T080
|
||||
ThTsOd"
|
||||
ThTsOd
|
||||
夏小亚
|
||||
xin心痕
|
||||
心痕
|
||||
蕴空之灵
|
||||
yyangdid
|
||||
10元
|
||||
?[D*a]
|
||||
|
||||
Thanks!
|
||||
|
||||
Future outlook:
|
||||
New mode:
|
||||
finesse
|
||||
round-based dig
|
||||
Infinite battle
|
||||
Bigbang
|
||||
@@ -27,20 +32,44 @@ Future outlook:
|
||||
Shifting field
|
||||
Other:
|
||||
bag sep-line switch
|
||||
more drop fx,like light on locked block
|
||||
game recording
|
||||
(powerinfo switch)
|
||||
new virtualWidgets like joysticks
|
||||
splashing block
|
||||
custom sequence
|
||||
splashing block
|
||||
more FXs & 3d features & animations
|
||||
Encrypt source code(compile to byte code)
|
||||
new AI:task-Z
|
||||
CC smarter(think of garbage buffer)
|
||||
0.8.14:
|
||||
new:
|
||||
click/tap/any-key to skip loading animation
|
||||
lock animation
|
||||
changed:
|
||||
display scene info when error
|
||||
//many optimization
|
||||
fixed:
|
||||
error when attack
|
||||
error garbage line color
|
||||
error in finesse checking
|
||||
some times error when touch screen
|
||||
0.8.13:
|
||||
new:
|
||||
a independent page to set DAS/ARR,with an animation for preview
|
||||
changed:
|
||||
new virtualkey animation
|
||||
freer drawing mode(Incompatible with old ver.)
|
||||
combo&b3b attack changed
|
||||
score of spins little changed
|
||||
fixed:
|
||||
wrong behavior in pause scene
|
||||
ospin error in 0.8.12
|
||||
memory leakage in t49/t99
|
||||
new behavior of widgets
|
||||
0.8.12:
|
||||
new:
|
||||
layout setting:skin system with customizable block color/direction
|
||||
more information in pause page
|
||||
more information when pause
|
||||
block has more color(7→11)
|
||||
skin:smooth(MrZ),contrast(MrZ),steel(kulumi),ball(shaw)
|
||||
changed:
|
||||
|
||||
136
widgetList.lua
136
widgetList.lua
@@ -190,21 +190,28 @@ local Widget={
|
||||
back= newButton(640, 630,180,60, C.white, 35,scene.back),
|
||||
},
|
||||
draw={
|
||||
block1= newButton(920, 80, 120,120,C.red, 60,setPen(1)),
|
||||
block2= newButton(1060, 80, 120,120,C.green, 60,setPen(2)),
|
||||
block3= newButton(1200, 80, 120,120,C.orange, 60,setPen(3)),
|
||||
block4= newButton(920, 220,120,120,C.blue, 60,setPen(4)),
|
||||
block5= newButton(1060, 220,120,120,C.magenta, 60,setPen(5)),
|
||||
block6= newButton(1200, 220,120,120,C.yellow, 60,setPen(6)),
|
||||
block7= newButton(920, 360,120,120,C.cyan, 60,setPen(7)),
|
||||
gb1= newButton(1060, 360,120,120,C.darkGrey, 60,setPen(9)),
|
||||
gb2= newButton(1200, 360,120,120,C.grey, 60,setPen(10)),
|
||||
gb3= newButton(920, 500,120,120,C.darkPurple, 60,setPen(11)),
|
||||
gb4= newButton(1060, 500,120,120,C.darkRed, 60,setPen(12)),
|
||||
gb5= newButton(1200, 500,120,120,C.darkGreen, 60,setPen(13)),
|
||||
clear= newButton(780, 80, 120,120,C.white, 40,pressKey("delete")),
|
||||
any= newButton(780, 220,120,120,C.lightGrey, 40,setPen(0)),
|
||||
space= newButton(780, 360,120,120,C.grey, 65,setPen(-1)),
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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,copyBoard),
|
||||
paste= newButton(1060, 640,120,120,C.lightBlue, 35,pasteBoard),
|
||||
@@ -216,66 +223,51 @@ local Widget={
|
||||
pause={
|
||||
resume= newButton(640,290,240,100,C.white,30,resumeGame),
|
||||
restart=newButton(640,445,240,100,C.white,33,function()
|
||||
if pauseTimer==50 then
|
||||
clearTask("play")
|
||||
updateStat()
|
||||
resetGameData()
|
||||
scene.swapTo("play","none")
|
||||
end
|
||||
clearTask("play")
|
||||
updateStat()
|
||||
resetGameData()
|
||||
scene.swapTo("play","none")
|
||||
end),
|
||||
setting=newButton(1130,70,180,90,C.lightBlue,35,function()
|
||||
scene.push()scene.swapTo("setting_sound")
|
||||
end),
|
||||
setting=newButton(1130,70,180,90,C.lightBlue,35,function()scene.push()scene.swapTo("setting_sound")end),
|
||||
quit= newButton(640,600,240,100,C.white,35,scene.back),
|
||||
},
|
||||
setting_game={
|
||||
graphic=newButton(200,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_graphic")end,nil,"sound"),
|
||||
sound= newButton(1080,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_sound")end, nil,"reset"),
|
||||
reset= newButton(100,285,150,80,C.lightRed,18,function()
|
||||
setting.das,setting.arr=10,2
|
||||
setting.sddas,setting.sdarr=0,2
|
||||
local _=Widget.setting_game
|
||||
_.dasU:FX()_.dasD:FX()
|
||||
_.arrU:FX()_.arrD:FX()
|
||||
_.sddasU:FX()_.sddasD:FX()
|
||||
_.sdarrU:FX()_.sdarrD:FX()
|
||||
end,nil,"dasD"),
|
||||
dasD= newButton(230,230,50,50,C.white,40,function()setting.das=setting.das-1 ARRcheck()end,function()return setting.das==0 end, "dasU"),
|
||||
dasU= newButton(450,230,50,50,C.white,40,function()setting.das=setting.das+1 ARRcheck()end,function()return setting.das==30 end, "arrD"),
|
||||
arrD= newButton(550,230,50,50,C.white,40,function()setting.arr=setting.arr-1 DAScheck()end,function()return setting.arr==0 end, "arrU"),
|
||||
arrU= newButton(770,230,50,50,C.white,40,function()setting.arr=setting.arr+1 DAScheck()end,function()return setting.arr==15 end, "sddasD"),
|
||||
sddasD= newButton(230,340,50,50,C.white,40, function()setting.sddas=(setting.sddas-1)%11 end, nil,"sddasU"),
|
||||
sddasU= newButton(450,340,50,50,C.white,40, function()setting.sddas=(setting.sddas+1)%11 end, nil,"sdarrD"),
|
||||
sdarrD= newButton(550,340,50,50,C.white,40, function()setting.sdarr=(setting.sdarr-1)%4 end, nil,"sdarrU"),
|
||||
sdarrU= newButton(770,340,50,50,C.white,40, function()setting.sdarr=(setting.sdarr+1)%4 end, nil,"reTime"),
|
||||
reTime= newSlider(350,430,300,10,30,nil, SETval("reTime"), SETsto("reTime"), nil,"maxNext"),
|
||||
maxNext=newSlider(350,500,300,6,30,nil, SETval("maxNext"), SETsto("maxNext"), nil,"autoPause"),
|
||||
autoPause=newSwitch(350,570,20, SETval("autoPause"), SETrev("autoPause"), nil,"layout"),
|
||||
layout= newButton(590,570,140,70,C.white,35,function()
|
||||
graphic=newButton(200,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_graphic")end, nil,"sound"),
|
||||
sound= newButton(1080,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_sound")end, nil,"ctrl"),
|
||||
ctrl= newButton(290,220,320,80,C.lightYellow,35,function()scene.push()scene.swapTo("setting_control")end, nil,"key"),
|
||||
key= newButton(640,220,320,80,C.lightGreen,35,function()scene.push()scene.swapTo("setting_key")end, nil,"touch"),
|
||||
touch= newButton(990,220,320,80,C.lightBlue,35,function()scene.push()scene.swapTo("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()
|
||||
scene.push()
|
||||
scene.swapTo("setting_skin")
|
||||
end,nil,"ctrl"),
|
||||
ctrl= newButton(1020,230,320,80,C.white,35,function()scene.push()scene.swapTo("setting_key")end, nil,"touch"),
|
||||
touch= newButton(1020,340,320,80,C.white,35,function()scene.push()scene.swapTo("setting_touch")end,nil,"quickR"),
|
||||
quickR= newSwitch(1000,430,35, SETval("quickR"), SETrev("quickR"), nil,"swap"),
|
||||
swap= newSwitch(1000,500,19, SETval("swap"), SETrev("swap"), nil,"fine"),
|
||||
fine= newSwitch(1000,570,20, SETval("fine"), SETrev("fine"), nil,"back"),
|
||||
end,nil,"quickR"),
|
||||
quickR= newSwitch(1050,340,35, SETval("quickR"), SETrev("quickR"), nil,"swap"),
|
||||
swap= newSwitch(1050,440,19, SETval("swap"), SETrev("swap"), nil,"fine"),
|
||||
fine= newSwitch(1050,540,20, SETval("fine"), SETrev("fine"), nil,"back"),
|
||||
back= newButton(1140,650,200,80,C.white,40,scene.back, nil,"graphic"),
|
||||
},
|
||||
setting_graphic={
|
||||
sound= newButton(200,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_sound")end, nil,"game"),
|
||||
game= newButton(1080,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_game")end, nil,"ghost"),
|
||||
ghost= newSwitch(310,180,35,SETval("ghost"), SETrev("ghost"), nil,"center"),
|
||||
center= newSwitch(580,180,35,SETval("center"), SETrev("center"), nil,"smo"),
|
||||
smo= newSwitch(310,260,25,SETval("smo"), SETrev("smo"), nil,"grid"),
|
||||
grid= newSwitch(580,260,30,SETval("grid"), SETrev("grid"), nil,"dropFX"),
|
||||
dropFX= newSlider(310,350,373,5,35,nil,SETval("dropFX"), SETsto("dropFX"), nil,"shakeFX"),
|
||||
shakeFX=newSlider(310,430,373,5,35,nil,SETval("shakeFX"), SETsto("shakeFX"), nil,"atkFX"),
|
||||
atkFX= newSlider(310,510,373,5,35,nil,SETval("atkFX"), SETsto("atkFX"), nil,"frame"),
|
||||
frame= newSlider(310,590,373,10,35,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,"fullscreen"),
|
||||
ghost= newSwitch(310,180,35, SETval("ghost"), SETrev("ghost"), nil,"center"),
|
||||
center= newSwitch(580,180,35, SETval("center"), SETrev("center"), nil,"smooth"),
|
||||
smooth= newSwitch(310,260,25, SETval("smooth"), SETrev("smooth"), nil,"grid"),
|
||||
grid= newSwitch(580,260,30, SETval("grid"), SETrev("grid"), nil,"lockFX"),
|
||||
lockFX= newSlider(310,340,373,3,35,nil, SETval("lockFX"), SETsto("lockFX"), nil,"dropFX"),
|
||||
dropFX= newSlider(310,410,373,5,35,nil, SETval("dropFX"), SETsto("dropFX"), nil,"shakeFX"),
|
||||
shakeFX=newSlider(310,480,373,5,35,nil, SETval("shakeFX"), SETsto("shakeFX"), nil,"atkFX"),
|
||||
atkFX= newSlider(310,550,373,5,35,nil, SETval("atkFX"), SETsto("atkFX"), nil,"frame"),
|
||||
frame= newSlider(310,620,373,10,35,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,"fullscreen"),
|
||||
fullscreen=newSwitch(990,180,40,SETval("fullscreen"),function()
|
||||
setting.fullscreen=not setting.fullscreen
|
||||
love.window.setFullscreen(setting.fullscreen)
|
||||
if not setting.fullscreen then
|
||||
love.resize(love.graphics.getWidth(),love.graphics.getHeight())
|
||||
love.resize(love.graphics.getWidth(),love.graphics.getHeight())
|
||||
end
|
||||
end,nil,"bg"),
|
||||
bg= newSwitch(990,250,35,SETval("bg"),SETrev("bg"),nil,"bgspace"),
|
||||
@@ -288,17 +280,28 @@ local Widget={
|
||||
end
|
||||
end,nil,"back"),
|
||||
back= newButton(1140,650,200,80,C.white,40,scene.back,nil,"sound"),
|
||||
},
|
||||
},
|
||||
setting_sound={
|
||||
game= newButton(200,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_game")end, nil,"graphic"),
|
||||
graphic=newButton(1080,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_graphic")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(1)end, SETval("vib"), SETsto("vib"), nil,"voc"),
|
||||
voc= newSlider(750,440,400,10,32,function()VOICE("nya")end, SETval("voc"), SETsto("voc"), nil,"stereo"),
|
||||
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(1)end, SETval("vib"), SETsto("vib"), nil,"voc"),
|
||||
voc= newSlider(750,440,400,10,32,function()VOICE("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,scene.back,nil,"game"),
|
||||
},
|
||||
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,"reset"),
|
||||
reset= newButton(160,580,200, 100,C.lightRed,40,function()
|
||||
setting.das,setting.arr=10,2
|
||||
setting.sddas,setting.sdarr=0,2
|
||||
end,nil,"back"),
|
||||
back= newButton(1140,650,200,80,C.white,40,scene.back,nil,"das"),
|
||||
},
|
||||
setting_key={
|
||||
back=newButton(1140,650,200,80,C.white,45,scene.back),
|
||||
},
|
||||
@@ -329,7 +332,8 @@ local Widget={
|
||||
--spin6=newButton(825,550,90,65,C.white,30,nextDir(6)),--O cannot rotate
|
||||
spin7= newButton(965,550,90,65,C.white,30,nextDir(7)),
|
||||
|
||||
reset= newButton(200,650,180,80,C.lightRed,35,function()for i=1,7 do setting.face[i]=0 end SFX.play("rotate")end),
|
||||
skinR= newButton(200,650,180,80,C.lightPurple,35,function()setting.skin={1,5,2,8,10,3,7}SFX.play("hold")end),
|
||||
faceR= newButton(480,650,180,80,C.lightRed,35,function()setting.face={0,0,0,0,0,0,0}SFX.play("rotate")end),
|
||||
back= newButton(1140,650,200,80,C.white,40,scene.back),
|
||||
},
|
||||
setting_touch={
|
||||
|
||||
Reference in New Issue
Block a user