From 177bdfaf288f2f5cf81d123d6add8a75ae2140ca Mon Sep 17 00:00:00 2001 From: MrZ_26 <1046101471@qq.com> Date: Sat, 4 Nov 2023 02:39:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A1=86=E6=9E=B6=E8=B7=9F=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zenitha | 2 +- assets/note.lua | 14 +++++------ assets/scene/error.lua | 6 ++--- assets/scene/game.lua | 4 ++-- assets/scene/lang.lua | 24 +++++++++---------- assets/scene/load.lua | 5 ++-- assets/scene/mapSelect.lua | 2 +- assets/scene/result.lua | 18 +++++++------- assets/scene/setting.lua | 4 ++-- assets/scene/setting_key.lua | 46 ++++++++++++++++++------------------ assets/scene/stat.lua | 2 +- assets/track.lua | 6 ++--- main.lua | 18 +++++++------- 13 files changed, 76 insertions(+), 75 deletions(-) diff --git a/Zenitha b/Zenitha index 2aed532..da3faa0 160000 --- a/Zenitha +++ b/Zenitha @@ -1 +1 @@ -Subproject commit 2aed532d087832db116da48fcd2674a3191685b2 +Subproject commit da3faa09f3ff76bf0be61a935be4893d5bd40378 diff --git a/assets/note.lua b/assets/note.lua index a44f384..0c2d9fe 100644 --- a/assets/note.lua +++ b/assets/note.lua @@ -1,4 +1,4 @@ -local listMix=MATH.listMix +local listLerp=MATH.listLerp local Note={} @@ -11,19 +11,19 @@ end function Note:getColor(t) return - listMix(self.color[1],t), - listMix(self.color[2],t), - listMix(self.color[3],t) + listLerp(self.color[1],t), + listLerp(self.color[2],t), + listLerp(self.color[3],t) end function Note:getAlpha(t) - return listMix(self.alpha,t)*.01 + return listLerp(self.alpha,t)*.01 end function Note:getOffset(t) return - listMix(self.xOffset,t), - listMix(self.yOffset,t) + listLerp(self.xOffset,t), + listLerp(self.yOffset,t) end return Note \ No newline at end of file diff --git a/assets/scene/error.lua b/assets/scene/error.lua index eb0701c..fe8bf65 100644 --- a/assets/scene/error.lua +++ b/assets/scene/error.lua @@ -10,7 +10,7 @@ function scene.enter() BGcolor=rnd()>.026 and{.3,.5,.9} or{.62,.3,.926} sysAndScn=SYSTEM.."-"..VERSION.string.." scene:"..Zenitha.getErr('#').scene errorText=LOADED and Text.errorMsg or "An error has occurred while the game was loading.\nAn error log has been created so you can send it to the author." - errorShot,errorInfo=Zenitha.getErr('#').shot,Zenitha.getErr('#').mes + errorShot,errorInfo=Zenitha.getErr('#').shot,Zenitha.getErr('#').msg end function scene.draw() @@ -33,8 +33,8 @@ function scene.draw() end scene.widgetList={ - WIDGET.new{type='button',x=940,y=640,w=170,h=80,sound='key',fontSize=65,text=CHAR.icon.console,code=WIDGET.c_goScn'_console'}, - WIDGET.new{type='button',x=1140,y=640,w=170,h=80,sound='key',fontSize=40,text=CHAR.icon.cross_big,code=love.event.quit}, + WIDGET.new{type='button',x=940,y=640,w=170,h=80,sound_press='key',fontSize=65,text=CHAR.icon.console,code=WIDGET.c_goScn'_console'}, + WIDGET.new{type='button',x=1140,y=640,w=170,h=80,sound_press='key',fontSize=40,text=CHAR.icon.cross_big,code=love.event.quit}, } return scene diff --git a/assets/scene/game.lua b/assets/scene/game.lua index 3e91199..406f1f8 100644 --- a/assets/scene/game.lua +++ b/assets/scene/game.lua @@ -775,7 +775,7 @@ function scene.draw() end scene.widgetList={ - WIDGET.new{type='button',pos={0,0},x=40,y=60,w=50, sound='back',text=CHAR.icon.back,code=WIDGET.c_backScn()}, - WIDGET.new{type='button',pos={0,0},x=100,y=60,w=50,sound='key',text=CHAR.icon.retry,code=WIDGET.c_pressKey'restart'}, + WIDGET.new{type='button',pos={0,0},x=40,y=60,w=50, sound_press='back',text=CHAR.icon.back,code=WIDGET.c_backScn()}, + WIDGET.new{type='button',pos={0,0},x=100,y=60,w=50,sound_press='key',text=CHAR.icon.retry,code=WIDGET.c_pressKey'restart'}, } return scene diff --git a/assets/scene/lang.lua b/assets/scene/lang.lua index bb1741f..f1abbec 100644 --- a/assets/scene/lang.lua +++ b/assets/scene/lang.lua @@ -57,21 +57,21 @@ local function _setLang(lid) end scene.widgetList={ - WIDGET.new{type='button_fill',x=270,y=210,w=330,h=100,fontSize=40, text=langList.en, color='R', sound='check',code=function() _setLang('en') end}, - WIDGET.new{type='button' ,x=270,y=330,w=330,h=100,fontSize=40, text='', color='F', sound='check'}, - WIDGET.new{type='button' ,x=270,y=450,w=330,h=100,fontSize=35, text='', color='O', sound='check'}, - WIDGET.new{type='button' ,x=270,y=570,w=330,h=100,fontSize=35, text='', color='Y', sound='check'}, + WIDGET.new{type='button_fill',x=270,y=210,w=330,h=100,fontSize=40, text=langList.en, color='R', sound_press='check',code=function() _setLang('en') end}, + WIDGET.new{type='button' ,x=270,y=330,w=330,h=100,fontSize=40, text='', color='F', sound_press='check'}, + WIDGET.new{type='button' ,x=270,y=450,w=330,h=100,fontSize=35, text='', color='O', sound_press='check'}, + WIDGET.new{type='button' ,x=270,y=570,w=330,h=100,fontSize=35, text='', color='Y', sound_press='check'}, - WIDGET.new{type='button' ,x=640,y=210,w=330,h=100,fontSize=40, text='', color='A', sound='check'}, - WIDGET.new{type='button' ,x=640,y=330,w=330,h=100,fontSize=40, text='', color='K', sound='check'}, - WIDGET.new{type='button' ,x=640,y=450,w=330,h=100,fontSize=40, text='', color='G', sound='check'}, - WIDGET.new{type='button' ,x=640,y=570,w=330,h=100,fontSize=40, text='', color='J', sound='check'}, + WIDGET.new{type='button' ,x=640,y=210,w=330,h=100,fontSize=40, text='', color='A', sound_press='check'}, + WIDGET.new{type='button' ,x=640,y=330,w=330,h=100,fontSize=40, text='', color='K', sound_press='check'}, + WIDGET.new{type='button' ,x=640,y=450,w=330,h=100,fontSize=40, text='', color='G', sound_press='check'}, + WIDGET.new{type='button' ,x=640,y=570,w=330,h=100,fontSize=40, text='', color='J', sound_press='check'}, - WIDGET.new{type='button_fill',x=1000,y=210,w=330,h=100,fontSize=40,text=langList.zh, color='I', sound='check',code=function() _setLang('zh') end}, - WIDGET.new{type='button' ,x=1000,y=330,w=330,h=100,fontSize=40,text='', color='B', sound='check'}, - WIDGET.new{type='button' ,x=1000,y=450,w=330,h=100,fontSize=40,text='', color='P', sound='check'}, + WIDGET.new{type='button_fill',x=1000,y=210,w=330,h=100,fontSize=40,text=langList.zh, color='I', sound_press='check',code=function() _setLang('zh') end}, + WIDGET.new{type='button' ,x=1000,y=330,w=330,h=100,fontSize=40,text='', color='B', sound_press='check'}, + WIDGET.new{type='button' ,x=1000,y=450,w=330,h=100,fontSize=40,text='', color='P', sound_press='check'}, - WIDGET.new{type='button_fill',x=1000,y=570,w=330,h=100,sound='back',fontSize=60,text=CHAR.icon.back,code=WIDGET.c_backScn()}, + WIDGET.new{type='button_fill',x=1000,y=570,w=330,h=100,sound_press='back',fontSize=60,text=CHAR.icon.back,code=WIDGET.c_backScn()}, } return scene diff --git a/assets/scene/load.lua b/assets/scene/load.lua index f9f17dd..fece1d1 100644 --- a/assets/scene/load.lua +++ b/assets/scene/load.lua @@ -8,7 +8,6 @@ local loadingThread=coroutine.wrap(function() BG.setDefault(MOBILE and 'space' or 'galaxy') BG.set() BGM.play() - coroutine.yield('loadSFX')SFX.load('assets/effect/chiptune/') coroutine.yield('loadVoice')VOC.load('assets/vocal/') coroutine.yield('loadFont') for i=1,17 do FONT.get(15+5*i) end @@ -33,8 +32,8 @@ end function scene.mouseDown() if LOADED then if FIRSTLAUNCH then - SCN.pop() - SCN.push('main') + SCN._pop() + SCN._push('main') SCN.go('lang') else SCN.swapTo('main') diff --git a/assets/scene/mapSelect.lua b/assets/scene/mapSelect.lua index b5329f2..71a01d3 100644 --- a/assets/scene/mapSelect.lua +++ b/assets/scene/mapSelect.lua @@ -175,6 +175,6 @@ scene.widgetList={ WIDGET.new{type='button_fill',pos={0,1},x=320,y=-80,w=80,text=CHAR.icon.retry,color='lB',fontSize=50,code=_freshSongList,visibleFunc=function() return love.timer.getTime()-lastFreshTime>2.6 end}, WIDGET.new{type='button_fill',pos={.5,1},y=-80,w=140,h=80,text=CHAR.icon.play,color='lG',fontSize=60,code=WIDGET.c_pressKey'return'}, sortSelector, - WIDGET.new{type='button_fill',pos={1,1},x=-120,y=-80,w=160,h=80,sound='back',fontSize=60,text=CHAR.icon.back,code=WIDGET.c_backScn()}, + WIDGET.new{type='button_fill',pos={1,1},x=-120,y=-80,w=160,h=80,sound_press='back',fontSize=60,text=CHAR.icon.back,code=WIDGET.c_backScn()}, } return scene diff --git a/assets/scene/result.lua b/assets/scene/result.lua index 4fbf3a5..cf09393 100644 --- a/assets/scene/result.lua +++ b/assets/scene/result.lua @@ -125,28 +125,28 @@ function scene.draw() end GC.setColor(clr) if c==1 then - GC.print(trophy,0,195) + GC.print(trophy,0,202) GC.setColor(1,1,1,.626) - GC.print(trophy,0,195) + GC.print(trophy,0,202) elseif c==2 then - GC.print(trophy,0,195) + GC.print(trophy,0,202) GC.setColor(1,1,1,.626+.0626*sin(t*62.6)) - GC.print(trophy,0,195) + GC.print(trophy,0,202) elseif c==3 then - GC.print(trophy,0,195) + GC.print(trophy,0,202) GC.setColor(1,1,1,.85+.15*sin(t*62.6)) - GC.print(trophy,0,195) + GC.print(trophy,0,202) elseif c>=4 then for i=0,10 do _stencilX=100*i GC.stencil(_marvStencil,'replace',1) GC.setStencilTest('equal',1) GC.setColor(COLOR.rainbow(t*(c==4 and 2.6 or 6.26)-i)) - GC.print(trophy,sin(t*355)*((c==4 and 1 or 2.6)+.6*sin(t*.626)),195+1.6*sin(t*260)) + GC.print(trophy,sin(t*355)*((c==4 and 1 or 2.6)+.6*sin(t*.626)),202+1.6*sin(t*260)) GC.setStencilTest() end GC.setColor(1,1,1,.9) - GC.print(trophy,0,195) + GC.print(trophy,0,202) end end GC.pop() @@ -156,6 +156,6 @@ end scene.widgetList={ WIDGET.new{type='button_fill',pos={1,1},x=-300,y=-80,w=160,h=80,fontSize=60,text=CHAR.icon.retry,code=WIDGET.c_pressKey'restart'}, - WIDGET.new{type='button_fill',pos={1,1},x=-120,y=-80,w=160,h=80,sound='back',fontSize=60,text=CHAR.icon.back,code=WIDGET.c_backScn()}, + WIDGET.new{type='button_fill',pos={1,1},x=-120,y=-80,w=160,h=80,sound_press='back',fontSize=60,text=CHAR.icon.back,code=WIDGET.c_backScn()}, } return scene diff --git a/assets/scene/setting.lua b/assets/scene/setting.lua index 83c6592..d5c4fe9 100644 --- a/assets/scene/setting.lua +++ b/assets/scene/setting.lua @@ -52,7 +52,7 @@ local function sliderShow_hitLV(S) return hitTexts[S.disp()] or "?" end -scene.scrollHeight=700 +scene.scrollHeight=626 scene.widgetList={ WIDGET.new{type='slider_fill',pos={0,0},x=260, y=150,w=420,h=35,text=LANG'setting_mainVol', widthLimit=200,disp=TABLE.func_getVal(SETTINGS,'mainVol'), code=TABLE.func_setVal(SETTINGS,'mainVol')}, WIDGET.new{type='slider_fill',pos={0,0},x=260, y=200,w=420,h=35,text=LANG'setting_bgm', widthLimit=200,disp=TABLE.func_getVal(SETTINGS,'bgmVol'), code=TABLE.func_setVal(SETTINGS,'bgmVol')}, @@ -92,7 +92,7 @@ scene.widgetList={ WIDGET.new{type='button_fill',pos={1,1},x=-320,y=-80,w=160,h=80,fontSize=60,text=CHAR.icon.keyboard,code=WIDGET.c_goScn'setting_key'}, - WIDGET.new{type='button_fill',pos={1,1},x=-120,y=-80,w=160,h=80,sound='back',fontSize=60,text=CHAR.icon.back,code=WIDGET.c_backScn()}, + WIDGET.new{type='button_fill',pos={1,1},x=-120,y=-80,w=160,h=80,sound_press='back',fontSize=60,text=CHAR.icon.back,code=WIDGET.c_backScn()}, } return scene diff --git a/assets/scene/setting_key.lua b/assets/scene/setting_key.lua index d873e8a..81c7615 100644 --- a/assets/scene/setting_key.lua +++ b/assets/scene/setting_key.lua @@ -103,7 +103,7 @@ function scene.keyDown(key,isRep) end elseif key=='backspace' then if selected then - local binded=TABLE.search(KEY_MAP,selected) + local binded=TABLE.findAll(KEY_MAP,selected) if binded then KEY_MAP[binded]=nil end @@ -112,7 +112,7 @@ function scene.keyDown(key,isRep) end elseif selected then if not forbbidenKeys[key] then - local oldKey=TABLE.search(KEY_MAP,selected) + local oldKey=TABLE.findAll(KEY_MAP,selected) if oldKey then KEY_MAP[oldKey]=nil end KEY_MAP[key]=selected KEY_MAP_inv:_update() @@ -156,29 +156,29 @@ local function _setSel(i) end end scene.widgetList={ - WIDGET.new{type='button',pos={0.10,false},x=0,y=260,w=100,h=60,sound='key',fontSize=30,text='L5',color='lD',code=function() _setSel(01) end}, - WIDGET.new{type='button',pos={0.18,false},x=0,y=260,w=100,h=60,sound='key',fontSize=30,text='L4',color='lD',code=function() _setSel(02) end}, - WIDGET.new{type='button',pos={0.26,false},x=0,y=260,w=100,h=60,sound='key',fontSize=30,text='L3',color='L' ,code=function() _setSel(03) end}, - WIDGET.new{type='button',pos={0.34,false},x=0,y=260,w=100,h=60,sound='key',fontSize=30,text='L2',color='lB',code=function() _setSel(04) end}, - WIDGET.new{type='button',pos={0.42,false},x=0,y=260,w=100,h=60,sound='key',fontSize=30,text='L1',color='lB',code=function() _setSel(05) end}, - WIDGET.new{type='button',pos={0.50,false},x=0,y=260,w=100,h=60,sound='key',fontSize=30,text='C', color='L' ,code=function() _setSel(06) end}, - WIDGET.new{type='button',pos={0.58,false},x=0,y=260,w=100,h=60,sound='key',fontSize=30,text='R1',color='lB',code=function() _setSel(07) end}, - WIDGET.new{type='button',pos={0.66,false},x=0,y=260,w=100,h=60,sound='key',fontSize=30,text='R2',color='lB',code=function() _setSel(08) end}, - WIDGET.new{type='button',pos={0.74,false},x=0,y=260,w=100,h=60,sound='key',fontSize=30,text='R3',color='L' ,code=function() _setSel(09) end}, - WIDGET.new{type='button',pos={0.82,false},x=0,y=260,w=100,h=60,sound='key',fontSize=30,text='R4',color='lD',code=function() _setSel(10) end}, - WIDGET.new{type='button',pos={0.90,false},x=0,y=260,w=100,h=60,sound='key',fontSize=30,text='R5',color='lD',code=function() _setSel(11) end}, + WIDGET.new{type='button',pos={0.10,false},x=0,y=260,w=100,h=60,sound_press='key',fontSize=30,text='L5',color='lD',code=function() _setSel(01) end}, + WIDGET.new{type='button',pos={0.18,false},x=0,y=260,w=100,h=60,sound_press='key',fontSize=30,text='L4',color='lD',code=function() _setSel(02) end}, + WIDGET.new{type='button',pos={0.26,false},x=0,y=260,w=100,h=60,sound_press='key',fontSize=30,text='L3',color='L' ,code=function() _setSel(03) end}, + WIDGET.new{type='button',pos={0.34,false},x=0,y=260,w=100,h=60,sound_press='key',fontSize=30,text='L2',color='lB',code=function() _setSel(04) end}, + WIDGET.new{type='button',pos={0.42,false},x=0,y=260,w=100,h=60,sound_press='key',fontSize=30,text='L1',color='lB',code=function() _setSel(05) end}, + WIDGET.new{type='button',pos={0.50,false},x=0,y=260,w=100,h=60,sound_press='key',fontSize=30,text='C', color='L' ,code=function() _setSel(06) end}, + WIDGET.new{type='button',pos={0.58,false},x=0,y=260,w=100,h=60,sound_press='key',fontSize=30,text='R1',color='lB',code=function() _setSel(07) end}, + WIDGET.new{type='button',pos={0.66,false},x=0,y=260,w=100,h=60,sound_press='key',fontSize=30,text='R2',color='lB',code=function() _setSel(08) end}, + WIDGET.new{type='button',pos={0.74,false},x=0,y=260,w=100,h=60,sound_press='key',fontSize=30,text='R3',color='L' ,code=function() _setSel(09) end}, + WIDGET.new{type='button',pos={0.82,false},x=0,y=260,w=100,h=60,sound_press='key',fontSize=30,text='R4',color='lD',code=function() _setSel(10) end}, + WIDGET.new{type='button',pos={0.90,false},x=0,y=260,w=100,h=60,sound_press='key',fontSize=30,text='R5',color='lD',code=function() _setSel(11) end}, - WIDGET.new{type='button',pos={0.1111,false},x=0,y=400,w=120,h=60,sound='key',fontSize=25,text=LANG'keySetting_restart', color='lR',code=function() _setSel(12) end}, - WIDGET.new{type='button',pos={0.1111,false},x=0,y=480,w=120,h=60,sound='key',fontSize=25,text=LANG'keySetting_skip', color='lG',code=function() _setSel(13) end}, - WIDGET.new{type='button',pos={0.1111,false},x=0,y=560,w=120,h=60,sound='key',fontSize=25,text=LANG'keySetting_auto', color='lO',code=function() _setSel(14) end}, - WIDGET.new{type='button',pos={0.3333,false},x=0,y=400,w=120,h=60,sound='key',fontSize=25,text=LANG'keySetting_sfxVolDn', color='lL',code=function() _setSel(15) end}, - WIDGET.new{type='button',pos={0.3333,false},x=0,y=480,w=120,h=60,sound='key',fontSize=25,text=LANG'keySetting_sfxVolUp', color='lL',code=function() _setSel(16) end}, - WIDGET.new{type='button',pos={0.5555,false},x=0,y=400,w=120,h=60,sound='key',fontSize=25,text=LANG'keySetting_musicVolDn',color='lL',code=function() _setSel(17) end}, - WIDGET.new{type='button',pos={0.5555,false},x=0,y=480,w=120,h=60,sound='key',fontSize=25,text=LANG'keySetting_musicVolUp',color='lL',code=function() _setSel(18) end}, - WIDGET.new{type='button',pos={0.7777,false},x=0,y=400,w=120,h=60,sound='key',fontSize=25,text=LANG'keySetting_dropSpdDn', color='lL',code=function() _setSel(19) end}, - WIDGET.new{type='button',pos={0.7777,false},x=0,y=480,w=120,h=60,sound='key',fontSize=25,text=LANG'keySetting_dropSpdUp', color='lL',code=function() _setSel(20) end}, + WIDGET.new{type='button',pos={0.1111,false},x=0,y=400,w=120,h=60,sound_press='key',fontSize=25,text=LANG'keySetting_restart', color='lR',code=function() _setSel(12) end}, + WIDGET.new{type='button',pos={0.1111,false},x=0,y=480,w=120,h=60,sound_press='key',fontSize=25,text=LANG'keySetting_skip', color='lG',code=function() _setSel(13) end}, + WIDGET.new{type='button',pos={0.1111,false},x=0,y=560,w=120,h=60,sound_press='key',fontSize=25,text=LANG'keySetting_auto', color='lO',code=function() _setSel(14) end}, + WIDGET.new{type='button',pos={0.3333,false},x=0,y=400,w=120,h=60,sound_press='key',fontSize=25,text=LANG'keySetting_sfxVolDn', color='lL',code=function() _setSel(15) end}, + WIDGET.new{type='button',pos={0.3333,false},x=0,y=480,w=120,h=60,sound_press='key',fontSize=25,text=LANG'keySetting_sfxVolUp', color='lL',code=function() _setSel(16) end}, + WIDGET.new{type='button',pos={0.5555,false},x=0,y=400,w=120,h=60,sound_press='key',fontSize=25,text=LANG'keySetting_musicVolDn',color='lL',code=function() _setSel(17) end}, + WIDGET.new{type='button',pos={0.5555,false},x=0,y=480,w=120,h=60,sound_press='key',fontSize=25,text=LANG'keySetting_musicVolUp',color='lL',code=function() _setSel(18) end}, + WIDGET.new{type='button',pos={0.7777,false},x=0,y=400,w=120,h=60,sound_press='key',fontSize=25,text=LANG'keySetting_dropSpdDn', color='lL',code=function() _setSel(19) end}, + WIDGET.new{type='button',pos={0.7777,false},x=0,y=480,w=120,h=60,sound_press='key',fontSize=25,text=LANG'keySetting_dropSpdUp', color='lL',code=function() _setSel(20) end}, - WIDGET.new{type='button_fill',pos={1,1},x=-120,y=-80,w=160,h=80,sound='back',fontSize=60,text=CHAR.icon.back,code=WIDGET.c_backScn()}, + WIDGET.new{type='button_fill',pos={1,1},x=-120,y=-80,w=160,h=80,sound_press='back',fontSize=60,text=CHAR.icon.back,code=WIDGET.c_backScn()}, } return scene diff --git a/assets/scene/stat.lua b/assets/scene/stat.lua index 6f3c03b..69b7512 100644 --- a/assets/scene/stat.lua +++ b/assets/scene/stat.lua @@ -58,7 +58,7 @@ scene.widgetList={ end end }, - WIDGET.new{type='button_fill',pos={1,1},x=-120,y=-80,w=160,h=80,sound='back',fontSize=60,text=CHAR.icon.back,code=WIDGET.c_backScn()}, + WIDGET.new{type='button_fill',pos={1,1},x=-120,y=-80,w=160,h=80,sound_press='back',fontSize=60,text=CHAR.icon.back,code=WIDGET.c_backScn()}, } return scene diff --git a/assets/track.lua b/assets/track.lua index bca3489..3bed7ac 100644 --- a/assets/track.lua +++ b/assets/track.lua @@ -280,7 +280,7 @@ function Track:release(weak,auto) end end -local approach,mix=MATH.expApproach,MATH.mix +local approach,lerp=MATH.expApproach,MATH.lerp local animManager={ position={'x','y'}, angle={'ang'}, @@ -307,7 +307,7 @@ function Track:update(dt) elseif animData.type=='L' then for j=1,#animKeys do local k=animKeys[j] - C[k]=mix(S[k],T[k],(self.time-animData.start)/animData.duration) + C[k]=lerp(S[k],T[k],(self.time-animData.start)/animData.duration) end if self.time>animData.start+animData.duration then for j=1,#animKeys do @@ -318,7 +318,7 @@ function Track:update(dt) elseif animData.type=='T' then for j=1,#animKeys do local k=animKeys[j] - C[k]=mix(S[k],T[k],-math.cos((self.time-animData.start)/animData.duration*MATH.pi)*.5+.5) + C[k]=lerp(S[k],T[k],-math.cos((self.time-animData.start)/animData.duration*MATH.pi)*.5+.5) end if self.time>animData.start+animData.duration then for j=1,#animKeys do diff --git a/main.lua b/main.lua index de7e742..0bcda39 100644 --- a/main.lua +++ b/main.lua @@ -170,20 +170,21 @@ SCR.setSize(1280,720) BGM.setDefault('title') BGM.setMaxSources(5) VOC.setDiversion(.62) -WIDGET._prototype.button.sound='button' +WIDGET._prototype.button.sound_press='button' WIDGET._prototype.checkBox.sound_on='check' WIDGET._prototype.checkBox.sound_off='uncheck' -WIDGET._prototype.selector.sound='selector' +WIDGET._prototype.selector.sound_press='selector' +WIDGET._prototype.listBox.sound_select='click' WIDGET._prototype.inputBox.sound_input='hit5' WIDGET._prototype.inputBox.sound_bksp='hit3' -WIDGET._prototype.inputBox.sound_delete='hold1' +WIDGET._prototype.inputBox.sound_bksp='hold1' WIDGET._prototype.inputBox.sound_clear='hold4' WIDGET._prototype.textBox.sound_clear='hold4' WIDGET._prototype.slider.numFontType='norm' WIDGET._prototype.slider_fill.lineWidth=2 WIDGET._prototype.switch.labelPos='left' WIDGET._prototype.button.lineWidth=2 -WIDGET._prototype.button_fill.color_text=TABLE.shift(COLOR.D) +WIDGET._prototype.button_fill.textColor=TABLE.shift(COLOR.D) LANG.add{ zh='assets/language/lang_zh.lua', en='assets/language/lang_en.lua', @@ -203,11 +204,12 @@ IMG.init{ particle4='assets/image/z_particle4.png', } } -SFX.init((function() +SFX.load((function() + local path='assets/effect/chiptune/' local L={} - for _,v in next,love.filesystem.getDirectoryItems('assets/effect/chiptune/') do - if FILE.isSafe('assets/effect/chiptune/'..v) then - L[v:sub(1,-5)]=v + for _,v in next,love.filesystem.getDirectoryItems(path) do + if FILE.isSafe(path..v) then + L[v:sub(1,-5)]=path..v end end return L