diff --git a/Zframework/bgm.lua b/Zframework/bgm.lua index f69a3f04..d73316ff 100644 --- a/Zframework/bgm.lua +++ b/Zframework/bgm.lua @@ -1,4 +1,9 @@ local BGM={ + getList={}, + getCount=function()return 0 end, + play=NULL, + freshVolume=NULL, + stop=NULL, --nowPlay=[str:playing ID] --playing=[src:playing SRC] } diff --git a/Zframework/image.lua b/Zframework/image.lua index 38100668..2ff300c9 100644 --- a/Zframework/image.lua +++ b/Zframework/image.lua @@ -8,11 +8,13 @@ function IMG.init(list) end function IMG.getCount()return count end - IMG.loadOne=coroutine.wrap(function() + IMG.loadOne=coroutine.wrap(function(skip) IMG.loadAll=nil for k,v in next,list do IMG[k]=love.graphics.newImage("media/image/"..v) - coroutine.yield() + if not skip and i~=count then + coroutine.yield() + end end IMG.loadOne=nil end) diff --git a/Zframework/init.lua b/Zframework/init.lua index a77c7ca7..a885d16d 100644 --- a/Zframework/init.lua +++ b/Zframework/init.lua @@ -531,7 +531,7 @@ function love.run() gc.print("Memory:"..gcinfo(),SCR.safeX+5,_-40) gc.print("Lines:"..FREEROW.getCount(),SCR.safeX+5,_-60) gc.print("Cursor:"..int(mx+.5).." "..int(my+.5),SCR.safeX+5,_-80) - gc.print("Voices:"..VOC.getCount(),SCR.safeX+5,_-100) + gc.print("Voices:"..VOC.getQueueCount(),SCR.safeX+5,_-100) gc.print("Tasks:"..TASK.getCount(),SCR.safeX+5,_-120) ins(frameTimeList,1,dt)rem(frameTimeList,126) gc.setColor(1,1,1,.3) diff --git a/Zframework/sfx.lua b/Zframework/sfx.lua index 8030d560..1b9327ec 100644 --- a/Zframework/sfx.lua +++ b/Zframework/sfx.lua @@ -1,4 +1,10 @@ -local SFX={} +local SFX={ + getCount=function()return 0 end, + fieldPlay=NULL, + play=NULL, + fplay=NULL, + reset=NULL, +} function SFX.init(list) SFX.init=nil local rem=table.remove diff --git a/Zframework/voice.lua b/Zframework/voice.lua index a3832144..718649be 100644 --- a/Zframework/voice.lua +++ b/Zframework/voice.lua @@ -1,4 +1,10 @@ -local VOC={} +local VOC={ + getCount=function()return 0 end, + getQueueCount=NULL, + getFreeChannel=NULL, + play=NULL, + update=NULL, +} function VOC.init(list) VOC.init=nil @@ -52,6 +58,9 @@ function VOC.init(list) end VOC.loadOne=nil + function VOC.getQueueCount() + return #voiceQueue + end function VOC.getFreeChannel() local l=#voiceQueue for i=1,l do @@ -60,9 +69,6 @@ function VOC.init(list) voiceQueue[l+1]={s=0} return l+1 end - function VOC.getCount() - return #voiceQueue - end function VOC.play(s,chn) if SETTING.voc>0 then