Compare commits

...

2 Commits

Author SHA1 Message Date
MrZ_26
486a64cca3 0.8.21: Bug Fixed 2020-05-23 00:04:21 +08:00
MrZ_26
28d5136e95 0.8.19/20: Fantastic Global Update II 2020-05-21 01:12:17 +08:00
59 changed files with 3131 additions and 2152 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -12,7 +12,7 @@ ms.setVisible(false)
local scr=scr
local xOy=love.math.newTransform()
local mx,my,mouseShow=-20,-20,false
local touching=nil--第一触摸ID
local touching=nil--first touching ID(userdata)
local touchDist=nil
joysticks={}
@@ -53,7 +53,7 @@ local function updatePowerInfo()
gc.print(pow,78,3)
end
end
gc.draw(batteryImage,73,3)
gc.draw(IMG.batteryImage,73,3)
end
setFont(25)
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
elseif not L[3]then
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
if d>100 then
d=d^.5
@@ -262,13 +262,13 @@ function wheelMoved.music(x,y)
end
function keyDown.music(key)
if key=="down"then
sceneTemp=sceneTemp%#musicID+1
sceneTemp=sceneTemp%BGM.len+1
elseif key=="up"then
sceneTemp=(sceneTemp-2)%#musicID+1
sceneTemp=(sceneTemp-2)%BGM.len+1
elseif key=="return"or key=="space"then
if BGM.nowPlay~=musicID[sceneTemp]then
if BGM.nowPlay~=BGM.list[sceneTemp]then
SFX.play("click")
BGM.play(musicID[sceneTemp])
BGM.play(BGM.list[sceneTemp])
else
BGM.stop()
end
@@ -277,36 +277,42 @@ function keyDown.music(key)
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)
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
if sel==12 then
BG.set(customRange.bg[customSel[12]])
elseif sel==13 then
BGM.play(customRange.bgm[customSel[13]])
end
elseif key=="right"then
elseif key=="right"or key=="d"then
customSel[sel]=customSel[sel]%#customRange[customID[sel]]+1
if sel==12 then
BG.set(customRange.bg[customSel[sel]])
elseif sel==13 then
BGM.play(customRange.bgm[customSel[sel]])
end
elseif key=="down"then
sceneTemp=sel%#customID+1
elseif key=="up"then
sceneTemp=(sel-2)%#customID+1
elseif key=="1"then
Widget.custom.set1.code()
elseif key=="2"then
Widget.custom.set2.code()
elseif key=="3"then
Widget.custom.set3.code()
elseif key=="4"then
Widget.custom.set4.code()
elseif key=="5"then
Widget.custom.set5.code()
elseif #key==1 then
local T=tonumber(key)
if T and T>=1 and T<=5 then
for i=1,#customSet[T]do
customSel[i]=customSet[T][i]
end
BG.set(customRange.bg[customSel[12]])
BGM.play(customRange.bgm[customSel[13]])
end
elseif key=="escape"then
SCN.back()
end
@@ -425,41 +431,29 @@ function keyDown.setting_key(key)
SCN.back()
end
elseif s.kS then
for l=1,8 do
for y=1,20 do
if keyMap[l][y]==key then
keyMap[l][y]=""
goto L
end
end
for y=1,20 do
if keyMap[1][y]==key then keyMap[1][y]=""break end
if keyMap[2][y]==key then keyMap[2][y]=""break end
end
::L::
keyMap[s.board][s.kb]=key
SFX.play("reach",.5)
s.kS=false
elseif key=="return"then
elseif key=="return"or key=="space"then
s.kS=true
SFX.play("lock",.5)
elseif key=="up"then
elseif key=="up"or key=="w"then
if s.kb>1 then
s.kb=s.kb-1
SFX.play("move",.5)
end
elseif key=="down"then
elseif key=="down"or key=="s"then
if s.kb<20 then
s.kb=s.kb+1
SFX.play("move",.5)
end
elseif key=="left"then
if s.board>1 then
s.board=s.board-1
SFX.play("rotate",.5)
end
elseif key=="right"then
if s.board<8 then
s.board=s.board+1
SFX.play("rotate",.5)
end
elseif key=="left"or key=="a"or key=="right"or key=="d"then
s.board=3-s.board
SFX.play("rotate",.5)
end
end
function gamepadDown.setting_key(key)
@@ -472,16 +466,11 @@ function gamepadDown.setting_key(key)
SCN.back()
end
elseif s.jS then
for l=9,16 do
for y=1,20 do
if keyMap[l][y]==key then
keyMap[l][y]=""
goto L
end
end
for y=1,20 do
if keyMap[3][y]==key then keyMap[3][y]=""break end
if keyMap[4][y]==key then keyMap[4][y]=""break end
end
::L::
keyMap[8+s.board][s.js]=key
keyMap[2+s.board][s.js]=key
SFX.play("reach",.5)
s.jS=false
elseif key=="start"then
@@ -497,16 +486,9 @@ function gamepadDown.setting_key(key)
s.js=s.js+1
SFX.play("move",.5)
end
elseif key=="dpleft"then
if s.board>1 then
s.board=s.board-1
SFX.play("rotate",.5)
end
elseif key=="dpright"then
if s.board<8 then
s.board=s.board+1
SFX.play("rotate",.5)
end
elseif key=="dpleft"or key=="dpright"then
s.board=3-s.board
SFX.play("rotate",.5)
end
end
@@ -515,7 +497,7 @@ function mouseDown.setting_touch(x,y,k)
sceneTemp.sel=onVK_org(x,y)or sceneTemp.sel
end
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]
B.x,B.y=B.x+dx,B.y+dy
end
@@ -538,16 +520,16 @@ function touchUp.setting_touch(id,x,y)
end
end
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]
B.x,B.y=B.x+dx,B.y+dy
end
end
function keyDown.pause(key)
if key=="escape"then
if key=="q"then
SCN.back()
elseif key=="space"then
elseif key=="escape"then
resumeGame()
elseif key=="s"then
SCN.push()
@@ -572,20 +554,21 @@ function touchDown.play(id,x,y)
virtualkey[t].pressTime=10
if setting.VKTrack then
local B=virtualkey[t]
if setting.VKDodge then--按钮软碰撞(做不来hhh随便做一个,效果还行!)
if setting.VKDodge then--button collision (not accurate)
for i=1,#virtualkey do
local b=virtualkey[i]
local d=B.r+b.r-((B.x-b.x)^2+(B.y-b.y)^2)^.5--碰撞深度(负数=间隔距离)
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
b.x=b.x+(b.x-B.x)*d*b.r*.00005
b.y=b.y+(b.y-B.y)*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*5e-4
end
end
end
local O=VK_org[t]
local _FW,_CW=setting.VKTchW*.1,1-setting.VKCurW*.1
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
end
VIB(setting.VKVIB)
@@ -622,44 +605,34 @@ function keyDown.play(key)
return
end
local m=keyMap
for p=1,players.human do
for k=1,20 do
if key==m[2*p-1][k]or key==m[2*p][k]then
players[p]:pressKey(k)
if p==1 then
virtualkey[k].isDown=true
virtualkey[k].pressTime=10
end
return
end
for k=1,20 do
if key==m[1][k]or key==m[2][k]then
players[1]:pressKey(k)
virtualkey[k].isDown=true
virtualkey[k].pressTime=10
return
end
end
end
function keyUp.play(key)
local m=keyMap
for p=1,players.human do
for k=1,20 do
if key==m[2*p-1][k]or key==m[2*p][k]then
players[p]:releaseKey(k)
if p==1 then virtualkey[k].isDown=false end
return
end
for k=1,20 do
if key==m[1][k]or key==m[2][k]then
players[1]:releaseKey(k)
virtualkey[k].isDown=false
return
end
end
end
function gamepadDown.play(key)
if key=="back"then SCN.back()return end
local m=keyMap
for p=1,players.human do
for k=1,20 do
if key==m[2*p+7][k]or key==m[2*p+8][k]then
players[p]:pressKey(k)
if p==1 then
virtualkey[k].isDown=true
virtualkey[k].pressTime=10
end
return
end
for k=1,20 do
if key==m[3][k]or key==m[4][k]then
players[1]:pressKey(k)
virtualkey[k].isDown=true
virtualkey[k].pressTime=10
return
end
end
end
@@ -667,9 +640,9 @@ function gamepadUp.play(key)
local m=keyMap
for p=1,players.human do
for k=1,20 do
if key==m[2*p+7][k]or key==m[2*p+8][k]then
players[p]:releaseKey(k)
if p==1 then virtualkey[k].isDown=false end
if key==m[3][k]or key==m[4][k]then
players[1]:releaseKey(k)
virtualkey[k].isDown=false
return
end
end
@@ -701,90 +674,14 @@ function wheelMoved.history(x,y)
end
function keyDown.history(key)
if key=="up"then
sceneTemp[2]=max(sceneTemp[2]-3,1)
sceneTemp[2]=max(sceneTemp[2]-1,1)
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
SCN.back()
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
function love.mousepressed(x,y,k,t,num)
if t then return end
@@ -798,9 +695,7 @@ function love.mousepressed(x,y,k,t,num)
SCN.back()
end
if k==1 then
if widget_sel then
widgetPress(widget_sel,mx,my)
end
WIDGET.press(mx,my)
end
lastX,lastY=mx,my
end
@@ -814,17 +709,9 @@ function love.mousemoved(x,y,dx,dy,t)
mouseMove[SCN.cur](mx,my,dx,dy)
end
if ms.isDown(1) then
if widget_sel then
widgetDrag(widget_sel,mx,my,dx,dy)
end
WIDGET.drag(mx,my,dx,dy)
else
widget_sel=nil
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
WIDGET.moveCursor(mx,my)
end
end
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
touchMove[SCN.cur](id,x,y,dx/scr.k,dy/scr.k)
end
if widget_sel then
if WIDGET.sel then
if touching then
widgetDrag(widget_sel,x,y,dx,dy)
WIDGET.drag(x,y,dx,dy)
end
else
for _,W in next,Widget[SCN.cur]do
if not(W.hide and W.hide())and W:isAbove(x,y)then
widget_sel=W
return
end
end
if not widget_sel then
WIDGET.moveCursor(x,y)
if not WIDGET.sel then
touching=nil
end
end
@@ -883,11 +765,9 @@ function love.touchreleased(id,x,y)
if SCN.swapping then return end
x,y=xOy:inverseTransformPoint(x,y)
if id==touching then
WIDGET.press(x,y)
touching=nil
if widget_sel then
widgetPress(widget_sel,x,y)
end
widget_sel=nil
WIDGET.sel=nil
end
if touchUp[SCN.cur]then
touchUp[SCN.cur](id,x,y)
@@ -902,34 +782,22 @@ function love.keypressed(i)
if devMode then
if i=="f5"then
print("DEBUG:")
elseif i=="f8"then
devMode=nil
TEXT.show("DEBUG OFF",640,360,80,"fly",.8)
elseif i=="f9"then
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 i=="f8"then devMode=nil TEXT.show("DEBUG OFF",640,360,80,"fly",.8)
elseif i=="f9"then 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
if i=="k"then
for i=1,8 do
local P=players.alive[rnd(#players.alive)]
if P~=players[1]then
-- P.lastRecv=players[1]
P.lastRecv=players[1]
P:lose()
end
end
--Test code here
elseif i=="q"then
local W=widget_sel
local W=WIDGET.sel
if W then W:getInfo()end
elseif i=="f3"then
error("Techmino:挂了")
@@ -937,13 +805,13 @@ function love.keypressed(i)
for k,v in next,_G do
print(k,v)
end
elseif i=="z"then
if kb.isDown("m")and kb.isDown("r")then
elseif i=="\122"then
if kb.isDown("\109")and kb.isDown("\114")then
marking=nil
SFX.play("reach")
end
elseif widget_sel then
local W=widget_sel
elseif WIDGET.sel then
local W=WIDGET.sel
if i=="left"then W.x=W.x-10
elseif i=="right"then W.x=W.x+10
elseif i=="up"then W.y=W.y-10
@@ -963,7 +831,7 @@ function love.keypressed(i)
else
if keyDown[SCN.cur]then keyDown[SCN.cur](i)
elseif i=="escape"then SCN.back()
else widgetControl_key(i)
else WIDGET.keyPressed(i)
end
end
end
@@ -997,7 +865,7 @@ function love.gamepadpressed(joystick,i)
if gamepadDown[SCN.cur]then gamepadDown[SCN.cur](i)
elseif keyDown[SCN.cur]then keyDown[SCN.cur](keyMirror[i]or i)
elseif i=="back"then SCN.back()
else widgetControl_gamepad(i)
else WIDGET.gamepadPressed(i)
end
end
function love.gamepadreleased(joystick,i)
@@ -1012,7 +880,7 @@ function love.joystickpressed(JS,k)
if gamepadDown[SCN.cur]then gamepadDown[SCN.cur](i)
elseif keyDown[SCN.cur]then keyDown[SCN.cur](keyMirror[i]or i)
elseif i=="back"then SCN.back()
else widgetControl_gamepad(i)
else WIDGET.gamepadPressed(i)
end
end
function love.joystickreleased(JS,k)
@@ -1060,7 +928,7 @@ local FPS=love.timer.getFPS
love.draw,love.update=nil
function love.run()
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 lastFreshPow=lastFrame
local FCT=0--framedraw counter
@@ -1080,19 +948,16 @@ function love.run()
return 1
end
end
--UPDATE
STEP()local dt=GETΔ()
STEP()local dt=GETDelta()
TASK.update()
VOC.update()
BG.update(dt)
sysFX.update(dt)
TEXT.update()
local _=Tmr[SCN.cur]if _ then _(dt)end
if SCN.swapping then SCN.swapUpdate()end
for _,W in next,Widget[SCN.cur]do
W:update()
end--更新控件
local _=Tmr[SCN.cur]if _ then _(dt)end--Scene Updater
if SCN.swapping then SCN.swapUpdate()end--Scene swapping animation
WIDGET.update()--Widgets animation
--DRAW
if not mini()then
@@ -1105,11 +970,7 @@ function love.run()
gc.push("transform")
gc.replaceTransform(xOy)
if Pnt[SCN.cur]then Pnt[SCN.cur]()end
for k,W in next,Widget[SCN.cur]do
if not(W.hide and W.hide())then
W:draw()
end
end--Draw widgets
WIDGET.draw()--Draw widgets
if mouseShow then
local r=Timer()*.5
local R=int(r)%7+1
@@ -1124,14 +985,16 @@ function love.run()
gc.pop()
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
if SCN.swapping then
_=SCN.swap
_.draw(_.time)
end--Scene swapping animation
setFont(15)
gc.setColor(1,1,1)
_=scr.h-20
@@ -1158,7 +1021,7 @@ function love.run()
--FRESH POWER
lastFrame=Timer()
if Timer()-lastFreshPow>1 then
if Timer()-lastFreshPow>3 and setting.powerInfo and SCN.cur~="load"then
updatePowerInfo()
lastFreshPow=Timer()
end

View File

@@ -1,11 +1,11 @@
gameVersion="Alpha V0.8.18"
gameVersion="Alpha V0.8.21"
function love.conf(t)
t.identity="Techmino"--SaveDir name
t.identity="Techmino"--folder name
t.version="11.1"
t.console=false
t.gammacorrect=false
t.appendidentity=true--Search files in source before save directory
t.accelerometerjoystick=false--ios/android加速度计=摇杆
t.appendidentity=true--search files in source before save directory
t.accelerometerjoystick=false--accelerometer=joystick on ios/android
t.audio.mixwithsystem=true
local W=t.window
@@ -17,12 +17,12 @@ function love.conf(t)
W.resizable=true
W.fullscreentype="desktop"--"exclusive"
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.depth=0--bits/samp of depth buffer
W.stencil=1--bits/samp of stencil buffer
W.display=1--Monitor ID
W.highdpi=false--High-dpi mode for the window on a Retina display
W.display=1--monitor ID
W.highdpi=false--high-dpi mode for the window on a Retina display
W.x,W.y=nil
local M=t.modules

View File

@@ -1,4 +1,5 @@
setting={
local s={
--game
das=10,arr=2,
sddas=0,sdarr=2,
ihs=true,irs=true,ims=true,
@@ -8,18 +9,18 @@ setting={
swap=true,
fine=false,
autoPause=true,
lang=1,
skinSet=1,
skin={1,5,2,8,10,3,7},
face={0,0,0,0,0,0,0},
--game
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={},
--graphic
ghost=true,center=true,
smooth=true,grid=false,
bagLine=false,
lockFX=2,
dropFX=3,
clearFX=2,
shakeFX=2,
atkFX=3,
frameMul=100,
@@ -27,13 +28,14 @@ setting={
text=true,
fullscreen=false,
bg=true,
--graphic
powerInfo=false,
--sound
sfx=10,bgm=7,
vib=0,voc=0,
stereo=6,
--sound
--virtualkey
VKSFX=3,--SFX volume
VKVIB=0,--VIB
VKSwitch=false,--if disp
@@ -43,28 +45,36 @@ setting={
VKCurW=4,--Cur-Pos Weight
VKIcon=true,--if disp icon
VKAlpha=3,
--control
}
stat={
for i=1,25 do
s.face[i]=0
end
setting=s
s={
version=gameVersion,
run=0,game=0,time=0,
key=0,rotate=0,hold=0,
extraPiece=0,extraRate=0,
piece=0,row=0,dig=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},
spin_S={0,0,0,0},spin_B={0,0,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}},
clear={},clear_B={},clear_S={0,0,0,0,0},
spin={},spin_B={},spin_S={0,0,0,0,0},
pc=0,hpc=0,b2b=0,b3b=0,score=0,
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={
{"left","right","x","z","c","up","down","space","tab","r"},
{},{},{},{},{},{},{},
{"left","right","x","z","c","up","down","space","tab","r"},{},
--keyboard
{"dpleft","dpright","a","b","y","dpup","dpdown","rightshoulder","x","leftshoulder"},
{},{},{},{},{},{},{},
{"dpleft","dpright","a","b","y","dpup","dpdown","rightshoulder","x","leftshoulder"},{},
--joystick
}
for i=1,#keyMap do for j=1,20 do

View File

@@ -1,3 +1,4 @@
(ENG ver. below)
游戏方法:
系统会提供的一个个四联骨牌("方块",总共7种),玩家需要控制(左右移动和旋转90,180,270度),每填满场地的一行就会将其消除,根据消除方式会给对手攻击(如果有对手的话)
活到最后或者完成目标即胜利.
@@ -15,7 +16,8 @@ spin判定:
spin1/2/3攻击2/4/6,若mini则减半
B2B:加1(techrash/spin1/spin2)或2(spin3)攻击
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)增益(详细说明见下文)
半全消("下方有剩余方块"的全消,如果是I消1行则必须不剩余玩家放置的方块):伤害+2,额外抵挡+2
全消:将上述伤害之和开根号,再+6~12(本局内递增)+2额外抵挡(注:本局消行数>4时会将B2B点数拉满)
@@ -52,5 +54,62 @@ back to back(B2B)点数说明:
自定义模式说明:
玩家可以自由调整大多数参数(不包括上述各种游戏模式的特殊效果),也可以画一个场地去消除或者是作为提示模板来进行拼图模式.
在拼图模式下,按功能键切换是否展示提示.其中打"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

BIN
font.ttf

Binary file not shown.

View File

@@ -1,10 +1,11 @@
--[[
第一次搞这么大的工程,参考价值也许不是很大
如果你有时间并且也热爱俄罗斯方块的话,来看代码或者帮助优化的话欢迎!
Techmino is my first "huge project"
optimization is welcomed if you also love tetromino game
]]
math.randomseed(os.time()*626)
--Global vars
system=love.system.getOS()
game={}
mapCam={
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}
preField={h=20}for i=1,20 do preField[i]={0,0,0,0,0,0,0,0,0,0}end
function NULL()end
--[[
blockSkin,blockSkinMini={},{}--redefined in SKIN.change
widget_sel=nil--selected widget obj
]]
--blockSkin,blockSkinMini={},{}--redefined in SKIN.change
--Load modules
setFont=require("parts/setfont")
@@ -53,14 +51,14 @@ TEXT=require("parts/text")
TASK=require("parts/task")
BG=require("parts/bg")
IMG=require("parts/img")
WIDGET=require("parts/widget")
LIGHT=require("parts/light")
require("parts/light")
require("parts/modes")
require("default_data")
require("parts/widget")
require("parts/ai")
require("player")
Widget=require("widgetList")
widgetList=require("widgetList")
require("callback")
--load files & settings
@@ -74,6 +72,7 @@ else
setting.VKSwitch=true
setting.swap=false
setting.vib=2
setting.powerInfo=true
end
end
LANG.set(setting.lang)

View File

@@ -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,
getRank=function(P)
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,
}

View File

@@ -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,
getRank=function(P)
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,
}

View File

@@ -51,9 +51,9 @@ return{
res[A+2]=7
end
--give O when no Δ=0/give T when no Δ=1
d=0--Δ=0
A=0--Δ=1
--give O when no d=0/give T when no d=1
d=0--d=0 count
A=0--d=1 count
for x=2,10 do
local _=height[x]-height[x-1]
if _==0 then

View File

@@ -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,
}

View File

@@ -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,
}

View File

@@ -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,
}

View File

@@ -42,8 +42,8 @@ return{
if L>=200 then
local T=P.stat.time
return
T<=185 and 5 or
T<=250 and 4 or
T<=226 and 5 or
T<=262 and 4 or
3
else
return

View File

@@ -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 PCbase=require("parts/PCbase")
local PClist=require("parts/PClist")
local PCtype={[0]=1,2,1,3,2,3}
local function task_PC(P)
local _
P.modeData.counter=P.modeData.counter+1
if P.modeData.counter==21 then
local t=P.stat.pc%2
local S=P.gameEnv.skin
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()
if P.modeData.counter==26 then
local base=PCbase[P.modeData.type]
P:pushLine(base[rnd(#base)],P.modeData.symmetry)
return true
end
end
local function newPC(P)
local r=P.field;r=r[#r]
if r then
local r=P.field
if r[1]then
r=r[#r]
local c=0
for i=1,10 do if r[i]>0 then c=c+1 end end
if c<5 then
P:lose()
end
if c<5 then P:lose()end
end
if P.stat.piece%4==0 and #P.field==0 then
P.modeData.event=P.modeData.event==0 and 1 or 0
local r=rnd(#PClist)
local f=P.modeData.event==0
for i=1,4 do
local b=PClist[r][i]
if f then
if b<3 then b=3-b
elseif b<5 then b=7-b
end
end
P:getNext(b)
end
if #P.field==0 then
local type=PCtype[P.stat.pc]or rnd(2,3)
local L=PClist[type][rnd(#PClist[1])]
local symmetry=rnd()>.5
P.modeData.type=type
P.modeData.symmetry=symmetry
P:pushNext(L,symmetry)
P.modeData.counter=P.stat.piece==0 and 20 or 0
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
P.gameEnv.drop=pc_drop[s]or 10
P.gameEnv.lock=pc_lock[s]or 20
@@ -94,11 +76,11 @@ return{
getRank=function(P)
local L=P.stat.pc
return
L>=50 and 5 or
L>=40 and 4 or
L>=30 and 3 or
L>=100 and 5 or
L>=70 and 4 or
L>=40 and 3 or
L>=20 and 2 or
L>=10 and 1 or
L>=1 and 0
L>=2 and 0
end,
}

View File

@@ -1,50 +1,41 @@
local rnd=math.random
local ins=table.insert
local PCbase=require("parts/PCbase")
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 _
P.modeData.counter=P.modeData.counter+1
if P.modeData.counter==21 then
local t=P.stat.pc%2
local S=P.gameEnv.skin
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()
if P.modeData.counter==26 then
local base=PCbase[P.modeData.type]
P:pushLine(base[rnd(#base)],P.modeData.symmetry)
return true
end
end
local function newPC(P)
local r=P.field;r=r[#r]
if r then
local r=P.field
if r[1]then
r=r[#r]
local c=0
for i=1,10 do if r[i]>0 then c=c+1 end end
if c<5 then
P:lose()
end
if c<5 then P:lose()end
end
if P.stat.piece%4==0 and #P.field==0 then
P.modeData.event=P.modeData.event==0 and 1 or 0
local r=rnd(#PClist)
local f=P.modeData.event==0
for i=1,4 do
local b=PClist[r][i]
if f then
if b<3 then b=3-b
elseif b<5 then b=7-b
end
end
P:getNext(b)
end
if #P.field==0 then
local type=PCtype[P.stat.pc]or rnd(2,3)
local L=PClist[type][rnd(#PClist[1])]
local symmetry=rnd()>.5
P.modeData.type=type
P.modeData.symmetry=symmetry
P:pushNext(L,symmetry)
P.modeData.counter=P.stat.piece==0 and 20 or 0
TASK.new(task_PC,P)
end
@@ -54,7 +45,7 @@ return{
env={
next=4,
hold=false,
drop=150,lock=150,
drop=120,lock=180,
fall=20,
sequence="none",
dropPiece=newPC,
@@ -77,11 +68,11 @@ return{
getRank=function(P)
local L=P.stat.pc
return
L>=100 and 5 or
L>=60 and 4 or
L>=40 and 3 or
L>=25 and 2 or
L>=15 and 1 or
L>=1 and 0
L>=260 and 5 or
L>=126 and 4 or
L>=62 and 3 or
L>=26 and 2 or
L>=12 and 1 or
L>=2 and 0
end,
}

View File

@@ -21,7 +21,7 @@ return{
load=function()
newPlayer(1,340,15)
newAIPlayer(2,965,360,.5,AITemplate("CC",10,1,true,5000))
garbageSpeed=1e99
game.garbageSpeed=1e99
end,
mesDisp=function(P,dx,dy)
end,

View File

@@ -21,7 +21,7 @@ return{
load=function()
newPlayer(1,340,15)
newAIPlayer(2,965,360,.5,AITemplate("CC",10,1,true,10000))
garbageSpeed=1e99
game.garbageSpeed=1e99
end,
mesDisp=function(P,dx,dy)
end,

View File

@@ -21,7 +21,7 @@ return{
load=function()
newPlayer(1,340,15)
newAIPlayer(2,965,360,.5,AITemplate("CC",10,2,true,12600))
garbageSpeed=1e99
game.garbageSpeed=1e99
end,
mesDisp=function(P,dx,dy)
end,

View File

@@ -21,7 +21,7 @@ return{
load=function()
newPlayer(1,340,15)
newAIPlayer(2,965,360,.5,AITemplate("CC",10,3,true,16260))
garbageSpeed=1e99
game.garbageSpeed=1e99
end,
mesDisp=function(P,dx,dy)
end,

View File

@@ -21,7 +21,7 @@ return{
load=function()
newPlayer(1,340,15)
newAIPlayer(2,965,360,.5,AITemplate("CC",10,3,true,26000))
garbageSpeed=1e99
game.garbageSpeed=1e99
end,
mesDisp=function(P,dx,dy)
end,

44
modes/sprintPenta.lua Normal file
View 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,
}

View File

@@ -29,11 +29,11 @@ return{
if P.stat.row<400 then return end
local T=P.stat.time
return
T<=62,255 and 5 or
T<=90,326 and 4 or
T<=130,462 and 3 or
T<=200,626 and 2 or
T<=360,1260 and 1 or
T<=255 and 5 or
T<=326 and 4 or
T<=462 and 3 or
T<=626 and 2 or
T<=1260 and 1 or
0
end,
}

View File

@@ -1,5 +1,5 @@
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
P:lose()
end
@@ -11,7 +11,7 @@ return{
drop=30,lock=60,
freshLimit=15,
target=200,
dropPiece=tech_check_ultimate,
dropPiece=tech_check_hard,
bg="matrix",bgm="secret8th",
},
load=function()

View File

@@ -1,5 +1,5 @@
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
P:lose()
end
@@ -11,7 +11,7 @@ return{
_20G=true,lock=60,
freshLimit=15,
target=200,
dropPiece=tech_check_ultimate,
dropPiece=tech_check_hard,
bg="matrix",bgm="secret7th",
},
load=function()

View File

@@ -1,6 +1,6 @@
local format=string.format
local function tech_check_hard(P)
if #P.clearedRow>0 and P.lastClear<10 then
local function tech_check_easy(P)
if #P.clearedRow>0 and P.b2b<40 then
P:lose()
end
end
@@ -11,7 +11,7 @@ return{
_20G=true,lock=60,
freshLimit=15,
target=200,
dropPiece=tech_check_hard,
dropPiece=tech_check_easy,
bg="matrix",bgm="secret7th",
},
load=function()

View File

@@ -1,5 +1,5 @@
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
P:lose()
end
@@ -11,7 +11,7 @@ return{
oncehold=false,
drop=1e99,lock=1e99,
target=200,
dropPiece=tech_check_ultimate,
dropPiece=tech_check_hard,
bg="matrix",bgm="newera",
},
load=function()

View File

@@ -1,5 +1,5 @@
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
P:lose()
end
@@ -13,7 +13,7 @@ return{
freshLimit=15,
target=200,
fineKill=true,
dropPiece=tech_check_ultimate,
dropPiece=tech_check_hard,
bg="flink",bgm="infinite",
},
slowMark=true,

View File

@@ -1,9 +1,4 @@
local format=string.format
local function tech_check_hard(P)
if #P.clearedRow>0 and P.lastClear<10 then
P:lose()
end
end
return{
color=color.lightYellow,
@@ -13,7 +8,6 @@ return{
freshLimit=15,
target=200,
fineKill=true,
dropPiece=tech_check_hard,
bg="flink",bgm="infinite",
},
slowMark=true,

View File

@@ -17,7 +17,7 @@ local modeRankColor={
color.purple, --Special
}
local rankString={
"C","B","A","S","SS",
"D","C","B","A","S",
}
local miniTitle_rect={
{2,0,5,1},{4,1,1,6},
@@ -70,13 +70,13 @@ local function drawVirtualkey()
local B=V[i]
gc.setColor(1,1,1,a)
gc.setLineWidth(B.r*.07)
gc.circle("line",B.x,B.y,B.r)--Button outline
gc.circle("line",B.x,B.y,B.r,10)--Button outline
_=V[i].pressTime
gc.draw(VKIcon[i],B.x,B.y,nil,B.r*.026+_*.08,nil,18,18)--icon
if _>0 then
gc.setColor(1,1,1,a*_*.08)
gc.circle("fill",B.x,B.y,B.r*.94)--Glow
gc.circle("line",B.x,B.y,B.r*(1.4-_*.04))--Ripple
gc.circle("fill",B.x,B.y,B.r*.94,10)--Glow
gc.circle("line",B.x,B.y,B.r*(1.4-_*.04),10)--Ripple
end
end
end
@@ -86,12 +86,12 @@ local function drawVirtualkey()
local B=V[i]
gc.setColor(1,1,1,a)
gc.setLineWidth(B.r*.07)
gc.circle("line",B.x,B.y,B.r)
gc.circle("line",B.x,B.y,B.r,10)
_=V[i].pressTime
if _>0 then
gc.setColor(1,1,1,a*_*.08)
gc.circle("fill",B.x,B.y,B.r*.94)
gc.circle("line",B.x,B.y,B.r*(1.4-_*.04))
gc.circle("fill",B.x,B.y,B.r*.94,10)
gc.circle("line",B.x,B.y,B.r*(1.4-_*.04),10)
end
end
end
@@ -278,8 +278,8 @@ function Pnt.music()
gc.draw(drawableText.musicRoom,22,23)
gc.draw(drawableText.nowPlaying,490,390)
setFont(30)
for i=1,#musicID do
gc.print(musicID[i],50,90+30*i)
for i=1,BGM.len do
gc.print(BGM.list[i],50,90+30*i)
end
gc.draw(IMG.titleImage,640,310,nil,1.5,nil,206,35)
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()
local S=sceneTemp
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
local _=T
if gameResult then _=_*.7 end
if game.result then _=_*.7 end
gc.setColor(.15,.15,.15,_)
gc.push("transform")
gc.origin()
@@ -443,9 +443,9 @@ function Pnt.pause()
--Pause Info
setFont(25)
if pauseCount>0 then
if game.pauseCount>0 then
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
gc.setColor(1,1,1,T)
@@ -457,7 +457,7 @@ function Pnt.pause()
--Result Text
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
if frame>180 then
@@ -515,9 +515,9 @@ function Pnt.setting_game()
mText(drawableText.setting_game,640,15)
gc.draw(blockSkin[int(Timer()*2)%11+1],720,540,Timer()%6.28319,2,nil,15,15)
end
function Pnt.setting_graphic()
function Pnt.setting_video()
gc.setColor(1,1,1)
mText(drawableText.setting_graphic,640,15)
mText(drawableText.setting_video,640,15)
end
function Pnt.setting_sound()
gc.setColor(1,1,1,.8)
@@ -598,16 +598,16 @@ function Pnt.setting_key()
gc.setColor(1,1,1)
setFont(26)
local board=s.board
local b1,b2=keyMap[s.board],keyMap[s.board+2]
for N=1,20 do
if N<11 then
gc.printf(text.acts[N],47,45*N+22,180,"right")
mStr(keyMap[board][N],340,45*N+22)
mStr(keyMap[board+8][N],540,45*N+22)
mStr(b1[N],340,45*N+22)
mStr(b2[N],540,45*N+22)
else
gc.printf(text.acts[N],647,45*N-428,180,"right")
mStr(keyMap[board][N],940,45*N-428)
mStr(keyMap[board+8][N],1040,45*N-428)
mStr(b1[N],940,45*N-428)
mStr(b2[N],1040,45*N-428)
end
end
gc.setLineWidth(2)
@@ -618,9 +618,7 @@ function Pnt.setting_key()
gc.line(40,y,1240,y)
end
setFont(35)
gc.print("Player:",170,590)
gc.print(int(board*.5+.5),300,590)
gc.print(board.."/8",580,590)
gc.print(text.page..s.board,280,590)
gc.draw(drawableText.ctrlSetHelp,50,650)
end
function Pnt.setting_skin()
@@ -673,7 +671,7 @@ function Pnt.help()
end
setFont(19)
gc.print(text.used,30,330)
gc.draw(IMG.titleImage,280,610,.1,1+.05*sin(Timer()*2),nil,206,35)
gc.draw(IMG.titleImage,280,610,.1,1+.05*sin(Timer()*2.6),nil,206,35)
gc.setLineWidth(3)
gc.rectangle("line",18,18,263,263)
gc.rectangle("line",1012,18,250,250)
@@ -681,10 +679,10 @@ function Pnt.help()
gc.draw(IMG.pay2,1014,20)
setFont(20)
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)
gc.print(text.support,150,283+20,sin(Timer()*2.6)*.02,nil,nil,115,20)
gc.print(text.support,1138,270+20,sin(Timer()*2.83)*.02,nil,nil,115,20)
mStr(text.support,150+sin(Timer()*4)*20,283)
mStr(text.support,1138-sin(Timer()*4)*20,270)
end
function Pnt.stat()
local chart=sceneTemp.chart
@@ -737,8 +735,6 @@ function Pnt.history()
gc.rectangle("line",30,45,1000,632)
setFont(20)
local _=sceneTemp
for i=0,min(22,#_[1]-_[2])do
gc.print(_[1][_[2]+i],40,50+27*(i))
end
gc.print(_[1][_[2]],40,50)
end
return Pnt

View File

@@ -1,10 +1,68 @@
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,0,0,0,0,1,1,5},
{1,1,0,0,0,0,0,4,4,4},
{5,1,1,0,0,0,0,6,6,4},
{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,7,0,0,0},
{4,1,6,6,2,3,7,0,0,0},
{1,1,6,6,2,2,7,0,0,0},
{1,7,7,7,7,2,7,0,0,0},
},
{
{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
}

View File

@@ -1,11 +1,77 @@
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},
{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},
{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},
{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,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,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},
{2,5,4,3},{2,5,6,7},{7,5,4,2},{4,5,3,5},
{
{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},
{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},
{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,4},{7,5,3},{7,6,6},{7,7,7},
},--3*4 shape
{
{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},
{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
}

View File

@@ -77,7 +77,7 @@ if system=="Windows"then
collectgarbage()
end
end
-------------------------------------------------Stack setup
-------------------------------------------------9 Stack setup
local dirCount={1,1,3,3,3,0,1}
local spinOffset={
{[0]=0,1,0,0},--Z
@@ -180,7 +180,7 @@ local function getScore(field,cb,cy)
HclearScore[clear]--Clearing
-hole*70--Hole
-cy*50--Height
-sdh--∫Δh
-sdh--Sum of DeltaH
or
LclearScore[clear]
-hole*100

View File

@@ -168,7 +168,7 @@ function BGdraw.matrix()
local _=ceil(scr.h/80)
for i=1,ceil(scr.w/80)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)
end
end

View File

@@ -5,13 +5,14 @@ local BGM={}
-- BGM.suspend=[str:pausing ID]
-- BGM.playing=[src:playing SRC]
BGM.list={
"blank","way","newera","infinite","reason",
"race","push","secret7th","secret8th",
"rockblock","cruelty","final","8-bit happiness","end",
"blank","way","race","newera","push",
"reason","infinite","secret7th","secret8th",
"shining terminal","oxygen","distortion",
"rockblock","cruelty","final","8-bit happiness","end",
}
BGM.len=#BGM.list
function BGM.loadOne(_)
_,BGM.list[_]=BGM.list[_]
local _=BGM.list[_]
BGM.list[_]=love.audio.newSource("/BGM/".._..".ogg","stream")
BGM.list[_]:setLooping(true)
BGM.list[_]:setVolume(0)

View File

@@ -136,10 +136,6 @@ function File.loadData()
if s then
setfenv(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
S.clear_S={S.clear_1,S.clear_2,S.clear_3,S.clear_4}
S.clear={{},{},{},{},{},{},{}}
@@ -184,6 +180,38 @@ function File.loadData()
S.clear[i][4]=0
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.16"or S.version=="Alpha V0.8.17"or S.version=="Alpha V0.8.18"then
setting.skin[3],setting.skin[4]=setting.skin[4],setting.skin[3]
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)
end
end

View File

@@ -13,31 +13,37 @@ if setting.lang==1 then
"2+2=Miya",
"225238922 哔哩哔哩 干杯~",
"适度游戏益脑,沉迷游戏伤身,合理安排时间,享受健康生活",
"合群了就会消失,但是消失不代表没有意义",
"学会使用两个旋转键,三个更好",
"合群了就会消失, 但是消失不代表没有意义",
"学会使用两个旋转键, 三个更好",
"更小的DAS和ARR拥有更高的操作上限(如果你还能控制得了的话)",
"注意到\"旋转\"到底对方块做了些什么吗?",
"20G本质是一套全新的游戏规则",
"不要在上课时玩游戏!",
"本游戏难度上限很高,做好心理准备",
"本游戏难度上限很高, 做好心理准备",
"本游戏可不是休闲游戏",
"调到特殊的日期也不会发生什么的",
"3.1415926535897932384",
"2.7182818284590452353",
"Let-The-Bass-Kick!",
"使用love2d引擎制作",
"有疑问?先看设置有没有你想要的",
"有疑问? 先看设置有没有你想要的",
"有建议的话可以把信息反馈给作者~",
"不要按F10",
"秘密数字:626",
"CLASSIC SEXY RUSSIAN BLOCKS",
"戴上耳机以获得最佳体验",
"少女祈祷中",
"LrL,RlR LLr,RRl RRR,LLL RfR,RRf,rFF FFF",--ZSLJTOI
"RUR'U'R'FR2U'R'U'RUR'F'",
"LrL RlR LLr RRl RRR LLL FFF RfR RRf rFF",
"(RUR'U')R'FR2U'R'U'(RUR'F')",
"Am G F G",
"Techmino 好玩!",
"联网还没做呢, 别急",
"\"免费吃鸡方块\"",
"Techminohaowan",
"Techmino 好玩!",
"tetr.js 也很好玩!",
"jstris 也很好玩!",
"tetr.io 也很好玩!",
"nullpomino 也很好玩!",
}
elseif setting.lang==2 then
L={
@@ -73,11 +79,17 @@ elseif setting.lang==2 then
"CLASSIC SEXY RUSSIAN BLOCKS",
"戴上耳机以获得最佳体验",
"少女祈祷中",
"LrL,RlR LLr,RRl RRR,LLL RfR,RRf,rFF FFF",--ZSLJTOI
"RUR'U'R'FR2U'R'U'RUR'F'",
"LrL RlR LLr RRl RRR LLL FFF RfR RRf rFF",
"(RUR'U')R'FR2U'R'U'(RUR'F')",
"Am G F G",
"Techmino 好玩!",
"联网还没做呢, 别急",
"\"免费吃鸡方块\"",
"Techminohaowan",
"Techmino 好玩!",
"tetr.js 也很好玩!",
"jstris 也很好玩!",
"tetr.io 也很好玩!",
"nullpomino 也很好玩!",
}
elseif setting.lang==3 then
L={
@@ -114,10 +126,24 @@ elseif setting.lang==3 then
"CLASSIC SEXY RUSSIAN BLOCKS",
"Headphones for better experience",
"少女祈禱中",
"RUR'U'R'FR2U'R'U'RUR'F'",
"(RUR'U')R'FR2U'R'U'(RUR'F')",
"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!",
"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
return L[math.random(#L)]

View File

@@ -1,4 +1,5 @@
local IMG={
batteryImage="/mess/power.png",
titleImage="mess/title.png",
coloredTitleImage="mess/title_colored.png",
dialCircle="mess/dialCircle.png",

View File

@@ -1,125 +1,360 @@
local map={{},{},{},{},{}}
for x=1,5 do for y=1,5 do map[x][y]={x-3,y-3}end end
local zero={0,0}
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)
for _,T in next,T do
for k,vec in next,T do
T[k]=map[vec[1]+3][vec[2]+3]
if type(T)=="table"then
for _,T in next,T do
for k,vec in next,T do
T[k]=map[vec[1]][vec[2]]
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={
[1]={
[01]={{0,0},{-1,0}, {-1,1}, {0,-2}, {-1,-2},{0,1} },
[10]={{0,0},{1,0}, {1,-1}, {0,2}, {1,2}, {0,-1} },
[03]={{0,0},{1,0}, {1,1}, {0,-2}, {1,-1}, {1,-2} },
[30]={{0,0},{-1,0}, {-1,-1},{0,2}, {-1,2}, {0,-1}},
[12]={{0,0},{1,0}, {1,-1}, {0,2}, {1,2} },
[21]={{0,0},{-1,0}, {-1,1}, {0,-2}, {-1,-2} },
[32]={{0,0},{-1,0}, {-1,-1},{0,2}, {-1,2} },
[23]={{0,0},{1,0}, {1,1}, {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}, {0,1}, {-1,0}, {0,-2} },
[31]={{0,0},{0,1}, {0,-1}, {1,0}, {0,2} },
{
[01]={{-1, 0},{-1, 1},{ 0,-2},{-1, 2},{ 0, 1}},
[10]={{ 1, 0},{ 1,-1},{ 0, 2},{ 1,-1},{ 1,-2}},
[03]={{ 1, 0},{ 1, 1},{ 0,-2},{ 1,-1},{ 1,-2}},
[30]={{-1, 0},{-1,-1},{ 0, 2},{-1, 2},{ 0,-1}},
[12]={{ 1, 0},{ 1,-1},{ 0, 2},{ 1, 2}},
[21]={{-1, 0},{-1, 1},{ 0,-2},{-1,-2}},
[32]={{-1, 0},{-1,-1},{ 0, 2},{-1, 2}},
[23]={{ 1, 0},{ 1, 1},{ 0,-2},{ 1,-2}},
[02]={{ 1, 0},{-1, 0},{ 0,-1},{ 0, 1}},
[20]={{-1, 0},{ 1, 0},{ 0, 1},{ 0,-1}},
[13]={{ 0,-1},{ 0, 1},{-1, 0},{ 0,-2}},
[31]={{ 0, 1},{ 0,-1},{ 1, 0},{ 0, 2}},
},--Z
[2]={
[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}},
[03]={{0,0},{1,0}, {1,1}, {0,-2}, {1,-2}, {0,1} },
[30]={{0,0},{-1,0}, {-1,-1},{0,2}, {-1,2}, {0,-1} },
[12]={{0,0},{1,0}, {1,-1}, {0,2}, {1,2} },
[21]={{0,0},{-1,0}, {-1,1}, {0,-2}, {-1,-2} },
[32]={{0,0},{-1,0}, {-1,-1},{0,2}, {-1,2} },
[23]={{0,0},{1,0}, {1,1}, {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}, {0,-1}, {-1,0}, {0,2} },
[31]={{0,0},{0,-1}, {0,1}, {1,0}, {0,-2} },
},--S
[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} },
{},--S
{
[01]={{-1, 0},{-1, 1},{ 0,-2},{ 1, 1}},
[10]={{ 1, 0},{ 1,-1},{ 0, 2},{ 1, 2}},
[03]={{ 1, 0},{ 1, 1},{ 0,-2},{ 1,-2},{ 1,-1},{ 0, 1}},
[30]={{-1, 0},{-1,-1},{ 0, 2},{-1, 2},{ 0,-1},{-1, 1}},
[12]={{ 1, 0},{ 1,-1},{ 1, 1},{-1, 0},{ 0,-1},{ 0, 2},{ 1, 2}},
[21]={{-1, 0},{-1, 1},{ 1, 0},{ 0,-2},{-1,-2}},
[32]={{-1, 0},{-1,-1},{ 0, 2},{-1, 2},{-1, 1}},
[23]={{ 1, 0},{ 1,-1},{ 1, 1},{ 0,-2},{ 1,-2},{ 1,-1}},
[02]={{-1, 0},{ 1, 0},{ 0,-1},{ 0, 1}},
[20]={{ 1, 0},{-1, 0},{ 0, 1},{ 0,-1}},
[13]={{ 0,-1},{ 1, 0},{ 0, 1}},
[31]={{ 0, 1},{-1, 0},{ 0,-1}},
},--J
[5]={
[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}},
[03]={{0,0},{1,0}, {1,1}, {0,-2}, {1,-2} },
[30]={{0,0},{-1,0}, {-1,-1},{0,2}, {-1,2}, {0,-1} },
[12]={{0,0},{1,0}, {1,-1}, {0,-1}, {-1,-1},{0,2}, {1,2}},
[21]={{0,0},{-1,0}, {-1,1}, {0,-2}, {-1,-2},{1,1} },
[32]={{0,0},{-1,0}, {-1,-1},{0,-1}, {1,-1}, {0,2}, {-1,2}},
[23]={{0,0},{1,0}, {1,1}, {0,-2}, {1,-2}, {-1,1} },
[02]={{0,0},{-1,0}, {1,0}, {0,1} },
[20]={{0,0},{1,0}, {-1,0}, {0,-1} },
[13]={{0,0},{0,-1}, {0,1}, {1,0}, {0,-2}, {0,2}},
[31]={{0,0},{0,-1}, {0,1}, {-1,0}, {0,-2}, {0,2}},
{},--L
{
[01]={{-1, 0},{-1, 1},{ 0,-2},{-1,-2},{-1,-1}},
[10]={{ 1, 0},{ 1,-1},{ 0, 2},{ 1, 2},{ 0,-1},{ 1, 1}},
[03]={{ 1, 0},{ 1, 1},{ 0,-2},{ 1,-2}},
[30]={{-1, 0},{-1,-1},{ 0, 2},{-1, 2},{ 0,-1}},
[12]={{ 1, 0},{ 1,-1},{ 0,-1},{-1,-1},{ 0, 2},{ 1, 2}},
[21]={{-1, 0},{-1, 1},{ 0,-2},{-1,-2},{ 1, 1}},
[32]={{-1, 0},{-1,-1},{ 0,-1},{ 1,-1},{ 0, 2},{-1, 2}},
[23]={{ 1, 0},{ 1, 1},{ 0,-2},{ 1,-2},{-1, 1}},
[02]={{-1, 0},{ 1, 0},{ 0, 1}},
[20]={{ 1, 0},{-1, 0},{ 0,-1}},
[13]={{ 0,-1},{ 0, 1},{ 1, 0},{ 0,-2},{ 0, 2}},
[31]={{ 0,-1},{ 0, 1},{-1, 0},{ 0,-2},{ 0, 2}},
},--T
[6]={},--O(special)
[7]={
[01]={{0,0},{0,1}, {1,0}, {-2,0}, {-2,-1},{1,2} },
[03]={{0,0},{0,1}, {-1,0}, {2,0}, {2,-1}, {-1,2} },
[10]={{0,0},{2,0}, {-1,0}, {-1,-2},{2,1}, {0,2} },
[30]={{0,0},{-2,0}, {1,0}, {1,-2}, {-2,1}, {0,2} },
[12]={{0,0},{-1,0}, {2,0}, {-1,2}, {2,-1} },
[32]={{0,0},{1,0}, {-2,0}, {1,-2}, {-2,-1} },
[21]={{0,0},{-2,0}, {1,0}, {1,-2}, {-2,1} },
[23]={{0,0},{2,0}, {-1,0}, {-1,-2},{2,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}, {1,0}, {0,1} },
[31]={{0,0},{0,-1}, {1,0}, {-1,0}, {0,1} },
}--I
}for i=1,7 do collect(TRS[i])end
function(P,d)
if P.human then SFX.fieldPlay("rotate",nil,P)end
if P.gameEnv.easyFresh then P:freshLockDelay()end
if not P.gameEnv.ospin then return end
local x,y=P.curX,P.curY
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
local D=P.spinSeq%100*10+d
P.spinSeq=D
if D<100 then return end
for i=1,#OspinList do
local L=OspinList[i]
if D==L[1]then
local id,dir=L[2],L[3]
local bk=blocks[id][dir]
local x,y=P.curX+L[4],P.curY+L[5]
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={
[1]={
[01]={{0,0},{-1,0}, {-1,1}, {0,-2}, {-1,-2} },
[10]={{0,0},{1,0}, {1,-1}, {0,2}, {1,2} },
[03]={{0,0},{1,0}, {1,1}, {0,-2}, {1,-2} },
[30]={{0,0},{-1,0}, {-1,-1},{0,2}, {-1,2} },
[12]={{0,0},{1,0}, {1,-1}, {0,2}, {1,2} },
[21]={{0,0},{-1,0}, {-1,1}, {0,-2}, {-1,-2} },
[32]={{0,0},{-1,0}, {-1,-1},{0,2}, {-1,2} },
[23]={{0,0},{1,0}, {1,1}, {0,-2}, {1,-2} },
{
[01]={{-1,0},{-1, 1},{ 0,-2},{-1,-2}},
[10]={{ 1,0},{ 1,-1},{ 0, 2},{ 1, 2}},
[03]={{ 1,0},{ 1, 1},{ 0,-2},{ 1,-2}},
[30]={{-1,0},{-1,-1},{ 0, 2},{-1, 2}},
[12]={{ 1,0},{ 1,-1},{ 0, 2},{ 1, 2}},
[21]={{-1,0},{-1, 1},{ 0,-2},{-1,-2}},
[32]={{-1,0},{-1,-1},{ 0, 2},{-1, 2}},
[23]={{ 1,0},{ 1, 1},{ 0,-2},{ 1,-2}},
},
[7]={
[01]={{0,0},{-2,0}, {1,0}, {-2,-1},{1,2} },
[10]={{0,0},{2,0}, {-1,0}, {2,1}, {-1,-2} },
[12]={{0,0},{-1,0}, {2,0}, {-1,2}, {2,-1} },
[21]={{0,0},{1,0}, {-2,0}, {1,-2}, {-2,1} },
[23]={{0,0},{2,0}, {-1,0}, {2,1}, {-1,-2} },
[32]={{0,0},{-2,0}, {1,0}, {-2,-1},{1,2} },
[30]={{0,0},{1,0}, {-2,0}, {1,-2}, {-2,1} },
[03]={{0,0},{-1,0}, {2,0}, {-1,2}, {2,-1} },
false,
false,
false,
function()end,
false,
{
[01]={{-2, 0},{ 1, 0},{-2,-1},{ 1, 2}},
[10]={{ 2, 0},{-1, 0},{ 2, 1},{-1,-2}},
[12]={{-1, 0},{ 2, 0},{-1, 2},{ 2,-1}},
[21]={{ 1, 0},{-2, 0},{ 1,-2},{-2, 1}},
[23]={{ 2, 0},{-1, 0},{ 2, 1},{-1,-2}},
[32]={{-2, 0},{ 1, 0},{-2,-1},{ 1, 2}},
[30]={{ 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])
for i=2,5 do AIRS[i]=AIRS[1]end
for i=8,25 do AIRS[i]=AIRS[1]end
pushZero(AIRS)
local NONE={}
for i=1,25 do NONE[i]=ZERO end
return{
TRS=TRS,
AIRS=AIRS,
NONE=NONE,
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,6 @@
do return end
--LIGHT MODULE(Optimized by MrZ,Original on github/love2d community/simple-love-lights)
--Heavily based on mattdesl's libGDX implementation:
--https://github.com/mattdesl/lwjgl-basics/wiki/2D-Pixel-Perfect-Shadows
--Private--
local gc=love.graphics
local C=gc.clear
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()
end
local function draw(L)
--Initialization
local r,g,b,a=love.graphics.getColor()
gc.setCanvas(L.blackCanvas)C()
gc.setCanvas(L.shadowCanvas)C()
gc.setCanvas(L.renderCanvas)C()
lightRenderShader:send("xresolution",L.size);
shadowMapShader:send("yresolution",L.size);
--初始化数据
--get up-left of light
local X=L.x-L.size*.5
local Y=L.y-L.size*.5
--整束光的左上角
--Render solid
gc.translate(-X,-Y)
L.blackCanvas:renderTo(L.blackFn)
gc.translate(X,Y)
--渲染遮光物
--Render shade canvas by solid
gc.setShader(shadowMapShader)
gc.setCanvas(L.shadowCanvas)
gc.draw(L.blackCanvas)
--根据遮光物渲染阴影画布
--Render light canvas by shade
gc.setShader(lightRenderShader)
gc.setCanvas(L.renderCanvas)
gc.draw(L.shadowCanvas,0,0,0,1,L.size)
--根据阴影画布渲染光画布
--Ready to final render
gc.setShader()gc.setCanvas()gc.setBlendMode("add")
--准备渲染
--Render to screes
gc.setColor(r,g,b,a)
gc.draw(L.renderCanvas,X,Y+L.size,0,1,-1)
--渲染到屏幕
--Reset
gc.setBlendMode("alpha")
--复位
end
--Public--
function Lights.draw()
local LIGHT={}
function LIGHT.draw()
for i=1,#Lights do
Lights[i]:draw()
end
end
function Lights.clear(L)
function LIGHT.clear(L)
for i=#Lights,1,-1 do
Lights[i]:destroy()
Lights[i]=nil
end
end
function Lights.add(x,y,R,F)
function LIGHT.add(x,y,R,F)
local id=#Lights+1
Lights[id]={
--Methods
id=id,
x=x,y=y,size=R,
blackCanvas=gc.newCanvas(R,R),--遮挡物画布
shadowCanvas=gc.newCanvas(R,1),--1D视深画布
renderCanvas=gc.newCanvas(R,R),--灯光画布
blackFn=F,--遮挡物绘图函数
--方法
blackCanvas=gc.newCanvas(R,R),--solid canvas
shadowCanvas=gc.newCanvas(R,1),--1D vis-depth canvas
renderCanvas=gc.newCanvas(R,R),--light canvas
blackFn=F,--solid draw funcion
move=move,
setPow=setPow,
draw=draw,
destroy=destroy,
}
end
return Lights
return LIGHT

View File

@@ -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={
"drop","lock",
"wait","fall",
@@ -51,5 +23,4 @@ customRange={
bg={"none","game1","game2","game3","strap","rgb","glow","matrix"},
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}

View File

@@ -11,13 +11,34 @@ local function RotCW(B)
end
local O,_=true,false
local L={
--Tetramino
{{_,O,O},{O,O,_}}, --Z
{{O,O,_},{_,O,O}}, --S
{{O,O,O},{_,_,O}}, --L
{{O,O,O},{O,_,_}}, --J
{{O,O,O},{_,_,O}}, --L
{{O,O,O},{_,O,_}}, --T
{{O,O},{O,O}}, --O
{{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
local B=L[i]

View File

@@ -1,10 +1,10 @@
modes={
{"sprint_10", id=1, x=0, y=0, size=35,shape=1,icon="timer", unlock={2,3}},
{"sprint_20", id=2, x=-300, y=0, size=45,shape=1,icon="timer", unlock={73,74,75}},
{"sprint_40", id=3, x=0, y=-400, size=55,shape=1,icon="timer", unlock={4,9,71,72}},
{"sprint_100", id=4, x=-200, y=-400, size=45,shape=1,icon="timer", unlock={5,7}},
{"sprint_400", id=5, x=-400, y=-400, size=35,shape=1,icon="timer", unlock={6}},
{"sprint_1000", id=6, x=-600, y=-400, size=35,shape=1,icon="timer", unlock={}},
{"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="sprint", unlock={}},
{"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="sprint", unlock={5,7}},
{"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="sprint", unlock={}},
{"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={}},
{"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={}},
{"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_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}},
@@ -81,9 +81,7 @@ modes={
{"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_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={}},
{"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={}},
{"sprintPenta", id=73, x=-200, y=-200, size=45,shape=3,icon="sprint", unlock={}},
}
modeRanks={}
for i=1,#modes do

View File

@@ -32,6 +32,9 @@ function SFX.loadAll()
SFX.loadOne(i)
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)
if setting.sfx==0 then return end
local S=SFX.list[s]--source list

View File

@@ -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={
{[0]=TMP1,TMP2,TMP3,TMP3},
{[0]=TMP1,TMP2,TMP3,TMP3},
{[0]=TMP1,TMP2,TMP3,TMP3},
{[0]=TMP1,TMP2,TMP3,TMP3},
{[0]=TMP1,TMP2,TMP3,TMP3},
{[0]=TMP4,TMP4,TMP4,TMP4},
{[0]={0.5,2.5},{2.5,0.5},{1.5,2.5},{2.5,1.5}},
--Tetramino
{[0]=N1,N2,N3,N3},--Z
{[0]=N1,N2,N3,N3},--S
{[0]=N1,N2,N3,N3},--L
{[0]=N1,N2,N3,N3},--J
{[0]=N1,N2,N3,N3},--T
{[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

View File

@@ -85,30 +85,30 @@ end
function VOC.update()
for i=#voiceQueue,1,-1 do
local Q=voiceQueue[i]
if Q.s==0 then--闲置轨,自动删除多余
if Q.s==0 then--Free channel, auto delete when >3
if i>3 then
rem(voiceQueue,i)
end
elseif Q.s==1 then--等待转换
elseif Q.s==1 then--Waiting load source
Q[1]=getVoice(Q[1])
Q[1]:setVolume(setting.voc*.1)
Q[1]:play()
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
Q[2]=getVoice(Q[2])
Q[2]:setVolume(setting.voc*.1)
Q[2]:play()
Q.s=3
end
elseif Q.s==3 then--12同时播放
elseif Q.s==3 then--playing 12 same time
if not Q[1]:isPlaying()then
for i=1,#Q do
Q[i]=Q[i+1]
end
Q.s=Q[2]and 2 or 4
end
elseif Q.s==4 then--最后播放
elseif Q.s==4 then--playing last
if not Q[1].isPlaying(Q[1])then
Q[1]=nil
Q.s=0
@@ -121,12 +121,13 @@ function VOC.play(s,chn)
if chn then
local L=voiceQueue[chn]
local _=VOC.list[s]
if not _ then print("no VOC called:"..s)return end
L[#L+1]=_[rnd(#_)]
L.s=1
--添加到queue[chn]
--add to queue[chn]
else
voiceQueue[VOC.getFreeChannel()]={s=1,VOC.list[s][rnd(#VOC.list[s])]}
--自动创建空轨/播放
--create new channel & play
end
end
end

View File

@@ -1,21 +1,14 @@
local gc=love.graphics
local kb=love.keyboard
local int=math.floor
local format=string.format
local next=next
local EMPTY={}
local button={
type="button",
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()
self.ATV=0
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)
end
function button:update()
if widget_sel==self then
if WIDGET.sel==self then
if self.ATV<8 then self.ATV=self.ATV+1 end
else
if self.ATV>0 then self.ATV=self.ATV-1 end
@@ -65,15 +58,6 @@ local switch={
ATV=0,--activating time(0~8)
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()
self.ATV=0
self.CHK=0
@@ -83,7 +67,7 @@ function switch:isAbove(x,y)
end
function switch:update()
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
end
_=self.CHK
@@ -123,18 +107,6 @@ local slider={
ATV=0,--activating time(0~8)
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()
self.ATV=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
end
function slider:update()
if widget_sel==self then
if WIDGET.sel==self then
if self.ATV<6 then self.ATV=self.ATV+1 end
else
if self.ATV>0 then self.ATV=self.ATV-1 end
@@ -184,4 +156,154 @@ function slider:draw()
end
function slider:getInfo()
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

1425
player.lua

File diff suppressed because it is too large Load Diff

View File

@@ -50,8 +50,8 @@ local sceneInit={
end,
music=function()
if BGM.nowPlay then
for i=1,#musicID do
if musicID[i]==BGM.nowPlay then
for i=1,BGM.len do
if BGM.list[i]==BGM.nowPlay then
sceneTemp=i--music select
return
end
@@ -97,6 +97,13 @@ local sceneInit={
BG.set(modeEnv.bg)
end,
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
sceneTemp={
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)),
},
--从上开始,顺时针90°
--from right-down, 60 degree each
radar={
(S.recv-S.pend+S.dig)/S.time*60,--DefPM
(S.recv-S.pend)/S.time*60, --OffPM
@@ -161,11 +168,11 @@ local sceneInit={
setting_game=function()
BG.set("space")
end,
setting_graphic=function()
setting_video=function()
BG.set("space")
end,
setting_sound=function()
sceneTemp={last=0,jump=0}--last sound time,animation count(100)
sceneTemp={last=0,jump=0}--last sound time,animation count(10 to 0)
BG.set("space")
end,
setting_control=function()
@@ -263,11 +270,12 @@ local backFunc={
mergeStat(stat,players[1].stat)
TASK.clear("play")
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_key= function()FILE.saveKeyMap()end,
setting_game= function()FILE.saveSetting()end,
setting_graphic=function()FILE.saveSetting()end,
setting_sound= function()FILE.saveSetting()end,
setting_lang= function()FILE.saveSetting()end,
}
function SCN.swapUpdate()
local S=SCN.swap
@@ -275,12 +283,9 @@ function SCN.swapUpdate()
if S.time==S.mid then
SCN.init(S.tar,SCN.cur)
SCN.cur=S.tar
for _,W in next,Widget[S.tar]do
W:reset()
end--重置控件
widget_sel=nil
WIDGET.set(widgetList[S.tar])
collectgarbage()
--此时场景切换
--Scene swapped this moment
end
if S.time==0 then
SCN.swapping=false
@@ -311,7 +316,6 @@ function SCN.swapTo(tar,style)
S.time=swap[1]
S.mid=swap[2]
S.draw=swap[3]
widget_sel=nil
end
end
function SCN.back()

View File

@@ -1,30 +1,29 @@
#define PI 3.14
extern float xresolution;
//从1D距离map采样
//sample from 1D vis-depth map
float samp(vec2 coord,float r,Image u_texture){
return step(r,Texel(u_texture,coord).r);
}
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.;
float r=length(norm);
vec2 tc=vec2((atan(norm.y,norm.x)+PI)/(2.*PI),0.);
//根据离光源距离放大模糊系数,模拟影子淡出
float blur=(1./xresolution)*smoothstep(0.,1.,r);
//简易高斯模糊
float sum=
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
//enlarge blur parameter by distance, light scattering simulation
float blur=(1./xresolution)*smoothstep(.3,1.,r);
+samp(tc,r,texture)*.16//The center tex coord,which gives us hard shadows.
+samp(vec2(tc.x+1.*blur,tc.y),r,texture)*.15
+samp(vec2(tc.x+2.*blur,tc.y),r,texture)*.12
+samp(vec2(tc.x+3.*blur,tc.y),r,texture)*.9
+samp(vec2(tc.x+4.*blur,tc.y),r,texture)*.5;
//sum值为亮度(0~1)
//乘上距离得到逐渐变淡的光线
return vec4(vec3(1.),sum*smoothstep(1.,.1,r));
//Simple Gaussian blur
float sum=//brightness(0~1)
samp(vec2(tc.x-3.*blur,tc.y),r,texture)*.1
+samp(vec2(tc.x-2.*blur,tc.y),r,texture)*.13
+samp(vec2(tc.x-1.*blur,tc.y),r,texture)*.17
+samp(tc,r,texture)*.2//The center tex coord,which gives us hard shadows.
+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));
}

View File

@@ -3,14 +3,19 @@ extern float yresolution;
vec4 effect(vec4 color,Image texture,vec2 texture_coords,vec2 screen_coords){
//Iterate through the occluder map's y-axis.
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.;
float theta=PI*1.5+norm.x*PI;
float r=(1.+norm.y)*.5;
//y/yresolution为到光源的距离(0~1)
//遮光物采样
vec4 data=Texel(texture,(vec2(-r*sin(theta),-r*cos(theta))*.5+.5));//vec2()..是遮光物采样的coord
if(data.a>.1)return vec4(vec3(y/yresolution),1.);//碰撞检测,像素透明度>.1即透光
//sample from solid
if(
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
}

View File

@@ -13,7 +13,7 @@ gc.setDefaultFilter("nearest","nearest")
gc.setColor(1,1,1)
local VKI=N("/image/virtualkey.png")
VKIcon={}
for i=1,#actName do
for i=1,20 do
VKIcon[i]=C(36,36)
gc.draw(VKI,(i-1)%5*-36,int((i-1)*.2)*-36)
end
@@ -35,18 +35,7 @@ gc.setLineWidth(4)
gc.line(0,20,40,20)
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")
batteryImage=N("/image/mess/power.png")
drawableText={
question=T(100,"?"),
@@ -65,11 +54,11 @@ drawableText={
mxcmb=T(20,"Max Combo"),
pc=T(20,"Perfect Clear"),
ko=T(25,"KO"),
D=T(100,"D"),
C=T(100,"C"),
B=T(100,"B"),
A=T(100,"A"),
S=T(100,"S"),
SS=T(80,"SS"),
modeName=T(30),levelName=T(30),
@@ -81,7 +70,7 @@ drawableText={
lose=T(120),pause=T(120),
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),
preview=T(40),
keyboard=T(25),joystick=T(25),
@@ -89,7 +78,7 @@ drawableText={
musicRoom=T(80),
nowPlaying=T(50),
VKTchW=T(30),VKOrgW=T(30),VKCurW=T(30),
noScore=T(50),
noScore=T(45),
highScore=T(30),
}
gc.setCanvas()

View File

@@ -28,7 +28,7 @@ function Tmr.load()
-- M.icon=gc.newImage("image/modeIcon/"..m.icon..".png")
-- M.icon=gc.newImage("image/modeIcon/custom.png")
elseif S.phase==6 then
--------------------------Loading some other things here?
--------------------------Loading other little things here
SKIN.load()
stat.run=stat.run+1
--------------------------
@@ -52,7 +52,7 @@ function Tmr.load()
S.tar=1
end
end
until not S.skip or SCN.swapping
until not S.skip and Timer()-t>.01
end
function Tmr.intro()
sceneTemp=sceneTemp+1
@@ -239,8 +239,8 @@ function Tmr.play(dt)
end
end
function Tmr.pause(dt)
if not gameResult then
pauseTime=pauseTime+dt
if not game.result then
game.pauseTime=game.pauseTime+dt
end
if sceneTemp.timer<50 then
sceneTemp.timer=sceneTemp.timer+1

View File

@@ -29,7 +29,6 @@ function destroyPlayers()
for i=#players,1,-1 do
local P=players[i]
if P.canvas then P.canvas:release()end
if P.dust then P.dust:release()end
while P.field[1]do
freeRow.discard(rem(P.field))
freeRow.discard(rem(P.visTime))
@@ -127,8 +126,8 @@ function pasteBoard()
::ERROR::TEXT.show(text.dataCorrupted,350,360,35,"flicker",.5)
end
function mergeStat(stat,Δ)
for k,v in next,Δ do
function mergeStat(stat,delta)
for k,v in next,delta do
if type(v)=="table"then
mergeStat(stat[k],v)
else
@@ -146,53 +145,53 @@ function randomTarget(P)
end
end--return a random opponent for P
function freshMostDangerous()
mostDangerous,secDangerous=nil
game.mostDangerous,game.secDangerous=nil
local m,m2=0,0
for i=1,#players.alive do
local h=#players.alive[i].field
if h>=m then
mostDangerous,secDangerous=players.alive[i],mostDangerous
game.mostDangerous,game.secDangerous=players.alive[i],game.mostDangerous
m,m2=h,m
elseif h>=m2 then
secDangerous=players.alive[i]
game.secDangerous=players.alive[i]
m2=h
end
end
end
function freshMostBadge()
mostBadge,secBadge=nil
game.mostBadge,game.secBadge=nil
local m,m2=0,0
for i=1,#players.alive do
local h=players.alive[i].badge
if h>=m then
mostBadge,secBadge=players.alive[i],mostBadge
game.mostBadge,game.secBadge=players.alive[i],game.mostBadge
m,m2=h,m
elseif h>=m2 then
secBadge=players.alive[i]
game.secBadge=players.alive[i]
m2=h
end
end
end
function royaleLevelup()
gameStage=gameStage+1
game.stage=game.stage+1
local spd
TEXT.show(text.royale_remain(#players.alive),640,200,40,"beat",.3)
if gameStage==2 then
if game.stage==2 then
spd=30
elseif gameStage==3 then
elseif game.stage==3 then
spd=15
garbageSpeed=.6
game.garbageSpeed=.6
if players[1].alive then BGM.play("cruelty")end
elseif gameStage==4 then
elseif game.stage==4 then
spd=10
local _=players.alive
for i=1,#_ do
_[i].gameEnv.pushSpeed=3
end
elseif gameStage==5 then
elseif game.stage==5 then
spd=5
garbageSpeed=1
elseif gameStage==6 then
game.garbageSpeed=1
elseif game.stage==6 then
spd=3
if players[1].alive then BGM.play("final")end
end
@@ -214,8 +213,8 @@ end
function pauseGame()
if not SCN.swapping then
restartCount=0--Avoid strange darkness
if not gameResult then
pauseCount=pauseCount+1
if not game.result then
game.pauseCount=game.pauseCount+1
end
for i=1,#players do
local l=players[i].keyPressing
@@ -243,18 +242,16 @@ function loadGame(M)
SFX.play("enter")
end
function resetPartGameData()
gameResult=false
game={
result=false,
pauseTime=0,
pauseCount=0,
garbageSpeed=1,
}
frame=150-setting.reTime*15
pauseTime=0
pauseCount=0
destroyPlayers()
curMode.load()
TEXT.clear()
for i=1,#players do
if players.dust then
players.dust:reset()
end
end
if modeEnv.task then
for i=1,#players do
TASK.new(modeEnv.task,players[i])
@@ -271,19 +268,20 @@ function resetPartGameData()
for i=1,#players do
players[i]:changeAtk(randomTarget(players[i]))
end
mostBadge,mostDangerous,secBadge,secDangerous=nil
gameStage=1
garbageSpeed=.3
game.stage=1
game.garbageSpeed=.3
end
restoreVirtualKey()
collectgarbage()
end
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
garbageSpeed=1
pauseTime=0--Time paused
pauseCount=0--Pausing count
destroyPlayers()
modeEnv=curMode.env
curMode.load()--bg/bgm need redefine in custom,so up here
@@ -302,9 +300,8 @@ function resetGameData()
for i=1,#players do
players[i]:changeAtk(randomTarget(players[i]))
end
mostBadge,mostDangerous,secBadge,secDangerous=nil
gameStage=1
garbageSpeed=.3
game.stage=1
game.garbageSpeed=.3
end
restoreVirtualKey()
stat.game=stat.game+1

View File

@@ -1,46 +1,58 @@
local S=[=[
"Patron"(time ordered,may not accurate):
[rmb100+]:
那没事了(T6300)
弥佑瑶
Alan
那没事了(T6300)
加油啊,钉钉动了的大哥哥(T3228)
弥佑瑶
Alan
幽灵3383
[rmb10+]:
八零哥
蕴空之灵
gggf127
dtg
ThTsOd
Fireboos
金巧
10元
立斐
时雪
yyangdid
sfqr
心痕
Sasoric
夏小亚
加油啊,钉钉动了的大哥哥(T3228)
仁参
乐↗乐↘
喜欢c4w的ztcjoin
面包
蠢熏
潘一栗
Lied
星街书婉
込余
祝西
829
e m*12
我永远爱白银诺艾尔(鹏
PCX
(D*a)
八零哥
蕴空之灵
gggf127
dtg
ThTsOd
Fireboos
金巧
10元
立斐
时雪
yyangdid
sfqr
心痕
Sasoric
夏小亚
仁参
乐↗乐↘
喜欢c4w的ztcjoin
面包
蠢熏
潘一栗
Lied
星街书婉
込余
祝西
829
e m*12
我永远爱白银诺艾尔(鹏
PCX
kagura77
呆喂
GlowingEmbers
轩辕辚
HimuroAki
TCV100
tech有养成系统了@7065
HAGE KANOBU
葡萄味的曼妥思
(闪电和拐棍)
(D*a)
Thanks!
Thanks!!!
Future outlook:
New mode:
tutorial
game Abbr. test
backfire
finesse exam(3next, 1pt/mino, drop to score)
@@ -48,9 +60,14 @@ Future outlook:
bigbang
rhythm
combo
aquare
square
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:
mod system with:
block hidden
@@ -60,21 +77,61 @@ Future outlook:
next hidden
field flip(LR/UD)
no fail(∞ lives)
防沉迷系统
简易防沉迷系统
in-game document
lang setting page
warning FX(Graphic)
game recording
powerinfo switch
new virtualWidgets like joysticks
custom sequence
new widgets (joystick etc.)
custom sequence(TTT!)
splashing block
cool backgrounds
more graphic FXs & 3D features & animations
Encrypt source code(compile to byte code)
Encrypt source code (compile to byte code)
new AI: task-Z
smarter CC(think of garbage buffer)
0.8.18:Details Update II
0.8.22: Details Updated
changed:
won't show "open saving folder" button on mobile devices
0.8.21: Bug Fixed
changed:
shape of speed dial changed
range of FX values changed
shape of speed dial changed
fixed:
error in modes with ai (rotate O in its rotation system, cause some strange error)
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:
adjustable virtualkey SFX & VIB
changed:
@@ -87,7 +144,7 @@ Future outlook:
delete all removable "goto"s!
callback system moduled, main.lua easy to read
0.8.17:Details Update
0.8.17: Details Update
new:
bag seperating line switch
better radar chart & statistics on pause page
@@ -114,7 +171,8 @@ Future outlook:
moving block when changing target in t49/t99
font error in patron list
do not reset pause count when restart
0.8.16:Fantastic Global Update
0.8.16: Fantastic Global Update
new:
new statistic page with:
Radar chart which shows some important info. of player's performance
@@ -147,7 +205,8 @@ Future outlook:
error when set to max 0 next
AI sequence initializing error when face setting changed
DAS error
0.8.15:Bug Fixed
0.8.15: Bug Fixed
new:
can switch line-clear text now
new attack way "Clear"(half-clear)
@@ -163,7 +222,7 @@ Future outlook:
error when reach 400 in 20G(Lunatic)
error block color in modes with starting field
0.8.14:Cool FX
0.8.14: Cool FX
new:
click/tap/any-key to skip loading animation
lock animation
@@ -178,7 +237,7 @@ Future outlook:
some times error when touch screen
touch/press release with no press, then error
0.8.13:O-spin Update++
0.8.13: O-spin Update++
new:
a independent page to set DAS/ARR, with an animation for preview
changed:
@@ -190,9 +249,9 @@ Future outlook:
wrong behavior in pause scene
ospin error in 0.8.12
memory leakage in t49/t99
new behavior of widgets
unnatural behavior of widgets
0.8.12:Bountful Update
0.8.12: Bountful Update
new:
layout setting: skin system with customizable block color/direction
more information when pause
@@ -221,7 +280,7 @@ Future outlook:
stage reset problem in t49/t99
wrong info in tech-L/U/U+ mode
0.8.11:Total Update
0.8.11: Total Update
changed:
better rule of checking invalid game
can setting when pause
@@ -236,7 +295,7 @@ Future outlook:
some O-spin error
error line counting when pc(full b2b)
0.8.10:Cool Update
0.8.10: Cool Update
new:
new BGM:Distortion(master-final)
all background darker
@@ -245,97 +304,127 @@ Future outlook:
error when finish master/ultra mode
shakeFX no effect when below 3
0.8.9:System Detail Update
invalid game when pause too much
quick play re-added
new BGM: Oxygen(c4w&pc training)
space background little changed
0.8.9: System Detail Update
new:
invalid game when pause too much
quick play re-added
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
0.8.8:Space BG Update
background now is cool space with "planets" and "stars", not boring falling tetrominos!
records with date
adjustable waiting time before start
ajustable maxnext count
new error page and a new voice
tiny change in rotate system(JL pistol-spin)
marked the modes with limited das/arr
better board copy/paste
no black side in any screen size
an unlock-all easter egg
cannot press invisible func key
fixed: some mode error
add many fatal bugs
0.8.8: Space BG Update
new:
background now is cool space with "planets" and "stars", instead of boring falling tetrominos
no black side in any screen size
adjustable waiting time before start
ajustable maxnext count
marked the modes with limited das/arr
new error page and a new voice
add many fatal bugs
changed:
simple records with date
tiny change in rotate system(JL pistol-spin)
better board copy/paste
an unlock-all easter egg
fixed:
press invisible func key
some mode error
0.8.7:Game Detail Update
better user experience in mode selecting
support 2^n G falling speed
speed of marathon mode changed
shorter clipboard string(when air above)
attack system/score system little changed
fixed: rank system, some mode error when enter(again!)
0.8.7: Game Detail Update
new:
support 2^n G falling speed
changed:
better user experience in mode selecting
speed of marathon mode changed
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
gamepad can adjust key
add SFX when enter game
map GUI little adjusted
event system little changed(no ctrl when scene swapping)
fixed:rank system, some mode error when enter
0.8.6: System Detail Update
new:
can adjust gamepad keysetting
add SFX when enter game
changed:
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
mode map!Brandly new GUI for mode selecting
mode unlock system, not that scary for noob
every mode has rank calculating method(may some mistakes/inappropriate number)
save 10 best recoreds for each mode
can save/share custom map now
new mode: Big Bang
button appearance changed
better widget performence
remove Qplay
many bug fixed
0.8.5-: Exploration Update
new:
mode map!Brandly new GUI for mode selecting
mode unlock system, not that scary for noob
every mode has rank calculating method(may some mistakes/inappropriate number)
save 10 best recoreds for each mode
can save/share custom map now
"new mode": Big Bang
changed:
button appearance changed
better widget performence
remove Qplay
fixed:
many bugs
0.8.4:Miya Update+
vocal more natural(important, may cause new bug)
a bit better performence on mobile devices
fatal bug fixed
0.8.4: Miya Update+
changed:
vocal more natural(important, may cause new bug)
a bit better performence on mobile devices
fixed:
some fatal bugs
0.8.3:Miya Update
new widget appearence
cuter miya
0.8.3: Miya Update
new:
new widget appearence
cuter miya
0.8.2:Graphics Update
miya figure added
new widget appearence
GUI adjusted
bug fixed
0.8.2: Graphics Update
new:
miya figure added
new widget appearence
changed:
GUI adjusted
fixed:
some bugs
0.8.1:Power Info Update
more FX level
better battery info displaying
3 next in GMroll
bug fixed
0.8.1: Power Info Update
changed:
more FX level
better battery info displaying
3 next in GMroll
fixed:
some bugs
0.8.0:Small Update
remade text system
more details
bug fixed
0.8.0: Small Update
new:
better update log from now on(2020.5.2)
changed:
more details
code:
remade text system
fixed:
some bugs
0.7.35:Bug Fixed
bug fixed
0.7.35: Bug Fixed
yeah, only bug fixed
0.7.34:Voice Update+
0.7.34: Voice Update+
replace most voice
shaking FX more natural
0.7.33+:Bot Update
0.7.33+: Bot Update
MORE POWERFUL 9-stack AI
add stereo-setting slider
code optimized
bug fixed
0.7.32:Virtualkey Update+
0.7.32: Virtualkey Update+
Blind-GM now show section directly
easier&more standard classic mode
can switch Virtualkey's auto dodging
@@ -343,11 +432,11 @@ Future outlook:
code optimized
bug fixed
0.7.31:Stereo Update
0.7.31: Stereo Update
stereo system
fixed a problem in finesse calculating
0.7.30:Virtualkey Update
0.7.30: Virtualkey Update
auto-tracking virtual key, adjustable parameters!
can switch on/off virtuakeys
add 7 more key
@@ -358,26 +447,26 @@ Future outlook:
adjusted GUI
many bug fixed
0.7.28:Finesse Update
0.7.28: Finesse Update
add fineese check(almost useful)
code optimized
0.7.27:O-spin Update+
0.7.27: O-spin Update+
super O transform system
optimized light system(no used)
optimized system(no used)
bug fixed
0.7.26:Bug Fixed
0.7.26: Bug Fixed
new skin
import light lib
many bug fixed
0.7.25:Demo Update
0.7.25: Demo Update
demo play at main menu
ALMOST reconstructed WHOLE PLAYER SYSTEM, NEED TEST
many bug fixed
0.7.23/24:Feast of Hearing
0.7.23/24: Feast of Hearing
all bgm remade
more settings with brand new GUI!
new mode: Master-Final
@@ -390,7 +479,7 @@ Future outlook:
code optimized
many bugs fixed
0.7.22:Graphics Update
0.7.22: Graphics Update
scoring system
smooth dropping
can change FX level
@@ -406,12 +495,12 @@ Future outlook:
support 10% step alpha of virtual key
many code optimized&bugs fixed
0.7.21:Title Update
0.7.21: Title Update
new title image
more GUI details
many bugs fixed
0.7.20:Music Room Update
0.7.20: Music Room Update
add music room
change block/space apperance in draw mode
field shake animation
@@ -419,7 +508,7 @@ Future outlook:
can set BG/BGM in custom mode
bug fixed
0.7.19:Voice Update
0.7.19: Voice Update
voice system added(voice by Miya)
support macOS!
new mode: C4W training
@@ -430,7 +519,7 @@ Future outlook:
new background/sound effect in master mode
bug fixed
0.7.18:Skin Update
0.7.18: Skin Update
3 new block skins!(one skin origional by Miya(nya~))
better restarting(to prevent mistakenly touching)
switch display of puzzle mode
@@ -438,7 +527,7 @@ Future outlook:
code optimized
default custom options changed to as infinite mode
0.7.17:Pause Update
0.7.17: Pause Update
display game stats when pause
more options in statistics
better pausing
@@ -448,7 +537,7 @@ Future outlook:
little optimized
bugs fixed
0.7.16:Game Detail Update
0.7.16: Game Detail Update
change rules of custom puzzle mode
change rules of TSD mode
better pausing
@@ -456,31 +545,31 @@ Future outlook:
adjust difficulty of dig mode
bugs fixed
0.7.15:Puzzle Update
0.7.15: Puzzle Update
can make puzzle by drawing mode
can pause game with animation
change icon of "Functional key"
speed optimized
bugs fixed
0.7.14:Creativity Update
0.7.14: Creativity Update
drawing mode in custom game
adjustable virtual keys with mouse
speed optimized
rotate also create shade
0.7.13+:Small Update
0.7.13+: Small Update
change difficulty of survivor mode
little game rule change
bugs fixed(AI control error)
0.7.13:
0.7.13:
new:
Chinese game name: 方块研究所
SUPER COOL instant moving effect
new b2b bar style & animation
new transition animation
change:
changed:
change difficulty of master mode
adjust delay algorithm(probably cause controlfeel changing, please reset your DAS setting)
code reconstructed
@@ -489,7 +578,7 @@ Future outlook:
error when seq=his
error game area size of custom opponent
0.7.12:Total Update
0.7.12: Total Update
AI learned to switch attack mode
seperate master mode from marathon mode
master mode more interesting
@@ -503,7 +592,7 @@ Future outlook:
some Chinese translaton editted
[reconstruct event system]
0.7.11:Total Update
0.7.11: Total Update
some Chinese translaton editted
add bone block in 2 hardest marathon(new block-fresh system)
play sound when get badges in royale mode
@@ -515,13 +604,13 @@ Future outlook:
add QR code in help page
change some detials
0.7.10:Small Update
0.7.10: Small Update
full Chinese translation
add Classic mode
change O spin's behaviour
bugs fixed
0.7.9:O-spin Update
0.7.9: O-spin Update
O spin is a lie
better attacking pointer
language system
@@ -530,7 +619,7 @@ Future outlook:
code optimized
bugs fixed
0.7.8:Performance Update
0.7.8: Performance Update
GPU usage decreased much more than before
add virtual key animation
display player's rank after death in royale mode
@@ -539,7 +628,7 @@ Future outlook:
code optimized
bugs fixed
0.7.7:Mode Update
0.7.7: Mode Update
add dig mode
add survivor mode
combine some modes
@@ -547,7 +636,7 @@ Future outlook:
more SFXs
bugs fixed
0.7.6:Mode Update
0.7.6: Mode Update
new font
add DIFFICULTY selection
virtual keys give visual feedback(PC/phone)
@@ -560,7 +649,7 @@ Future outlook:
fix all attacking bug of royale mode
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 death mode
add PC challenge mode
@@ -575,10 +664,10 @@ Future outlook:
change sequence of TSD-only mode
royale mode use LESS GPU
0.7.4:Bug Update
0.7.4: Bug Update
add a lot of bugs
0.7.3:Game Detail Update
0.7.3: Game Detail Update
add infinite target in custom
fix TSD-only mode result+1 when finishing with a wrong clear
change sequence generator of TSD-only mode
@@ -586,7 +675,7 @@ Future outlook:
Fix Screen flow
smarter AI
0.7.2:Mode Update
0.7.2: Mode Update
add PC training mode
add TSD-only mode
remove non-sense s/z spin double
@@ -594,12 +683,19 @@ Future outlook:
grid BG changed
smarter AI
]=]
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
repeat
p1=find(S,"\n",p)
L[n]=sub(S,p,p1-1)
n,p=n+1,p1+1
until p1==EOF
return L
while true do
p1=find(S,"\n",p1+1)
c=c+1
if c==23 or p1==EOF then
L[#L+1]=sub(S,p,p1-1)
if p1==EOF then return L end
p=p1+1
c=0
end
end

View File

@@ -1,4 +1,4 @@
local mobile=system=="Android"or system=="iOS"
mobileHide=(system=="Android"or system=="iOS")and function()return true end
local virtualkeySet={
{
{1, 80, 720-200, 80},--moveLeft
@@ -71,36 +71,23 @@ local virtualkeySet={
{20,1210, 50,30},--addRight
},--PC key feedback(top&in a row)
}
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},
}
--λFuncs for widgets,delete at file end
function defSet(n)
return function()
for i=1,#customSet[n]do
customSel[i]=customSet[n][i]
end
BG.set(customRange.bg[customSel[12]])
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
--lambda Funcs for widgets,delete at file end
local function SETval(k) return function()return setting[k] end end
local function SETsto(k) return function(i)setting[k]=i end end
local function SETrev(k) return function()setting[k]=not setting[k] end end
local function pressKey(k) return function()love.keypressed(k) end end
local function setPen(i) return function()sceneTemp.pen=i end end
local function prevSkin(n) return function()SKIN.prev(n) end end
local function nextSkin(n) return function()SKIN.next(n) end end
local function nextDir(n) return function()SKIN.rotate(n) end end
local function VKAdisp(n) return function()return VK_org[n].ava end end
local function VKAcode(n) return function()VK_org[n].ava=not VK_org[n].ava end end
local function setLang(n) return function()LANG.set(n)setting.lang=n end end
local newButton,newSwitch,newSlider=WIDGET.new.button,WIDGET.new.switch,WIDGET.new.slider
local C=color
local Widget={
local widgetList={
load={},intro={},quit={},
main={
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"),
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"),
lang= newButton(150,610,160,100,C.lightGreen, 45,function()
setting.lang=setting.lang%LANG.getLen()+1
LANG.set(setting.lang)
TEXT.show(text.lang,370,610,50,"appear",1.6)
end,nil,"quit"),
lang= newButton(150,610,160,100,C.lightGreen, 45,function()SCN.push()SCN.swapTo("setting_lang")end, nil,"quit"),
quit= newButton(590,610,160,100,C.lightGrey, 45,function()VOC.play("bye")SCN.swapTo("quit","slowFade")end,nil,"play"),
},
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),
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),
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,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),
back= newButton(1200, 655,120,80,C.white, 40,SCN.back),
--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),
left= newButton(880, 480,100,100,C.white, 45,pressKey("left")),
right= newButton(1120, 480,100,100,C.white, 45,pressKey("right")),
set1= newButton(640, 160,240,75, C.lightYellow, 35,defSet(1)),
set2= newButton(640, 250,240,75, C.lightYellow, 35,defSet(2)),
set3= newButton(640, 340,240,75, C.lightYellow, 35,defSet(3)),
set4= newButton(640, 430,240,75, C.lightYellow, 35,defSet(4)),
set5= newButton(640, 520,240,75, C.lightYellow, 35,defSet(5)),
set1= newButton(640, 160,240,75, C.lightYellow, 35,pressKey("1")),
set2= newButton(640, 250,240,75, C.lightYellow, 35,pressKey("2")),
set3= newButton(640, 340,240,75, C.lightYellow, 35,pressKey("3")),
set4= newButton(640, 430,240,75, C.lightYellow, 35,pressKey("4")),
set5= newButton(640, 520,240,75, C.lightYellow, 35,pressKey("5")),
back= newButton(640, 630,180,60, C.white, 35,SCN.back),
},
draw={
@@ -181,13 +164,13 @@ local Widget={
resetGameData()
SCN.swapTo("play","none")
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")
end),
quit= newButton(640,600,240,100,C.white,35,SCN.back),
},
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"),
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"),
@@ -204,35 +187,39 @@ local Widget={
fine= newSwitch(1050,540,20, SETval("fine"), SETrev("fine"), nil,"back"),
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"),
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"),
smooth= newSwitch(230,260,25, SETval("smooth"), SETrev("smooth"), nil,"center"),
center= newSwitch(480,180,35, SETval("center"), SETrev("center"), nil,"grid"),
grid= newSwitch(480,260,30, SETval("grid"), SETrev("grid"), nil,"bagLine"),
ghost= newSwitch(250,180,35, SETval("ghost"), SETrev("ghost"), nil,"smooth"),
smooth= newSwitch(250,260,25, SETval("smooth"), SETrev("smooth"), nil,"center"),
center= newSwitch(500,180,35, SETval("center"), SETrev("center"), nil,"grid"),
grid= newSwitch(500,260,30, SETval("grid"), SETrev("grid"), nil,"bagLine"),
bagLine=newSwitch(730,180,30, SETval("bagLine"), SETrev("bagLine"), nil,"lockFX"),
lockFX= newSlider(310,340,373,3,35,nil, SETval("lockFX"), SETsto("lockFX"), nil,"dropFX"),
dropFX= newSlider(310,410,373,5,35,nil, SETval("dropFX"), SETsto("dropFX"), nil,"shakeFX"),
shakeFX=newSlider(310,480,373,5,35,nil, SETval("shakeFX"), SETsto("shakeFX"), nil,"atkFX"),
atkFX= newSlider(310,550,373,5,35,nil, SETval("atkFX"), SETsto("atkFX"), nil,"frame"),
frame= newSlider(310,620,373,10,35,nil,function()return setting.frameMul>35 and setting.frameMul/10 or setting.frameMul/5-4 end,function(i)setting.frameMul=i<5 and 5*i+20 or 10*i end,nil,"text"),
text= newSwitch(990,180,35,SETval("text"),SETrev("text"),nil,"fullscreen"),
fullscreen=newSwitch(990,260,35,SETval("fullscreen"),function()
lockFX= newSlider(350,340,373,3,32,nil, SETval("lockFX"), SETsto("lockFX"), nil,"dropFX"),
dropFX= newSlider(350,400,373,5,32,nil, SETval("dropFX"), SETsto("dropFX"), nil,"clearFX"),
clearFX=newSlider(350,460,373,3,32,nil, SETval("clearFX"), SETsto("clearFX"), nil,"shakeFX"),
shakeFX=newSlider(350,520,373,5,32,nil, SETval("shakeFX"), SETsto("shakeFX"), nil,"atkFX"),
atkFX= newSlider(350,580,373,5,32,nil, SETval("atkFX"), SETsto("atkFX"), nil,"frame"),
frame= newSlider(350,640,373,10,30,nil,function()return setting.frameMul>35 and setting.frameMul/10 or setting.frameMul/5-4 end,function(i)setting.frameMul=i<5 and 5*i+20 or 10*i end,nil,"text"),
text= newSwitch(1050,180,35,SETval("text"),SETrev("text"),nil,"fullscreen"),
fullscreen=newSwitch(1050,260,35,SETval("fullscreen"),function()
setting.fullscreen=not setting.fullscreen
love.window.setFullscreen(setting.fullscreen)
love.resize(love.graphics.getWidth(),love.graphics.getHeight())
end,nil,"bg"),
bg= newSwitch(990,330,35,SETval("bg"),function()
bg= newSwitch(1050,340,35,SETval("bg"),function()
BG.set("none")
setting.bg=not setting.bg
BG.set("space")
end,nil,"power"),
power= newSwitch(1050,420,35,SETval("powerInfo"),function()
setting.powerInfo=not setting.powerInfo
end,nil,"back"),
back= newButton(1140,650,200,80,C.white,40,SCN.back,nil,"sound"),
},
setting_sound={
game= newButton(200,80,240,80,C.lightCyan,35,function()SCN.swapTo("setting_game")end, nil,"graphic"),
graphic=newButton(1080,80,240,80,C.lightCyan,35,function()SCN.swapTo("setting_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"),
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"),
@@ -286,7 +273,7 @@ local Widget={
--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)),
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),
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),
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={
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"),
back= newButton(640, 600,200,80,C.white,40,SCN.back,nil,"qq"),
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"),
},
history={
prev= newButton(1155,170,180,180,C.white,65,pressKey("up"),function()return sceneTemp[2]==1 end),
next= newButton(1155,400,180,180,C.white,65,pressKey("down"),function()return sceneTemp[2]==#sceneTemp[1]-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),
},
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"),
},
}
defSet,SETval,SETsto,SETrev,pressKey,setPen,prevSkin,nextSkin,nextDir,VKAdisp,VKAcode=nil
for _,L in next,Widget do
mobileHide,SETval,SETsto,SETrev=nil
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
if W.next then
W.next,L[W.next].prev=L[W.next],W
end
end
end
return Widget
return widgetList