win下提醒用户删掉存档内CCloader,声明两个全局变量

This commit is contained in:
MrZ626
2020-09-10 23:16:48 +08:00
parent 993ef70232
commit f1ce68b677
4 changed files with 23 additions and 7 deletions

View File

@@ -429,7 +429,6 @@ function love.run()
love.resize(gc.getWidth(),gc.getHeight()) love.resize(gc.getWidth(),gc.getHeight())
SCN.init("load")--Scene Launch SCN.init("load")--Scene Launch
marking=true
return function() return function()
local _ local _

View File

@@ -11,6 +11,8 @@
--? --?
function NULL()end function NULL()end
DBP=print--use this if need debugging print DBP=print--use this if need debugging print
marking=true
NOGAME=false
--Global Setting & Vars --Global Setting & Vars
math.randomseed(os.time()*626) math.randomseed(os.time()*626)

View File

@@ -17,6 +17,7 @@ local blockPos={4,4,4,4,4,5,4}
local scs={{0,1},{0,1},{0,1},{0,1},{0,1},{.5,.5},{-.5,1.5}} local scs={{0,1},{0,1},{0,1},{0,1},{0,1},{.5,.5},{-.5,1.5}}
-------------------------------------------------Cold clear -------------------------------------------------Cold clear
do do
local fs=love.filesystem
if system=="Windows"then if system=="Windows"then
local success,message=require("CCloader") local success,message=require("CCloader")
if success then if success then
@@ -24,9 +25,11 @@ do
else else
LOG.print("Cannot load CC: "..message,"warn",color.red) LOG.print("Cannot load CC: "..message,"warn",color.red)
end end
if fs.getInfo("CCloader.dll")then
NOGAME="delCC"
end
elseif system=="Android"then elseif system=="Android"then
local armList={"arm64-v8a","armeabi-v7a"} local armList={"arm64-v8a","armeabi-v7a"}
local fs=love.filesystem
local libFunc,success,message local libFunc,success,message
for i=1,#armList do for i=1,#armList do
local CCloader_f,size=fs.read("data","libAndroid/"..armList[i].."/libCCloader.so") local CCloader_f,size=fs.read("data","libAndroid/"..armList[i].."/libCCloader.so")

View File

@@ -726,12 +726,24 @@ do--intro
if k==2 then if k==2 then
VOC.play("bye") VOC.play("bye")
SCN.back() SCN.back()
elseif newVersionLaunch then elseif NOGAME=="delCC"then
SCN.push("main","fade") LOG.print("Please quit the game, then delete CCloader.dll(21KB) in saving folder!",600,color.yellow)
SCN.swapTo("history","fade") LOG.print("请关闭游戏,然后删除存档文件夹内的 CCloader.dll(21KB) !",600,color.yellow)
LOG.print(text.newVersion,"warn",color.lBlue) TASK.new(function(S)
S[1]=S[1]-1
if S[1]==0 then
love.system.openURL(love.filesystem.getSaveDirectory())
return true
end
end,{60})
else else
SCN.go("main") if newVersionLaunch then
SCN.push("main","fade")
SCN.swapTo("history","fade")
LOG.print(text.newVersion,"warn",color.lBlue)
else
SCN.go("main")
end
end end
end end
function touchDown.intro(id,x,y) function touchDown.intro(id,x,y)