diff --git a/Zframework/bgm.lua b/Zframework/bgm.lua index c148aaa9..770c004e 100644 --- a/Zframework/bgm.lua +++ b/Zframework/bgm.lua @@ -58,7 +58,7 @@ function BGM.init(list) table.sort(simpList) function BGM.getList()return simpList end local count=#simpList - LOG(count.." BGM files loaded") + LOG(count.." BGM files added") function BGM.getCount()return count end local function _load(name) diff --git a/main.lua b/main.lua index f06e33fe..33836138 100644 --- a/main.lua +++ b/main.lua @@ -44,12 +44,17 @@ if MOBILE then love.window.setMode(w,h,f) end +local _LOADTIMELIST_={} +local _LOADTIME_=TIME() + --Load modules Z=require'Zframework' FONT.load('parts/fonts/proportional.ttf') SCR.setSize(1280,720)--Initialize Screen size BGM.setChange(function(name)MES.new('music',text.nowPlaying..name,5)end) +table.insert(_LOADTIMELIST_,("Load Zframework: %.3fs"):format(TIME()-_LOADTIME_)) + --Create shortcuts setFont=FONT.set getFont=FONT.get @@ -99,6 +104,8 @@ PLY= require'parts.player' NETPLY= require'parts.netPlayer' MODES= require'parts.modes' +table.insert(_LOADTIMELIST_,("Load Parts: %.3fs"):format(TIME()-_LOADTIME_)) + --Init Zframework Z.setIfPowerInfo(function() return SETTING.powerInfo and LOADED @@ -339,6 +346,9 @@ LANG.init('zh', end end)() ) + +table.insert(_LOADTIMELIST_,("Initialize Parts: %.3fs"):format(TIME()-_LOADTIME_)) + --Load background files from SOURCE ONLY for _,v in next,fs.getDirectoryItems('parts/backgrounds')do if isSafeFile('parts/backgrounds/'..v)and v:sub(-3)=='lua'then @@ -370,6 +380,8 @@ for _,v in next,fs.getDirectoryItems('parts/modes')do end end +table.insert(_LOADTIMELIST_,("Load Files: %.3fs"):format(TIME()-_LOADTIME_)) + --Update data do local needSave @@ -553,3 +565,7 @@ for _,fileName in next,fs.getDirectoryItems('replay')do table.insert(REPLAY,rep) end table.sort(REPLAY,function(a,b)return a.fileName>b.fileName end) + +table.insert(_LOADTIMELIST_,("Initialize Data: %.3fs"):format(TIME()-_LOADTIME_)) + +for i=1,#_LOADTIMELIST_ do print(_LOADTIMELIST_[i])end \ No newline at end of file