整理代码,大规模整理(展开)使用次数不多的局部变量名

框架跟进
This commit is contained in:
MrZ_26
2022-09-10 03:02:00 +08:00
parent ad4365faab
commit f3d08bae1a
106 changed files with 507 additions and 614 deletions

View File

@@ -1,9 +1,8 @@
local gc=love.graphics
local gc_push,gc_pop=gc.push,gc.pop
local gc_origin,gc_replaceTransform=gc.origin,gc.replaceTransform
local gc_setLineWidth,gc_setColor=gc.setLineWidth,gc.setColor
local gc_setShader=gc.setShader
local gc_draw,gc_rectangle,gc_line,gc_printf=gc.draw,gc.rectangle,gc.line,gc.printf
local gc_push,gc_pop=GC.push,GC.pop
local gc_origin,gc_replaceTransform=GC.origin,GC.replaceTransform
local gc_setLineWidth,gc_setColor=GC.setLineWidth,GC.setColor
local gc_setShader=GC.setShader
local gc_draw,gc_rectangle,gc_line,gc_printf=GC.draw,GC.rectangle,GC.line,GC.printf
local ins,rem=table.insert,table.remove
local int,rnd=math.floor,math.random
@@ -133,7 +132,7 @@ do--function applySettings()
--Apply fullscreen
love.window.setFullscreen(SETTING.fullscreen)
love.resize(gc.getWidth(),gc.getHeight())
love.resize(GC.getWidth(),GC.getHeight())
--Apply Zframework setting
Z.setClickFX(SETTING.clickFX)
@@ -169,12 +168,12 @@ do--function applySettings()
BG.lock()
elseif SETTING.bg=='custom'then
if love.filesystem.getInfo('conf/customBG')then
local res,image=pcall(gc.newImage,love.filesystem.newFile('conf/customBG'))
local res,image=pcall(GC.newImage,love.filesystem.newFile('conf/customBG'))
if res then
BG.unlock()
gc.setDefaultFilter('linear','linear')
GC.setDefaultFilter('linear','linear')
BG.set('custom',SETTING.bgAlpha,image)
gc.setDefaultFilter('nearest','nearest')
GC.setDefaultFilter('nearest','nearest')
BG.lock()
else
MES.new('error',text.customBGloadFailed)
@@ -867,7 +866,7 @@ do--function drawSelfProfile()
--Draw username
if name~=USERS.getUsername(USER.uid)then
name=USERS.getUsername(USER.uid)
textObj=gc.newText(getFont(30),name)
textObj=GC.newText(getFont(30),name)
width=textObj:getWidth()
scaleK=210/math.max(width,210)
offY=textObj:getHeight()/2