diff --git a/assets/fmod20221/init.lua b/assets/fmod20221/init.lua index b53ed31d..b6c30290 100644 --- a/assets/fmod20221/init.lua +++ b/assets/fmod20221/init.lua @@ -100,7 +100,7 @@ end -------------------------- ----@type table|fun(name:string, args:{instant?:boolean, volume?:number, pitch?:number, tune?:number, fine?:number, pos?:table, param?:table}):FMOD.Studio.EventInstance? +---@type table|fun(name:string, args?:{instant?:boolean, volume?:number, pitch?:number, tune?:number, fine?:number, pos?:table, param?:table}):FMOD.Studio.EventInstance? M.music={} ---@param v number @@ -216,7 +216,7 @@ setmetatable(M.music,{__call=function(_,...) playMusic(...) end}) -------------------------- ----@type table|fun(name:string, args:{instant?:boolean, volume?:number, pitch?:number, tune?:number, fine?:number, pos?:table, param?:table}):FMOD.Studio.EventInstance? +---@type table|fun(name:string, args?:{instant?:boolean, volume?:number, pitch?:number, tune?:number, fine?:number, pos?:table, param?:table}):FMOD.Studio.EventInstance? M.effect={} ---@param v number diff --git a/assets/game/gemPlayer.lua b/assets/game/gemPlayer.lua index 78241b1f..c5e9183e 100644 --- a/assets/game/gemPlayer.lua +++ b/assets/game/gemPlayer.lua @@ -69,16 +69,16 @@ local defaultSoundFunc={ playSample('sine',{'A2',2.2-num/5},{'E3',2.2-num/5}) end end, - move= function() FMOD.effect.play('move') end, - move_failed= function() FMOD.effect.play('move_failed') end, - swap= function() FMOD.effect.play('rotate') end, - swap_failed= function() FMOD.effect.play('tuck') end, - twist= function() FMOD.effect.play('rotate') end, - twist_failed= function() FMOD.effect.play('tuck') end, - move_back= function() FMOD.effect.play('rotate_failed') end, - touch= function() FMOD.effect.play('lock') end, + move= function() FMOD.effect('move') end, + move_failed= function() FMOD.effect('move_failed') end, + swap= function() FMOD.effect('rotate') end, + swap_failed= function() FMOD.effect('tuck') end, + twist= function() FMOD.effect('rotate') end, + twist_failed= function() FMOD.effect('tuck') end, + move_back= function() FMOD.effect('rotate_failed') end, + touch= function() FMOD.effect('lock') end, clear=function(lines) - FMOD.effect.play( + FMOD.effect( lines==1 and 'clear_1' or lines==2 and 'clear_2' or lines==3 and 'clear_3' or @@ -88,8 +88,8 @@ local defaultSoundFunc={ end, combo= function() end, chain= function() end, - win= function() FMOD.effect.play('win') end, - fail= function() FMOD.effect.play('fail') end, + win= function() FMOD.effect('win') end, + fail= function() FMOD.effect('fail') end, } GP.scriptCmd={ } diff --git a/assets/game/mechanicLib/mino/stack.lua b/assets/game/mechanicLib/mino/stack.lua index 624ef3cc..9d4cd322 100644 --- a/assets/game/mechanicLib/mino/stack.lua +++ b/assets/game/mechanicLib/mino/stack.lua @@ -73,7 +73,7 @@ function stack.switch(P) P.settings.dropDelay,P.settings.lockDelay=1e99,1e99 P.particles.boardSmoke:start() - FMOD.effect.play('music_highcut') + FMOD.effect('music_highcut') else if md.stack_lines>0 then P:say{ diff --git a/assets/game/minoPlayer.lua b/assets/game/minoPlayer.lua index 1707c193..8ec50e8c 100644 --- a/assets/game/minoPlayer.lua +++ b/assets/game/minoPlayer.lua @@ -40,25 +40,25 @@ local defaultSoundFunc={ playSample('sine',{'A2',2.2-num/5},{'E3',2.2-num/5}) end end, - move= function() FMOD.effect.play('move') end, - move_down= function() FMOD.effect.play('move_down') end, - move_failed= function() FMOD.effect.play('move_failed') end, - tuck= function() FMOD.effect.play('tuck') end, - rotate= function() FMOD.effect.play('rotate') end, - rotate_init= function() FMOD.effect.play('rotate_init') end, - rotate_locked= function() FMOD.effect.play('rotate_locked') end, - rotate_corners= function() FMOD.effect.play('rotate_corners') end, - rotate_failed= function() FMOD.effect.play('rotate_failed') end, - rotate_special= function() FMOD.effect.play('rotate_special') end, - hold= function() FMOD.effect.play('hold') end, - hold_init= function() FMOD.effect.play('hold_init') end, - touch= function() FMOD.effect.play('touch') end, - drop= function() FMOD.effect.play('drop') end, - lock= function() FMOD.effect.play('lock') end, - b2b= function(lv) FMOD.effect.play('b2b_'..min(lv,10)) end, - b2b_break= function() FMOD.effect.play('b2b_break') end, + move= function() FMOD.effect('move') end, + move_down= function() FMOD.effect('move_down') end, + move_failed= function() FMOD.effect('move_failed') end, + tuck= function() FMOD.effect('tuck') end, + rotate= function() FMOD.effect('rotate') end, + rotate_init= function() FMOD.effect('rotate_init') end, + rotate_locked= function() FMOD.effect('rotate_locked') end, + rotate_corners= function() FMOD.effect('rotate_corners') end, + rotate_failed= function() FMOD.effect('rotate_failed') end, + rotate_special= function() FMOD.effect('rotate_special') end, + hold= function() FMOD.effect('hold') end, + hold_init= function() FMOD.effect('hold_init') end, + touch= function() FMOD.effect('touch') end, + drop= function() FMOD.effect('drop') end, + lock= function() FMOD.effect('lock') end, + b2b= function(lv) FMOD.effect('b2b_'..min(lv,10)) end, + b2b_break= function() FMOD.effect('b2b_break') end, clear=function(lines) - FMOD.effect.play( + FMOD.effect( lines<=6 and 'clear_'..lines or lines<=18 and 'clear_'..(lines-lines%2) or lines<=22 and 'clear_'..lines or @@ -67,12 +67,12 @@ local defaultSoundFunc={ ) end, spin=function(lines) - if lines==0 then FMOD.effect.play('spin_0') - elseif lines==1 then FMOD.effect.play('spin_1') - elseif lines==2 then FMOD.effect.play('spin_2') - elseif lines==3 then FMOD.effect.play('spin_3') - elseif lines==4 then FMOD.effect.play('spin_4') - else FMOD.effect.play('spin_mega') + if lines==0 then FMOD.effect('spin_0') + elseif lines==1 then FMOD.effect('spin_1') + elseif lines==2 then FMOD.effect('spin_2') + elseif lines==3 then FMOD.effect('spin_3') + elseif lines==4 then FMOD.effect('spin_4') + else FMOD.effect('spin_mega') end end, combo=setmetatable({ @@ -108,15 +108,15 @@ local defaultSoundFunc={ playSample('square',{57+phase,1-(phase/12)^2,400-10*combo,700+20*combo}) -- A5+ end end,__metatable=true}), - frenzy= function() FMOD.effect.play('frenzy') end, - allClear= function() FMOD.effect.play('clear_all') end, - halfClear= function() FMOD.effect.play('clear_half') end, - suffocate= function() FMOD.effect.play('suffocate') end, - desuffocate= function() FMOD.effect.play('desuffocate') end, - reach= function() FMOD.effect.play('beep_rise') end, - notice= function() FMOD.effect.play('beep_notice') end, - win= function() FMOD.effect.play('win') end, - fail= function() FMOD.effect.play('fail') end, + frenzy= function() FMOD.effect('frenzy') end, + allClear= function() FMOD.effect('clear_all') end, + halfClear= function() FMOD.effect('clear_half') end, + suffocate= function() FMOD.effect('suffocate') end, + desuffocate= function() FMOD.effect('desuffocate') end, + reach= function() FMOD.effect('beep_rise') end, + notice= function() FMOD.effect('beep_notice') end, + win= function() FMOD.effect('win') end, + fail= function() FMOD.effect('fail') end, } MP.scriptCmd={ clearHold=function(P) P:clearHold() end, diff --git a/assets/game/minomap.lua b/assets/game/minomap.lua index 61afdef4..33374f75 100644 --- a/assets/game/minomap.lua +++ b/assets/game/minomap.lua @@ -260,7 +260,7 @@ end local function _selectMode(m) selected=m if m then - FMOD.effect.play('map_select') + FMOD.effect('map_select') end end local function _enterMode(m) @@ -268,7 +268,7 @@ local function _enterMode(m) if love.filesystem.getInfo('assets/game/mode/mino/exterior/'..m.name..'.lua') then enterFX.timer=0 enterFX.x,enterFX.y,enterFX.r=m.x,m.y,m.r - FMOD.effect.play('map_enter') + FMOD.effect('map_enter') SCN.go('game_out','fade','mino/exterior/'..m.name) else MSG.new('warn',"Mode file not exist") @@ -343,7 +343,7 @@ function map:update(dt) cam.x0,cam.y0=-a.x,-a.y cam.k0,cam.a0=1,0 if TASK.lock('minomap_unlockSound',.26) then - FMOD.effect.play(a.sound) + FMOD.effect(a.sound) end end else diff --git a/assets/game/puyoPlayer.lua b/assets/game/puyoPlayer.lua index a725d796..867661ea 100644 --- a/assets/game/puyoPlayer.lua +++ b/assets/game/puyoPlayer.lua @@ -40,18 +40,18 @@ local defaultSoundFunc={ playSample('sine',{'A2',2.2-num/5},{'E3',2.2-num/5}) end end, - move= function() FMOD.effect.play('move') end, - move_down= function() FMOD.effect.play('move_down') end, - move_failed= function() FMOD.effect.play('move_failed') end, - rotate= function() FMOD.effect.play('rotate') end, - rotate_init= function() FMOD.effect.play('rotate_init') end, - rotate_failed= function() FMOD.effect.play('rotate_failed') end, - rotate_special= function() FMOD.effect.play('rotate_special') end, - touch= function() FMOD.effect.play('touch') end, - drop= function() FMOD.effect.play('drop') end, - lock= function() FMOD.effect.play('lock') end, + move= function() FMOD.effect('move') end, + move_down= function() FMOD.effect('move_down') end, + move_failed= function() FMOD.effect('move_failed') end, + rotate= function() FMOD.effect('rotate') end, + rotate_init= function() FMOD.effect('rotate_init') end, + rotate_failed= function() FMOD.effect('rotate_failed') end, + rotate_special= function() FMOD.effect('rotate_special') end, + touch= function() FMOD.effect('touch') end, + drop= function() FMOD.effect('drop') end, + lock= function() FMOD.effect('lock') end, clear=function(lines) - FMOD.effect.play( + FMOD.effect( lines==1 and 'clear_1' or lines==2 and 'clear_2' or lines==3 and 'clear_3' or @@ -92,14 +92,14 @@ local defaultSoundFunc={ playSample('square',{57+phase,1-(phase/12)^2,400-10*chain,700+20*chain}) -- A5+ end end,__metatable=true}), - frenzy= function() FMOD.effect.play('frenzy') end, - allClear= function() FMOD.effect.play('clear_all') end, - suffocate= function() FMOD.effect.play('suffocate') end, - desuffocate= function() FMOD.effect.play('desuffocate') end, - reach= function() FMOD.effect.play('beep_rise') end, - notice= function() FMOD.effect.play('beep_notice') end, - win= function() FMOD.effect.play('win') end, - fail= function() FMOD.effect.play('fail') end, + frenzy= function() FMOD.effect('frenzy') end, + allClear= function() FMOD.effect('clear_all') end, + suffocate= function() FMOD.effect('suffocate') end, + desuffocate= function() FMOD.effect('desuffocate') end, + reach= function() FMOD.effect('beep_rise') end, + notice= function() FMOD.effect('beep_notice') end, + win= function() FMOD.effect('win') end, + fail= function() FMOD.effect('fail') end, } PP.scriptCmd={ } diff --git a/assets/gamefunc.lua b/assets/gamefunc.lua index c8a100e9..d21599f3 100644 --- a/assets/gamefunc.lua +++ b/assets/gamefunc.lua @@ -13,9 +13,9 @@ function playBgm(name,full,noProgress) if name==_bgmPlaying then return end if not noProgress then PROGRESS.setBgmUnlocked(name,full and 2 or 1) end if full then - FMOD.music.play(name) + FMOD.music(name) else - FMOD.music.play(name,{param={"intensity",0,true}}) + FMOD.music(name,{param={"intensity",0,true}}) end _bgmPlaying=name end @@ -38,7 +38,7 @@ function playSample(...) local vol=l[i][2] or 1 local len=l[i][3] or 420 local rel=l[i][4] or 620 - local event=FMOD.effect.play(inst,{ + local event=FMOD.effect(inst,{ tune=note-33, volume=vol, param={'release',rel*1.0594630943592953^(note-33)}, diff --git a/assets/progress.lua b/assets/progress.lua index d75c2999..f21685a3 100644 --- a/assets/progress.lua +++ b/assets/progress.lua @@ -397,7 +397,7 @@ function PROGRESS.setModeState(style,name,state,force) PROGRESS.save() if state==0 and state>orgState then if TASK.lock('minomap_unlockSound_background',2.6) then - FMOD.effect.play('map_unlock_background') + FMOD.effect('map_unlock_background') MSG.new('check',Text.new_level_unlocked,2.6) end end diff --git a/assets/scene/app_15p.lua b/assets/scene/app_15p.lua index 983fb4ba..eb0bfbb6 100644 --- a/assets/scene/app_15p.lua +++ b/assets/scene/app_15p.lua @@ -120,10 +120,10 @@ local function tapBoard(x,y,key) if checkBoard(b) then state=2 time=love.timer.getTime()-startTime - FMOD.effect.play('win') + FMOD.effect('win') return end - FMOD.effect.play('touch') + FMOD.effect('touch') end end end diff --git a/assets/scene/app_2048.lua b/assets/scene/app_2048.lua index 042dc25a..4543be0a 100644 --- a/assets/scene/app_2048.lua +++ b/assets/scene/app_2048.lua @@ -119,14 +119,14 @@ local function newTile() -- Die. state=2 - FMOD.effect.play(maxTile>=10 and 'win' or 'fail') + FMOD.effect(maxTile>=10 and 'win' or 'fail') end local function freshMaxTile() maxTile=maxTile+1 if maxTile==12 then skipper.cd=0 end - FMOD.effect.play('reach') + FMOD.effect('reach') table.insert(progress,("%s - %.3fs"):format(tileName[maxTile],love.timer.getTime()-startTime)) end local function squash(L) @@ -221,9 +221,9 @@ local function skip() skipper.cd=1024 skipper.used=true newTile() - FMOD.effect.play('hold') + FMOD.effect('hold') else - FMOD.effect.play('finesseError') + FMOD.effect('finesseError') end end end @@ -309,7 +309,7 @@ function scene.keyDown(key,isRep) if skipper.cd and skipper.cd>0 then skipper.cd=skipper.cd-1 if skipper.cd==0 then - FMOD.effect.play('spin_0') + FMOD.effect('spin_0') end end newTile() @@ -322,7 +322,7 @@ function scene.keyDown(key,isRep) } move=move+1 if not autoPressing then - FMOD.effect.play('touch') + FMOD.effect('touch') end end end diff --git a/assets/scene/app_AtoZ.lua b/assets/scene/app_AtoZ.lua index 870af3fe..5398f448 100644 --- a/assets/scene/app_AtoZ.lua +++ b/assets/scene/app_AtoZ.lua @@ -57,18 +57,18 @@ function scene.keyDown(key,isRep) style='score', duration=.4, } - FMOD.effect.play('touch') + FMOD.effect('touch') if progress==2 then state=1 startTime=love.timer.getTime() elseif progress>#targetString then time=love.timer.getTime()-startTime state=2 - FMOD.effect.play('reach') + FMOD.effect('reach') end elseif progress>1 then mistake=mistake+1 - FMOD.effect.play('finesseError') + FMOD.effect('finesseError') end end elseif key=='left' or key=='right' then diff --git a/assets/scene/app_UTTT.lua b/assets/scene/app_UTTT.lua index fbfca121..7db9a609 100644 --- a/assets/scene/app_UTTT.lua +++ b/assets/scene/app_UTTT.lua @@ -58,7 +58,7 @@ local function full(L) end local function place(X,x) board[X][x]=round - FMOD.effect.play('touch') + FMOD.effect('touch') lastX,lastx=X,x curX,curx=nil placeTime=love.timer.getTime() @@ -66,7 +66,7 @@ local function place(X,x) score[X]=round if checkBoard(score,round) then gameover=round - FMOD.effect.play('win') + FMOD.effect('win') return else if full(score) then @@ -74,10 +74,10 @@ local function place(X,x) return end end - FMOD.effect.play('reach') + FMOD.effect('reach') else if full(board[X]) then - FMOD.effect.play('emit') + FMOD.effect('emit') score[X]=true if full(score) then gameover=true diff --git a/assets/scene/app_cubefield.lua b/assets/scene/app_cubefield.lua index a71c079f..721a4f36 100644 --- a/assets/scene/app_cubefield.lua +++ b/assets/scene/app_cubefield.lua @@ -37,9 +37,9 @@ local function hurt(i) speed=speed*.5 moveDir=0 score=floor(score) - FMOD.effect.play('clear_4') + FMOD.effect('clear_4') else - FMOD.effect.play('clear_2') + FMOD.effect('clear_2') end end @@ -185,7 +185,7 @@ function scene.update(dt) speed=speed+.2 end level=level+1 - FMOD.effect.play('warn_1') + FMOD.effect('warn_1') end sunH=sunH+.01 elseif menu==1 then diff --git a/assets/scene/app_dropper.lua b/assets/scene/app_dropper.lua index ed7e8df0..741c4593 100644 --- a/assets/scene/app_dropper.lua +++ b/assets/scene/app_dropper.lua @@ -50,7 +50,7 @@ function scene.keyDown(key,isRep) move.x=move.x-10 end end - FMOD.effect.play('hold') + FMOD.effect('hold') state='drop' elseif state=='dead' then move.x,move.y,move.l=1e99,0,0 @@ -77,7 +77,7 @@ function scene.update() if state=='move' then move.x=move.x+speed if speed<0 and move.x<=0 or speed>0 and move.x+move.l>=1280 then - FMOD.effect.play('lock') + FMOD.effect('lock') speed=-speed end elseif state=='drop' then @@ -88,9 +88,9 @@ function scene.update() state='die' else move.y=660 - FMOD.effect.play('clear_1') + FMOD.effect('clear_1') if floor>0 and move.x==base.x then - FMOD.effect.play('ren_mega') + FMOD.effect('ren_mega') end state='shorten' end diff --git a/assets/scene/app_dtw.lua b/assets/scene/app_dtw.lua index 2168e8ad..cc79c05a 100644 --- a/assets/scene/app_dtw.lua +++ b/assets/scene/app_dtw.lua @@ -212,7 +212,7 @@ local function touch(n) t=t:sub(1,p-1)..t:sub(p+1) if #t>0 then pos[1]=tonumber(t) - FMOD.effect.play('lock') + FMOD.effect('lock') else rem(pos,1) while #pos<7 do generator[mode]() end @@ -227,19 +227,19 @@ local function touch(n) end time=love.timer.getTime()-startTime state=2 - FMOD.effect.play('win') + FMOD.effect('win') else - FMOD.effect.play('reach',{volume=.5}) + FMOD.effect('reach',{volume=.5}) end end height=height+120 - FMOD.effect.play('lock') + FMOD.effect('lock') end else time=love.timer.getTime()-startTime state=2 diePos=n - FMOD.effect.play('clear_2') + FMOD.effect('clear_2') end end function scene.keyDown(key,isRep) @@ -289,7 +289,7 @@ function scene.update(dt) rollSpeed=rollSpeed+.00355 if height<-120 then state=2 - FMOD.effect.play('clear_2') + FMOD.effect('clear_2') end else height=height*.6 diff --git a/assets/scene/app_link.lua b/assets/scene/app_link.lua index 834f42ca..cb4cfc6b 100644 --- a/assets/scene/app_link.lua +++ b/assets/scene/app_link.lua @@ -200,8 +200,8 @@ local function tap(x,y) -- Check win if field.remain==0 then if noComboBreak then - FMOD.effect.play('emit') - FMOD.effect.play('clear_4') + FMOD.effect('emit') + FMOD.effect('clear_4') TEXT:add("FULL COMBO",640,360,100,'beat',.626) comboTime=comboTime+3 score=floor(score*1.1) @@ -214,13 +214,13 @@ local function tap(x,y) level=level+1 if levels[level] then resetBoard() - FMOD.effect.play('reach') + FMOD.effect('reach') else state=2 - FMOD.effect.play('win') + FMOD.effect('win') end else - FMOD.effect.play( + FMOD.effect( combo<50 and 'clear_1' or combo<100 and 'clear_2' or 'clear_3',.8 @@ -229,12 +229,12 @@ local function tap(x,y) selX,selY=false,false else selX,selY=x,y - FMOD.effect.play('lock',{volume=.9}) + FMOD.effect('lock',{volume=.9}) end else if field[y][x] and (x~=selX or y~=selY) then selX,selY=x,y - FMOD.effect.play('lock',{volume=.8}) + FMOD.effect('lock',{volume=.8}) end end end diff --git a/assets/scene/app_mahjong.lua b/assets/scene/app_mahjong.lua index e2d522ab..ac827fe4 100644 --- a/assets/scene/app_mahjong.lua +++ b/assets/scene/app_mahjong.lua @@ -95,8 +95,8 @@ local function _throwCard() if hand[selected] and #pool<40 then ins(pool,rem(hand,selected)) table.sort(hand) - FMOD.effect.play('hold') - FMOD.effect.play('lock') + FMOD.effect('hold') + FMOD.effect('lock') if #pool<40 then ins(hand,(TABLE.popRandom(deck))) end diff --git a/assets/scene/app_memorize.lua b/assets/scene/app_memorize.lua index 280eaa24..759c5d4c 100644 --- a/assets/scene/app_memorize.lua +++ b/assets/scene/app_memorize.lua @@ -51,7 +51,7 @@ function scene.keyDown(key,isRep) if input==showNum then level=level+1 freshLevel() - FMOD.effect.play('reach') + FMOD.effect('reach') end elseif key=='space' or key=='backspace' then input="" @@ -68,7 +68,7 @@ function scene.update(dt) if inputTime<=0 then inputTime=0 state=1 - FMOD.effect.play('finesseError_long',{volume=.6}) + FMOD.effect('finesseError_long',{volume=.6}) end end end diff --git a/assets/scene/app_piano.lua b/assets/scene/app_piano.lua index effbe632..0e8f2742 100644 --- a/assets/scene/app_piano.lua +++ b/assets/scene/app_piano.lua @@ -29,7 +29,7 @@ function scene.keyDown(key,isRep) local note=keys[key]+offset if kb.isDown('lshift','rshift') then note=note+1 end if kb.isDown('lctrl','rctrl') then note=note-1 end - activeEventMap[key]=FMOD.effect.play(inst,{ + activeEventMap[key]=FMOD.effect(inst,{ tune=note-21, volume=1, param={'release',1000*1.0594630943592953^(note-21)}, diff --git a/assets/scene/app_polyforge.lua b/assets/scene/app_polyforge.lua index d7e94f40..bc1fb046 100644 --- a/assets/scene/app_polyforge.lua +++ b/assets/scene/app_polyforge.lua @@ -55,19 +55,19 @@ function scene.keyDown(key,isRep) if hit[c]==0 then hit[c]=1 count=count+1 - FMOD.effect.play(side<26 and 'ren_'..rnd(5) or 'ren_'..rnd(6,11)) + FMOD.effect(side<26 and 'ren_'..rnd(5) or 'ren_'..rnd(6,11)) if count>=12 then - FMOD.effect.play('ren_mega',{volume=(count-11)/15}) + FMOD.effect('ren_mega',{volume=(count-11)/15}) end if count==side then state=1 - FMOD.effect.play('spin_0') + FMOD.effect('spin_0') else - FMOD.effect.play('lock') + FMOD.effect('lock') end else hit[c]=2 - FMOD.effect.play('emit') + FMOD.effect('emit') needReset=true state=1 end diff --git a/assets/scene/app_pong.lua b/assets/scene/app_pong.lua index 42c0f503..b88fae5f 100644 --- a/assets/scene/app_pong.lua +++ b/assets/scene/app_pong.lua @@ -53,7 +53,7 @@ function scene.keyDown(key,isRep) vx,vy=0,0 ry=0 p1.score,p2.score=0,0 - FMOD.effect.play('hold') + FMOD.effect('hold') elseif key=='w' or key=='s' then p1.y0=false elseif key=='up' or key=='down' then @@ -123,7 +123,7 @@ function scene.update() vx=-vx-(vx>0 and .05 or -.5) vy=vy+d*.08+P.vy*.5 ry=P.vy - FMOD.effect.play('collect') + FMOD.effect('collect') else state=2 end @@ -131,14 +131,14 @@ function scene.update() if by<30 or by>690 then by=by<30 and 30 or 690 vy,ry=-vy,-ry - FMOD.effect.play('collect') + FMOD.effect('collect') end elseif state==2 then -- Game over if bx<-120 or bx>1400 or by<-40 or by>760 then P=bx>640 and p1 or p2 P.score=P.score+1 TEXT:add("+1",P==p1 and 470 or 810,226,50,'score') - FMOD.effect.play('reach') + FMOD.effect('reach') state=0 bx,by=640,360 diff --git a/assets/scene/app_schulteG.lua b/assets/scene/app_schulteG.lua index ce0ed19c..6ef6a44e 100644 --- a/assets/scene/app_schulteG.lua +++ b/assets/scene/app_schulteG.lua @@ -50,11 +50,11 @@ local function tapBoard(x,y) if board[x]==progress+1 then progress=progress+1 if progress=6 then @@ -101,10 +101,10 @@ local function merge() maxTile<=8 and 3 or maxTile<=11 and 4 or 5 - FMOD.effect.play('reach') + FMOD.effect('reach') end if chosen>=5 then - FMOD.effect.play( + FMOD.effect( chosen>=9 and 'ren_mega' or chosen>=8 and 'spin_3' or chosen>=7 and 'spin_2' or @@ -202,10 +202,10 @@ function scene.update() for i=1,4 do for j=1,5 do if board[i][j]==board[i+1][j] then return end end end for i=1,5 do for j=1,4 do if board[i][j]==board[i][j+1] then return end end end state=2 - FMOD.effect.play('fail') + FMOD.effect('fail') else fallingTimer=fast and 4 or 5 - FMOD.effect.play('touch') + FMOD.effect('touch') end end elseif fast and ( diff --git a/assets/scene/app_triple.lua b/assets/scene/app_triple.lua index 033ce2c9..604f6c0b 100644 --- a/assets/scene/app_triple.lua +++ b/assets/scene/app_triple.lua @@ -124,7 +124,7 @@ end function player:click(y,x) if y==1 and x==1 then self.nexts[1],self.hold=self.hold,self.nexts[1] - FMOD.effect.play('hold') + FMOD.effect('hold') if not self.nexts[1] then rem(self.nexts,1) ins(self.nexts,self:newTile()) @@ -144,13 +144,13 @@ function player:click(y,x) if self.nexts[1]==-2 then self.board[y][x]=0 - FMOD.effect.play('clear_2') + FMOD.effect('clear_2') rem(self.nexts,1) ins(self.nexts,self:newTile()) newMergeFX(y,x,-2) else self.board[y][x]=rem(self.nexts,1) - FMOD.effect.play('touch') + FMOD.effect('touch') local cur,merged repeat @@ -168,7 +168,7 @@ function player:click(y,x) if self.maxTile>=6 then ins(self.progress,("%s - %.3fs"):format(self.maxTile,love.timer.getTime()-player.startTime)) end - FMOD.effect.play('reach') + FMOD.effect('reach') end local getScore=4^cur*count @@ -185,9 +185,9 @@ function player:click(y,x) self.selectX,self.selectY=false,false if merged then - FMOD.effect.play('lock') + FMOD.effect('lock') if cur>=4 then - FMOD.effect.play( + FMOD.effect( cur>=8 and 'ren_mega' or cur>=7 and 'spin_3' or cur>=6 and 'spin_2' or @@ -202,7 +202,7 @@ function player:click(y,x) end end self.state=2 - FMOD.effect.play('fail') + FMOD.effect('fail') end end else diff --git a/assets/scene/dictionary.lua b/assets/scene/dictionary.lua index e055b64f..df664b20 100644 --- a/assets/scene/dictionary.lua +++ b/assets/scene/dictionary.lua @@ -57,7 +57,7 @@ local enDict=FILE.load('assets/language/dict_en.lua','-lua -canskip') local listBox,inputBox,linkButton,copyButton local function close() quiting=true - FMOD.effect.play('dict_close') + FMOD.effect('dict_close') end local function selectItem(item) selected=item @@ -95,12 +95,12 @@ end local function openLink() if selected.link then love.system.openURL(selected.link) - FMOD.effect.play('dict_link') + FMOD.effect('dict_link') end end local function copyText() love.system.setClipboardText(("%s:\n%s\n==Techmino Dict==\n"):format(selected.titleFull,selected.content)) - FMOD.effect.play('dict_copy') + FMOD.effect('dict_copy') copyButton:setVisible(false) end local function freshWidgetPos() @@ -258,7 +258,7 @@ function scene.enter() aboveScene=SCN.scenes[SCN.stack[#SCN.stack-1]] or NONE searchTimer,lastSearchText=0,'' inputBox._value='' - FMOD.effect.play('dict_open') + FMOD.effect('dict_open') freshWidgetPos() selectItem(false) @@ -341,7 +341,7 @@ function scene.keyDown(key,isRep) local sel=listBox:getItem() listBox:arrowKey(key) if listBox:getItem()~=sel then - FMOD.effect.play(listBox.sound_select) + FMOD.effect(listBox.sound_select) end end elseif act=='help' or act=='back' then @@ -364,7 +364,7 @@ function scene.keyDown(key,isRep) if act=='select' then if selected~=listBox:getItem() and listBox:getItem() then listBox.code() - FMOD.effect.play(listBox.sound_click) + FMOD.effect(listBox.sound_click) end elseif key=='home' then listBox:scroll(-1e99) diff --git a/assets/scene/game_out.lua b/assets/scene/game_out.lua index 17f82d3f..11835b50 100644 --- a/assets/scene/game_out.lua +++ b/assets/scene/game_out.lua @@ -33,7 +33,7 @@ local function sysAction(action) end elseif action=='back' then if canPause() then - FMOD.effect.play('pause') + FMOD.effect('pause') SCN.swapTo('pause_out','none') else SCN.back() diff --git a/assets/scene/keyset_press.lua b/assets/scene/keyset_press.lua index 09aa6149..c8b9412e 100644 --- a/assets/scene/keyset_press.lua +++ b/assets/scene/keyset_press.lua @@ -25,13 +25,13 @@ function scene.keyDown(key,isRep) local L=KEYMAP[mode]:getKeys(act) if L then TABLE.cut(L) end result=Text.keyset_deleted - FMOD.effect.play('beep_down') + FMOD.effect('beep_down') else escTimerWTF=false result=key KEYMAP[mode]:remKey(key) KEYMAP[mode]:addKey(act,key) - FMOD.effect.play('beep_rise') + FMOD.effect('beep_rise') end end diff --git a/assets/scene/main_in.lua b/assets/scene/main_in.lua index 05def6c7..33bc6464 100644 --- a/assets/scene/main_in.lua +++ b/assets/scene/main_in.lua @@ -90,12 +90,12 @@ scene.widgetList={ {name='LangSel',type='button', pos={.5,.5},x=-270,y=320,w=400,h=100,text=CHAR.icon.language, fontSize=70,lineWidth=4,cornerR=0,code=WIDGET.c_goScn('lang_in','none')}, {name='GameSet',type='button', pos={.5,.5},x=270, y=320,w=400,h=100,text=LANG'main_in_settings', fontSize=40,lineWidth=4,cornerR=0,sound_trigger=false,code=function() if PROGRESS.get('main')<=2 or isCtrlPressed() then - FMOD.effect.play('button_norm') + FMOD.effect('button_norm') SCN.go('setting_in','none') else consoleClickCount=consoleClickCount+1 - FMOD.effect.play('move_failed') - FMOD.effect.play('suffocate',{tune=consoleClickCount-5.626}) + FMOD.effect('move_failed') + FMOD.effect('suffocate',{tune=consoleClickCount-5.626}) if consoleClickCount==6 then consoleClickCount=0 SCN.go('_console') diff --git a/assets/scene/pause_in.lua b/assets/scene/pause_in.lua index a2643e1d..9ac4c2cb 100644 --- a/assets/scene/pause_in.lua +++ b/assets/scene/pause_in.lua @@ -59,8 +59,8 @@ scene.widgetList={ if PROGRESS.get('main')<=2 or isCtrlPressed() then sysAction('setting') else - FMOD.effect.play('move_failed') - FMOD.effect.play('suffocate',{tune=MATH.rand(-6,2)}) + FMOD.effect('move_failed') + FMOD.effect('suffocate',{tune=MATH.rand(-6,2)}) end end, }, diff --git a/assets/scene/pause_out.lua b/assets/scene/pause_out.lua index e128c9e2..63d9e079 100644 --- a/assets/scene/pause_out.lua +++ b/assets/scene/pause_out.lua @@ -15,16 +15,16 @@ end local function sysAction(action) if action=='quit' then - FMOD.effect.play('pause_quit') + FMOD.effect('pause_quit') SCN.back() elseif action=='back' then - FMOD.effect.play('unpause') + FMOD.effect('unpause') SCN.swapTo('game_out','none') elseif action=='restart' then - FMOD.effect.play('pause_restart') + FMOD.effect('pause_restart') SCN.swapTo('game_out',nil,GAME.mode.name) elseif action=='setting' then - FMOD.effect.play('pause_setting') + FMOD.effect('pause_setting') SCN.go('setting_out') end end diff --git a/assets/scene/setting_out.lua b/assets/scene/setting_out.lua index a9579eb0..4de473ef 100644 --- a/assets/scene/setting_out.lua +++ b/assets/scene/setting_out.lua @@ -82,7 +82,7 @@ scene.widgetList={ FMOD.setMainVolume(SETTINGS.system.mainVol,true) stopBgm() PROGRESS.playExteriorBGM() - FMOD.effect.play('beep_notice') + FMOD.effect('beep_notice') end}, -- Video diff --git a/assets/scene/simulation.lua b/assets/scene/simulation.lua index 5d0b2ed1..1d7521e2 100644 --- a/assets/scene/simulation.lua +++ b/assets/scene/simulation.lua @@ -145,7 +145,7 @@ function scene.keyDown(key,isRep) if subjectFocused then if not sims[subjectFocused].trigTimer then sims[subjectFocused].trigTimer=0 - FMOD.effect.play('simulation_select') + FMOD.effect('simulation_select') end end elseif KEYMAP.sys:getAction(key)=='back' then diff --git a/assets/scene/tutorial_rotate.lua b/assets/scene/tutorial_rotate.lua index f163c4b7..0caeeab8 100644 --- a/assets/scene/tutorial_rotate.lua +++ b/assets/scene/tutorial_rotate.lua @@ -108,7 +108,7 @@ local function endGame(passLevel) inPoint=.1, outPoint=0, } - if passLevel>0 then FMOD.effect.play('win') end + if passLevel>0 then FMOD.effect('win') end autoQuitInterior() end @@ -129,7 +129,7 @@ function scene.keyDown(key,isRep) if not controlCD then action=KEYMAP.mino:getAction(key) if action and action:find('rotate')==1 then - FMOD.effect.play('rotate') + FMOD.effect('rotate') if action=='rotateCW' then handMat=TABLE.rotate(handMat,'L') @@ -165,11 +165,11 @@ function scene.keyDown(key,isRep) end level=level+1 time=parTime[level] - FMOD.effect.play('beep_notice') + FMOD.effect('beep_notice') end else -- Correct - FMOD.effect.play('beep_rise') + FMOD.effect('beep_rise') end else -- Punishment @@ -217,7 +217,7 @@ function scene.update(dt) PROGRESS.setTutorialPassed(6) end elseif totalTime>passTime then - FMOD.effect.play('fail') + FMOD.effect('fail') endGame(0) end end diff --git a/assets/scene/tutorial_shape.lua b/assets/scene/tutorial_shape.lua index 96a39e13..9aa72a3f 100644 --- a/assets/scene/tutorial_shape.lua +++ b/assets/scene/tutorial_shape.lua @@ -134,24 +134,24 @@ local function answer(option) if time>parTime[1] then -- Just pass endGame(1) - FMOD.effect.play('win') + FMOD.effect('win') else level=2 time=parTime[2] - FMOD.effect.play('beep_notice') + FMOD.effect('beep_notice') end PROGRESS.setTutorialPassed(3) elseif level==2 then -- Cleared endGame(2) - FMOD.effect.play('win') + FMOD.effect('win') end else -- Correct - FMOD.effect.play('beep_rise') + FMOD.effect('beep_rise') end else - FMOD.effect.play('fail') + FMOD.effect('fail') end newQuestion() end @@ -188,10 +188,10 @@ function scene.update(dt) if time==0 then if level==1 then endGame(0) - FMOD.effect.play('fail') + FMOD.effect('fail') else endGame(1) - FMOD.effect.play('win') + FMOD.effect('win') end end end