Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3155bc48ef | ||
|
|
c1b334963b | ||
|
|
0dbdc9fe42 | ||
|
|
324435d51a | ||
|
|
1c384ca51a |
Binary file not shown.
BIN
VOICE/egg_1.ogg
Normal file
BIN
VOICE/egg_1.ogg
Normal file
Binary file not shown.
BIN
VOICE/egg_2.ogg
Normal file
BIN
VOICE/egg_2.ogg
Normal file
Binary file not shown.
BIN
VOICE/nya_31.ogg
BIN
VOICE/nya_31.ogg
Binary file not shown.
BIN
VOICE/nya_happy_4.ogg
Normal file
BIN
VOICE/nya_happy_4.ogg
Normal file
Binary file not shown.
BIN
VOICE/nya_sad_1.ogg
Normal file
BIN
VOICE/nya_sad_1.ogg
Normal file
Binary file not shown.
141
class.lua
141
class.lua
@@ -31,7 +31,10 @@ function clearTask(opt)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local button={type="button"}
|
local button={
|
||||||
|
type="button",
|
||||||
|
ATV=0,--activating time(0~8)
|
||||||
|
}
|
||||||
function newButton(x,y,w,h,color,font,code,hide,N)
|
function newButton(x,y,w,h,color,font,code,hide,N)
|
||||||
local _={
|
local _={
|
||||||
x=x-w*.5,y=y-h*.5,
|
x=x-w*.5,y=y-h*.5,
|
||||||
@@ -44,36 +47,55 @@ function newButton(x,y,w,h,color,font,code,hide,N)
|
|||||||
}for k,v in next,button do _[k]=v end return _
|
}for k,v in next,button do _[k]=v end return _
|
||||||
end
|
end
|
||||||
function button:isAbove(x,y)
|
function button:isAbove(x,y)
|
||||||
return x>self.x and x<self.x+self.w and y>self.y and y<self.y+self.h
|
return x>self.x-self.ATV and x<self.x+self.w+2*self.ATV and y>self.y-self.ATV and y<self.y+self.h+2*self.ATV
|
||||||
end
|
end
|
||||||
function button:FX()
|
function button:FX()
|
||||||
sysFX[#sysFX+1]={0,0,10,self.x,self.y,self.w,self.h}
|
sysFX[#sysFX+1]={0,0,10,self.x-self.ATV,self.y-self.ATV,self.w+2*self.ATV,self.h+2*self.ATV}
|
||||||
--[0=ripple],timer,duration,x,y,w,h
|
--0[ripple],timer,duration,x,y,w,h
|
||||||
|
end
|
||||||
|
function button:update()
|
||||||
|
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
|
||||||
|
end
|
||||||
end
|
end
|
||||||
function button:draw()
|
function button:draw()
|
||||||
local C=self.color
|
local x,y,w,h=self.x,self.y,self.w,self.h
|
||||||
gc.setColor(C)
|
local r,g,b=unpack(self.color)
|
||||||
gc.setLineWidth(3)gc.rectangle("line",self.x,self.y,self.w,self.h,4)
|
gc.setColor(.2+r*.8,.2+g*.8,.2+b*.8,.7)
|
||||||
gc.setColor(C[1],C[2],C[3],.4)
|
local sd=shader_glow
|
||||||
gc.setLineWidth(5)gc.rectangle("line",self.x,self.y,self.w,self.h,4)
|
sd:send("X",x)sd:send("Y",y)sd:send("W",w)sd:send("H",h)
|
||||||
if self==widget_sel then
|
gc.setShader(sd)
|
||||||
gc.rectangle("fill",self.x,self.y,self.w,self.h,4)
|
gc.rectangle("fill",x-self.ATV,y-self.ATV,w+2*self.ATV,h+2*self.ATV)
|
||||||
end--Highlight when Selected
|
gc.setShader()
|
||||||
|
if self.ATV>0 then
|
||||||
|
gc.setLineWidth(4)
|
||||||
|
gc.setColor(1,1,1,self.ATV*.125)
|
||||||
|
gc.rectangle("line",x-self.ATV+2,y-self.ATV+2,w+2*self.ATV-4,h+2*self.ATV-4)
|
||||||
|
end
|
||||||
local t=self.text
|
local t=self.text
|
||||||
if t then
|
if t then
|
||||||
if type(t)=="function"then t=t()end
|
if type(t)=="function"then t=t()end
|
||||||
setFont(self.font)
|
setFont(self.font)
|
||||||
local y0=self.y+self.h*.5-self.font*.7
|
local y0=y+h*.5-self.font*.7
|
||||||
gc.printf(t,self.x-2,y0-1,self.w,"center")
|
gc.setColor(1,1,1,.3)
|
||||||
gc.setColor(C)
|
gc.printf(t,x-2,y0-2,w,"center")
|
||||||
gc.printf(t,self.x,y0,self.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
|
||||||
end
|
end
|
||||||
function button:getInfo()
|
function button:getInfo()
|
||||||
print(format("x=%d,y=%d,w=%d,h=%d,font=%d",self.x+self.w*.5,self.y+self.h*.5,self.w,self.h,self.font))
|
print(format("x=%d,y=%d,w=%d,h=%d,font=%d",self.x+self.w*.5,self.y+self.h*.5,self.w,self.h,self.font))
|
||||||
end
|
end
|
||||||
|
|
||||||
local switch={type="switch"}
|
local switch={
|
||||||
|
type="switch",
|
||||||
|
ATV=0,--activating time(0~8)
|
||||||
|
}
|
||||||
function newSwitch(x,y,font,disp,code,hide,N)
|
function newSwitch(x,y,font,disp,code,hide,N)
|
||||||
local _={
|
local _={
|
||||||
x=x,y=y,font=font,
|
x=x,y=y,font=font,
|
||||||
@@ -84,27 +106,35 @@ function newSwitch(x,y,font,disp,code,hide,N)
|
|||||||
}for k,v in next,switch do _[k]=v end return _
|
}for k,v in next,switch do _[k]=v end return _
|
||||||
end
|
end
|
||||||
function switch:isAbove(x,y)
|
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
|
end
|
||||||
function switch:FX()
|
function switch:update()
|
||||||
sysFX[#sysFX+1]=self.disp()and
|
if widget_sel==self then
|
||||||
{1,0,15,1,.4,.4,self.x,self.y-20,50,40,0}--Switched on
|
if self.ATV<8 then self.ATV=self.ATV+1 end
|
||||||
or{1,0,15,.4,1,.4,self.x+50,self.y-20,50,40,0}--Switched off
|
else
|
||||||
--[1=square fade],timer,duration,r,g,b,x,y,w,h
|
if self.ATV>0 then self.ATV=self.ATV-1 end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
function switch:draw()
|
function switch:draw()
|
||||||
local x,y=self.x,self.y-20
|
local x,y=self.x,self.y-25
|
||||||
if self.disp()then
|
if self.disp()then
|
||||||
gc.setColor(.6,1,.6)
|
if self.ATV>0 then
|
||||||
gc.rectangle("fill",x+50,y,50,40,3)
|
gc.setColor(1,.3,.3,self.ATV*.06)
|
||||||
--ON
|
gc.rectangle("fill",x,y,50,50)
|
||||||
|
end
|
||||||
|
gc.setColor(.9,1,.9)
|
||||||
|
gc.setLineWidth(6)
|
||||||
|
gc.line(x+5,y+25,x+18,y+38,x+45,y+11)
|
||||||
else
|
else
|
||||||
gc.setColor(1,.6,.6)
|
if self.ATV>0 then
|
||||||
gc.rectangle("fill",x,y,50,40,3)
|
gc.setColor(.3,1,.3,self.ATV*.06)
|
||||||
--OFF
|
gc.rectangle("fill",x,y,50,50)
|
||||||
end--switch
|
end
|
||||||
gc.setColor(1,1,1,self==widget_sel and 1 or .6)
|
end
|
||||||
gc.setLineWidth(3)gc.rectangle("line",x-3,y-3,106,46,5)
|
--checked
|
||||||
|
gc.setLineWidth(4)
|
||||||
|
gc.setColor(1,1,1)
|
||||||
|
gc.rectangle("line",x,y,50,50)
|
||||||
--frame
|
--frame
|
||||||
local t=self.text
|
local t=self.text
|
||||||
if t then
|
if t then
|
||||||
@@ -117,7 +147,11 @@ function switch:getInfo()
|
|||||||
print(format("x=%d,y=%d,font=%d",self.x,self.y,self.font))
|
print(format("x=%d,y=%d,font=%d",self.x,self.y,self.font))
|
||||||
end
|
end
|
||||||
|
|
||||||
local slider={type="slider"}
|
local slider={
|
||||||
|
type="slider",
|
||||||
|
ATV=0,--activating time(0~8)
|
||||||
|
pos=0,--position shown
|
||||||
|
}
|
||||||
function newSlider(x,y,w,unit,font,change,disp,code,hide,N)
|
function newSlider(x,y,w,unit,font,change,disp,code,hide,N)
|
||||||
local _={
|
local _={
|
||||||
x=x,y=y,
|
x=x,y=y,
|
||||||
@@ -133,32 +167,45 @@ end
|
|||||||
function slider:isAbove(x,y)
|
function slider:isAbove(x,y)
|
||||||
return x>self.x-10 and x<self.x+self.w+10 and y>self.y-20 and y<self.y+20
|
return x>self.x-10 and x<self.x+self.w+10 and y>self.y-20 and y<self.y+20
|
||||||
end
|
end
|
||||||
function slider:FX(pos)
|
function slider:update()
|
||||||
sysFX[#sysFX+1]={1,0,10,1,1,1,self.x+self.w*pos/self.unit-8,self.y-15,17,30}
|
if widget_sel==self then
|
||||||
--[1=square fade],timer,duration,r,g,b,x,y,w,h
|
if self.ATV<6 then self.ATV=self.ATV+1 end
|
||||||
|
else
|
||||||
|
if self.ATV>0 then self.ATV=self.ATV-1 end
|
||||||
|
end
|
||||||
|
if not(self.hide and self.hide())then
|
||||||
|
self.pos=self.pos*.8+self.disp()*.2
|
||||||
|
end
|
||||||
end
|
end
|
||||||
function slider:draw()
|
function slider:draw()
|
||||||
local S=self==widget_sel
|
local x,y=self.x,self.y
|
||||||
gc.setColor(1,1,1,S and 1 or .5)
|
gc.setColor(1,1,1,.5+self.ATV*.06)
|
||||||
gc.setLineWidth(2)
|
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
|
for p=0,self.unit do
|
||||||
local x=x1+(x2-x1)*p/self.unit
|
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
|
end
|
||||||
--units
|
--units
|
||||||
gc.setLineWidth(5)
|
gc.setLineWidth(4)
|
||||||
gc.line(x1,self.y,x2,self.y)
|
gc.line(x1,y,x2,y)
|
||||||
--axis
|
--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
|
local t=self.text
|
||||||
if t then
|
if t then
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
setFont(self.font)
|
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
|
end
|
||||||
|
--text
|
||||||
|
local x,y,w,h=x1+(x2-x1)*self.pos/self.unit-10-self.ATV,y-16-self.ATV,20+2*self.ATV,32+2*self.ATV
|
||||||
|
gc.setColor(.8,.8,.8)
|
||||||
|
gc.rectangle("fill",x,y,w,h)
|
||||||
|
if self.ATV>0 then
|
||||||
|
gc.setLineWidth(2)
|
||||||
|
gc.setColor(1,1,1,self.ATV*.16)
|
||||||
|
gc.rectangle("line",x+1,y+1,w-2,h-2)
|
||||||
|
end
|
||||||
|
--block
|
||||||
end
|
end
|
||||||
function slider:getInfo()
|
function slider:getInfo()
|
||||||
print(format("x=%d,y=%d,w=%d",self.x,self.y,self.w))
|
print(format("x=%d,y=%d,w=%d",self.x,self.y,self.w))
|
||||||
|
|||||||
11
conf.lua
11
conf.lua
@@ -1,13 +1,12 @@
|
|||||||
math.randomseed(os.time())
|
gameVersion="Alpha V0.8.4"
|
||||||
gameVersion="Alpha V0.8.1"
|
|
||||||
function love.conf(t)
|
function love.conf(t)
|
||||||
t.identity="Techmino"--Save directory name
|
t.identity="Techmino"--Save directory name
|
||||||
t.version="11.1"
|
t.version="11.1"
|
||||||
t.console=X
|
t.console=X
|
||||||
t.gammacorrect=X
|
t.gammacorrect=X
|
||||||
t.appendidentity=X--If search files in source before save directory
|
t.appendidentity=X--Search files in source before save directory
|
||||||
t.accelerometerjoystick=X--If exposing accelerometer on iOS and Android as a Joystick
|
t.accelerometerjoystick=false--ios/android加速度计=摇杆
|
||||||
t.audio.mixwithsystem=true--Switch on to keep sysBGM
|
t.audio.mixwithsystem=true
|
||||||
|
|
||||||
local W=t.window
|
local W=t.window
|
||||||
W.title="Techmino "..gameVersion
|
W.title="Techmino "..gameVersion
|
||||||
@@ -21,7 +20,7 @@ function love.conf(t)
|
|||||||
W.vsync=0--0→∞fps
|
W.vsync=0--0→∞fps
|
||||||
W.msaa=X--The number of samples to use with multi-sampled antialiasing (number)
|
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.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.display=1--Monitor ID
|
||||||
W.highdpi=X--Enable high-dpi mode for the window on a Retina display (boolean)
|
W.highdpi=X--Enable high-dpi mode for the window on a Retina display (boolean)
|
||||||
W.x,W.y=nil
|
W.x,W.y=nil
|
||||||
|
|||||||
@@ -1373,7 +1373,6 @@ modes.c4wtrain={
|
|||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(45)
|
setFont(45)
|
||||||
mStr(max(100-P.stat.row,0),-82,220)
|
|
||||||
mStr(P.combo,-82,310)
|
mStr(P.combo,-82,310)
|
||||||
mStr(P.modeData.point,-82,400)
|
mStr(P.modeData.point,-82,400)
|
||||||
mDraw(drawableText.combo,-82,358)
|
mDraw(drawableText.combo,-82,358)
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ spin判定:
|
|||||||
攻击系统:
|
攻击系统:
|
||||||
消1/2/3/4攻击0/1/2/4
|
消1/2/3/4攻击0/1/2/4
|
||||||
spin1/2/3攻击2/4/6,若mini则减半
|
spin1/2/3攻击2/4/6,若mini则减半
|
||||||
b2b:增加1~2(tetris)/1~3(spin)攻击
|
B2B:增加1~2(techrash)/1~3(spin)攻击
|
||||||
b3b:满b2b效果+1额外抵挡
|
B3B:满B2B效果+1额外抵挡
|
||||||
PC:其它攻击与6~8(本局内递增)取高+2额外抵挡
|
PC:其它攻击与6~8(本局内递增)取高+2额外抵挡
|
||||||
连击:0,0,1,1,2,2,3,3,4,4,3……
|
连击:0,0,1,1,2,2,3,3,4,4,3……
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ back to back(B2B)点数说明:
|
|||||||
|
|
||||||
攻击延迟:
|
攻击延迟:
|
||||||
消2/3的攻击生效最快,消四其次,spin攻击生效较慢,高连击生效最慢
|
消2/3的攻击生效最快,消四其次,spin攻击生效较慢,高连击生效最慢
|
||||||
b2b或者b3b增加攻击力的同时也会减缓一点生效速度,mini大幅减缓生效速度
|
B2B或者B3B增加攻击力的同时也会减缓一点生效速度,mini大幅减缓生效速度
|
||||||
|
|
||||||
抵消逻辑:
|
抵消逻辑:
|
||||||
发动攻击时,若缓冲条有攻击则先用额外抵挡再用攻击力1:1抵消最先受到的攻击
|
发动攻击时,若缓冲条有攻击则先用额外抵挡再用攻击力1:1抵消最先受到的攻击
|
||||||
|
|||||||
BIN
image/miya/ch.png
Normal file
BIN
image/miya/ch.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 74 KiB |
BIN
image/miya/f1.png
Normal file
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
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
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
BIN
image/miya/f4.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -113,7 +113,7 @@ return{
|
|||||||
hotseat="友尽模式",
|
hotseat="友尽模式",
|
||||||
},
|
},
|
||||||
|
|
||||||
load={"加载语音ing","加载音乐ing","加载音效ing","加载完成",},
|
load={[0]="加载完成","加载语音ing","加载音乐ing","加载音效ing",},
|
||||||
tips={
|
tips={
|
||||||
"不是动画,真的在加载!",
|
"不是动画,真的在加载!",
|
||||||
"大满贯10连击消四全清!",
|
"大满贯10连击消四全清!",
|
||||||
@@ -195,7 +195,7 @@ return{
|
|||||||
warning="禁 止 私 自 传 播",
|
warning="禁 止 私 自 传 播",
|
||||||
WidgetText={
|
WidgetText={
|
||||||
main={
|
main={
|
||||||
lang="Lang",
|
lang="言/A",
|
||||||
qplay="快速开始",
|
qplay="快速开始",
|
||||||
play="开始",
|
play="开始",
|
||||||
setting="设置",
|
setting="设置",
|
||||||
@@ -259,7 +259,8 @@ return{
|
|||||||
pause={
|
pause={
|
||||||
resume= "继续",
|
resume= "继续",
|
||||||
restart="重新开始",
|
restart="重新开始",
|
||||||
setting="设置",
|
sfx="音效",
|
||||||
|
bgm="音乐",
|
||||||
quit= "退出",
|
quit= "退出",
|
||||||
},
|
},
|
||||||
setting_game={
|
setting_game={
|
||||||
@@ -307,16 +308,11 @@ return{
|
|||||||
back=BK,
|
back=BK,
|
||||||
},
|
},
|
||||||
setting_touch={
|
setting_touch={
|
||||||
hide="显示虚拟按键",
|
|
||||||
track="按键自动跟踪",
|
|
||||||
tkset="跟踪设置",
|
|
||||||
default="默认组合",
|
default="默认组合",
|
||||||
snap=function()return text.snapLevelName[snapLevel]end,
|
snap=function()return text.snapLevelName[sceneTemp.snap]end,
|
||||||
alpha=function()return setting.VKAlpha.."0%"end,
|
option="选项",
|
||||||
icon="图标",
|
|
||||||
size="大小",
|
|
||||||
toggle="开关",
|
|
||||||
back=BK,
|
back=BK,
|
||||||
|
size="大小",
|
||||||
},
|
},
|
||||||
setting_touchSwitch={
|
setting_touchSwitch={
|
||||||
b1= actName[1],b2=actName[2],b3=actName[3],b4=actName[4],
|
b1= actName[1],b2=actName[2],b3=actName[3],b4=actName[4],
|
||||||
@@ -326,6 +322,11 @@ return{
|
|||||||
b17=actName[17],b18=actName[18],b19=actName[19],b20=actName[20],
|
b17=actName[17],b18=actName[18],b19=actName[19],b20=actName[20],
|
||||||
norm="标准",
|
norm="标准",
|
||||||
pro="专业",
|
pro="专业",
|
||||||
|
hide="显示虚拟按键",
|
||||||
|
track="按键自动跟踪",
|
||||||
|
icon="图标",
|
||||||
|
tkset="跟踪设置",
|
||||||
|
alpha="透明度",
|
||||||
back=BK,
|
back=BK,
|
||||||
},
|
},
|
||||||
setting_trackSetting={
|
setting_trackSetting={
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ return{
|
|||||||
hotseat="友尽模式",
|
hotseat="友尽模式",
|
||||||
},
|
},
|
||||||
|
|
||||||
load={"加载语音ing","加载音乐ing","加载音效ing","加载完成",},
|
load={[0]="加载完成","加载语音ing","加载音乐ing","加载音效ing",},
|
||||||
tips={
|
tips={
|
||||||
"不是动画,真的在加载!",
|
"不是动画,真的在加载!",
|
||||||
"大满贯10连击消四全清!",
|
"大满贯10连击消四全清!",
|
||||||
@@ -195,7 +195,7 @@ return{
|
|||||||
warning="禁 止 私 自 传 播",
|
warning="禁 止 私 自 传 播",
|
||||||
WidgetText={
|
WidgetText={
|
||||||
main={
|
main={
|
||||||
lang="Lang",
|
lang="言/A",
|
||||||
qplay="快速开始",
|
qplay="快速开始",
|
||||||
play="开始",
|
play="开始",
|
||||||
setting="设置",
|
setting="设置",
|
||||||
@@ -259,7 +259,8 @@ return{
|
|||||||
pause={
|
pause={
|
||||||
resume= "继续",
|
resume= "继续",
|
||||||
restart="重新开始",
|
restart="重新开始",
|
||||||
setting="设置",
|
sfx="音效",
|
||||||
|
bgm="音乐",
|
||||||
quit= "退出",
|
quit= "退出",
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -308,16 +309,11 @@ return{
|
|||||||
back=BK,
|
back=BK,
|
||||||
},
|
},
|
||||||
setting_touch={
|
setting_touch={
|
||||||
hide="显示虚拟按键",
|
|
||||||
track="按键自动跟踪",
|
|
||||||
tkset="跟踪设置",
|
|
||||||
default="默认组合",
|
default="默认组合",
|
||||||
snap=function()return text.snapLevelName[snapLevel]end,
|
snap=function()return text.snapLevelName[sceneTemp.snap]end,
|
||||||
alpha=function()return setting.VKAlpha.."0%"end,
|
option="选项",
|
||||||
icon="图标",
|
|
||||||
size="大小",
|
|
||||||
toggle="开关",
|
|
||||||
back=BK,
|
back=BK,
|
||||||
|
size="大小",
|
||||||
},
|
},
|
||||||
setting_touchSwitch={
|
setting_touchSwitch={
|
||||||
b1= actName[1],b2=actName[2],b3=actName[3],b4=actName[4],
|
b1= actName[1],b2=actName[2],b3=actName[3],b4=actName[4],
|
||||||
@@ -327,6 +323,11 @@ return{
|
|||||||
b17=actName[17],b18=actName[18],b19=actName[19],b20=actName[20],
|
b17=actName[17],b18=actName[18],b19=actName[19],b20=actName[20],
|
||||||
norm="标准",
|
norm="标准",
|
||||||
pro="专业",
|
pro="专业",
|
||||||
|
hide="显示虚拟按键",
|
||||||
|
track="按键自动跟踪",
|
||||||
|
icon="图标",
|
||||||
|
tkset="跟踪设置",
|
||||||
|
alpha="透明度",
|
||||||
back=BK,
|
back=BK,
|
||||||
},
|
},
|
||||||
setting_trackSetting={
|
setting_trackSetting={
|
||||||
@@ -348,4 +349,4 @@ return{
|
|||||||
back=BK,
|
back=BK,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}--译
|
||||||
@@ -111,7 +111,7 @@ return{
|
|||||||
hotseat="",
|
hotseat="",
|
||||||
},
|
},
|
||||||
|
|
||||||
load={"Loading VOICE","Loading BGM","Loading SFX","Finished",},
|
load={[0]="Finished","Loading VOICE","Loading BGM","Loading SFX",},
|
||||||
tips={
|
tips={
|
||||||
"Not animation,real loading!",
|
"Not animation,real loading!",
|
||||||
"Back to Back 10 combo Techrash PC!",
|
"Back to Back 10 combo Techrash PC!",
|
||||||
@@ -194,7 +194,7 @@ Lib used:
|
|||||||
warning="DO NOT DISTRIBUTE",
|
warning="DO NOT DISTRIBUTE",
|
||||||
WidgetText={
|
WidgetText={
|
||||||
main={
|
main={
|
||||||
lang="Lang",
|
lang="言/A",
|
||||||
qplay="Qplay",
|
qplay="Qplay",
|
||||||
play="Play",
|
play="Play",
|
||||||
setting="Settings",
|
setting="Settings",
|
||||||
@@ -258,7 +258,8 @@ Lib used:
|
|||||||
pause={
|
pause={
|
||||||
resume="Resume",
|
resume="Resume",
|
||||||
restart="Restart",
|
restart="Restart",
|
||||||
setting="Setting",
|
sfx="SFX",
|
||||||
|
bgm="BGM",
|
||||||
quit="Quit",
|
quit="Quit",
|
||||||
},
|
},
|
||||||
setting_game={
|
setting_game={
|
||||||
@@ -306,16 +307,11 @@ Lib used:
|
|||||||
back=BK,
|
back=BK,
|
||||||
},
|
},
|
||||||
setting_touch={
|
setting_touch={
|
||||||
hide="Show Virtual Key",
|
|
||||||
track="Auto track",
|
|
||||||
tkset="Track setting",
|
|
||||||
default="Defaults",
|
default="Defaults",
|
||||||
snap=function()return text.snapLevelName[snapLevel]end,
|
snap=function()return text.snapLevelName[sceneTemp.snap]end,
|
||||||
alpha=function()return setting.VKAlpha.."0%"end,
|
option="Option",
|
||||||
icon="Icon",
|
|
||||||
size="Size",
|
|
||||||
toggle="Toggle",
|
|
||||||
back=BK,
|
back=BK,
|
||||||
|
size="Size",
|
||||||
},
|
},
|
||||||
setting_touchSwitch={
|
setting_touchSwitch={
|
||||||
b1= actName[1],b2=actName[2],b3=actName[3],b4=actName[4],
|
b1= actName[1],b2=actName[2],b3=actName[3],b4=actName[4],
|
||||||
@@ -325,6 +321,11 @@ Lib used:
|
|||||||
b17=actName[17],b18=actName[18],b19=actName[19],b20=actName[20],
|
b17=actName[17],b18=actName[18],b19=actName[19],b20=actName[20],
|
||||||
norm="Normal",
|
norm="Normal",
|
||||||
pro="Professioanl",
|
pro="Professioanl",
|
||||||
|
hide="Show Virtual Key",
|
||||||
|
track="Auto track",
|
||||||
|
icon="Icon",
|
||||||
|
tkset="Track setting",
|
||||||
|
alpha="Alpha",
|
||||||
back=BK,
|
back=BK,
|
||||||
},
|
},
|
||||||
setting_trackSetting={
|
setting_trackSetting={
|
||||||
|
|||||||
257
list.lua
257
list.lua
@@ -96,7 +96,11 @@ voiceName={
|
|||||||
"mini","b2b","b3b","pc",
|
"mini","b2b","b3b","pc",
|
||||||
"win","lose",
|
"win","lose",
|
||||||
"bye",
|
"bye",
|
||||||
"nya","voc_nya",
|
"nya",
|
||||||
|
"happy",
|
||||||
|
"doubt",
|
||||||
|
"sad",
|
||||||
|
"egg",
|
||||||
}
|
}
|
||||||
voiceList={
|
voiceList={
|
||||||
zspin={"zspin_1","zspin_2","zspin_3"},
|
zspin={"zspin_1","zspin_2","zspin_3"},
|
||||||
@@ -120,7 +124,10 @@ voiceList={
|
|||||||
lose={"lose_1","lose_2","lose_3"},
|
lose={"lose_1","lose_2","lose_3"},
|
||||||
bye={"bye_1","bye_2"},
|
bye={"bye_1","bye_2"},
|
||||||
nya={"nya_1","nya_2","nya_3","nya_4"},
|
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={
|
musicID={
|
||||||
@@ -237,26 +244,26 @@ local virtualkeySet={
|
|||||||
{10,80, 320, 80},--restart
|
{10,80, 320, 80},--restart
|
||||||
},--Keyboard set
|
},--Keyboard set
|
||||||
{
|
{
|
||||||
{10,70, 50,27},--restart
|
{10,70, 50,30},--restart
|
||||||
{9, 130, 50,27},--func
|
{9, 130, 50,30},--func
|
||||||
{4, 190, 50,27},--rotLeft
|
{4, 190, 50,30},--rotLeft
|
||||||
{3, 250, 50,27},--rotRight
|
{3, 250, 50,30},--rotRight
|
||||||
{5, 310, 50,27},--rotFlip
|
{5, 310, 50,30},--rotFlip
|
||||||
{1, 370, 50,27},--moveLeft
|
{1, 370, 50,30},--moveLeft
|
||||||
{2, 430, 50,27},--moveRight
|
{2, 430, 50,30},--moveRight
|
||||||
{8, 490, 50,27},--hold
|
{8, 490, 50,30},--hold
|
||||||
{7, 550, 50,27},--softDrop1
|
{7, 550, 50,30},--softDrop1
|
||||||
{6, 610, 50,27},--hardDrop
|
{6, 610, 50,30},--hardDrop
|
||||||
{11,670, 50,27},--insLeft
|
{11,670, 50,30},--insLeft
|
||||||
{12,730, 50,27},--insRight
|
{12,730, 50,30},--insRight
|
||||||
{13,790, 50,27},--insDown
|
{13,790, 50,30},--insDown
|
||||||
{14,850, 50,27},--down1
|
{14,850, 50,30},--down1
|
||||||
{15,910, 50,27},--down4
|
{15,910, 50,30},--down4
|
||||||
{16,970, 50,27},--down10
|
{16,970, 50,30},--down10
|
||||||
{17,1030, 50,27},--dropLeft
|
{17,1030, 50,30},--dropLeft
|
||||||
{18,1090, 50,27},--dropRight
|
{18,1090, 50,30},--dropRight
|
||||||
{19,1150, 50,27},--addLeft
|
{19,1150, 50,30},--addLeft
|
||||||
{20,1210, 50,27},--addRight
|
{20,1210, 50,30},--addRight
|
||||||
},--PC key feedback(top&in a row)
|
},--PC key feedback(top&in a row)
|
||||||
}
|
}
|
||||||
local customSet={
|
local customSet={
|
||||||
@@ -295,7 +302,7 @@ local function pressKey(k)
|
|||||||
end
|
end
|
||||||
local function setPen(i)
|
local function setPen(i)
|
||||||
return function()
|
return function()
|
||||||
pen=i
|
sceneTemp.pen=i
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local function VKAdisp(n)
|
local function VKAdisp(n)
|
||||||
@@ -323,12 +330,12 @@ local skinName={
|
|||||||
Widget={
|
Widget={
|
||||||
load={},intro={},quit={},
|
load={},intro={},quit={},
|
||||||
main={
|
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"),
|
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"),
|
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"),
|
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.cyan, 43,function()scene.push()scene.swapTo("stat")end, nil,"qplay"),
|
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.lightGreen, 23,function()scene.push()loadGame(modeSel,levelSel)end, nil,"lang"),
|
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()
|
lang= newButton(590,505,200,70,C.lightRed, 45,function()
|
||||||
setting.lang=setting.lang%#langName+1
|
setting.lang=setting.lang%#langName+1
|
||||||
swapLanguage(setting.lang)
|
swapLanguage(setting.lang)
|
||||||
@@ -339,13 +346,13 @@ Widget={
|
|||||||
quit= newButton(370,620,280,100,C.lightGrey, 55,function()VOICE("bye")scene.swapTo("quit","slowFade")end,nil,"play"),
|
quit= newButton(370,620,280,100,C.lightGrey, 55,function()VOICE("bye")scene.swapTo("quit","slowFade")end,nil,"play"),
|
||||||
},
|
},
|
||||||
mode={
|
mode={
|
||||||
up= newButton(1000, 210,200,140,C.white, 75,pressKey("up"), function()return modeSel==1 end),
|
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),
|
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),
|
left= newButton(190, 150,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),
|
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.green, 45,function()scene.push()loadGame(modeSel,levelSel)end),
|
start= newButton(1000, 600,250,100,C.lightGreen, 45,function()scene.push()loadGame(modeSel,levelSel)end),
|
||||||
custom= newButton(275, 420,200,90, C.yellow, 35,function()scene.push()scene.swapTo("custom")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),
|
back= newButton(640, 630,230,90, C.white, 40,scene.back),
|
||||||
},
|
},
|
||||||
music={
|
music={
|
||||||
bgm= newSlider(760, 80,400,10,35,nil,SETdisp("bgm"),function(i)setting.bgm=i;BGM(bgmPlaying)end),
|
bgm= newSlider(760, 80,400,10,35,nil,SETdisp("bgm"),function(i)setting.bgm=i;BGM(bgmPlaying)end),
|
||||||
@@ -355,18 +362,18 @@ Widget={
|
|||||||
back= newButton(640, 630,230,90, C.white,40,scene.back),
|
back= newButton(640, 630,230,90, C.white,40,scene.back),
|
||||||
},
|
},
|
||||||
custom={
|
custom={
|
||||||
up= newButton(1000, 220,100,100,C.white, 45,function()sel=(sel-2)%#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()sel=sel%#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")),
|
left= newButton(880, 340,100,100,C.white, 45,pressKey("left")),
|
||||||
right= newButton(1120, 340,100,100,C.white, 45,pressKey("right")),
|
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),
|
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),
|
draw= newButton(1000, 90, 190,85, C.lightCyan, 35,function()scene.push()scene.swapTo("draw")end),
|
||||||
set1= newButton(640, 160,240,75, C.lightRed, 35,function()useDefaultSet(1)end),
|
set1= newButton(640, 160,240,75, C.lightYellow, 35,function()useDefaultSet(1)end),
|
||||||
set2= newButton(640, 250,240,75, C.lightRed, 35,function()useDefaultSet(2)end),
|
set2= newButton(640, 250,240,75, C.lightYellow, 35,function()useDefaultSet(2)end),
|
||||||
set3= newButton(640, 340,240,75, C.lightRed, 35,function()useDefaultSet(3)end),
|
set3= newButton(640, 340,240,75, C.lightYellow, 35,function()useDefaultSet(3)end),
|
||||||
set4= newButton(640, 430,240,75, C.lightRed, 35,function()useDefaultSet(4)end),
|
set4= newButton(640, 430,240,75, C.lightYellow, 35,function()useDefaultSet(4)end),
|
||||||
set5= newButton(640, 520,240,75, C.lightRed, 35,function()useDefaultSet(5)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),
|
back= newButton(640, 630,180,60, C.white, 35,scene.back),
|
||||||
},
|
},
|
||||||
draw={
|
draw={
|
||||||
@@ -398,16 +405,14 @@ Widget={
|
|||||||
resetGameData()
|
resetGameData()
|
||||||
scene.swapTo("play","none")
|
scene.swapTo("play","none")
|
||||||
end),
|
end),
|
||||||
setting=newButton(1150,80,200,100,C.yellow,40,function()
|
sfx= newSlider(950,60,280,10,35,function()SFX("blip_1")end, SETdisp("sfx"),SETsto("sfx")),
|
||||||
scene.push()
|
bgm= newSlider(950,120,280,10,35,function()BGM(bgmPlaying or"blank")end, SETdisp("bgm"),SETsto("bgm")),
|
||||||
scene.swapTo("setting_sound")
|
|
||||||
end),
|
|
||||||
quit= newButton(640,600,240,100,C.white,45,scene.back),
|
quit= newButton(640,600,240,100,C.white,45,scene.back),
|
||||||
},
|
},
|
||||||
setting_game={
|
setting_game={
|
||||||
graphic=newButton(200,80,240,80,C.lightGreen,35,function()scene.swapTo("setting_graphic")end, nil,"sound"),
|
graphic=newButton(200,80,240,80,C.lightCyan,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"),
|
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,35,function()
|
dasD= newButton(180,230,50,50,C.white,40,function()
|
||||||
setting.das=(setting.das-1)%31
|
setting.das=(setting.das-1)%31
|
||||||
if setting.arr>setting.das then
|
if setting.arr>setting.das then
|
||||||
setting.arr=setting.das
|
setting.arr=setting.das
|
||||||
@@ -415,7 +420,7 @@ Widget={
|
|||||||
SFX("blip_1",.4)
|
SFX("blip_1",.4)
|
||||||
end
|
end
|
||||||
end,nil,"dasU"),
|
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
|
setting.das=(setting.das+1)%31
|
||||||
if setting.arr>setting.das then
|
if setting.arr>setting.das then
|
||||||
setting.das=setting.arr
|
setting.das=setting.arr
|
||||||
@@ -423,7 +428,7 @@ Widget={
|
|||||||
SFX("blip_1",.4)
|
SFX("blip_1",.4)
|
||||||
end
|
end
|
||||||
end,nil,"arrD"),
|
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
|
setting.arr=(setting.arr-1)%16
|
||||||
if setting.arr>setting.das then
|
if setting.arr>setting.das then
|
||||||
setting.das=setting.arr
|
setting.das=setting.arr
|
||||||
@@ -431,7 +436,7 @@ Widget={
|
|||||||
SFX("blip_1",.4)
|
SFX("blip_1",.4)
|
||||||
end
|
end
|
||||||
end,nil,"arrU"),
|
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
|
setting.arr=(setting.arr+1)%16
|
||||||
if setting.arr>setting.das then
|
if setting.arr>setting.das then
|
||||||
setting.das=setting.arr
|
setting.das=setting.arr
|
||||||
@@ -439,20 +444,20 @@ Widget={
|
|||||||
SFX("blip_1",.4)
|
SFX("blip_1",.4)
|
||||||
end
|
end
|
||||||
end,nil,"sddasD"),
|
end,nil,"sddasD"),
|
||||||
sddasD= newButton(180,340,50,50,C.white,35, function()setting.sddas=(setting.sddas-1)%11 end, nil,"sddasU"),
|
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,35, function()setting.sddas=(setting.sddas+1)%11 end, nil,"sdarrD"),
|
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,35, function()setting.sdarr=(setting.sdarr-1)%4 end, nil,"sdarrU"),
|
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,35, function()setting.sdarr=(setting.sdarr+1)%4 end, nil,"quickR"),
|
sdarrU= newButton(720,340,50,50,C.white,40, function()setting.sdarr=(setting.sdarr+1)%4 end, nil,"quickR"),
|
||||||
quickR= newSwitch(560,430,35,SETdisp("quickR"), SETrev("quickR"), nil,"swap"),
|
quickR= newSwitch(580,430,35,SETdisp("quickR"), SETrev("quickR"), nil,"swap"),
|
||||||
swap= newSwitch(560,510,20,SETdisp("swap"), SETrev("swap"), nil,"fine"),
|
swap= newSwitch(580,510,20,SETdisp("swap"), SETrev("swap"), nil,"fine"),
|
||||||
fine= newSwitch(560,590,20,SETdisp("fine"), SETrev("fine"), nil,"ctrl"),
|
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"),
|
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"),
|
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"),
|
back= newButton(1160,600,160,160,C.white,50,scene.back,nil,"graphic"),
|
||||||
},
|
},
|
||||||
setting_graphic={
|
setting_graphic={
|
||||||
sound= newButton(200,80,240,80,C.lightGreen,35,function()scene.swapTo("setting_sound")end, nil,"game"),
|
sound= newButton(200,80,240,80,C.lightCyan,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"),
|
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"),
|
ghost= newSwitch(310,180,35,SETdisp("ghost"), SETrev("ghost"), nil,"center"),
|
||||||
center= newSwitch(580,180,35,SETdisp("center"), SETrev("center"), nil,"smo"),
|
center= newSwitch(580,180,35,SETdisp("center"), SETrev("center"), nil,"smo"),
|
||||||
smo= newSwitch(310,260,25,SETdisp("smo"), SETrev("smo"), nil,"grid"),
|
smo= newSwitch(310,260,25,SETdisp("smo"), SETrev("smo"), nil,"grid"),
|
||||||
@@ -479,8 +484,8 @@ Widget={
|
|||||||
back= newButton(1160,600,160,160,C.white,50,scene.back,nil,"sound"),
|
back= newButton(1160,600,160,160,C.white,50,scene.back,nil,"sound"),
|
||||||
},
|
},
|
||||||
setting_sound={
|
setting_sound={
|
||||||
game= newButton(200,80,240,80,C.lightGreen,35,function()scene.swapTo("setting_game")end, nil,"graphic"),
|
game= newButton(200,80,240,80,C.lightCyan,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"),
|
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"),
|
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"),
|
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"),
|
vib= newSlider(180,440,400,5 ,35,function()VIB(1)end, SETdisp("vib"), SETsto("vib"), nil,"voc"),
|
||||||
@@ -492,74 +497,72 @@ Widget={
|
|||||||
back=newButton(1140,650,200,80,C.white,45,scene.back),
|
back=newButton(1140,650,200,80,C.white,45,scene.back),
|
||||||
},
|
},
|
||||||
setting_touch={
|
setting_touch={
|
||||||
hide= newSwitch(810,140,40,SETdisp("VKSwitch"),SETrev("VKSwitch")),
|
default=newButton(520,80,170,80,C.white,35,function()
|
||||||
track= newSwitch(810,220,40,SETdisp("VKTrack"),SETrev("VKTrack")),
|
local D=virtualkeySet[sceneTemp.default]
|
||||||
tkset= newButton(450,220,170,80,C.white,25,function()
|
for i=1,#VK_org do
|
||||||
scene.push()
|
VK_org[i].ava=false
|
||||||
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
|
|
||||||
end
|
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),
|
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.push()
|
||||||
scene.swapTo("setting_touchSwitch")
|
scene.swapTo("setting_touchSwitch")
|
||||||
end),
|
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={
|
setting_touchSwitch={
|
||||||
b1= newSwitch(300,80, 35,VKAdisp(1),VKAcode(1)),
|
b1= newSwitch(280,80, 35,VKAdisp(1),VKAcode(1)),
|
||||||
b2= newSwitch(300,140, 35,VKAdisp(2),VKAcode(2)),
|
b2= newSwitch(280,140, 35,VKAdisp(2),VKAcode(2)),
|
||||||
b3= newSwitch(300,200, 35,VKAdisp(3),VKAcode(3)),
|
b3= newSwitch(280,200, 35,VKAdisp(3),VKAcode(3)),
|
||||||
b4= newSwitch(300,260, 35,VKAdisp(4),VKAcode(4)),
|
b4= newSwitch(280,260, 35,VKAdisp(4),VKAcode(4)),
|
||||||
b5= newSwitch(300,320, 35,VKAdisp(5),VKAcode(5)),
|
b5= newSwitch(280,320, 35,VKAdisp(5),VKAcode(5)),
|
||||||
b6= newSwitch(300,380, 35,VKAdisp(6),VKAcode(6)),
|
b6= newSwitch(280,380, 35,VKAdisp(6),VKAcode(6)),
|
||||||
b7= newSwitch(300,440, 35,VKAdisp(7),VKAcode(7)),
|
b7= newSwitch(280,440, 35,VKAdisp(7),VKAcode(7)),
|
||||||
b8= newSwitch(300,500, 35,VKAdisp(8),VKAcode(8)),
|
b8= newSwitch(280,500, 35,VKAdisp(8),VKAcode(8)),
|
||||||
b9= newSwitch(300,560, 35,VKAdisp(9),VKAcode(9)),
|
b9= newSwitch(280,560, 35,VKAdisp(9),VKAcode(9)),
|
||||||
b10= newSwitch(300,620, 35,VKAdisp(10),VKAcode(10)),
|
b10= newSwitch(280,620, 35,VKAdisp(10),VKAcode(10)),
|
||||||
b11= newSwitch(760,80, 35,VKAdisp(11),VKAcode(11)),
|
b11= newSwitch(620,80, 35,VKAdisp(11),VKAcode(11)),
|
||||||
b12= newSwitch(760,140, 35,VKAdisp(12),VKAcode(12)),
|
b12= newSwitch(620,140, 35,VKAdisp(12),VKAcode(12)),
|
||||||
b13= newSwitch(760,200, 35,VKAdisp(13),VKAcode(13)),
|
b13= newSwitch(620,200, 35,VKAdisp(13),VKAcode(13)),
|
||||||
b14= newSwitch(760,260, 35,VKAdisp(14),VKAcode(14)),
|
b14= newSwitch(620,260, 35,VKAdisp(14),VKAcode(14)),
|
||||||
b15= newSwitch(760,320, 35,VKAdisp(15),VKAcode(15)),
|
b15= newSwitch(620,320, 35,VKAdisp(15),VKAcode(15)),
|
||||||
b16= newSwitch(760,380, 35,VKAdisp(16),VKAcode(16)),
|
b16= newSwitch(620,380, 35,VKAdisp(16),VKAcode(16)),
|
||||||
b17= newSwitch(760,440, 35,VKAdisp(17),VKAcode(17)),
|
b17= newSwitch(620,440, 35,VKAdisp(17),VKAcode(17)),
|
||||||
b18= newSwitch(760,500, 35,VKAdisp(18),VKAcode(18)),
|
b18= newSwitch(620,500, 35,VKAdisp(18),VKAcode(18)),
|
||||||
b19= newSwitch(760,560, 35,VKAdisp(19),VKAcode(19)),
|
b19= newSwitch(620,560, 35,VKAdisp(19),VKAcode(19)),
|
||||||
b20= newSwitch(760,620, 35,VKAdisp(20),VKAcode(20)),
|
b20= newSwitch(620,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),
|
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(1080,300,240,80,C.white,35,function()for i=1,20 do VK_org[i].ava=true end end),
|
pro= newButton(1120,100,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),
|
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={
|
setting_trackSetting={
|
||||||
VKDodge=newSwitch(400,200, 35,SETdisp("VKDodge"),SETrev("VKDodge")),
|
VKDodge=newSwitch(400,200, 35,SETdisp("VKDodge"),SETrev("VKDodge")),
|
||||||
@@ -573,8 +576,8 @@ Widget={
|
|||||||
back= newButton(640, 600,180,60,C.white,35,scene.back,nil,"qq"),
|
back= newButton(640, 600,180,60,C.white,35,scene.back,nil,"qq"),
|
||||||
},
|
},
|
||||||
history={
|
history={
|
||||||
prev= newButton(1155,170,180,180,C.white,65,pressKey("up"),function()return sel==1 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 sel==#updateLog-22 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),
|
back= newButton(1155,600,180,90,C.white,35,scene.back),
|
||||||
},
|
},
|
||||||
stat={
|
stat={
|
||||||
|
|||||||
347
main.lua
347
main.lua
@@ -1,7 +1,6 @@
|
|||||||
--[[
|
--[[
|
||||||
第一次搞这么大的工程~参考价值不是很大
|
第一次搞这么大的工程,参考价值不是很大
|
||||||
如果你有时间并且也热爱俄罗斯方块的话,来看代码或者帮助优化的话当然欢迎!
|
如果你有时间并且也热爱俄罗斯方块的话,来看代码或者帮助优化的话欢迎!
|
||||||
(顺便,无授权直接盗代码的先死个妈)
|
|
||||||
]]
|
]]
|
||||||
local love=love
|
local love=love
|
||||||
local ms,kb,tc=love.mouse,love.keyboard,love.touch
|
local ms,kb,tc=love.mouse,love.keyboard,love.touch
|
||||||
@@ -71,6 +70,7 @@ require("light")
|
|||||||
local Tmr=require("timer")
|
local Tmr=require("timer")
|
||||||
local Pnt=require("paint")
|
local Pnt=require("paint")
|
||||||
require("player")
|
require("player")
|
||||||
|
require("shader")
|
||||||
--Modules
|
--Modules
|
||||||
-------------------------------------------------------------
|
-------------------------------------------------------------
|
||||||
local powerInfoCanvas,updatePowerInfo
|
local powerInfoCanvas,updatePowerInfo
|
||||||
@@ -83,12 +83,11 @@ if sys.getPowerInfo()~="unknown"then
|
|||||||
gc.clear(0,0,0,.25)
|
gc.clear(0,0,0,.25)
|
||||||
gc.setLineWidth(4)
|
gc.setLineWidth(4)
|
||||||
local charging=state=="charging"
|
local charging=state=="charging"
|
||||||
gc.setColor(1,1,1)
|
|
||||||
if state=="nobattery"then
|
if state=="nobattery"then
|
||||||
|
gc.setColor(1,1,1)
|
||||||
gc.setLineWidth(2)
|
gc.setLineWidth(2)
|
||||||
gc.line(74,5,99,22)
|
gc.line(74,5,100,22)
|
||||||
end
|
else
|
||||||
if pow<100 then
|
|
||||||
if charging then gc.setColor(0,1,0)
|
if charging then gc.setColor(0,1,0)
|
||||||
elseif pow>50 then gc.setColor(1,1,1)
|
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,1,0)
|
||||||
@@ -96,16 +95,18 @@ if sys.getPowerInfo()~="unknown"then
|
|||||||
else gc.setColor(.5,0,1)
|
else gc.setColor(.5,0,1)
|
||||||
end
|
end
|
||||||
gc.rectangle("fill",76,6,pow*.22,14)
|
gc.rectangle("fill",76,6,pow*.22,14)
|
||||||
setFont(14)
|
if pow<100 then
|
||||||
gc.setColor(0,0,0)
|
setFont(14)
|
||||||
gc.print(pow,77,2)
|
gc.setColor(0,0,0)
|
||||||
gc.print(pow,77,4)
|
gc.print(pow,77,2)
|
||||||
gc.print(pow,79,2)
|
gc.print(pow,77,4)
|
||||||
gc.print(pow,79,4)
|
gc.print(pow,79,2)
|
||||||
gc.setColor(1,1,1)
|
gc.print(pow,79,4)
|
||||||
gc.draw(batteryImage,73,3)
|
gc.setColor(1,1,1)
|
||||||
gc.print(pow,78,3)
|
gc.print(pow,78,3)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
gc.draw(batteryImage,73,3)
|
||||||
setFont(25)
|
setFont(25)
|
||||||
gc.print(os.date("%H:%M",os.time()),3,-5)
|
gc.print(os.date("%H:%M",os.time()),3,-5)
|
||||||
gc.pop()gc.setCanvas()
|
gc.pop()gc.setCanvas()
|
||||||
@@ -119,13 +120,14 @@ local function getNewBlock()
|
|||||||
t.bn,t.size=FX_BGblock.next,2+3*rnd()
|
t.bn,t.size=FX_BGblock.next,2+3*rnd()
|
||||||
t.b=blocks[t.bn][rnd(0,3)]
|
t.b=blocks[t.bn][rnd(0,3)]
|
||||||
t.x=rnd(-#t.b[1]*t.size*30+100,1180)
|
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())
|
t.v=t.size*(1+rnd())
|
||||||
FX_BGblock.next=FX_BGblock.next%7+1
|
FX_BGblock.next=FX_BGblock.next%7+1
|
||||||
return t
|
return t
|
||||||
end
|
end
|
||||||
local function onVirtualkey(x,y)
|
local function onVirtualkey(x,y)
|
||||||
local dist,nearest=1e15
|
local dist,nearest=1e10
|
||||||
for K=1,#virtualkey do
|
for K=1,#virtualkey do
|
||||||
local b=virtualkey[K]
|
local b=virtualkey[K]
|
||||||
if b.ava then
|
if b.ava then
|
||||||
@@ -139,6 +141,21 @@ local function onVirtualkey(x,y)
|
|||||||
end
|
end
|
||||||
return nearest
|
return nearest
|
||||||
end
|
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 floatWheel=0
|
||||||
local function wheelScroll(y)
|
local function wheelScroll(y)
|
||||||
@@ -229,12 +246,12 @@ function wheelmoved.music(x,y)
|
|||||||
end
|
end
|
||||||
function keyDown.music(key)
|
function keyDown.music(key)
|
||||||
if key=="down"then
|
if key=="down"then
|
||||||
sel=sel%#musicID+1
|
sceneTemp=sceneTemp%#musicID+1
|
||||||
elseif key=="up"then
|
elseif key=="up"then
|
||||||
sel=(sel-2)%#musicID+1
|
sceneTemp=(sceneTemp-2)%#musicID+1
|
||||||
elseif key=="return"or key=="space"then
|
elseif key=="return"or key=="space"then
|
||||||
if bgmPlaying~=musicID[sel]then
|
if bgmPlaying~=musicID[sceneTemp]then
|
||||||
BGM(musicID[sel])
|
BGM(musicID[sceneTemp])
|
||||||
else
|
else
|
||||||
BGM()
|
BGM()
|
||||||
end
|
end
|
||||||
@@ -244,6 +261,7 @@ function keyDown.music(key)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function keyDown.custom(key)
|
function keyDown.custom(key)
|
||||||
|
local sel=sceneTemp
|
||||||
if key=="left"then
|
if key=="left"then
|
||||||
customSel[sel]=(customSel[sel]-2)%#customRange[customID[sel]]+1
|
customSel[sel]=(customSel[sel]-2)%#customRange[customID[sel]]+1
|
||||||
if sel==12 then
|
if sel==12 then
|
||||||
@@ -259,9 +277,9 @@ function keyDown.custom(key)
|
|||||||
BGM(customRange.bgm[customSel[sel]])
|
BGM(customRange.bgm[customSel[sel]])
|
||||||
end
|
end
|
||||||
elseif key=="down"then
|
elseif key=="down"then
|
||||||
sel=sel%#customID+1
|
sceneTemp=sel%#customID+1
|
||||||
elseif key=="up"then
|
elseif key=="up"then
|
||||||
sel=(sel-2)%#customID+1
|
sceneTemp=(sel-2)%#customID+1
|
||||||
elseif key=="d"then
|
elseif key=="d"then
|
||||||
scene.push()
|
scene.push()
|
||||||
scene.swapTo("draw")
|
scene.swapTo("draw")
|
||||||
@@ -288,14 +306,16 @@ function mouseDown.draw(x,y,k)
|
|||||||
mouseMove.draw(x,y)
|
mouseMove.draw(x,y)
|
||||||
end
|
end
|
||||||
function mouseMove.draw(x,y,dx,dy)
|
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 sx<1 or sx>10 then sx=nil end
|
||||||
if sy<1 or sy>20 then sy=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
|
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
|
||||||
end
|
end
|
||||||
function wheelmoved.draw(x,y)
|
function wheelmoved.draw(x,y)
|
||||||
|
local pen=sceneTemp.pen
|
||||||
if y<0 then
|
if y<0 then
|
||||||
pen=pen+1
|
pen=pen+1
|
||||||
if pen==8 then pen=9 elseif pen==14 then pen=0 end
|
if pen==8 then pen=9 elseif pen==14 then pen=0 end
|
||||||
@@ -303,16 +323,18 @@ function wheelmoved.draw(x,y)
|
|||||||
pen=pen-1
|
pen=pen-1
|
||||||
if pen==8 then pen=7 elseif pen==-1 then pen=13 end
|
if pen==8 then pen=7 elseif pen==-1 then pen=13 end
|
||||||
end
|
end
|
||||||
|
sceneTemp.pen=pen
|
||||||
end
|
end
|
||||||
function touchDown.draw(id,x,y)
|
function touchDown.draw(id,x,y)
|
||||||
mouseMove.draw(x,y)
|
mouseMove.draw(x,y)
|
||||||
end
|
end
|
||||||
function touchMove.draw(id,x,y,dx,dy)
|
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 sx<1 or sx>10 then sx=nil end
|
||||||
if sy<1 or sy>20 then sy=nil end
|
if sy<1 or sy>20 then sy=nil end
|
||||||
|
sceneTemp.x,sceneTemp.y=sx,sy
|
||||||
if sx and sy then
|
if sx and sy then
|
||||||
preField[sy][sx]=pen
|
preField[sy][sx]=sceneTemp.pen
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local penKey={
|
local penKey={
|
||||||
@@ -324,12 +346,13 @@ local penKey={
|
|||||||
lshift=-1, lalt=-1,
|
lshift=-1, lalt=-1,
|
||||||
}
|
}
|
||||||
function keyDown.draw(key)
|
function keyDown.draw(key)
|
||||||
|
local sx,sy,pen=sceneTemp.x,sceneTemp.y,sceneTemp.pen
|
||||||
if key=="delete"then
|
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
|
for y=1,20 do for x=1,10 do preField[y][x]=0 end end
|
||||||
clearSureTime=0
|
sceneTemp.sure=0
|
||||||
else
|
else
|
||||||
clearSureTime=50
|
sceneTemp.sure=50
|
||||||
end
|
end
|
||||||
elseif key=="up"or key=="down"or key=="left"or key=="right"then
|
elseif key=="up"or key=="down"or key=="left"or key=="right"then
|
||||||
if not sx then sx=1 end
|
if not sx then sx=1 end
|
||||||
@@ -351,17 +374,33 @@ function keyDown.draw(key)
|
|||||||
else
|
else
|
||||||
pen=penKey[key]or pen
|
pen=penKey[key]or pen
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
function keyDown.setting_key(key)
|
function keyDown.setting_key(key)
|
||||||
|
local s=sceneTemp
|
||||||
if key=="escape"then
|
if key=="escape"then
|
||||||
if keyboardSetting then
|
if s.kS then
|
||||||
keyboardSetting=false
|
s.kS=false
|
||||||
SFX("error",.5)
|
SFX("error",.5)
|
||||||
else
|
else
|
||||||
scene.back()
|
scene.back()
|
||||||
end
|
end
|
||||||
elseif keyboardSetting then
|
elseif s.kS then
|
||||||
for l=1,8 do
|
for l=1,8 do
|
||||||
for y=1,20 do
|
for y=1,20 do
|
||||||
if setting.keyMap[l][y]==key then
|
if setting.keyMap[l][y]==key then
|
||||||
@@ -369,43 +408,44 @@ function keyDown.setting_key(key)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
setting.keyMap[curBoard][keyboardSet]=key
|
setting.keyMap[s.board][s.kb]=key
|
||||||
SFX("reach",.5)
|
SFX("reach",.5)
|
||||||
keyboardSetting=false
|
s.kS=false
|
||||||
elseif key=="return"then
|
elseif key=="return"then
|
||||||
keyboardSetting=true
|
s.kS=true
|
||||||
SFX("lock",.5)
|
SFX("lock",.5)
|
||||||
elseif key=="up"then
|
elseif key=="up"then
|
||||||
if keyboardSet>1 then
|
if s.kb>1 then
|
||||||
keyboardSet=keyboardSet-1
|
s.kb=s.kb-1
|
||||||
SFX("move",.5)
|
SFX("move",.5)
|
||||||
end
|
end
|
||||||
elseif key=="down"then
|
elseif key=="down"then
|
||||||
if keyboardSet<20 then
|
if s.kb<20 then
|
||||||
keyboardSet=keyboardSet+1
|
s.kb=s.kb+1
|
||||||
SFX("move",.5)
|
SFX("move",.5)
|
||||||
end
|
end
|
||||||
elseif key=="left"then
|
elseif key=="left"then
|
||||||
if curBoard>1 then
|
if s.board>1 then
|
||||||
curBoard=curBoard-1
|
s.board=s.board-1
|
||||||
SFX("rotate",.5)
|
SFX("rotate",.5)
|
||||||
end
|
end
|
||||||
elseif key=="right"then
|
elseif key=="right"then
|
||||||
if curBoard<8 then
|
if s.board<8 then
|
||||||
curBoard=curBoard+1
|
s.board=s.board+1
|
||||||
SFX("rotate",.5)
|
SFX("rotate",.5)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function gamepadDown.setting_key(key)
|
function gamepadDown.setting_key(key)
|
||||||
|
local s=sceneTemp
|
||||||
if key=="back"then
|
if key=="back"then
|
||||||
if joystickSetting then
|
if s.jS then
|
||||||
joystickSetting=false
|
s.jS=false
|
||||||
SFX("error",.5)
|
SFX("error",.5)
|
||||||
else
|
else
|
||||||
scene.back()
|
scene.back()
|
||||||
end
|
end
|
||||||
elseif joystickSetting then
|
elseif s.jS then
|
||||||
for l=9,16 do
|
for l=9,16 do
|
||||||
for y=1,20 do
|
for y=1,20 do
|
||||||
if setting.keyMap[l][y]==key then
|
if setting.keyMap[l][y]==key then
|
||||||
@@ -413,30 +453,30 @@ function gamepadDown.setting_key(key)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
setting.keyMap[8+curBoard][joystickSet]=key
|
setting.keyMap[8+s.board][s.js]=key
|
||||||
SFX("reach",.5)
|
SFX("reach",.5)
|
||||||
joystickSetting=false
|
s.jS=false
|
||||||
elseif key=="start"then
|
elseif key=="start"then
|
||||||
joystickSetting=true
|
s.jS=true
|
||||||
SFX("lock",.5)
|
SFX("lock",.5)
|
||||||
elseif key=="up"then
|
elseif key=="up"then
|
||||||
if joystickSet>1 then
|
if s.js>1 then
|
||||||
joystickSet=joystickSet-1
|
s.js=s.js-1
|
||||||
SFX("move",.5)
|
SFX("move",.5)
|
||||||
end
|
end
|
||||||
elseif key=="down"then
|
elseif key=="down"then
|
||||||
if joystickSet<20 then
|
if s.js<20 then
|
||||||
joystickSet=joystickSet+1
|
s.js=s.js+1
|
||||||
SFX("move",.5)
|
SFX("move",.5)
|
||||||
end
|
end
|
||||||
elseif key=="left"then
|
elseif key=="left"then
|
||||||
if curBoard>1 then
|
if s.board>1 then
|
||||||
curBoard=curBoard-1
|
s.board=s.board-1
|
||||||
SFX("rotate",.5)
|
SFX("rotate",.5)
|
||||||
end
|
end
|
||||||
elseif key=="right"then
|
elseif key=="right"then
|
||||||
if curBoard<8 then
|
if s.board<8 then
|
||||||
curBoard=curBoard+1
|
s.board=s.board+1
|
||||||
SFX("rotate",.5)
|
SFX("rotate",.5)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -444,47 +484,34 @@ end
|
|||||||
|
|
||||||
function mouseDown.setting_touch(x,y,k)
|
function mouseDown.setting_touch(x,y,k)
|
||||||
if k==2 then scene.back()end
|
if k==2 then scene.back()end
|
||||||
for K=1,#VK_org do
|
sceneTemp.sel=onVK_org(x,y)or sceneTemp.sel
|
||||||
local B=VK_org[K]
|
|
||||||
if (x-B.x)^2+(y-B.y)^2<B.r^2 then
|
|
||||||
sel=K
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
function mouseMove.setting_touch(x,y,dx,dy)
|
function mouseMove.setting_touch(x,y,dx,dy)
|
||||||
if sel and ms.isDown(1)then
|
if sceneTemp.sel and ms.isDown(1)and not widget_sel then
|
||||||
local B=VK_org[sel]
|
local B=VK_org[sceneTemp.sel]
|
||||||
B.x,B.y=B.x+dx,B.y+dy
|
B.x,B.y=B.x+dx,B.y+dy
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function mouseUp.setting_touch(x,y,k)
|
function mouseUp.setting_touch(x,y,k)
|
||||||
if sel then
|
if sceneTemp.sel then
|
||||||
local B=VK_org[sel]
|
local B=VK_org[sceneTemp.sel]
|
||||||
local k=snapLevelValue[snapLevel]
|
local k=snapLevelValue[sceneTemp.snap]
|
||||||
B.x,B.y=int(B.x/k+.5)*k,int(B.y/k+.5)*k
|
B.x,B.y=int(B.x/k+.5)*k,int(B.y/k+.5)*k
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function touchDown.setting_touch(id,x,y)
|
function touchDown.setting_touch(id,x,y)
|
||||||
for K=1,#VK_org do
|
sceneTemp.sel=onVK_org(x,y)or sceneTemp.sel
|
||||||
local B=VK_org[K]
|
|
||||||
if (x-B.x)^2+(y-B.y)^2<B.r^2 then
|
|
||||||
sel=K
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
function touchUp.setting_touch(id,x,y)
|
function touchUp.setting_touch(id,x,y)
|
||||||
if sel then
|
if sceneTemp.sel then
|
||||||
x,y=xOy:inverseTransformPoint(x,y)
|
local B=VK_org[sceneTemp.sel]
|
||||||
if sel then
|
local k=snapLevelValue[sceneTemp.snap]
|
||||||
local B=VK_org[sel]
|
B.x,B.y=int(B.x/k+.5)*k,int(B.y/k+.5)*k
|
||||||
local k=snapLevelValue[snapLevel]
|
|
||||||
B.x,B.y=int(B.x/k+.5)*k,int(B.y/k+.5)*k
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function touchMove.setting_touch(id,x,y,dx,dy)
|
function touchMove.setting_touch(id,x,y,dx,dy)
|
||||||
if sel then
|
if sceneTemp.sel and not widget_sel then
|
||||||
local B=VK_org[sel]
|
local B=VK_org[sceneTemp.sel]
|
||||||
B.x,B.y=B.x+dx,B.y+dy
|
B.x,B.y=B.x+dx,B.y+dy
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -556,7 +583,8 @@ function touchMove.play(id,x,y,dx,dy)
|
|||||||
end
|
end
|
||||||
function keyDown.play(key)
|
function keyDown.play(key)
|
||||||
if key=="escape"and not scene.swapping then
|
if key=="escape"and not scene.swapping then
|
||||||
return(frame<180 and back or pauseGame)()
|
(frame<180 and back or pauseGame)()
|
||||||
|
return
|
||||||
end
|
end
|
||||||
local m=setting.keyMap
|
local m=setting.keyMap
|
||||||
for p=1,players.human do
|
for p=1,players.human do
|
||||||
@@ -608,9 +636,9 @@ function wheelmoved.history(x,y)
|
|||||||
end
|
end
|
||||||
function keyDown.history(key)
|
function keyDown.history(key)
|
||||||
if key=="up"then
|
if key=="up"then
|
||||||
sel=max(sel-5,1)
|
sceneTemp=max(sceneTemp-10,1)
|
||||||
elseif key=="down"then
|
elseif key=="down"then
|
||||||
sel=min(sel+5,#updateLog-22)
|
sceneTemp=min(sceneTemp+10,#updateLog-22)
|
||||||
elseif key=="escape"then
|
elseif key=="escape"then
|
||||||
scene.back()
|
scene.back()
|
||||||
end
|
end
|
||||||
@@ -624,24 +652,21 @@ local function widgetPress(W,x,y)
|
|||||||
VOICE("nya")
|
VOICE("nya")
|
||||||
elseif W.type=="switch"then
|
elseif W.type=="switch"then
|
||||||
W.code()
|
W.code()
|
||||||
W:FX()
|
|
||||||
SFX("move",.6)
|
SFX("move",.6)
|
||||||
elseif W.type=="slider"then
|
elseif W.type=="slider"then
|
||||||
if not x then return end
|
if not x then return end
|
||||||
local p=W.disp()
|
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)
|
||||||
W.code(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
|
||||||
if p==W.disp()then return end
|
W.code(P)
|
||||||
W:FX(p)
|
|
||||||
if W.change then W.change()end
|
if W.change then W.change()end
|
||||||
end
|
end
|
||||||
if W.hide and W.hide()then widget_sel=nil end
|
if W.hide and W.hide()then widget_sel=nil end
|
||||||
end
|
end
|
||||||
local function widgetDrag(W,x,y,dx,dy)
|
local function widgetDrag(W,x,y,dx,dy)
|
||||||
if W.type=="slider"then
|
if W.type=="slider"then
|
||||||
local p=W.disp()
|
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)
|
||||||
W.code(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
|
||||||
if p==W.disp()then return end
|
W.code(P)
|
||||||
W:FX(p)
|
|
||||||
if W.change then W.change()end
|
if W.change then W.change()end
|
||||||
elseif not W:isAbove(x,y)then
|
elseif not W:isAbove(x,y)then
|
||||||
widget_sel=nil
|
widget_sel=nil
|
||||||
@@ -658,18 +683,14 @@ local function widgetControl_key(i)
|
|||||||
if not scene.swapping and widget_sel then
|
if not scene.swapping and widget_sel then
|
||||||
widgetPress(widget_sel)
|
widgetPress(widget_sel)
|
||||||
end
|
end
|
||||||
else
|
elseif i=="left"or i=="right"then
|
||||||
if widget_sel then
|
if widget_sel then
|
||||||
local W=widget_sel
|
local W=widget_sel
|
||||||
if W.type=="slider"then
|
if W.type=="slider"then
|
||||||
local p=W.disp()
|
local p=W.disp()
|
||||||
if i=="left"then
|
local P=i=="left"and(p>0 and p-1)or p<W.unit and p+1
|
||||||
if W.disp()>0 then W.code(W.disp()-1)end
|
if p==P or not P then return end
|
||||||
elseif i=="right"then
|
W.code(P)
|
||||||
if W.disp()<W.unit then W.code(W.disp()+1)end
|
|
||||||
end
|
|
||||||
if p==W.disp()then return end
|
|
||||||
W:FX(p)
|
|
||||||
if W.change then W.change()end
|
if W.change then W.change()end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -684,18 +705,19 @@ local function widgetControl_gamepad(i)
|
|||||||
end
|
end
|
||||||
elseif i=="start"then
|
elseif i=="start"then
|
||||||
if not scene.swapping and widget_sel then
|
if not scene.swapping and widget_sel then
|
||||||
|
if not scene.swapping and widget_sel then
|
||||||
|
widgetPress(widget_sel)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
elseif i=="dpleft"or i=="dpright"then
|
||||||
|
if widget_sel then
|
||||||
local W=widget_sel
|
local W=widget_sel
|
||||||
if W.hide and W.hide()then widget_sel=nil end
|
if W.type=="slider"then
|
||||||
if W.type=="button"then
|
local p=W.disp()
|
||||||
W.code()
|
local P=i=="left"and(p>0 and p-1)or p<W.unit and p+1
|
||||||
W:FX()
|
if p==P or not P then return end
|
||||||
SFX("button")
|
W.code(P)
|
||||||
VOICE("nya")
|
if W.change then W.change()end
|
||||||
elseif W.type=="switch"then
|
|
||||||
W.code()
|
|
||||||
W:FX()
|
|
||||||
SFX("move",.6)
|
|
||||||
-- elseif W.type=="slider"then
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -892,8 +914,9 @@ function love.update(dt)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
for i=#FX_BGblock,1,-1 do
|
for i=#FX_BGblock,1,-1 do
|
||||||
FX_BGblock[i].y=FX_BGblock[i].y+FX_BGblock[i].v
|
local B=FX_BGblock[i]
|
||||||
if FX_BGblock[i].y>720 then rem(FX_BGblock,i)end
|
B.y=B.y+B.v
|
||||||
|
if B.y>B.ty then rem(FX_BGblock,i)end
|
||||||
end
|
end
|
||||||
if setting.bgblock then
|
if setting.bgblock then
|
||||||
FX_BGblock.tm=FX_BGblock.tm-1
|
FX_BGblock.tm=FX_BGblock.tm-1
|
||||||
@@ -929,44 +952,68 @@ function love.update(dt)
|
|||||||
scene.swapping=false
|
scene.swapping=false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if Tmr[scene.cur]then
|
local i=Tmr[scene.cur]
|
||||||
Tmr[scene.cur](dt)
|
if i then i(dt)end
|
||||||
end
|
|
||||||
for i=#Task,1,-1 do
|
for i=#Task,1,-1 do
|
||||||
local T=Task[i]
|
local T=Task[i]
|
||||||
if T.code(T.P,T.data)then
|
if T.code(T.P,T.data)then
|
||||||
rem(Task,i)
|
for i=i,#Task do
|
||||||
end
|
Task[i]=Task[i+1]
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
for i=1,#voiceQueue do
|
for i=#voiceQueue,1,-1 do
|
||||||
local Q=voiceQueue[i]
|
local Q=voiceQueue[i]
|
||||||
if #Q>0 then
|
if Q.s==0 then--闲置轨,自动删除多余
|
||||||
if type(Q[1])=="userdata"then
|
if i>3 then
|
||||||
if not Q[1]:isPlaying()then
|
local _=voiceQueue
|
||||||
for i=1,#Q do
|
for i=i,#_ do
|
||||||
Q[i]=Q[i+1]
|
_[i]=_[i+1]
|
||||||
end
|
|
||||||
end--放完了,pop出下一个
|
|
||||||
else
|
|
||||||
local n=1
|
|
||||||
local L=voiceBank[Q[1]]
|
|
||||||
while L[n]:isPlaying()do
|
|
||||||
n=n+1
|
|
||||||
if not L[n]then
|
|
||||||
L[n]=L[n-1]:clone()
|
|
||||||
L[n]:seek(0)
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
Q[1]=L[n]
|
end
|
||||||
Q[1]:setVolume(setting.voc*.1)
|
elseif Q.s==1 then--等待转换
|
||||||
Q[1]:play()
|
Q[1]=getVoice(Q[1])
|
||||||
--load voice with string
|
Q[1]:setVolume(setting.voc*.1)
|
||||||
|
Q[1]:play()
|
||||||
|
Q.s=Q[2]and 2 or 4
|
||||||
|
elseif Q.s==2 then--播放1,等待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同时播放
|
||||||
|
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--最后播放
|
||||||
|
if not Q[1]:isPlaying()then
|
||||||
|
Q[1]=nil
|
||||||
|
Q.s=0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if #Q>0 then
|
||||||
|
if Q[1]:isPlaying()then
|
||||||
|
if Q[2]and type(Q[2])=="string"and Q[1]:getDuration()-Q[1]:tell()<.08 then
|
||||||
|
Q[2]=getVoice(Q[2])
|
||||||
|
end
|
||||||
|
--快放完了,播放下一个
|
||||||
|
else
|
||||||
|
for i=1,#Q do
|
||||||
|
Q[i]=Q[i+1]
|
||||||
|
end
|
||||||
|
--放完了,移除
|
||||||
|
end
|
||||||
|
else
|
||||||
|
end
|
||||||
end
|
end
|
||||||
-- for k,W in next,Widget[scene.cur]do
|
for k,W in next,Widget[scene.cur]do
|
||||||
-- end--更新控件
|
W:update()
|
||||||
|
end--更新控件
|
||||||
end
|
end
|
||||||
local scs={1,2,1,2,1,2,1,2,1,2,1.5,1.5,.5,2.5}
|
local scs={1,2,1,2,1,2,1,2,1,2,1.5,1.5,.5,2.5}
|
||||||
local FPS=love.timer.getFPS
|
local FPS=love.timer.getFPS
|
||||||
@@ -979,7 +1026,7 @@ function love.draw()
|
|||||||
local size=FX_BGblock[n].size
|
local size=FX_BGblock[n].size
|
||||||
for i=1,#b do for j=1,#b[1]do
|
for i=1,#b do for j=1,#b[1]do
|
||||||
if b[i][j]then
|
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
|
end end
|
||||||
end--Draw BG falling blocks
|
end--Draw BG falling blocks
|
||||||
@@ -1041,7 +1088,6 @@ function love.draw()
|
|||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
gc.print(FPS(),5,700)
|
gc.print(FPS(),5,700)
|
||||||
if devMode>0 then
|
if devMode>0 then
|
||||||
love.timer.sleep(.2)
|
|
||||||
gc.setColor(1,devMode==2 and .5 or 1,1)
|
gc.setColor(1,devMode==2 and .5 or 1,1)
|
||||||
gc.print("Tasks:"..#Task,5,600)
|
gc.print("Tasks:"..#Task,5,600)
|
||||||
gc.print("Voices:"..#voiceQueue,5,620)
|
gc.print("Voices:"..#voiceQueue,5,620)
|
||||||
@@ -1080,6 +1126,9 @@ function love.run()
|
|||||||
gc.present()
|
gc.present()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if Timer()-lastFrame<.058 then
|
||||||
|
T.sleep(.01)
|
||||||
|
end
|
||||||
while Timer()-lastFrame<.0158 do
|
while Timer()-lastFrame<.0158 do
|
||||||
T.sleep(.001)
|
T.sleep(.001)
|
||||||
end
|
end
|
||||||
|
|||||||
76
paint.lua
76
paint.lua
@@ -115,7 +115,7 @@ local function VirtualkeyPreview()
|
|||||||
for i=1,#VK_org do
|
for i=1,#VK_org do
|
||||||
local B=VK_org[i]
|
local B=VK_org[i]
|
||||||
if B.ava then
|
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.setColor(c,1,c,setting.VKAlpha*.1)
|
||||||
gc.setLineWidth(B.r*.07)
|
gc.setLineWidth(B.r*.07)
|
||||||
gc.circle("line",B.x,B.y,B.r)
|
gc.circle("line",B.x,B.y,B.r)
|
||||||
@@ -235,14 +235,17 @@ function Pnt.load()
|
|||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
gc.rectangle("line",300,330,680,60,5)
|
gc.rectangle("line",300,330,680,60,5)
|
||||||
setFont(35)
|
setFont(35)
|
||||||
mStr(text.load[L[1]],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)
|
setFont(25)
|
||||||
mStr(L[4],640,400)
|
mStr(L[4],640,400)
|
||||||
end
|
end
|
||||||
function Pnt.intro()
|
function Pnt.intro()
|
||||||
gc.stencil(stencil_miniTitle,"replace",1)
|
gc.stencil(stencil_miniTitle,"replace",1)
|
||||||
gc.setStencilTest("equal",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.push("transform")
|
||||||
gc.translate(250,150)
|
gc.translate(250,150)
|
||||||
gc.scale(30)
|
gc.scale(30)
|
||||||
@@ -251,7 +254,7 @@ function Pnt.intro()
|
|||||||
gc.setColor(1,1,1,.06)
|
gc.setColor(1,1,1,.06)
|
||||||
for i=41,5,-2 do
|
for i=41,5,-2 do
|
||||||
gc.setLineWidth(i)
|
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
|
end
|
||||||
gc.setStencilTest()
|
gc.setStencilTest()
|
||||||
end
|
end
|
||||||
@@ -273,10 +276,11 @@ function Pnt.mode()
|
|||||||
setFont(35)
|
setFont(35)
|
||||||
local lv=modes[modeID[modeSel]].level[levelSel]
|
local lv=modes[modeID[modeSel]].level[levelSel]
|
||||||
gc.setColor(modeLevelColor[lv]or color.white)
|
gc.setColor(modeLevelColor[lv]or color.white)
|
||||||
mStr(lv,270,215)
|
mStr(lv,270,200)
|
||||||
setFont(25)
|
setFont(25)
|
||||||
gc.setColor(color.white)
|
gc.setColor(color.white)
|
||||||
mStr(text.modeInfo[modeID[modeSel]],270,255)
|
mStr(text.modeInfo[modeID[modeSel]],270,240)
|
||||||
|
|
||||||
setFont(75)
|
setFont(75)
|
||||||
gc.setColor(color.grey)
|
gc.setColor(color.grey)
|
||||||
mStr(text.modeName[modeSel],643,273)
|
mStr(text.modeName[modeSel],643,273)
|
||||||
@@ -291,7 +295,7 @@ function Pnt.mode()
|
|||||||
end
|
end
|
||||||
function Pnt.music()
|
function Pnt.music()
|
||||||
gc.setColor(1,1,1,.3+sin(Timer()*5)*.2)
|
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.setColor(.8,.8,.8)
|
||||||
gc.draw(drawableText.musicRoom,20,20)
|
gc.draw(drawableText.musicRoom,20,20)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
@@ -315,7 +319,7 @@ function Pnt.music()
|
|||||||
end
|
end
|
||||||
function Pnt.custom()
|
function Pnt.custom()
|
||||||
gc.setColor(1,1,1,.3+sin(Timer()*8)*.2)
|
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(.8,.8,.8)gc.draw(drawableText.custom,20,20)
|
||||||
gc.setColor(1,1,1)gc.draw(drawableText.custom,22,23)
|
gc.setColor(1,1,1)gc.draw(drawableText.custom,22,23)
|
||||||
setFont(35)
|
setFont(35)
|
||||||
@@ -331,6 +335,7 @@ function Pnt.custom()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
function Pnt.draw()
|
function Pnt.draw()
|
||||||
|
local sx,sy=sceneTemp.x,sceneTemp.y
|
||||||
gc.translate(200,60)
|
gc.translate(200,60)
|
||||||
gc.setColor(1,1,1,.2)
|
gc.setColor(1,1,1,.2)
|
||||||
gc.setLineWidth(1)
|
gc.setLineWidth(1)
|
||||||
@@ -354,10 +359,11 @@ function Pnt.draw()
|
|||||||
gc.rectangle("line",30*sx-30,600-30*sy,30,30)
|
gc.rectangle("line",30*sx-30,600-30*sy,30,30)
|
||||||
end
|
end
|
||||||
gc.translate(-200,-60)
|
gc.translate(-200,-60)
|
||||||
if clearSureTime>0 then
|
if sceneTemp.sure>0 then
|
||||||
gc.setColor(1,1,1,clearSureTime*.02)
|
gc.setColor(1,1,1,sceneTemp.sure*.02)
|
||||||
gc.draw(drawableText.question,760,11)
|
gc.draw(drawableText.question,660,11)
|
||||||
end
|
end
|
||||||
|
local pen=sceneTemp.pen
|
||||||
if pen>0 then
|
if pen>0 then
|
||||||
gc.setLineWidth(13)
|
gc.setLineWidth(13)
|
||||||
gc.setColor(blockColor[pen])
|
gc.setColor(blockColor[pen])
|
||||||
@@ -473,21 +479,33 @@ function Pnt.setting_graphic()
|
|||||||
gc.draw(blockSkin[7-int(Timer()*2)%7],890,390,nil,2)
|
gc.draw(blockSkin[7-int(Timer()*2)%7],890,390,nil,2)
|
||||||
end
|
end
|
||||||
function Pnt.setting_sound()
|
function Pnt.setting_sound()
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1,.8)
|
||||||
mDraw(drawableText.setting_sound,640,15)
|
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
|
end
|
||||||
function Pnt.setting_key()
|
function Pnt.setting_key()
|
||||||
|
local s=sceneTemp
|
||||||
local a=.3+sin(Timer()*15)*.1
|
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",
|
gc.rectangle("fill",
|
||||||
keyboardSet<11 and 240 or 840,
|
s.kb<11 and 240 or 840,
|
||||||
45*keyboardSet+20-450*int(keyboardSet/11),
|
45*s.kb+20-450*int(s.kb/11),
|
||||||
200,45
|
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",
|
gc.rectangle("fill",
|
||||||
joystickSet<11 and 440 or 1040,
|
s.js<11 and 440 or 1040,
|
||||||
45*joystickSet+20-450*int(joystickSet/11),
|
45*s.js+20-450*int(s.js/11),
|
||||||
200,45
|
200,45
|
||||||
)
|
)
|
||||||
--Selection rect
|
--Selection rect
|
||||||
@@ -501,15 +519,16 @@ function Pnt.setting_key()
|
|||||||
|
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
setFont(26)
|
setFont(26)
|
||||||
|
local board=s.board
|
||||||
for N=1,20 do
|
for N=1,20 do
|
||||||
if N<11 then
|
if N<11 then
|
||||||
gc.printf(text.actName[N],47,45*N+22,180,"right")
|
gc.printf(text.actName[N],47,45*N+22,180,"right")
|
||||||
mStr(setting.keyMap[curBoard][N],340,45*N+22)
|
mStr(setting.keyMap[board][N],340,45*N+22)
|
||||||
mStr(setting.keyMap[curBoard+8][N],540,45*N+22)
|
mStr(setting.keyMap[board+8][N],540,45*N+22)
|
||||||
else
|
else
|
||||||
gc.printf(text.actName[N],647,45*N-428,180,"right")
|
gc.printf(text.actName[N],647,45*N-428,180,"right")
|
||||||
mStr(setting.keyMap[curBoard][N],940,45*N-428)
|
mStr(setting.keyMap[board][N],940,45*N-428)
|
||||||
mStr(setting.keyMap[curBoard+8][N],1040,45*N-428)
|
mStr(setting.keyMap[board+8][N],1040,45*N-428)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
gc.setLineWidth(2)
|
gc.setLineWidth(2)
|
||||||
@@ -521,13 +540,16 @@ function Pnt.setting_key()
|
|||||||
end
|
end
|
||||||
setFont(35)
|
setFont(35)
|
||||||
gc.print("Player:",170,590)
|
gc.print("Player:",170,590)
|
||||||
gc.print(int(curBoard*.5+.5),300,590)
|
gc.print(int(board*.5+.5),300,590)
|
||||||
gc.print(curBoard.."/8",580,590)
|
gc.print(board.."/8",580,590)
|
||||||
gc.draw(drawableText.ctrlSetHelp,50,650)
|
gc.draw(drawableText.ctrlSetHelp,50,650)
|
||||||
end
|
end
|
||||||
function Pnt.setting_touch()
|
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()
|
VirtualkeyPreview()
|
||||||
local d=snapLevelValue[snapLevel]
|
local d=snapLevelValue[sceneTemp.snap]
|
||||||
if d>=10 then
|
if d>=10 then
|
||||||
gc.setLineWidth(3)
|
gc.setLineWidth(3)
|
||||||
gc.setColor(1,1,1,sin(Timer()*4)*.1+.1)
|
gc.setColor(1,1,1,sin(Timer()*4)*.1+.1)
|
||||||
@@ -581,8 +603,8 @@ function Pnt.history()
|
|||||||
gc.setLineWidth(4)
|
gc.setLineWidth(4)
|
||||||
gc.rectangle("line",30,45,1000,632)
|
gc.rectangle("line",30,45,1000,632)
|
||||||
setFont(20)
|
setFont(20)
|
||||||
for i=0,min(22,#updateLog-sel)do
|
for i=0,min(22,#updateLog-sceneTemp)do
|
||||||
gc.print(updateLog[sel+i],40,50+27*(i))
|
gc.print(updateLog[sceneTemp+i],40,50+27*(i))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return Pnt
|
return Pnt
|
||||||
21
player.lua
21
player.lua
@@ -94,7 +94,7 @@ local TRS={
|
|||||||
[31]={TMP1,{0,-1}, {0,1}, {1,0}, {0,-2} },
|
[31]={TMP1,{0,-1}, {0,1}, {1,0}, {0,-2} },
|
||||||
},--S
|
},--S
|
||||||
[3]={
|
[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} },
|
[10]={TMP1,{1,0}, {1,-1}, {0,2}, {1,2}, {0,-1}, {1,1} },
|
||||||
[03]={TMP1,{1,0}, {1,1}, {0,-2}, {-1,1} },
|
[03]={TMP1,{1,0}, {1,1}, {0,-2}, {-1,1} },
|
||||||
[30]={TMP1,{-1,0}, {-1,-1},{0,2}, {-1,2} },
|
[30]={TMP1,{-1,0}, {-1,-1},{0,2}, {-1,2} },
|
||||||
@@ -110,7 +110,7 @@ local TRS={
|
|||||||
[4]={
|
[4]={
|
||||||
[01]={TMP1,{-1,0}, {-1,1}, {0,-2}, {1,1} },
|
[01]={TMP1,{-1,0}, {-1,1}, {0,-2}, {1,1} },
|
||||||
[10]={TMP1,{1,0}, {1,-1}, {0,2}, {1,2} },
|
[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} },
|
[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} },
|
[12]={TMP1,{1,0}, {1,-1}, {-1,0}, {0,2}, {1,2} },
|
||||||
[21]={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}},
|
[10]={TMP1,{1,0}, {1,-1}, {0,2}, {1,2}, {0,-1}, {1,1}},
|
||||||
[03]={TMP1,{1,0}, {1,1}, {0,-2}, {1,-2} },
|
[03]={TMP1,{1,0}, {1,1}, {0,-2}, {1,-2} },
|
||||||
[30]={TMP1,{-1,0}, {-1,-1},{0,2}, {-1,2}, {0,-1} },
|
[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} },
|
[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} },
|
[23]={TMP1,{1,0}, {1,1}, {0,-2}, {1,-2}, {-1,1} },
|
||||||
[02]={TMP1,{-1,0}, {1,0}, {0,1} },
|
[02]={TMP1,{-1,0}, {1,0}, {0,1} },
|
||||||
[20]={TMP1,{1,0}, {-1,0}, {0,-1} },
|
[20]={TMP1,{1,0}, {-1,0}, {0,-1} },
|
||||||
@@ -744,8 +744,8 @@ function player.draw_norm(P)
|
|||||||
gc.translate(P.x,P.y)gc.scale(P.size)
|
gc.translate(P.x,P.y)gc.scale(P.size)
|
||||||
--Camera
|
--Camera
|
||||||
gc.setColor(0,0,0,.6)gc.rectangle("fill",0,0,600,690)
|
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)
|
gc.setLineWidth(7)gc.setColor(frameColor[P.strength])gc.rectangle("line",0,0,600,690)
|
||||||
--Frame
|
--Boarder
|
||||||
gc.translate(150+P.fieldOff.x,70+P.fieldOff.y)
|
gc.translate(150+P.fieldOff.x,70+P.fieldOff.y)
|
||||||
if P.gameEnv.grid then
|
if P.gameEnv.grid then
|
||||||
gc.setLineWidth(1)
|
gc.setLineWidth(1)
|
||||||
@@ -945,14 +945,13 @@ function player.draw_norm(P)
|
|||||||
end--Draw starting counter
|
end--Draw starting counter
|
||||||
drawTexts(P.bonus)--Bonus texts
|
drawTexts(P.bonus)--Bonus texts
|
||||||
setFont(25)
|
setFont(25)
|
||||||
|
drawDial(360,520,P.dropSpeed)
|
||||||
|
drawDial(405,575,P.keySpeed)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
mStr(format("%.2f",P.stat.time),-82,518)--Time
|
mStr(format("%.2f",P.stat.time),-82,518)--Time
|
||||||
mStr(P.score1,-82,560)--Score
|
mStr(P.score1,-82,560)--Score
|
||||||
gc.draw(drawableText.bpm,390,490)
|
gc.draw(drawableText.bpm,390,490)
|
||||||
gc.draw(drawableText.kpm,350,583)
|
gc.draw(drawableText.kpm,344,583)
|
||||||
setFont(25)
|
|
||||||
drawDial(360,520,P.dropSpeed)
|
|
||||||
drawDial(405,575,P.keySpeed)
|
|
||||||
--Speed dials
|
--Speed dials
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
modes[curMode.id].mesDisp(P,P.fieldOff.x,P.fieldOff.y)--Other messages
|
modes[curMode.id].mesDisp(P,P.fieldOff.x,P.fieldOff.y)--Other messages
|
||||||
@@ -1804,7 +1803,7 @@ function player.drop(P)--Place piece
|
|||||||
end
|
end
|
||||||
send=send+(renATK[P.combo]or 3)
|
send=send+(renATK[P.combo]or 3)
|
||||||
if #P.field==0 then
|
if #P.field==0 then
|
||||||
P:showText(text.PC,0,-80,60,"flicker")
|
P:showText(text.PC,0,-80,50,"flicker")
|
||||||
send=min(send,3)+min(6+P.stat.pc,10)
|
send=min(send,3)+min(6+P.stat.pc,10)
|
||||||
exblock=exblock+2
|
exblock=exblock+2
|
||||||
sendTime=sendTime+60
|
sendTime=sendTime+60
|
||||||
|
|||||||
32
scene.lua
32
scene.lua
@@ -21,7 +21,7 @@ local sceneInit={
|
|||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
intro=function()
|
intro=function()
|
||||||
count=0
|
sceneTemp=0--animation timer
|
||||||
BGM("blank")
|
BGM("blank")
|
||||||
end,
|
end,
|
||||||
main=function()
|
main=function()
|
||||||
@@ -37,12 +37,12 @@ local sceneInit={
|
|||||||
if bgmPlaying then
|
if bgmPlaying then
|
||||||
for i=1,#musicID do
|
for i=1,#musicID do
|
||||||
if musicID[i]==bgmPlaying then
|
if musicID[i]==bgmPlaying then
|
||||||
sel=i
|
sceneTemp=i--music select
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
sel=1
|
sceneTemp=1
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
mode=function()
|
mode=function()
|
||||||
@@ -51,15 +51,14 @@ local sceneInit={
|
|||||||
destroyPlayers()
|
destroyPlayers()
|
||||||
end,
|
end,
|
||||||
custom=function()
|
custom=function()
|
||||||
sel=sel or 1
|
sceneTemp=1--option select
|
||||||
destroyPlayers()
|
destroyPlayers()
|
||||||
curBG=customRange.bg[customSel[12]]
|
curBG=customRange.bg[customSel[12]]
|
||||||
BGM(customRange.bgm[customSel[13]])
|
BGM(customRange.bgm[customSel[13]])
|
||||||
end,
|
end,
|
||||||
draw=function()
|
draw=function()
|
||||||
curBG="none"
|
curBG="none"
|
||||||
clearSureTime=0
|
sceneTemp={sure=0,pen=1,x=1,y=1}
|
||||||
pen,sx,sy=1,1,1
|
|
||||||
end,
|
end,
|
||||||
play=function()
|
play=function()
|
||||||
love.keyboard.setKeyRepeat(false)
|
love.keyboard.setKeyRepeat(false)
|
||||||
@@ -82,20 +81,23 @@ local sceneInit={
|
|||||||
curBG="none"
|
curBG="none"
|
||||||
end,
|
end,
|
||||||
setting_sound=function()
|
setting_sound=function()
|
||||||
|
sceneTemp={last=0,jump=0}--last sound time,animation count(10→0)
|
||||||
curBG="none"
|
curBG="none"
|
||||||
end,
|
end,
|
||||||
setting_key=function()
|
setting_key=function()
|
||||||
curBoard=1
|
sceneTemp={
|
||||||
keyboardSet=1
|
board=1,
|
||||||
joystickSet=1
|
kb=1,js=1,
|
||||||
keyboardSetting=false
|
kS=false,jS=false,
|
||||||
joystickSetting=false
|
}
|
||||||
end,
|
end,
|
||||||
setting_touch=function()
|
setting_touch=function()
|
||||||
curBG="game2"
|
curBG="game2"
|
||||||
defaultSel=1
|
sceneTemp={
|
||||||
sel=nil
|
default=1,
|
||||||
snapLevel=1
|
snap=1,
|
||||||
|
sel=nil,
|
||||||
|
}
|
||||||
end,
|
end,
|
||||||
setting_touchSwitch=function()
|
setting_touchSwitch=function()
|
||||||
curBG="matrix"
|
curBG="matrix"
|
||||||
@@ -106,7 +108,7 @@ local sceneInit={
|
|||||||
history=function()
|
history=function()
|
||||||
updateLog=require"updateLog"
|
updateLog=require"updateLog"
|
||||||
curBG="lightGrey"
|
curBG="lightGrey"
|
||||||
sel=1
|
sceneTemp=1--scroll pos
|
||||||
end,
|
end,
|
||||||
quit=function()
|
quit=function()
|
||||||
love.timer.sleep(.3)
|
love.timer.sleep(.3)
|
||||||
|
|||||||
2
shader.lua
Normal file
2
shader.lua
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
gc=love.graphics
|
||||||
|
shader_glow=gc.newShader("shader/glow.cs")
|
||||||
5
shader/glow.cs
Normal file
5
shader/glow.cs
Normal 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;
|
||||||
|
}
|
||||||
@@ -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
|
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即透光
|
if(data.a>.1)return vec4(vec3(y/yresolution),1.);//碰撞检测,像素透明度>.1即透光
|
||||||
}
|
}
|
||||||
return vec4(vec3(1),1.);//返回最远距离1
|
return vec4(1,1,1,1);//返回最远距离1
|
||||||
}
|
}
|
||||||
28
sound.lua
28
sound.lua
@@ -1,4 +1,5 @@
|
|||||||
local rnd=math.random
|
local rnd=math.random
|
||||||
|
local rem=table.remove
|
||||||
local vibrateLevel={0,.015,.02,.03,.04,.05,.06,.07,.08,.09}
|
local vibrateLevel={0,.015,.02,.03,.04,.05,.06,.07,.08,.09}
|
||||||
function VIB(t)
|
function VIB(t)
|
||||||
if setting.vib>0 then
|
if setting.vib>0 then
|
||||||
@@ -30,22 +31,39 @@ function SFX(s,v,pos)
|
|||||||
S:play()
|
S:play()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
function getVoice(str)
|
||||||
|
local n=1
|
||||||
|
local L=voiceBank[str]
|
||||||
|
while L[n]:isPlaying()do
|
||||||
|
n=n+1
|
||||||
|
if not L[n]then
|
||||||
|
L[n]=L[n-1]:clone()
|
||||||
|
L[n]:seek(0)
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return L[n]
|
||||||
|
--load voice with string
|
||||||
|
end
|
||||||
function getFreeVoiceChannel()
|
function getFreeVoiceChannel()
|
||||||
local i=#voiceQueue
|
local i=#voiceQueue
|
||||||
for i=1,i do
|
for i=1,i do
|
||||||
if #voiceQueue[i]==0 then return i end
|
if #voiceQueue[i]==0 then return i end
|
||||||
end
|
end
|
||||||
voiceQueue[i+1]={}
|
voiceQueue[i+1]={s=0}
|
||||||
return i+1
|
return i+1
|
||||||
end
|
end
|
||||||
function VOICE(s,chn)
|
function VOICE(s,chn)
|
||||||
if setting.voc>0 then
|
if setting.voc>0 then
|
||||||
if chn then
|
if chn then
|
||||||
voiceQueue[chn][#voiceQueue[chn]+1]=voiceList[s][rnd(#voiceList[s])]
|
local L=voiceQueue[chn]
|
||||||
--添加到[chn]
|
local _=voiceList[s]
|
||||||
|
L[#L+1]=_[rnd(#_)]
|
||||||
|
L.s=1
|
||||||
|
--添加到queue[chn]
|
||||||
else
|
else
|
||||||
voiceQueue[getFreeVoiceChannel()]={voiceList[s][rnd(#voiceList[s])]}
|
voiceQueue[getFreeVoiceChannel()]={s=1,voiceList[s][rnd(#voiceList[s])]}
|
||||||
--自动查找/创建空轨
|
--自动创建空轨/播放
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -84,6 +84,12 @@ background1=N("/image/BG/bg1.jpg")
|
|||||||
background2=N("/image/BG/bg2.png")
|
background2=N("/image/BG/bg2.png")
|
||||||
groupCode=N("/image/mess/groupcode.png")
|
groupCode=N("/image/mess/groupcode.png")
|
||||||
payCode=N("/image/mess/paycode.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={
|
drawableText={
|
||||||
question=T(100,"?"),
|
question=T(100,"?"),
|
||||||
bpm=T(15,"BPM"),kpm=T(15,"KPM"),
|
bpm=T(15,"BPM"),kpm=T(15,"KPM"),
|
||||||
|
|||||||
14
timer.lua
14
timer.lua
@@ -34,7 +34,7 @@ function Tmr.load()
|
|||||||
L[2]=L[2]+1
|
L[2]=L[2]+1
|
||||||
if L[2]>L[3]then
|
if L[2]>L[3]then
|
||||||
for i=1,L[2]do sfx[i]=nil end
|
for i=1,L[2]do sfx[i]=nil end
|
||||||
L[1],L[2],L[3]=4,1,1
|
L[1],L[2],L[3]=0,1,1
|
||||||
SFX("welcome",.2)
|
SFX("welcome",.2)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@@ -47,14 +47,14 @@ function Tmr.load()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
function Tmr.intro()
|
function Tmr.intro()
|
||||||
count=count+1
|
sceneTemp=sceneTemp+1
|
||||||
if count==200 then count=80 end
|
if sceneTemp==200 then sceneTemp=80 end
|
||||||
end
|
end
|
||||||
function Tmr.main(dt)
|
function Tmr.main(dt)
|
||||||
players[1]:update(dt)
|
players[1]:update(dt)
|
||||||
end
|
end
|
||||||
function Tmr.draw()
|
function Tmr.draw()
|
||||||
if clearSureTime>0 then clearSureTime=clearSureTime-1 end
|
if sceneTemp.sure>0 then sceneTemp.sure=sceneTemp.sure-1 end
|
||||||
end
|
end
|
||||||
function Tmr.play(dt)
|
function Tmr.play(dt)
|
||||||
frame=frame+1
|
frame=frame+1
|
||||||
@@ -140,4 +140,10 @@ function Tmr.pause(dt)
|
|||||||
pauseTimer=pauseTimer+1
|
pauseTimer=pauseTimer+1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
function Tmr.setting_sound()
|
||||||
|
local t=sceneTemp.jump
|
||||||
|
if t>0 then
|
||||||
|
sceneTemp.jump=t-1
|
||||||
|
end
|
||||||
|
end
|
||||||
return Tmr
|
return Tmr
|
||||||
@@ -8,17 +8,19 @@ Patron(rmb10+):
|
|||||||
zxc
|
zxc
|
||||||
?[D*a]
|
?[D*a]
|
||||||
Future outlook:
|
Future outlook:
|
||||||
|
New mode system with:
|
||||||
|
ultra mode
|
||||||
|
rythem mode
|
||||||
|
combo mode
|
||||||
|
bigbang mode
|
||||||
|
TTT mode
|
||||||
Normal:
|
Normal:
|
||||||
powerinfo switch
|
powerinfo switch
|
||||||
splashing block
|
splashing block
|
||||||
ajustable next count
|
ajustable next count
|
||||||
new mode system
|
|
||||||
custom block color/direction
|
custom block color/direction
|
||||||
combo mode
|
|
||||||
bigbang mode
|
|
||||||
TTT mode
|
|
||||||
custom block sequence
|
custom block sequence
|
||||||
CC smarter(think of gaebage buffer)
|
CC smarter(think of garbage buffer)
|
||||||
game recording
|
game recording
|
||||||
new AI:task-Z
|
new AI:task-Z
|
||||||
auto GUI in any screen size
|
auto GUI in any screen size
|
||||||
@@ -27,6 +29,21 @@ Future outlook:
|
|||||||
infinite 1v1
|
infinite 1v1
|
||||||
square mode
|
square mode
|
||||||
more FXs & 3d features & animations
|
more FXs & 3d features & animations
|
||||||
|
0.8.4:
|
||||||
|
better widget performence
|
||||||
|
vocal more natural(important,may cause new bug)
|
||||||
|
a bit better performence on mobile devices
|
||||||
|
fatal bug fixed
|
||||||
|
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:
|
0.8.1:
|
||||||
more FX level
|
more FX level
|
||||||
better battery info displaying
|
better battery info displaying
|
||||||
|
|||||||
Reference in New Issue
Block a user