0.8.19/20: Fantastic Global Update II
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
359
callback.lua
359
callback.lua
@@ -12,7 +12,7 @@ ms.setVisible(false)
|
|||||||
local scr=scr
|
local scr=scr
|
||||||
local xOy=love.math.newTransform()
|
local xOy=love.math.newTransform()
|
||||||
local mx,my,mouseShow=-20,-20,false
|
local mx,my,mouseShow=-20,-20,false
|
||||||
local touching=nil--第一触摸ID
|
local touching=nil--first touching ID(userdata)
|
||||||
local touchDist=nil
|
local touchDist=nil
|
||||||
joysticks={}
|
joysticks={}
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ local function updatePowerInfo()
|
|||||||
gc.print(pow,78,3)
|
gc.print(pow,78,3)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
gc.draw(batteryImage,73,3)
|
gc.draw(IMG.batteryImage,73,3)
|
||||||
end
|
end
|
||||||
setFont(25)
|
setFont(25)
|
||||||
gc.print(os.date("%H:%M",os.time()),3,-5)
|
gc.print(os.date("%H:%M",os.time()),3,-5)
|
||||||
@@ -217,7 +217,7 @@ function touchMove.mode(id,x,y,dx,dy)
|
|||||||
mapCam.x,mapCam.y=mapCam.x-dx,mapCam.y-dy
|
mapCam.x,mapCam.y=mapCam.x-dx,mapCam.y-dy
|
||||||
elseif not L[3]then
|
elseif not L[3]then
|
||||||
x,y=xOy:inverseTransformPoint(tc.getPosition(L[1]))
|
x,y=xOy:inverseTransformPoint(tc.getPosition(L[1]))
|
||||||
dx,dy=xOy:inverseTransformPoint(tc.getPosition(L[2]))--dx,dy not Δ!
|
dx,dy=xOy:inverseTransformPoint(tc.getPosition(L[2]))--not delta!!!
|
||||||
local d=(x-dx)^2+(y-dy)^2
|
local d=(x-dx)^2+(y-dy)^2
|
||||||
if d>100 then
|
if d>100 then
|
||||||
d=d^.5
|
d=d^.5
|
||||||
@@ -262,13 +262,13 @@ function wheelMoved.music(x,y)
|
|||||||
end
|
end
|
||||||
function keyDown.music(key)
|
function keyDown.music(key)
|
||||||
if key=="down"then
|
if key=="down"then
|
||||||
sceneTemp=sceneTemp%#musicID+1
|
sceneTemp=sceneTemp%BGM.len+1
|
||||||
elseif key=="up"then
|
elseif key=="up"then
|
||||||
sceneTemp=(sceneTemp-2)%#musicID+1
|
sceneTemp=(sceneTemp-2)%BGM.len+1
|
||||||
elseif key=="return"or key=="space"then
|
elseif key=="return"or key=="space"then
|
||||||
if BGM.nowPlay~=musicID[sceneTemp]then
|
if BGM.nowPlay~=BGM.list[sceneTemp]then
|
||||||
SFX.play("click")
|
SFX.play("click")
|
||||||
BGM.play(musicID[sceneTemp])
|
BGM.play(BGM.list[sceneTemp])
|
||||||
else
|
else
|
||||||
BGM.stop()
|
BGM.stop()
|
||||||
end
|
end
|
||||||
@@ -277,36 +277,42 @@ function keyDown.music(key)
|
|||||||
end
|
end
|
||||||
end
|
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},
|
||||||
|
{25,11,8,11,4,1,2,1,8,3,1,4,9},
|
||||||
|
}
|
||||||
function keyDown.custom(key)
|
function keyDown.custom(key)
|
||||||
local sel=sceneTemp
|
local sel=sceneTemp
|
||||||
if key=="left"then
|
if key=="up"or key=="w"then
|
||||||
|
sceneTemp=(sel-2)%#customID+1
|
||||||
|
elseif key=="down"or key=="s"then
|
||||||
|
sceneTemp=sel%#customID+1
|
||||||
|
elseif key=="left"or key=="a"then
|
||||||
customSel[sel]=(customSel[sel]-2)%#customRange[customID[sel]]+1
|
customSel[sel]=(customSel[sel]-2)%#customRange[customID[sel]]+1
|
||||||
if sel==12 then
|
if sel==12 then
|
||||||
BG.set(customRange.bg[customSel[12]])
|
BG.set(customRange.bg[customSel[12]])
|
||||||
elseif sel==13 then
|
elseif sel==13 then
|
||||||
BGM.play(customRange.bgm[customSel[13]])
|
BGM.play(customRange.bgm[customSel[13]])
|
||||||
end
|
end
|
||||||
elseif key=="right"then
|
elseif key=="right"or key=="d"then
|
||||||
customSel[sel]=customSel[sel]%#customRange[customID[sel]]+1
|
customSel[sel]=customSel[sel]%#customRange[customID[sel]]+1
|
||||||
if sel==12 then
|
if sel==12 then
|
||||||
BG.set(customRange.bg[customSel[sel]])
|
BG.set(customRange.bg[customSel[sel]])
|
||||||
elseif sel==13 then
|
elseif sel==13 then
|
||||||
BGM.play(customRange.bgm[customSel[sel]])
|
BGM.play(customRange.bgm[customSel[sel]])
|
||||||
end
|
end
|
||||||
elseif key=="down"then
|
elseif #key==1 then
|
||||||
sceneTemp=sel%#customID+1
|
local T=tonumber(key)
|
||||||
elseif key=="up"then
|
if T and T>=1 and T<=5 then
|
||||||
sceneTemp=(sel-2)%#customID+1
|
for i=1,#customSet[T]do
|
||||||
elseif key=="1"then
|
customSel[i]=customSet[T][i]
|
||||||
Widget.custom.set1.code()
|
end
|
||||||
elseif key=="2"then
|
BG.set(customRange.bg[customSel[12]])
|
||||||
Widget.custom.set2.code()
|
BGM.play(customRange.bgm[customSel[13]])
|
||||||
elseif key=="3"then
|
end
|
||||||
Widget.custom.set3.code()
|
|
||||||
elseif key=="4"then
|
|
||||||
Widget.custom.set4.code()
|
|
||||||
elseif key=="5"then
|
|
||||||
Widget.custom.set5.code()
|
|
||||||
elseif key=="escape"then
|
elseif key=="escape"then
|
||||||
SCN.back()
|
SCN.back()
|
||||||
end
|
end
|
||||||
@@ -425,41 +431,29 @@ function keyDown.setting_key(key)
|
|||||||
SCN.back()
|
SCN.back()
|
||||||
end
|
end
|
||||||
elseif s.kS then
|
elseif s.kS then
|
||||||
for l=1,8 do
|
for y=1,20 do
|
||||||
for y=1,20 do
|
if keyMap[1][y]==key then keyMap[1][y]=""break end
|
||||||
if keyMap[l][y]==key then
|
if keyMap[2][y]==key then keyMap[2][y]=""break end
|
||||||
keyMap[l][y]=""
|
|
||||||
goto L
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
::L::
|
|
||||||
keyMap[s.board][s.kb]=key
|
keyMap[s.board][s.kb]=key
|
||||||
SFX.play("reach",.5)
|
SFX.play("reach",.5)
|
||||||
s.kS=false
|
s.kS=false
|
||||||
elseif key=="return"then
|
elseif key=="return"or key=="space"then
|
||||||
s.kS=true
|
s.kS=true
|
||||||
SFX.play("lock",.5)
|
SFX.play("lock",.5)
|
||||||
elseif key=="up"then
|
elseif key=="up"or key=="w"then
|
||||||
if s.kb>1 then
|
if s.kb>1 then
|
||||||
s.kb=s.kb-1
|
s.kb=s.kb-1
|
||||||
SFX.play("move",.5)
|
SFX.play("move",.5)
|
||||||
end
|
end
|
||||||
elseif key=="down"then
|
elseif key=="down"or key=="s"then
|
||||||
if s.kb<20 then
|
if s.kb<20 then
|
||||||
s.kb=s.kb+1
|
s.kb=s.kb+1
|
||||||
SFX.play("move",.5)
|
SFX.play("move",.5)
|
||||||
end
|
end
|
||||||
elseif key=="left"then
|
elseif key=="left"or key=="a"or key=="right"or key=="d"then
|
||||||
if s.board>1 then
|
s.board=3-s.board
|
||||||
s.board=s.board-1
|
SFX.play("rotate",.5)
|
||||||
SFX.play("rotate",.5)
|
|
||||||
end
|
|
||||||
elseif key=="right"then
|
|
||||||
if s.board<8 then
|
|
||||||
s.board=s.board+1
|
|
||||||
SFX.play("rotate",.5)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function gamepadDown.setting_key(key)
|
function gamepadDown.setting_key(key)
|
||||||
@@ -472,16 +466,11 @@ function gamepadDown.setting_key(key)
|
|||||||
SCN.back()
|
SCN.back()
|
||||||
end
|
end
|
||||||
elseif s.jS then
|
elseif s.jS then
|
||||||
for l=9,16 do
|
for y=1,20 do
|
||||||
for y=1,20 do
|
if keyMap[3][y]==key then keyMap[3][y]=""break end
|
||||||
if keyMap[l][y]==key then
|
if keyMap[4][y]==key then keyMap[4][y]=""break end
|
||||||
keyMap[l][y]=""
|
|
||||||
goto L
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
::L::
|
keyMap[2+s.board][s.js]=key
|
||||||
keyMap[8+s.board][s.js]=key
|
|
||||||
SFX.play("reach",.5)
|
SFX.play("reach",.5)
|
||||||
s.jS=false
|
s.jS=false
|
||||||
elseif key=="start"then
|
elseif key=="start"then
|
||||||
@@ -497,16 +486,9 @@ function gamepadDown.setting_key(key)
|
|||||||
s.js=s.js+1
|
s.js=s.js+1
|
||||||
SFX.play("move",.5)
|
SFX.play("move",.5)
|
||||||
end
|
end
|
||||||
elseif key=="dpleft"then
|
elseif key=="dpleft"or key=="dpright"then
|
||||||
if s.board>1 then
|
s.board=3-s.board
|
||||||
s.board=s.board-1
|
SFX.play("rotate",.5)
|
||||||
SFX.play("rotate",.5)
|
|
||||||
end
|
|
||||||
elseif key=="dpright"then
|
|
||||||
if s.board<8 then
|
|
||||||
s.board=s.board+1
|
|
||||||
SFX.play("rotate",.5)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -515,7 +497,7 @@ function mouseDown.setting_touch(x,y,k)
|
|||||||
sceneTemp.sel=onVK_org(x,y)or sceneTemp.sel
|
sceneTemp.sel=onVK_org(x,y)or sceneTemp.sel
|
||||||
end
|
end
|
||||||
function mouseMove.setting_touch(x,y,dx,dy)
|
function mouseMove.setting_touch(x,y,dx,dy)
|
||||||
if sceneTemp.sel and ms.isDown(1)and not widget_sel then
|
if sceneTemp.sel and ms.isDown(1)and not WIDGET.sel then
|
||||||
local B=VK_org[sceneTemp.sel]
|
local B=VK_org[sceneTemp.sel]
|
||||||
B.x,B.y=B.x+dx,B.y+dy
|
B.x,B.y=B.x+dx,B.y+dy
|
||||||
end
|
end
|
||||||
@@ -538,16 +520,16 @@ function touchUp.setting_touch(id,x,y)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
function touchMove.setting_touch(id,x,y,dx,dy)
|
function touchMove.setting_touch(id,x,y,dx,dy)
|
||||||
if sceneTemp.sel and not widget_sel then
|
if sceneTemp.sel and not WIDGET.sel then
|
||||||
local B=VK_org[sceneTemp.sel]
|
local B=VK_org[sceneTemp.sel]
|
||||||
B.x,B.y=B.x+dx,B.y+dy
|
B.x,B.y=B.x+dx,B.y+dy
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function keyDown.pause(key)
|
function keyDown.pause(key)
|
||||||
if key=="escape"then
|
if key=="q"then
|
||||||
SCN.back()
|
SCN.back()
|
||||||
elseif key=="space"then
|
elseif key=="escape"then
|
||||||
resumeGame()
|
resumeGame()
|
||||||
elseif key=="s"then
|
elseif key=="s"then
|
||||||
SCN.push()
|
SCN.push()
|
||||||
@@ -572,20 +554,21 @@ function touchDown.play(id,x,y)
|
|||||||
virtualkey[t].pressTime=10
|
virtualkey[t].pressTime=10
|
||||||
if setting.VKTrack then
|
if setting.VKTrack then
|
||||||
local B=virtualkey[t]
|
local B=virtualkey[t]
|
||||||
if setting.VKDodge then--按钮软碰撞(做不来hhh随便做一个,效果还行!)
|
if setting.VKDodge then--button collision (not accurate)
|
||||||
for i=1,#virtualkey do
|
for i=1,#virtualkey do
|
||||||
local b=virtualkey[i]
|
local b=virtualkey[i]
|
||||||
local d=B.r+b.r-((B.x-b.x)^2+(B.y-b.y)^2)^.5--碰撞深度(负数=间隔距离)
|
local d=B.r+b.r-((B.x-b.x)^2+(B.y-b.y)^2)^.5--hit depth(Neg means distance)
|
||||||
if d>0 then
|
if d>0 then
|
||||||
b.x=b.x+(b.x-B.x)*d*b.r*.00005
|
b.x=b.x+(b.x-B.x)*d*b.r*5e-4
|
||||||
b.y=b.y+(b.y-B.y)*d*b.r*.00005
|
b.y=b.y+(b.y-B.y)*d*b.r*5e-4
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local O=VK_org[t]
|
local O=VK_org[t]
|
||||||
local _FW,_CW=setting.VKTchW*.1,1-setting.VKCurW*.1
|
local _FW,_CW=setting.VKTchW*.1,1-setting.VKCurW*.1
|
||||||
local _OW=1-_FW-_CW
|
local _OW=1-_FW-_CW
|
||||||
--按钮自动跟随:手指位置,当前位置,原始位置,权重取决于设置
|
|
||||||
|
--Auto follow: finger, current, origin (weight from setting)
|
||||||
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
|
end
|
||||||
VIB(setting.VKVIB)
|
VIB(setting.VKVIB)
|
||||||
@@ -622,44 +605,34 @@ function keyDown.play(key)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
local m=keyMap
|
local m=keyMap
|
||||||
for p=1,players.human do
|
for k=1,20 do
|
||||||
for k=1,20 do
|
if key==m[1][k]or key==m[2][k]then
|
||||||
if key==m[2*p-1][k]or key==m[2*p][k]then
|
players[1]:pressKey(k)
|
||||||
players[p]:pressKey(k)
|
virtualkey[k].isDown=true
|
||||||
if p==1 then
|
virtualkey[k].pressTime=10
|
||||||
virtualkey[k].isDown=true
|
return
|
||||||
virtualkey[k].pressTime=10
|
|
||||||
end
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function keyUp.play(key)
|
function keyUp.play(key)
|
||||||
local m=keyMap
|
local m=keyMap
|
||||||
for p=1,players.human do
|
for k=1,20 do
|
||||||
for k=1,20 do
|
if key==m[1][k]or key==m[2][k]then
|
||||||
if key==m[2*p-1][k]or key==m[2*p][k]then
|
players[1]:releaseKey(k)
|
||||||
players[p]:releaseKey(k)
|
virtualkey[k].isDown=false
|
||||||
if p==1 then virtualkey[k].isDown=false end
|
return
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function gamepadDown.play(key)
|
function gamepadDown.play(key)
|
||||||
if key=="back"then SCN.back()return end
|
if key=="back"then SCN.back()return end
|
||||||
local m=keyMap
|
local m=keyMap
|
||||||
for p=1,players.human do
|
for k=1,20 do
|
||||||
for k=1,20 do
|
if key==m[3][k]or key==m[4][k]then
|
||||||
if key==m[2*p+7][k]or key==m[2*p+8][k]then
|
players[1]:pressKey(k)
|
||||||
players[p]:pressKey(k)
|
virtualkey[k].isDown=true
|
||||||
if p==1 then
|
virtualkey[k].pressTime=10
|
||||||
virtualkey[k].isDown=true
|
return
|
||||||
virtualkey[k].pressTime=10
|
|
||||||
end
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -667,9 +640,9 @@ function gamepadUp.play(key)
|
|||||||
local m=keyMap
|
local m=keyMap
|
||||||
for p=1,players.human do
|
for p=1,players.human do
|
||||||
for k=1,20 do
|
for k=1,20 do
|
||||||
if key==m[2*p+7][k]or key==m[2*p+8][k]then
|
if key==m[3][k]or key==m[4][k]then
|
||||||
players[p]:releaseKey(k)
|
players[1]:releaseKey(k)
|
||||||
if p==1 then virtualkey[k].isDown=false end
|
virtualkey[k].isDown=false
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -701,90 +674,14 @@ function wheelMoved.history(x,y)
|
|||||||
end
|
end
|
||||||
function keyDown.history(key)
|
function keyDown.history(key)
|
||||||
if key=="up"then
|
if key=="up"then
|
||||||
sceneTemp[2]=max(sceneTemp[2]-3,1)
|
sceneTemp[2]=max(sceneTemp[2]-1,1)
|
||||||
elseif key=="down"then
|
elseif key=="down"then
|
||||||
sceneTemp[2]=min(sceneTemp[2]+3,#sceneTemp[1]-22)
|
sceneTemp[2]=min(sceneTemp[2]+1,#sceneTemp[1])
|
||||||
elseif key=="escape"then
|
elseif key=="escape"then
|
||||||
SCN.back()
|
SCN.back()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-------------------------------------------------------------
|
-------------------------------------------------------------
|
||||||
local function widgetPress(W,x,y)
|
|
||||||
if W.type=="button"then
|
|
||||||
W.code()
|
|
||||||
W:FX()
|
|
||||||
SFX.play("button")
|
|
||||||
VOC.play("nya")
|
|
||||||
elseif W.type=="switch"then
|
|
||||||
W.code()
|
|
||||||
SFX.play("move",.6)
|
|
||||||
elseif W.type=="slider"then
|
|
||||||
if not x then return end
|
|
||||||
local p,P=W.disp(),x<W.x and 0 or x>W.x+W.w and W.unit or int((x-W.x)*W.unit/W.w+.5)
|
|
||||||
if p==P then return end
|
|
||||||
W.code(P)
|
|
||||||
if W.change then W.change()end
|
|
||||||
end
|
|
||||||
if W.hide and W.hide()then widget_sel=nil end
|
|
||||||
end
|
|
||||||
local function widgetDrag(W,x,y,dx,dy)
|
|
||||||
if W.type=="slider"then
|
|
||||||
local p,P=W.disp(),x<W.x and 0 or x>W.x+W.w and W.unit or int((x-W.x)*W.unit/W.w+.5)
|
|
||||||
if p==P then return end
|
|
||||||
W.code(P)
|
|
||||||
if W.change then W.change()end
|
|
||||||
elseif not W:isAbove(x,y)then
|
|
||||||
widget_sel=nil
|
|
||||||
end
|
|
||||||
end
|
|
||||||
local function widgetControl_key(i)
|
|
||||||
if i=="tab"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[SCN.cur]))
|
|
||||||
end
|
|
||||||
elseif i=="space"or i=="return"then
|
|
||||||
if widget_sel then
|
|
||||||
widgetPress(widget_sel)
|
|
||||||
end
|
|
||||||
elseif i=="left"or i=="right"then
|
|
||||||
if widget_sel then
|
|
||||||
local W=widget_sel
|
|
||||||
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
|
|
||||||
end
|
|
||||||
local function widgetControl_gamepad(i)
|
|
||||||
if i=="dpup"or i=="dpdown"then
|
|
||||||
if widget_sel then
|
|
||||||
widget_sel=i=="dpup"and widget_sel.prev or widget_sel.next or widget_sel
|
|
||||||
else
|
|
||||||
widget_sel=select(2,next(Widget[SCN.cur]))
|
|
||||||
end
|
|
||||||
elseif i=="start"then
|
|
||||||
if widget_sel then
|
|
||||||
widgetPress(widget_sel)
|
|
||||||
end
|
|
||||||
elseif i=="dpleft"or i=="dpright"then
|
|
||||||
if widget_sel then
|
|
||||||
local W=widget_sel
|
|
||||||
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
|
|
||||||
end
|
|
||||||
local lastX,lastY=0,0--last clickDown pos
|
local lastX,lastY=0,0--last clickDown pos
|
||||||
function love.mousepressed(x,y,k,t,num)
|
function love.mousepressed(x,y,k,t,num)
|
||||||
if t then return end
|
if t then return end
|
||||||
@@ -798,9 +695,7 @@ function love.mousepressed(x,y,k,t,num)
|
|||||||
SCN.back()
|
SCN.back()
|
||||||
end
|
end
|
||||||
if k==1 then
|
if k==1 then
|
||||||
if widget_sel then
|
WIDGET.press(mx,my)
|
||||||
widgetPress(widget_sel,mx,my)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
lastX,lastY=mx,my
|
lastX,lastY=mx,my
|
||||||
end
|
end
|
||||||
@@ -814,17 +709,9 @@ function love.mousemoved(x,y,dx,dy,t)
|
|||||||
mouseMove[SCN.cur](mx,my,dx,dy)
|
mouseMove[SCN.cur](mx,my,dx,dy)
|
||||||
end
|
end
|
||||||
if ms.isDown(1) then
|
if ms.isDown(1) then
|
||||||
if widget_sel then
|
WIDGET.drag(mx,my,dx,dy)
|
||||||
widgetDrag(widget_sel,mx,my,dx,dy)
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
widget_sel=nil
|
WIDGET.moveCursor(mx,my)
|
||||||
for _,W in next,Widget[SCN.cur]do
|
|
||||||
if not(W.hide and W.hide())and W:isAbove(mx,my)then
|
|
||||||
widget_sel=W
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function love.mousereleased(x,y,k,t,num)
|
function love.mousereleased(x,y,k,t,num)
|
||||||
@@ -863,18 +750,13 @@ function love.touchmoved(id,x,y,dx,dy)
|
|||||||
if touchMove[SCN.cur]then
|
if touchMove[SCN.cur]then
|
||||||
touchMove[SCN.cur](id,x,y,dx/scr.k,dy/scr.k)
|
touchMove[SCN.cur](id,x,y,dx/scr.k,dy/scr.k)
|
||||||
end
|
end
|
||||||
if widget_sel then
|
if WIDGET.sel then
|
||||||
if touching then
|
if touching then
|
||||||
widgetDrag(widget_sel,x,y,dx,dy)
|
WIDGET.drag(x,y,dx,dy)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
for _,W in next,Widget[SCN.cur]do
|
WIDGET.moveCursor(x,y)
|
||||||
if not(W.hide and W.hide())and W:isAbove(x,y)then
|
if not WIDGET.sel then
|
||||||
widget_sel=W
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if not widget_sel then
|
|
||||||
touching=nil
|
touching=nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -883,11 +765,9 @@ function love.touchreleased(id,x,y)
|
|||||||
if SCN.swapping then return end
|
if SCN.swapping then return end
|
||||||
x,y=xOy:inverseTransformPoint(x,y)
|
x,y=xOy:inverseTransformPoint(x,y)
|
||||||
if id==touching then
|
if id==touching then
|
||||||
|
WIDGET.press(x,y)
|
||||||
touching=nil
|
touching=nil
|
||||||
if widget_sel then
|
WIDGET.sel=nil
|
||||||
widgetPress(widget_sel,x,y)
|
|
||||||
end
|
|
||||||
widget_sel=nil
|
|
||||||
end
|
end
|
||||||
if touchUp[SCN.cur]then
|
if touchUp[SCN.cur]then
|
||||||
touchUp[SCN.cur](id,x,y)
|
touchUp[SCN.cur](id,x,y)
|
||||||
@@ -902,34 +782,22 @@ function love.keypressed(i)
|
|||||||
if devMode then
|
if devMode then
|
||||||
if i=="f5"then
|
if i=="f5"then
|
||||||
print("DEBUG:")
|
print("DEBUG:")
|
||||||
|
elseif i=="f8"then devMode=nil TEXT.show("DEBUG OFF",640,360,80,"fly",.8)
|
||||||
elseif i=="f8"then
|
elseif i=="f9"then devMode=1 TEXT.show("DEBUG 1",640,360,80,"fly",.8)
|
||||||
devMode=nil
|
elseif i=="f10"then devMode=2 TEXT.show("DEBUG 2",640,360,80,"fly",.8)
|
||||||
TEXT.show("DEBUG OFF",640,360,80,"fly",.8)
|
elseif i=="f11"then devMode=3 TEXT.show("DEBUG 3",640,360,80,"fly",8)
|
||||||
elseif i=="f9"then
|
elseif i=="f12"then devMode=4 TEXT.show("DEBUG 4",640,360,80,"fly",12)
|
||||||
devMode=1
|
|
||||||
TEXT.show("DEBUG 1",640,360,80,"fly",.8)
|
|
||||||
elseif i=="f10"then
|
|
||||||
devMode=2
|
|
||||||
TEXT.show("DEBUG 2",640,360,80,"fly",.8)
|
|
||||||
elseif i=="f11"then
|
|
||||||
devMode=3
|
|
||||||
TEXT.show("DEBUG 3",640,360,80,"fly",8)
|
|
||||||
elseif i=="f12"then
|
|
||||||
devMode=4
|
|
||||||
TEXT.show("DEBUG 4",640,360,80,"fly",12)
|
|
||||||
elseif devMode==2 then
|
elseif devMode==2 then
|
||||||
if i=="k"then
|
if i=="k"then
|
||||||
for i=1,8 do
|
for i=1,8 do
|
||||||
local P=players.alive[rnd(#players.alive)]
|
local P=players.alive[rnd(#players.alive)]
|
||||||
if P~=players[1]then
|
if P~=players[1]then
|
||||||
-- P.lastRecv=players[1]
|
P.lastRecv=players[1]
|
||||||
P:lose()
|
P:lose()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
--Test code here
|
|
||||||
elseif i=="q"then
|
elseif i=="q"then
|
||||||
local W=widget_sel
|
local W=WIDGET.sel
|
||||||
if W then W:getInfo()end
|
if W then W:getInfo()end
|
||||||
elseif i=="f3"then
|
elseif i=="f3"then
|
||||||
error("Techmino:挂了")
|
error("Techmino:挂了")
|
||||||
@@ -937,13 +805,13 @@ function love.keypressed(i)
|
|||||||
for k,v in next,_G do
|
for k,v in next,_G do
|
||||||
print(k,v)
|
print(k,v)
|
||||||
end
|
end
|
||||||
elseif i=="z"then
|
elseif i=="\122"then
|
||||||
if kb.isDown("m")and kb.isDown("r")then
|
if kb.isDown("\109")and kb.isDown("\114")then
|
||||||
marking=nil
|
marking=nil
|
||||||
SFX.play("reach")
|
SFX.play("reach")
|
||||||
end
|
end
|
||||||
elseif widget_sel then
|
elseif WIDGET.sel then
|
||||||
local W=widget_sel
|
local W=WIDGET.sel
|
||||||
if i=="left"then W.x=W.x-10
|
if i=="left"then W.x=W.x-10
|
||||||
elseif i=="right"then W.x=W.x+10
|
elseif i=="right"then W.x=W.x+10
|
||||||
elseif i=="up"then W.y=W.y-10
|
elseif i=="up"then W.y=W.y-10
|
||||||
@@ -963,7 +831,7 @@ function love.keypressed(i)
|
|||||||
else
|
else
|
||||||
if keyDown[SCN.cur]then keyDown[SCN.cur](i)
|
if keyDown[SCN.cur]then keyDown[SCN.cur](i)
|
||||||
elseif i=="escape"then SCN.back()
|
elseif i=="escape"then SCN.back()
|
||||||
else widgetControl_key(i)
|
else WIDGET.keyPressed(i)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -997,7 +865,7 @@ function love.gamepadpressed(joystick,i)
|
|||||||
if gamepadDown[SCN.cur]then gamepadDown[SCN.cur](i)
|
if gamepadDown[SCN.cur]then gamepadDown[SCN.cur](i)
|
||||||
elseif keyDown[SCN.cur]then keyDown[SCN.cur](keyMirror[i]or i)
|
elseif keyDown[SCN.cur]then keyDown[SCN.cur](keyMirror[i]or i)
|
||||||
elseif i=="back"then SCN.back()
|
elseif i=="back"then SCN.back()
|
||||||
else widgetControl_gamepad(i)
|
else WIDGET.gamepadPressed(i)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function love.gamepadreleased(joystick,i)
|
function love.gamepadreleased(joystick,i)
|
||||||
@@ -1012,7 +880,7 @@ function love.joystickpressed(JS,k)
|
|||||||
if gamepadDown[SCN.cur]then gamepadDown[SCN.cur](i)
|
if gamepadDown[SCN.cur]then gamepadDown[SCN.cur](i)
|
||||||
elseif keyDown[SCN.cur]then keyDown[SCN.cur](keyMirror[i]or i)
|
elseif keyDown[SCN.cur]then keyDown[SCN.cur](keyMirror[i]or i)
|
||||||
elseif i=="back"then SCN.back()
|
elseif i=="back"then SCN.back()
|
||||||
else widgetControl_gamepad(i)
|
else WIDGET.gamepadPressed(i)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function love.joystickreleased(JS,k)
|
function love.joystickreleased(JS,k)
|
||||||
@@ -1060,7 +928,7 @@ local FPS=love.timer.getFPS
|
|||||||
love.draw,love.update=nil
|
love.draw,love.update=nil
|
||||||
function love.run()
|
function love.run()
|
||||||
local T=love.timer
|
local T=love.timer
|
||||||
local STEP,GETΔ,WAIT=T.step,T.getDelta,T.sleep
|
local STEP,GETDelta,WAIT=T.step,T.getDelta,T.sleep
|
||||||
local lastFrame=T.getTime()
|
local lastFrame=T.getTime()
|
||||||
local lastFreshPow=lastFrame
|
local lastFreshPow=lastFrame
|
||||||
local FCT=0--framedraw counter
|
local FCT=0--framedraw counter
|
||||||
@@ -1080,19 +948,16 @@ function love.run()
|
|||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--UPDATE
|
--UPDATE
|
||||||
STEP()local dt=GETΔ()
|
STEP()local dt=GETDelta()
|
||||||
TASK.update()
|
TASK.update()
|
||||||
VOC.update()
|
VOC.update()
|
||||||
BG.update(dt)
|
BG.update(dt)
|
||||||
sysFX.update(dt)
|
sysFX.update(dt)
|
||||||
TEXT.update()
|
TEXT.update()
|
||||||
local _=Tmr[SCN.cur]if _ then _(dt)end
|
local _=Tmr[SCN.cur]if _ then _(dt)end--Scene Updater
|
||||||
if SCN.swapping then SCN.swapUpdate()end
|
if SCN.swapping then SCN.swapUpdate()end--Scene swapping animation
|
||||||
for _,W in next,Widget[SCN.cur]do
|
WIDGET.update()--Widgets animation
|
||||||
W:update()
|
|
||||||
end--更新控件
|
|
||||||
|
|
||||||
--DRAW
|
--DRAW
|
||||||
if not mini()then
|
if not mini()then
|
||||||
@@ -1105,11 +970,7 @@ function love.run()
|
|||||||
gc.push("transform")
|
gc.push("transform")
|
||||||
gc.replaceTransform(xOy)
|
gc.replaceTransform(xOy)
|
||||||
if Pnt[SCN.cur]then Pnt[SCN.cur]()end
|
if Pnt[SCN.cur]then Pnt[SCN.cur]()end
|
||||||
for k,W in next,Widget[SCN.cur]do
|
WIDGET.draw()--Draw widgets
|
||||||
if not(W.hide and W.hide())then
|
|
||||||
W:draw()
|
|
||||||
end
|
|
||||||
end--Draw widgets
|
|
||||||
if mouseShow then
|
if mouseShow then
|
||||||
local r=Timer()*.5
|
local r=Timer()*.5
|
||||||
local R=int(r)%7+1
|
local R=int(r)%7+1
|
||||||
@@ -1124,14 +985,16 @@ function love.run()
|
|||||||
gc.pop()
|
gc.pop()
|
||||||
|
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
gc.draw(infoCanvas,0,0,0,scr.k)
|
if setting.powerInfo then
|
||||||
|
gc.draw(infoCanvas,0,0,0,scr.k)
|
||||||
|
end
|
||||||
--Power Info
|
--Power Info
|
||||||
|
|
||||||
if SCN.swapping then
|
if SCN.swapping then
|
||||||
_=SCN.swap
|
_=SCN.swap
|
||||||
_.draw(_.time)
|
_.draw(_.time)
|
||||||
end--Scene swapping animation
|
end--Scene swapping animation
|
||||||
|
|
||||||
setFont(15)
|
setFont(15)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
_=scr.h-20
|
_=scr.h-20
|
||||||
@@ -1158,7 +1021,7 @@ function love.run()
|
|||||||
|
|
||||||
--FRESH POWER
|
--FRESH POWER
|
||||||
lastFrame=Timer()
|
lastFrame=Timer()
|
||||||
if Timer()-lastFreshPow>1 then
|
if Timer()-lastFreshPow>3 and setting.powerInfo and SCN.cur~="load"then
|
||||||
updatePowerInfo()
|
updatePowerInfo()
|
||||||
lastFreshPow=Timer()
|
lastFreshPow=Timer()
|
||||||
end
|
end
|
||||||
|
|||||||
14
conf.lua
14
conf.lua
@@ -1,11 +1,11 @@
|
|||||||
gameVersion="Alpha V0.8.18"
|
gameVersion="Alpha V0.8.20"
|
||||||
function love.conf(t)
|
function love.conf(t)
|
||||||
t.identity="Techmino"--SaveDir name
|
t.identity="Techmino"--folder name
|
||||||
t.version="11.1"
|
t.version="11.1"
|
||||||
t.console=false
|
t.console=false
|
||||||
t.gammacorrect=false
|
t.gammacorrect=false
|
||||||
t.appendidentity=true--Search files in source before save directory
|
t.appendidentity=true--search files in source before save directory
|
||||||
t.accelerometerjoystick=false--ios/android加速度计=摇杆
|
t.accelerometerjoystick=false--accelerometer=joystick on ios/android
|
||||||
t.audio.mixwithsystem=true
|
t.audio.mixwithsystem=true
|
||||||
|
|
||||||
local W=t.window
|
local W=t.window
|
||||||
@@ -17,12 +17,12 @@ function love.conf(t)
|
|||||||
W.resizable=true
|
W.resizable=true
|
||||||
W.fullscreentype="desktop"--"exclusive"
|
W.fullscreentype="desktop"--"exclusive"
|
||||||
W.fullscreen=false
|
W.fullscreen=false
|
||||||
W.vsync=0--∞fps
|
W.vsync=0--infinite fps
|
||||||
W.msaa=false--num of samples to use with multi-sampled antialiasing
|
W.msaa=false--num of samples to use with multi-sampled antialiasing
|
||||||
W.depth=0--bits/samp of depth buffer
|
W.depth=0--bits/samp of depth buffer
|
||||||
W.stencil=1--bits/samp of stencil buffer
|
W.stencil=1--bits/samp of stencil buffer
|
||||||
W.display=1--Monitor ID
|
W.display=1--monitor ID
|
||||||
W.highdpi=false--High-dpi mode for the window on a Retina display
|
W.highdpi=false--high-dpi mode for the window on a Retina display
|
||||||
W.x,W.y=nil
|
W.x,W.y=nil
|
||||||
|
|
||||||
local M=t.modules
|
local M=t.modules
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
setting={
|
local s={
|
||||||
|
--game
|
||||||
das=10,arr=2,
|
das=10,arr=2,
|
||||||
sddas=0,sdarr=2,
|
sddas=0,sdarr=2,
|
||||||
ihs=true,irs=true,ims=true,
|
ihs=true,irs=true,ims=true,
|
||||||
@@ -8,18 +9,18 @@ setting={
|
|||||||
swap=true,
|
swap=true,
|
||||||
fine=false,
|
fine=false,
|
||||||
autoPause=true,
|
autoPause=true,
|
||||||
|
|
||||||
lang=1,
|
lang=1,
|
||||||
skinSet=1,
|
skinSet=1,
|
||||||
skin={1,5,2,8,10,3,7},
|
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},
|
||||||
face={0,0,0,0,0,0,0},
|
face={},
|
||||||
--game
|
|
||||||
|
|
||||||
|
--graphic
|
||||||
ghost=true,center=true,
|
ghost=true,center=true,
|
||||||
smooth=true,grid=false,
|
smooth=true,grid=false,
|
||||||
bagLine=false,
|
bagLine=false,
|
||||||
lockFX=2,
|
lockFX=2,
|
||||||
dropFX=3,
|
dropFX=3,
|
||||||
|
clearFX=2,
|
||||||
shakeFX=2,
|
shakeFX=2,
|
||||||
atkFX=3,
|
atkFX=3,
|
||||||
frameMul=100,
|
frameMul=100,
|
||||||
@@ -27,13 +28,14 @@ setting={
|
|||||||
text=true,
|
text=true,
|
||||||
fullscreen=false,
|
fullscreen=false,
|
||||||
bg=true,
|
bg=true,
|
||||||
--graphic
|
powerInfo=false,
|
||||||
|
|
||||||
|
--sound
|
||||||
sfx=10,bgm=7,
|
sfx=10,bgm=7,
|
||||||
vib=0,voc=0,
|
vib=0,voc=0,
|
||||||
stereo=6,
|
stereo=6,
|
||||||
--sound
|
|
||||||
|
|
||||||
|
--virtualkey
|
||||||
VKSFX=3,--SFX volume
|
VKSFX=3,--SFX volume
|
||||||
VKVIB=0,--VIB
|
VKVIB=0,--VIB
|
||||||
VKSwitch=false,--if disp
|
VKSwitch=false,--if disp
|
||||||
@@ -43,28 +45,36 @@ setting={
|
|||||||
VKCurW=4,--Cur-Pos Weight
|
VKCurW=4,--Cur-Pos Weight
|
||||||
VKIcon=true,--if disp icon
|
VKIcon=true,--if disp icon
|
||||||
VKAlpha=3,
|
VKAlpha=3,
|
||||||
--control
|
|
||||||
}
|
}
|
||||||
stat={
|
for i=1,25 do
|
||||||
|
s.face[i]=0
|
||||||
|
end
|
||||||
|
setting=s
|
||||||
|
|
||||||
|
s={
|
||||||
version=gameVersion,
|
version=gameVersion,
|
||||||
run=0,game=0,time=0,
|
run=0,game=0,time=0,
|
||||||
key=0,rotate=0,hold=0,
|
key=0,rotate=0,hold=0,
|
||||||
extraPiece=0,extraRate=0,
|
extraPiece=0,extraRate=0,
|
||||||
piece=0,row=0,dig=0,
|
piece=0,row=0,dig=0,
|
||||||
atk=0,digatk=0,send=0,recv=0,pend=0,
|
atk=0,digatk=0,send=0,recv=0,pend=0,
|
||||||
clear_S={0,0,0,0},clear_B={0,0,0,0,0,0,0},
|
clear={},clear_B={},clear_S={0,0,0,0,0},
|
||||||
spin_S={0,0,0,0},spin_B={0,0,0,0,0,0,0},
|
spin={},spin_B={},spin_S={0,0,0,0,0},
|
||||||
clear={{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}},
|
|
||||||
spin={{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}},
|
|
||||||
pc=0,hpc=0,b2b=0,b3b=0,score=0,
|
pc=0,hpc=0,b2b=0,b3b=0,score=0,
|
||||||
lastPlay=1,--last played mode ID
|
lastPlay=1,--last played mode ID
|
||||||
}
|
}
|
||||||
|
for i=1,25 do
|
||||||
|
s.clear_B[i]=0
|
||||||
|
s.spin_B[i]=0
|
||||||
|
s.clear[i]={0,0,0,0,0}
|
||||||
|
s.spin[i]={0,0,0,0,0}
|
||||||
|
end
|
||||||
|
stat=s
|
||||||
|
|
||||||
keyMap={
|
keyMap={
|
||||||
{"left","right","x","z","c","up","down","space","tab","r"},
|
{"left","right","x","z","c","up","down","space","tab","r"},{},
|
||||||
{},{},{},{},{},{},{},
|
|
||||||
--keyboard
|
--keyboard
|
||||||
{"dpleft","dpright","a","b","y","dpup","dpdown","rightshoulder","x","leftshoulder"},
|
{"dpleft","dpright","a","b","y","dpup","dpdown","rightshoulder","x","leftshoulder"},{},
|
||||||
{},{},{},{},{},{},{},
|
|
||||||
--joystick
|
--joystick
|
||||||
}
|
}
|
||||||
for i=1,#keyMap do for j=1,20 do
|
for i=1,#keyMap do for j=1,20 do
|
||||||
|
|||||||
65
document.txt
65
document.txt
@@ -1,3 +1,4 @@
|
|||||||
|
(ENG ver. below)
|
||||||
游戏方法:
|
游戏方法:
|
||||||
系统会提供的一个个四联骨牌("方块",总共7种),玩家需要控制(左右移动和旋转90,180,270度),每填满场地的一行就会将其消除,根据消除方式会给对手攻击(如果有对手的话)
|
系统会提供的一个个四联骨牌("方块",总共7种),玩家需要控制(左右移动和旋转90,180,270度),每填满场地的一行就会将其消除,根据消除方式会给对手攻击(如果有对手的话)
|
||||||
活到最后或者完成目标即胜利.
|
活到最后或者完成目标即胜利.
|
||||||
@@ -15,7 +16,8 @@ spin判定:
|
|||||||
spin1/2/3攻击2/4/6,若mini则减半
|
spin1/2/3攻击2/4/6,若mini则减半
|
||||||
B2B:加1(techrash/spin1/spin2)或2(spin3)攻击
|
B2B:加1(techrash/spin1/spin2)或2(spin3)攻击
|
||||||
B3B:在B2B效果之上消四再加1,spin再加0.5*消行数攻击,二者都+1额外抵挡
|
B3B:在B2B效果之上消四再加1,spin再加0.5*消行数攻击,二者都+1额外抵挡
|
||||||
连击:0,0,1,1,2,2,3,3,4,4,3,2,3,2,3,2,3…(后面都是2)
|
堆楼连击:0,0,1,1,2,2,2,3,3,3,4,4,3, 之后都是2
|
||||||
|
挖掘连击:0,0,1,1,2,2,3,3,4,4,4, 之后都是5
|
||||||
特殊消除会增加B2B点数,让之后的特殊消除获得B2B(B3B)增益(详细说明见下文)
|
特殊消除会增加B2B点数,让之后的特殊消除获得B2B(B3B)增益(详细说明见下文)
|
||||||
半全消("下方有剩余方块"的全消,如果是I消1行则必须不剩余玩家放置的方块):伤害+2,额外抵挡+2
|
半全消("下方有剩余方块"的全消,如果是I消1行则必须不剩余玩家放置的方块):伤害+2,额外抵挡+2
|
||||||
全消:将上述伤害之和开根号,再+6~12(本局内递增)+2额外抵挡(注:本局消行数>4时会将B2B点数拉满)
|
全消:将上述伤害之和开根号,再+6~12(本局内递增)+2额外抵挡(注:本局消行数>4时会将B2B点数拉满)
|
||||||
@@ -52,5 +54,62 @@ back to back(B2B)点数说明:
|
|||||||
自定义模式说明:
|
自定义模式说明:
|
||||||
玩家可以自由调整大多数参数(不包括上述各种游戏模式的特殊效果),也可以画一个场地去消除或者是作为提示模板来进行拼图模式.
|
玩家可以自由调整大多数参数(不包括上述各种游戏模式的特殊效果),也可以画一个场地去消除或者是作为提示模板来进行拼图模式.
|
||||||
在拼图模式下,按功能键切换是否展示提示.其中打"X"的格子不允许有方块,空的格子可以是任何状态,普通的七种彩色方块必须颜色对应,垃圾行方块的为止只要有方块就可以,但是不能是空气,玩家拼出自己画的图后就会判定胜利.
|
在拼图模式下,按功能键切换是否展示提示.其中打"X"的格子不允许有方块,空的格子可以是任何状态,普通的七种彩色方块必须颜色对应,垃圾行方块的为止只要有方块就可以,但是不能是空气,玩家拼出自己画的图后就会判定胜利.
|
||||||
附录:
|
|
||||||
ZXC的Ospin地图:XY0BCgAwCAIR7v9vHtUSt8AS0xKqgpnNGyXkrmFNePf6qi3BbQPrHT2Owxe6D66NeKi86dwB
|
Gameplay:
|
||||||
|
System will offer a series of tetrominoes ("Pieces". There are 7 types), and the player needs to control [them] (move left and right, rotate 90, 180 or 270 degrees), filling a row on the play field will clear it, attack will be sent depending on the type of the line clear (if there is an opponent)
|
||||||
|
Survive till the last or complete the level's goal to win.
|
||||||
|
|
||||||
|
Rotation system:
|
||||||
|
Uses Techmino's custom rotation system. Too lazy to write the details
|
||||||
|
|
||||||
|
Spin detection:
|
||||||
|
Combines immobile and 3-corner detection, and whether a spin is mini also depends on the data used for detection. Also too lazy to write the details
|
||||||
|
|
||||||
|
Attack system:
|
||||||
|
Regular line clears:
|
||||||
|
Single/Double/Triple/Techrash sends 0.25/1.25/2.25/4
|
||||||
|
Special line clears:
|
||||||
|
Spin Single/Double/Triple sends 2/4/6, half if Mini
|
||||||
|
B2B: +1 (Techrash/Spin Single/Spin Double) or +2 (Spin Triple)
|
||||||
|
B2B2B/B3B: In addition to B2B, +1 if Techrash, +(0.5 * lines cleared) if Spin, and in both cases +1 additional blocking
|
||||||
|
Wide Combo: 0, 0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 3, then 2 afterwards
|
||||||
|
Dig Combo: 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 4, then 5 afterwards
|
||||||
|
Special line clears will increase B2B gauge, making later special line clears have B2B or B2B2B bonus (see below)
|
||||||
|
Half Perfect Clear (a Perfect Clear "with blocks left below". If it's an I clearing 1 line, then the remaining blocks must not be player-placed): Attack +2, Extra Blocking +2
|
||||||
|
Perfect Clear: square root all damage above, then +6 to +12 attack (increases within a round) and +2 extra blocking. (note: if lines cleared in this round >4, then B2B gauge will be filled)
|
||||||
|
After calculating all above, the damage value will be rounded down then sent
|
||||||
|
|
||||||
|
Score system:
|
||||||
|
The more impressive you play, the more score you get
|
||||||
|
|
||||||
|
Attack delay:
|
||||||
|
Attack from Doubles/Triples take effect the faster, then Techrash, Spins send rather slow attack, and high combos will send the slowest
|
||||||
|
B2B or B2B2B, while they increase lines sent, they also increase the attack delay. Minis will greatly increase delay.
|
||||||
|
|
||||||
|
Countering:
|
||||||
|
When you send attack, if there is garbage in queue, extra blocking will be used first, then attack, countering the earliest attack at a 1:1 ratio.
|
||||||
|
Unused extra blocking will be discarded, then remaining attack will be sent to your opponent.
|
||||||
|
|
||||||
|
Back to Back (B2B) gauge:
|
||||||
|
The B2B gauge ranges from 0 to 1,200. Special line clears are B2B if the gauge is >=40, B2B2B if >1,000.
|
||||||
|
A regular line clear -250
|
||||||
|
Spin Single/Double/Triple +50/100/180 (x40% if Mini)
|
||||||
|
Techrash +100
|
||||||
|
Spin without clearing lines +20, but gauge cannot exceed 1,000 with this method
|
||||||
|
When gauge is above 1,000, a drop without clearing lines -40 (cannot drop below 1,000 with this method)
|
||||||
|
|
||||||
|
Battle Royale modes:
|
||||||
|
Many players play within one game (all opponents are bots, not real players). As players get eliminated, blocks fall faster, and garbage take effect faster, as well as rise faster. KO-ing another player grants you one badge plus all badge that player has, increasing your attack power.
|
||||||
|
Players can select one of 4 attack modes:
|
||||||
|
1. Random: Every time you attack, 10% chance to lock onto a random player.
|
||||||
|
2. Badges: After you attack or when your target dies, lock onto the player with the most badges.
|
||||||
|
3. KOs: After you attack or when your target dies, lock onto the player with the highest field. (This refreshes every second)
|
||||||
|
4. Counter: attack all players locking onto yourself. Your attack will be sent to all of them. If you are not targetted, you attack a random player (not locking).
|
||||||
|
The last survivor wins.
|
||||||
|
|
||||||
|
Custom mode:
|
||||||
|
You can freely adjust most parameters (not including special effects of other game modes), and you can also draw a field to clear or make a template to build.
|
||||||
|
In build (puzzle) mode, you can toggle template display with Function key. Cells with a X cannot have blocks; empty cells can be in any state; regular colored cells have to be made of the corresponding block; garbage-colored cells can be any block but not air. Once you make the shape, you will win.
|
||||||
|
|
||||||
|
附录Appendix:
|
||||||
|
ZXC's cool O-spin map:XY0BCgAwCAIR7v9vHtUSt8AS0xKqgpnNGyXkrmFNePf6qi3BbQPrHT2Owxe6D66NeKi86dwB
|
||||||
17
main.lua
17
main.lua
@@ -1,10 +1,11 @@
|
|||||||
--[[
|
--[[
|
||||||
第一次搞这么大的工程,参考价值也许不是很大
|
Techmino is my first "huge project"
|
||||||
如果你有时间并且也热爱俄罗斯方块的话,来看代码或者帮助优化的话欢迎!
|
optimization is welcomed if you also love tetromino game
|
||||||
]]
|
]]
|
||||||
math.randomseed(os.time()*626)
|
math.randomseed(os.time()*626)
|
||||||
--Global vars
|
--Global vars
|
||||||
system=love.system.getOS()
|
system=love.system.getOS()
|
||||||
|
game={}
|
||||||
mapCam={
|
mapCam={
|
||||||
sel=nil,--selected mode ID
|
sel=nil,--selected mode ID
|
||||||
|
|
||||||
@@ -22,10 +23,7 @@ scr={x=0,y=0,w=0,h=0,rad=0,k=1}--wid,hei,radius,scale K
|
|||||||
customSel={1,22,1,1,7,3,1,1,8,4,1,1,1}
|
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
|
preField={h=20}for i=1,20 do preField[i]={0,0,0,0,0,0,0,0,0,0}end
|
||||||
function NULL()end
|
function NULL()end
|
||||||
--[[
|
--blockSkin,blockSkinMini={},{}--redefined in SKIN.change
|
||||||
blockSkin,blockSkinMini={},{}--redefined in SKIN.change
|
|
||||||
widget_sel=nil--selected widget obj
|
|
||||||
]]
|
|
||||||
|
|
||||||
--Load modules
|
--Load modules
|
||||||
setFont=require("parts/setfont")
|
setFont=require("parts/setfont")
|
||||||
@@ -53,14 +51,14 @@ TEXT=require("parts/text")
|
|||||||
TASK=require("parts/task")
|
TASK=require("parts/task")
|
||||||
BG=require("parts/bg")
|
BG=require("parts/bg")
|
||||||
IMG=require("parts/img")
|
IMG=require("parts/img")
|
||||||
|
WIDGET=require("parts/widget")
|
||||||
|
LIGHT=require("parts/light")
|
||||||
|
|
||||||
require("parts/light")
|
|
||||||
require("parts/modes")
|
require("parts/modes")
|
||||||
require("default_data")
|
require("default_data")
|
||||||
require("parts/widget")
|
|
||||||
require("parts/ai")
|
require("parts/ai")
|
||||||
require("player")
|
require("player")
|
||||||
Widget=require("widgetList")
|
widgetList=require("widgetList")
|
||||||
require("callback")
|
require("callback")
|
||||||
|
|
||||||
--load files & settings
|
--load files & settings
|
||||||
@@ -74,6 +72,7 @@ else
|
|||||||
setting.VKSwitch=true
|
setting.VKSwitch=true
|
||||||
setting.swap=false
|
setting.swap=false
|
||||||
setting.vib=2
|
setting.vib=2
|
||||||
|
setting.powerInfo=true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
LANG.set(setting.lang)
|
LANG.set(setting.lang)
|
||||||
|
|||||||
@@ -53,6 +53,12 @@ return{
|
|||||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[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)
|
getRank=function(P)
|
||||||
local W=P.modeData.event
|
local W=P.modeData.event
|
||||||
return W>100 and 4 or W>=80 and 3 or W>=50 and 2 or W>=20 and 1 or W>=5 and 0
|
return
|
||||||
|
W>=100 and 5 or
|
||||||
|
W>=80 and 4 or
|
||||||
|
W>=60 and 3 or
|
||||||
|
W>=40 and 2 or
|
||||||
|
W>=20 and 1 or
|
||||||
|
W>=5 and 0
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
@@ -66,6 +66,12 @@ return{
|
|||||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[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)
|
getRank=function(P)
|
||||||
local W=P.modeData.event
|
local W=P.modeData.event
|
||||||
return W>40 and 4 or W>=30 and 3 or W>=20 and 2 or W>=10 and 1 or W>=5 and 0
|
return
|
||||||
|
W>=50 and 5 or
|
||||||
|
W>=40 and 4 or
|
||||||
|
W>=30 and 3 or
|
||||||
|
W>=20 and 2 or
|
||||||
|
W>=10 and 1 or
|
||||||
|
W>=5 and 0
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
@@ -51,9 +51,9 @@ return{
|
|||||||
res[A+2]=7
|
res[A+2]=7
|
||||||
end
|
end
|
||||||
|
|
||||||
--give O when no Δ=0/give T when no Δ=1
|
--give O when no d=0/give T when no d=1
|
||||||
d=0--Δ=0
|
d=0--d=0 count
|
||||||
A=0--Δ=1
|
A=0--d=1 count
|
||||||
for x=2,10 do
|
for x=2,10 do
|
||||||
local _=height[x]-height[x-1]
|
local _=height[x]-height[x-1]
|
||||||
if _==0 then
|
if _==0 then
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
return{
|
|
||||||
color=color.white,
|
|
||||||
env={
|
|
||||||
drop=60,lock=60,
|
|
||||||
freshLimit=15,
|
|
||||||
bg="none",bgm="way",
|
|
||||||
},
|
|
||||||
load=function()
|
|
||||||
newPlayer(1,20,15)
|
|
||||||
newPlayer(2,650,15)
|
|
||||||
end,
|
|
||||||
mesDisp=function(P,dx,dy)
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
return{
|
|
||||||
color=color.white,
|
|
||||||
env={
|
|
||||||
drop=60,lock=60,
|
|
||||||
freshLimit=15,
|
|
||||||
bg="none",bgm="way",
|
|
||||||
},
|
|
||||||
load=function()
|
|
||||||
newPlayer(1,20,100,.65)
|
|
||||||
newPlayer(2,435,100,.65)
|
|
||||||
newPlayer(3,850,100,.65)
|
|
||||||
end,
|
|
||||||
mesDisp=function(P,dx,dy)
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
return{
|
|
||||||
color=color.white,
|
|
||||||
env={
|
|
||||||
drop=60,lock=60,
|
|
||||||
freshLimit=15,
|
|
||||||
bg="none",bgm="way",
|
|
||||||
},
|
|
||||||
load=function()
|
|
||||||
newPlayer(1,25,160,.5)
|
|
||||||
newPlayer(2,335,160,.5)
|
|
||||||
newPlayer(3,645,160,.5)
|
|
||||||
newPlayer(4,955,160,.5)
|
|
||||||
end,
|
|
||||||
mesDisp=function(P,dx,dy)
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -42,8 +42,8 @@ return{
|
|||||||
if L>=200 then
|
if L>=200 then
|
||||||
local T=P.stat.time
|
local T=P.stat.time
|
||||||
return
|
return
|
||||||
T<=185 and 5 or
|
T<=226 and 5 or
|
||||||
T<=250 and 4 or
|
T<=262 and 4 or
|
||||||
3
|
3
|
||||||
else
|
else
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -5,53 +5,35 @@ local pc_lock={55,50,45,40,36,32,30}
|
|||||||
local pc_fall={18,16,14,12,10,9,8,7,6}
|
local pc_fall={18,16,14,12,10,9,8,7,6}
|
||||||
local PCbase=require("parts/PCbase")
|
local PCbase=require("parts/PCbase")
|
||||||
local PClist=require("parts/PClist")
|
local PClist=require("parts/PClist")
|
||||||
|
local PCtype={[0]=1,2,1,3,2,3}
|
||||||
|
|
||||||
local function task_PC(P)
|
local function task_PC(P)
|
||||||
local _
|
|
||||||
P.modeData.counter=P.modeData.counter+1
|
P.modeData.counter=P.modeData.counter+1
|
||||||
if P.modeData.counter==21 then
|
if P.modeData.counter==26 then
|
||||||
local t=P.stat.pc%2
|
local base=PCbase[P.modeData.type]
|
||||||
local S=P.gameEnv.skin
|
P:pushLine(base[rnd(#base)],P.modeData.symmetry)
|
||||||
for i=1,4 do
|
|
||||||
local r=freeRow.get(0)
|
|
||||||
for j=1,10 do
|
|
||||||
_=PCbase[4*t+i][j]
|
|
||||||
r[j]=S[_]or 0
|
|
||||||
end
|
|
||||||
ins(P.field,1,r)
|
|
||||||
ins(P.visTime,1,freeRow.get(20))
|
|
||||||
end
|
|
||||||
P.fieldBeneath=P.fieldBeneath+120
|
|
||||||
P.curY=P.curY+4
|
|
||||||
P:freshgho()
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function newPC(P)
|
local function newPC(P)
|
||||||
local r=P.field;r=r[#r]
|
local r=P.field
|
||||||
if r then
|
if r[1]then
|
||||||
|
r=r[#r]
|
||||||
local c=0
|
local c=0
|
||||||
for i=1,10 do if r[i]>0 then c=c+1 end end
|
for i=1,10 do if r[i]>0 then c=c+1 end end
|
||||||
if c<5 then
|
if c<5 then P:lose()end
|
||||||
P:lose()
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
if P.stat.piece%4==0 and #P.field==0 then
|
if #P.field==0 then
|
||||||
P.modeData.event=P.modeData.event==0 and 1 or 0
|
local type=PCtype[P.stat.pc]or rnd(2,3)
|
||||||
local r=rnd(#PClist)
|
local L=PClist[type][rnd(#PClist[1])]
|
||||||
local f=P.modeData.event==0
|
local symmetry=rnd()>.5
|
||||||
for i=1,4 do
|
P.modeData.type=type
|
||||||
local b=PClist[r][i]
|
P.modeData.symmetry=symmetry
|
||||||
if f then
|
P:pushNext(L,symmetry)
|
||||||
if b<3 then b=3-b
|
|
||||||
elseif b<5 then b=7-b
|
|
||||||
end
|
|
||||||
end
|
|
||||||
P:getNext(b)
|
|
||||||
end
|
|
||||||
P.modeData.counter=P.stat.piece==0 and 20 or 0
|
P.modeData.counter=P.stat.piece==0 and 20 or 0
|
||||||
TASK.new(task_PC,P)
|
TASK.new(task_PC,P)
|
||||||
local s=P.stat.pc*.5
|
|
||||||
|
local s=P.stat.pc*.25
|
||||||
if int(s)==s and s>0 then
|
if int(s)==s and s>0 then
|
||||||
P.gameEnv.drop=pc_drop[s]or 10
|
P.gameEnv.drop=pc_drop[s]or 10
|
||||||
P.gameEnv.lock=pc_lock[s]or 20
|
P.gameEnv.lock=pc_lock[s]or 20
|
||||||
@@ -94,11 +76,11 @@ return{
|
|||||||
getRank=function(P)
|
getRank=function(P)
|
||||||
local L=P.stat.pc
|
local L=P.stat.pc
|
||||||
return
|
return
|
||||||
L>=50 and 5 or
|
L>=100 and 5 or
|
||||||
L>=40 and 4 or
|
L>=70 and 4 or
|
||||||
L>=30 and 3 or
|
L>=40 and 3 or
|
||||||
L>=20 and 2 or
|
L>=20 and 2 or
|
||||||
L>=10 and 1 or
|
L>=10 and 1 or
|
||||||
L>=1 and 0
|
L>=2 and 0
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
@@ -1,50 +1,41 @@
|
|||||||
local rnd=math.random
|
local rnd=math.random
|
||||||
local ins=table.insert
|
|
||||||
local PCbase=require("parts/PCbase")
|
local PCbase=require("parts/PCbase")
|
||||||
local PClist=require("parts/PClist")
|
local PClist=require("parts/PClist")
|
||||||
|
local PCtype={
|
||||||
|
[0]=1,1,1,1,2,
|
||||||
|
1,1,1,1,3,
|
||||||
|
1,1,1,2,
|
||||||
|
1,1,1,3,
|
||||||
|
1,1,2,
|
||||||
|
1,1,3,
|
||||||
|
1,2,
|
||||||
|
1,3,
|
||||||
|
2,
|
||||||
|
3,
|
||||||
|
}
|
||||||
local function task_PC(P)
|
local function task_PC(P)
|
||||||
local _
|
|
||||||
P.modeData.counter=P.modeData.counter+1
|
P.modeData.counter=P.modeData.counter+1
|
||||||
if P.modeData.counter==21 then
|
if P.modeData.counter==26 then
|
||||||
local t=P.stat.pc%2
|
local base=PCbase[P.modeData.type]
|
||||||
local S=P.gameEnv.skin
|
P:pushLine(base[rnd(#base)],P.modeData.symmetry)
|
||||||
for i=1,4 do
|
|
||||||
local r=freeRow.get(0)
|
|
||||||
for j=1,10 do
|
|
||||||
_=PCbase[4*t+i][j]
|
|
||||||
r[j]=S[_]or 0
|
|
||||||
end
|
|
||||||
ins(P.field,1,r)
|
|
||||||
ins(P.visTime,1,freeRow.get(20))
|
|
||||||
end
|
|
||||||
P.fieldBeneath=P.fieldBeneath+120
|
|
||||||
P.curY=P.curY+4
|
|
||||||
P:freshgho()
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local function newPC(P)
|
local function newPC(P)
|
||||||
local r=P.field;r=r[#r]
|
local r=P.field
|
||||||
if r then
|
if r[1]then
|
||||||
|
r=r[#r]
|
||||||
local c=0
|
local c=0
|
||||||
for i=1,10 do if r[i]>0 then c=c+1 end end
|
for i=1,10 do if r[i]>0 then c=c+1 end end
|
||||||
if c<5 then
|
if c<5 then P:lose()end
|
||||||
P:lose()
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
if P.stat.piece%4==0 and #P.field==0 then
|
if #P.field==0 then
|
||||||
P.modeData.event=P.modeData.event==0 and 1 or 0
|
local type=PCtype[P.stat.pc]or rnd(2,3)
|
||||||
local r=rnd(#PClist)
|
local L=PClist[type][rnd(#PClist[1])]
|
||||||
local f=P.modeData.event==0
|
local symmetry=rnd()>.5
|
||||||
for i=1,4 do
|
P.modeData.type=type
|
||||||
local b=PClist[r][i]
|
P.modeData.symmetry=symmetry
|
||||||
if f then
|
P:pushNext(L,symmetry)
|
||||||
if b<3 then b=3-b
|
|
||||||
elseif b<5 then b=7-b
|
|
||||||
end
|
|
||||||
end
|
|
||||||
P:getNext(b)
|
|
||||||
end
|
|
||||||
P.modeData.counter=P.stat.piece==0 and 20 or 0
|
P.modeData.counter=P.stat.piece==0 and 20 or 0
|
||||||
TASK.new(task_PC,P)
|
TASK.new(task_PC,P)
|
||||||
end
|
end
|
||||||
@@ -54,7 +45,7 @@ return{
|
|||||||
env={
|
env={
|
||||||
next=4,
|
next=4,
|
||||||
hold=false,
|
hold=false,
|
||||||
drop=150,lock=150,
|
drop=120,lock=180,
|
||||||
fall=20,
|
fall=20,
|
||||||
sequence="none",
|
sequence="none",
|
||||||
dropPiece=newPC,
|
dropPiece=newPC,
|
||||||
@@ -77,11 +68,11 @@ return{
|
|||||||
getRank=function(P)
|
getRank=function(P)
|
||||||
local L=P.stat.pc
|
local L=P.stat.pc
|
||||||
return
|
return
|
||||||
L>=100 and 5 or
|
L>=260 and 5 or
|
||||||
L>=60 and 4 or
|
L>=126 and 4 or
|
||||||
L>=40 and 3 or
|
L>=62 and 3 or
|
||||||
L>=25 and 2 or
|
L>=26 and 2 or
|
||||||
L>=15 and 1 or
|
L>=12 and 1 or
|
||||||
L>=1 and 0
|
L>=2 and 0
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
@@ -21,7 +21,7 @@ return{
|
|||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
newPlayer(1,340,15)
|
||||||
newAIPlayer(2,965,360,.5,AITemplate("CC",10,1,true,5000))
|
newAIPlayer(2,965,360,.5,AITemplate("CC",10,1,true,5000))
|
||||||
garbageSpeed=1e99
|
game.garbageSpeed=1e99
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
end,
|
end,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ return{
|
|||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
newPlayer(1,340,15)
|
||||||
newAIPlayer(2,965,360,.5,AITemplate("CC",10,1,true,10000))
|
newAIPlayer(2,965,360,.5,AITemplate("CC",10,1,true,10000))
|
||||||
garbageSpeed=1e99
|
game.garbageSpeed=1e99
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
end,
|
end,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ return{
|
|||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
newPlayer(1,340,15)
|
||||||
newAIPlayer(2,965,360,.5,AITemplate("CC",10,2,true,12600))
|
newAIPlayer(2,965,360,.5,AITemplate("CC",10,2,true,12600))
|
||||||
garbageSpeed=1e99
|
game.garbageSpeed=1e99
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
end,
|
end,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ return{
|
|||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
newPlayer(1,340,15)
|
||||||
newAIPlayer(2,965,360,.5,AITemplate("CC",10,3,true,16260))
|
newAIPlayer(2,965,360,.5,AITemplate("CC",10,3,true,16260))
|
||||||
garbageSpeed=1e99
|
game.garbageSpeed=1e99
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
end,
|
end,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ return{
|
|||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
newPlayer(1,340,15)
|
||||||
newAIPlayer(2,965,360,.5,AITemplate("CC",10,3,true,26000))
|
newAIPlayer(2,965,360,.5,AITemplate("CC",10,3,true,26000))
|
||||||
garbageSpeed=1e99
|
game.garbageSpeed=1e99
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
end,
|
end,
|
||||||
|
|||||||
44
modes/sprintPenta.lua
Normal file
44
modes/sprintPenta.lua
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
local gc=love.graphics
|
||||||
|
local rnd=math.random
|
||||||
|
return{
|
||||||
|
color=color.green,
|
||||||
|
env={
|
||||||
|
drop=60,lock=60,
|
||||||
|
sequence="bag",bag={8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25},
|
||||||
|
target=40,dropPiece=player.reach_winCheck,
|
||||||
|
bg="strap",bgm="race",
|
||||||
|
},
|
||||||
|
load=function()
|
||||||
|
newPlayer(1,340,15)
|
||||||
|
end,
|
||||||
|
mesDisp=function(P)
|
||||||
|
local dx,dy=P.fieldOff.x,P.fieldOff.y
|
||||||
|
setFont(55)
|
||||||
|
local r=40-P.stat.row
|
||||||
|
if r<0 then r=0 end
|
||||||
|
mStr(r,-81,265)
|
||||||
|
if r<21 and r>0 then
|
||||||
|
gc.setLineWidth(4)
|
||||||
|
gc.setColor(1,r>10 and 0 or rnd(),.5)
|
||||||
|
gc.line(dx,600-30*r+dy,300+dx,600-30*r+dy)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
score=function(P)return{P.stat.time,P.stat.piece}end,
|
||||||
|
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"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 T=P.stat.row
|
||||||
|
if T<5 then
|
||||||
|
return
|
||||||
|
elseif T<40 then
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
T=P.stat.time
|
||||||
|
return
|
||||||
|
T<=76 and 5 or
|
||||||
|
T<=90 and 4 or
|
||||||
|
T<=150 and 3 or
|
||||||
|
T<=260 and 2 or
|
||||||
|
1
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -29,11 +29,11 @@ return{
|
|||||||
if P.stat.row<400 then return end
|
if P.stat.row<400 then return end
|
||||||
local T=P.stat.time
|
local T=P.stat.time
|
||||||
return
|
return
|
||||||
T<=62,255 and 5 or
|
T<=255 and 5 or
|
||||||
T<=90,326 and 4 or
|
T<=326 and 4 or
|
||||||
T<=130,462 and 3 or
|
T<=462 and 3 or
|
||||||
T<=200,626 and 2 or
|
T<=626 and 2 or
|
||||||
T<=360,1260 and 1 or
|
T<=1260 and 1 or
|
||||||
0
|
0
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
local format=string.format
|
local format=string.format
|
||||||
local function tech_check_ultimate(P)
|
local function tech_check_hard(P)
|
||||||
if #P.clearedRow>0 and P.lastClear<10 or P.lastClear==74 then
|
if #P.clearedRow>0 and P.lastClear<10 or P.lastClear==74 then
|
||||||
P:lose()
|
P:lose()
|
||||||
end
|
end
|
||||||
@@ -11,7 +11,7 @@ return{
|
|||||||
drop=30,lock=60,
|
drop=30,lock=60,
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
target=200,
|
target=200,
|
||||||
dropPiece=tech_check_ultimate,
|
dropPiece=tech_check_hard,
|
||||||
bg="matrix",bgm="secret8th",
|
bg="matrix",bgm="secret8th",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
local format=string.format
|
local format=string.format
|
||||||
local function tech_check_ultimate(P)
|
local function tech_check_hard(P)
|
||||||
if #P.clearedRow>0 and P.lastClear<10 or P.lastClear==74 then
|
if #P.clearedRow>0 and P.lastClear<10 or P.lastClear==74 then
|
||||||
P:lose()
|
P:lose()
|
||||||
end
|
end
|
||||||
@@ -11,7 +11,7 @@ return{
|
|||||||
_20G=true,lock=60,
|
_20G=true,lock=60,
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
target=200,
|
target=200,
|
||||||
dropPiece=tech_check_ultimate,
|
dropPiece=tech_check_hard,
|
||||||
bg="matrix",bgm="secret7th",
|
bg="matrix",bgm="secret7th",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
local format=string.format
|
local format=string.format
|
||||||
local function tech_check_hard(P)
|
local function tech_check_easy(P)
|
||||||
if #P.clearedRow>0 and P.lastClear<10 then
|
if #P.clearedRow>0 and P.b2b<40 then
|
||||||
P:lose()
|
P:lose()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -11,7 +11,7 @@ return{
|
|||||||
_20G=true,lock=60,
|
_20G=true,lock=60,
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
target=200,
|
target=200,
|
||||||
dropPiece=tech_check_hard,
|
dropPiece=tech_check_easy,
|
||||||
bg="matrix",bgm="secret7th",
|
bg="matrix",bgm="secret7th",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
local format=string.format
|
local format=string.format
|
||||||
local function tech_check_ultimate(P)
|
local function tech_check_hard(P)
|
||||||
if #P.clearedRow>0 and P.lastClear<10 or P.lastClear==74 then
|
if #P.clearedRow>0 and P.lastClear<10 or P.lastClear==74 then
|
||||||
P:lose()
|
P:lose()
|
||||||
end
|
end
|
||||||
@@ -11,7 +11,7 @@ return{
|
|||||||
oncehold=false,
|
oncehold=false,
|
||||||
drop=1e99,lock=1e99,
|
drop=1e99,lock=1e99,
|
||||||
target=200,
|
target=200,
|
||||||
dropPiece=tech_check_ultimate,
|
dropPiece=tech_check_hard,
|
||||||
bg="matrix",bgm="newera",
|
bg="matrix",bgm="newera",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
local format=string.format
|
local format=string.format
|
||||||
local function tech_check_ultimate(P)
|
local function tech_check_hard(P)
|
||||||
if #P.clearedRow>0 and P.lastClear<10 or P.lastClear==74 then
|
if #P.clearedRow>0 and P.lastClear<10 or P.lastClear==74 then
|
||||||
P:lose()
|
P:lose()
|
||||||
end
|
end
|
||||||
@@ -13,7 +13,7 @@ return{
|
|||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
target=200,
|
target=200,
|
||||||
fineKill=true,
|
fineKill=true,
|
||||||
dropPiece=tech_check_ultimate,
|
dropPiece=tech_check_hard,
|
||||||
bg="flink",bgm="infinite",
|
bg="flink",bgm="infinite",
|
||||||
},
|
},
|
||||||
slowMark=true,
|
slowMark=true,
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
local format=string.format
|
local format=string.format
|
||||||
local function tech_check_hard(P)
|
|
||||||
if #P.clearedRow>0 and P.lastClear<10 then
|
|
||||||
P:lose()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return{
|
return{
|
||||||
color=color.lightYellow,
|
color=color.lightYellow,
|
||||||
@@ -13,7 +8,6 @@ return{
|
|||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
target=200,
|
target=200,
|
||||||
fineKill=true,
|
fineKill=true,
|
||||||
dropPiece=tech_check_hard,
|
|
||||||
bg="flink",bgm="infinite",
|
bg="flink",bgm="infinite",
|
||||||
},
|
},
|
||||||
slowMark=true,
|
slowMark=true,
|
||||||
|
|||||||
46
paint.lua
46
paint.lua
@@ -17,7 +17,7 @@ local modeRankColor={
|
|||||||
color.purple, --Special
|
color.purple, --Special
|
||||||
}
|
}
|
||||||
local rankString={
|
local rankString={
|
||||||
"C","B","A","S","SS",
|
"D","C","B","A","S",
|
||||||
}
|
}
|
||||||
local miniTitle_rect={
|
local miniTitle_rect={
|
||||||
{2,0,5,1},{4,1,1,6},
|
{2,0,5,1},{4,1,1,6},
|
||||||
@@ -278,8 +278,8 @@ function Pnt.music()
|
|||||||
gc.draw(drawableText.musicRoom,22,23)
|
gc.draw(drawableText.musicRoom,22,23)
|
||||||
gc.draw(drawableText.nowPlaying,490,390)
|
gc.draw(drawableText.nowPlaying,490,390)
|
||||||
setFont(30)
|
setFont(30)
|
||||||
for i=1,#musicID do
|
for i=1,BGM.len do
|
||||||
gc.print(musicID[i],50,90+30*i)
|
gc.print(BGM.list[i],50,90+30*i)
|
||||||
end
|
end
|
||||||
gc.draw(IMG.titleImage,640,310,nil,1.5,nil,206,35)
|
gc.draw(IMG.titleImage,640,310,nil,1.5,nil,206,35)
|
||||||
if BGM.nowPlay then
|
if BGM.nowPlay then
|
||||||
@@ -431,10 +431,10 @@ local dataPos={90,143,-90,143,-200,-13,-90,-169,90,-169,200,-13}
|
|||||||
function Pnt.pause()
|
function Pnt.pause()
|
||||||
local S=sceneTemp
|
local S=sceneTemp
|
||||||
local T=S.timer*.02
|
local T=S.timer*.02
|
||||||
if T<1 or gameResult then Pnt.play()end
|
if T<1 or game.result then Pnt.play()end
|
||||||
--Dark BG
|
--Dark BG
|
||||||
local _=T
|
local _=T
|
||||||
if gameResult then _=_*.7 end
|
if game.result then _=_*.7 end
|
||||||
gc.setColor(.15,.15,.15,_)
|
gc.setColor(.15,.15,.15,_)
|
||||||
gc.push("transform")
|
gc.push("transform")
|
||||||
gc.origin()
|
gc.origin()
|
||||||
@@ -443,9 +443,9 @@ function Pnt.pause()
|
|||||||
|
|
||||||
--Pause Info
|
--Pause Info
|
||||||
setFont(25)
|
setFont(25)
|
||||||
if pauseCount>0 then
|
if game.pauseCount>0 then
|
||||||
gc.setColor(1,.4,.4,T)
|
gc.setColor(1,.4,.4,T)
|
||||||
gc.print(text.pauseCount..":["..pauseCount.."] "..format("%.2f",pauseTime).."s",70,100)
|
gc.print(text.pauseCount..":["..game.pauseCount.."] "..format("%.2f",game.pauseTime).."s",70,100)
|
||||||
end
|
end
|
||||||
|
|
||||||
gc.setColor(1,1,1,T)
|
gc.setColor(1,1,1,T)
|
||||||
@@ -457,7 +457,7 @@ function Pnt.pause()
|
|||||||
|
|
||||||
--Result Text
|
--Result Text
|
||||||
setFont(35)
|
setFont(35)
|
||||||
mText(gameResult and drawableText[gameResult]or drawableText.pause,640,50-10*(5-sceneTemp.timer*.1)^1.5)
|
mText(game.result and drawableText[game.result]or drawableText.pause,640,50-10*(5-sceneTemp.timer*.1)^1.5)
|
||||||
|
|
||||||
--Infos
|
--Infos
|
||||||
if frame>180 then
|
if frame>180 then
|
||||||
@@ -515,9 +515,9 @@ function Pnt.setting_game()
|
|||||||
mText(drawableText.setting_game,640,15)
|
mText(drawableText.setting_game,640,15)
|
||||||
gc.draw(blockSkin[int(Timer()*2)%11+1],720,540,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
|
end
|
||||||
function Pnt.setting_graphic()
|
function Pnt.setting_video()
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
mText(drawableText.setting_graphic,640,15)
|
mText(drawableText.setting_video,640,15)
|
||||||
end
|
end
|
||||||
function Pnt.setting_sound()
|
function Pnt.setting_sound()
|
||||||
gc.setColor(1,1,1,.8)
|
gc.setColor(1,1,1,.8)
|
||||||
@@ -598,16 +598,16 @@ function Pnt.setting_key()
|
|||||||
|
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
setFont(26)
|
setFont(26)
|
||||||
local board=s.board
|
local b1,b2=keyMap[s.board],keyMap[s.board+2]
|
||||||
for N=1,20 do
|
for N=1,20 do
|
||||||
if N<11 then
|
if N<11 then
|
||||||
gc.printf(text.acts[N],47,45*N+22,180,"right")
|
gc.printf(text.acts[N],47,45*N+22,180,"right")
|
||||||
mStr(keyMap[board][N],340,45*N+22)
|
mStr(b1[N],340,45*N+22)
|
||||||
mStr(keyMap[board+8][N],540,45*N+22)
|
mStr(b2[N],540,45*N+22)
|
||||||
else
|
else
|
||||||
gc.printf(text.acts[N],647,45*N-428,180,"right")
|
gc.printf(text.acts[N],647,45*N-428,180,"right")
|
||||||
mStr(keyMap[board][N],940,45*N-428)
|
mStr(b1[N],940,45*N-428)
|
||||||
mStr(keyMap[board+8][N],1040,45*N-428)
|
mStr(b2[N],1040,45*N-428)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
gc.setLineWidth(2)
|
gc.setLineWidth(2)
|
||||||
@@ -618,9 +618,7 @@ function Pnt.setting_key()
|
|||||||
gc.line(40,y,1240,y)
|
gc.line(40,y,1240,y)
|
||||||
end
|
end
|
||||||
setFont(35)
|
setFont(35)
|
||||||
gc.print("Player:",170,590)
|
gc.print(text.page..s.board,280,590)
|
||||||
gc.print(int(board*.5+.5),300,590)
|
|
||||||
gc.print(board.."/8",580,590)
|
|
||||||
gc.draw(drawableText.ctrlSetHelp,50,650)
|
gc.draw(drawableText.ctrlSetHelp,50,650)
|
||||||
end
|
end
|
||||||
function Pnt.setting_skin()
|
function Pnt.setting_skin()
|
||||||
@@ -673,7 +671,7 @@ function Pnt.help()
|
|||||||
end
|
end
|
||||||
setFont(19)
|
setFont(19)
|
||||||
gc.print(text.used,30,330)
|
gc.print(text.used,30,330)
|
||||||
gc.draw(IMG.titleImage,280,610,.1,1+.05*sin(Timer()*2),nil,206,35)
|
gc.draw(IMG.titleImage,280,610,.1,1+.05*sin(Timer()*2.6),nil,206,35)
|
||||||
gc.setLineWidth(3)
|
gc.setLineWidth(3)
|
||||||
gc.rectangle("line",18,18,263,263)
|
gc.rectangle("line",18,18,263,263)
|
||||||
gc.rectangle("line",1012,18,250,250)
|
gc.rectangle("line",1012,18,250,250)
|
||||||
@@ -681,10 +679,10 @@ function Pnt.help()
|
|||||||
gc.draw(IMG.pay2,1014,20)
|
gc.draw(IMG.pay2,1014,20)
|
||||||
setFont(20)
|
setFont(20)
|
||||||
mStr(text.group,640,490)
|
mStr(text.group,640,490)
|
||||||
gc.setColor(1,1,1,sin(Timer()*10)*.4+.6)
|
gc.setColor(1,1,1,sin(Timer()*20)*.3+.6)
|
||||||
setFont(30)
|
setFont(30)
|
||||||
gc.print(text.support,150,283+20,sin(Timer()*2.6)*.02,nil,nil,115,20)
|
mStr(text.support,150+sin(Timer()*4)*20,283)
|
||||||
gc.print(text.support,1138,270+20,sin(Timer()*2.83)*.02,nil,nil,115,20)
|
mStr(text.support,1138-sin(Timer()*4)*20,270)
|
||||||
end
|
end
|
||||||
function Pnt.stat()
|
function Pnt.stat()
|
||||||
local chart=sceneTemp.chart
|
local chart=sceneTemp.chart
|
||||||
@@ -737,8 +735,6 @@ function Pnt.history()
|
|||||||
gc.rectangle("line",30,45,1000,632)
|
gc.rectangle("line",30,45,1000,632)
|
||||||
setFont(20)
|
setFont(20)
|
||||||
local _=sceneTemp
|
local _=sceneTemp
|
||||||
for i=0,min(22,#_[1]-_[2])do
|
gc.print(_[1][_[2]],40,50)
|
||||||
gc.print(_[1][_[2]+i],40,50+27*(i))
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
return Pnt
|
return Pnt
|
||||||
@@ -1,10 +1,68 @@
|
|||||||
return{
|
return{
|
||||||
{3,3,3,0,0,0,0,0,2,2},
|
{
|
||||||
{3,6,6,0,0,0,0,2,2,5},
|
{
|
||||||
{4,6,6,0,0,0,1,1,5,5},
|
{4,4,4,3,3,3,7,0,0,0},
|
||||||
{4,4,4,0,0,0,0,1,1,5},
|
{4,1,6,6,2,3,7,0,0,0},
|
||||||
{1,1,0,0,0,0,0,4,4,4},
|
{1,1,6,6,2,2,7,0,0,0},
|
||||||
{5,1,1,0,0,0,0,6,6,4},
|
{1,7,7,7,7,2,7,0,0,0},
|
||||||
{5,5,2,2,0,0,0,6,6,3},
|
},
|
||||||
{5,2,2,0,0,0,0,3,3,3},
|
{
|
||||||
|
{4,4,4,3,3,3,0,0,0,7},
|
||||||
|
{4,1,6,6,2,3,0,0,0,7},
|
||||||
|
{1,1,6,6,2,2,0,0,0,7},
|
||||||
|
{1,7,7,7,7,2,0,0,0,7},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{2,7,7,7,7,1,7,0,0,0},
|
||||||
|
{2,2,6,6,1,1,7,0,0,0},
|
||||||
|
{3,2,6,6,1,4,7,0,0,0},
|
||||||
|
{3,3,3,4,4,4,7,0,0,0},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{2,7,7,7,7,1,0,0,0,7},
|
||||||
|
{2,2,6,6,1,1,0,0,0,7},
|
||||||
|
{3,2,6,6,1,4,0,0,0,7},
|
||||||
|
{3,3,3,4,4,4,0,0,0,7},
|
||||||
|
},
|
||||||
|
},--3*4 shape
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{1,1,0,0,0,0,0,3,3,3},
|
||||||
|
{5,1,1,0,0,0,0,6,6,3},
|
||||||
|
{5,5,2,2,0,0,0,6,6,4},
|
||||||
|
{5,2,2,0,0,0,0,4,4,4},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{1,1,0,0,0,0,0,4,4,4},
|
||||||
|
{5,1,1,0,0,0,0,4,6,6},
|
||||||
|
{5,5,2,2,0,0,0,3,6,6},
|
||||||
|
{5,2,2,0,0,0,0,3,3,3},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{3,3,3,1,1,0,0,0,0,0},
|
||||||
|
{6,6,3,5,1,1,0,0,0,0},
|
||||||
|
{6,6,4,5,5,2,2,0,0,0},
|
||||||
|
{4,4,4,5,2,2,0,0,0,0},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{4,4,4,1,1,0,0,0,0,0},
|
||||||
|
{4,6,6,5,1,1,0,0,0,0},
|
||||||
|
{3,6,6,5,5,2,2,0,0,0},
|
||||||
|
{3,3,3,5,2,2,0,0,0,0},
|
||||||
|
},
|
||||||
|
},--7 piece opener(right>)(without i)
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{4,4,4,3,3,3,0,0,0,0},
|
||||||
|
{4,1,6,6,2,3,0,0,0,0},
|
||||||
|
{1,1,6,6,2,2,0,0,0,0},
|
||||||
|
{1,7,7,7,7,2,0,0,0,0},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{2,7,7,7,7,1,0,0,0,0},
|
||||||
|
{2,2,6,6,1,1,0,0,0,0},
|
||||||
|
{3,2,6,6,1,4,0,0,0,0},
|
||||||
|
{3,3,3,4,4,4,0,0,0,0},
|
||||||
|
},
|
||||||
|
},--6 piece opener
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,77 @@
|
|||||||
return{
|
return{
|
||||||
{7,7,4,5},{7,7,6,4},{7,7,2,4},{7,7,1,3},{7,7,5,6},{7,7,5,2},{7,7,5,4},{7,7,5,3},
|
{
|
||||||
{7,4,1,2},{7,3,5,7},{7,5,4,3},{7,5,1,2},{7,1,4,2},{7,4,2,5},{7,6,4,5},{7,5,4,2},
|
{1,3,3},{1,3,4},{1,5,3},{3,1,3},{3,1,4},{3,2,4},{3,3,2},{3,3,5},{3,3,6},{3,3,7},
|
||||||
{7,5,6,4},{7,5,3,6},{7,2,5,6},{7,2,6,4},{7,2,1,3},{7,5,2,7},{7,5,7,2},{7,5,2,3},
|
{3,4,1},{3,4,5},{3,4,6},{3,5,3},{3,5,4},{3,5,5},{3,6,3},{3,6,4},{3,7,3},{3,7,4},
|
||||||
{7,5,3,2},{7,6,5,4},{7,3,1,5},{7,3,2,5},{7,4,1,5},{7,4,5,2},{7,7,3,6},{7,3,7,6},
|
{5,3,4},{5,3,5},{5,5,1},{5,5,3},{5,7,3},{6,3,3},{6,3,4},{6,6,7},{6,7,6},{7,3,3},
|
||||||
{7,3,6,2},{7,3,7,1},{7,6,4,2},{3,2,7,6},{3,2,6,7},{7,7,4,5},{7,5,3,4},{7,3,6,5},
|
{7,3,4},{7,5,3},{7,6,6},{7,7,7},
|
||||||
{7,3,2,5},{7,4,6,5},{7,5,2,3},{7,3,5,7},{7,3,2,5},{7,3,5,1},{7,5,2,3},{3,6,2,5},
|
},--3*4 shape
|
||||||
{3,1,2,5},{3,1,1,5},{3,1,5,2},{3,1,5,1},{3,5,1,2},{4,5,3,2},{4,2,6,5},{6,5,3,2},
|
{
|
||||||
{1,4,2,5},{1,5,3,6},{5,2,6,3},{5,2,1,3},{5,2,7,4},{2,4,1,5},{2,4,5,1},{2,1,4,5},
|
{5,3,4,4},{5,3,7,7},{5,7,4,4},{4,2,4,4},{3,5,4,4},{3,4,5,4},{3,3,7,4},{7,5,4,4},{1,5,1,1},{1,5,5,5},
|
||||||
{2,5,4,3},{2,5,6,7},{7,5,4,2},{4,5,3,5},
|
{1,5,7,4},{1,2,4,5},{1,4,5,5},{1,4,5,2},{1,4,2,5},{1,4,4,4},{5,1,4,5},{5,5,4,1},{5,5,4,2},{5,5,4,4},
|
||||||
|
{5,4,5,4},{5,4,4,5},{5,4,4,3},{5,7,4,6},{5,7,4,3},{2,5,4,4},{6,4,4,4},{6,7,4,6},{4,1,2,5},{4,1,4,4},
|
||||||
|
{4,5,4,5},{4,5,7,7},{4,6,4,4},{4,4,6,4},{4,4,3,5},{4,4,3,6},{4,3,4,5},{4,3,4,6},{4,7,3,4},{4,7,7,5},
|
||||||
|
{3,1,4,4},{3,1,4,3},{3,1,3,4},{3,5,5,4},{3,5,4,5},{3,5,7,7},{3,2,5,2},{3,2,4,4},{3,6,4,4},{3,6,3,3},
|
||||||
|
{3,4,1,3},{3,4,4,5},{3,4,4,6},{3,4,3,7},{3,3,6,3},{3,7,5,7},{3,7,4,3},{3,7,3,4},{7,5,4,6},{7,5,4,3},
|
||||||
|
{7,5,3,4},{7,5,7,1},{7,6,4,6},{7,4,1,5},{7,4,5,6},{7,4,3,4},{7,4,7,5},{7,3,1,5},{7,3,5,7},{7,3,4,4},
|
||||||
|
{7,3,3,4},{7,3,7,5},{7,7,4,5},{7,7,7,4},{1,1,5,2},{1,1,7,4},{1,5,1,2},{1,5,1,3},{1,5,5,2},{1,5,2,1},
|
||||||
|
{1,5,2,3},{1,5,6,3},{1,5,6,7},{1,5,4,1},{1,5,4,5},{1,5,4,2},{1,5,4,3},{1,5,4,7},{1,5,3,1},{1,5,3,4},
|
||||||
|
{1,5,7,2},{1,5,7,6},{1,5,7,7},{1,2,5,1},{1,2,5,4},{1,2,7,4},{1,4,1,5},{1,4,5,1},{1,4,5,4},{1,4,6,5},
|
||||||
|
{1,4,4,3},{1,4,3,3},{1,3,1,2},{1,3,5,2},{1,3,4,4},{1,3,4,3},{1,3,3,4},{1,7,1,4},{1,7,5,6},{1,7,5,4},
|
||||||
|
{1,7,5,3},{1,7,5,7},{1,7,2,3},{1,7,6,4},{1,7,4,1},{1,7,4,5},{1,7,4,7},{1,7,3,1},{1,7,7,4},{5,1,5,5},
|
||||||
|
{5,1,5,2},{5,1,5,4},{5,1,2,3},{5,1,6,3},{5,1,4,1},{5,1,4,2},{5,1,4,7},{5,1,7,2},{5,1,7,4},{5,5,1,5},
|
||||||
|
{5,5,1,2},{5,5,1,4},{5,5,5,1},{5,5,5,2},{5,5,5,4},{5,5,5,7},{5,5,2,1},{5,5,2,5},{5,5,6,7},{5,5,4,5},
|
||||||
|
{5,5,4,3},{5,5,3,1},{5,5,3,4},{5,5,7,5},{5,5,7,6},{5,2,1,3},{5,2,5,4},{5,2,4,5},{5,2,3,1},{5,2,3,6},
|
||||||
|
{5,2,7,1},{5,6,1,3},{5,6,5,7},{5,6,6,1},{5,4,1,5},{5,4,1,7},{5,4,5,1},{5,4,5,5},{5,4,5,2},{5,4,5,3},
|
||||||
|
{5,4,2,5},{5,4,4,1},{5,4,4,4},{5,4,3,1},{5,4,3,5},{5,4,3,4},{5,4,7,1},{5,3,5,4},{5,3,5,3},{5,3,2,2},
|
||||||
|
{5,3,6,6},{5,3,4,1},{5,3,4,5},{5,3,4,3},{5,3,3,1},{5,3,3,4},{5,3,3,3},{5,7,1,2},{5,7,1,4},{5,7,1,3},
|
||||||
|
{5,7,5,5},{5,7,5,7},{5,7,2,1},{5,7,6,4},{5,7,6,7},{5,7,4,1},{5,7,4,2},{5,7,4,7},{5,7,3,1},{5,7,3,2},
|
||||||
|
{5,7,3,6},{5,7,3,4},{5,7,3,7},{5,7,7,1},{5,7,7,6},{5,7,7,4},{5,7,7,3},{2,1,5,1},{2,1,4,5},{2,1,7,4},
|
||||||
|
{2,5,1,1},{2,5,4,5},{2,5,3,6},{2,4,1,5},{2,4,4,4},{2,4,4,3},{2,3,5,6},{2,7,1,4},{2,7,5,5},{2,7,4,1},
|
||||||
|
{2,7,3,7},{2,7,7,3},{6,5,6,1},{6,5,3,1},{6,6,5,1},{6,6,4,5},{6,6,7,4},{6,4,6,5},{6,4,7,5},{6,3,4,3},
|
||||||
|
{6,3,3,4},{6,7,6,4},{6,7,4,1},{6,7,4,5},{6,7,4,7},{6,7,7,4},{4,1,1,5},{4,1,5,1},{4,1,5,5},{4,1,5,2},
|
||||||
|
{4,1,5,7},{4,1,6,5},{4,1,4,3},{4,1,3,4},{4,1,3,3},{4,1,7,5},{4,5,5,4},{4,5,4,1},{4,5,4,4},{4,5,4,3},
|
||||||
|
{4,5,3,1},{4,5,3,5},{4,2,1,5},{4,2,4,3},{4,2,3,4},{4,6,6,5},{4,6,4,3},{4,6,3,4},{4,4,1,4},{4,4,1,3},
|
||||||
|
{4,4,5,1},{4,4,5,4},{4,4,5,3},{4,4,2,4},{4,4,4,1},{4,4,4,5},{4,4,4,6},{4,4,7,4},{4,4,7,3},{4,3,6,4},
|
||||||
|
{4,3,4,7},{4,3,3,5},{4,3,7,4},{4,7,1,5},{4,7,5,6},{4,7,5,7},{4,7,2,1},{4,7,2,5},{4,7,6,5},{4,7,4,4},
|
||||||
|
{4,7,4,3},{3,1,1,2},{3,1,5,1},{3,1,5,2},{3,1,2,1},{3,1,6,5},{3,1,6,7},{3,1,7,6},{3,5,1,2},{3,5,5,1},
|
||||||
|
{3,5,5,6},{3,5,5,3},{3,5,2,1},{3,5,2,2},{3,5,6,5},{3,5,6,6},{3,5,4,1},{3,5,4,3},{3,5,3,1},{3,5,3,5},
|
||||||
|
{3,5,3,4},{3,5,3,3},{3,2,1,5},{3,2,5,1},{3,2,2,5},{3,6,1,5},{3,6,1,7},{3,6,5,5},{3,6,5,6},{3,6,6,5},
|
||||||
|
{3,6,4,3},{3,6,3,4},{3,4,5,3},{3,4,2,4},{3,4,6,4},{3,4,6,3},{3,4,3,1},{3,4,3,5},{3,4,3,2},{3,4,3,6},
|
||||||
|
{3,4,7,3},{3,3,1,4},{3,3,5,1},{3,3,5,4},{3,3,5,3},{3,3,6,4},{3,3,4,1},{3,3,4,5},{3,3,4,2},{3,3,4,6},
|
||||||
|
{3,3,4,7},{3,3,3,1},{3,3,3,5},{3,3,3,6},{3,7,1,5},{3,7,5,1},{3,7,5,2},{3,7,2,5},{3,7,6,5},{3,7,7,5},
|
||||||
|
{7,1,1,4},{7,1,5,6},{7,1,5,4},{7,1,5,3},{7,1,5,7},{7,1,2,3},{7,1,6,4},{7,1,4,1},{7,1,4,5},{7,1,4,7},
|
||||||
|
{7,1,3,1},{7,1,7,4},{7,5,1,2},{7,5,1,6},{7,5,1,4},{7,5,1,3},{7,5,1,7},{7,5,5,5},{7,5,5,7},{7,5,2,1},
|
||||||
|
{7,5,6,4},{7,5,6,7},{7,5,4,1},{7,5,4,2},{7,5,4,7},{7,5,3,1},{7,5,3,2},{7,5,3,6},{7,5,3,7},{7,5,7,6},
|
||||||
|
{7,5,7,4},{7,5,7,3},{7,2,1,4},{7,2,1,3},{7,2,5,5},{7,2,4,1},{7,2,3,7},{7,2,7,3},{7,6,1,4},{7,6,5,4},
|
||||||
|
{7,6,6,4},{7,6,4,1},{7,6,4,5},{7,6,4,7},{7,6,7,4},{7,4,5,1},{7,4,5,2},{7,4,5,7},{7,4,2,1},{7,4,2,5},
|
||||||
|
{7,4,6,5},{7,4,4,4},{7,4,4,3},{7,3,5,1},{7,3,5,2},{7,3,5,6},{7,3,5,4},{7,3,2,5},{7,3,2,7},{7,3,6,1},
|
||||||
|
{7,3,6,5},{7,3,4,3},{7,3,7,2},{7,3,7,6},{7,7,1,4},{7,7,5,1},{7,7,5,6},{7,7,5,4},{7,7,5,3},{7,7,2,3},
|
||||||
|
{7,7,6,4},{7,7,6,3},{7,7,4,7},{7,7,3,6},
|
||||||
|
},--7 piece opener (right>)
|
||||||
|
{
|
||||||
|
{1,1,3,4},{1,1,4,3},{1,2,5,3},{1,2,5,4},{1,3,4,7},{1,3,5,5},{1,3,7,3},{1,3,7,4},{1,4,1,4},{1,4,4,6},
|
||||||
|
{1,5,2,3},{1,5,3,2},{1,5,3,5},{1,5,4,7},{1,5,5,2},{1,5,5,4},{1,5,5,5},{1,5,7,3},{1,5,7,4},{1,6,3,3},
|
||||||
|
{1,6,5,3},{1,7,3,3},{1,7,3,4},{1,7,5,3},{1,7,5,4},{3,1,3,7},{3,1,4,7},{3,1,5,5},{3,1,6,3},{3,1,7,3},
|
||||||
|
{3,1,7,4},{3,2,2,3},{3,2,3,2},{3,2,3,6},{3,2,4,5},{3,2,4,7},{3,2,5,5},{3,2,6,3},{3,2,6,4},{3,2,7,4},
|
||||||
|
{3,3,1,5},{3,3,2,6},{3,3,2,7},{3,3,3,3},{3,3,3,4},{3,3,4,3},{3,3,4,4},{3,3,5,3},{3,3,5,4},{3,3,6,1},
|
||||||
|
{3,3,6,6},{3,3,6,7},{3,3,7,2},{3,3,7,5},{3,3,7,6},{3,3,7,7},{3,4,1,2},{3,4,1,5},{3,4,1,7},{3,4,2,1},
|
||||||
|
{3,4,2,5},{3,4,2,7},{3,4,3,3},{3,4,3,4},{3,4,4,3},{3,4,4,4},{3,4,5,3},{3,4,5,4},{3,4,5,7},{3,4,6,1},
|
||||||
|
{3,4,6,2},{3,4,6,7},{3,4,7,1},{3,4,7,2},{3,4,7,5},{3,4,7,6},{3,5,1,2},{3,5,2,3},{3,5,2,5},{3,5,3,2},
|
||||||
|
{3,5,3,3},{3,5,3,4},{3,5,4,3},{3,5,4,6},{3,5,4,7},{3,5,5,5},{3,5,5,7},{3,5,6,4},{3,5,7,3},{3,5,7,4},
|
||||||
|
{3,5,7,5},{3,6,1,3},{3,6,2,3},{3,6,2,4},{3,6,3,1},{3,6,3,5},{3,6,3,6},{3,6,3,7},{3,6,4,2},{3,6,4,7},
|
||||||
|
{3,6,5,4},{3,6,6,3},{3,6,6,4},{3,6,7,3},{3,6,7,4},{3,7,1,3},{3,7,1,4},{3,7,2,4},{3,7,3,2},{3,7,3,5},
|
||||||
|
{3,7,3,6},{3,7,3,7},{3,7,4,1},{3,7,4,2},{3,7,4,5},{3,7,4,6},{3,7,5,3},{3,7,5,4},{3,7,5,5},{3,7,6,3},
|
||||||
|
{3,7,6,4},{3,7,7,3},{3,7,7,4},{5,1,2,3},{5,1,3,2},{5,1,3,4},{5,1,4,1},{5,1,4,7},{5,1,5,4},{5,1,5,5},
|
||||||
|
{5,1,7,4},{5,3,1,2},{5,3,1,4},{5,3,2,5},{5,3,3,3},{5,3,3,4},{5,3,3,6},{5,3,4,3},{5,3,5,2},{5,3,5,4},
|
||||||
|
{5,3,5,5},{5,3,5,7},{5,3,7,4},{5,3,7,5},{5,5,1,2},{5,5,1,4},{5,5,3,2},{5,5,3,3},{5,5,3,4},{5,5,3,5},
|
||||||
|
{5,5,3,7},{5,5,5,1},{5,5,5,5},{5,5,6,3},{5,5,6,7},{5,5,7,1},{5,5,7,3},{5,5,7,6},{5,6,3,5},{5,6,3,6},
|
||||||
|
{5,6,3,7},{5,6,5,3},{5,6,6,3},{5,6,7,3},{5,7,1,4},{5,7,3,4},{5,7,3,5},{5,7,5,1},{5,7,5,3},{5,7,5,6},
|
||||||
|
{5,7,6,3},{5,7,7,3},{6,1,3,3},{6,3,3,5},{6,3,3,6},{6,3,3,7},{6,3,4,7},{6,3,6,3},{6,3,6,4},{6,3,7,3},
|
||||||
|
{6,3,7,4},{6,5,3,5},{6,5,3,6},{6,5,3,7},{6,5,6,3},{6,5,7,3},{6,6,3,3},{6,6,3,4},{6,6,5,3},{6,6,6,6},
|
||||||
|
{6,6,7,7},{6,7,3,3},{6,7,3,4},{6,7,5,3},{6,7,6,7},{6,7,7,6},{7,1,3,3},{7,1,3,4},{7,1,5,3},{7,1,5,4},
|
||||||
|
{7,3,1,3},{7,3,1,4},{7,3,2,4},{7,3,3,2},{7,3,3,5},{7,3,3,6},{7,3,3,7},{7,3,4,1},{7,3,4,2},{7,3,4,5},
|
||||||
|
{7,3,4,6},{7,3,5,3},{7,3,5,4},{7,3,5,5},{7,3,6,3},{7,3,6,4},{7,3,7,3},{7,3,7,4},{7,5,1,4},{7,5,3,4},
|
||||||
|
{7,5,3,5},{7,5,5,1},{7,5,5,3},{7,5,5,6},{7,5,6,3},{7,5,7,3},{7,6,3,3},{7,6,3,4},{7,6,5,3},{7,6,6,7},
|
||||||
|
{7,6,7,6},{7,7,3,3},{7,7,3,4},{7,7,5,3},{7,7,6,6},{7,7,7,7},
|
||||||
|
},--6 piece opener
|
||||||
}
|
}
|
||||||
@@ -77,7 +77,7 @@ if system=="Windows"then
|
|||||||
collectgarbage()
|
collectgarbage()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-------------------------------------------------⑨Stack setup
|
-------------------------------------------------9 Stack setup
|
||||||
local dirCount={1,1,3,3,3,0,1}
|
local dirCount={1,1,3,3,3,0,1}
|
||||||
local spinOffset={
|
local spinOffset={
|
||||||
{[0]=0,1,0,0},--Z
|
{[0]=0,1,0,0},--Z
|
||||||
@@ -180,7 +180,7 @@ local function getScore(field,cb,cy)
|
|||||||
HclearScore[clear]--Clearing
|
HclearScore[clear]--Clearing
|
||||||
-hole*70--Hole
|
-hole*70--Hole
|
||||||
-cy*50--Height
|
-cy*50--Height
|
||||||
-sdh--∫Δh
|
-sdh--Sum of DeltaH
|
||||||
or
|
or
|
||||||
LclearScore[clear]
|
LclearScore[clear]
|
||||||
-hole*100
|
-hole*100
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ function BGdraw.matrix()
|
|||||||
local _=ceil(scr.h/80)
|
local _=ceil(scr.h/80)
|
||||||
for i=1,ceil(scr.w/80)do
|
for i=1,ceil(scr.w/80)do
|
||||||
for j=1,_ do
|
for j=1,_ do
|
||||||
gc.setColor(1,1,1,sin(matrixT[i][j]*t)*.1+.1)
|
gc.setColor(1,1,1,sin(i+matrixT[i][j]*t)*.1+.1)
|
||||||
gc.rectangle("fill",80*i,80*j,-80,-80)
|
gc.rectangle("fill",80*i,80*j,-80,-80)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -5,13 +5,14 @@ local BGM={}
|
|||||||
-- BGM.suspend=[str:pausing ID]
|
-- BGM.suspend=[str:pausing ID]
|
||||||
-- BGM.playing=[src:playing SRC]
|
-- BGM.playing=[src:playing SRC]
|
||||||
BGM.list={
|
BGM.list={
|
||||||
"blank","way","newera","infinite","reason",
|
"blank","way","race","newera","push",
|
||||||
"race","push","secret7th","secret8th",
|
"reason","infinite","secret7th","secret8th",
|
||||||
"rockblock","cruelty","final","8-bit happiness","end",
|
|
||||||
"shining terminal","oxygen","distortion",
|
"shining terminal","oxygen","distortion",
|
||||||
|
"rockblock","cruelty","final","8-bit happiness","end",
|
||||||
}
|
}
|
||||||
|
BGM.len=#BGM.list
|
||||||
function BGM.loadOne(_)
|
function BGM.loadOne(_)
|
||||||
_,BGM.list[_]=BGM.list[_]
|
local _=BGM.list[_]
|
||||||
BGM.list[_]=love.audio.newSource("/BGM/".._..".ogg","stream")
|
BGM.list[_]=love.audio.newSource("/BGM/".._..".ogg","stream")
|
||||||
BGM.list[_]:setLooping(true)
|
BGM.list[_]:setLooping(true)
|
||||||
BGM.list[_]:setVolume(0)
|
BGM.list[_]:setVolume(0)
|
||||||
|
|||||||
@@ -136,10 +136,6 @@ function File.loadData()
|
|||||||
if s then
|
if s then
|
||||||
setfenv(s,{})
|
setfenv(s,{})
|
||||||
local S=s()
|
local S=s()
|
||||||
if S.version~=gameVersion then
|
|
||||||
S.version=gameVersion
|
|
||||||
TEXT.show(text.newVersion,640,200,30,"fly",.3)
|
|
||||||
end
|
|
||||||
if not S.version or S.version=="Alpha V0.8.15"then
|
if not S.version or S.version=="Alpha V0.8.15"then
|
||||||
S.clear_S={S.clear_1,S.clear_2,S.clear_3,S.clear_4}
|
S.clear_S={S.clear_1,S.clear_2,S.clear_3,S.clear_4}
|
||||||
S.clear={{},{},{},{},{},{},{}}
|
S.clear={{},{},{},{},{},{},{}}
|
||||||
@@ -184,6 +180,35 @@ function File.loadData()
|
|||||||
S.clear[i][4]=0
|
S.clear[i][4]=0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if not S.clear_B[8]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}
|
||||||
|
S.spin_B[i]=0
|
||||||
|
S.clear_B[i]=0
|
||||||
|
end
|
||||||
|
S.spin_S[5]=0
|
||||||
|
S.clear_S[5]=0
|
||||||
|
end
|
||||||
|
if S.version=="Alpha V0.8.18"or S.version=="Alpha V0.8.19"then
|
||||||
|
S.clear[3],S.clear[4]=S.clear[4],S.clear[3]
|
||||||
|
S.spin[3],S.spin[4]=S.spin[4],S.spin[3]
|
||||||
|
S.clear_B[3],S.clear_B[4]=S.clear_B[4],S.clear_B[3]
|
||||||
|
S.spin_B[3],S.spin_B[4]=S.spin_B[4],S.spin_B[3]
|
||||||
|
end
|
||||||
|
if #modeRanks==76 then
|
||||||
|
for i=1,4 do
|
||||||
|
table.remove(modeRanks)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if S.version~=gameVersion then
|
||||||
|
S.version=gameVersion
|
||||||
|
TEXT.show(text.newVersion,640,200,30,"fly",.3)
|
||||||
|
end
|
||||||
addToTable(S,stat)
|
addToTable(S,stat)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -13,31 +13,37 @@ if setting.lang==1 then
|
|||||||
"2+2=Miya",
|
"2+2=Miya",
|
||||||
"225238922 哔哩哔哩 干杯~",
|
"225238922 哔哩哔哩 干杯~",
|
||||||
"适度游戏益脑,沉迷游戏伤身,合理安排时间,享受健康生活",
|
"适度游戏益脑,沉迷游戏伤身,合理安排时间,享受健康生活",
|
||||||
"合群了就会消失,但是消失不代表没有意义",
|
"合群了就会消失, 但是消失不代表没有意义",
|
||||||
"学会使用两个旋转键,三个更好",
|
"学会使用两个旋转键, 三个更好",
|
||||||
"更小的DAS和ARR拥有更高的操作上限(如果你还能控制得了的话)",
|
"更小的DAS和ARR拥有更高的操作上限(如果你还能控制得了的话)",
|
||||||
"注意到\"旋转\"到底对方块做了些什么吗?",
|
"注意到\"旋转\"到底对方块做了些什么吗?",
|
||||||
"20G本质是一套全新的游戏规则",
|
"20G本质是一套全新的游戏规则",
|
||||||
"不要在上课时玩游戏!",
|
"不要在上课时玩游戏!",
|
||||||
"本游戏难度上限很高,做好心理准备",
|
"本游戏难度上限很高, 做好心理准备",
|
||||||
"本游戏可不是休闲游戏",
|
"本游戏可不是休闲游戏",
|
||||||
"调到特殊的日期也不会发生什么的",
|
"调到特殊的日期也不会发生什么的",
|
||||||
"3.1415926535897932384",
|
"3.1415926535897932384",
|
||||||
"2.7182818284590452353",
|
"2.7182818284590452353",
|
||||||
"Let-The-Bass-Kick!",
|
"Let-The-Bass-Kick!",
|
||||||
"使用love2d引擎制作",
|
"使用love2d引擎制作",
|
||||||
"有疑问?先看设置有没有你想要的",
|
"有疑问? 先看设置有没有你想要的",
|
||||||
"有建议的话可以把信息反馈给作者~",
|
"有建议的话可以把信息反馈给作者~",
|
||||||
"不要按F10",
|
"不要按F10",
|
||||||
"秘密数字:626",
|
"秘密数字:626",
|
||||||
"CLASSIC SEXY RUSSIAN BLOCKS",
|
"CLASSIC SEXY RUSSIAN BLOCKS",
|
||||||
"戴上耳机以获得最佳体验",
|
"戴上耳机以获得最佳体验",
|
||||||
"少女祈祷中",
|
"少女祈祷中",
|
||||||
"LrL,RlR LLr,RRl RRR,LLL RfR,RRf,rFF FFF",--ZSLJTOI
|
"LrL RlR LLr RRl RRR LLL FFF RfR RRf rFF",
|
||||||
"RUR'U'R'FR2U'R'U'RUR'F'",
|
"(RUR'U')R'FR2U'R'U'(RUR'F')",
|
||||||
"Am G F G",
|
"Am G F G",
|
||||||
"Techmino 好玩!",
|
"联网还没做呢, 别急",
|
||||||
|
"\"免费吃鸡方块\"",
|
||||||
"Techminohaowan",
|
"Techminohaowan",
|
||||||
|
"Techmino 好玩!",
|
||||||
|
"tetr.js 也很好玩!",
|
||||||
|
"jstris 也很好玩!",
|
||||||
|
"tetr.io 也很好玩!",
|
||||||
|
"nullpomino 也很好玩!",
|
||||||
}
|
}
|
||||||
elseif setting.lang==2 then
|
elseif setting.lang==2 then
|
||||||
L={
|
L={
|
||||||
@@ -73,11 +79,17 @@ elseif setting.lang==2 then
|
|||||||
"CLASSIC SEXY RUSSIAN BLOCKS",
|
"CLASSIC SEXY RUSSIAN BLOCKS",
|
||||||
"戴上耳机以获得最佳体验",
|
"戴上耳机以获得最佳体验",
|
||||||
"少女祈祷中",
|
"少女祈祷中",
|
||||||
"LrL,RlR LLr,RRl RRR,LLL RfR,RRf,rFF FFF",--ZSLJTOI
|
"LrL RlR LLr RRl RRR LLL FFF RfR RRf rFF",
|
||||||
"RUR'U'R'FR2U'R'U'RUR'F'",
|
"(RUR'U')R'FR2U'R'U'(RUR'F')",
|
||||||
"Am G F G",
|
"Am G F G",
|
||||||
"Techmino 好玩!",
|
"联网还没做呢, 别急",
|
||||||
|
"\"免费吃鸡方块\"",
|
||||||
"Techminohaowan",
|
"Techminohaowan",
|
||||||
|
"Techmino 好玩!",
|
||||||
|
"tetr.js 也很好玩!",
|
||||||
|
"jstris 也很好玩!",
|
||||||
|
"tetr.io 也很好玩!",
|
||||||
|
"nullpomino 也很好玩!",
|
||||||
}
|
}
|
||||||
elseif setting.lang==3 then
|
elseif setting.lang==3 then
|
||||||
L={
|
L={
|
||||||
@@ -114,10 +126,24 @@ elseif setting.lang==3 then
|
|||||||
"CLASSIC SEXY RUSSIAN BLOCKS",
|
"CLASSIC SEXY RUSSIAN BLOCKS",
|
||||||
"Headphones for better experience",
|
"Headphones for better experience",
|
||||||
"少女祈禱中",
|
"少女祈禱中",
|
||||||
"RUR'U'R'FR2U'R'U'RUR'F'",
|
"(RUR'U')R'FR2U'R'U'(RUR'F')",
|
||||||
"Am G F G",
|
"Am G F G",
|
||||||
"LrL,RlR LLr,RRl RRR,LLL RfR,RRf,rFF FFF",--ZSLJTOI
|
"LrL RlR LLr RRl RRR LLL FFF RfR RRf rFF",
|
||||||
|
"Only offline game now",
|
||||||
|
"\"Free block game with royale-mode\"",
|
||||||
"Techmino is so fun!",
|
"Techmino is so fun!",
|
||||||
|
"Who is diao",
|
||||||
|
"Also try tetr.js!",
|
||||||
|
"Also try jstris!",
|
||||||
|
"Also try tetr.io!",
|
||||||
|
"Also try nullpomino!",
|
||||||
}
|
}
|
||||||
|
elseif setting.lang==4 then
|
||||||
|
L={'!','@','#','$','%','^','&','*','(',')','-','=','_','+','[',']','{','}','\\','|',';',':','\'','"',',','<','.','>','/','?'}
|
||||||
|
local s=""
|
||||||
|
for i=1,math.random(16,26)do
|
||||||
|
s=s..L[math.random(#L)]
|
||||||
|
end
|
||||||
|
return s
|
||||||
end
|
end
|
||||||
return L[math.random(#L)]
|
return L[math.random(#L)]
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
local IMG={
|
local IMG={
|
||||||
|
batteryImage="/mess/power.png",
|
||||||
titleImage="mess/title.png",
|
titleImage="mess/title.png",
|
||||||
coloredTitleImage="mess/title_colored.png",
|
coloredTitleImage="mess/title_colored.png",
|
||||||
dialCircle="mess/dialCircle.png",
|
dialCircle="mess/dialCircle.png",
|
||||||
|
|||||||
@@ -1,125 +1,354 @@
|
|||||||
local map={{},{},{},{},{}}
|
local zero={0,0}
|
||||||
for x=1,5 do for y=1,5 do map[x][y]={x-3,y-3}end end
|
local Zero={zero}
|
||||||
|
local ZERO={[01]=Zero,[10]=Zero,[03]=Zero,[30]=Zero,[12]=Zero,[21]=Zero,[32]=Zero,[23]=Zero,[02]=Zero,[20]=Zero,[13]=Zero,[31]=Zero}
|
||||||
|
|
||||||
|
local map={}
|
||||||
|
for x=-3,3 do map[x]={}for y=-3,3 do map[x][y]={x,y}end end
|
||||||
local function collect(T)
|
local function collect(T)
|
||||||
for _,T in next,T do
|
if type(T)=="table"then
|
||||||
for k,vec in next,T do
|
for _,T in next,T do
|
||||||
T[k]=map[vec[1]+3][vec[2]+3]
|
for k,vec in next,T do
|
||||||
|
T[k]=map[vec[1]][vec[2]]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function sym(L)
|
||||||
|
L[23]=L[01]L[32]=L[10]
|
||||||
|
L[21]=L[03]L[12]=L[30]
|
||||||
|
end
|
||||||
|
local function flipList(O)
|
||||||
|
if not O then return end
|
||||||
|
local L={}
|
||||||
|
for i=1,#O do
|
||||||
|
L[i]={-O[i][1],O[i][2]}
|
||||||
|
end
|
||||||
|
return L
|
||||||
|
end
|
||||||
|
local function reflect(a,b)
|
||||||
|
b[03]=flipList(a[01])
|
||||||
|
b[01]=flipList(a[03])
|
||||||
|
b[30]=flipList(a[10])
|
||||||
|
b[32]=flipList(a[12])
|
||||||
|
b[23]=flipList(a[21])
|
||||||
|
b[21]=flipList(a[23])
|
||||||
|
b[10]=flipList(a[30])
|
||||||
|
b[12]=flipList(a[32])
|
||||||
|
b[02]=flipList(a[02])
|
||||||
|
b[20]=flipList(a[20])
|
||||||
|
b[31]=flipList(a[13])
|
||||||
|
b[13]=flipList(a[31])
|
||||||
|
end
|
||||||
|
local function pushZero(T)
|
||||||
|
local L
|
||||||
|
for i=1,#T do
|
||||||
|
L=T[i]
|
||||||
|
if type(L)=="table"then
|
||||||
|
for _,v in next,L do
|
||||||
|
table.insert(v,1,zero)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local scs=require("parts/spinCenters")
|
||||||
|
local OspinList={
|
||||||
|
{111,5,2, 0,-1,0},{111,5,2,-1,-1,0},{111,5,0,-1, 0,0},--T
|
||||||
|
{333,5,2,-1,-1,0},{333,5,2, 0,-1,0},{333,5,0, 0, 0,0},--T
|
||||||
|
{313,1,2,-1, 0,0},{313,1,2, 0,-1,0},{313,1,2, 0, 0,0},--Z
|
||||||
|
{131,2,2, 0, 0,0},{131,2,2,-1,-1,0},{131,2,2,-1, 0,0},--S
|
||||||
|
{331,3,2, 0,-1,0},{113,3,0, 0, 0,0},{113,3,2,-1, 0,0},--J
|
||||||
|
{113,4,2,-1,-1,0},{331,4,0,-1, 0,0},{331,4,2, 0, 0,0},--L
|
||||||
|
{222,7,2,-1, 0,1},{222,7,2,-2, 0,1},{222,7,2, 0, 0,1},--I
|
||||||
|
{121,6,0, 1,-1,1},{112,6,0, 2,-1,2},{122,6,0, 1,-2,2},--O
|
||||||
|
{323,6,0,-1,-1,2},{332,6,0,-2,-1,2},{322,6,0,-1,-2,2},--O
|
||||||
|
}--{key,id,dir,dx,dy,freeLv(0=unmovable,1=L/R unmovable,2=free)}
|
||||||
local TRS={
|
local TRS={
|
||||||
[1]={
|
{
|
||||||
[01]={{0,0},{-1,0}, {-1,1}, {0,-2}, {-1,-2},{0,1} },
|
[01]={{-1, 0},{-1, 1},{ 0,-2},{-1, 2},{ 0, 1}},
|
||||||
[10]={{0,0},{1,0}, {1,-1}, {0,2}, {1,2}, {0,-1} },
|
[10]={{ 1, 0},{ 1,-1},{ 0, 2},{ 1,-1},{ 1,-2}},
|
||||||
[03]={{0,0},{1,0}, {1,1}, {0,-2}, {1,-1}, {1,-2} },
|
[03]={{ 1, 0},{ 1, 1},{ 0,-2},{ 1,-1},{ 1,-2}},
|
||||||
[30]={{0,0},{-1,0}, {-1,-1},{0,2}, {-1,2}, {0,-1}},
|
[30]={{-1, 0},{-1,-1},{ 0, 2},{-1, 2},{ 0,-1}},
|
||||||
[12]={{0,0},{1,0}, {1,-1}, {0,2}, {1,2} },
|
[12]={{ 1, 0},{ 1,-1},{ 0, 2},{ 1, 2}},
|
||||||
[21]={{0,0},{-1,0}, {-1,1}, {0,-2}, {-1,-2} },
|
[21]={{-1, 0},{-1, 1},{ 0,-2},{-1,-2}},
|
||||||
[32]={{0,0},{-1,0}, {-1,-1},{0,2}, {-1,2} },
|
[32]={{-1, 0},{-1,-1},{ 0, 2},{-1, 2}},
|
||||||
[23]={{0,0},{1,0}, {1,1}, {0,-2}, {1,-2} },
|
[23]={{ 1, 0},{ 1, 1},{ 0,-2},{ 1,-2}},
|
||||||
[02]={{0,0},{1,0}, {-1,0}, {0,-1}, {0,1} },
|
[02]={{ 1, 0},{-1, 0},{ 0,-1},{ 0, 1}},
|
||||||
[20]={{0,0},{-1,0}, {1,0}, {0,1}, {0,-1} },
|
[20]={{-1, 0},{ 1, 0},{ 0, 1},{ 0,-1}},
|
||||||
[13]={{0,0},{0,-1}, {0,1}, {-1,0}, {0,-2} },
|
[13]={{ 0,-1},{ 0, 1},{-1, 0},{ 0,-2}},
|
||||||
[31]={{0,0},{0,1}, {0,-1}, {1,0}, {0,2} },
|
[31]={{ 0, 1},{ 0,-1},{ 1, 0},{ 0, 2}},
|
||||||
},--Z
|
},--Z
|
||||||
[2]={
|
{},--S
|
||||||
[01]={{0,0},{-1,0}, {-1,1}, {0,-2}, {-1,-1},{-1,-2} },
|
{
|
||||||
[10]={{0,0},{1,0}, {1,-1}, {0,2}, {1,2}, {0,-1}},
|
[01]={{-1, 0},{-1, 1},{ 0,-2},{ 1, 1}},
|
||||||
[03]={{0,0},{1,0}, {1,1}, {0,-2}, {1,-2}, {0,1} },
|
[10]={{ 1, 0},{ 1,-1},{ 0, 2},{ 1, 2}},
|
||||||
[30]={{0,0},{-1,0}, {-1,-1},{0,2}, {-1,2}, {0,-1} },
|
[03]={{ 1, 0},{ 1, 1},{ 0,-2},{ 1,-2},{ 1,-1},{ 0, 1}},
|
||||||
[12]={{0,0},{1,0}, {1,-1}, {0,2}, {1,2} },
|
[30]={{-1, 0},{-1,-1},{ 0, 2},{-1, 2},{ 0,-1},{-1, 1}},
|
||||||
[21]={{0,0},{-1,0}, {-1,1}, {0,-2}, {-1,-2} },
|
[12]={{ 1, 0},{ 1,-1},{ 1, 1},{-1, 0},{ 0,-1},{ 0, 2},{ 1, 2}},
|
||||||
[32]={{0,0},{-1,0}, {-1,-1},{0,2}, {-1,2} },
|
[21]={{-1, 0},{-1, 1},{ 1, 0},{ 0,-2},{-1,-2}},
|
||||||
[23]={{0,0},{1,0}, {1,1}, {0,-2}, {1,-2} },
|
[32]={{-1, 0},{-1,-1},{ 0, 2},{-1, 2},{-1, 1}},
|
||||||
[02]={{0,0},{-1,0}, {1,0}, {0,-1}, {0,1} },
|
[23]={{ 1, 0},{ 1,-1},{ 1, 1},{ 0,-2},{ 1,-2},{ 1,-1}},
|
||||||
[20]={{0,0},{1,0}, {-1,0}, {0,1}, {0,-1} },
|
[02]={{-1, 0},{ 1, 0},{ 0,-1},{ 0, 1}},
|
||||||
[13]={{0,0},{0,1}, {0,-1}, {-1,0}, {0,2} },
|
[20]={{ 1, 0},{-1, 0},{ 0, 1},{ 0,-1}},
|
||||||
[31]={{0,0},{0,-1}, {0,1}, {1,0}, {0,-2} },
|
[13]={{ 0,-1},{ 1, 0},{ 0, 1}},
|
||||||
},--S
|
[31]={{ 0, 1},{-1, 0},{ 0,-1}},
|
||||||
[3]={
|
|
||||||
[01]={{0,0},{-1,0}, {-1,1}, {0,-2}, {-1,-2},{-1,-1},{0,1} },
|
|
||||||
[10]={{0,0},{1,0}, {1,-1}, {0,2}, {1,2}, {0,-1}, {1,1} },
|
|
||||||
[03]={{0,0},{1,0}, {1,1}, {0,-2}, {-1,1} },
|
|
||||||
[30]={{0,0},{-1,0}, {-1,-1},{0,2}, {-1,2} },
|
|
||||||
[12]={{0,0},{1,0}, {1,-1}, {0,2}, {1,2}, {1,1} },
|
|
||||||
[21]={{0,0},{-1,0}, {-1,-1},{-1,1}, {0,-2}, {-1,-2},{-1,-1} },
|
|
||||||
[32]={{0,0},{-1,0}, {-1,-1},{-1,1}, {1,0}, {0,-1}, {0,2}, {-1,2} },
|
|
||||||
[23]={{0,0},{1,0}, {1,1}, {-1,0}, {0,-2}, {1,-2} },
|
|
||||||
[02]={{0,0},{1,0}, {-1,0}, {0,-1}, {0,1} },
|
|
||||||
[20]={{0,0},{-1,0}, {1,0}, {0,1}, {0,-1} },
|
|
||||||
[13]={{0,0},{0,1}, {1,0}, {0,-1} },
|
|
||||||
[31]={{0,0},{0,-1}, {-1,0}, {0,1} },
|
|
||||||
},--L
|
|
||||||
[4]={
|
|
||||||
[01]={{0,0},{-1,0}, {-1,1}, {0,-2}, {1,1} },
|
|
||||||
[10]={{0,0},{1,0}, {1,-1}, {0,2}, {1,2} },
|
|
||||||
[03]={{0,0},{1,0}, {1,1}, {0,-2}, {1,-2}, {1,-1}, {0,1} },
|
|
||||||
[30]={{0,0},{-1,0}, {-1,-1},{0,2}, {-1,2}, {0,-1}, {-1,1} },
|
|
||||||
[12]={{0,0},{1,0}, {1,-1}, {1,1}, {-1,0}, {0,-1}, {0,2}, {1,2} },
|
|
||||||
[21]={{0,0},{-1,0}, {-1,1}, {1,0}, {0,-2}, {-1,-2} },
|
|
||||||
[32]={{0,0},{-1,0}, {-1,-1},{0,2}, {-1,2}, {-1,1} },
|
|
||||||
[23]={{0,0},{1,0}, {1,-1}, {1,1}, {0,-2}, {1,-2}, {1,-1} },
|
|
||||||
[02]={{0,0},{-1,0}, {1,0}, {0,-1}, {0,1} },
|
|
||||||
[20]={{0,0},{1,0}, {-1,0}, {0,1}, {0,-1} },
|
|
||||||
[13]={{0,0},{0,-1}, {1,0}, {0,1} },
|
|
||||||
[31]={{0,0},{0,1}, {-1,0}, {0,-1} },
|
|
||||||
},--J
|
},--J
|
||||||
[5]={
|
{},--L
|
||||||
[01]={{0,0},{-1,0}, {-1,1}, {0,-2}, {-1,-2},{-1,-1} },
|
{
|
||||||
[10]={{0,0},{1,0}, {1,-1}, {0,2}, {1,2}, {0,-1}, {1,1}},
|
[01]={{-1, 0},{-1, 1},{ 0,-2},{-1,-2},{-1,-1}},
|
||||||
[03]={{0,0},{1,0}, {1,1}, {0,-2}, {1,-2} },
|
[10]={{ 1, 0},{ 1,-1},{ 0, 2},{ 1, 2},{ 0,-1},{ 1, 1}},
|
||||||
[30]={{0,0},{-1,0}, {-1,-1},{0,2}, {-1,2}, {0,-1} },
|
[03]={{ 1, 0},{ 1, 1},{ 0,-2},{ 1,-2}},
|
||||||
[12]={{0,0},{1,0}, {1,-1}, {0,-1}, {-1,-1},{0,2}, {1,2}},
|
[30]={{-1, 0},{-1,-1},{ 0, 2},{-1, 2},{ 0,-1}},
|
||||||
[21]={{0,0},{-1,0}, {-1,1}, {0,-2}, {-1,-2},{1,1} },
|
[12]={{ 1, 0},{ 1,-1},{ 0,-1},{-1,-1},{ 0, 2},{ 1, 2}},
|
||||||
[32]={{0,0},{-1,0}, {-1,-1},{0,-1}, {1,-1}, {0,2}, {-1,2}},
|
[21]={{-1, 0},{-1, 1},{ 0,-2},{-1,-2},{ 1, 1}},
|
||||||
[23]={{0,0},{1,0}, {1,1}, {0,-2}, {1,-2}, {-1,1} },
|
[32]={{-1, 0},{-1,-1},{ 0,-1},{ 1,-1},{ 0, 2},{-1, 2}},
|
||||||
[02]={{0,0},{-1,0}, {1,0}, {0,1} },
|
[23]={{ 1, 0},{ 1, 1},{ 0,-2},{ 1,-2},{-1, 1}},
|
||||||
[20]={{0,0},{1,0}, {-1,0}, {0,-1} },
|
[02]={{-1, 0},{ 1, 0},{ 0, 1}},
|
||||||
[13]={{0,0},{0,-1}, {0,1}, {1,0}, {0,-2}, {0,2}},
|
[20]={{ 1, 0},{-1, 0},{ 0,-1}},
|
||||||
[31]={{0,0},{0,-1}, {0,1}, {-1,0}, {0,-2}, {0,2}},
|
[13]={{ 0,-1},{ 0, 1},{ 1, 0},{ 0,-2},{ 0, 2}},
|
||||||
|
[31]={{ 0,-1},{ 0, 1},{-1, 0},{ 0,-2},{ 0, 2}},
|
||||||
},--T
|
},--T
|
||||||
[6]={},--O(special)
|
function(P,d)
|
||||||
[7]={
|
if P.human then SFX.fieldPlay("rotate",nil,P)end
|
||||||
[01]={{0,0},{0,1}, {1,0}, {-2,0}, {-2,-1},{1,2} },
|
if P.gameEnv.easyFresh then P:freshLockDelay()end
|
||||||
[03]={{0,0},{0,1}, {-1,0}, {2,0}, {2,-1}, {-1,2} },
|
if not P.gameEnv.ospin then return end
|
||||||
[10]={{0,0},{2,0}, {-1,0}, {-1,-2},{2,1}, {0,2} },
|
local x,y=P.curX,P.curY
|
||||||
[30]={{0,0},{-2,0}, {1,0}, {1,-2}, {-2,1}, {0,2} },
|
if y==P.y_img and((P:solid(x-1,y)or P:solid(x-1,y+1)))and(P:solid(x+2,y)or P:solid(x+2,y+1))then
|
||||||
[12]={{0,0},{-1,0}, {2,0}, {-1,2}, {2,-1} },
|
local D=P.spinSeq%100*10+d
|
||||||
[32]={{0,0},{1,0}, {-2,0}, {1,-2}, {-2,-1} },
|
P.spinSeq=D
|
||||||
[21]={{0,0},{-2,0}, {1,0}, {1,-2}, {-2,1} },
|
if D<100 then return end
|
||||||
[23]={{0,0},{2,0}, {-1,0}, {-1,-2},{2,1} },
|
for i=1,#OspinList do
|
||||||
[02]={{0,0},{-1,0}, {1,0}, {0,-1}, {0,1} },
|
local L=OspinList[i]
|
||||||
[20]={{0,0},{1,0}, {-1,0}, {0,1}, {0,-1} },
|
if D==L[1]then
|
||||||
[13]={{0,0},{0,-1}, {-1,0}, {1,0}, {0,1} },
|
local id,dir=L[2],L[3]
|
||||||
[31]={{0,0},{0,-1}, {1,0}, {-1,0}, {0,1} },
|
local bk=blocks[id][dir]
|
||||||
}--I
|
local x,y=P.curX+L[4],P.curY+L[5]
|
||||||
}for i=1,7 do collect(TRS[i])end
|
if not P:ifoverlap(bk,x,y)and(L[6]>0 or P:ifoverlap(bk,x-1,y)and P:ifoverlap(bk,x+1,y))and(L[6]==2 or P:ifoverlap(bk,x,y-1))and P:ifoverlap(bk,x,y+1)then
|
||||||
|
local C=P.cur
|
||||||
|
C.id=id
|
||||||
|
C.bk=bk
|
||||||
|
P.curX,P.curY=x,y
|
||||||
|
P.r,P.c=#bk,#bk[1]
|
||||||
|
P.dir,P.sc=dir,scs[id][dir]
|
||||||
|
P.spinLast=2
|
||||||
|
P.stat.rotate=P.stat.rotate+1
|
||||||
|
P:freshgho()
|
||||||
|
P.spinSeq=0
|
||||||
|
SFX.fieldPlay("rotatekick",nil,P)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
P.spinSeq=0
|
||||||
|
end
|
||||||
|
end,--O
|
||||||
|
{
|
||||||
|
[01]={{ 0, 1},{ 1, 0},{-2, 0},{-2,-1},{ 1, 2}},
|
||||||
|
[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}},
|
||||||
|
[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}},
|
||||||
|
[31]={{ 0,-1},{ 1, 0},{-1, 0},{ 0, 1}},
|
||||||
|
},--I
|
||||||
|
{
|
||||||
|
[01]={{-1, 0},{ 0, 1},{ 1, 1},{ 0,-3},{ 0, 2},{ 0, 3},{-1, 2}},
|
||||||
|
[10]={{ 1, 0},{ 0,-1},{-1,-1},{ 0,-2},{ 0,-3},{ 0, 3},{ 1,-2}},
|
||||||
|
[03]={{ 1, 0},{ 0,-3},{ 0, 1},{ 0, 2},{ 0, 3},{ 1, 2}},
|
||||||
|
[30]={{-1, 0},{ 0, 1},{ 0,-2},{ 0,-3},{ 0, 3},{-1,-2}},
|
||||||
|
},--5Z
|
||||||
|
{},--5S
|
||||||
|
{
|
||||||
|
[01]={{-1, 0},{-1, 1},{ 0,-2},{-1,-2},{-1,-1},{ 0, 1}},
|
||||||
|
[10]={{ 1, 0},{ 1,-1},{ 0, 2},{ 1, 2},{ 0,-1},{ 1, 1}},
|
||||||
|
[03]={{ 1, 0},{ 1, 1},{ 0,-2},{-1, 1}},
|
||||||
|
[30]={{-1, 0},{-1,-1},{ 0, 2},{-1, 2}},
|
||||||
|
[12]={{ 1, 0},{ 1,-1},{ 0, 2},{ 1, 2},{ 1, 1}},
|
||||||
|
[21]={{-1, 0},{-1,-1},{-1, 1},{ 0,-2},{-1,-2},{-1,-1}},
|
||||||
|
[32]={{-1, 0},{-1,-1},{-1, 1},{ 1, 0},{ 0,-1},{ 0, 2},{-1, 2}},
|
||||||
|
[23]={{ 1, 0},{ 1, 1},{-1, 0},{ 0,-2},{ 1,-2}},
|
||||||
|
[02]={{-1, 0},{ 0,-1},{ 0, 1}},
|
||||||
|
[20]={{ 1, 0},{ 0, 1},{ 0,-1}},
|
||||||
|
[13]={{ 1, 0},{ 0, 1},{-1, 0}},
|
||||||
|
[31]={{-1, 0},{ 0,-1},{ 1, 0}},
|
||||||
|
},--Q
|
||||||
|
{},--P
|
||||||
|
{
|
||||||
|
[01]={{-1, 0},{ 1, 0},{-1, 1},{ 0,-2},{ 0,-3}},
|
||||||
|
[10]={{ 1, 0},{ 1,-1},{-1, 0},{ 0, 2},{ 0, 3}},
|
||||||
|
[03]={{ 1, 0},{ 1,-1}, { 0, 1},{ 0,-2},{ 0,-3}},
|
||||||
|
[30]={{-1, 0},{-1, 1},{ 1, 0},{ 0,-1},{ 0, 2},{ 0, 3}},
|
||||||
|
[12]={{ 1, 0},{ 0,-1},{-1, 0},{ 0, 2}},
|
||||||
|
[21]={{-1, 0},{ 0, 1},{ 1, 0},{ 0,-2}},
|
||||||
|
[32]={{-1, 0},{-1, 1},{ 0, 1},{ 0,-1},{ 1, 0},{ 0, 2},{-2, 0}},
|
||||||
|
[23]={{ 1, 0},{ 1,-1},{ 0,-1},{ 0, 1},{-1, 0},{ 0,-2},{ 2, 0}},
|
||||||
|
[02]={{ 1, 0},{-1, 0},{ 0, 1}},
|
||||||
|
[20]={{-1, 0},{ 1, 0},{ 0,-1}},
|
||||||
|
[13]={{ 0,-1},{ 1, 0},{ 0, 1}},
|
||||||
|
[31]={{ 0,-1},{-1, 0},{ 0, 1}},
|
||||||
|
},--F
|
||||||
|
{},--E
|
||||||
|
{
|
||||||
|
[01]={{ 0,-1},{-1,-1},{ 1,-1},{ 1, 0},{ 1,-3},{-1, 0},{ 0, 2},{-1, 2}},
|
||||||
|
[10]={{ 1, 0},{ 0,-1},{-1,-1},{ 0,-2},{ 0,-3},{ 1,-2},{ 0, 1}},
|
||||||
|
[03]={{ 0,-1},{ 1,-1},{-1,-1},{-1, 0},{-1,-3},{ 1, 0},{ 0, 2},{ 1, 2}},
|
||||||
|
[30]={{-1, 0},{ 0,-1},{ 1,-1},{ 0,-2},{ 0,-3},{-1,-2},{ 0, 1}},
|
||||||
|
[12]={{ 1, 0},{-1, 0},{ 0,-2},{ 0,-3},{ 0, 1},{-1, 1}},
|
||||||
|
[21]={{ 1,-1},{-1, 0},{ 1, 0},{ 0,-1},{ 0, 2},{ 0, 3}},
|
||||||
|
[32]={{-1, 0},{ 1, 0},{ 0,-2},{ 0,-3},{ 0, 1},{ 1, 1}},
|
||||||
|
[23]={{-1,-1},{ 1, 0},{-1, 0},{ 0,-1},{ 0, 2},{ 0, 3}},
|
||||||
|
[02]={{ 0, 1},{ 0,-1},{ 0, 2}},
|
||||||
|
[20]={{ 0,-1},{ 0, 1},{ 0,-2}},
|
||||||
|
[13]={{ 1, 0},{-1, 1},{-2, 0}},
|
||||||
|
[31]={{-1, 0},{ 1, 1},{ 2, 0}},
|
||||||
|
},--5T
|
||||||
|
{
|
||||||
|
[01]={{-1, 0},{-1, 1},{ 0,-2},{-1,-1},{-1,-2}},
|
||||||
|
[10]={{ 1, 0},{ 1,-1}},
|
||||||
|
[03]={{ 1, 0},{ 1, 1},{ 0,-2},{ 1,-1},{ 1,-2}},
|
||||||
|
[30]={{-1, 0},{-1,-1}},
|
||||||
|
[12]={{ 1, 0},{ 1, 1}},
|
||||||
|
[21]={{-1,-1},{-1, 1}},
|
||||||
|
[32]={{-1, 0},{-1, 1}},
|
||||||
|
[23]={{ 1,-1},{ 1, 1}},
|
||||||
|
[02]={{ 0, 1}},
|
||||||
|
[20]={{ 0,-1}},
|
||||||
|
[13]={{ 0,-1},{ 0, 1},{ 1, 0}},
|
||||||
|
[31]={{ 0,-1},{ 0, 1},{-1, 0}},
|
||||||
|
},--U
|
||||||
|
{
|
||||||
|
[01]={{ 0, 1},{-1, 0},{ 0,-2},{-1,-2}},
|
||||||
|
[10]={{ 0, 1},{ 1, 0},{ 0,-2},{ 1,-2}},
|
||||||
|
[03]={{ 0,-1},{ 0, 1},{ 0, 2}},
|
||||||
|
[30]={{ 0,-1},{ 0,-1},{ 0,-2}},
|
||||||
|
[12]={{ 0,-1},{ 0, 1}},
|
||||||
|
[21]={{ 0,-1},{ 0,-2}},
|
||||||
|
[32]={{ 1, 0},{-1, 0}},
|
||||||
|
[23]={{-1, 0},{ 1, 0}},
|
||||||
|
[02]={{-1, 1},{ 1,-1}},
|
||||||
|
[20]={{ 1,-1},{-1, 1}},
|
||||||
|
[13]={{ 1, 1},{-1,-1}},
|
||||||
|
[31]={{-1,-1},{ 1, 1}},
|
||||||
|
},--V
|
||||||
|
{
|
||||||
|
[01]={{ 0,-1},{-1, 0},{ 1, 0},{ 1,-1},{ 0, 2}},
|
||||||
|
[10]={{ 0,-1},{-1,-1},{ 0, 1},{ 0,-2},{ 1,-2},{ 0, 2}},
|
||||||
|
[03]={{ 1, 0},{ 1, 1},{ 0,-1},{ 0,-2},{ 0,-3},{ 1,-1},{ 0, 1},{ 0, 2},{ 0, 3}},
|
||||||
|
[30]={{-1, 0},{-1, 1},{ 0,-1},{ 0,-2},{ 0,-3},{-1,-1},{ 0, 1},{ 0, 2},{ 0, 3}},
|
||||||
|
[12]={{ 1, 0},{ 0,-1},{ 1, 1},{-1, 0},{ 0, 1},{-1,-1}},
|
||||||
|
[21]={{-1, 0},{ 0,-1},{-1, 1},{ 1, 0},{ 0, 1},{ 1,-1}},
|
||||||
|
[32]={{ 0,-1},{ 1, 0},{ 0, 1},{-1, 0},{-1,-1},{ 0, 2}},
|
||||||
|
[23]={{ 0,-1},{ 1,-1},{ 0, 1},{ 0,-2},{-1,-2},{ 0, 2}},
|
||||||
|
[02]={{ 0,-1},{-1, 0}},
|
||||||
|
[20]={{ 0, 1},{ 1, 0}},
|
||||||
|
[13]={{ 0, 1},{-1, 0}},
|
||||||
|
[31]={{ 0,-1},{ 1, 0}},
|
||||||
|
},--W
|
||||||
|
function(P,d)
|
||||||
|
return
|
||||||
|
end,--X
|
||||||
|
{
|
||||||
|
[01]={{-1, 0},{-1, 1},{ 0,-3},{-1, 1},{-1, 2},{ 0, 1}},
|
||||||
|
[10]={{-1, 0},{ 1,-1},{ 0, 3},{ 1,-1},{ 1,-2},{ 0, 1}},
|
||||||
|
[03]={{ 0,-1},{ 1,-1},{-1, 0},{ 1, 1},{ 0,-2},{ 1,-2},{ 0,-3},{ 1,-3},{-1, 1}},
|
||||||
|
[30]={{ 0, 1},{-1, 1},{ 1, 0},{-1,-1},{ 0, 2},{-1, 2},{ 0, 3},{-1, 3},{ 1,-1}},
|
||||||
|
[12]={{ 1, 0},{ 1,-1},{ 0,-1},{ 1,-2},{ 0,-2},{ 1, 1},{-1, 0},{ 0, 2},{ 1, 2}},
|
||||||
|
[21]={{-1, 0},{-1, 1},{ 0, 1},{-1, 2},{ 0, 2},{-1,-1},{ 1, 0},{ 0,-2},{-1,-2}},
|
||||||
|
[32]={{-1, 0},{-1, 1},{-1,-1},{ 0, 2},{-1, 2},{ 0,-2}},
|
||||||
|
[23]={{ 1, 0},{ 1,-1},{ 1, 1},{ 0,-2},{ 1,-2},{ 0, 2}},
|
||||||
|
[02]={{ 0,-1},{ 1,-1},{-1, 0},{ 2,-1},{ 0, 1}},
|
||||||
|
[20]={{ 0, 1},{-1, 1},{ 1, 0},{-2, 1},{ 0,-1}},
|
||||||
|
[13]={{-1, 0},{-1,-1},{ 0, 1},{-1,-2}},
|
||||||
|
[31]={{ 1, 0},{ 1, 1},{ 0,-1},{ 1, 2}},
|
||||||
|
},--5J
|
||||||
|
{},--5L
|
||||||
|
{
|
||||||
|
[01]={{-1, 0},{-1, 1},{ 1, 0},{-1, 2},{-1,-1},{ 0,-3},{ 0, 1}},
|
||||||
|
[10]={{-1, 0},{ 1,-1},{-1, 0},{ 1,-2},{ 1, 1},{ 0, 3},{ 0, 1}},
|
||||||
|
[03]={{ 0,-1},{ 1,-1},{-1, 0},{ 1, 1},{ 0,-2},{ 1,-2},{ 0,-3},{ 1,-3},{-1, 1}},
|
||||||
|
[30]={{ 0, 1},{-1, 1},{ 1, 0},{-1,-1},{ 0, 2},{-1, 2},{ 0, 3},{-1, 3},{ 1,-1}},
|
||||||
|
[12]={{ 1, 0},{ 1,-1},{ 0,-1},{ 1,-2},{ 0,-2},{ 1, 1},{-1, 0},{ 0, 2},{ 1, 2}},
|
||||||
|
[21]={{-1, 0},{-1, 1},{ 0, 1},{-1, 2},{ 0, 2},{-1,-1},{ 1, 0},{ 0,-2},{-1,-2}},
|
||||||
|
[32]={{-1, 0},{-1, 1},{-1,-1},{ 0, 2},{-1, 2},{ 0,-2}},
|
||||||
|
[23]={{ 1, 0},{ 1,-1},{ 1, 1},{ 0,-2},{ 1,-2},{ 0, 2}},
|
||||||
|
[02]={{ 0,-1},{ 1,-1},{-1, 0},{ 2,-1},{ 0, 1}},
|
||||||
|
[20]={{ 0, 1},{-1, 1},{ 1, 0},{-2, 1},{ 0,-1}},
|
||||||
|
[13]={{-1, 0},{-1,-1},{ 0, 1},{-1,-2}},
|
||||||
|
[31]={{ 1, 0},{ 1, 1},{ 0,-1},{ 1, 2}},
|
||||||
|
},--R
|
||||||
|
{},--Y
|
||||||
|
{
|
||||||
|
[01]={{-1, 0},{-1, 1},{ 0, 1},{ 1, 0},{-1, 2},{-2, 0},{ 0,-2}},
|
||||||
|
[10]={{ 1, 0},{-1, 0},{ 0,-1},{ 1,-1},{ 1,-2},{ 2, 0},{ 0, 2}},
|
||||||
|
[03]={{-1, 0},{ 1,-1},{ 0,-2},{ 0,-3},{ 1, 0},{ 1,-2},{ 1,-3},{ 0, 1},{-1, 1}},
|
||||||
|
[30]={{-1, 0},{ 1,-1},{ 1,-2},{ 1, 0},{ 0,-2},{ 1,-3},{-1, 2},{ 0, 3},{-1, 3}},
|
||||||
|
[12]={{-1, 0},{ 1,-1},{-1,-1},{ 1,-2},{ 1, 0},{ 0,-2},{ 1,-3},{-1, 2},{ 0, 3},{-1, 3}},
|
||||||
|
[21]={{-1, 0},{ 1,-1},{ 1, 1},{ 0,-2},{ 0,-3},{ 1, 0},{ 1,-2},{ 1,-3},{ 0, 1},{-1, 1}},
|
||||||
|
[32]={{-1, 0},{ 0,-1},{-1,-2},{ 1,-1},{ 1, 0},{ 1, 1},{ 0, 2},{ 0, 3}},
|
||||||
|
[23]={{ 0,-2},{ 0,-3},{ 1, 2},{ 1, 0},{ 0, 1},{-1, 1},{ 0,-1},{ 0, 2}},
|
||||||
|
[02]={{-1, 0},{ 0, 2},{ 0,-1}},
|
||||||
|
[20]={{ 1, 0},{ 0,-2},{ 0, 1}},
|
||||||
|
[13]={{-1, 0},{-1,-1},{ 0, 1},{ 1, 2}},
|
||||||
|
[31]={{ 1, 0},{ 1, 1},{ 0,-1},{-1,-2}},
|
||||||
|
},--N
|
||||||
|
{},--H
|
||||||
|
{
|
||||||
|
[01]={{ 1,-1},{ 1, 0},{ 1, 1},{ 0, 1},{-1, 1},{-1, 0},{-1,-1},{ 0,-1},{ 0,-2},{-2,-1},{-2,-2},{ 2, 0},{ 2,-1},{ 2,-2},{ 1, 2},{ 2, 2},{-1, 2},{-2, 2}},
|
||||||
|
[10]={{-1, 0},{-1,-1},{ 0,-1},{ 1,-1},{-2,-2},{-2,-1},{-2, 0},{-1,-2},{ 0,-2},{ 1,-2},{ 2,-2},{-1, 1},{-2, 1},{-2, 2},{ 1, 0},{ 2, 0},{ 2,-1},{ 0, 1},{ 1,-1},{ 2,-2}},
|
||||||
|
},--5I
|
||||||
|
}
|
||||||
|
TRS[25][03]=flipList(TRS[25][01])
|
||||||
|
TRS[25][30]=flipList(TRS[25][10])
|
||||||
|
sym(TRS[8])sym(TRS[9])sym(TRS[25])
|
||||||
|
reflect(TRS[1],TRS[2])--SZ
|
||||||
|
reflect(TRS[3],TRS[4])--LJ
|
||||||
|
reflect(TRS[8],TRS[9])--5S5Z
|
||||||
|
reflect(TRS[10],TRS[11])--PQ
|
||||||
|
reflect(TRS[12],TRS[13])--FE
|
||||||
|
reflect(TRS[19],TRS[20])--5L5J
|
||||||
|
reflect(TRS[21],TRS[22])--RY
|
||||||
|
reflect(TRS[23],TRS[24])--HN
|
||||||
|
for i=1,25 do collect(TRS[i])end
|
||||||
|
pushZero(TRS)
|
||||||
|
|
||||||
local AIRS={
|
local AIRS={
|
||||||
[1]={
|
[1]={
|
||||||
[01]={{0,0},{-1,0}, {-1,1}, {0,-2}, {-1,-2} },
|
[01]={{-1,0},{-1, 1},{ 0,-2},{-1,-2}},
|
||||||
[10]={{0,0},{1,0}, {1,-1}, {0,2}, {1,2} },
|
[10]={{ 1,0},{ 1,-1},{ 0, 2},{ 1, 2}},
|
||||||
[03]={{0,0},{1,0}, {1,1}, {0,-2}, {1,-2} },
|
[03]={{ 1,0},{ 1, 1},{ 0,-2},{ 1,-2}},
|
||||||
[30]={{0,0},{-1,0}, {-1,-1},{0,2}, {-1,2} },
|
[30]={{-1,0},{-1,-1},{ 0, 2},{-1, 2}},
|
||||||
[12]={{0,0},{1,0}, {1,-1}, {0,2}, {1,2} },
|
[12]={{ 1,0},{ 1,-1},{ 0, 2},{ 1, 2}},
|
||||||
[21]={{0,0},{-1,0}, {-1,1}, {0,-2}, {-1,-2} },
|
[21]={{-1,0},{-1, 1},{ 0,-2},{-1,-2}},
|
||||||
[32]={{0,0},{-1,0}, {-1,-1},{0,2}, {-1,2} },
|
[32]={{-1,0},{-1,-1},{ 0, 2},{-1, 2}},
|
||||||
[23]={{0,0},{1,0}, {1,1}, {0,-2}, {1,-2} },
|
[23]={{ 1,0},{ 1, 1},{ 0,-2},{ 1,-2}},
|
||||||
},
|
},
|
||||||
[7]={
|
[7]={
|
||||||
[01]={{0,0},{-2,0}, {1,0}, {-2,-1},{1,2} },
|
[01]={{-2, 0},{ 1, 0},{-2,-1},{ 1, 2}},
|
||||||
[10]={{0,0},{2,0}, {-1,0}, {2,1}, {-1,-2} },
|
[10]={{ 2, 0},{-1, 0},{ 2, 1},{-1,-2}},
|
||||||
[12]={{0,0},{-1,0}, {2,0}, {-1,2}, {2,-1} },
|
[12]={{-1, 0},{ 2, 0},{-1, 2},{ 2,-1}},
|
||||||
[21]={{0,0},{1,0}, {-2,0}, {1,-2}, {-2,1} },
|
[21]={{ 1, 0},{-2, 0},{ 1,-2},{-2, 1}},
|
||||||
[23]={{0,0},{2,0}, {-1,0}, {2,1}, {-1,-2} },
|
[23]={{ 2, 0},{-1, 0},{ 2, 1},{-1,-2}},
|
||||||
[32]={{0,0},{-2,0}, {1,0}, {-2,-1},{1,2} },
|
[32]={{-2, 0},{ 1, 0},{-2,-1},{ 1, 2}},
|
||||||
[30]={{0,0},{1,0}, {-2,0}, {1,-2}, {-2,1} },
|
[30]={{ 1, 0},{-2, 0},{ 1,-2},{-2, 1}},
|
||||||
[03]={{0,0},{-1,0}, {2,0}, {-1,2}, {2,-1} },
|
[03]={{-1, 0},{ 2, 0},{-1, 2},{ 2,-1}},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for i=2,6 do AIRS[i]=AIRS[1]end
|
|
||||||
collect(AIRS[1])collect(AIRS[7])
|
collect(AIRS[1])collect(AIRS[7])
|
||||||
|
for i=2,25 do AIRS[i]=AIRS[1]end
|
||||||
|
pushZero(AIRS)
|
||||||
|
|
||||||
|
local NONE={}
|
||||||
|
for i=1,25 do NONE[i]=ZERO end
|
||||||
|
|
||||||
return{
|
return{
|
||||||
TRS=TRS,
|
TRS=TRS,
|
||||||
AIRS=AIRS,
|
AIRS=AIRS,
|
||||||
|
NONE=NONE,
|
||||||
}
|
}
|
||||||
1188
parts/languages.lua
1188
parts/languages.lua
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,6 @@
|
|||||||
do return end
|
|
||||||
--LIGHT MODULE(Optimized by MrZ,Original on github/love2d community/simple-love-lights)
|
--LIGHT MODULE(Optimized by MrZ,Original on github/love2d community/simple-love-lights)
|
||||||
--Heavily based on mattdesl's libGDX implementation:
|
--Heavily based on mattdesl's libGDX implementation:
|
||||||
--https://github.com/mattdesl/lwjgl-basics/wiki/2D-Pixel-Perfect-Shadows
|
--https://github.com/mattdesl/lwjgl-basics/wiki/2D-Pixel-Perfect-Shadows
|
||||||
--Private--
|
|
||||||
local gc=love.graphics
|
local gc=love.graphics
|
||||||
local C=gc.clear
|
local C=gc.clear
|
||||||
local shadowMapShader=gc.newShader("shader/shadowMap.cs")--Shader for caculating the 1D shadow map.
|
local shadowMapShader=gc.newShader("shader/shadowMap.cs")--Shader for caculating the 1D shadow map.
|
||||||
@@ -20,62 +18,72 @@ local function destroy(L)
|
|||||||
L.renderCanvas:release()
|
L.renderCanvas:release()
|
||||||
end
|
end
|
||||||
local function draw(L)
|
local function draw(L)
|
||||||
|
--Initialization
|
||||||
local r,g,b,a=love.graphics.getColor()
|
local r,g,b,a=love.graphics.getColor()
|
||||||
gc.setCanvas(L.blackCanvas)C()
|
gc.setCanvas(L.blackCanvas)C()
|
||||||
gc.setCanvas(L.shadowCanvas)C()
|
gc.setCanvas(L.shadowCanvas)C()
|
||||||
gc.setCanvas(L.renderCanvas)C()
|
gc.setCanvas(L.renderCanvas)C()
|
||||||
lightRenderShader:send("xresolution",L.size);
|
lightRenderShader:send("xresolution",L.size);
|
||||||
shadowMapShader:send("yresolution",L.size);
|
shadowMapShader:send("yresolution",L.size);
|
||||||
--初始化数据
|
|
||||||
|
--get up-left of light
|
||||||
local X=L.x-L.size*.5
|
local X=L.x-L.size*.5
|
||||||
local Y=L.y-L.size*.5
|
local Y=L.y-L.size*.5
|
||||||
--整束光的左上角
|
|
||||||
|
--Render solid
|
||||||
gc.translate(-X,-Y)
|
gc.translate(-X,-Y)
|
||||||
L.blackCanvas:renderTo(L.blackFn)
|
L.blackCanvas:renderTo(L.blackFn)
|
||||||
gc.translate(X,Y)
|
gc.translate(X,Y)
|
||||||
--渲染遮光物
|
|
||||||
|
--Render shade canvas by solid
|
||||||
gc.setShader(shadowMapShader)
|
gc.setShader(shadowMapShader)
|
||||||
gc.setCanvas(L.shadowCanvas)
|
gc.setCanvas(L.shadowCanvas)
|
||||||
gc.draw(L.blackCanvas)
|
gc.draw(L.blackCanvas)
|
||||||
--根据遮光物渲染阴影画布
|
|
||||||
|
--Render light canvas by shade
|
||||||
gc.setShader(lightRenderShader)
|
gc.setShader(lightRenderShader)
|
||||||
gc.setCanvas(L.renderCanvas)
|
gc.setCanvas(L.renderCanvas)
|
||||||
gc.draw(L.shadowCanvas,0,0,0,1,L.size)
|
gc.draw(L.shadowCanvas,0,0,0,1,L.size)
|
||||||
--根据阴影画布渲染光画布
|
|
||||||
|
--Ready to final render
|
||||||
gc.setShader()gc.setCanvas()gc.setBlendMode("add")
|
gc.setShader()gc.setCanvas()gc.setBlendMode("add")
|
||||||
--准备渲染
|
|
||||||
|
--Render to screes
|
||||||
gc.setColor(r,g,b,a)
|
gc.setColor(r,g,b,a)
|
||||||
gc.draw(L.renderCanvas,X,Y+L.size,0,1,-1)
|
gc.draw(L.renderCanvas,X,Y+L.size,0,1,-1)
|
||||||
--渲染到屏幕
|
|
||||||
|
--Reset
|
||||||
gc.setBlendMode("alpha")
|
gc.setBlendMode("alpha")
|
||||||
--复位
|
|
||||||
end
|
end
|
||||||
--Public--
|
|
||||||
function Lights.draw()
|
local LIGHT={}
|
||||||
|
function LIGHT.draw()
|
||||||
for i=1,#Lights do
|
for i=1,#Lights do
|
||||||
Lights[i]:draw()
|
Lights[i]:draw()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function Lights.clear(L)
|
function LIGHT.clear(L)
|
||||||
for i=#Lights,1,-1 do
|
for i=#Lights,1,-1 do
|
||||||
Lights[i]:destroy()
|
Lights[i]:destroy()
|
||||||
Lights[i]=nil
|
Lights[i]=nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function Lights.add(x,y,R,F)
|
function LIGHT.add(x,y,R,F)
|
||||||
local id=#Lights+1
|
local id=#Lights+1
|
||||||
Lights[id]={
|
Lights[id]={
|
||||||
|
--Methods
|
||||||
id=id,
|
id=id,
|
||||||
x=x,y=y,size=R,
|
x=x,y=y,size=R,
|
||||||
blackCanvas=gc.newCanvas(R,R),--遮挡物画布
|
blackCanvas=gc.newCanvas(R,R),--solid canvas
|
||||||
shadowCanvas=gc.newCanvas(R,1),--1D视深画布
|
shadowCanvas=gc.newCanvas(R,1),--1D vis-depth canvas
|
||||||
renderCanvas=gc.newCanvas(R,R),--灯光画布
|
renderCanvas=gc.newCanvas(R,R),--light canvas
|
||||||
blackFn=F,--遮挡物绘图函数
|
blackFn=F,--solid draw funcion
|
||||||
--方法
|
|
||||||
|
|
||||||
move=move,
|
move=move,
|
||||||
setPow=setPow,
|
setPow=setPow,
|
||||||
draw=draw,
|
draw=draw,
|
||||||
destroy=destroy,
|
destroy=destroy,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
return Lights
|
return LIGHT
|
||||||
@@ -1,31 +1,3 @@
|
|||||||
actName={
|
|
||||||
"moveLeft","moveRight",
|
|
||||||
"rotRight","rotLeft","rot180",
|
|
||||||
"hardDrop","softDrop",
|
|
||||||
"hold","func",
|
|
||||||
"restart",
|
|
||||||
"insLeft","insRight","insDown","down1","down4","down10",
|
|
||||||
"dropLeft","dropRight","addLeft","addRight",--Super contorl system
|
|
||||||
}
|
|
||||||
musicID={
|
|
||||||
"blank",
|
|
||||||
"way",
|
|
||||||
"race",
|
|
||||||
"newera",
|
|
||||||
"push",
|
|
||||||
"reason",
|
|
||||||
"infinite",
|
|
||||||
"secret7th",
|
|
||||||
"secret8th",
|
|
||||||
"shining terminal",
|
|
||||||
"oxygen",
|
|
||||||
"distortion",
|
|
||||||
"rockblock",
|
|
||||||
"cruelty",
|
|
||||||
"final",
|
|
||||||
"8-bit happiness",
|
|
||||||
"end",
|
|
||||||
}
|
|
||||||
customID={
|
customID={
|
||||||
"drop","lock",
|
"drop","lock",
|
||||||
"wait","fall",
|
"wait","fall",
|
||||||
@@ -51,5 +23,4 @@ customRange={
|
|||||||
bg={"none","game1","game2","game3","strap","rgb","glow","matrix"},
|
bg={"none","game1","game2","game3","strap","rgb","glow","matrix"},
|
||||||
bgm={"blank","way","race","newera","push","reason","infinite","secret7th","secret8th","rockblock"},
|
bgm={"blank","way","race","newera","push","reason","infinite","secret7th","secret8th","rockblock"},
|
||||||
}
|
}
|
||||||
RCPB={10,33,200,33,105,5,105,60}
|
|
||||||
snapLevelValue={1,10,20,40,60,80}
|
snapLevelValue={1,10,20,40,60,80}
|
||||||
@@ -11,13 +11,34 @@ local function RotCW(B)
|
|||||||
end
|
end
|
||||||
local O,_=true,false
|
local O,_=true,false
|
||||||
local L={
|
local L={
|
||||||
|
--Tetramino
|
||||||
{{_,O,O},{O,O,_}}, --Z
|
{{_,O,O},{O,O,_}}, --Z
|
||||||
{{O,O,_},{_,O,O}}, --S
|
{{O,O,_},{_,O,O}}, --S
|
||||||
{{O,O,O},{_,_,O}}, --L
|
|
||||||
{{O,O,O},{O,_,_}}, --J
|
{{O,O,O},{O,_,_}}, --J
|
||||||
|
{{O,O,O},{_,_,O}}, --L
|
||||||
{{O,O,O},{_,O,_}}, --T
|
{{O,O,O},{_,O,_}}, --T
|
||||||
{{O,O},{O,O}}, --O
|
{{O,O},{O,O}}, --O
|
||||||
{{O,O,O,O}}, --I
|
{{O,O,O,O}}, --I
|
||||||
|
|
||||||
|
--Pentomino
|
||||||
|
{{_,O,O},{_,O,_},{O,O,_}}, --Z
|
||||||
|
{{O,O,_},{_,O,_},{_,O,O}}, --S
|
||||||
|
{{O,O,O},{O,O,_}}, --P
|
||||||
|
{{O,O,O},{_,O,O}}, --Q
|
||||||
|
{{_,O,_},{O,O,O},{O,_,_}}, --F
|
||||||
|
{{_,O,_},{O,O,O},{_,_,O}}, --E
|
||||||
|
{{O,O,O},{_,O,_},{_,O,_}}, --T
|
||||||
|
{{O,O,O},{O,_,O}}, --U
|
||||||
|
{{O,O,O},{_,_,O},{_,_,O}}, --V
|
||||||
|
{{_,O,O},{O,O,_},{O,_,_}}, --W
|
||||||
|
{{_,O,_},{O,O,O},{_,O,_}}, --X
|
||||||
|
{{O,O,O,O},{O,_,_,_}}, --J
|
||||||
|
{{O,O,O,O},{_,_,_,O}}, --L
|
||||||
|
{{O,O,O,O},{_,O,_,_}}, --R
|
||||||
|
{{O,O,O,O},{_,_,O,_}}, --Y
|
||||||
|
{{_,O,O,O},{O,O,_,_}}, --N
|
||||||
|
{{O,O,O,_},{_,_,O,O}}, --H
|
||||||
|
{{O,O,O,O,O}}, --I
|
||||||
}
|
}
|
||||||
for i=1,#L do
|
for i=1,#L do
|
||||||
local B=L[i]
|
local B=L[i]
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
modes={
|
modes={
|
||||||
{"sprint_10", id=1, x=0, y=0, size=35,shape=1,icon="timer", unlock={2,3}},
|
{"sprint_10", id=1, x=0, y=0, size=35,shape=1,icon="sprint", unlock={2,3}},
|
||||||
{"sprint_20", id=2, x=-300, y=0, size=45,shape=1,icon="timer", unlock={73,74,75}},
|
{"sprint_20", id=2, x=-300, y=0, size=45,shape=1,icon="sprint", unlock={}},
|
||||||
{"sprint_40", id=3, x=0, y=-400, size=55,shape=1,icon="timer", unlock={4,9,71,72}},
|
{"sprint_40", id=3, x=0, y=-400, size=55,shape=1,icon="sprint", unlock={4,9,71,72,73}},
|
||||||
{"sprint_100", id=4, x=-200, y=-400, size=45,shape=1,icon="timer", unlock={5,7}},
|
{"sprint_100", id=4, x=-200, y=-400, size=45,shape=1,icon="sprint", unlock={5,7}},
|
||||||
{"sprint_400", id=5, x=-400, y=-400, size=35,shape=1,icon="timer", unlock={6}},
|
{"sprint_400", id=5, x=-400, y=-400, size=35,shape=1,icon="sprint", unlock={6}},
|
||||||
{"sprint_1000", id=6, x=-600, y=-400, size=35,shape=1,icon="timer", unlock={}},
|
{"sprint_1000", id=6, x=-600, y=-400, size=35,shape=1,icon="sprint", unlock={}},
|
||||||
{"drought_normal", id=7, x=-400, y=-200, size=35,shape=1,icon="noI", unlock={8}},
|
{"drought_normal", id=7, x=-400, y=-200, size=35,shape=1,icon="noI", unlock={8}},
|
||||||
{"drought_lunatic", id=8, x=-600, y=-200, size=35,shape=1,icon="mess", unlock={}},
|
{"drought_lunatic", id=8, x=-600, y=-200, size=35,shape=1,icon="mess", unlock={}},
|
||||||
{"marathon_normal", id=9, x=0, y=-600, size=55,shape=1,icon="flag", unlock={10,11,22,31,36,37,48,67}},
|
{"marathon_normal", id=9, x=0, y=-600, size=55,shape=1,icon="flag", unlock={10,11,22,31,36,37,48,67}},
|
||||||
@@ -39,7 +39,7 @@ modes={
|
|||||||
{"blind_ultimate", id=35, x=150, y=-1100, size=35,shape=1,icon="blind", unlock={}},
|
{"blind_ultimate", id=35, x=150, y=-1100, size=35,shape=1,icon="blind", unlock={}},
|
||||||
|
|
||||||
{"classic_fast", id=36, x=-300, y=-1200, size=40,shape=2,icon="classic", unlock={}},
|
{"classic_fast", id=36, x=-300, y=-1200, size=40,shape=2,icon="classic", unlock={}},
|
||||||
|
|
||||||
{"survivor_easy", id=37, x=300, y=-600, size=35,shape=1,icon="survivor",unlock={38}},
|
{"survivor_easy", id=37, x=300, y=-600, size=35,shape=1,icon="survivor",unlock={38}},
|
||||||
{"survivor_normal", id=38, x=500, y=-600, size=35,shape=1,icon="survivor",unlock={39,42,44,46}},
|
{"survivor_normal", id=38, x=500, y=-600, size=35,shape=1,icon="survivor",unlock={39,42,44,46}},
|
||||||
{"survivor_hard", id=39, x=700, y=-600, size=35,shape=1,icon="survivor",unlock={40}},
|
{"survivor_hard", id=39, x=700, y=-600, size=35,shape=1,icon="survivor",unlock={40}},
|
||||||
@@ -81,9 +81,7 @@ modes={
|
|||||||
{"infinite_dig", id=70, x=-1100, y=-600, size=35,shape=1,icon="infinite_dig",unlock={}},
|
{"infinite_dig", id=70, x=-1100, y=-600, size=35,shape=1,icon="infinite_dig",unlock={}},
|
||||||
{"custom_clear", id=71, x=200, y=-350, size=45,shape=3,icon="custom", unlock={}},
|
{"custom_clear", id=71, x=200, y=-350, size=45,shape=3,icon="custom", unlock={}},
|
||||||
{"custom_puzzle", id=72, x=200, y=-200, size=45,shape=3,icon="puzzle", unlock={}},
|
{"custom_puzzle", id=72, x=200, y=-200, size=45,shape=3,icon="puzzle", unlock={}},
|
||||||
{"hotseat_2P", id=73, x=-300, y=200, size=45,shape=3,icon="hotseat", unlock={}},
|
{"sprintPenta", id=73, x=-200, y=-200, size=45,shape=3,icon="sprint", unlock={}},
|
||||||
{"hotseat_3P", id=74, x=-450, y=200, size=45,shape=3,icon="hotseat", unlock={}},
|
|
||||||
{"hotseat_4P", id=75, x=-600, y=200, size=45,shape=3,icon="hotseat", unlock={}},
|
|
||||||
}
|
}
|
||||||
modeRanks={}
|
modeRanks={}
|
||||||
for i=1,#modes do
|
for i=1,#modes do
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ function SFX.loadAll()
|
|||||||
SFX.loadOne(i)
|
SFX.loadOne(i)
|
||||||
end
|
end
|
||||||
end
|
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)
|
function SFX.play(s,v,pos)
|
||||||
if setting.sfx==0 then return end
|
if setting.sfx==0 then return end
|
||||||
local S=SFX.list[s]--source list
|
local S=SFX.list[s]--source list
|
||||||
|
|||||||
@@ -1,12 +1,40 @@
|
|||||||
local TMP1,TMP2,TMP3,TMP4={1,2},{2,1},{2,2},{1.5,1.5}
|
local N1,N2={1,2},{2,1}
|
||||||
|
local N3,N4={2,2},{1.5,1.5}
|
||||||
|
local I1,I2={0.5,2.5},{2.5,0.5}
|
||||||
|
local I3,I4={1.5,2.5},{2.5,1.5}
|
||||||
|
local V4={2.5,2.5}
|
||||||
|
local L1,L2={1,3},{3,1}
|
||||||
local scs={
|
local scs={
|
||||||
{[0]=TMP1,TMP2,TMP3,TMP3},
|
--Tetramino
|
||||||
{[0]=TMP1,TMP2,TMP3,TMP3},
|
{[0]=N1,N2,N3,N3},--Z
|
||||||
{[0]=TMP1,TMP2,TMP3,TMP3},
|
{[0]=N1,N2,N3,N3},--S
|
||||||
{[0]=TMP1,TMP2,TMP3,TMP3},
|
{[0]=N1,N2,N3,N3},--L
|
||||||
{[0]=TMP1,TMP2,TMP3,TMP3},
|
{[0]=N1,N2,N3,N3},--J
|
||||||
{[0]=TMP4,TMP4,TMP4,TMP4},
|
{[0]=N1,N2,N3,N3},--T
|
||||||
{[0]={0.5,2.5},{2.5,0.5},{1.5,2.5},{2.5,1.5}},
|
{[0]=N4,N4,N4,N4},--O
|
||||||
|
{[0]=I1,I2,I3,I4},--I
|
||||||
|
|
||||||
|
--Pentomino
|
||||||
|
{[0]=N3,N3,N3,N3},--Z
|
||||||
|
{[0]=N3,N3,N3,N3},--S
|
||||||
|
{[0]=N1,N2,N3,N3},--P
|
||||||
|
{[0]=N1,N2,N3,N3},--Q
|
||||||
|
{[0]=N3,N3,N3,N3},--F
|
||||||
|
{[0]=N3,N3,N3,N3},--E
|
||||||
|
{[0]=N3,N3,N3,N3},--T
|
||||||
|
{[0]=N1,N2,N3,N3},--U
|
||||||
|
{[0]=I3,N4,I4,V4},--V
|
||||||
|
{[0]=N3,N3,N3,N3},--W
|
||||||
|
{[0]=N3,N3,N3,N3},--X
|
||||||
|
{[0]=I3,I4,I3,I4},--J
|
||||||
|
{[0]=I3,I4,I3,I4},--L
|
||||||
|
{[0]=I3,I4,I3,I4},--R
|
||||||
|
{[0]=I3,I4,I3,I4},--Y
|
||||||
|
{[0]=I3,I4,I3,I4},--N
|
||||||
|
{[0]=I3,I4,I3,I4},--H
|
||||||
|
{[0]=L1,L2,L1,L2},--I
|
||||||
}
|
}
|
||||||
TMP1,TMP2,TMP3,TMP4=nil
|
N1,N2,N3,N4=nil
|
||||||
|
I1,I2,I3,I4=nil
|
||||||
|
L1,L2=nil
|
||||||
return scs
|
return scs
|
||||||
@@ -85,30 +85,30 @@ end
|
|||||||
function VOC.update()
|
function VOC.update()
|
||||||
for i=#voiceQueue,1,-1 do
|
for i=#voiceQueue,1,-1 do
|
||||||
local Q=voiceQueue[i]
|
local Q=voiceQueue[i]
|
||||||
if Q.s==0 then--闲置轨,自动删除多余
|
if Q.s==0 then--Free channel, auto delete when >3
|
||||||
if i>3 then
|
if i>3 then
|
||||||
rem(voiceQueue,i)
|
rem(voiceQueue,i)
|
||||||
end
|
end
|
||||||
elseif Q.s==1 then--等待转换
|
elseif Q.s==1 then--Waiting load source
|
||||||
Q[1]=getVoice(Q[1])
|
Q[1]=getVoice(Q[1])
|
||||||
Q[1]:setVolume(setting.voc*.1)
|
Q[1]:setVolume(setting.voc*.1)
|
||||||
Q[1]:play()
|
Q[1]:play()
|
||||||
Q.s=Q[2]and 2 or 4
|
Q.s=Q[2]and 2 or 4
|
||||||
elseif Q.s==2 then--播放1,准备2
|
elseif Q.s==2 then--playing 1,ready 2
|
||||||
if Q[1]:getDuration()-Q[1]:tell()<.08 then
|
if Q[1]:getDuration()-Q[1]:tell()<.08 then
|
||||||
Q[2]=getVoice(Q[2])
|
Q[2]=getVoice(Q[2])
|
||||||
Q[2]:setVolume(setting.voc*.1)
|
Q[2]:setVolume(setting.voc*.1)
|
||||||
Q[2]:play()
|
Q[2]:play()
|
||||||
Q.s=3
|
Q.s=3
|
||||||
end
|
end
|
||||||
elseif Q.s==3 then--12同时播放
|
elseif Q.s==3 then--playing 12 same time
|
||||||
if not Q[1]:isPlaying()then
|
if not Q[1]:isPlaying()then
|
||||||
for i=1,#Q do
|
for i=1,#Q do
|
||||||
Q[i]=Q[i+1]
|
Q[i]=Q[i+1]
|
||||||
end
|
end
|
||||||
Q.s=Q[2]and 2 or 4
|
Q.s=Q[2]and 2 or 4
|
||||||
end
|
end
|
||||||
elseif Q.s==4 then--最后播放
|
elseif Q.s==4 then--playing last
|
||||||
if not Q[1].isPlaying(Q[1])then
|
if not Q[1].isPlaying(Q[1])then
|
||||||
Q[1]=nil
|
Q[1]=nil
|
||||||
Q.s=0
|
Q.s=0
|
||||||
@@ -121,12 +121,13 @@ function VOC.play(s,chn)
|
|||||||
if chn then
|
if chn then
|
||||||
local L=voiceQueue[chn]
|
local L=voiceQueue[chn]
|
||||||
local _=VOC.list[s]
|
local _=VOC.list[s]
|
||||||
|
if not _ then print("no VOC called:"..s)return end
|
||||||
L[#L+1]=_[rnd(#_)]
|
L[#L+1]=_[rnd(#_)]
|
||||||
L.s=1
|
L.s=1
|
||||||
--添加到queue[chn]
|
--add to queue[chn]
|
||||||
else
|
else
|
||||||
voiceQueue[VOC.getFreeChannel()]={s=1,VOC.list[s][rnd(#VOC.list[s])]}
|
voiceQueue[VOC.getFreeChannel()]={s=1,VOC.list[s][rnd(#VOC.list[s])]}
|
||||||
--自动创建空轨/播放
|
--create new channel & play
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
194
parts/widget.lua
194
parts/widget.lua
@@ -1,21 +1,14 @@
|
|||||||
local gc=love.graphics
|
local gc=love.graphics
|
||||||
|
local kb=love.keyboard
|
||||||
|
local int=math.floor
|
||||||
local format=string.format
|
local format=string.format
|
||||||
|
local next=next
|
||||||
|
local EMPTY={}
|
||||||
|
|
||||||
local button={
|
local button={
|
||||||
type="button",
|
type="button",
|
||||||
ATV=0,--activating time(0~8)
|
ATV=0,--activating time(0~8)
|
||||||
}
|
}
|
||||||
function newButton(x,y,w,h,color,font,code,hide,N)
|
|
||||||
local _={
|
|
||||||
x=x-w*.5,y=y-h*.5,
|
|
||||||
w=w,h=h,
|
|
||||||
color=color,
|
|
||||||
font=font,
|
|
||||||
code=code,
|
|
||||||
hide=hide,
|
|
||||||
next=N,
|
|
||||||
}for k,v in next,button do _[k]=v end return _
|
|
||||||
end
|
|
||||||
function button:reset()
|
function button:reset()
|
||||||
self.ATV=0
|
self.ATV=0
|
||||||
end
|
end
|
||||||
@@ -26,7 +19,7 @@ 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)
|
sysFX.new("ripple",.16,self.x-self.ATV,self.y-self.ATV,self.w+2*self.ATV,self.h+2*self.ATV)
|
||||||
end
|
end
|
||||||
function button:update()
|
function button:update()
|
||||||
if widget_sel==self then
|
if WIDGET.sel==self then
|
||||||
if self.ATV<8 then self.ATV=self.ATV+1 end
|
if self.ATV<8 then self.ATV=self.ATV+1 end
|
||||||
else
|
else
|
||||||
if self.ATV>0 then self.ATV=self.ATV-1 end
|
if self.ATV>0 then self.ATV=self.ATV-1 end
|
||||||
@@ -65,15 +58,6 @@ local switch={
|
|||||||
ATV=0,--activating time(0~8)
|
ATV=0,--activating time(0~8)
|
||||||
CHK=0,--check alpha(0~6)
|
CHK=0,--check alpha(0~6)
|
||||||
}
|
}
|
||||||
function newSwitch(x,y,font,disp,code,hide,N)
|
|
||||||
local _={
|
|
||||||
x=x,y=y,font=font,
|
|
||||||
disp=disp,
|
|
||||||
code=code,
|
|
||||||
hide=hide,
|
|
||||||
next=N,
|
|
||||||
}for k,v in next,switch do _[k]=v end return _
|
|
||||||
end
|
|
||||||
function switch:reset()
|
function switch:reset()
|
||||||
self.ATV=0
|
self.ATV=0
|
||||||
self.CHK=0
|
self.CHK=0
|
||||||
@@ -83,7 +67,7 @@ function switch:isAbove(x,y)
|
|||||||
end
|
end
|
||||||
function switch:update()
|
function switch:update()
|
||||||
local _=self.ATV
|
local _=self.ATV
|
||||||
if widget_sel==self then if _<8 then self.ATV=_+1 end
|
if WIDGET.sel==self then if _<8 then self.ATV=_+1 end
|
||||||
else if _>0 then self.ATV=_-1 end
|
else if _>0 then self.ATV=_-1 end
|
||||||
end
|
end
|
||||||
_=self.CHK
|
_=self.CHK
|
||||||
@@ -123,18 +107,6 @@ local slider={
|
|||||||
ATV=0,--activating time(0~8)
|
ATV=0,--activating time(0~8)
|
||||||
pos=0,--position shown
|
pos=0,--position shown
|
||||||
}
|
}
|
||||||
function newSlider(x,y,w,unit,font,change,disp,code,hide,N)
|
|
||||||
local _={
|
|
||||||
x=x,y=y,
|
|
||||||
w=w,unit=unit,
|
|
||||||
font=font,
|
|
||||||
change=change,
|
|
||||||
disp=disp,
|
|
||||||
code=code,
|
|
||||||
hide=hide,
|
|
||||||
next=N,
|
|
||||||
}for k,v in next,slider do _[k]=v end return _
|
|
||||||
end
|
|
||||||
function slider:reset()
|
function slider:reset()
|
||||||
self.ATV=0
|
self.ATV=0
|
||||||
self.pos=0
|
self.pos=0
|
||||||
@@ -143,7 +115,7 @@ 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
|
return x>self.x-10 and x<self.x+self.w+10 and y>self.y-20 and y<self.y+20
|
||||||
end
|
end
|
||||||
function slider:update()
|
function slider:update()
|
||||||
if widget_sel==self then
|
if WIDGET.sel==self then
|
||||||
if self.ATV<6 then self.ATV=self.ATV+1 end
|
if self.ATV<6 then self.ATV=self.ATV+1 end
|
||||||
else
|
else
|
||||||
if self.ATV>0 then self.ATV=self.ATV-1 end
|
if self.ATV>0 then self.ATV=self.ATV-1 end
|
||||||
@@ -184,4 +156,154 @@ function slider:draw()
|
|||||||
end
|
end
|
||||||
function slider:getInfo()
|
function slider:getInfo()
|
||||||
print(format("x=%d,y=%d,w=%d",self.x,self.y,self.w))
|
print(format("x=%d,y=%d,w=%d",self.x,self.y,self.w))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local WIDGET={}
|
||||||
|
WIDGET.active=EMPTY--table, contains all active widgets
|
||||||
|
WIDGET.sel=nil--selected widget
|
||||||
|
function WIDGET.set(L)
|
||||||
|
WIDGET.sel=nil
|
||||||
|
WIDGET.active=L or EMPTY
|
||||||
|
if L then
|
||||||
|
for _,W in next,L do
|
||||||
|
W:reset()
|
||||||
|
end--Reset all widgets
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
WIDGET.new={}
|
||||||
|
function WIDGET.new.button(x,y,w,h,color,font,code,hide,N)
|
||||||
|
local _={
|
||||||
|
x=x-w*.5,y=y-h*.5,
|
||||||
|
w=w,h=h,
|
||||||
|
color=color,
|
||||||
|
font=font,
|
||||||
|
code=code,
|
||||||
|
hide=hide,
|
||||||
|
next=N,
|
||||||
|
}for k,v in next,button do _[k]=v end return _
|
||||||
|
end
|
||||||
|
function WIDGET.new.switch(x,y,font,disp,code,hide,N)
|
||||||
|
local _={
|
||||||
|
x=x,y=y,font=font,
|
||||||
|
disp=disp,
|
||||||
|
code=code,
|
||||||
|
hide=hide,
|
||||||
|
next=N,
|
||||||
|
}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)
|
||||||
|
local _={
|
||||||
|
x=x,y=y,
|
||||||
|
w=w,unit=unit,
|
||||||
|
font=font,
|
||||||
|
change=change,
|
||||||
|
disp=disp,
|
||||||
|
code=code,
|
||||||
|
hide=hide,
|
||||||
|
next=N,
|
||||||
|
}for k,v in next,slider do _[k]=v end return _
|
||||||
|
end
|
||||||
|
|
||||||
|
function WIDGET.moveCursor(x,y)
|
||||||
|
WIDGET.sel=nil
|
||||||
|
for _,W in next,WIDGET.active do
|
||||||
|
if not(W.hide and W.hide())and W:isAbove(x,y)then
|
||||||
|
WIDGET.sel=W
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
function WIDGET.press(x,y)
|
||||||
|
local W=WIDGET.sel
|
||||||
|
if not W then return end
|
||||||
|
if W.type=="button"then
|
||||||
|
W.code()
|
||||||
|
W:FX()
|
||||||
|
SFX.play("button")
|
||||||
|
VOC.play("nya")
|
||||||
|
elseif W.type=="switch"then
|
||||||
|
W.code()
|
||||||
|
SFX.play("move",.6)
|
||||||
|
elseif W.type=="slider"then
|
||||||
|
if not x then return end
|
||||||
|
local p,P=W.disp(),x<W.x and 0 or x>W.x+W.w and W.unit or int((x-W.x)*W.unit/W.w+.5)
|
||||||
|
if p==P then return end
|
||||||
|
W.code(P)
|
||||||
|
if W.change then W.change()end
|
||||||
|
end
|
||||||
|
if W.hide and W.hide()then WIDGET.sel=nil end
|
||||||
|
end
|
||||||
|
function WIDGET.drag(x,y,dx,dy)
|
||||||
|
local W=WIDGET.sel
|
||||||
|
if not W then return end
|
||||||
|
if W.type=="slider"then
|
||||||
|
local p,P=W.disp(),x<W.x and 0 or x>W.x+W.w and W.unit or int((x-W.x)*W.unit/W.w+.5)
|
||||||
|
if p==P then return end
|
||||||
|
W.code(P)
|
||||||
|
if W.change then W.change()end
|
||||||
|
elseif not W:isAbove(x,y)then
|
||||||
|
WIDGET.sel=nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
function WIDGET.keyPressed(i)
|
||||||
|
if i=="tab"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))
|
||||||
|
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
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
function WIDGET.gamepadPressed(i)
|
||||||
|
if i=="dpup"or i=="dpdown"then
|
||||||
|
if WIDGET.sel then
|
||||||
|
WIDGET.sel=i=="dpup"and WIDGET.sel.prev or WIDGET.sel.next or WIDGET.sel
|
||||||
|
else
|
||||||
|
WIDGET.sel=select(2,next(WIDGET.active))
|
||||||
|
end
|
||||||
|
elseif i=="start"then
|
||||||
|
if WIDGET.sel then
|
||||||
|
WIDGET.press(WIDGET.sel)
|
||||||
|
end
|
||||||
|
elseif i=="dpleft"or i=="dpright"then
|
||||||
|
if WIDGET.sel then
|
||||||
|
local W=WIDGET.sel
|
||||||
|
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
|
||||||
|
end
|
||||||
|
|
||||||
|
function WIDGET.update()
|
||||||
|
for _,W in next,WIDGET.active do W:update()end
|
||||||
|
end
|
||||||
|
function WIDGET.draw()
|
||||||
|
for _,W in next,WIDGET.active do
|
||||||
|
if not(W.hide and W.hide())then
|
||||||
|
W:draw()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return WIDGET
|
||||||
1417
player.lua
1417
player.lua
File diff suppressed because it is too large
Load Diff
32
scene.lua
32
scene.lua
@@ -50,8 +50,8 @@ local sceneInit={
|
|||||||
end,
|
end,
|
||||||
music=function()
|
music=function()
|
||||||
if BGM.nowPlay then
|
if BGM.nowPlay then
|
||||||
for i=1,#musicID do
|
for i=1,BGM.len do
|
||||||
if musicID[i]==BGM.nowPlay then
|
if BGM.list[i]==BGM.nowPlay then
|
||||||
sceneTemp=i--music select
|
sceneTemp=i--music select
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@@ -97,6 +97,13 @@ local sceneInit={
|
|||||||
BG.set(modeEnv.bg)
|
BG.set(modeEnv.bg)
|
||||||
end,
|
end,
|
||||||
pause=function(org)
|
pause=function(org)
|
||||||
|
if
|
||||||
|
org=="setting_game"or
|
||||||
|
org=="setting_video"or
|
||||||
|
org=="setting_sound"
|
||||||
|
then
|
||||||
|
TEXT.show(text.needRestart,640,440,50,"fly",.6)
|
||||||
|
end
|
||||||
local S=players[1].stat
|
local S=players[1].stat
|
||||||
sceneTemp={
|
sceneTemp={
|
||||||
timer=org=="play"and 0 or 50,
|
timer=org=="play"and 0 or 50,
|
||||||
@@ -113,7 +120,7 @@ local sceneInit={
|
|||||||
format("%d[%.2f%%]",S.extraPiece,100*max(1-S.extraRate/S.piece,0)),
|
format("%d[%.2f%%]",S.extraPiece,100*max(1-S.extraRate/S.piece,0)),
|
||||||
},
|
},
|
||||||
|
|
||||||
--从上开始,顺时针90°
|
--from right-down, 60 degree each
|
||||||
radar={
|
radar={
|
||||||
(S.recv-S.pend+S.dig)/S.time*60,--DefPM
|
(S.recv-S.pend+S.dig)/S.time*60,--DefPM
|
||||||
(S.recv-S.pend)/S.time*60, --OffPM
|
(S.recv-S.pend)/S.time*60, --OffPM
|
||||||
@@ -161,11 +168,11 @@ local sceneInit={
|
|||||||
setting_game=function()
|
setting_game=function()
|
||||||
BG.set("space")
|
BG.set("space")
|
||||||
end,
|
end,
|
||||||
setting_graphic=function()
|
setting_video=function()
|
||||||
BG.set("space")
|
BG.set("space")
|
||||||
end,
|
end,
|
||||||
setting_sound=function()
|
setting_sound=function()
|
||||||
sceneTemp={last=0,jump=0}--last sound time,animation count(10→0)
|
sceneTemp={last=0,jump=0}--last sound time,animation count(10 to 0)
|
||||||
BG.set("space")
|
BG.set("space")
|
||||||
end,
|
end,
|
||||||
setting_control=function()
|
setting_control=function()
|
||||||
@@ -263,11 +270,12 @@ local backFunc={
|
|||||||
mergeStat(stat,players[1].stat)
|
mergeStat(stat,players[1].stat)
|
||||||
TASK.clear("play")
|
TASK.clear("play")
|
||||||
end,
|
end,
|
||||||
|
setting_game= function()FILE.saveSetting()end,
|
||||||
|
setting_video= function()FILE.saveSetting()end,
|
||||||
|
setting_sound= function()FILE.saveSetting()end,
|
||||||
setting_touch= function()FILE.saveVK()end,
|
setting_touch= function()FILE.saveVK()end,
|
||||||
setting_key= function()FILE.saveKeyMap()end,
|
setting_key= function()FILE.saveKeyMap()end,
|
||||||
setting_game= function()FILE.saveSetting()end,
|
setting_lang= function()FILE.saveSetting()end,
|
||||||
setting_graphic=function()FILE.saveSetting()end,
|
|
||||||
setting_sound= function()FILE.saveSetting()end,
|
|
||||||
}
|
}
|
||||||
function SCN.swapUpdate()
|
function SCN.swapUpdate()
|
||||||
local S=SCN.swap
|
local S=SCN.swap
|
||||||
@@ -275,12 +283,9 @@ function SCN.swapUpdate()
|
|||||||
if S.time==S.mid then
|
if S.time==S.mid then
|
||||||
SCN.init(S.tar,SCN.cur)
|
SCN.init(S.tar,SCN.cur)
|
||||||
SCN.cur=S.tar
|
SCN.cur=S.tar
|
||||||
for _,W in next,Widget[S.tar]do
|
WIDGET.set(widgetList[S.tar])
|
||||||
W:reset()
|
|
||||||
end--重置控件
|
|
||||||
widget_sel=nil
|
|
||||||
collectgarbage()
|
collectgarbage()
|
||||||
--此时场景切换
|
--Scene swapped this moment
|
||||||
end
|
end
|
||||||
if S.time==0 then
|
if S.time==0 then
|
||||||
SCN.swapping=false
|
SCN.swapping=false
|
||||||
@@ -311,7 +316,6 @@ function SCN.swapTo(tar,style)
|
|||||||
S.time=swap[1]
|
S.time=swap[1]
|
||||||
S.mid=swap[2]
|
S.mid=swap[2]
|
||||||
S.draw=swap[3]
|
S.draw=swap[3]
|
||||||
widget_sel=nil
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function SCN.back()
|
function SCN.back()
|
||||||
|
|||||||
@@ -1,30 +1,29 @@
|
|||||||
#define PI 3.14
|
#define PI 3.14
|
||||||
extern float xresolution;
|
extern float xresolution;
|
||||||
//从1D距离map采样
|
//sample from 1D vis-depth map
|
||||||
float samp(vec2 coord,float r,Image u_texture){
|
float samp(vec2 coord,float r,Image u_texture){
|
||||||
return step(r,Texel(u_texture,coord).r);
|
return step(r,Texel(u_texture,coord).r);
|
||||||
}
|
}
|
||||||
vec4 effect(vec4 color,Image texture,vec2 texture_coords,vec2 screen_coords){
|
vec4 effect(vec4 color,Image texture,vec2 texture_coords,vec2 screen_coords){
|
||||||
//直角转极坐标,用于采样1D材质的y总是0
|
//cartesian to polar, y of 1D sample is always 0
|
||||||
vec2 norm=texture_coords.st*2.-1.;
|
vec2 norm=texture_coords.st*2.-1.;
|
||||||
float r=length(norm);
|
float r=length(norm);
|
||||||
vec2 tc=vec2((atan(norm.y,norm.x)+PI)/(2.*PI),0.);
|
vec2 tc=vec2((atan(norm.y,norm.x)+PI)/(2.*PI),0.);
|
||||||
//根据离光源距离放大模糊系数,模拟影子淡出
|
|
||||||
float blur=(1./xresolution)*smoothstep(0.,1.,r);
|
|
||||||
|
|
||||||
//简易高斯模糊
|
//enlarge blur parameter by distance, light scattering simulation
|
||||||
float sum=
|
float blur=(1./xresolution)*smoothstep(.3,1.,r);
|
||||||
samp(vec2(tc.x-4.*blur,tc.y),r,texture)*.5
|
|
||||||
+samp(vec2(tc.x-3.*blur,tc.y),r,texture)*.9
|
|
||||||
+samp(vec2(tc.x-2.*blur,tc.y),r,texture)*.12
|
|
||||||
+samp(vec2(tc.x-1.*blur,tc.y),r,texture)*.15
|
|
||||||
|
|
||||||
+samp(tc,r,texture)*.16//The center tex coord,which gives us hard shadows.
|
//Simple Gaussian blur
|
||||||
+samp(vec2(tc.x+1.*blur,tc.y),r,texture)*.15
|
float sum=//brightness(0~1)
|
||||||
+samp(vec2(tc.x+2.*blur,tc.y),r,texture)*.12
|
samp(vec2(tc.x-3.*blur,tc.y),r,texture)*.1
|
||||||
+samp(vec2(tc.x+3.*blur,tc.y),r,texture)*.9
|
+samp(vec2(tc.x-2.*blur,tc.y),r,texture)*.13
|
||||||
+samp(vec2(tc.x+4.*blur,tc.y),r,texture)*.5;
|
+samp(vec2(tc.x-1.*blur,tc.y),r,texture)*.17
|
||||||
//sum值为亮度(0~1)
|
|
||||||
//乘上距离得到逐渐变淡的光线
|
+samp(tc,r,texture)*.2//The center tex coord,which gives us hard shadows.
|
||||||
return vec4(vec3(1.),sum*smoothstep(1.,.1,r));
|
+samp(vec2(tc.x+1.*blur,tc.y),r,texture)*.17
|
||||||
|
+samp(vec2(tc.x+2.*blur,tc.y),r,texture)*.13
|
||||||
|
+samp(vec2(tc.x+3.*blur,tc.y),r,texture)*.1;
|
||||||
|
|
||||||
|
//Multiply the distance to get a soft fading
|
||||||
|
return vec4(vec3(1.),sum*smoothstep(1.,0.,r));
|
||||||
}
|
}
|
||||||
@@ -3,14 +3,19 @@ extern float yresolution;
|
|||||||
vec4 effect(vec4 color,Image texture,vec2 texture_coords,vec2 screen_coords){
|
vec4 effect(vec4 color,Image texture,vec2 texture_coords,vec2 screen_coords){
|
||||||
//Iterate through the occluder map's y-axis.
|
//Iterate through the occluder map's y-axis.
|
||||||
for(float y=0.;y<yresolution;y++){
|
for(float y=0.;y<yresolution;y++){
|
||||||
//直角转极坐标
|
//cartesian to polar
|
||||||
|
// y/yresolution=distance to light source(0~1)
|
||||||
vec2 norm=vec2(texture_coords.s,y/yresolution)*2.-1.;
|
vec2 norm=vec2(texture_coords.s,y/yresolution)*2.-1.;
|
||||||
float theta=PI*1.5+norm.x*PI;
|
float theta=PI*1.5+norm.x*PI;
|
||||||
float r=(1.+norm.y)*.5;
|
float r=(1.+norm.y)*.5;
|
||||||
//y/yresolution为到光源的距离(0~1)
|
|
||||||
//遮光物采样
|
//sample from solid
|
||||||
vec4 data=Texel(texture,(vec2(-r*sin(theta),-r*cos(theta))*.5+.5));//vec2()..是遮光物采样的coord
|
if(
|
||||||
if(data.a>.1)return vec4(vec3(y/yresolution),1.);//碰撞检测,像素透明度>.1即透光
|
Texel(texture,(
|
||||||
|
vec2(-r*sin(theta),-r*cos(theta))*.5+.5//coord of solid sampling
|
||||||
|
))
|
||||||
|
.a>.1
|
||||||
|
)return vec4(vec3(y/yresolution),1.);//collision check, alpha>0.1 means transparent
|
||||||
}
|
}
|
||||||
return vec4(1,1,1,1);//返回最远距离1
|
return vec4(1.,1.,1.,1.);//return max distance 1
|
||||||
}
|
}
|
||||||
19
texture.lua
19
texture.lua
@@ -13,7 +13,7 @@ gc.setDefaultFilter("nearest","nearest")
|
|||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
local VKI=N("/image/virtualkey.png")
|
local VKI=N("/image/virtualkey.png")
|
||||||
VKIcon={}
|
VKIcon={}
|
||||||
for i=1,#actName do
|
for i=1,20 do
|
||||||
VKIcon[i]=C(36,36)
|
VKIcon[i]=C(36,36)
|
||||||
gc.draw(VKI,(i-1)%5*-36,int((i-1)*.2)*-36)
|
gc.draw(VKI,(i-1)%5*-36,int((i-1)*.2)*-36)
|
||||||
end
|
end
|
||||||
@@ -35,18 +35,7 @@ gc.setLineWidth(4)
|
|||||||
gc.line(0,20,40,20)
|
gc.line(0,20,40,20)
|
||||||
gc.line(20,0,20,40)
|
gc.line(20,0,20,40)
|
||||||
|
|
||||||
c=C(6,6)
|
|
||||||
gc.clear(1,1,1)
|
|
||||||
clearDust=gc.newParticleSystem(c,1000)
|
|
||||||
c:release()
|
|
||||||
clearDust:setParticleLifetime(.2,.3)
|
|
||||||
clearDust:setEmissionRate(0)
|
|
||||||
clearDust:setLinearAcceleration(-1500,-200,1500,200)
|
|
||||||
clearDust:setColors(1,1,1,.5,1,1,1,0)
|
|
||||||
--Dust particles
|
|
||||||
|
|
||||||
gc.setDefaultFilter("linear","linear")
|
gc.setDefaultFilter("linear","linear")
|
||||||
batteryImage=N("/image/mess/power.png")
|
|
||||||
|
|
||||||
drawableText={
|
drawableText={
|
||||||
question=T(100,"?"),
|
question=T(100,"?"),
|
||||||
@@ -65,11 +54,11 @@ drawableText={
|
|||||||
mxcmb=T(20,"Max Combo"),
|
mxcmb=T(20,"Max Combo"),
|
||||||
pc=T(20,"Perfect Clear"),
|
pc=T(20,"Perfect Clear"),
|
||||||
ko=T(25,"KO"),
|
ko=T(25,"KO"),
|
||||||
|
D=T(100,"D"),
|
||||||
C=T(100,"C"),
|
C=T(100,"C"),
|
||||||
B=T(100,"B"),
|
B=T(100,"B"),
|
||||||
A=T(100,"A"),
|
A=T(100,"A"),
|
||||||
S=T(100,"S"),
|
S=T(100,"S"),
|
||||||
SS=T(80,"SS"),
|
|
||||||
|
|
||||||
|
|
||||||
modeName=T(30),levelName=T(30),
|
modeName=T(30),levelName=T(30),
|
||||||
@@ -81,7 +70,7 @@ drawableText={
|
|||||||
lose=T(120),pause=T(120),
|
lose=T(120),pause=T(120),
|
||||||
|
|
||||||
custom=T(80),
|
custom=T(80),
|
||||||
setting_game=T(80),setting_graphic=T(80),setting_sound=T(80),
|
setting_game=T(80),setting_video=T(80),setting_sound=T(80),
|
||||||
setting_control=T(70),setting_skin=T(70),
|
setting_control=T(70),setting_skin=T(70),
|
||||||
preview=T(40),
|
preview=T(40),
|
||||||
keyboard=T(25),joystick=T(25),
|
keyboard=T(25),joystick=T(25),
|
||||||
@@ -89,7 +78,7 @@ drawableText={
|
|||||||
musicRoom=T(80),
|
musicRoom=T(80),
|
||||||
nowPlaying=T(50),
|
nowPlaying=T(50),
|
||||||
VKTchW=T(30),VKOrgW=T(30),VKCurW=T(30),
|
VKTchW=T(30),VKOrgW=T(30),VKCurW=T(30),
|
||||||
noScore=T(50),
|
noScore=T(45),
|
||||||
highScore=T(30),
|
highScore=T(30),
|
||||||
}
|
}
|
||||||
gc.setCanvas()
|
gc.setCanvas()
|
||||||
@@ -28,7 +28,7 @@ function Tmr.load()
|
|||||||
-- M.icon=gc.newImage("image/modeIcon/"..m.icon..".png")
|
-- M.icon=gc.newImage("image/modeIcon/"..m.icon..".png")
|
||||||
-- M.icon=gc.newImage("image/modeIcon/custom.png")
|
-- M.icon=gc.newImage("image/modeIcon/custom.png")
|
||||||
elseif S.phase==6 then
|
elseif S.phase==6 then
|
||||||
--------------------------Loading some other things here?
|
--------------------------Loading other little things here
|
||||||
SKIN.load()
|
SKIN.load()
|
||||||
stat.run=stat.run+1
|
stat.run=stat.run+1
|
||||||
--------------------------
|
--------------------------
|
||||||
@@ -52,7 +52,7 @@ function Tmr.load()
|
|||||||
S.tar=1
|
S.tar=1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
until not S.skip or SCN.swapping
|
until not S.skip and Timer()-t>.01
|
||||||
end
|
end
|
||||||
function Tmr.intro()
|
function Tmr.intro()
|
||||||
sceneTemp=sceneTemp+1
|
sceneTemp=sceneTemp+1
|
||||||
@@ -239,8 +239,8 @@ function Tmr.play(dt)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
function Tmr.pause(dt)
|
function Tmr.pause(dt)
|
||||||
if not gameResult then
|
if not game.result then
|
||||||
pauseTime=pauseTime+dt
|
game.pauseTime=game.pauseTime+dt
|
||||||
end
|
end
|
||||||
if sceneTemp.timer<50 then
|
if sceneTemp.timer<50 then
|
||||||
sceneTemp.timer=sceneTemp.timer+1
|
sceneTemp.timer=sceneTemp.timer+1
|
||||||
|
|||||||
71
toolfunc.lua
71
toolfunc.lua
@@ -29,7 +29,6 @@ function destroyPlayers()
|
|||||||
for i=#players,1,-1 do
|
for i=#players,1,-1 do
|
||||||
local P=players[i]
|
local P=players[i]
|
||||||
if P.canvas then P.canvas:release()end
|
if P.canvas then P.canvas:release()end
|
||||||
if P.dust then P.dust:release()end
|
|
||||||
while P.field[1]do
|
while P.field[1]do
|
||||||
freeRow.discard(rem(P.field))
|
freeRow.discard(rem(P.field))
|
||||||
freeRow.discard(rem(P.visTime))
|
freeRow.discard(rem(P.visTime))
|
||||||
@@ -127,8 +126,8 @@ function pasteBoard()
|
|||||||
::ERROR::TEXT.show(text.dataCorrupted,350,360,35,"flicker",.5)
|
::ERROR::TEXT.show(text.dataCorrupted,350,360,35,"flicker",.5)
|
||||||
end
|
end
|
||||||
|
|
||||||
function mergeStat(stat,Δ)
|
function mergeStat(stat,delta)
|
||||||
for k,v in next,Δ do
|
for k,v in next,delta do
|
||||||
if type(v)=="table"then
|
if type(v)=="table"then
|
||||||
mergeStat(stat[k],v)
|
mergeStat(stat[k],v)
|
||||||
else
|
else
|
||||||
@@ -146,53 +145,53 @@ function randomTarget(P)
|
|||||||
end
|
end
|
||||||
end--return a random opponent for P
|
end--return a random opponent for P
|
||||||
function freshMostDangerous()
|
function freshMostDangerous()
|
||||||
mostDangerous,secDangerous=nil
|
game.mostDangerous,game.secDangerous=nil
|
||||||
local m,m2=0,0
|
local m,m2=0,0
|
||||||
for i=1,#players.alive do
|
for i=1,#players.alive do
|
||||||
local h=#players.alive[i].field
|
local h=#players.alive[i].field
|
||||||
if h>=m then
|
if h>=m then
|
||||||
mostDangerous,secDangerous=players.alive[i],mostDangerous
|
game.mostDangerous,game.secDangerous=players.alive[i],game.mostDangerous
|
||||||
m,m2=h,m
|
m,m2=h,m
|
||||||
elseif h>=m2 then
|
elseif h>=m2 then
|
||||||
secDangerous=players.alive[i]
|
game.secDangerous=players.alive[i]
|
||||||
m2=h
|
m2=h
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function freshMostBadge()
|
function freshMostBadge()
|
||||||
mostBadge,secBadge=nil
|
game.mostBadge,game.secBadge=nil
|
||||||
local m,m2=0,0
|
local m,m2=0,0
|
||||||
for i=1,#players.alive do
|
for i=1,#players.alive do
|
||||||
local h=players.alive[i].badge
|
local h=players.alive[i].badge
|
||||||
if h>=m then
|
if h>=m then
|
||||||
mostBadge,secBadge=players.alive[i],mostBadge
|
game.mostBadge,game.secBadge=players.alive[i],game.mostBadge
|
||||||
m,m2=h,m
|
m,m2=h,m
|
||||||
elseif h>=m2 then
|
elseif h>=m2 then
|
||||||
secBadge=players.alive[i]
|
game.secBadge=players.alive[i]
|
||||||
m2=h
|
m2=h
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function royaleLevelup()
|
function royaleLevelup()
|
||||||
gameStage=gameStage+1
|
game.stage=game.stage+1
|
||||||
local spd
|
local spd
|
||||||
TEXT.show(text.royale_remain(#players.alive),640,200,40,"beat",.3)
|
TEXT.show(text.royale_remain(#players.alive),640,200,40,"beat",.3)
|
||||||
if gameStage==2 then
|
if game.stage==2 then
|
||||||
spd=30
|
spd=30
|
||||||
elseif gameStage==3 then
|
elseif game.stage==3 then
|
||||||
spd=15
|
spd=15
|
||||||
garbageSpeed=.6
|
game.garbageSpeed=.6
|
||||||
if players[1].alive then BGM.play("cruelty")end
|
if players[1].alive then BGM.play("cruelty")end
|
||||||
elseif gameStage==4 then
|
elseif game.stage==4 then
|
||||||
spd=10
|
spd=10
|
||||||
local _=players.alive
|
local _=players.alive
|
||||||
for i=1,#_ do
|
for i=1,#_ do
|
||||||
_[i].gameEnv.pushSpeed=3
|
_[i].gameEnv.pushSpeed=3
|
||||||
end
|
end
|
||||||
elseif gameStage==5 then
|
elseif game.stage==5 then
|
||||||
spd=5
|
spd=5
|
||||||
garbageSpeed=1
|
game.garbageSpeed=1
|
||||||
elseif gameStage==6 then
|
elseif game.stage==6 then
|
||||||
spd=3
|
spd=3
|
||||||
if players[1].alive then BGM.play("final")end
|
if players[1].alive then BGM.play("final")end
|
||||||
end
|
end
|
||||||
@@ -214,8 +213,8 @@ end
|
|||||||
function pauseGame()
|
function pauseGame()
|
||||||
if not SCN.swapping then
|
if not SCN.swapping then
|
||||||
restartCount=0--Avoid strange darkness
|
restartCount=0--Avoid strange darkness
|
||||||
if not gameResult then
|
if not game.result then
|
||||||
pauseCount=pauseCount+1
|
game.pauseCount=game.pauseCount+1
|
||||||
end
|
end
|
||||||
for i=1,#players do
|
for i=1,#players do
|
||||||
local l=players[i].keyPressing
|
local l=players[i].keyPressing
|
||||||
@@ -243,18 +242,16 @@ function loadGame(M)
|
|||||||
SFX.play("enter")
|
SFX.play("enter")
|
||||||
end
|
end
|
||||||
function resetPartGameData()
|
function resetPartGameData()
|
||||||
gameResult=false
|
game={
|
||||||
|
result=false,
|
||||||
|
pauseTime=0,
|
||||||
|
pauseCount=0,
|
||||||
|
garbageSpeed=1,
|
||||||
|
}
|
||||||
frame=150-setting.reTime*15
|
frame=150-setting.reTime*15
|
||||||
pauseTime=0
|
|
||||||
pauseCount=0
|
|
||||||
destroyPlayers()
|
destroyPlayers()
|
||||||
curMode.load()
|
curMode.load()
|
||||||
TEXT.clear()
|
TEXT.clear()
|
||||||
for i=1,#players do
|
|
||||||
if players.dust then
|
|
||||||
players.dust:reset()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if modeEnv.task then
|
if modeEnv.task then
|
||||||
for i=1,#players do
|
for i=1,#players do
|
||||||
TASK.new(modeEnv.task,players[i])
|
TASK.new(modeEnv.task,players[i])
|
||||||
@@ -271,19 +268,20 @@ function resetPartGameData()
|
|||||||
for i=1,#players do
|
for i=1,#players do
|
||||||
players[i]:changeAtk(randomTarget(players[i]))
|
players[i]:changeAtk(randomTarget(players[i]))
|
||||||
end
|
end
|
||||||
mostBadge,mostDangerous,secBadge,secDangerous=nil
|
game.stage=1
|
||||||
gameStage=1
|
game.garbageSpeed=.3
|
||||||
garbageSpeed=.3
|
|
||||||
end
|
end
|
||||||
restoreVirtualKey()
|
restoreVirtualKey()
|
||||||
collectgarbage()
|
collectgarbage()
|
||||||
end
|
end
|
||||||
function resetGameData()
|
function resetGameData()
|
||||||
gameResult=false
|
game={
|
||||||
|
result=false,
|
||||||
|
pauseTime=0,--Time paused
|
||||||
|
pauseCount=0,--Pausing count
|
||||||
|
garbageSpeed=1,--garbage timing speed
|
||||||
|
}
|
||||||
frame=150-setting.reTime*15
|
frame=150-setting.reTime*15
|
||||||
garbageSpeed=1
|
|
||||||
pauseTime=0--Time paused
|
|
||||||
pauseCount=0--Pausing count
|
|
||||||
destroyPlayers()
|
destroyPlayers()
|
||||||
modeEnv=curMode.env
|
modeEnv=curMode.env
|
||||||
curMode.load()--bg/bgm need redefine in custom,so up here
|
curMode.load()--bg/bgm need redefine in custom,so up here
|
||||||
@@ -302,9 +300,8 @@ function resetGameData()
|
|||||||
for i=1,#players do
|
for i=1,#players do
|
||||||
players[i]:changeAtk(randomTarget(players[i]))
|
players[i]:changeAtk(randomTarget(players[i]))
|
||||||
end
|
end
|
||||||
mostBadge,mostDangerous,secBadge,secDangerous=nil
|
game.stage=1
|
||||||
gameStage=1
|
game.garbageSpeed=.3
|
||||||
garbageSpeed=.3
|
|
||||||
end
|
end
|
||||||
restoreVirtualKey()
|
restoreVirtualKey()
|
||||||
stat.game=stat.game+1
|
stat.game=stat.game+1
|
||||||
|
|||||||
404
updateLog.lua
404
updateLog.lua
@@ -1,46 +1,56 @@
|
|||||||
local S=[=[
|
local S=[=[
|
||||||
"Patron"(time ordered,may not accurate):
|
"Patron"(time ordered,may not accurate):
|
||||||
[rmb100+]:
|
[rmb100+]:
|
||||||
那没事了(T6300)
|
那没事了(T6300)
|
||||||
弥佑瑶
|
加油啊,钉钉动了的大哥哥(T3228)
|
||||||
Alan
|
弥佑瑶
|
||||||
|
Alan
|
||||||
[rmb10+]:
|
[rmb10+]:
|
||||||
八零哥
|
八零哥
|
||||||
蕴空之灵
|
蕴空之灵
|
||||||
gggf127
|
gggf127
|
||||||
dtg
|
dtg
|
||||||
ThTsOd
|
ThTsOd
|
||||||
Fireboos
|
Fireboos
|
||||||
金巧
|
金巧
|
||||||
10元
|
10元
|
||||||
立斐
|
立斐
|
||||||
时雪
|
时雪
|
||||||
yyangdid
|
yyangdid
|
||||||
sfqr
|
sfqr
|
||||||
心痕
|
心痕
|
||||||
Sasoric
|
Sasoric
|
||||||
夏小亚
|
夏小亚
|
||||||
加油啊,钉钉动了的大哥哥(T3228)
|
仁参
|
||||||
仁参
|
乐↗乐↘
|
||||||
乐↗乐↘
|
喜欢c4w的ztcjoin
|
||||||
喜欢c4w的ztcjoin
|
面包
|
||||||
面包
|
蠢熏
|
||||||
蠢熏
|
潘一栗
|
||||||
潘一栗
|
Lied
|
||||||
Lied
|
星街书婉
|
||||||
星街书婉
|
込余
|
||||||
込余
|
祝西
|
||||||
祝西
|
829
|
||||||
829
|
e m*12
|
||||||
e m*12
|
我永远爱白银诺艾尔(鹏
|
||||||
我永远爱白银诺艾尔(鹏
|
PCX
|
||||||
PCX
|
kagura77
|
||||||
(D*a)
|
呆喂
|
||||||
|
GlowingEmbers
|
||||||
|
轩辕辚
|
||||||
|
HimuroAki
|
||||||
|
tech有养成系统了@7065
|
||||||
|
HAGE KANOBU
|
||||||
|
葡萄味的曼妥思
|
||||||
|
(闪电和拐棍)
|
||||||
|
(D*a)
|
||||||
|
|
||||||
Thanks!
|
Thanks!!!
|
||||||
|
|
||||||
Future outlook:
|
Future outlook:
|
||||||
New mode:
|
New mode:
|
||||||
|
tutorial
|
||||||
game Abbr. test
|
game Abbr. test
|
||||||
backfire
|
backfire
|
||||||
finesse exam(3next, 1pt/mino, drop to score)
|
finesse exam(3next, 1pt/mino, drop to score)
|
||||||
@@ -48,9 +58,14 @@ Future outlook:
|
|||||||
bigbang
|
bigbang
|
||||||
rhythm
|
rhythm
|
||||||
combo
|
combo
|
||||||
aquare
|
square
|
||||||
field shifting(left/right)
|
field shifting(left/right)
|
||||||
task-based survival
|
task survival
|
||||||
|
dig practice
|
||||||
|
dig zen
|
||||||
|
symmetry
|
||||||
|
hidden mode: sound only
|
||||||
|
reverb mode (often repeat a piece many times)
|
||||||
Other:
|
Other:
|
||||||
mod system with:
|
mod system with:
|
||||||
block hidden
|
block hidden
|
||||||
@@ -60,21 +75,49 @@ Future outlook:
|
|||||||
next hidden
|
next hidden
|
||||||
field flip(LR/UD)
|
field flip(LR/UD)
|
||||||
no fail(∞ lives)
|
no fail(∞ lives)
|
||||||
防沉迷系统
|
简易防沉迷系统
|
||||||
|
in-game document
|
||||||
lang setting page
|
lang setting page
|
||||||
warning FX(Graphic)
|
warning FX(Graphic)
|
||||||
game recording
|
game recording
|
||||||
powerinfo switch
|
new widgets (joystick etc.)
|
||||||
new virtualWidgets like joysticks
|
custom sequence(TTT!)
|
||||||
custom sequence
|
|
||||||
splashing block
|
splashing block
|
||||||
cool backgrounds
|
cool backgrounds
|
||||||
more graphic FXs & 3D features & animations
|
more graphic FXs & 3D features & animations
|
||||||
Encrypt source code(compile to byte code)
|
Encrypt source code (compile to byte code)
|
||||||
new AI: task-Z
|
new AI: task-Z
|
||||||
smarter CC(think of garbage buffer)
|
|
||||||
|
|
||||||
0.8.18:Details Update II
|
0.8.19/20: Fantastic Global Update II
|
||||||
|
new:
|
||||||
|
new clearing FX
|
||||||
|
pentomino with new rotation system (testing)
|
||||||
|
new PC training mode with over 1000 quiz
|
||||||
|
new English translation by @MattMayuga#8789
|
||||||
|
new language: ???
|
||||||
|
language-setting page
|
||||||
|
[C B A S SS]→[D C B A S]
|
||||||
|
powerinfo switch
|
||||||
|
changed:
|
||||||
|
resume/quit key changed on pause page (quit with Q, resume with esc)
|
||||||
|
warning when back to pause page from setting page
|
||||||
|
some FX based on real time
|
||||||
|
tiny change (almost nothing) changed for powerInfo
|
||||||
|
page turing of in-game update log changed
|
||||||
|
readable update log of 0.8+ ver
|
||||||
|
some new "tips"
|
||||||
|
add ENG ver. document(not in game)
|
||||||
|
code:
|
||||||
|
swap id of J/L
|
||||||
|
wall-kick list easier to read
|
||||||
|
no utf8 char in code/comments
|
||||||
|
less global variables
|
||||||
|
light module optimized (but not used)
|
||||||
|
code optimized
|
||||||
|
fixed:
|
||||||
|
impossible to get SS in attacker mode
|
||||||
|
|
||||||
|
0.8.18: Details Update II
|
||||||
new:
|
new:
|
||||||
adjustable virtualkey SFX & VIB
|
adjustable virtualkey SFX & VIB
|
||||||
changed:
|
changed:
|
||||||
@@ -87,7 +130,7 @@ Future outlook:
|
|||||||
delete all removable "goto"s!
|
delete all removable "goto"s!
|
||||||
callback system moduled, main.lua easy to read
|
callback system moduled, main.lua easy to read
|
||||||
|
|
||||||
0.8.17:Details Update
|
0.8.17: Details Update
|
||||||
new:
|
new:
|
||||||
bag seperating line switch
|
bag seperating line switch
|
||||||
better radar chart & statistics on pause page
|
better radar chart & statistics on pause page
|
||||||
@@ -114,7 +157,8 @@ Future outlook:
|
|||||||
moving block when changing target in t49/t99
|
moving block when changing target in t49/t99
|
||||||
font error in patron list
|
font error in patron list
|
||||||
do not reset pause count when restart
|
do not reset pause count when restart
|
||||||
0.8.16:Fantastic Global Update
|
|
||||||
|
0.8.16: Fantastic Global Update
|
||||||
new:
|
new:
|
||||||
new statistic page with:
|
new statistic page with:
|
||||||
Radar chart which shows some important info. of player's performance
|
Radar chart which shows some important info. of player's performance
|
||||||
@@ -147,7 +191,8 @@ Future outlook:
|
|||||||
error when set to max 0 next
|
error when set to max 0 next
|
||||||
AI sequence initializing error when face setting changed
|
AI sequence initializing error when face setting changed
|
||||||
DAS error
|
DAS error
|
||||||
0.8.15:Bug Fixed
|
|
||||||
|
0.8.15: Bug Fixed
|
||||||
new:
|
new:
|
||||||
can switch line-clear text now
|
can switch line-clear text now
|
||||||
new attack way "Clear"(half-clear)
|
new attack way "Clear"(half-clear)
|
||||||
@@ -163,7 +208,7 @@ Future outlook:
|
|||||||
error when reach 400 in 20G(Lunatic)
|
error when reach 400 in 20G(Lunatic)
|
||||||
error block color in modes with starting field
|
error block color in modes with starting field
|
||||||
|
|
||||||
0.8.14:Cool FX
|
0.8.14: Cool FX
|
||||||
new:
|
new:
|
||||||
click/tap/any-key to skip loading animation
|
click/tap/any-key to skip loading animation
|
||||||
lock animation
|
lock animation
|
||||||
@@ -178,7 +223,7 @@ Future outlook:
|
|||||||
some times error when touch screen
|
some times error when touch screen
|
||||||
touch/press release with no press, then error
|
touch/press release with no press, then error
|
||||||
|
|
||||||
0.8.13:O-spin Update++
|
0.8.13: O-spin Update++
|
||||||
new:
|
new:
|
||||||
a independent page to set DAS/ARR, with an animation for preview
|
a independent page to set DAS/ARR, with an animation for preview
|
||||||
changed:
|
changed:
|
||||||
@@ -190,9 +235,9 @@ Future outlook:
|
|||||||
wrong behavior in pause scene
|
wrong behavior in pause scene
|
||||||
ospin error in 0.8.12
|
ospin error in 0.8.12
|
||||||
memory leakage in t49/t99
|
memory leakage in t49/t99
|
||||||
new behavior of widgets
|
unnatural behavior of widgets
|
||||||
|
|
||||||
0.8.12:Bountful Update
|
0.8.12: Bountful Update
|
||||||
new:
|
new:
|
||||||
layout setting: skin system with customizable block color/direction
|
layout setting: skin system with customizable block color/direction
|
||||||
more information when pause
|
more information when pause
|
||||||
@@ -221,7 +266,7 @@ Future outlook:
|
|||||||
stage reset problem in t49/t99
|
stage reset problem in t49/t99
|
||||||
wrong info in tech-L/U/U+ mode
|
wrong info in tech-L/U/U+ mode
|
||||||
|
|
||||||
0.8.11:Total Update
|
0.8.11: Total Update
|
||||||
changed:
|
changed:
|
||||||
better rule of checking invalid game
|
better rule of checking invalid game
|
||||||
can setting when pause
|
can setting when pause
|
||||||
@@ -236,7 +281,7 @@ Future outlook:
|
|||||||
some O-spin error
|
some O-spin error
|
||||||
error line counting when pc(full b2b)
|
error line counting when pc(full b2b)
|
||||||
|
|
||||||
0.8.10:Cool Update
|
0.8.10: Cool Update
|
||||||
new:
|
new:
|
||||||
new BGM:Distortion(master-final)
|
new BGM:Distortion(master-final)
|
||||||
all background darker
|
all background darker
|
||||||
@@ -245,97 +290,127 @@ Future outlook:
|
|||||||
error when finish master/ultra mode
|
error when finish master/ultra mode
|
||||||
shakeFX no effect when below 3
|
shakeFX no effect when below 3
|
||||||
|
|
||||||
0.8.9:System Detail Update
|
0.8.9: System Detail Update
|
||||||
invalid game when pause too much
|
new:
|
||||||
quick play re-added
|
invalid game when pause too much
|
||||||
new BGM: Oxygen(c4w&pc training)
|
quick play re-added
|
||||||
space background little changed
|
new BGM: Oxygen(c4w&pc training)
|
||||||
|
changed:
|
||||||
|
space background little changed
|
||||||
|
|
||||||
0.8.8+:Bug-Fix Update
|
0.8.8+: Bug-Fix Update
|
||||||
fixed many fatal bugs
|
fixed many fatal bugs
|
||||||
|
|
||||||
0.8.8:Space BG Update
|
0.8.8: Space BG Update
|
||||||
background now is cool space with "planets" and "stars", not boring falling tetrominos!
|
new:
|
||||||
records with date
|
background now is cool space with "planets" and "stars", instead of boring falling tetrominos
|
||||||
adjustable waiting time before start
|
no black side in any screen size
|
||||||
ajustable maxnext count
|
adjustable waiting time before start
|
||||||
new error page and a new voice
|
ajustable maxnext count
|
||||||
tiny change in rotate system(JL pistol-spin)
|
marked the modes with limited das/arr
|
||||||
marked the modes with limited das/arr
|
new error page and a new voice
|
||||||
better board copy/paste
|
add many fatal bugs
|
||||||
no black side in any screen size
|
changed:
|
||||||
an unlock-all easter egg
|
simple records with date
|
||||||
cannot press invisible func key
|
tiny change in rotate system(JL pistol-spin)
|
||||||
fixed: some mode error
|
better board copy/paste
|
||||||
add many fatal bugs
|
an unlock-all easter egg
|
||||||
|
fixed:
|
||||||
|
press invisible func key
|
||||||
|
some mode error
|
||||||
|
|
||||||
0.8.7:Game Detail Update
|
0.8.7: Game Detail Update
|
||||||
better user experience in mode selecting
|
new:
|
||||||
support 2^n G falling speed
|
support 2^n G falling speed
|
||||||
speed of marathon mode changed
|
changed:
|
||||||
shorter clipboard string(when air above)
|
better user experience in mode selecting
|
||||||
attack system/score system little changed
|
speed of marathon mode changed
|
||||||
fixed: rank system, some mode error when enter(again!)
|
code:
|
||||||
|
shorter clipboard string(when air above)
|
||||||
|
attack system/score system little changed
|
||||||
|
fixed:
|
||||||
|
wrong behaviour of rank system
|
||||||
|
error when enter some mode(again!)
|
||||||
|
|
||||||
0.8.6:System Detail Update
|
0.8.6: System Detail Update
|
||||||
gamepad can adjust key
|
new:
|
||||||
add SFX when enter game
|
can adjust gamepad keysetting
|
||||||
map GUI little adjusted
|
add SFX when enter game
|
||||||
event system little changed(no ctrl when scene swapping)
|
changed:
|
||||||
fixed:rank system, some mode error when enter
|
map GUI little adjusted
|
||||||
|
event system little changed(no control when scene swapping)
|
||||||
|
fixed:
|
||||||
|
wrong behaviour of rank system
|
||||||
|
error when enter some mode
|
||||||
|
|
||||||
0.8.5-:Exploration Update
|
0.8.5-: Exploration Update
|
||||||
mode map!Brandly new GUI for mode selecting
|
new:
|
||||||
mode unlock system, not that scary for noob
|
mode map!Brandly new GUI for mode selecting
|
||||||
every mode has rank calculating method(may some mistakes/inappropriate number)
|
mode unlock system, not that scary for noob
|
||||||
save 10 best recoreds for each mode
|
every mode has rank calculating method(may some mistakes/inappropriate number)
|
||||||
can save/share custom map now
|
save 10 best recoreds for each mode
|
||||||
new mode: Big Bang
|
can save/share custom map now
|
||||||
button appearance changed
|
"new mode": Big Bang
|
||||||
better widget performence
|
changed:
|
||||||
remove Qplay
|
button appearance changed
|
||||||
many bug fixed
|
better widget performence
|
||||||
|
remove Qplay
|
||||||
|
fixed:
|
||||||
|
many bugs
|
||||||
|
|
||||||
0.8.4:Miya Update+
|
0.8.4: Miya Update+
|
||||||
vocal more natural(important, may cause new bug)
|
changed:
|
||||||
a bit better performence on mobile devices
|
vocal more natural(important, may cause new bug)
|
||||||
fatal bug fixed
|
a bit better performence on mobile devices
|
||||||
|
fixed:
|
||||||
|
some fatal bugs
|
||||||
|
|
||||||
0.8.3:Miya Update
|
0.8.3: Miya Update
|
||||||
new widget appearence
|
new:
|
||||||
cuter miya
|
new widget appearence
|
||||||
|
cuter miya
|
||||||
|
|
||||||
0.8.2:Graphics Update
|
0.8.2: Graphics Update
|
||||||
miya figure added
|
new:
|
||||||
new widget appearence
|
miya figure added
|
||||||
GUI adjusted
|
new widget appearence
|
||||||
bug fixed
|
changed:
|
||||||
|
GUI adjusted
|
||||||
|
fixed:
|
||||||
|
some bugs
|
||||||
|
|
||||||
0.8.1:Power Info Update
|
0.8.1: Power Info Update
|
||||||
more FX level
|
changed:
|
||||||
better battery info displaying
|
more FX level
|
||||||
3 next in GMroll
|
better battery info displaying
|
||||||
bug fixed
|
3 next in GMroll
|
||||||
|
fixed:
|
||||||
|
some bugs
|
||||||
|
|
||||||
0.8.0:Small Update
|
0.8.0: Small Update
|
||||||
remade text system
|
new:
|
||||||
more details
|
better update log from now on(2020.5.2)
|
||||||
bug fixed
|
changed:
|
||||||
|
more details
|
||||||
|
code:
|
||||||
|
remade text system
|
||||||
|
fixed:
|
||||||
|
some bugs
|
||||||
|
|
||||||
0.7.35:Bug Fixed
|
0.7.35: Bug Fixed
|
||||||
bug fixed
|
yeah, only bug fixed
|
||||||
|
|
||||||
0.7.34:Voice Update+
|
0.7.34: Voice Update+
|
||||||
replace most voice
|
replace most voice
|
||||||
shaking FX more natural
|
shaking FX more natural
|
||||||
|
|
||||||
0.7.33+:Bot Update
|
0.7.33+: Bot Update
|
||||||
MORE POWERFUL 9-stack AI
|
MORE POWERFUL 9-stack AI
|
||||||
add stereo-setting slider
|
add stereo-setting slider
|
||||||
code optimized
|
code optimized
|
||||||
bug fixed
|
bug fixed
|
||||||
|
|
||||||
0.7.32:Virtualkey Update+
|
0.7.32: Virtualkey Update+
|
||||||
Blind-GM now show section directly
|
Blind-GM now show section directly
|
||||||
easier&more standard classic mode
|
easier&more standard classic mode
|
||||||
can switch Virtualkey's auto dodging
|
can switch Virtualkey's auto dodging
|
||||||
@@ -343,11 +418,11 @@ Future outlook:
|
|||||||
code optimized
|
code optimized
|
||||||
bug fixed
|
bug fixed
|
||||||
|
|
||||||
0.7.31:Stereo Update
|
0.7.31: Stereo Update
|
||||||
stereo system
|
stereo system
|
||||||
fixed a problem in finesse calculating
|
fixed a problem in finesse calculating
|
||||||
|
|
||||||
0.7.30:Virtualkey Update
|
0.7.30: Virtualkey Update
|
||||||
auto-tracking virtual key, adjustable parameters!
|
auto-tracking virtual key, adjustable parameters!
|
||||||
can switch on/off virtuakeys
|
can switch on/off virtuakeys
|
||||||
add 7 more key
|
add 7 more key
|
||||||
@@ -358,26 +433,26 @@ Future outlook:
|
|||||||
adjusted GUI
|
adjusted GUI
|
||||||
many bug fixed
|
many bug fixed
|
||||||
|
|
||||||
0.7.28:Finesse Update
|
0.7.28: Finesse Update
|
||||||
add fineese check(almost useful)
|
add fineese check(almost useful)
|
||||||
code optimized
|
code optimized
|
||||||
|
|
||||||
0.7.27:O-spin Update+
|
0.7.27: O-spin Update+
|
||||||
super O transform system
|
super O transform system
|
||||||
optimized light system(no used)
|
optimized system(no used)
|
||||||
bug fixed
|
bug fixed
|
||||||
|
|
||||||
0.7.26:Bug Fixed
|
0.7.26: Bug Fixed
|
||||||
new skin
|
new skin
|
||||||
import light lib
|
import light lib
|
||||||
many bug fixed
|
many bug fixed
|
||||||
|
|
||||||
0.7.25:Demo Update
|
0.7.25: Demo Update
|
||||||
demo play at main menu
|
demo play at main menu
|
||||||
ALMOST reconstructed WHOLE PLAYER SYSTEM, NEED TEST
|
ALMOST reconstructed WHOLE PLAYER SYSTEM, NEED TEST
|
||||||
many bug fixed
|
many bug fixed
|
||||||
|
|
||||||
0.7.23/24:Feast of Hearing
|
0.7.23/24: Feast of Hearing
|
||||||
all bgm remade
|
all bgm remade
|
||||||
more settings with brand new GUI!
|
more settings with brand new GUI!
|
||||||
new mode: Master-Final
|
new mode: Master-Final
|
||||||
@@ -390,7 +465,7 @@ Future outlook:
|
|||||||
code optimized
|
code optimized
|
||||||
many bugs fixed
|
many bugs fixed
|
||||||
|
|
||||||
0.7.22:Graphics Update
|
0.7.22: Graphics Update
|
||||||
scoring system
|
scoring system
|
||||||
smooth dropping
|
smooth dropping
|
||||||
can change FX level
|
can change FX level
|
||||||
@@ -406,12 +481,12 @@ Future outlook:
|
|||||||
support 10% step alpha of virtual key
|
support 10% step alpha of virtual key
|
||||||
many code optimized&bugs fixed
|
many code optimized&bugs fixed
|
||||||
|
|
||||||
0.7.21:Title Update
|
0.7.21: Title Update
|
||||||
new title image
|
new title image
|
||||||
more GUI details
|
more GUI details
|
||||||
many bugs fixed
|
many bugs fixed
|
||||||
|
|
||||||
0.7.20:Music Room Update
|
0.7.20: Music Room Update
|
||||||
add music room
|
add music room
|
||||||
change block/space apperance in draw mode
|
change block/space apperance in draw mode
|
||||||
field shake animation
|
field shake animation
|
||||||
@@ -419,7 +494,7 @@ Future outlook:
|
|||||||
can set BG/BGM in custom mode
|
can set BG/BGM in custom mode
|
||||||
bug fixed
|
bug fixed
|
||||||
|
|
||||||
0.7.19:Voice Update
|
0.7.19: Voice Update
|
||||||
voice system added(voice by Miya)
|
voice system added(voice by Miya)
|
||||||
support macOS!
|
support macOS!
|
||||||
new mode: C4W training
|
new mode: C4W training
|
||||||
@@ -430,7 +505,7 @@ Future outlook:
|
|||||||
new background/sound effect in master mode
|
new background/sound effect in master mode
|
||||||
bug fixed
|
bug fixed
|
||||||
|
|
||||||
0.7.18:Skin Update
|
0.7.18: Skin Update
|
||||||
3 new block skins!(one skin origional by Miya(nya~))
|
3 new block skins!(one skin origional by Miya(nya~))
|
||||||
better restarting(to prevent mistakenly touching)
|
better restarting(to prevent mistakenly touching)
|
||||||
switch display of puzzle mode
|
switch display of puzzle mode
|
||||||
@@ -438,7 +513,7 @@ Future outlook:
|
|||||||
code optimized
|
code optimized
|
||||||
default custom options changed to as infinite mode
|
default custom options changed to as infinite mode
|
||||||
|
|
||||||
0.7.17:Pause Update
|
0.7.17: Pause Update
|
||||||
display game stats when pause
|
display game stats when pause
|
||||||
more options in statistics
|
more options in statistics
|
||||||
better pausing
|
better pausing
|
||||||
@@ -448,7 +523,7 @@ Future outlook:
|
|||||||
little optimized
|
little optimized
|
||||||
bugs fixed
|
bugs fixed
|
||||||
|
|
||||||
0.7.16:Game Detail Update
|
0.7.16: Game Detail Update
|
||||||
change rules of custom puzzle mode
|
change rules of custom puzzle mode
|
||||||
change rules of TSD mode
|
change rules of TSD mode
|
||||||
better pausing
|
better pausing
|
||||||
@@ -456,31 +531,31 @@ Future outlook:
|
|||||||
adjust difficulty of dig mode
|
adjust difficulty of dig mode
|
||||||
bugs fixed
|
bugs fixed
|
||||||
|
|
||||||
0.7.15:Puzzle Update
|
0.7.15: Puzzle Update
|
||||||
can make puzzle by drawing mode
|
can make puzzle by drawing mode
|
||||||
can pause game with animation
|
can pause game with animation
|
||||||
change icon of "Functional key"
|
change icon of "Functional key"
|
||||||
speed optimized
|
speed optimized
|
||||||
bugs fixed
|
bugs fixed
|
||||||
|
|
||||||
0.7.14:Creativity Update
|
0.7.14: Creativity Update
|
||||||
drawing mode in custom game
|
drawing mode in custom game
|
||||||
adjustable virtual keys with mouse
|
adjustable virtual keys with mouse
|
||||||
speed optimized
|
speed optimized
|
||||||
rotate also create shade
|
rotate also create shade
|
||||||
|
|
||||||
0.7.13+:Small Update
|
0.7.13+: Small Update
|
||||||
change difficulty of survivor mode
|
change difficulty of survivor mode
|
||||||
little game rule change
|
little game rule change
|
||||||
bugs fixed(AI control error)
|
bugs fixed(AI control error)
|
||||||
|
|
||||||
0.7.13:
|
0.7.13:
|
||||||
new:
|
new:
|
||||||
Chinese game name: 方块研究所
|
Chinese game name: 方块研究所
|
||||||
SUPER COOL instant moving effect
|
SUPER COOL instant moving effect
|
||||||
new b2b bar style & animation
|
new b2b bar style & animation
|
||||||
new transition animation
|
new transition animation
|
||||||
change:
|
changed:
|
||||||
change difficulty of master mode
|
change difficulty of master mode
|
||||||
adjust delay algorithm(probably cause controlfeel changing, please reset your DAS setting)
|
adjust delay algorithm(probably cause controlfeel changing, please reset your DAS setting)
|
||||||
code reconstructed
|
code reconstructed
|
||||||
@@ -489,7 +564,7 @@ Future outlook:
|
|||||||
error when seq=his
|
error when seq=his
|
||||||
error game area size of custom opponent
|
error game area size of custom opponent
|
||||||
|
|
||||||
0.7.12:Total Update
|
0.7.12: Total Update
|
||||||
AI learned to switch attack mode
|
AI learned to switch attack mode
|
||||||
seperate master mode from marathon mode
|
seperate master mode from marathon mode
|
||||||
master mode more interesting
|
master mode more interesting
|
||||||
@@ -503,7 +578,7 @@ Future outlook:
|
|||||||
some Chinese translaton editted
|
some Chinese translaton editted
|
||||||
[reconstruct event system]
|
[reconstruct event system]
|
||||||
|
|
||||||
0.7.11:Total Update
|
0.7.11: Total Update
|
||||||
some Chinese translaton editted
|
some Chinese translaton editted
|
||||||
add bone block in 2 hardest marathon(new block-fresh system)
|
add bone block in 2 hardest marathon(new block-fresh system)
|
||||||
play sound when get badges in royale mode
|
play sound when get badges in royale mode
|
||||||
@@ -515,13 +590,13 @@ Future outlook:
|
|||||||
add QR code in help page
|
add QR code in help page
|
||||||
change some detials
|
change some detials
|
||||||
|
|
||||||
0.7.10:Small Update
|
0.7.10: Small Update
|
||||||
full Chinese translation
|
full Chinese translation
|
||||||
add Classic mode
|
add Classic mode
|
||||||
change O spin's behaviour
|
change O spin's behaviour
|
||||||
bugs fixed
|
bugs fixed
|
||||||
|
|
||||||
0.7.9:O-spin Update
|
0.7.9: O-spin Update
|
||||||
O spin is a lie
|
O spin is a lie
|
||||||
better attacking pointer
|
better attacking pointer
|
||||||
language system
|
language system
|
||||||
@@ -530,7 +605,7 @@ Future outlook:
|
|||||||
code optimized
|
code optimized
|
||||||
bugs fixed
|
bugs fixed
|
||||||
|
|
||||||
0.7.8:Performance Update
|
0.7.8: Performance Update
|
||||||
GPU usage decreased much more than before
|
GPU usage decreased much more than before
|
||||||
add virtual key animation
|
add virtual key animation
|
||||||
display player's rank after death in royale mode
|
display player's rank after death in royale mode
|
||||||
@@ -539,7 +614,7 @@ Future outlook:
|
|||||||
code optimized
|
code optimized
|
||||||
bugs fixed
|
bugs fixed
|
||||||
|
|
||||||
0.7.7:Mode Update
|
0.7.7: Mode Update
|
||||||
add dig mode
|
add dig mode
|
||||||
add survivor mode
|
add survivor mode
|
||||||
combine some modes
|
combine some modes
|
||||||
@@ -547,7 +622,7 @@ Future outlook:
|
|||||||
more SFXs
|
more SFXs
|
||||||
bugs fixed
|
bugs fixed
|
||||||
|
|
||||||
0.7.6:Mode Update
|
0.7.6: Mode Update
|
||||||
new font
|
new font
|
||||||
add DIFFICULTY selection
|
add DIFFICULTY selection
|
||||||
virtual keys give visual feedback(PC/phone)
|
virtual keys give visual feedback(PC/phone)
|
||||||
@@ -560,7 +635,7 @@ Future outlook:
|
|||||||
fix all attacking bug of royale mode
|
fix all attacking bug of royale mode
|
||||||
change sequence of TSD-only mode to bag7
|
change sequence of TSD-only mode to bag7
|
||||||
|
|
||||||
0.7.5:Total Update
|
0.7.5: Total Update
|
||||||
reduce difficuly of PC training mode, and add more patterns
|
reduce difficuly of PC training mode, and add more patterns
|
||||||
reduce difficuly of death mode
|
reduce difficuly of death mode
|
||||||
add PC challenge mode
|
add PC challenge mode
|
||||||
@@ -575,10 +650,10 @@ Future outlook:
|
|||||||
change sequence of TSD-only mode
|
change sequence of TSD-only mode
|
||||||
royale mode use LESS GPU
|
royale mode use LESS GPU
|
||||||
|
|
||||||
0.7.4:Bug Update
|
0.7.4: Bug Update
|
||||||
add a lot of bugs
|
add a lot of bugs
|
||||||
|
|
||||||
0.7.3:Game Detail Update
|
0.7.3: Game Detail Update
|
||||||
add infinite target in custom
|
add infinite target in custom
|
||||||
fix TSD-only mode result+1 when finishing with a wrong clear
|
fix TSD-only mode result+1 when finishing with a wrong clear
|
||||||
change sequence generator of TSD-only mode
|
change sequence generator of TSD-only mode
|
||||||
@@ -586,7 +661,7 @@ Future outlook:
|
|||||||
Fix Screen flow
|
Fix Screen flow
|
||||||
smarter AI
|
smarter AI
|
||||||
|
|
||||||
0.7.2:Mode Update
|
0.7.2: Mode Update
|
||||||
add PC training mode
|
add PC training mode
|
||||||
add TSD-only mode
|
add TSD-only mode
|
||||||
remove non-sense s/z spin double
|
remove non-sense s/z spin double
|
||||||
@@ -594,12 +669,19 @@ Future outlook:
|
|||||||
grid BG changed
|
grid BG changed
|
||||||
smarter AI
|
smarter AI
|
||||||
]=]
|
]=]
|
||||||
|
|
||||||
local find,sub=string.find,string.sub
|
local find,sub=string.find,string.sub
|
||||||
local L,n,p={},1,1
|
local L,c={},0--list, \n counter,
|
||||||
|
local p,p1=1,0--cut start/end pos
|
||||||
local EOF=#S
|
local EOF=#S
|
||||||
repeat
|
|
||||||
p1=find(S,"\n",p)
|
while true do
|
||||||
L[n]=sub(S,p,p1-1)
|
p1=find(S,"\n",p1+1)
|
||||||
n,p=n+1,p1+1
|
c=c+1
|
||||||
until p1==EOF
|
if c==23 or p1==EOF then
|
||||||
return L
|
L[#L+1]=sub(S,p,p1-1)
|
||||||
|
if p1==EOF then return L end
|
||||||
|
p=p1+1
|
||||||
|
c=0
|
||||||
|
end
|
||||||
|
end
|
||||||
128
widgetList.lua
128
widgetList.lua
@@ -1,4 +1,4 @@
|
|||||||
local mobile=system=="Android"or system=="iOS"
|
mobileHide=loadstring("function()return "..tostring(system=="Android"or system=="iOS").." end")
|
||||||
local virtualkeySet={
|
local virtualkeySet={
|
||||||
{
|
{
|
||||||
{1, 80, 720-200, 80},--moveLeft
|
{1, 80, 720-200, 80},--moveLeft
|
||||||
@@ -71,36 +71,23 @@ local virtualkeySet={
|
|||||||
{20,1210, 50,30},--addRight
|
{20,1210, 50,30},--addRight
|
||||||
},--PC key feedback(top&in a row)
|
},--PC key feedback(top&in a row)
|
||||||
}
|
}
|
||||||
local customSet={
|
|
||||||
{3,20,1,1,7,1,1,1,3,4,1,2,3},
|
--lambda Funcs for widgets,delete at file end
|
||||||
{5,20,1,1,7,1,1,1,8,3,8,3,3},
|
local function SETval(k) return function()return setting[k] end end
|
||||||
{1,22,1,1,7,3,1,1,8,4,1,7,7},
|
local function SETsto(k) return function(i)setting[k]=i end end
|
||||||
{3,20,1,1,7,1,1,3,8,3,1,7,8},
|
local function SETrev(k) return function()setting[k]=not setting[k] end end
|
||||||
{25,11,8,11,4,1,2,1,8,3,1,4,9},
|
local function pressKey(k) return function()love.keypressed(k) end end
|
||||||
}
|
local function setPen(i) return function()sceneTemp.pen=i end end
|
||||||
--λFuncs for widgets,delete at file end
|
local function prevSkin(n) return function()SKIN.prev(n) end end
|
||||||
function defSet(n)
|
local function nextSkin(n) return function()SKIN.next(n) end end
|
||||||
return function()
|
local function nextDir(n) return function()SKIN.rotate(n) end end
|
||||||
for i=1,#customSet[n]do
|
local function VKAdisp(n) return function()return VK_org[n].ava end end
|
||||||
customSel[i]=customSet[n][i]
|
local function VKAcode(n) return function()VK_org[n].ava=not VK_org[n].ava end end
|
||||||
end
|
local function setLang(n) return function()LANG.set(n)setting.lang=n end end
|
||||||
BG.set(customRange.bg[customSel[12]])
|
local newButton,newSwitch,newSlider=WIDGET.new.button,WIDGET.new.switch,WIDGET.new.slider
|
||||||
BGM.play(customRange.bgm[customSel[13]])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
function SETval(k) return function()return setting[k] end end
|
|
||||||
function SETsto(k) return function(i)setting[k]=i end end
|
|
||||||
function SETrev(k) return function()setting[k]=not setting[k] end end
|
|
||||||
function pressKey(k)return function()love.keypressed(k) end end
|
|
||||||
function setPen(i) return function()sceneTemp.pen=i end end
|
|
||||||
function prevSkin(n)return function()SKIN.prev(n) end end
|
|
||||||
function nextSkin(n)return function()SKIN.next(n) end end
|
|
||||||
function nextDir(n) return function()SKIN.rotate(n) end end
|
|
||||||
function VKAdisp(n) return function()return VK_org[n].ava end end
|
|
||||||
function VKAcode(n) return function()VK_org[n].ava=not VK_org[n].ava end end
|
|
||||||
|
|
||||||
local C=color
|
local C=color
|
||||||
local Widget={
|
local widgetList={
|
||||||
load={},intro={},quit={},
|
load={},intro={},quit={},
|
||||||
main={
|
main={
|
||||||
play= newButton(150,280,200,160,C.lightRed, 55,function()SCN.push()SCN.swapTo("mode")end, nil,"setting"),
|
play= newButton(150,280,200,160,C.lightRed, 55,function()SCN.push()SCN.swapTo("mode")end, nil,"setting"),
|
||||||
@@ -109,16 +96,12 @@ local Widget={
|
|||||||
help= newButton(150,460,200,160,C.lightYellow, 50,function()SCN.push()SCN.swapTo("help")end, nil,"stat"),
|
help= newButton(150,460,200,160,C.lightYellow, 50,function()SCN.push()SCN.swapTo("help")end, nil,"stat"),
|
||||||
stat= newButton(370,460,200,160,C.lightCyan, 43,function()SCN.push()SCN.swapTo("stat")end, nil,"qplay"),
|
stat= newButton(370,460,200,160,C.lightCyan, 43,function()SCN.push()SCN.swapTo("stat")end, nil,"qplay"),
|
||||||
qplay= newButton(590,460,200,160,C.lightOrange, 43,function()SCN.push()loadGame(stat.lastPlay)end, nil,"lang"),
|
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()
|
lang= newButton(150,610,160,100,C.lightGreen, 45,function()SCN.push()SCN.swapTo("setting_lang")end, nil,"quit"),
|
||||||
setting.lang=setting.lang%LANG.getLen()+1
|
|
||||||
LANG.set(setting.lang)
|
|
||||||
TEXT.show(text.lang,370,610,50,"appear",1.6)
|
|
||||||
end,nil,"quit"),
|
|
||||||
quit= newButton(590,610,160,100,C.lightGrey, 45,function()VOC.play("bye")SCN.swapTo("quit","slowFade")end,nil,"play"),
|
quit= newButton(590,610,160,100,C.lightGrey, 45,function()VOC.play("bye")SCN.swapTo("quit","slowFade")end,nil,"play"),
|
||||||
},
|
},
|
||||||
mode={
|
mode={
|
||||||
draw= newButton(1100, 440,220,90,C.lightYellow, 40,function()SCN.push()SCN.swapTo("draw")end,function()return mapCam.sel~=71 and mapCam.sel~=72 end),
|
draw= newButton(1100, 440,240,90,C.lightYellow, 40,function()SCN.push()SCN.swapTo("draw")end,function()return mapCam.sel~=71 and mapCam.sel~=72 end),
|
||||||
custom=newButton(1100, 540,220,90,C.lightGreen, 40,function()SCN.push()SCN.swapTo("custom")end,function()return mapCam.sel~=71 and mapCam.sel~=72 end),
|
custom= newButton(1100, 540,240,90,C.lightGreen, 40,function()SCN.push()SCN.swapTo("custom")end,function()return mapCam.sel~=71 and mapCam.sel~=72 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),
|
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,SCN.back),
|
back= newButton(1200, 655,120,80,C.white, 40,SCN.back),
|
||||||
--function()SCN.push()SCN.swapTo("custom")end
|
--function()SCN.push()SCN.swapTo("custom")end
|
||||||
@@ -135,11 +118,11 @@ local Widget={
|
|||||||
down= newButton(1000, 600,100,100,C.white, 45,function()sceneTemp=sceneTemp%#customID+1 end),
|
down= newButton(1000, 600,100,100,C.white, 45,function()sceneTemp=sceneTemp%#customID+1 end),
|
||||||
left= newButton(880, 480,100,100,C.white, 45,pressKey("left")),
|
left= newButton(880, 480,100,100,C.white, 45,pressKey("left")),
|
||||||
right= newButton(1120, 480,100,100,C.white, 45,pressKey("right")),
|
right= newButton(1120, 480,100,100,C.white, 45,pressKey("right")),
|
||||||
set1= newButton(640, 160,240,75, C.lightYellow, 35,defSet(1)),
|
set1= newButton(640, 160,240,75, C.lightYellow, 35,pressKey("1")),
|
||||||
set2= newButton(640, 250,240,75, C.lightYellow, 35,defSet(2)),
|
set2= newButton(640, 250,240,75, C.lightYellow, 35,pressKey("2")),
|
||||||
set3= newButton(640, 340,240,75, C.lightYellow, 35,defSet(3)),
|
set3= newButton(640, 340,240,75, C.lightYellow, 35,pressKey("3")),
|
||||||
set4= newButton(640, 430,240,75, C.lightYellow, 35,defSet(4)),
|
set4= newButton(640, 430,240,75, C.lightYellow, 35,pressKey("4")),
|
||||||
set5= newButton(640, 520,240,75, C.lightYellow, 35,defSet(5)),
|
set5= newButton(640, 520,240,75, C.lightYellow, 35,pressKey("5")),
|
||||||
back= newButton(640, 630,180,60, C.white, 35,SCN.back),
|
back= newButton(640, 630,180,60, C.white, 35,SCN.back),
|
||||||
},
|
},
|
||||||
draw={
|
draw={
|
||||||
@@ -181,13 +164,13 @@ local Widget={
|
|||||||
resetGameData()
|
resetGameData()
|
||||||
SCN.swapTo("play","none")
|
SCN.swapTo("play","none")
|
||||||
end),
|
end),
|
||||||
setting=newButton(1130,70,180,90,C.lightBlue,35,function()
|
setting=newButton(1120,70,240,90,C.lightBlue,35,function()
|
||||||
SCN.push()SCN.swapTo("setting_sound")
|
SCN.push()SCN.swapTo("setting_sound")
|
||||||
end),
|
end),
|
||||||
quit= newButton(640,600,240,100,C.white,35,SCN.back),
|
quit= newButton(640,600,240,100,C.white,35,SCN.back),
|
||||||
},
|
},
|
||||||
setting_game={
|
setting_game={
|
||||||
graphic=newButton(200,80,240,80,C.lightCyan,35,function()SCN.swapTo("setting_graphic")end, nil,"sound"),
|
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"),
|
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.push()SCN.swapTo("setting_control")end, nil,"key"),
|
ctrl= newButton(290,220,320,80,C.lightYellow,35,function()SCN.push()SCN.swapTo("setting_control")end, nil,"key"),
|
||||||
key= newButton(640,220,320,80,C.lightGreen,35,function()SCN.push()SCN.swapTo("setting_key")end, nil,"touch"),
|
key= newButton(640,220,320,80,C.lightGreen,35,function()SCN.push()SCN.swapTo("setting_key")end, nil,"touch"),
|
||||||
@@ -204,35 +187,39 @@ local Widget={
|
|||||||
fine= newSwitch(1050,540,20, SETval("fine"), SETrev("fine"), nil,"back"),
|
fine= newSwitch(1050,540,20, SETval("fine"), SETrev("fine"), nil,"back"),
|
||||||
back= newButton(1140,650,200,80,C.white,40,SCN.back, nil,"graphic"),
|
back= newButton(1140,650,200,80,C.white,40,SCN.back, nil,"graphic"),
|
||||||
},
|
},
|
||||||
setting_graphic={
|
setting_video={
|
||||||
sound= newButton(200,80,240,80,C.lightCyan,35,function()SCN.swapTo("setting_sound")end, nil,"game"),
|
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"),
|
game= newButton(1080,80,240,80,C.lightCyan,35,function()SCN.swapTo("setting_game")end, nil,"ghost"),
|
||||||
ghost= newSwitch(230,180,35, SETval("ghost"), SETrev("ghost"), nil,"smooth"),
|
ghost= newSwitch(250,180,35, SETval("ghost"), SETrev("ghost"), nil,"smooth"),
|
||||||
smooth= newSwitch(230,260,25, SETval("smooth"), SETrev("smooth"), nil,"center"),
|
smooth= newSwitch(250,260,25, SETval("smooth"), SETrev("smooth"), nil,"center"),
|
||||||
center= newSwitch(480,180,35, SETval("center"), SETrev("center"), nil,"grid"),
|
center= newSwitch(500,180,35, SETval("center"), SETrev("center"), nil,"grid"),
|
||||||
grid= newSwitch(480,260,30, SETval("grid"), SETrev("grid"), nil,"bagLine"),
|
grid= newSwitch(500,260,30, SETval("grid"), SETrev("grid"), nil,"bagLine"),
|
||||||
bagLine=newSwitch(730,180,30, SETval("bagLine"), SETrev("bagLine"), nil,"lockFX"),
|
bagLine=newSwitch(730,180,30, SETval("bagLine"), SETrev("bagLine"), nil,"lockFX"),
|
||||||
lockFX= newSlider(310,340,373,3,35,nil, SETval("lockFX"), SETsto("lockFX"), nil,"dropFX"),
|
lockFX= newSlider(350,340,373,3,32,nil, SETval("lockFX"), SETsto("lockFX"), nil,"dropFX"),
|
||||||
dropFX= newSlider(310,410,373,5,35,nil, SETval("dropFX"), SETsto("dropFX"), nil,"shakeFX"),
|
dropFX= newSlider(350,400,373,5,32,nil, SETval("dropFX"), SETsto("dropFX"), nil,"clearFX"),
|
||||||
shakeFX=newSlider(310,480,373,5,35,nil, SETval("shakeFX"), SETsto("shakeFX"), nil,"atkFX"),
|
clearFX=newSlider(350,460,373,3,32,nil, SETval("clearFX"), SETsto("clearFX"), nil,"shakeFX"),
|
||||||
atkFX= newSlider(310,550,373,5,35,nil, SETval("atkFX"), SETsto("atkFX"), nil,"frame"),
|
shakeFX=newSlider(350,520,373,5,32,nil, SETval("shakeFX"), SETsto("shakeFX"), nil,"atkFX"),
|
||||||
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,"text"),
|
atkFX= newSlider(350,580,373,5,32,nil, SETval("atkFX"), SETsto("atkFX"), nil,"frame"),
|
||||||
text= newSwitch(990,180,35,SETval("text"),SETrev("text"),nil,"fullscreen"),
|
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"),
|
||||||
fullscreen=newSwitch(990,260,35,SETval("fullscreen"),function()
|
text= newSwitch(1050,180,35,SETval("text"),SETrev("text"),nil,"fullscreen"),
|
||||||
|
fullscreen=newSwitch(1050,260,35,SETval("fullscreen"),function()
|
||||||
setting.fullscreen=not setting.fullscreen
|
setting.fullscreen=not setting.fullscreen
|
||||||
love.window.setFullscreen(setting.fullscreen)
|
love.window.setFullscreen(setting.fullscreen)
|
||||||
love.resize(love.graphics.getWidth(),love.graphics.getHeight())
|
love.resize(love.graphics.getWidth(),love.graphics.getHeight())
|
||||||
end,nil,"bg"),
|
end,nil,"bg"),
|
||||||
bg= newSwitch(990,330,35,SETval("bg"),function()
|
bg= newSwitch(1050,340,35,SETval("bg"),function()
|
||||||
BG.set("none")
|
BG.set("none")
|
||||||
setting.bg=not setting.bg
|
setting.bg=not setting.bg
|
||||||
BG.set("space")
|
BG.set("space")
|
||||||
|
end,nil,"power"),
|
||||||
|
power= newSwitch(1050,420,35,SETval("powerInfo"),function()
|
||||||
|
setting.powerInfo=not setting.powerInfo
|
||||||
end,nil,"back"),
|
end,nil,"back"),
|
||||||
back= newButton(1140,650,200,80,C.white,40,SCN.back,nil,"sound"),
|
back= newButton(1140,650,200,80,C.white,40,SCN.back,nil,"sound"),
|
||||||
},
|
},
|
||||||
setting_sound={
|
setting_sound={
|
||||||
game= newButton(200,80,240,80,C.lightCyan,35,function()SCN.swapTo("setting_game")end, nil,"graphic"),
|
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_graphic")end, nil,"sfx"),
|
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"),
|
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"),
|
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"),
|
vib= newSlider(180,440,400,5 ,28,function()VIB(2)end, SETval("vib"), SETsto("vib"), nil,"voc"),
|
||||||
@@ -286,7 +273,7 @@ local Widget={
|
|||||||
--spin6=newButton(825,540,90,65,C.white,30,nextDir(6)),--cannot rotate O
|
--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)),
|
spin7= newButton(970,540,90,65,C.white,30,nextDir(7)),
|
||||||
|
|
||||||
skinR= newButton(200,640,220,80,C.lightPurple,35,function()setting.skin={1,5,2,8,10,3,7}SFX.play("rotate")end),
|
skinR= newButton(200,640,220,80,C.lightPurple,35,function()setting.skin={1,5,8,2,10,3,7}SFX.play("rotate")end),
|
||||||
faceR= newButton(480,640,220,80,C.lightRed,35,function()setting.face={0,0,0,0,0,0,0}SFX.play("hold")end),
|
faceR= newButton(480,640,220,80,C.lightRed,35,function()setting.face={0,0,0,0,0,0,0}SFX.play("hold")end),
|
||||||
back= newButton(1140,650,200,80,C.white,40,SCN.back),
|
back= newButton(1140,650,200,80,C.white,40,SCN.back),
|
||||||
},
|
},
|
||||||
@@ -366,27 +353,38 @@ local Widget={
|
|||||||
VKCurW= newSlider(140,370,1000,10,35,nil,SETval("VKCurW"),function(i)setting.VKCurW=i;setting.VKTchW=math.min(setting.VKTchW,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,SCN.back),
|
back= newButton(1080,600,240,80,C.white,45,SCN.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,SCN.back,nil,"chi"),
|
||||||
|
},
|
||||||
help={
|
help={
|
||||||
his= newButton(1050,500,250,80,C.white,35,function()SCN.push()SCN.swapTo("history")end,nil,"back"),
|
his= newButton(1050,500,250,80,C.white,35,function()SCN.push()SCN.swapTo("history")end,nil,"back"),
|
||||||
qq= newButton(1050,600,250,80,C.white,35,function()love.system.openURL("tencent://message/?uin=1046101471&Site=&Menu=yes")end,function()return mobile end,"his"),
|
qq= newButton(1050,600,250,80,C.white,35,function()love.system.openURL("tencent://message/?uin=1046101471&Site=&Menu=yes")end,mobileHide,"his"),
|
||||||
back= newButton(640, 600,200,80,C.white,40,SCN.back,nil,"qq"),
|
back= newButton(640,600,200,80,C.white,40,SCN.back,nil,"qq"),
|
||||||
},
|
},
|
||||||
history={
|
history={
|
||||||
prev= newButton(1155,170,180,180,C.white,65,pressKey("up"),function()return sceneTemp[2]==1 end),
|
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]-22 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,SCN.back),
|
back= newButton(1155,600,180,90,C.white,40,SCN.back),
|
||||||
},
|
},
|
||||||
stat={
|
stat={
|
||||||
path= newButton(980,620,250,80,C.white,25,function()love.system.openURL(love.filesystem.getSaveDirectory())end,function()return mobile end,"back"),
|
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,SCN.back,nil,"path"),
|
back= newButton(640,620,200,80,C.white,40,SCN.back,nil,"path"),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
defSet,SETval,SETsto,SETrev,pressKey,setPen,prevSkin,nextSkin,nextDir,VKAdisp,VKAcode=nil
|
mobileHide,SETval,SETsto,SETrev=nil
|
||||||
for _,L in next,Widget do
|
pressKey,setPen,prevSkin,nextSkin=nil
|
||||||
|
nextDir,VKAdisp,VKAcode,setLang=nil
|
||||||
|
newButton,newSwitch,newSlider=nil
|
||||||
|
|
||||||
|
for _,L in next,widgetList do
|
||||||
for _,W in next,L do
|
for _,W in next,L do
|
||||||
if W.next then
|
if W.next then
|
||||||
W.next,L[W.next].prev=L[W.next],W
|
W.next,L[W.next].prev=L[W.next],W
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return Widget
|
return widgetList
|
||||||
Reference in New Issue
Block a user