diff --git a/SFX/spawn_1.ogg b/SFX/spawn_1.ogg new file mode 100644 index 00000000..a9cea30b Binary files /dev/null and b/SFX/spawn_1.ogg differ diff --git a/SFX/spawn_2.ogg b/SFX/spawn_2.ogg new file mode 100644 index 00000000..9ef01fa3 Binary files /dev/null and b/SFX/spawn_2.ogg differ diff --git a/SFX/spawn_3.ogg b/SFX/spawn_3.ogg new file mode 100644 index 00000000..d32eb510 Binary files /dev/null and b/SFX/spawn_3.ogg differ diff --git a/SFX/spawn_4.ogg b/SFX/spawn_4.ogg new file mode 100644 index 00000000..231f4632 Binary files /dev/null and b/SFX/spawn_4.ogg differ diff --git a/SFX/spawn_5.ogg b/SFX/spawn_5.ogg new file mode 100644 index 00000000..25a3d1eb Binary files /dev/null and b/SFX/spawn_5.ogg differ diff --git a/SFX/spawn_6.ogg b/SFX/spawn_6.ogg new file mode 100644 index 00000000..5a8e6de2 Binary files /dev/null and b/SFX/spawn_6.ogg differ diff --git a/SFX/spawn_7.ogg b/SFX/spawn_7.ogg new file mode 100644 index 00000000..4cf04a89 Binary files /dev/null and b/SFX/spawn_7.ogg differ diff --git a/Zframework/languages.lua b/Zframework/languages.lua index c3a30ed2..21136e03 100644 --- a/Zframework/languages.lua +++ b/Zframework/languages.lua @@ -256,6 +256,7 @@ local langList={ quickR="快速重新开始", swap="组合键切换攻击模式", fine="极简操作提示音", + spawn="方块生成音", back="返回", }, setting_video={ @@ -694,6 +695,7 @@ local langList={ quickR="快速重新开始", swap="组合键切换攻击模式", fine="极简操作提示音", + spawn="方块生成音", back="返回", }, setting_video={ @@ -1121,6 +1123,7 @@ local langList={ quickR="Quick Retry", swap="Key Combination (Change Atk. Mode)", fine="Finesse Error Sound", + spawn="Piece Spawning Sound", back="Back", }, setting_video={ diff --git a/Zframework/sfx.lua b/Zframework/sfx.lua index cc682872..720c931c 100644 --- a/Zframework/sfx.lua +++ b/Zframework/sfx.lua @@ -10,6 +10,7 @@ SFX.list={ "virtualKey", "button","swipe", "ready","start","win","fail","collect", + "spawn_1","spawn_2","spawn_3","spawn_4","spawn_5","spawn_6","spawn_7", "move","rotate","rotatekick","hold", "prerotate","prehold", "lock","drop","fall", @@ -38,6 +39,7 @@ end function SFX.play(s,v,pos) if setting.sfx==0 then return end local S=SFX.list[s]--source list + if not S then return end local n=1 while S[n]:isPlaying()do n=n+1 diff --git a/Zframework/widgetList.lua b/Zframework/widgetList.lua index 5647cd27..56653399 100644 --- a/Zframework/widgetList.lua +++ b/Zframework/widgetList.lua @@ -221,9 +221,10 @@ local Widgets={ layout= newButton(590,540,140,70,C.white,35,function() SCN.goto("setting_skin") end,nil,"quickR"), - quickR= newSwitch(1050,340,35, SETval("quickR"), SETrev("quickR"), nil,"swap"), - swap= newSwitch(1050,440,19, SETval("swap"), SETrev("swap"), nil,"fine"), - fine= newSwitch(1050,540,20, SETval("fine"), SETrev("fine"), nil,"back"), + quickR= newSwitch(1050,320,35, SETval("quickR"), SETrev("quickR"), nil,"swap"), + swap= newSwitch(1050,400,20, SETval("swap"), SETrev("swap"), nil,"fine"), + fine= newSwitch(1050,480,20, SETval("fine"), SETrev("fine"), nil,"spawn"), + spawn= newSwitch(1050,560,20, SETval("spawn"), SETrev("spawn"), nil,"back"), back= newButton(1140,650,200,80,C.white,40,BACK, nil,"graphic"), }, setting_video={ diff --git a/image/skin/WTF.png b/image/skin/WTF.png new file mode 100644 index 00000000..e7d5372b Binary files /dev/null and b/image/skin/WTF.png differ diff --git a/main.lua b/main.lua index 94462891..16224f4c 100644 --- a/main.lua +++ b/main.lua @@ -115,6 +115,9 @@ if setting.skin[10]==5 then setting.skin[10],setting.skin[11]=1,5 end if S.version~=gameVersion then + if S.version then + setting.spawn=true + end S.version=gameVersion TEXT.show(text.newVersion,640,200,30,"fly",.3) end diff --git a/parts/default_data.lua b/parts/default_data.lua index 72b827c2..4a9227e5 100644 --- a/parts/default_data.lua +++ b/parts/default_data.lua @@ -5,10 +5,11 @@ local s={ ihs=true,irs=true,ims=true, reTime=4, maxNext=6, + autoPause=true, quickR=true, swap=true, fine=false, - autoPause=true, + spawn=false, lang=1, skinSet=1, skin={1,5,8,2,10,3,7,1,5,1,5,8,2,10,3,7,10,7,8,2,8,2,1,5,3}, @@ -32,9 +33,11 @@ local s={ powerInfo=false, --sound - sfx=10,bgm=7, - vib=0,voc=0, + sfx=10, + bgm=7, stereo=6, + vib=0, + voc=0, --virtualkey VKSFX=3,--SFX volume diff --git a/parts/player.lua b/parts/player.lua index 42569711..ae65f40a 100644 --- a/parts/player.lua +++ b/parts/player.lua @@ -1348,6 +1348,9 @@ function player.hold(P,ifpre) P:freshgho() P.dropDelay,P.lockDelay,P.freshTime=P.gameEnv.drop,P.gameEnv.lock,max(P.freshTime-5,0) if P:ifoverlap(P.cur.bk,P.curX,P.curY)then P:lock()P:lose()end + if P.human and setting.spawn then + SFX.play("spawn_"..C.id) + end end if P.human then @@ -1403,6 +1406,9 @@ function player.popNext(P)--pop next queue to hand end if _[6]then P.act.hardDrop(P)_[6]=false end--IHdS + if P.human and setting.spawn then + SFX.play("spawn_"..P.cur.id) + end end end function player.drop(P)--Place piece diff --git a/parts/skin.lua b/parts/skin.lua index 980cd1c6..8ac89abb 100644 --- a/parts/skin.lua +++ b/parts/skin.lua @@ -21,6 +21,7 @@ local list={ "text_bone(mrz)", "colored_bone(mrz)", "white_bone(mrz)", + "WTF", } local SKIN={} SKIN.lib={} diff --git a/parts/updateLog.lua b/parts/updateLog.lua index 2ec3ef46..7c2baa47 100644 --- a/parts/updateLog.lua +++ b/parts/updateLog.lua @@ -56,7 +56,6 @@ Future outlook: mine sweeper tank battle 简易防沉迷系统 - "next" SFX full-key control touch-drag control cool backgrounds @@ -71,12 +70,15 @@ Future outlook: network game new AI: task-Z -0.9.1: Bug fixed +0.9.1: next piece SFX + new: + next piece spawn SFX code: render background to canvas first, not redering each frame fixed: error when moving [nothing] when arr>0 error when complete master-advanced + 0.9.0: Custom Sequence Update new: custom sequence