From bd63584207ed7f7f9acd108ce78508919c7f9eae Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Mon, 25 Oct 2021 16:00:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9BGM=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E7=9A=84=E5=88=9D=E5=A7=8B=E5=8C=96log=20=E7=AE=80=E5=8D=95?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E5=90=AF=E5=8A=A8=E7=AC=AC=E4=B8=80=E5=B8=A7?= =?UTF-8?q?=E5=90=84=E4=B8=AA=E9=98=B6=E6=AE=B5=E5=8A=A0=E8=BD=BD=E6=97=B6?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/bgm.lua | 2 +- main.lua | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) 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