新增每帧绘制后是否执行discard的全局设置

This commit is contained in:
MrZ626
2021-03-16 01:21:31 +08:00
parent a3ecfca30b
commit 00c99eb41e
9 changed files with 13 additions and 6 deletions

View File

@@ -590,7 +590,9 @@ function love.run()
LOG.draw() LOG.draw()
gc_present() gc_present()
gc_discard()--SPEED UPUPUP!
--SPEED UPUPUP!
if SETTING.cleanCanvas then gc_discard()end
end end
end end

View File

@@ -268,6 +268,7 @@ SETTING={--Settings
shakeFX=2, shakeFX=2,
atkFX=2, atkFX=2,
frameMul=100, frameMul=100,
cleanCanvas=true,
text=true, text=true,
score=true, score=true,

View File

@@ -309,6 +309,7 @@ return{
fullscreen="Full Screen", fullscreen="Full Screen",
bg="Background", bg="Background",
power="Power Info", power="Power Info",
clean="Fast Draw",
}, },
setting_sound={ setting_sound={
title="Sound Settings", title="Sound Settings",

View File

@@ -285,6 +285,7 @@ return{
fullscreen="Plein écran", fullscreen="Plein écran",
bg="Arrière-plan", bg="Arrière-plan",
power="Infos d'alimentation", power="Infos d'alimentation",
-- clean="Fast Draw",
}, },
setting_sound={ setting_sound={
title="Paramètres du son", title="Paramètres du son",

View File

@@ -309,6 +309,7 @@ return{
fullscreen="Tela cheia", fullscreen="Tela cheia",
bg="Fundo", bg="Fundo",
power="Informação bateria", power="Informação bateria",
-- clean="Fast Draw",
}, },
setting_sound={ setting_sound={
title="Config. de sons", title="Config. de sons",

View File

@@ -289,6 +289,7 @@ return{
fullscreen="Pant. Completa", fullscreen="Pant. Completa",
bg="Fondo", bg="Fondo",
power="Inf. de Batería", power="Inf. de Batería",
-- clean="Fast Draw",
}, },
setting_sound={ setting_sound={
title="Ajustes de Sonido", title="Ajustes de Sonido",

View File

@@ -169,6 +169,7 @@ return{
fullscreen="|←→|", fullscreen="|←→|",
bg="__?__", bg="__?__",
power="+.", power="+.",
clean="[]→→O",
}, },
setting_sound={ setting_sound={
title="(~~)", title="(~~)",

View File

@@ -310,6 +310,7 @@ return{
fullscreen="全屏", fullscreen="全屏",
bg="背景", bg="背景",
power="电量显示", power="电量显示",
clean="绘制优化",
}, },
setting_sound={ setting_sound={
title="声音设置", title="声音设置",

View File

@@ -43,16 +43,14 @@ scene.widgetList={
WIDGET.newSwitch{name="highCam", x=1100, y=360,font=35,disp=lnk_SETval("highCam"),code=lnk_SETrev("highCam")}, WIDGET.newSwitch{name="highCam", x=1100, y=360,font=35,disp=lnk_SETval("highCam"),code=lnk_SETrev("highCam")},
WIDGET.newSwitch{name="nextPos", x=1100, y=420,font=35,disp=lnk_SETval("nextPos"),code=lnk_SETrev("nextPos")}, WIDGET.newSwitch{name="nextPos", x=1100, y=420,font=35,disp=lnk_SETval("nextPos"),code=lnk_SETrev("nextPos")},
WIDGET.newSwitch{name="fullscreen",x=1100, y=480,disp=lnk_SETval("fullscreen"), code=switchFullscreen}, WIDGET.newSwitch{name="fullscreen",x=1100, y=480,disp=lnk_SETval("fullscreen"), code=switchFullscreen},
WIDGET.newSwitch{name="bg", x=1100, y=540,font=35,disp=lnk_SETval("bg"), WIDGET.newSwitch{name="bg", x=1100, y=540,font=35,disp=lnk_SETval("bg"),
code=function() code=function()
BG.set("none") BG.set("none")
SETTING.bg=not SETTING.bg SETTING.bg=not SETTING.bg
BG.set() BG.set()
end}, end},
WIDGET.newSwitch{name="power", x=990, y=640,font=35,disp=lnk_SETval("powerInfo"), WIDGET.newSwitch{name="power", x=990, y=610,font=35,disp=lnk_SETval("powerInfo"),code=lnk_SETrev("powerInfo")},
code=function() WIDGET.newSwitch{name="clean", x=990, y=670,font=35,disp=lnk_SETval("cleanCanvas"),code=lnk_SETrev("cleanCanvas")},
SETTING.powerInfo=not SETTING.powerInfo
end},
WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=backScene}, WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=backScene},
} }