Compare commits

...

5 Commits

Author SHA1 Message Date
MrZ_26
c1b334963b 0.8.3α 2020-02-04 19:41:15 +08:00
MrZ_26
0dbdc9fe42 0.8.2+α 2020-02-04 19:40:51 +08:00
MrZ_26
324435d51a 0.8.2α 2020-02-04 19:40:34 +08:00
MrZ_26
1c384ca51a 0.8.2α 2020-02-04 19:40:21 +08:00
MrZ_26
e196790e2c 0.8.1α 2020-02-04 19:38:58 +08:00
40 changed files with 682 additions and 542 deletions

Binary file not shown.

BIN
VOICE/egg_1.ogg Normal file

Binary file not shown.

BIN
VOICE/egg_2.ogg Normal file

Binary file not shown.

Binary file not shown.

BIN
VOICE/nya_happy_4.ogg Normal file

Binary file not shown.

BIN
VOICE/nya_sad_1.ogg Normal file

Binary file not shown.

View File

@@ -51,22 +51,31 @@ function button:FX()
--[0=ripple],timer,duration,x,y,w,h
end
function button:draw()
local C=self.color
gc.setColor(C)
gc.setLineWidth(3)gc.rectangle("line",self.x,self.y,self.w,self.h,4)
gc.setColor(C[1],C[2],C[3],.4)
gc.setLineWidth(5)gc.rectangle("line",self.x,self.y,self.w,self.h,4)
local x,y,w,h=self.x,self.y,self.w,self.h
local r,g,b=unpack(self.color)
gc.setColor(.2+r*.8,.2+g*.8,.2+b*.8,.7)
local sd=shader_glow
sd:send("X",x)sd:send("Y",y)sd:send("W",w)sd:send("H",h)
gc.setShader(sd)
gc.rectangle("fill",x,y,w,h)
gc.setShader()
if self==widget_sel then
gc.rectangle("fill",self.x,self.y,self.w,self.h,4)
end--Highlight when Selected
gc.setLineWidth(4)
gc.setColor(1,1,1,.8)
gc.rectangle("line",x+2,y+2,w-4,h-4)
end
local t=self.text
if t then
if type(t)=="function"then t=t()end
setFont(self.font)
local y0=self.y+self.h*.5-self.font*.7
gc.printf(t,self.x-2,y0-1,self.w,"center")
gc.setColor(C)
gc.printf(t,self.x,y0,self.w,"center")
local y0=y+h*.5-self.font*.7
gc.setColor(1,1,1,.3)
gc.printf(t,x-2,y0-2,w,"center")
gc.printf(t,x-2,y0+2,w,"center")
gc.printf(t,x+2,y0-2,w,"center")
gc.printf(t,x+2,y0+2,w,"center")
gc.setColor(r*.5,g*.5,b*.5)
gc.printf(t,x,y0,w,"center")
end
end
function button:getInfo()
@@ -84,27 +93,26 @@ function newSwitch(x,y,font,disp,code,hide,N)
}for k,v in next,switch do _[k]=v end return _
end
function switch:isAbove(x,y)
return x>self.x and x<self.x+100 and y>self.y-20 and y<self.y+20
return x>self.x and x<self.x+50 and y>self.y-25 and y<self.y+25
end
function switch:FX()
sysFX[#sysFX+1]=self.disp()and
{1,0,15,1,.4,.4,self.x,self.y-20,50,40,0}--Switched on
or{1,0,15,.4,1,.4,self.x+50,self.y-20,50,40,0}--Switched off
{1,0,15,.4,1,.4,self.x,self.y-25,50,50,0}--Switched on
or{1,0,15,1,.4,.4,self.x,self.y-25,50,50,0}--Switched off
--[1=square fade],timer,duration,r,g,b,x,y,w,h
end
function switch:draw()
local x,y=self.x,self.y-20
local x,y=self.x,self.y-25
if self.disp()then
gc.setColor(.6,1,.6)
gc.rectangle("fill",x+50,y,50,40,3)
--ON
else
gc.setColor(1,.6,.6)
gc.rectangle("fill",x,y,50,40,3)
--OFF
end--switch
gc.setColor(1,1,1,self==widget_sel and 1 or .6)
gc.setLineWidth(3)gc.rectangle("line",x-3,y-3,106,46,5)
gc.setColor(.9,1,.9)
gc.setLineWidth(6)
gc.line(x+5,y+25,x+18,y+38,x+45,y+11)
end--checked
gc.setColor(1,1,1,self==widget_sel and .6 or .3)
gc.rectangle("fill",x,y,50,50)
gc.setLineWidth(4)
gc.setColor(1,1,1)
gc.rectangle("line",x,y,50,50)
--frame
local t=self.text
if t then
@@ -138,27 +146,34 @@ function slider:FX(pos)
--[1=square fade],timer,duration,r,g,b,x,y,w,h
end
function slider:draw()
local S=self==widget_sel
gc.setColor(1,1,1,S and 1 or .5)
local x,y=self.x,self.y
gc.setColor(1,1,1,self==widget_sel and .7 or .5)
gc.setLineWidth(2)
local x1,x2=self.x,self.x+self.w
local x1,x2=x,x+self.w
for p=0,self.unit do
local x=x1+(x2-x1)*p/self.unit
gc.line(x,self.y+7,x,self.y-7)
gc.line(x,y+7,x,y-7)
end
--units
gc.setLineWidth(5)
gc.line(x1,self.y,x2,self.y)
gc.setLineWidth(4)
gc.line(x1,y,x2,y)
--axis
gc.setColor(1,1,1)
gc.rectangle("fill",x1+(x2-x1)*self.disp()/self.unit-8,self.y-15,17,30)
--block
local t=self.text
if t then
gc.setColor(1,1,1)
setFont(self.font)
gc.printf(t,self.x-312,self.y-self.font*.7,300,"right")
gc.printf(t,x-312,y-self.font*.7,300,"right")
end
--text
local x,y=x1+(x2-x1)*self.disp()/self.unit-9,y-16
gc.setColor(.8,.8,.8)
gc.rectangle("fill",x,y,19,32)
if self==widget_sel then
gc.setLineWidth(2)
gc.setColor(1,1,1)
gc.rectangle("line",x+1,y+1,18,30)
end
--block
end
function slider:getInfo()
print(format("x=%d,y=%d,w=%d",self.x,self.y,self.w))

View File

@@ -1,13 +1,12 @@
math.randomseed(os.time())
gameVersion="Alpha V0.8.0"
gameVersion="Alpha V0.8.3"
function love.conf(t)
t.identity="Techmino"--Save directory name
t.version="11.1"
t.console=X
t.gammacorrect=X
t.appendidentity=X--If search files in source before save directory
t.accelerometerjoystick=X--If exposing accelerometer on iOS and Android as a Joystick
t.audio.mixwithsystem=true--Switch on to keep sysBGM
t.appendidentity=X--Search files in source before save directory
t.accelerometerjoystick=false--ios/android加速度计=摇杆
t.audio.mixwithsystem=true
local W=t.window
W.title="Techmino "..gameVersion
@@ -21,7 +20,7 @@ function love.conf(t)
W.vsync=0--0→∞fps
W.msaa=X--The number of samples to use with multi-sampled antialiasing (number)
W.depth=X--Bits per sample in the depth buffer
W.stencil=1--The number of bits per sample in the stencil buffer
W.stencil=1--Bits per sample in the stencil buffer
W.display=1--Monitor ID
W.highdpi=X--Enable high-dpi mode for the window on a Retina display (boolean)
W.x,W.y=nil

View File

@@ -452,6 +452,9 @@ end
Event_task={}
function Event_task.finish(P)
P.endCounter=P.endCounter+1
if scene.cur~="play"then
return true
end
if P.endCounter>120 then
pauseGame()
return true
@@ -472,7 +475,7 @@ function Event_task.lose(P)
removeRow(P.field)
removeRow(P.visTime)
end
if #players==1 then
if #players==1 and scene=="play"then
pauseGame()
end
return true
@@ -796,14 +799,14 @@ modes.sprint={
load=function()
newPlayer(1,340,15)
end,
mesDisp=function(P)
mesDisp=function(P,dx,dy)
setFont(55)
local r=max(P.gameEnv.target-P.stat.row,0)
mStr(r,-82,265)
if r<21 and r>0 then
gc.setLineWidth(4)
gc.setColor(1,r>10 and 0 or rnd(),.5)
gc.line(0,600-30*r,300,600-30*r)
gc.line(dx,600-30*r+dy,300+dx,600-30*r+dy)
end
end,
}
@@ -829,7 +832,7 @@ modes.marathon={
load=function()
newPlayer(1,340,15)
end,
mesDisp=function(P)
mesDisp=function(P,dx,dy)
setFont(45)
mStr(P.stat.row,-82,320)
mStr(P.gameEnv.target,-82,370)
@@ -870,7 +873,7 @@ modes.master={
load=function()
newPlayer(1,340,15)
end,
mesDisp=function(P)
mesDisp=function(P,dx,dy)
setFont(45)
mStr(P.modeData.point,-82,320)
mStr((P.modeData.event+1)*100,-82,370)
@@ -894,7 +897,7 @@ modes.classic={
load=function()
newPlayer(1,340,15)
end,
mesDisp=function(P)
mesDisp=function(P,dx,dy)
setFont(75)
local r=P.gameEnv.target*.1
mStr(r<11 and 18 or r<22 and r+8 or r==22 and"00"or r==23 and"0a"or format("%x",r*10-220),-82,210)
@@ -918,7 +921,7 @@ modes.zen={
load=function()
newPlayer(1,340,15)
end,
mesDisp=function(P)
mesDisp=function(P,dx,dy)
setFont(70)
mStr(max(200-P.stat.row,0),-82,280)
end,
@@ -947,7 +950,7 @@ modes.infinite={
end
end
end,
mesDisp=function(P)
mesDisp=function(P,dx,dy)
setFont(45)
mStr(P.stat.atk,-82,310)
mStr(format("%.2f",P.stat.atk/P.stat.row),-82,420)
@@ -988,7 +991,7 @@ modes.solo={
newPlayer(2,965,360,.5,AITemplate("CC",10,4,true,80000))
end
end,
mesDisp=function(P)
mesDisp=function(P,dx,dy)
end,
}
@@ -1017,7 +1020,7 @@ modes.round={
end
garbageSpeed=1e4
end,
mesDisp=function(P)
mesDisp=function(P,dx,dy)
end,
}
@@ -1042,7 +1045,7 @@ modes.tsd={
load=function()
newPlayer(1,340,15)
end,
mesDisp=function(P)
mesDisp=function(P,dx,dy)
setFont(75)
mStr(P.modeData.event,-82,330)
mDraw(drawableText.tsd,-82,407)
@@ -1093,6 +1096,7 @@ modes.blind={
_20G=true,
drop=0,lock=15,
wait=10,fall=15,
next=3,
visible="fast",
freshLimit=15,
dropPiece="GM_score",
@@ -1106,7 +1110,7 @@ modes.blind={
players[1].modeData.event="M7"
end
end,
mesDisp=function(P)
mesDisp=function(P,dx,dy)
mDraw(drawableText.line,-82,300)
mDraw(drawableText.techrash,-82,420)
if curMode.lv==6 then
@@ -1140,7 +1144,7 @@ modes.dig={
newPlayer(1,340,15)
pushSpeed=1
end,
mesDisp=function(P)
mesDisp=function(P,dx,dy)
setFont(65)
mStr(P.modeData.event,-82,310)
mDraw(drawableText.wave,-82,375)
@@ -1189,7 +1193,7 @@ modes.survivor={
newPlayer(1,340,15)
pushSpeed=curMode.lv>2 and 2 or 1
end,
mesDisp=function(P)
mesDisp=function(P,dx,dy)
setFont(65)
mStr(P.modeData.event,-82,310)
mDraw(drawableText.wave,-82,375)
@@ -1221,7 +1225,7 @@ modes.defender={
pushSpeed=2
end
end,
mesDisp=function(P)
mesDisp=function(P,dx,dy)
setFont(55)
mStr(P.modeData.event,-82,200)
mStr(P.modeData.point,-82,320)
@@ -1253,7 +1257,7 @@ modes.attacker={
pushSpeed=2
end
end,
mesDisp=function(P)
mesDisp=function(P,dx,dy)
setFont(55)
mStr(P.modeData.event,-82,200)
mStr(
@@ -1322,7 +1326,7 @@ modes.tech={
load=function()
newPlayer(1,340,15)
end,
mesDisp=function(P)
mesDisp=function(P,dx,dy)
setFont(45)
mStr(P.stat.atk,-82,310)
mStr(format("%.2f",P.stat.atk/P.stat.row),-82,420)
@@ -1367,9 +1371,8 @@ modes.c4wtrain={
elseif r==6 then F[1][7],F[1][6],F[1][5]=10,10,10
end
end,
mesDisp=function(P)
mesDisp=function(P,dx,dy)
setFont(45)
mStr(max(100-P.stat.row,0),-82,220)
mStr(P.combo,-82,310)
mStr(P.modeData.point,-82,400)
mDraw(drawableText.combo,-82,358)
@@ -1405,7 +1408,7 @@ modes.pctrain={
newPlayer(1,340,15)
Event.newPC(players[1])
end,
mesDisp=function(P)
mesDisp=function(P,dx,dy)
setFont(75)
mStr(P.stat.pc,-82,330)
mDraw(drawableText.pc,-82,412)
@@ -1441,10 +1444,10 @@ modes.pcchallenge={
load=function()
newPlayer(1,340,15)
end,
mesDisp=function(P)
mesDisp=function(P,dx,dy)
setFont(45)
mStr(max(100-P.stat.row,0),-82,250)
setFont(75)
mStr(P.stat.pc,-82,350)
mDraw(drawableText.pc,-82,432)
@@ -1504,7 +1507,7 @@ modes.techmino49={
n=n+1
end end
end,
mesDisp=function(P)
mesDisp=function(P,dx,dy)
setFont(35)
mStr(#players.alive.."/49",-82,175)
mStr(P.ko,-70,215)
@@ -1568,7 +1571,7 @@ modes.techmino99={
n=n+1
end end
end,
mesDisp=function(P)
mesDisp=function(P,dx,dy)
setFont(35)
mStr(#players.alive.."/99",-82,175)
mStr(P.ko,-70,215)
@@ -1607,7 +1610,7 @@ modes.drought={
load=function()
newPlayer(1,340,15)
end,
mesDisp=function(P)
mesDisp=function(P,dx,dy)
setFont(70)
mStr(max(100-P.stat.row,0),-82,280)
end,
@@ -1636,7 +1639,7 @@ modes.hotseat={
newPlayer(4,955,160,.5)
end
end,
mesDisp=function(P)
mesDisp=function(P,dx,dy)
end,
}
@@ -1694,7 +1697,7 @@ modes.custom={
modeEnv.bg=customRange.bg[customSel[12]]
modeEnv.bgm=customRange.bgm[customSel[13]]
end,
mesDisp=function(P)
mesDisp=function(P,dx,dy)
setFont(55)
if P.gameEnv.puzzle or P.gameEnv.target>1e10 then
mStr(P.stat.row,-82,225)
@@ -1703,21 +1706,11 @@ modes.custom={
mStr(max(P.gameEnv.target-P.stat.row,0),-82,240)
end
if P.gameEnv.puzzle and P.modeData.event==0 then
gc.setLineWidth(3)
local m=puzzleMark
for y=1,preField.h do for x=1,10 do
local B=preField[y][x]
if B>7 then
gc.setColor(blockColor[B])
gc.rectangle("line",30*x-23,607-30*y,16,16)
elseif B>0 then
local c=blockColor[B]
gc.setColor(c[1],c[2],c[3],.6)
gc.rectangle("line",30*x-25,605-30*y,20,20)
gc.rectangle("line",30*x-20,610-30*y,10,10)
elseif B==-1 then
gc.setColor(1,1,1,.4)
gc.line(30*x-25,605-30*y,30*x-5,625-30*y)
gc.line(30*x-25,625-30*y,30*x-5,605-30*y)
local T=preField[y][x]
if T~=0 then
gc.draw(m[T],30*x-30+dx,600-30*y+dy)
end
end end
end

View File

@@ -8,10 +8,10 @@ setting={
ghost=true,center=true,
smo=true,grid=false,
dropFX=3,
shakeFX=1,
shakeFX=2,
atkFX=3,
frameMul=100,
--
fullscreen=false,
bg=true,
bgblock=true,

BIN
font.ttf

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

After

Width:  |  Height:  |  Size: 155 B

BIN
image/miya/ch.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

BIN
image/miya/f1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
image/miya/f2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
image/miya/f3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
image/miya/f4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -113,7 +113,7 @@ return{
hotseat="友尽模式",
},
load={"加载语音ing","加载音乐ing","加载音效ing","加载完成",},
load={[0]="加载完成","加载语音ing","加载音乐ing","加载音效ing",},
tips={
"不是动画,真的在加载!",
"大满贯10连击消四全清!",
@@ -307,16 +307,11 @@ return{
back=BK,
},
setting_touch={
hide="显示虚拟按键",
track="按键自动跟踪",
tkset="跟踪设置",
default="默认组合",
snap=function()return text.snapLevelName[snapLevel]end,
alpha=function()return setting.VKAlpha.."0%"end,
icon="图标",
size="大小",
toggle="开关",
snap=function()return text.snapLevelName[sceneTemp.snap]end,
option="选项",
back=BK,
size="大小",
},
setting_touchSwitch={
b1= actName[1],b2=actName[2],b3=actName[3],b4=actName[4],
@@ -326,6 +321,11 @@ return{
b17=actName[17],b18=actName[18],b19=actName[19],b20=actName[20],
norm="标准",
pro="专业",
hide="显示虚拟按键",
track="按键自动跟踪",
icon="图标",
tkset="跟踪设置",
alpha="透明度",
back=BK,
},
setting_trackSetting={

View File

@@ -113,7 +113,7 @@ return{
hotseat="友尽模式",
},
load={"加载语音ing","加载音乐ing","加载音效ing","加载完成",},
load={[0]="加载完成","加载语音ing","加载音乐ing","加载音效ing",},
tips={
"不是动画,真的在加载!",
"大满贯10连击消四全清!",
@@ -308,16 +308,11 @@ return{
back=BK,
},
setting_touch={
hide="显示虚拟按键",
track="按键自动跟踪",
tkset="跟踪设置",
default="默认组合",
snap=function()return text.snapLevelName[snapLevel]end,
alpha=function()return setting.VKAlpha.."0%"end,
icon="图标",
size="大小",
toggle="开关",
snap=function()return text.snapLevelName[sceneTemp.snap]end,
option="选项",
back=BK,
size="大小",
},
setting_touchSwitch={
b1= actName[1],b2=actName[2],b3=actName[3],b4=actName[4],
@@ -327,6 +322,11 @@ return{
b17=actName[17],b18=actName[18],b19=actName[19],b20=actName[20],
norm="标准",
pro="专业",
hide="显示虚拟按键",
track="按键自动跟踪",
icon="图标",
tkset="跟踪设置",
alpha="透明度",
back=BK,
},
setting_trackSetting={
@@ -348,4 +348,4 @@ return{
back=BK,
},
},
}
}--译

View File

@@ -111,7 +111,7 @@ return{
hotseat="",
},
load={"Loading VOICE","Loading BGM","Loading SFX","Finished",},
load={[0]="Finished","Loading VOICE","Loading BGM","Loading SFX",},
tips={
"Not animation,real loading!",
"Back to Back 10 combo Techrash PC!",
@@ -306,16 +306,11 @@ Lib used:
back=BK,
},
setting_touch={
hide="Show Virtual Key",
track="Auto track",
tkset="Track setting",
default="Defaults",
snap=function()return text.snapLevelName[snapLevel]end,
alpha=function()return setting.VKAlpha.."0%"end,
icon="Icon",
size="Size",
toggle="Toggle",
snap=function()return text.snapLevelName[sceneTemp.snap]end,
option="Option",
back=BK,
size="Size",
},
setting_touchSwitch={
b1= actName[1],b2=actName[2],b3=actName[3],b4=actName[4],
@@ -325,6 +320,11 @@ Lib used:
b17=actName[17],b18=actName[18],b19=actName[19],b20=actName[20],
norm="Normal",
pro="Professioanl",
hide="Show Virtual Key",
track="Auto track",
icon="Icon",
tkset="Track setting",
alpha="Alpha",
back=BK,
},
setting_trackSetting={

268
list.lua
View File

@@ -96,7 +96,11 @@ voiceName={
"mini","b2b","b3b","pc",
"win","lose",
"bye",
"nya","voc_nya",
"nya",
"happy",
"doubt",
"sad",
"egg",
}
voiceList={
zspin={"zspin_1","zspin_2","zspin_3"},
@@ -120,7 +124,10 @@ voiceList={
lose={"lose_1","lose_2","lose_3"},
bye={"bye_1","bye_2"},
nya={"nya_1","nya_2","nya_3","nya_4"},
voc_nya={"nya_11","nya_12","nya_13","nya_21","nya_22"},
happy={"nya_happy_1","nya_happy_2","nya_happy_3","nya_happy_4"},
doubt={"nya_doubt_1","nya_doubt_2"},
sad={"nya_sad_1"},
egg={"egg_1","egg_2"},
}
musicID={
@@ -211,7 +218,6 @@ local virtualkeySet={
{8, 320, 720-200, 80},--hold
{9, 80, 280, 80},--func
{10,1280-80, 280, 80},--restart
},--Mirrored farter's set,sknaht
{
{1, 80, 720-80, 80},--moveLeft
@@ -238,26 +244,26 @@ local virtualkeySet={
{10,80, 320, 80},--restart
},--Keyboard set
{
{10,70, 50,27},--restart
{9, 130, 50,27},--func
{4, 190, 50,27},--rotLeft
{3, 250, 50,27},--rotRight
{5, 310, 50,27},--rotFlip
{1, 370, 50,27},--moveLeft
{2, 430, 50,27},--moveRight
{8, 490, 50,27},--hold
{7, 550, 50,27},--softDrop1
{6, 610, 50,27},--hardDrop
{11,670, 50,27},--insLeft
{12,730, 50,27},--insRight
{13,790, 50,27},--insDown
{14,850, 50,27},--down1
{15,910, 50,27},--down4
{16,970, 50,27},--down10
{17,1030, 50,27},--dropLeft
{18,1090, 50,27},--dropRight
{19,1150, 50,27},--addLeft
{20,1210, 50,27},--addRight
{10,70, 50,30},--restart
{9, 130, 50,30},--func
{4, 190, 50,30},--rotLeft
{3, 250, 50,30},--rotRight
{5, 310, 50,30},--rotFlip
{1, 370, 50,30},--moveLeft
{2, 430, 50,30},--moveRight
{8, 490, 50,30},--hold
{7, 550, 50,30},--softDrop1
{6, 610, 50,30},--hardDrop
{11,670, 50,30},--insLeft
{12,730, 50,30},--insRight
{13,790, 50,30},--insDown
{14,850, 50,30},--down1
{15,910, 50,30},--down4
{16,970, 50,30},--down10
{17,1030, 50,30},--dropLeft
{18,1090, 50,30},--dropRight
{19,1150, 50,30},--addLeft
{20,1210, 50,30},--addRight
},--PC key feedback(top&in a row)
}
local customSet={
@@ -296,7 +302,7 @@ local function pressKey(k)
end
local function setPen(i)
return function()
pen=i
sceneTemp.pen=i
end
end
local function VKAdisp(n)
@@ -324,12 +330,12 @@ local skinName={
Widget={
load={},intro={},quit={},
main={
play= newButton(150,280,200,160,C.red, 55,function()scene.push()scene.swapTo("mode")end, nil,"setting"),
play= newButton(150,280,200,160,C.lightRed, 55,function()scene.push()scene.swapTo("mode")end, nil,"setting"),
setting=newButton(370,280,200,160,C.lightBlue, 45,function()scene.push()scene.swapTo("setting_game")end, nil,"music"),
music= newButton(590,280,200,160,C.lightPurple,32,function()scene.push()scene.swapTo("music")end, nil,"help"),
help= newButton(150,460,200,160,C.yellow, 50,function()scene.push()scene.swapTo("help")end, nil,"stat"),
stat= newButton(370,460,200,160,C.cyan, 43,function()scene.push()scene.swapTo("stat")end, nil,"qplay"),
qplay= newButton(540,415,100,70,C.lightGreen, 23,function()scene.push()loadGame(modeSel,levelSel)end, nil,"lang"),
help= newButton(150,460,200,160,C.lightYellow, 50,function()scene.push()scene.swapTo("help")end, nil,"stat"),
stat= newButton(370,460,200,160,C.lightCyan, 43,function()scene.push()scene.swapTo("stat")end, nil,"qplay"),
qplay= newButton(540,415,100,70,C.lightOrange, 23,function()scene.push()loadGame(modeSel,levelSel)end, nil,"lang"),
lang= newButton(590,505,200,70,C.lightRed, 45,function()
setting.lang=setting.lang%#langName+1
swapLanguage(setting.lang)
@@ -340,13 +346,13 @@ Widget={
quit= newButton(370,620,280,100,C.lightGrey, 55,function()VOICE("bye")scene.swapTo("quit","slowFade")end,nil,"play"),
},
mode={
up= newButton(1000, 210,200,140,C.white, 75,pressKey("up"), function()return modeSel==1 end),
down= newButton(1000, 430,200,140,C.white, 75,pressKey("down"), function()return modeSel==#modeID end),
left= newButton(190, 160,100,80, C.white, 35,pressKey("left"), function()return levelSel==1 end),
right= newButton(350, 160,100,80, C.white, 35,pressKey("right"), function()return levelSel==#modes[modeID[modeSel]].level end),
start= newButton(1000, 600,250,100,C.green, 45,function()scene.push()loadGame(modeSel,levelSel)end),
custom= newButton(275, 420,200,90, C.yellow, 35,function()scene.push()scene.swapTo("custom")end),
back= newButton(640, 630,230,90, C.white, 40,scene.back),
up= newButton(1000, 210,200,140,C.white, 75,pressKey("up"), function()return modeSel==1 end),
down= newButton(1000, 430,200,140,C.white, 75,pressKey("down"), function()return modeSel==#modeID end),
left= newButton(190, 150,100,80, C.white, 35,pressKey("left"), function()return levelSel==1 end),
right= newButton(350, 150,100,80, C.white, 35,pressKey("right"), function()return levelSel==#modes[modeID[modeSel]].level end),
start= newButton(1000, 600,250,100,C.lightGreen, 45,function()scene.push()loadGame(modeSel,levelSel)end),
custom= newButton(275, 460,200,90, C.lightYellow, 35,function()scene.push()scene.swapTo("custom")end),
back= newButton(640, 630,230,90, C.white, 40,scene.back),
},
music={
bgm= newSlider(760, 80,400,10,35,nil,SETdisp("bgm"),function(i)setting.bgm=i;BGM(bgmPlaying)end),
@@ -356,18 +362,18 @@ Widget={
back= newButton(640, 630,230,90, C.white,40,scene.back),
},
custom={
up= newButton(1000, 220,100,100,C.white, 45,function()sel=(sel-2)%#customID+1 end),
down= newButton(1000, 460,100,100,C.white, 45,function()sel=sel%#customID+1 end),
up= newButton(1000, 220,100,100,C.white, 45,function()sceneTemp=(sceneTemp-2)%#customID+1 end),
down= newButton(1000, 460,100,100,C.white, 45,function()sceneTemp=sceneTemp%#customID+1 end),
left= newButton(880, 340,100,100,C.white, 45,pressKey("left")),
right= newButton(1120, 340,100,100,C.white, 45,pressKey("right")),
start1= newButton(880, 580,220,70, C.green, 35,function()scene.push()loadGame(0,1)end),
start1= newButton(880, 580,220,70, C.lightGreen, 35,function()scene.push()loadGame(0,1)end),
start2= newButton(1120, 580,220,70, C.lightPurple, 35,function()scene.push()loadGame(0,2)end),
draw= newButton(1000, 90, 190,85, C.cyan, 35,function()scene.push()scene.swapTo("draw")end),
set1= newButton(640, 160,240,75, C.lightRed, 35,function()useDefaultSet(1)end),
set2= newButton(640, 250,240,75, C.lightRed, 35,function()useDefaultSet(2)end),
set3= newButton(640, 340,240,75, C.lightRed, 35,function()useDefaultSet(3)end),
set4= newButton(640, 430,240,75, C.lightRed, 35,function()useDefaultSet(4)end),
set5= newButton(640, 520,240,75, C.lightRed, 35,function()useDefaultSet(5)end),
draw= newButton(1000, 90, 190,85, C.lightCyan, 35,function()scene.push()scene.swapTo("draw")end),
set1= newButton(640, 160,240,75, C.lightYellow, 35,function()useDefaultSet(1)end),
set2= newButton(640, 250,240,75, C.lightYellow, 35,function()useDefaultSet(2)end),
set3= newButton(640, 340,240,75, C.lightYellow, 35,function()useDefaultSet(3)end),
set4= newButton(640, 430,240,75, C.lightYellow, 35,function()useDefaultSet(4)end),
set5= newButton(640, 520,240,75, C.lightYellow, 35,function()useDefaultSet(5)end),
back= newButton(640, 630,180,60, C.white, 35,scene.back),
},
draw={
@@ -406,9 +412,9 @@ Widget={
quit= newButton(640,600,240,100,C.white,45,scene.back),
},
setting_game={
graphic=newButton(200,80,240,80,C.lightGreen,35,function()scene.swapTo("setting_graphic")end, nil,"sound"),
sound= newButton(1080,80,240,80,C.lightGreen,35,function()scene.swapTo("setting_sound")end, nil,"dasD"),
dasD= newButton(180,230,50,50,C.white,35,function()
graphic=newButton(200,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_graphic")end, nil,"sound"),
sound= newButton(1080,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_sound")end, nil,"dasD"),
dasD= newButton(180,230,50,50,C.white,40,function()
setting.das=(setting.das-1)%31
if setting.arr>setting.das then
setting.arr=setting.das
@@ -416,7 +422,7 @@ Widget={
SFX("blip_1",.4)
end
end,nil,"dasU"),
dasU= newButton(400,230,50,50,C.white,35,function()
dasU= newButton(400,230,50,50,C.white,40,function()
setting.das=(setting.das+1)%31
if setting.arr>setting.das then
setting.das=setting.arr
@@ -424,7 +430,7 @@ Widget={
SFX("blip_1",.4)
end
end,nil,"arrD"),
arrD= newButton(500,230,50,50,C.white,35,function()
arrD= newButton(500,230,50,50,C.white,40,function()
setting.arr=(setting.arr-1)%16
if setting.arr>setting.das then
setting.das=setting.arr
@@ -432,7 +438,7 @@ Widget={
SFX("blip_1",.4)
end
end,nil,"arrU"),
arrU= newButton(720,230,50,50,C.white,35,function()
arrU= newButton(720,230,50,50,C.white,40,function()
setting.arr=(setting.arr+1)%16
if setting.arr>setting.das then
setting.das=setting.arr
@@ -440,27 +446,27 @@ Widget={
SFX("blip_1",.4)
end
end,nil,"sddasD"),
sddasD= newButton(180,340,50,50,C.white,35, function()setting.sddas=(setting.sddas-1)%11 end, nil,"sddasU"),
sddasU= newButton(400,340,50,50,C.white,35, function()setting.sddas=(setting.sddas+1)%11 end, nil,"sdarrD"),
sdarrD= newButton(500,340,50,50,C.white,35, function()setting.sdarr=(setting.sdarr-1)%4 end, nil,"sdarrU"),
sdarrU= newButton(720,340,50,50,C.white,35, function()setting.sdarr=(setting.sdarr+1)%4 end, nil,"quickR"),
quickR= newSwitch(560,430,35,SETdisp("quickR"), SETrev("quickR"), nil,"swap"),
swap= newSwitch(560,510,20,SETdisp("swap"), SETrev("swap"), nil,"fine"),
fine= newSwitch(560,590,20,SETdisp("fine"), SETrev("fine"), nil,"ctrl"),
sddasD= newButton(180,340,50,50,C.white,40, function()setting.sddas=(setting.sddas-1)%11 end, nil,"sddasU"),
sddasU= newButton(400,340,50,50,C.white,40, function()setting.sddas=(setting.sddas+1)%11 end, nil,"sdarrD"),
sdarrD= newButton(500,340,50,50,C.white,40, function()setting.sdarr=(setting.sdarr-1)%4 end, nil,"sdarrU"),
sdarrU= newButton(720,340,50,50,C.white,40, function()setting.sdarr=(setting.sdarr+1)%4 end, nil,"quickR"),
quickR= newSwitch(580,430,35,SETdisp("quickR"), SETrev("quickR"), nil,"swap"),
swap= newSwitch(580,510,20,SETdisp("swap"), SETrev("swap"), nil,"fine"),
fine= newSwitch(580,590,20,SETdisp("fine"), SETrev("fine"), nil,"ctrl"),
ctrl= newButton(1020,230,320,80,C.white,35,function()scene.push()scene.swapTo("setting_key")end, nil,"touch"),
touch= newButton(1020,340,320,80,C.white,35,function()scene.push()scene.swapTo("setting_touch")end,nil,"back"),
back= newButton(1160,600,160,160,C.white,50,scene.back,nil,"graphic"),
},
setting_graphic={
sound= newButton(200,80,240,80,C.lightGreen,35,function()scene.swapTo("setting_sound")end, nil,"game"),
game= newButton(1080,80,240,80,C.lightGreen,35,function()scene.swapTo("setting_game")end, nil,"ghost"),
ghost= newSwitch(310,180,35,SETdisp("ghost"), SETdisp("ghost"), nil,"center"),
center= newSwitch(580,180,35,SETdisp("center"), SETdisp("center"), nil,"smo"),
smo= newSwitch(310,260,25,SETdisp("smo"), SETdisp("smo"), nil,"grid"),
grid= newSwitch(580,260,30,SETdisp("grid"), SETdisp("grid"), nil,"dropFX"),
dropFX= newSlider(310,350,373,3,35,nil,SETdisp("dropFX"), SETsto("dropFX"), nil,"shakeFX"),
shakeFX=newSlider(310,430,373,3,35,nil,SETdisp("shakeFX"), SETsto("shakeFX"), nil,"atkFX"),
atkFX= newSlider(310,510,373,3,35,nil,SETdisp("atkFX"), SETsto("atkFX"), nil,"frame"),
sound= newButton(200,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_sound")end, nil,"game"),
game= newButton(1080,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_game")end, nil,"ghost"),
ghost= newSwitch(310,180,35,SETdisp("ghost"), SETrev("ghost"), nil,"center"),
center= newSwitch(580,180,35,SETdisp("center"), SETrev("center"), nil,"smo"),
smo= newSwitch(310,260,25,SETdisp("smo"), SETrev("smo"), nil,"grid"),
grid= newSwitch(580,260,30,SETdisp("grid"), SETrev("grid"), nil,"dropFX"),
dropFX= newSlider(310,350,373,5,35,nil,SETdisp("dropFX"), SETsto("dropFX"), nil,"shakeFX"),
shakeFX=newSlider(310,430,373,5,35,nil,SETdisp("shakeFX"), SETsto("shakeFX"), nil,"atkFX"),
atkFX= newSlider(310,510,373,5,35,nil,SETdisp("atkFX"), SETsto("atkFX"), nil,"frame"),
frame= newSlider(310,590,373,10,35,nil,function()return setting.frameMul>35 and setting.frameMul/10 or setting.frameMul/5-4 end,function(i)setting.frameMul=i<5 and 5*i+20 or 10*i end,nil,"fullscreen"),
fullscreen=newSwitch(990,180,40,SETdisp("fullscreen"),function()
setting.fullscreen=not setting.fullscreen
@@ -480,87 +486,85 @@ Widget={
back= newButton(1160,600,160,160,C.white,50,scene.back,nil,"sound"),
},
setting_sound={
game= newButton(200,80,240,80,C.lightGreen,35,function()scene.swapTo("setting_game")end, nil,"graphic"),
graphic=newButton(1080,80,240,80,C.lightGreen,35,function()scene.swapTo("setting_graphic")end, nil,"sfx"),
game= newButton(200,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_game")end, nil,"graphic"),
graphic=newButton(1080,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_graphic")end, nil,"sfx"),
sfx= newSlider(180,250,400,10,35,function()SFX("blip_1")end, SETdisp("sfx"), SETsto("sfx"), nil,"bgm"),
bgm= newSlider(750,250,400,10,35,function()BGM(bgmPlaying or"blank")end, SETdisp("bgm"), SETsto("bgm"), nil,"vib"),
vib= newSlider(180,440,400,5 ,35,function()VIB(1)end, SETdisp("vib"), SETsto("vib"), nil,"voc"),
voc= newSlider(750,440,400,10,35,function()VOICE("nya")end, SETdisp("voc"), SETsto("voc"), nil,"stereo"),
stereo= newSlider(180,630,400,10,35,function()SFX("move",1,-1)SFX("lock",1,1)end, SETdisp("stereo"), SETsto("stereo"),nil,"back"),
stereo= newSlider(180,630,400,10,35,function()SFX("move",1,-1)SFX("lock",1,1)end, SETdisp("stereo"), SETsto("stereo"),function()return setting.sfx==0 end,"back"),
back=newButton(1160,600,160,160,C.white,50,scene.back,nil,"game"),
},
setting_key={
back=newButton(1140,650,200,80,C.white,45,scene.back),
},
setting_touch={
hide= newSwitch(810,140,40,SETdisp("VKSwitch"),SETrev("VKSwitch")),
track= newSwitch(810,220,40,SETdisp("VKTrack"),SETrev("VKTrack")),
tkset= newButton(450,220,170,80,C.white,25,function()
scene.push()
scene.swapTo("setting_trackSetting")
end,function()return not setting.VKTrack end),
default=newButton(450,320,170,80,C.white,35,function()
local D=virtualkeySet[defaultSel]
for i=1,#VK_org do
VK_org[i].ava=false
end
for n=1,#D do
local T=D[n]
if T[1]then
local B=VK_org[n]
B.ava=true
B.x,B.y,B.r=T[2],T[3],T[4]
end
end--Replace keys
defaultSel=defaultSel%5+1
end),
snap= newButton(640,320,170,80,C.white,35,function()
snapLevel=snapLevel%6+1
end),
--VK=T,70,50,27/T,130,50,27/T,190,50,27/T,250,50,27/T,310,50,27/T,370,50,27/T,430,50,27/T,490,50,27/T,550,50,27/T,610,50,27/T,670,50,27/T,730,50,27/T,790,50,27/T,850,50,27/T,910,50,27/T,970,50,27/T,739,789,897/T,1090,50,27/T,1150,50,27/T,1210,50,27
alpha= newButton(830,320,170,80,C.white,40,function()
setting.VKAlpha=(setting.VKAlpha+1)%11
--Adjust virtualkey alpha
end),
icon= newButton(495,420,260,80,C.white,40,SETrev("VKIcon")),
--Switch virtualkey icon
size= newButton(785,420,260,80,C.white,40,function()
if sel then
local B=VK_org[sel]
B.r=B.r+10
if B.r>=150 then B.r=B.r-110 end
default=newButton(520,80,170,80,C.white,35,function()
local D=virtualkeySet[sceneTemp.default]
for i=1,#VK_org do
VK_org[i].ava=false
end
for n=1,#D do
local T=D[n]
if T[1]then
local B=VK_org[n]
B.ava=true
B.x,B.y,B.r=T[2],T[3],T[4]
end
end--Replace keys
sceneTemp.default=sceneTemp.default%5+1
sceneTemp.sel=nil
end),
toggle= newButton(495,520,260,80,C.white,40,function()
snap= newButton(760,80,170,80,C.white,35,function()
sceneTemp.snap=sceneTemp.snap%6+1
end),
option= newButton(520,180,170,80,C.white,40,function()
scene.push()
scene.swapTo("setting_touchSwitch")
end),
back= newButton(785,520,260,80,C.white,40,scene.back),
back= newButton(760,180,170,80,C.white,40,scene.back),
size= newSlider(450,265,460,14,40,nil,function()
return VK_org[sceneTemp.sel].r/10-1
end,
function(v)
if sceneTemp.sel then
VK_org[sceneTemp.sel].r=10+v*10
end
end,
function()return not sceneTemp.sel end),
},
setting_touchSwitch={
b1= newSwitch(300,80, 35,VKAdisp(1),VKAcode(1)),
b2= newSwitch(300,140, 35,VKAdisp(2),VKAcode(2)),
b3= newSwitch(300,200, 35,VKAdisp(3),VKAcode(3)),
b4= newSwitch(300,260, 35,VKAdisp(4),VKAcode(4)),
b5= newSwitch(300,320, 35,VKAdisp(5),VKAcode(5)),
b6= newSwitch(300,380, 35,VKAdisp(6),VKAcode(6)),
b7= newSwitch(300,440, 35,VKAdisp(7),VKAcode(7)),
b8= newSwitch(300,500, 35,VKAdisp(8),VKAcode(8)),
b9= newSwitch(300,560, 35,VKAdisp(9),VKAcode(9)),
b10= newSwitch(300,620, 35,VKAdisp(10),VKAcode(10)),
b11= newSwitch(760,80, 35,VKAdisp(11),VKAcode(11)),
b12= newSwitch(760,140, 35,VKAdisp(12),VKAcode(12)),
b13= newSwitch(760,200, 35,VKAdisp(13),VKAcode(13)),
b14= newSwitch(760,260, 35,VKAdisp(14),VKAcode(14)),
b15= newSwitch(760,320, 35,VKAdisp(15),VKAcode(15)),
b16= newSwitch(760,380, 35,VKAdisp(16),VKAcode(16)),
b17= newSwitch(760,440, 35,VKAdisp(17),VKAcode(17)),
b18= newSwitch(760,500, 35,VKAdisp(18),VKAcode(18)),
b19= newSwitch(760,560, 35,VKAdisp(19),VKAcode(19)),
b20= newSwitch(760,620, 35,VKAdisp(20),VKAcode(20)),
norm= newButton(1080,150,240,80,C.white,45,function()for i=1,20 do VK_org[i].ava=i<11 end end),
pro= newButton(1080,300,240,80,C.white,35,function()for i=1,20 do VK_org[i].ava=true end end),
back= newButton(1080,600,240,80,C.white,45,scene.back),
b1= newSwitch(280,80, 35,VKAdisp(1),VKAcode(1)),
b2= newSwitch(280,140, 35,VKAdisp(2),VKAcode(2)),
b3= newSwitch(280,200, 35,VKAdisp(3),VKAcode(3)),
b4= newSwitch(280,260, 35,VKAdisp(4),VKAcode(4)),
b5= newSwitch(280,320, 35,VKAdisp(5),VKAcode(5)),
b6= newSwitch(280,380, 35,VKAdisp(6),VKAcode(6)),
b7= newSwitch(280,440, 35,VKAdisp(7),VKAcode(7)),
b8= newSwitch(280,500, 35,VKAdisp(8),VKAcode(8)),
b9= newSwitch(280,560, 35,VKAdisp(9),VKAcode(9)),
b10= newSwitch(280,620, 35,VKAdisp(10),VKAcode(10)),
b11= newSwitch(620,80, 35,VKAdisp(11),VKAcode(11)),
b12= newSwitch(620,140, 35,VKAdisp(12),VKAcode(12)),
b13= newSwitch(620,200, 35,VKAdisp(13),VKAcode(13)),
b14= newSwitch(620,260, 35,VKAdisp(14),VKAcode(14)),
b15= newSwitch(620,320, 35,VKAdisp(15),VKAcode(15)),
b16= newSwitch(620,380, 35,VKAdisp(16),VKAcode(16)),
b17= newSwitch(620,440, 35,VKAdisp(17),VKAcode(17)),
b18= newSwitch(620,500, 35,VKAdisp(18),VKAcode(18)),
b19= newSwitch(620,560, 35,VKAdisp(19),VKAcode(19)),
b20= newSwitch(620,620, 35,VKAdisp(20),VKAcode(20)),
norm= newButton(840,100,240,80,C.white,45,function()for i=1,20 do VK_org[i].ava=i<11 end end),
pro= newButton(1120,100,240,80,C.white,35,function()for i=1,20 do VK_org[i].ava=true end end),
hide= newSwitch(1170,200,40,SETdisp("VKSwitch"),SETrev("VKSwitch")),
track= newSwitch(1170,300,35,SETdisp("VKTrack"),SETrev("VKTrack")),
icon= newSwitch(850,300,40,SETdisp("VKIcon"),SETrev("VKIcon")),
tkset= newButton(1120,400,240,80,C.white,32,function()
scene.push()
scene.swapTo("setting_trackSetting")
end,function()return not setting.VKTrack end),
alpha= newSlider(840,490,400,10,40,nil,SETdisp("VKAlpha"),SETsto("VKAlpha")),
back= newButton(1100,600,240,80,C.white,45,scene.back),
},
setting_trackSetting={
VKDodge=newSwitch(400,200, 35,SETdisp("VKDodge"),SETrev("VKDodge")),
@@ -574,8 +578,8 @@ Widget={
back= newButton(640, 600,180,60,C.white,35,scene.back,nil,"qq"),
},
history={
prev= newButton(1155,170,180,180,C.white,65,pressKey("up"),function()return sel==1 end),
next= newButton(1155,400,180,180,C.white,65,pressKey("down"),function()return sel==#updateLog-22 end),
prev= newButton(1155,170,180,180,C.white,65,pressKey("up"),function()return sceneTemp==1 end),
next= newButton(1155,400,180,180,C.white,65,pressKey("down"),function()return sceneTemp==#updateLog-22 end),
back= newButton(1155,600,180,90,C.white,35,scene.back),
},
stat={

254
main.lua
View File

@@ -1,7 +1,6 @@
--[[
第一次搞这么大的工程~参考价值不是很大
如果你有时间并且也热爱俄罗斯方块的话来看代码或者帮助优化的话当然欢迎
(顺便,无授权直接盗代码的先死个妈)
第一次搞这么大的工程,参考价值不是很大
如果你有时间并且也热爱俄罗斯方块的话,来看代码或者帮助优化的话欢迎!
]]
local love=love
local ms,kb,tc=love.mouse,love.keyboard,love.touch
@@ -17,7 +16,7 @@ local mx,my,mouseShow=-20,-20,false
local touching--第一触摸ID
local devMode=0
modeSel,levelSel=1,3--初始模式选择
modeSel,levelSel=1,3--初始模式选择(saved in setting)
players={alive={},human=0}
scr={x=0,y=0,w=gc.getWidth(),h=gc.getHeight(),k=1}
local scr=scr
@@ -71,42 +70,45 @@ require("light")
local Tmr=require("timer")
local Pnt=require("paint")
require("player")
require("shader")
--Modules
-------------------------------------------------------------
local powerInfoCanvas,updatePowerInfo
if sys.getPowerInfo()~="unknown"then
powerInfoCanvas=gc.newCanvas(147,22)
updatePowerInfo=function()
powerInfoCanvas=gc.newCanvas(108,27)
function updatePowerInfo()
local state,pow=sys.getPowerInfo()
if state~="unknown"then
gc.setCanvas(powerInfoCanvas)gc.push("transform")gc.origin()
gc.clear(0,0,0,.3)
gc.clear(0,0,0,.25)
gc.setLineWidth(4)
setFont(20)
local charging
if state~="battery"then
local charging=state=="charging"
if state=="nobattery"then
gc.setColor(1,1,1)
if state=="nobattery"then
gc.setLineWidth(2)
gc.line(61.5,.5,83.5,22.5)
elseif state=="charging"or state=="charged"then
gc.draw(chargeImage,84,3)
end
end
if pow then
gc.setLineWidth(2)
gc.line(74,5,100,22)
else
if charging then gc.setColor(0,1,0)
elseif pow>50 then gc.setColor(1,1,1)
elseif pow>26 then gc.setColor(1,1,0)
elseif pow<26 then gc.setColor(1,0,0)
else gc.setColor(.5,0,1)--special~
else gc.setColor(.5,0,1)
end
gc.rectangle("fill",76,6,pow*.22,14)
if pow<100 then
setFont(14)
gc.setColor(0,0,0)
gc.print(pow,77,2)
gc.print(pow,77,4)
gc.print(pow,79,2)
gc.print(pow,79,4)
gc.setColor(1,1,1)
gc.print(pow,78,3)
end
::L::
gc.rectangle("fill",61,6,pow*.15,10)
gc.setColor(1,1,1)
gc.draw(batteryImage,58,3)
gc.print(pow.."%",94,-3)
end
gc.print(os.date("%H:%M",os.time()),2,-3)
gc.draw(batteryImage,73,3)
setFont(25)
gc.print(os.date("%H:%M",os.time()),3,-5)
gc.pop()gc.setCanvas()
end
end
@@ -118,13 +120,14 @@ local function getNewBlock()
t.bn,t.size=FX_BGblock.next,2+3*rnd()
t.b=blocks[t.bn][rnd(0,3)]
t.x=rnd(-#t.b[1]*t.size*30+100,1180)
t.y=-#t.b*30*t.size
t.y=0
t.ty=720+#t.b*30*t.size
t.v=t.size*(1+rnd())
FX_BGblock.next=FX_BGblock.next%7+1
return t
end
local function onVirtualkey(x,y)
local dist,nearest=1e15
local dist,nearest=1e10
for K=1,#virtualkey do
local b=virtualkey[K]
if b.ava then
@@ -138,6 +141,21 @@ local function onVirtualkey(x,y)
end
return nearest
end
local function onVK_org(x,y)
local dist,nearest=1e10
for K=1,#VK_org do
local b=VK_org[K]
if b.ava then
local d1=(x-b.x)^2+(y-b.y)^2
if d1<b.r^2 then
if d1<dist then
nearest,dist=K,d1
end
end
end
end
return nearest
end
-------------------------------------------------------------
local floatWheel=0
local function wheelScroll(y)
@@ -228,12 +246,12 @@ function wheelmoved.music(x,y)
end
function keyDown.music(key)
if key=="down"then
sel=sel%#musicID+1
sceneTemp=sceneTemp%#musicID+1
elseif key=="up"then
sel=(sel-2)%#musicID+1
sceneTemp=(sceneTemp-2)%#musicID+1
elseif key=="return"or key=="space"then
if bgmPlaying~=musicID[sel]then
BGM(musicID[sel])
if bgmPlaying~=musicID[sceneTemp]then
BGM(musicID[sceneTemp])
else
BGM()
end
@@ -243,6 +261,7 @@ function keyDown.music(key)
end
function keyDown.custom(key)
local sel=sceneTemp
if key=="left"then
customSel[sel]=(customSel[sel]-2)%#customRange[customID[sel]]+1
if sel==12 then
@@ -258,9 +277,9 @@ function keyDown.custom(key)
BGM(customRange.bgm[customSel[sel]])
end
elseif key=="down"then
sel=sel%#customID+1
sceneTemp=sel%#customID+1
elseif key=="up"then
sel=(sel-2)%#customID+1
sceneTemp=(sel-2)%#customID+1
elseif key=="d"then
scene.push()
scene.swapTo("draw")
@@ -287,14 +306,16 @@ function mouseDown.draw(x,y,k)
mouseMove.draw(x,y)
end
function mouseMove.draw(x,y,dx,dy)
sx,sy=int((x-200)/30)+1,20-int((y-60)/30)
local sx,sy=int((x-200)/30)+1,20-int((y-60)/30)
if sx<1 or sx>10 then sx=nil end
if sy<1 or sy>20 then sy=nil end
sceneTemp.x,sceneTemp.y=sx,sy
if sx and sy and ms.isDown(1,2,3)then
preField[sy][sx]=ms.isDown(1)and pen or ms.isDown(2)and -1 or 0
preField[sy][sx]=ms.isDown(1)and sceneTemp.pen or ms.isDown(2)and -1 or 0
end
end
function wheelmoved.draw(x,y)
local pen=sceneTemp.pen
if y<0 then
pen=pen+1
if pen==8 then pen=9 elseif pen==14 then pen=0 end
@@ -302,25 +323,36 @@ function wheelmoved.draw(x,y)
pen=pen-1
if pen==8 then pen=7 elseif pen==-1 then pen=13 end
end
sceneTemp.pen=pen
end
function touchDown.draw(id,x,y)
mouseMove.draw(x,y)
end
function touchMove.draw(id,x,y,dx,dy)
sx,sy=int((x-200)/30)+1,20-int((y-60)/30)
local sx,sy=int((x-200)/30)+1,20-int((y-60)/30)
if sx<1 or sx>10 then sx=nil end
if sy<1 or sy>20 then sy=nil end
sceneTemp.x,sceneTemp.y=sx,sy
if sx and sy then
preField[sy][sx]=pen
preField[sy][sx]=sceneTemp.pen
end
end
local penKey={
["1"]=1,["2"]=2,["3"]=3,
q=4, w=5, e=6,
a=7, s=9, d=10,
z=11, x=12, c=13,
tab=0, backspace=0,
lshift=-1, lalt=-1,
}
function keyDown.draw(key)
local sx,sy,pen=sceneTemp.x,sceneTemp.y,sceneTemp.pen
if key=="delete"then
if clearSureTime>15 then
if sceneTemp.sure>15 then
for y=1,20 do for x=1,10 do preField[y][x]=0 end end
clearSureTime=0
sceneTemp.sure=0
else
clearSureTime=50
sceneTemp.sure=50
end
elseif key=="up"or key=="down"or key=="left"or key=="right"then
if not sx then sx=1 end
@@ -337,26 +369,38 @@ function keyDown.draw(key)
if sx and sy then
preField[sy][sx]=pen
end
elseif key=="tab"then
pen=-1
elseif key=="backspace"or key=="lalt"then
pen=0
elseif key=="escape"then
scene.back()
else
pen=string.find("123qwea#sdzxc",key)or pen
pen=penKey[key]or pen
end
sceneTemp.x,sceneTemp.y,sceneTemp.pen=sx,sy,pen
end
function mouseDown.setting_sound(x,y,k)
if x>780 and x<980 and y>470 and sceneTemp.jump==0 then
sceneTemp.jump=10
local t=Timer()-sceneTemp.last
if t>1 then
VOICE((t<1.5 or t>15)and"doubt"or rnd()<.8 and"happy"or"egg")
sceneTemp.last=Timer()
end
end
end
function touchDown.setting_sound(id,x,y)
mouseDown.setting_sound(x,y)
end
function keyDown.setting_key(key)
local s=sceneTemp
if key=="escape"then
if keyboardSetting then
keyboardSetting=false
if s.kS then
s.kS=false
SFX("error",.5)
else
scene.back()
end
elseif keyboardSetting then
elseif s.kS then
for l=1,8 do
for y=1,20 do
if setting.keyMap[l][y]==key then
@@ -364,43 +408,44 @@ function keyDown.setting_key(key)
end
end
end
setting.keyMap[curBoard][keyboardSet]=key
setting.keyMap[s.board][s.kb]=key
SFX("reach",.5)
keyboardSetting=false
s.kS=false
elseif key=="return"then
keyboardSetting=true
s.kS=true
SFX("lock",.5)
elseif key=="up"then
if keyboardSet>1 then
keyboardSet=keyboardSet-1
if s.kb>1 then
s.kb=s.kb-1
SFX("move",.5)
end
elseif key=="down"then
if keyboardSet<20 then
keyboardSet=keyboardSet+1
if s.kb<20 then
s.kb=s.kb+1
SFX("move",.5)
end
elseif key=="left"then
if curBoard>1 then
curBoard=curBoard-1
if s.board>1 then
s.board=s.board-1
SFX("rotate",.5)
end
elseif key=="right"then
if curBoard<8 then
curBoard=curBoard+1
if s.board<8 then
s.board=s.board+1
SFX("rotate",.5)
end
end
end
function gamepadDown.setting_key(key)
local s=sceneTemp
if key=="back"then
if joystickSetting then
joystickSetting=false
if s.jS then
s.jS=false
SFX("error",.5)
else
scene.back()
end
elseif joystickSetting then
elseif s.jS then
for l=9,16 do
for y=1,20 do
if setting.keyMap[l][y]==key then
@@ -408,30 +453,30 @@ function gamepadDown.setting_key(key)
end
end
end
setting.keyMap[8+curBoard][joystickSet]=key
setting.keyMap[8+s.board][s.js]=key
SFX("reach",.5)
joystickSetting=false
s.jS=false
elseif key=="start"then
joystickSetting=true
s.jS=true
SFX("lock",.5)
elseif key=="up"then
if joystickSet>1 then
joystickSet=joystickSet-1
if s.js>1 then
s.js=s.js-1
SFX("move",.5)
end
elseif key=="down"then
if joystickSet<20 then
joystickSet=joystickSet+1
if s.js<20 then
s.js=s.js+1
SFX("move",.5)
end
elseif key=="left"then
if curBoard>1 then
curBoard=curBoard-1
if s.board>1 then
s.board=s.board-1
SFX("rotate",.5)
end
elseif key=="right"then
if curBoard<8 then
curBoard=curBoard+1
if s.board<8 then
s.board=s.board+1
SFX("rotate",.5)
end
end
@@ -439,47 +484,34 @@ end
function mouseDown.setting_touch(x,y,k)
if k==2 then scene.back()end
for K=1,#VK_org do
local B=VK_org[K]
if (x-B.x)^2+(y-B.y)^2<B.r^2 then
sel=K
end
end
sceneTemp.sel=onVK_org(x,y)or sceneTemp.sel
end
function mouseMove.setting_touch(x,y,dx,dy)
if sel and ms.isDown(1)then
local B=VK_org[sel]
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
end
function mouseUp.setting_touch(x,y,k)
if sel then
local B=VK_org[sel]
local k=snapLevelValue[snapLevel]
if sceneTemp.sel then
local B=VK_org[sceneTemp.sel]
local k=snapLevelValue[sceneTemp.snap]
B.x,B.y=int(B.x/k+.5)*k,int(B.y/k+.5)*k
end
end
function touchDown.setting_touch(id,x,y)
for K=1,#VK_org do
local B=VK_org[K]
if (x-B.x)^2+(y-B.y)^2<B.r^2 then
sel=K
end
end
sceneTemp.sel=onVK_org(x,y)or sceneTemp.sel
end
function touchUp.setting_touch(id,x,y)
if sel then
x,y=xOy:inverseTransformPoint(x,y)
if sel then
local B=VK_org[sel]
local k=snapLevelValue[snapLevel]
B.x,B.y=int(B.x/k+.5)*k,int(B.y/k+.5)*k
end
if sceneTemp.sel then
local B=VK_org[sceneTemp.sel]
local k=snapLevelValue[sceneTemp.snap]
B.x,B.y=int(B.x/k+.5)*k,int(B.y/k+.5)*k
end
end
function touchMove.setting_touch(id,x,y,dx,dy)
if sel then
local B=VK_org[sel]
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
@@ -603,9 +635,9 @@ function wheelmoved.history(x,y)
end
function keyDown.history(key)
if key=="up"then
sel=max(sel-5,1)
sceneTemp=max(sceneTemp-10,1)
elseif key=="down"then
sel=min(sel+5,#updateLog-22)
sceneTemp=min(sceneTemp+10,#updateLog-22)
elseif key=="escape"then
scene.back()
end
@@ -857,6 +889,7 @@ function love.lowmemory()
collectgarbage()
end
function love.resize(w,h)
love.timer.sleep(.26)
scr.w,scr.h,scr.r=w,h,h/w
if scr.r>=.5625 then
scr.k=w/1280
@@ -886,8 +919,9 @@ function love.update(dt)
end
end
for i=#FX_BGblock,1,-1 do
FX_BGblock[i].y=FX_BGblock[i].y+FX_BGblock[i].v
if FX_BGblock[i].y>720 then rem(FX_BGblock,i)end
local B=FX_BGblock[i]
B.y=B.y+B.v
if B.y>B.ty then rem(FX_BGblock,i)end
end
if setting.bgblock then
FX_BGblock.tm=FX_BGblock.tm-1
@@ -973,7 +1007,7 @@ function love.draw()
local size=FX_BGblock[n].size
for i=1,#b do for j=1,#b[1]do
if b[i][j]then
gc.draw(img,FX_BGblock[n].x+(j-1)*30*size,FX_BGblock[n].y+(i-1)*30*size,nil,size)
gc.draw(img,FX_BGblock[n].x+(j-1)*30*size,FX_BGblock[n].y-i*30*size,nil,size)
end
end end
end--Draw BG falling blocks
@@ -1073,11 +1107,14 @@ function love.run()
gc.present()
end
end
if Timer()-lastFrame<.058 then
T.sleep(.01)
end
while Timer()-lastFrame<.0158 do
T.sleep(.001)
end
lastFrame=Timer()
if Timer()-lastFreshPow>5 then
if Timer()-lastFreshPow>1 then
updatePowerInfo()
lastFreshPow=Timer()
end
@@ -1085,12 +1122,11 @@ function love.run()
::END::
end
local fs=love.filesystem
userData,userSetting=fs.newFile("userdata"),fs.newFile("usersetting")
if fs.getInfo("userdata")then
userData,userSetting=love.filesystem.newFile("userdata"),love.filesystem.newFile("usersetting")
if love.filesystem.getInfo("userdata")then
loadData()
end
if fs.getInfo("usersetting")then
if love.filesystem.getInfo("usersetting")then
loadSetting()
elseif system=="Android"or system=="iOS" then
setting.swap=false

100
paint.lua
View File

@@ -115,7 +115,7 @@ local function VirtualkeyPreview()
for i=1,#VK_org do
local B=VK_org[i]
if B.ava then
local c=sel==i and .6 or 1
local c=sceneTemp.sel==i and .6 or 1
gc.setColor(c,1,c,setting.VKAlpha*.1)
gc.setLineWidth(B.r*.07)
gc.circle("line",B.x,B.y,B.r)
@@ -228,20 +228,24 @@ function Pnt.BG.matrix()
end
function Pnt.load()
local L=loading
gc.setLineWidth(4)
gc.setColor(1,1,1,.5)
gc.rectangle("fill",300,330,loadprogress*680,60,5)
gc.rectangle("fill",300,330,L[2]/L[3]*680,60,5)
gc.setColor(1,1,1)
gc.rectangle("line",300,330,680,60,5)
setFont(35)
mStr(text.load[loading],640,335)
gc.print(text.load[L[1]],340,335)
if loading[1]~=0 then
gc.printf(loading[2].."/"..loading[3],795,335,150,"right")
end
setFont(25)
mStr(loadTip,640,400)
mStr(L[4],640,400)
end
function Pnt.intro()
gc.stencil(stencil_miniTitle,"replace",1)
gc.setStencilTest("equal",1)
gc.setColor(1,1,1,min(count,80)*.005)
gc.setColor(1,1,1,min(sceneTemp,80)*.005)
gc.push("transform")
gc.translate(250,150)
gc.scale(30)
@@ -250,7 +254,7 @@ function Pnt.intro()
gc.setColor(1,1,1,.06)
for i=41,5,-2 do
gc.setLineWidth(i)
gc.line(200+(count-80)*25,130,(count-80)*25,590)
gc.line(200+(sceneTemp-80)*25,130,(sceneTemp-80)*25,590)
end
gc.setStencilTest()
end
@@ -272,10 +276,11 @@ function Pnt.mode()
setFont(35)
local lv=modes[modeID[modeSel]].level[levelSel]
gc.setColor(modeLevelColor[lv]or color.white)
mStr(lv,270,215)
mStr(lv,270,200)
setFont(25)
gc.setColor(color.white)
mStr(text.modeInfo[modeID[modeSel]],270,255)
mStr(text.modeInfo[modeID[modeSel]],270,240)
setFont(75)
gc.setColor(color.grey)
mStr(text.modeName[modeSel],643,273)
@@ -290,7 +295,7 @@ function Pnt.mode()
end
function Pnt.music()
gc.setColor(1,1,1,.3+sin(Timer()*5)*.2)
gc.rectangle("fill",45,98+30*sel,250,30)
gc.rectangle("fill",45,98+30*sceneTemp,250,30)
gc.setColor(.8,.8,.8)
gc.draw(drawableText.musicRoom,20,20)
gc.setColor(1,1,1)
@@ -314,7 +319,7 @@ function Pnt.music()
end
function Pnt.custom()
gc.setColor(1,1,1,.3+sin(Timer()*8)*.2)
gc.rectangle("fill",25,95+40*sel,480,40)
gc.rectangle("fill",25,95+40*sceneTemp,480,40)
gc.setColor(.8,.8,.8)gc.draw(drawableText.custom,20,20)
gc.setColor(1,1,1)gc.draw(drawableText.custom,22,23)
setFont(35)
@@ -330,6 +335,7 @@ function Pnt.custom()
end
end
function Pnt.draw()
local sx,sy=sceneTemp.x,sceneTemp.y
gc.translate(200,60)
gc.setColor(1,1,1,.2)
gc.setLineWidth(1)
@@ -339,13 +345,13 @@ function Pnt.draw()
gc.setLineWidth(3)
gc.rectangle("line",-2,-2,304,604)
gc.setLineWidth(2)
local cross=puzzleMark[-1]
for y=1,20 do for x=1,10 do
local B=preField[y][x]
if B>0 then
gc.draw(blockSkin[B],30*x-30,600-30*y)
elseif B==-1 then
gc.line(30*x-25,605-30*y,30*x-5,625-30*y)
gc.line(30*x-25,625-30*y,30*x-5,605-30*y)
gc.draw(cross,30*x-30,600-30*y)
end
end end
if sx and sy then
@@ -353,19 +359,20 @@ function Pnt.draw()
gc.rectangle("line",30*sx-30,600-30*sy,30,30)
end
gc.translate(-200,-60)
if clearSureTime>0 then
gc.setColor(1,1,1,clearSureTime*.02)
gc.draw(drawableText.question,760,11)
if sceneTemp.sure>0 then
gc.setColor(1,1,1,sceneTemp.sure*.02)
gc.draw(drawableText.question,660,11)
end
local pen=sceneTemp.pen
if pen>0 then
gc.setLineWidth(13)
gc.setColor(blockColor[pen])
gc.rectangle("line",746,460,70,70)
gc.rectangle("line",745,460,70,70)
elseif pen==-1 then
gc.setLineWidth(5)
gc.setColor(.9,.9,.9)
gc.line(960,620,1000,660)
gc.line(960,660,1000,620)
gc.line(755,470,805,520)
gc.line(755,520,805,470)
end
end
function Pnt.play()
@@ -376,12 +383,13 @@ function Pnt.play()
for i=1,#FX_attack do
local A=FX_attack[i]
gc.push("transform")
local a=A.t<10 and A.a*A.t*.05 or A.t>50 and A.a*(6-A.t*.1)or A.a
local a=(A.t<10 and A.t*.05 or A.t>50 and 6-A.t*.1 or 1)*A.a
gc.setColor(A.r,A.g,A.b,a*.5)
gc.circle("line",0,0,A.rad,A.corner)
local L=A.drag
for i=1,#L,2 do
gc.setColor(A.r,A.g,A.b,a*i*.05)
local len=#L
for i=1,len,2 do
gc.setColor(A.r,A.g,A.b,.4*a*i/len)
gc.translate(L[i],L[i+1])
gc.rotate(A.t*.1)
gc.circle("fill",0,0,A.rad,A.corner)
@@ -471,25 +479,37 @@ function Pnt.setting_graphic()
gc.draw(blockSkin[7-int(Timer()*2)%7],890,390,nil,2)
end
function Pnt.setting_sound()
gc.setColor(1,1,1)
gc.setColor(1,1,1,.8)
mDraw(drawableText.setting_sound,640,15)
local t=Timer()
local _=sceneTemp.jump
local x,y=800,340+10*sin(t*.5)+(_-10)*_*.3
gc.translate(x,y)
gc.draw(miya_ch,0,0)
gc.setColor(1,1,1,.7)
gc.draw(miya_f1,4,47+4*sin(t*.9))
gc.draw(miya_f2,42,107+5*sin(t))
gc.draw(miya_f3,93,126+3*sin(t*.7))
gc.draw(miya_f4,129,98+3*sin(t*.7))
gc.translate(-x,-y)
end
function Pnt.setting_key()
local s=sceneTemp
local a=.3+sin(Timer()*15)*.1
if keyboardSetting then gc.setColor(1,.3,.3,a)else gc.setColor(1,.7,.7,a)end
if s.kS then gc.setColor(1,.3,.3,a)else gc.setColor(1,.7,.7,a)end
gc.rectangle("fill",
keyboardSet<11 and 240 or 840,
45*keyboardSet+20-450*int(keyboardSet/11),
s.kb<11 and 240 or 840,
45*s.kb+20-450*int(s.kb/11),
200,45
)
if joystickSetting then gc.setColor(.3,.3,.1,a)else gc.setColor(.7,.7,1,a)end
if s.jS then gc.setColor(.3,.3,.1,a)else gc.setColor(.7,.7,1,a)end
gc.rectangle("fill",
joystickSet<11 and 440 or 1040,
45*joystickSet+20-450*int(joystickSet/11),
s.js<11 and 440 or 1040,
45*s.js+20-450*int(s.js/11),
200,45
)
--Selection rect
gc.setColor(1,.3,.3)
mDraw(drawableText.keyboard,340,35)
mDraw(drawableText.keyboard,940,35)
@@ -499,15 +519,16 @@ function Pnt.setting_key()
gc.setColor(1,1,1)
setFont(26)
local board=s.board
for N=1,20 do
if N<11 then
gc.printf(text.actName[N],47,45*N+22,180,"right")
mStr(setting.keyMap[curBoard][N],340,45*N+22)
mStr(setting.keyMap[curBoard+8][N],540,45*N+22)
mStr(setting.keyMap[board][N],340,45*N+22)
mStr(setting.keyMap[board+8][N],540,45*N+22)
else
gc.printf(text.actName[N],647,45*N-428,180,"right")
mStr(setting.keyMap[curBoard][N],940,45*N-428)
mStr(setting.keyMap[curBoard+8][N],1040,45*N-428)
mStr(setting.keyMap[board][N],940,45*N-428)
mStr(setting.keyMap[board+8][N],1040,45*N-428)
end
end
gc.setLineWidth(2)
@@ -519,13 +540,16 @@ function Pnt.setting_key()
end
setFont(35)
gc.print("Player:",170,590)
gc.print(int(curBoard*.5+.5),300,590)
gc.print(curBoard.."/8",580,590)
gc.print(int(board*.5+.5),300,590)
gc.print(board.."/8",580,590)
gc.draw(drawableText.ctrlSetHelp,50,650)
end
function Pnt.setting_touch()
gc.setColor(1,1,1)
gc.setLineWidth(7)gc.rectangle("line",340,15,600,690)
gc.setLineWidth(3)gc.rectangle("line",490,85,300,600)
VirtualkeyPreview()
local d=snapLevelValue[snapLevel]
local d=snapLevelValue[sceneTemp.snap]
if d>=10 then
gc.setLineWidth(3)
gc.setColor(1,1,1,sin(Timer()*4)*.1+.1)
@@ -579,8 +603,8 @@ function Pnt.history()
gc.setLineWidth(4)
gc.rectangle("line",30,45,1000,632)
setFont(20)
for i=0,min(22,#updateLog-sel)do
gc.print(updateLog[sel+i],40,50+27*(i))
for i=0,min(22,#updateLog-sceneTemp)do
gc.print(updateLog[sceneTemp+i],40,50+27*(i))
end
end
return Pnt

View File

@@ -94,7 +94,7 @@ local TRS={
[31]={TMP1,{0,-1}, {0,1}, {1,0}, {0,-2} },
},--S
[3]={
[01]={TMP1,{-1,0}, {-1,1}, {0,-2}, {-1,-2},{0,1}, {-1,-1} },
[01]={TMP1,{-1,0}, {-1,1}, {0,-2}, {-1,-2},{-1,-1},{0,1} },
[10]={TMP1,{1,0}, {1,-1}, {0,2}, {1,2}, {0,-1}, {1,1} },
[03]={TMP1,{1,0}, {1,1}, {0,-2}, {-1,1} },
[30]={TMP1,{-1,0}, {-1,-1},{0,2}, {-1,2} },
@@ -110,7 +110,7 @@ local TRS={
[4]={
[01]={TMP1,{-1,0}, {-1,1}, {0,-2}, {1,1} },
[10]={TMP1,{1,0}, {1,-1}, {0,2}, {1,2} },
[03]={TMP1,{1,0}, {1,1}, {0,-2}, {1,-2}, {0,1}, {1,-1} },
[03]={TMP1,{1,0}, {1,1}, {0,-2}, {1,-2}, {1,-1}, {0,1} },
[30]={TMP1,{-1,0}, {-1,-1},{0,2}, {-1,2}, {0,-1}, {-1,1} },
[12]={TMP1,{1,0}, {1,-1}, {-1,0}, {0,2}, {1,2} },
[21]={TMP1,{-1,0}, {-1,1}, {1,0}, {0,-2}, {-1,-2} },
@@ -126,9 +126,9 @@ local TRS={
[10]={TMP1,{1,0}, {1,-1}, {0,2}, {1,2}, {0,-1}, {1,1}},
[03]={TMP1,{1,0}, {1,1}, {0,-2}, {1,-2} },
[30]={TMP1,{-1,0}, {-1,-1},{0,2}, {-1,2}, {0,-1} },
[12]={TMP1,{1,0}, {1,-1}, {0,-1}, {0,2}, {1,2}, {-1,-1}},
[12]={TMP1,{1,0}, {1,-1}, {0,-1}, {-1,-1},{0,2}, {1,2}},
[21]={TMP1,{-1,0}, {-1,1}, {0,-2}, {-1,-2},{1,1} },
[32]={TMP1,{-1,0}, {-1,-1},{0,-1}, {0,2}, {-1,2}, {1,-1}},
[32]={TMP1,{-1,0}, {-1,-1},{0,-1}, {1,-1}, {0,2}, {-1,2}},
[23]={TMP1,{1,0}, {1,1}, {0,-2}, {1,-2}, {-1,1} },
[02]={TMP1,{-1,0}, {1,0}, {0,1} },
[20]={TMP1,{1,0}, {-1,0}, {0,-1} },
@@ -306,7 +306,7 @@ function newDemoPlayer(id,x,y,size)
wait=10,fall=20,
next=6,hold=true,oncehold=true,
sequence="bag7",
block=true,
visible="show",
Fkey=NULL,puzzle=false,ospin=true,
@@ -576,7 +576,7 @@ function player.update(P,dt)
if x~=P.curX then
P.moving=P.moving+P.gameEnv.arr-1
elseif not P.small then
P.fieldOff.vx=-setting.shakeFX*.8
P.fieldOff.vx=-setting.shakeFX*.5
end
end
else
@@ -596,7 +596,7 @@ function player.update(P,dt)
if x~=P.curX then
P.moving=P.moving-P.gameEnv.arr+1
elseif not P.small then
P.fieldOff.vx=setting.shakeFX*.8
P.fieldOff.vx=setting.shakeFX*.5
end
end
else
@@ -615,7 +615,7 @@ function player.update(P,dt)
P.act.insDown(P)
end
if not P.small then
P.fieldOff.vy=setting.shakeFX*.5
P.fieldOff.vy=setting.shakeFX*.3
end
end
else
@@ -707,31 +707,20 @@ function player.update(P,dt)
end
for i=#P.shade,1,-1 do
local S=P.shade[i]
S[1]=S[1]-1+setting.dropFX*.25
S[1]=S[1]-1+setting.dropFX*.15
if S[1]<=0 then
rem(P.shade,i)
end
end
if setting.shakeFX>0 then
local O=P.fieldOff
O.vx,O.vy=O.vx*.8-abs(O.x)^1.2*(O.x>0 and .08 or -.08),O.vy*.8-abs(O.y)^1.2*(O.y>0 and .08 or -.08)
O.vx,O.vy=O.vx*.8-abs(O.x)^1.2*(O.x>0 and .1 or -.1),O.vy*.8-abs(O.y)^1.2*(O.y>0 and .1 or -.1)
O.x,O.y=O.x+O.vx,O.y+O.vy
if abs(O.x)<1 then O.x=0 end
if abs(O.y)<1 then O.y=0 end
end--field shaking
for i=#P.bonus,1,-1 do
local t=P.bonus[i]
t.c=t.c+t.spd
if t.stop then
if t.c>t.stop then
t.c=t.stop
end
end
if t.c>60 then
rem(P.bonus,i)
end
end
updateText(P.bonus)
for i=#P.atkBuffer,1,-1 do
local A=P.atkBuffer[i]
A.time=A.time+1
@@ -755,8 +744,8 @@ function player.draw_norm(P)
gc.translate(P.x,P.y)gc.scale(P.size)
--Camera
gc.setColor(0,0,0,.6)gc.rectangle("fill",0,0,600,690)
gc.setLineWidth(7)gc.setColor(frameColor[P.strength])gc.rectangle("line",0,0,600,690,3)
--Frame
gc.setLineWidth(7)gc.setColor(frameColor[P.strength])gc.rectangle("line",0,0,600,690)
--Boarder
gc.translate(150+P.fieldOff.x,70+P.fieldOff.y)
if P.gameEnv.grid then
gc.setLineWidth(1)
@@ -954,25 +943,18 @@ function player.draw_norm(P)
mStr(int(count/60+1),0,0)
gc.pop()
end--Draw starting counter
for i=1,#P.bonus do
local t=P.bonus[i]
local p=t.c
gc.setColor(1,1,1,p<.2 and p*5 or p<.8 and 1 or 5-p*5)
setFont(t.font)
t:draw()
end--Bonus texts
drawTexts(P.bonus)--Bonus texts
setFont(25)
drawDial(360,520,P.dropSpeed)
drawDial(405,575,P.keySpeed)
gc.setColor(1,1,1)
mStr(format("%.2f",P.stat.time),-82,518)--Time
mStr(P.score1,-82,560)--Score
gc.draw(drawableText.bpm,390,490)
gc.draw(drawableText.kpm,350,583)
setFont(25)
drawDial(360,520,P.dropSpeed)
drawDial(405,575,P.keySpeed)
gc.draw(drawableText.kpm,344,583)
--Speed dials
gc.setColor(1,1,1)
modes[curMode.id].mesDisp(P)--Other messages
modes[curMode.id].mesDisp(P,P.fieldOff.x,P.fieldOff.y)--Other messages
if modeEnv.royaleMode then
if P.atkMode then
gc.setColor(1,.8,0,P.swappingAtkMode*.02)
@@ -1104,13 +1086,7 @@ function player.draw_demo(P)
gc.setColor(1,1,1)
gc.draw(PTC.dust[P.id])
gc.translate(-P.fieldOff.x,-P.fieldOff.y)
for i=1,#P.bonus do
local t=P.bonus[i]
local p=t.c
gc.setColor(1,1,1,p<.2 and p*5 or p<.8 and 1 or 5-p*5)
setFont(t.font)
t:draw()
end
drawTexts(P.bonus)
gc.pop()
end
-------------------------<FX>-------------------------
@@ -1155,10 +1131,10 @@ function player.createBeam(P,R,send,time,target,color,clear,spin,mini,combo)
g=.6+g*.4
b=.6+b*.4
else
corner=20
r=.8+r*.2
g=.8+g*.2
b=.8+b*.2
corner=20
end
else
if combo>3 then
@@ -1180,10 +1156,10 @@ function player.createBeam(P,R,send,time,target,color,clear,spin,mini,combo)
x=x1,y=y1,--current pos
x1=x1,y1=y1,--start pos
x2=x2,y2=y2,--end pos
rad=radius*(setting.atkFX+2)*.2,
rad=radius*(setting.atkFX+3)*.12,
corner=corner,
type=type==1 and"fill"or"line",
r=r,g=g,b=b,a=a*(setting.atkFX+1)*.25,
r=r,g=g,b=b,a=a*(setting.atkFX+5)*.1,
t=0,
drag={},--Afterimage coordinate list
}
@@ -1388,7 +1364,7 @@ function player.freshgho(P)
if setting.dropFX>0 then
P:createShade(P.curX,P.curY+1,P.curX+P.c-1,P.y_img+P.r-1)
end
P.fieldOff.vy=setting.shakeFX*.8
P.fieldOff.vy=setting.shakeFX*.5
end
P.curY=P.y_img
end
@@ -1687,7 +1663,7 @@ function player.drop(P)--Place piece
end
::L1::
end
P:lock()
local CHN=getFreeVoiceChannel()
local cc,send,exblock=checkrow(P,P.curY,P.r),0,0--Currect clear&send&sendTime
@@ -1739,7 +1715,7 @@ function player.drop(P)--Place piece
if cc==4 then
cscore=1000
if P.b2b>1000 then
P:showText(text.techrashB3B,0,-30,70,"fly")
P:showText(text.techrashB3B,0,-30,50,"fly")
send=6
sendTime=100
exblock=exblock+1
@@ -1749,7 +1725,7 @@ function player.drop(P)--Place piece
VOICE("b3b",CHN)
end
elseif P.b2b>=50 then
P:showText(text.techrashB2B,0,-30,70,"drive")
P:showText(text.techrashB2B,0,-30,50,"drive")
sendTime=80
send=5
cscore=cscore*1.3
@@ -1796,7 +1772,7 @@ function player.drop(P)--Place piece
sendTime=20+send*20
if mini then
P:showText(text.mini,0,-80,35,"appear")
send=ceil(send*.5)
send=send*.5
sendTime=sendTime+60
cscore=cscore*.5
P.b2b=P.b2b+b2bPoint[cc]*.5
@@ -1870,7 +1846,6 @@ function player.drop(P)--Place piece
--ATK statistics
if exblock then exblock=int(exblock*(1+P.strength*.25))end
send=send*(1+P.strength*.25)
if mini then send=send*.8 end
send=int(send)
--Badge Buff
if send==0 then goto L end
@@ -2078,7 +2053,7 @@ function player.act.hardDrop(P)
P.curY=P.y_img
P.spinLast=false
if not P.small then
P.fieldOff.vy=setting.shakeFX
P.fieldOff.vy=setting.shakeFX*.6
end
if P.human then
SFX("drop",nil,getBlockDirection(P))
@@ -2132,7 +2107,7 @@ function player.act.insLeft(P,auto)
if P.gameEnv.easyFresh or y0~=P.curY then P:freshLockDelay()end
end
if not P.small then
P.fieldOff.vx=-setting.shakeFX*.8
P.fieldOff.vx=-setting.shakeFX*.5
end
if auto then
if P.ctrlCount==0 then P.ctrlCount=1 end
@@ -2153,7 +2128,7 @@ function player.act.insRight(P,auto)
if P.gameEnv.easyFresh or y0~=P.curY then P:freshLockDelay()end
end
if not P.small then
P.fieldOff.vx=setting.shakeFX*.8
P.fieldOff.vx=setting.shakeFX*.5
end
if auto then
if P.ctrlCount==0 then P.ctrlCount=1 end
@@ -2167,6 +2142,7 @@ function player.act.insDown(P)
if setting.dropFX>0 then
P:createShade(P.curX,P.curY+1,P.curX+P.c-1,P.y_img+P.r-1)
end
P.fieldOff.vy=setting.shakeFX*.5
end
P.curY,P.lockDelay,P.spinLast=P.y_img,P.gameEnv.lock,false
end

View File

@@ -13,13 +13,15 @@ local scene={
local sceneInit={
quit=love.event.quit,
load=function()
loading=1--Loading mode
loadnum=1--Loading counter
loadprogress=0--Loading bar(0~1)
loadTip=text.tips[math.random(#text.tips)]
loading={
1,--Loading mode
1,--Loading counter
#voiceName,--Loading bar lenth(current)
text.tips[math.random(#text.tips)],--tip
}
end,
intro=function()
count=0
sceneTemp=0--animation timer
BGM("blank")
end,
main=function()
@@ -35,12 +37,12 @@ local sceneInit={
if bgmPlaying then
for i=1,#musicID do
if musicID[i]==bgmPlaying then
sel=i
sceneTemp=i--music select
return
end
end
else
sel=1
sceneTemp=1
end
end,
mode=function()
@@ -49,15 +51,14 @@ local sceneInit={
destroyPlayers()
end,
custom=function()
sel=sel or 1
sceneTemp=1--option select
destroyPlayers()
curBG=customRange.bg[customSel[12]]
BGM(customRange.bgm[customSel[13]])
end,
draw=function()
curBG="none"
clearSureTime=0
pen,sx,sy=1,1,1
sceneTemp={sure=0,pen=1,x=1,y=1}
end,
play=function()
love.keyboard.setKeyRepeat(false)
@@ -80,20 +81,23 @@ local sceneInit={
curBG="none"
end,
setting_sound=function()
sceneTemp={last=0,jump=0}--last sound time,animation count(10→0)
curBG="none"
end,
setting_key=function()
curBoard=1
keyboardSet=1
joystickSet=1
keyboardSetting=false
joystickSetting=false
sceneTemp={
board=1,
kb=1,js=1,
kS=false,jS=false,
}
end,
setting_touch=function()
curBG="game2"
defaultSel=1
sel=nil
snapLevel=1
sceneTemp={
default=1,
snap=1,
sel=nil,
}
end,
setting_touchSwitch=function()
curBG="matrix"
@@ -104,7 +108,7 @@ local sceneInit={
history=function()
updateLog=require"updateLog"
curBG="lightGrey"
sel=1
sceneTemp=1--scroll pos
end,
quit=function()
love.timer.sleep(.3)
@@ -124,19 +128,19 @@ local swapDeck_data={
}--Block id [ZSLJTOI] ,dir,x,y
local gc=love.graphics
local swap={
none={1,0,NULL},
flash={8,1,function()gc.clear(1,1,1)end},
fade={30,15,function(t)
none={1,0,nil,NULL},
flash={8,1,nil,function()gc.clear(1,1,1)end},
fade={30,15,"swipe",function(t)
local t=t>15 and 2-t/15 or t/15
gc.setColor(0,0,0,t)
gc.rectangle("fill",0,0,1280,720)
end},
slowFade={180,90,function(t)
slowFade={180,90,nil,function(t)
local t=t>90 and 2-t/90 or t/90
gc.setColor(0,0,0,t)
gc.rectangle("fill",0,0,1280,720)
end},
deck={50,8,function(t)
deck={50,8,nil,function(t)
gc.setColor(1,1,1)
if t>8 then
local t=t<15 and 15 or t
@@ -189,11 +193,12 @@ function scene.swapTo(tar,style)
if not style then style="fade"end
S.tar=tar
S.style=style
S.time=swap[style][1]
S.mid=swap[style][2]
S.draw=swap[style][3]
local swap=swap[style]
S.time=swap[1]
S.mid=swap[2]
if swap[3]then SFX(swap[3])end
S.draw=swap[4]
widget_sel=nil
if style~="none"then SFX("swipe")end
end
end
function scene.back()

2
shader.lua Normal file
View File

@@ -0,0 +1,2 @@
gc=love.graphics
shader_glow=gc.newShader("shader/glow.cs")

5
shader/glow.cs Normal file
View File

@@ -0,0 +1,5 @@
extern float X;extern float Y;extern float W;extern float H;
vec4 effect(vec4 C,Image Tx,vec2 Tcd,vec2 Pcd){
C[3]=min((Pcd.x-X)/W*.3+(Pcd.y-Y)/H*.1,.3)+.5;
return C;
}

View File

@@ -12,5 +12,5 @@ vec4 effect(vec4 color,Image texture,vec2 texture_coords,vec2 screen_coords){
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即透光
}
return vec4(vec3(1),1.);//返回最远距离1
return vec4(1,1,1,1);//返回最远距离1
}

View File

@@ -1,4 +1,5 @@
local rnd=math.random
local rem=table.remove
local vibrateLevel={0,.015,.02,.03,.04,.05,.06,.07,.08,.09}
function VIB(t)
if setting.vib>0 then
@@ -27,7 +28,6 @@ function SFX(s,v,pos)
end
end
S:setVolume((v or 1)*setting.sfx*.1)
print((v or 1)*setting.sfx*.1)
S:play()
end
end

View File

@@ -1,6 +1,8 @@
local gc=love.graphics
local rnd=math.random
local mStr=mStr
local rem=table.remove
local textFX={}
function textFX.appear(t)
mStr(t.text,t.x,t.y-t.font*.7)
@@ -56,22 +58,20 @@ function textFX.beat(t)
end
function getTEXT(text,x,y,font,style,spd,stop)
return{
c=0, --counter
text=text, --string
x=x or 0, --x
y=y or 0, --y
font=font or 40, --font
spd=(spd or 1)/60, --timing speed
stop=stop, --timing stop
draw=textFX[style]or error("unavailable type:"..style), --draw method
c=0,
text=text,
x=x or 0,
y=y or 0,
font=font or 40,
spd=(spd or 1)/60,
stop=stop,
draw=textFX[style]or error("unavailable type:"..style),
}
end
end--another version of TEXT()
function TEXT(text,x,y,font,style,spd,stop)
texts[#texts+1]={
c=0, --timer
text=text or"NaN", --string
text=text, --string
x=x or 0, --x
y=y or 0, --y
font=font or 40, --font
@@ -79,4 +79,27 @@ function TEXT(text,x,y,font,style,spd,stop)
stop=stop, --stop time(sustained text)
draw=textFX[style]or error("unavailable type:"..style), --draw method
}
end
function updateText(list)
for i=#list,1,-1 do
local t=list[i]
t.c=t.c+t.spd
if t.stop then
if t.c>t.stop then
t.c=t.stop
end
end
if t.c>60 then
rem(list,i)
end
end
end
function drawTexts(list)
for i=1,#list do
local t=list[i]
local p=t.c
gc.setColor(1,1,1,p<.2 and p*5 or p<.8 and 1 or 5-p*5)
setFont(t.font)
t:draw()
end
end

View File

@@ -1,12 +1,13 @@
local gc=love.graphics
local N,c=gc.newImage
local N=gc.newImage
local int=math.floor
local function T(s,t)return gc.newText(setFont(s),t)end
local function C(x,y)
c=gc.newCanvas(x,y)
local c=gc.newCanvas(x,y)
gc.setCanvas(c)
return c
end
local c
gc.setDefaultFilter("nearest","nearest")
blockImg=N("/image/block.png")
@@ -36,15 +37,38 @@ for i=1,7 do
end end
end
puzzleMark={}
gc.setLineWidth(3)
for i=1,13 do
puzzleMark[i]=C(30,30)
if i>7 then
gc.setColor(blockColor[i])
gc.rectangle("line",7,7,16,16)
else
local c=blockColor[i]
gc.setColor(c[1],c[2],c[3],.6)
gc.rectangle("line",5,5,20,20)
gc.rectangle("line",10,10,10,10)
end
end
c=C(30,30)
gc.setColor(1,1,1)
gc.line(5,5,25,25)
gc.line(5,25,25,5)
puzzleMark[-1]=C(30,30)
gc.setColor(1,1,1,.9)
gc.draw(c)
c:release()
PTC={dust={}}--Particle systems
C(6,6)
c=C(6,6)
gc.clear(1,1,1)
PTC.dust0=gc.newParticleSystem(c,1000)
c:release()
PTC.dust0:setParticleLifetime(.2,.3)
PTC.dust0:setEmissionRate(0)
PTC.dust0:setLinearAcceleration(-1500,-200,1500,200)
PTC.dust0:setColors(1,1,1,.5,1,1,1,0)
c:release()
--Dust particles
gc.setDefaultFilter("linear","linear")
@@ -55,12 +79,17 @@ dialNeedle=N("/image/mess/dialNeedle.png")
badgeIcon=N("/image/mess/badge.png")
spinCenter=N("/image/mess/spinCenter.png")
batteryImage=N("/image/mess/power.png")
chargeImage=N("/image/mess/charge.png")
background1=N("/image/BG/bg1.jpg")
background2=N("/image/BG/bg2.png")
groupCode=N("/image/mess/groupcode.png")
payCode=N("/image/mess/paycode.png")
miya_ch=N("/image/miya/ch.png")
miya_f1=N("/image/miya/f1.png")
miya_f2=N("/image/miya/f2.png")
miya_f3=N("/image/miya/f3.png")
miya_f4=N("/image/miya/f4.png")
drawableText={
question=T(100,"?"),
bpm=T(15,"BPM"),kpm=T(15,"KPM"),
@@ -76,7 +105,7 @@ drawableText={
nextWave=T(30,"Next"),
combo=T(20,"Combo"),
mxcmb=T(20,"Max Combo"),
pc=T(22,"Perfect Clear"),
pc=T(20,"Perfect Clear"),
ko=T(25,"KO"),
modeName=T(30),levelName=T(30),
@@ -84,7 +113,7 @@ drawableText={
win=T(120),finish=T(120),
lose=T(120),pause=T(120),
custom=T(80),
setting_game=T(80),setting_graphic=T(80),setting_sound=T(80),
keyboard=T(25),joystick=T(25),

View File

@@ -6,60 +6,55 @@ local ins,rem=table.insert,table.remove
local Tmr={}
function Tmr.load()
local t=Timer()
local L=loading
::R::
if loading==1 then
if loadnum<=#voiceName then
local N=voiceName[loadnum]
for i=1,#voiceList[N]do
voiceBank[voiceList[N][i]]={love.audio.newSource("VOICE/"..voiceList[N][i]..".ogg","static")}
end
loadprogress=loadnum/#voiceName
loadnum=loadnum+1
else
loading=2
loadnum=1
if L[1]==1 then
local N=voiceName[L[2]]
for i=1,#voiceList[N]do
local V=voiceList[N][i]
voiceBank[V]={love.audio.newSource("VOICE/"..V..".ogg","static")}
end
elseif loading==2 then
if loadnum<=#bgm then
local N=bgm[loadnum]
bgm[N]=love.audio.newSource("/BGM/"..N..".ogg","stream")
bgm[N]:setLooping(true)
bgm[N]:setVolume(0)
loadprogress=loadnum/#bgm
loadnum=loadnum+1
else
L[2]=L[2]+1
if L[2]>L[3]then
L[1],L[2],L[3]=2,1,#bgm
end
elseif L[1]==2 then
local N=bgm[L[2]]
bgm[N]=love.audio.newSource("/BGM/"..N..".ogg","stream")
bgm[N]:setLooping(true)
bgm[N]:setVolume(0)
L[2]=L[2]+1
if L[2]>L[3]then
for i=1,#bgm do bgm[i]=nil end
loading=3
loadnum=1
L[1],L[2],L[3]=3,1,#sfx
end
elseif loading==3 then
if loadnum<=#sfx then
sfx[sfx[loadnum]]={love.audio.newSource("/SFX/"..sfx[loadnum]..".ogg","static")}
loadprogress=loadnum/#sfx
loadnum=loadnum+1
else
for i=1,#sfx do sfx[i]=nil end
loading=4
loadnum=1
elseif L[1]==3 then
local S=sfx[L[2]]
sfx[S]={love.audio.newSource("/SFX/"..S..".ogg","static")}
L[2]=L[2]+1
if L[2]>L[3]then
for i=1,L[2]do sfx[i]=nil end
L[1],L[2],L[3]=0,1,1
SFX("welcome",.2)
end
elseif loading==4 then
loadnum=loadnum+1
if loadnum==48 then
else
L[2]=L[2]+1
L[3]=L[2]
if L[2]>50 then
stat.run=stat.run+1
scene.swapTo("intro","none")
end
end
end
function Tmr.intro()
count=count+1
if count==200 then count=80 end
sceneTemp=sceneTemp+1
if sceneTemp==200 then sceneTemp=80 end
end
function Tmr.main(dt)
players[1]:update(dt)
end
function Tmr.draw()
if clearSureTime>0 then clearSureTime=clearSureTime-1 end
if sceneTemp.sure>0 then sceneTemp.sure=sceneTemp.sure-1 end
end
function Tmr.play(dt)
frame=frame+1
@@ -68,7 +63,7 @@ function Tmr.play(dt)
local b=FX_attack[i]
b.t=b.t+1
if b.t>50 then
b.rad=b.rad*1.08+.2
b.rad=b.rad*1.05+.1
b.x,b.y=b.x2,b.y2
elseif b.t>10 then
local t=((b.t-10)*.025)t=(3-2*t)*t*t
@@ -76,12 +71,12 @@ function Tmr.play(dt)
end
if b.t<60 then
local L=FX_attack[i].drag
if #L==6*setting.atkFX then
if #L==4*setting.atkFX then
rem(L,1)rem(L,1)
end
ins(L,b.x)ins(L,b.y)
else
for i=1,#FX_attack do
for i=i,#FX_attack do
FX_attack[i]=FX_attack[i+1]
end
end
@@ -145,4 +140,10 @@ function Tmr.pause(dt)
pauseTimer=pauseTimer+1
end
end
function Tmr.setting_sound()
local t=sceneTemp.jump
if t>0 then
sceneTemp.jump=t-1
end
end
return Tmr

View File

@@ -326,7 +326,6 @@ function gameStart()
end
local dataOpt={
"run","game","time",
"extraPiece","extraRate",
@@ -406,11 +405,19 @@ function loadSetting()
v=toN(v)if not v or v<0 then v=0 end
setting[t]=int(v)
elseif t=="dropFX"or t=="shakeFX"or t=="atkFX"then
setting[t]=toN(v:match("[0123]"))or 0
setting[t]=toN(v:match("[012345]"))or 0
elseif t=="lang"then
setting[t]=toN(v:match("[123]"))or 1
elseif t=="skin"then
setting[t]=toN(v:match("[12345678]"))or 1
elseif t=="modesel"then
local t=toN(v)
if not(t or modes[modeID[t]])then
t=1
end
modeSel=t
elseif t=="levelsel"then
levelSel=toN(v)
elseif t=="keymap"then
v=splitS(v,"/")
for i=1,16 do
@@ -433,6 +440,9 @@ function loadSetting()
end
end
end
if not modes[modeID[modeSel]].level[levelSel]then
levelSel=1
end
end
local saveOpt={
"das","arr",
@@ -457,7 +467,7 @@ local saveOpt={
"sfx","bgm",
"vib","voc",
"stereo",
"VKSwitch",
"VKTrack",
"VKDodge",
@@ -482,6 +492,8 @@ function saveSetting()
map[i]=concat(setting.keyMap[i],",")
end
local t={
"modesel="..modeSel,
"levelsel="..levelSel,
"keymap="..toS(concat(map,"/")),
"VK="..toS(concat(vk,"/")),
}

View File

@@ -9,11 +9,12 @@ Patron(rmb10+):
?[D*a]
Future outlook:
Normal:
timing mode
powerinfo switch
splashing block
ajustable next count
new mode system
custom block color/direction
new mode system
combo mode
bigbang mode
TTT mode
@@ -27,6 +28,21 @@ Future outlook:
infinite 1v1
square mode
more FXs & 3d features & animations
0.8.3:
new widget appearence
cuter miya
0.8.2+:
GUI adjusted
miya figure added
0.8.2:
new widget appearence
GUI adjusted
bug fixed
0.8.1:
more FX level
better battery info displaying
3 next in GMroll
bug fixed
0.8.0:
remake text system
more details