所有setfont参数统一为5的倍数,节约内存占用
This commit is contained in:
@@ -58,14 +58,14 @@ local function updatePowerInfo()
|
||||
end
|
||||
gc.rectangle("fill",76,6,pow*.22,14)
|
||||
if pow<100 then
|
||||
setFont(14)
|
||||
setFont(15)
|
||||
gc.setColor(0,0,0)
|
||||
gc.print(pow,77,2)
|
||||
gc.print(pow,77,4)
|
||||
gc.print(pow,79,2)
|
||||
gc.print(pow,79,4)
|
||||
gc.print(pow,77,1)
|
||||
gc.print(pow,77,3)
|
||||
gc.print(pow,79,1)
|
||||
gc.print(pow,79,3)
|
||||
gc.setColor(1,1,1)
|
||||
gc.print(pow,78,3)
|
||||
gc.print(pow,78,2)
|
||||
end
|
||||
end
|
||||
gc.draw(IMG.batteryImage,73,3)
|
||||
|
||||
@@ -587,7 +587,7 @@ function selector:draw()
|
||||
end
|
||||
|
||||
--Text
|
||||
setFont(28)
|
||||
setFont(30)
|
||||
t=self.text
|
||||
if t then
|
||||
gc.setColor(r,g,b)
|
||||
|
||||
@@ -184,7 +184,7 @@ local attackColor={
|
||||
{COLOR.lRed,COLOR.white},
|
||||
{COLOR.dGreen,COLOR.cyan},
|
||||
}
|
||||
local RCPB={10,33,200,33,105,5,105,60}
|
||||
local RCPB={5,33,195,33,100,5,100,60}
|
||||
local function drawDial(x,y,speed)
|
||||
gc.setColor(1,1,1)
|
||||
mStr(int(speed),x,y-18)
|
||||
@@ -394,10 +394,10 @@ function draw.norm(P)
|
||||
gc.rectangle("fill",RCPB[2*P.atkMode-1],RCPB[2*P.atkMode],90,35,8,4)
|
||||
end
|
||||
gc.setColor(1,1,1,P.swappingAtkMode*.025)
|
||||
setFont(18)
|
||||
setFont(35)
|
||||
for i=1,4 do
|
||||
gc.rectangle("line",RCPB[2*i-1],RCPB[2*i],90,35,8,4)
|
||||
mStr(text.atkModeName[i],RCPB[2*i-1]+45,RCPB[2*i]+3)
|
||||
gc.printf(text.atkModeName[i],RCPB[2*i-1]-4,RCPB[2*i]+4,200,"center",nil,.5)
|
||||
end
|
||||
end
|
||||
gc.pop()
|
||||
@@ -485,12 +485,12 @@ function draw.norm(P)
|
||||
gc.print(missionEnum[L[P.curMission]],85,180)
|
||||
|
||||
--Draw next mission
|
||||
setFont(17)
|
||||
setFont(20)
|
||||
for i=1,3 do
|
||||
local t=L[P.curMission+i]
|
||||
if t then
|
||||
t=missionEnum[t]
|
||||
gc.print(t,87-26*i,187)
|
||||
gc.print(t,87-28*i,187)
|
||||
else
|
||||
break
|
||||
end
|
||||
@@ -549,7 +549,7 @@ function draw.small(P)
|
||||
--Draw result
|
||||
if P.result then
|
||||
gc.setColor(1,1,1,min(P.endCounter,60)*.01)
|
||||
setFont(17)mStr(P.result,32,47)
|
||||
setFont(20)mStr(P.result,32,47)
|
||||
setFont(15)mStr(P.modeData.event,30,82)
|
||||
end
|
||||
gc.pop()
|
||||
|
||||
@@ -275,7 +275,7 @@ function Pnt.mode()
|
||||
setFont(40)mStr(text.modes[sel][1],1100,5)
|
||||
setFont(30)mStr(text.modes[sel][2],1100,50)
|
||||
gc.setColor(1,1,1)
|
||||
setFont(28)gc.printf(text.modes[sel][3],920,110,360,"center")
|
||||
setFont(25)gc.printf(text.modes[sel][3],920,110,360,"center")
|
||||
if M.slowMark then
|
||||
gc.draw(IMG.ctrlSpeedLimit,1230,50,nil,.4)
|
||||
end
|
||||
@@ -289,13 +289,8 @@ function Pnt.mode()
|
||||
for i=1,#L do
|
||||
local t=M.scoreDisp(L[i])
|
||||
local s=#t
|
||||
local dy
|
||||
if s<15 then dy=0
|
||||
elseif s<25 then dy=2
|
||||
else dy=4
|
||||
end
|
||||
setFont(int((26-s*.4)/3)*3)
|
||||
gc.print(t,955,275+dy+25*i)
|
||||
setFont(int((26-s*.4)/5)*5)
|
||||
gc.print(t,955,275+25*i+(s<15 and 0 or s<25 and 2 or 4))
|
||||
setFont(10)
|
||||
_=L[i].date
|
||||
if _ then gc.print(_,1155,284+25*i)end
|
||||
|
||||
@@ -190,7 +190,7 @@ function Pnt.pause()
|
||||
--Infos
|
||||
if GAME.frame>180 then
|
||||
_=S.list
|
||||
setFont(26)
|
||||
setFont(30)
|
||||
for i=1,10 do
|
||||
gc.print(text.pauseStat[i],40,210+40*i)
|
||||
gc.printf(_[i],195,210+40*i,300,"right")
|
||||
@@ -268,7 +268,7 @@ function Pnt.pause()
|
||||
C,_=text.radar,textPos
|
||||
else
|
||||
gc.setColor(1,1,1,T*sin(_))
|
||||
setFont(18)
|
||||
setFont(20)
|
||||
C,_=S.radar,dataPos
|
||||
end
|
||||
for i=1,6 do
|
||||
|
||||
@@ -296,7 +296,7 @@ local function drawVirtualkey()
|
||||
end
|
||||
function Pnt.play()
|
||||
if MARKING then
|
||||
setFont(26)
|
||||
setFont(25)
|
||||
local t=Timer()
|
||||
gc.setColor(1,1,1,.2+.1*(sin(3*t)+sin(2.6*t)))
|
||||
mStr(text.marking,190,60+26*sin(t))
|
||||
|
||||
@@ -107,17 +107,17 @@ function Pnt.setting_key()
|
||||
--Selection rect
|
||||
|
||||
gc.setColor(1,1,1)
|
||||
setFont(26)
|
||||
setFont(25)
|
||||
local b1,b2=keyMap[S.board],keyMap[S.board+2]
|
||||
for N=1,20 do
|
||||
if N<11 then
|
||||
gc.printf(text.acts[N],47,45*N+22,180,"right")
|
||||
mStr(b1[N],340,45*N+22)
|
||||
mStr(b2[N],540,45*N+22)
|
||||
mStr(b1[N],340,45*N+24)
|
||||
mStr(b2[N],540,45*N+24)
|
||||
else
|
||||
gc.printf(text.acts[N],647,45*N-428,180,"right")
|
||||
mStr(b1[N],940,45*N-428)
|
||||
mStr(b2[N],1040,45*N-428)
|
||||
mStr(b1[N],940,45*N-426)
|
||||
mStr(b2[N],1040,45*N-426)
|
||||
end
|
||||
end
|
||||
gc.setLineWidth(2)
|
||||
|
||||
Reference in New Issue
Block a user