整理代码,调整大量场景内绘图用的纯白色和纯黑色
This commit is contained in:
@@ -50,7 +50,7 @@ local COLOR={
|
|||||||
dMagenta= {0.6, 0.0, 0.6},
|
dMagenta= {0.6, 0.0, 0.6},
|
||||||
dWine= {0.6, 0.0, 0.3},
|
dWine= {0.6, 0.0, 0.3},
|
||||||
|
|
||||||
black= {0.0, 0.0, 0.0},
|
black= {.05, .05, .05},
|
||||||
dGray= {0.3, 0.3, 0.3},
|
dGray= {0.3, 0.3, 0.3},
|
||||||
gray= {0.6, 0.6, 0.6},
|
gray= {0.6, 0.6, 0.6},
|
||||||
lGray= {0.8, 0.8, 0.8},
|
lGray= {0.8, 0.8, 0.8},
|
||||||
|
|||||||
@@ -97,12 +97,12 @@ local function updatePowerInfo()
|
|||||||
gc.rectangle('fill',76,6,pow*.22,14)
|
gc.rectangle('fill',76,6,pow*.22,14)
|
||||||
if pow<100 then
|
if pow<100 then
|
||||||
setFont(15)
|
setFont(15)
|
||||||
gc_setColor(0,0,0)
|
gc.setColor(COLOR.D)
|
||||||
gc_print(pow,77,1)
|
gc_print(pow,77,1)
|
||||||
gc_print(pow,77,3)
|
gc_print(pow,77,3)
|
||||||
gc_print(pow,79,1)
|
gc_print(pow,79,1)
|
||||||
gc_print(pow,79,3)
|
gc_print(pow,79,3)
|
||||||
gc_setColor(1,1,1)
|
gc_setColor(COLOR.Z)
|
||||||
gc_print(pow,78,2)
|
gc_print(pow,78,2)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -657,11 +657,11 @@ function love.run()
|
|||||||
gc_line(x,0,x,SCR.h)
|
gc_line(x,0,x,SCR.h)
|
||||||
gc_line(0,y,SCR.w,y)
|
gc_line(0,y,SCR.w,y)
|
||||||
local t=int(mx+.5)..","..int(my+.5)
|
local t=int(mx+.5)..","..int(my+.5)
|
||||||
gc_setColor(0,0,0)
|
gc.setColor(COLOR.D)
|
||||||
gc_print(t,x+1,y)
|
gc_print(t,x+1,y)
|
||||||
gc_print(t,x+1,y-1)
|
gc_print(t,x+1,y-1)
|
||||||
gc_print(t,x+2,y-1)
|
gc_print(t,x+2,y-1)
|
||||||
gc_setColor(1,1,1)
|
gc_setColor(COLOR.Z)
|
||||||
gc_print(t,x+2,y)
|
gc_print(t,x+2,y)
|
||||||
|
|
||||||
gc_replaceTransform(SCR.xOy_dr)
|
gc_replaceTransform(SCR.xOy_dr)
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ local SCN={
|
|||||||
stat={
|
stat={
|
||||||
tar=false, --Swapping target
|
tar=false, --Swapping target
|
||||||
style=false,--Swapping style
|
style=false,--Swapping style
|
||||||
mid=false, --Loading point
|
changeTime=false, --Loading point
|
||||||
time=false, --Full swap time
|
time=false, --Full swap time
|
||||||
draw=false, --Swap draw func
|
draw=false, --Swap draw func
|
||||||
},
|
},
|
||||||
@@ -50,7 +50,7 @@ end
|
|||||||
function SCN.swapUpdate()
|
function SCN.swapUpdate()
|
||||||
local S=SCN.stat
|
local S=SCN.stat
|
||||||
S.time=S.time-1
|
S.time=S.time-1
|
||||||
if S.time==S.mid then
|
if S.time==S.changeTime then
|
||||||
SCN.init(S.tar,SCN.cur)
|
SCN.init(S.tar,SCN.cur)
|
||||||
collectgarbage()
|
collectgarbage()
|
||||||
--Scene swapped this moment
|
--Scene swapped this moment
|
||||||
@@ -103,36 +103,36 @@ function SCN.pop()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local swap={
|
local swap={
|
||||||
none={1,0,function()end},--swapTime, changeTime, drawFunction
|
none={duration=1,changeTime=0,draw=function()end},--swapTime, changeTime, drawFunction
|
||||||
flash={8,1,function()gc.clear(1,1,1)end},
|
flash={duration=8,changeTime=1,draw=function()gc.clear(1,1,1)end},
|
||||||
fade={30,15,function(t)
|
fade={duration=30,changeTime=15,draw=function(t)
|
||||||
t=t>15 and 2-t/15 or t/15
|
t=t>15 and 2-t/15 or t/15
|
||||||
gc.setColor(0,0,0,t)
|
gc.setColor(0,0,0,t)
|
||||||
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||||
end},
|
end},
|
||||||
fade_togame={120,20,function(t)
|
fade_togame={duration=120,changeTime=20,draw=function(t)
|
||||||
t=t>20 and(120-t)/100 or t/20
|
t=t>20 and(120-t)/100 or t/20
|
||||||
gc.setColor(0,0,0,t)
|
gc.setColor(0,0,0,t)
|
||||||
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||||
end},
|
end},
|
||||||
slowFade={180,90,function(t)
|
slowFade={duration=180,changeTime=90,draw=function(t)
|
||||||
t=t>90 and 2-t/90 or t/90
|
t=t>90 and 2-t/90 or t/90
|
||||||
gc.setColor(0,0,0,t)
|
gc.setColor(0,0,0,t)
|
||||||
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||||
end},
|
end},
|
||||||
swipeL={30,15,function(t)
|
swipeL={duration=30,changeTime=15,draw=function(t)
|
||||||
t=t/30
|
t=t/30
|
||||||
gc.setColor(.1,.1,.1,1-abs(t-.5))
|
gc.setColor(.1,.1,.1,1-abs(t-.5))
|
||||||
t=t*t*(3-2*t)*2-1
|
t=t*t*(3-2*t)*2-1
|
||||||
gc.rectangle('fill',t*SCR.w,0,SCR.w,SCR.h)
|
gc.rectangle('fill',t*SCR.w,0,SCR.w,SCR.h)
|
||||||
end},
|
end},
|
||||||
swipeR={30,15,function(t)
|
swipeR={duration=30,changeTime=15,draw=function(t)
|
||||||
t=t/30
|
t=t/30
|
||||||
gc.setColor(.1,.1,.1,1-abs(t-.5))
|
gc.setColor(.1,.1,.1,1-abs(t-.5))
|
||||||
t=t*t*(2*t-3)*2+1
|
t=t*t*(2*t-3)*2+1
|
||||||
gc.rectangle('fill',t*SCR.w,0,SCR.w,SCR.h)
|
gc.rectangle('fill',t*SCR.w,0,SCR.w,SCR.h)
|
||||||
end},
|
end},
|
||||||
swipeD={30,15,function(t)
|
swipeD={duration=30,changeTime=15,draw=function(t)
|
||||||
t=t/30
|
t=t/30
|
||||||
gc.setColor(.1,.1,.1,1-abs(t-.5))
|
gc.setColor(.1,.1,.1,1-abs(t-.5))
|
||||||
t=t*t*(2*t-3)*2+1
|
t=t*t*(2*t-3)*2+1
|
||||||
@@ -146,8 +146,9 @@ function SCN.swapTo(tar,style)--Parallel scene swapping, cannot back
|
|||||||
SCN.swapping=true
|
SCN.swapping=true
|
||||||
local S=SCN.stat
|
local S=SCN.stat
|
||||||
S.tar,S.style=tar,style
|
S.tar,S.style=tar,style
|
||||||
local s=swap[style]
|
S.time=swap[style].duration
|
||||||
S.time,S.mid,S.draw=s[1],s[2],s[3]
|
S.changeTime=swap[style].changeTime
|
||||||
|
S.draw=swap[style].draw
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
MES.new('warn',"No Scene: "..tar)
|
MES.new('warn',"No Scene: "..tar)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ end
|
|||||||
function scene.draw()
|
function scene.draw()
|
||||||
--Texts
|
--Texts
|
||||||
setFont(20)
|
setFont(20)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
for i=1,#text.aboutTexts do
|
for i=1,#text.aboutTexts do
|
||||||
gc.printf(text.aboutTexts[i],150,35*i+50,1000,'center')
|
gc.printf(text.aboutTexts[i],150,35*i+50,1000,'center')
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ local backColor={
|
|||||||
}
|
}
|
||||||
function scene.draw()
|
function scene.draw()
|
||||||
setFont(40)
|
setFont(40)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.print(("%.3f"):format(time),1026,80)
|
gc.print(("%.3f"):format(time),1026,80)
|
||||||
gc.setColor(1,.8,.8)
|
gc.setColor(1,.8,.8)
|
||||||
gc.print(move,1026,130)
|
gc.print(move,1026,130)
|
||||||
@@ -303,7 +303,7 @@ function scene.draw()
|
|||||||
gc.setColor(.1,.1,.1)
|
gc.setColor(.1,.1,.1)
|
||||||
mStr(N,j*160+240,i*160-96)
|
mStr(N,j*160+240,i*160-96)
|
||||||
mStr(N,j*160+242,i*160-98)
|
mStr(N,j*160+242,i*160-98)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
mStr(N,j*160+243,i*160-95)
|
mStr(N,j*160+243,i*160-95)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ end
|
|||||||
|
|
||||||
function scene.draw()
|
function scene.draw()
|
||||||
setFont(40)
|
setFont(40)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.print(("%.3f"):format(time),1026,80)
|
gc.print(("%.3f"):format(time),1026,80)
|
||||||
gc.print(mistake,1026,150)
|
gc.print(mistake,1026,150)
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ function scene.draw()
|
|||||||
setFont(100)
|
setFont(100)
|
||||||
mStr(state==1 and #targetString-progress+1 or state==0 and"Ready"or state==2 and"Win",640,200)
|
mStr(state==1 and #targetString-progress+1 or state==0 and"Ready"or state==2 and"Win",640,200)
|
||||||
|
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.print(targetString:sub(progress,progress),120,280,0,2)
|
gc.print(targetString:sub(progress,progress),120,280,0,2)
|
||||||
gc.print(targetString:sub(progress+1),310,380)
|
gc.print(targetString:sub(progress+1),310,380)
|
||||||
|
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ function scene.draw()
|
|||||||
elseif score[X]==1 then
|
elseif score[X]==1 then
|
||||||
gc.setColor(0,0,.5)
|
gc.setColor(0,0,.5)
|
||||||
else
|
else
|
||||||
gc.setColor(0,0,0)
|
gc.setColor(COLOR.D)
|
||||||
end
|
end
|
||||||
gc.rectangle('fill',(X-1)%3*30,int((X-1)/3)*30,30,30)
|
gc.rectangle('fill',(X-1)%3*30,int((X-1)/3)*30,30,30)
|
||||||
end
|
end
|
||||||
@@ -186,7 +186,7 @@ function scene.draw()
|
|||||||
--Draw current round mark
|
--Draw current round mark
|
||||||
gc.setColor(.8,.8,.8,.8)
|
gc.setColor(.8,.8,.8,.8)
|
||||||
gc.rectangle('fill',80,80,160,160)
|
gc.rectangle('fill',80,80,160,160)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.setLineWidth(6)
|
gc.setLineWidth(6)
|
||||||
gc.rectangle('line',80,80,160,160)
|
gc.rectangle('line',80,80,160,160)
|
||||||
|
|
||||||
|
|||||||
@@ -81,8 +81,8 @@ function scene.keyDown(key)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function scene.draw()
|
function scene.draw()
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.setLineWidth(4)
|
gc.setLineWidth(2)
|
||||||
gc.rectangle('line',100,80,650,150)
|
gc.rectangle('line',100,80,650,150)
|
||||||
setFont(45)
|
setFont(45)
|
||||||
if reg then gc.printf(reg,0,100,720,'right')end
|
if reg then gc.printf(reg,0,100,720,'right')end
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ function scene.draw()
|
|||||||
gc.rectangle('fill',85,0,190,720)
|
gc.rectangle('fill',85,0,190,720)
|
||||||
|
|
||||||
--Power & Angle
|
--Power & Angle
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
if state~=2 then
|
if state~=2 then
|
||||||
gc.setLineWidth(2)
|
gc.setLineWidth(2)
|
||||||
gc.rectangle('fill',x-80,y+20,pow*1.6,16)
|
gc.rectangle('fill',x-80,y+20,pow*1.6,16)
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ function scene.draw()
|
|||||||
|
|
||||||
--Draw player
|
--Draw player
|
||||||
if play and inv%8<4 then
|
if play and inv%8<4 then
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.rectangle('fill',620,670,40,40)
|
gc.rectangle('fill',620,670,40,40)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -239,7 +239,7 @@ function scene.draw()
|
|||||||
end
|
end
|
||||||
|
|
||||||
--Draw Horizon/Direction
|
--Draw Horizon/Direction
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.line(-942,-440,942,-440)
|
gc.line(-942,-440,942,-440)
|
||||||
|
|
||||||
--Draw cubes
|
--Draw cubes
|
||||||
@@ -254,7 +254,7 @@ function scene.draw()
|
|||||||
gc.setColor(color)
|
gc.setColor(color)
|
||||||
gc.rectangle('fill',x,y-485,size,size)
|
gc.rectangle('fill',x,y-485,size,size)
|
||||||
gc.setLineWidth(size*.05)
|
gc.setLineWidth(size*.05)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.rectangle('line',x,y-485,size,size)
|
gc.rectangle('line',x,y-485,size,size)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -278,7 +278,7 @@ function scene.draw()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.rectangle('fill',-20,-20+ct,40,40)
|
gc.rectangle('fill',-20,-20+ct,40,40)
|
||||||
|
|
||||||
gc.setColor(1,1,1,(1-ct/60)*.1)
|
gc.setColor(1,1,1,(1-ct/60)*.1)
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ function scene.draw()
|
|||||||
mStr("High Score - "..highScore,640,370)
|
mStr("High Score - "..highScore,640,370)
|
||||||
mStr("High Floor - "..highFloor,640,450)
|
mStr("High Floor - "..highFloor,640,450)
|
||||||
|
|
||||||
gc.setColor(0,0,0)
|
gc.setColor(COLOR.D)
|
||||||
setFont(35)
|
setFont(35)
|
||||||
mStr(MOBILE and"Touch to Start"or"Press space to Start",640,570)
|
mStr(MOBILE and"Touch to Start"or"Press space to Start",640,570)
|
||||||
setFont(20)
|
setFont(20)
|
||||||
@@ -203,7 +203,7 @@ function scene.draw()
|
|||||||
end
|
end
|
||||||
if state~='menu'then
|
if state~='menu'then
|
||||||
--High floor
|
--High floor
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.setLineWidth(2)
|
gc.setLineWidth(2)
|
||||||
local y=690+camY-30*highFloor
|
local y=690+camY-30*highFloor
|
||||||
gc.line(0,y,1280,y)
|
gc.line(0,y,1280,y)
|
||||||
@@ -216,15 +216,15 @@ function scene.draw()
|
|||||||
gc.print(floor+1,move.x+move.l+15,move.y-18)
|
gc.print(floor+1,move.x+move.l+15,move.y-18)
|
||||||
gc.print(floor,base.x+base.l+15,base.y-18)
|
gc.print(floor,base.x+base.l+15,base.y-18)
|
||||||
|
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
mStr(message,640,0)
|
mStr(message,640,0)
|
||||||
gc.setColor(0,0,0)
|
gc.setColor(COLOR.D)
|
||||||
mStr(message,643,2)
|
mStr(message,643,2)
|
||||||
|
|
||||||
setFont(70)
|
setFont(70)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.print(score,60,40)
|
gc.print(score,60,40)
|
||||||
gc.setColor(0,0,0)
|
gc.setColor(COLOR.D)
|
||||||
gc.print(score,64,43)
|
gc.print(score,64,43)
|
||||||
|
|
||||||
gc.setColor(color1)gc.rectangle('fill',move.x,move.y,move.l,30)
|
gc.setColor(color1)gc.rectangle('fill',move.x,move.y,move.l,30)
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ end
|
|||||||
|
|
||||||
function scene.draw()
|
function scene.draw()
|
||||||
--Draw mode
|
--Draw mode
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
setFont(50)
|
setFont(50)
|
||||||
mStr(modeName[mode],155,380)
|
mStr(modeName[mode],155,380)
|
||||||
|
|
||||||
@@ -213,7 +213,7 @@ function scene.draw()
|
|||||||
setFont(45)
|
setFont(45)
|
||||||
gc.setColor(1,.6,.6)
|
gc.setColor(1,.6,.6)
|
||||||
mStr(("%.2f"):format(maxSpeed/60),155,460)
|
mStr(("%.2f"):format(maxSpeed/60),155,460)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
mStr(("%.2f"):format(speed/60),155,520)
|
mStr(("%.2f"):format(speed/60),155,520)
|
||||||
|
|
||||||
--Progress time list
|
--Progress time list
|
||||||
@@ -224,7 +224,7 @@ function scene.draw()
|
|||||||
end
|
end
|
||||||
|
|
||||||
--Draw time
|
--Draw time
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
setFont(45)
|
setFont(45)
|
||||||
gc.print(("%.3f"):format(time),1030,70)
|
gc.print(("%.3f"):format(time),1030,70)
|
||||||
end
|
end
|
||||||
@@ -245,7 +245,7 @@ function scene.draw()
|
|||||||
gc.pop()
|
gc.pop()
|
||||||
|
|
||||||
--Draw track line
|
--Draw track line
|
||||||
gc.setColor(0,0,0)
|
gc.setColor(COLOR.D)
|
||||||
gc.setLineWidth(2)
|
gc.setLineWidth(2)
|
||||||
for x=1,5 do
|
for x=1,5 do
|
||||||
x=130+170*x
|
x=130+170*x
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ function scene.draw()
|
|||||||
mStr(p2.score,810,20)
|
mStr(p2.score,810,20)
|
||||||
|
|
||||||
--Draw boundary
|
--Draw boundary
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.setLineWidth(6)
|
gc.setLineWidth(6)
|
||||||
gc.line(130,20,1160,20)
|
gc.line(130,20,1160,20)
|
||||||
gc.line(130,700,1160,700)
|
gc.line(130,700,1160,700)
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ end
|
|||||||
|
|
||||||
function scene.draw()
|
function scene.draw()
|
||||||
setFont(40)
|
setFont(40)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.print(("%.3f"):format(time),1026,80)
|
gc.print(("%.3f"):format(time),1026,80)
|
||||||
gc.print(mistake,1026,150)
|
gc.print(mistake,1026,150)
|
||||||
|
|
||||||
@@ -153,14 +153,14 @@ function scene.draw()
|
|||||||
if not(state==1 and disappear and N<=progress)then
|
if not(state==1 and disappear and N<=progress)then
|
||||||
gc.setColor(.4,.5,.6)
|
gc.setColor(.4,.5,.6)
|
||||||
gc.rectangle('fill',320+(j-1)*width,(i-1)*width+40,width,width)
|
gc.rectangle('fill',320+(j-1)*width,(i-1)*width+40,width,width)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.rectangle('line',320+(j-1)*width,(i-1)*width+40,width,width)
|
gc.rectangle('line',320+(j-1)*width,(i-1)*width+40,width,width)
|
||||||
if not mono then
|
if not mono then
|
||||||
local x,y=320+(j-.5)*width,40+(i-.5)*width-f*.67
|
local x,y=320+(j-.5)*width,40+(i-.5)*width-f*.67
|
||||||
gc.setColor(.1,.1,.1)
|
gc.setColor(.1,.1,.1)
|
||||||
mStr(N,x-3,y-1)
|
mStr(N,x-3,y-1)
|
||||||
mStr(N,x-1,y-3)
|
mStr(N,x-1,y-3)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
mStr(N,x,y)
|
mStr(N,x,y)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ function scene.draw()
|
|||||||
setFont(70)gc.setColor(1,.6,.6)
|
setFont(70)gc.setColor(1,.6,.6)
|
||||||
mStr(("%.2f"):format(maxSpeed),640,20)
|
mStr(("%.2f"):format(maxSpeed),640,20)
|
||||||
|
|
||||||
setFont(100)gc.setColor(1,1,1)
|
setFont(100)gc.setColor(COLOR.Z)
|
||||||
mStr(("%.2f"):format(speed),640,150)
|
mStr(("%.2f"):format(speed),640,150)
|
||||||
|
|
||||||
setFont(35)
|
setFont(35)
|
||||||
@@ -64,7 +64,7 @@ function scene.draw()
|
|||||||
gc.setColor(max(speed/maxSpeed*10-9,0),1-max(speed/maxSpeed*8-7,0),1-max(speed/maxSpeed*4-3,0))
|
gc.setColor(max(speed/maxSpeed*10-9,0),1-max(speed/maxSpeed*8-7,0),1-max(speed/maxSpeed*4-3,0))
|
||||||
end
|
end
|
||||||
gc.rectangle('fill',960,360,30,-320*max(speed/maxSpeed*4-3,0))
|
gc.rectangle('fill',960,360,30,-320*max(speed/maxSpeed*4-3,0))
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.rectangle('line',960,360,30,-320)
|
gc.rectangle('line',960,360,30,-320)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ function scene.draw()
|
|||||||
gc.print("#"..#BAG,615,220)
|
gc.print("#"..#BAG,615,220)
|
||||||
end
|
end
|
||||||
|
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.print(CUSTOMENV.sequence,610,250)
|
gc.print(CUSTOMENV.sequence,610,250)
|
||||||
|
|
||||||
--Confirm reset
|
--Confirm reset
|
||||||
|
|||||||
@@ -270,7 +270,7 @@ function scene.draw()
|
|||||||
for y=0,19 do gc.line(0,30*y,300,30*y)end
|
for y=0,19 do gc.line(0,30*y,300,30*y)end
|
||||||
|
|
||||||
--Draw field
|
--Draw field
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.setLineWidth(3)
|
gc.setLineWidth(3)
|
||||||
gc.rectangle('line',-2,-2,304,604)
|
gc.rectangle('line',-2,-2,304,604)
|
||||||
gc.setLineWidth(2)
|
gc.setLineWidth(2)
|
||||||
@@ -345,7 +345,7 @@ function scene.draw()
|
|||||||
|
|
||||||
--Draw page
|
--Draw page
|
||||||
setFont(55)
|
setFont(55)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
mStr(page,100,530)
|
mStr(page,100,530)
|
||||||
mStr(#FIELD,100,600)
|
mStr(#FIELD,100,600)
|
||||||
gc.rectangle('fill',50,600,100,6)
|
gc.rectangle('fill',50,600,100,6)
|
||||||
@@ -364,7 +364,7 @@ function scene.draw()
|
|||||||
gc.setColor(minoColor[pens[1]])
|
gc.setColor(minoColor[pens[1]])
|
||||||
gc.rectangle('fill',5,5,23,30)
|
gc.rectangle('fill',5,5,23,30)
|
||||||
elseif pens[1]==-1 then
|
elseif pens[1]==-1 then
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.line(5,5,28,35)
|
gc.line(5,5,28,35)
|
||||||
gc.line(28,5,5,35)
|
gc.line(28,5,5,35)
|
||||||
elseif pens[1]==-2 then
|
elseif pens[1]==-2 then
|
||||||
@@ -385,7 +385,7 @@ function scene.draw()
|
|||||||
gc.setColor(minoColor[pens[2]])
|
gc.setColor(minoColor[pens[2]])
|
||||||
gc.rectangle('fill',52,5,23,30)
|
gc.rectangle('fill',52,5,23,30)
|
||||||
elseif pens[2]==-1 then
|
elseif pens[2]==-1 then
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.setLineWidth(3)
|
gc.setLineWidth(3)
|
||||||
gc.line(52,5,75,35)
|
gc.line(52,5,75,35)
|
||||||
gc.line(75,5,52,35)
|
gc.line(75,5,52,35)
|
||||||
@@ -407,7 +407,7 @@ function scene.draw()
|
|||||||
gc.setColor(minoColor[pens[3]])
|
gc.setColor(minoColor[pens[3]])
|
||||||
gc.rectangle('fill',35,2,10,21)
|
gc.rectangle('fill',35,2,10,21)
|
||||||
elseif pens[3]==-1 then
|
elseif pens[3]==-1 then
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.setLineWidth(2)
|
gc.setLineWidth(2)
|
||||||
gc.line(35,2,45,23)
|
gc.line(35,2,45,23)
|
||||||
gc.line(45,2,35,23)
|
gc.line(45,2,35,23)
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ end
|
|||||||
function scene.draw()
|
function scene.draw()
|
||||||
--Draw frame
|
--Draw frame
|
||||||
gc.setLineWidth(4)
|
gc.setLineWidth(4)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.rectangle('line',60,110,1160,170)
|
gc.rectangle('line',60,110,1160,170)
|
||||||
|
|
||||||
--Draw inputing target
|
--Draw inputing target
|
||||||
@@ -145,7 +145,7 @@ function scene.draw()
|
|||||||
else
|
else
|
||||||
if count>1 then
|
if count>1 then
|
||||||
setFont(25)
|
setFont(25)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.print("×",x-10,y-14)
|
gc.print("×",x-10,y-14)
|
||||||
gc.print(count,x+5,y-13)
|
gc.print(count,x+5,y-13)
|
||||||
x=x+(count<10 and 33 or 45)
|
x=x+(count<10 and 33 or 45)
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ end
|
|||||||
|
|
||||||
function scene.draw()
|
function scene.draw()
|
||||||
--Draw frame
|
--Draw frame
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.setLineWidth(4)
|
gc.setLineWidth(4)
|
||||||
gc.rectangle('line',100,110,1080,260)
|
gc.rectangle('line',100,110,1080,260)
|
||||||
|
|
||||||
@@ -149,7 +149,7 @@ function scene.draw()
|
|||||||
count=count+1
|
count=count+1
|
||||||
else
|
else
|
||||||
if count>1 then
|
if count>1 then
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.print("×",x-5,y-14)
|
gc.print("×",x-5,y-14)
|
||||||
gc.print(count,x+10,y-13)
|
gc.print(count,x+10,y-13)
|
||||||
x=x+(count<10 and 33 or 45)
|
x=x+(count<10 and 33 or 45)
|
||||||
@@ -178,7 +178,7 @@ function scene.draw()
|
|||||||
|
|
||||||
--Draw lenth
|
--Draw lenth
|
||||||
setFont(40)
|
setFont(40)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.print(#L,120,310)
|
gc.print(#L,120,310)
|
||||||
|
|
||||||
--Draw cursor
|
--Draw cursor
|
||||||
|
|||||||
@@ -138,17 +138,14 @@ end
|
|||||||
|
|
||||||
function scene.draw()
|
function scene.draw()
|
||||||
local list=getList()
|
local list=getList()
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
local t=list[selected][4]
|
local t=list[selected][4]
|
||||||
if #t>900 then
|
setFont(
|
||||||
setFont(15)
|
#t>900 and 15 or
|
||||||
elseif #t>600 then
|
#t>600 and 20 or
|
||||||
setFont(20)
|
#t>400 and 25 or
|
||||||
elseif #t>400 then
|
30
|
||||||
setFont(25)
|
)
|
||||||
else
|
|
||||||
setFont(30)
|
|
||||||
end
|
|
||||||
gc.printf(t,306,180,950)
|
gc.printf(t,306,180,950)
|
||||||
|
|
||||||
setFont(30)
|
setFont(30)
|
||||||
@@ -160,7 +157,7 @@ function scene.draw()
|
|||||||
local y=142+35*i
|
local y=142+35*i
|
||||||
i=i+scrollPos
|
i=i+scrollPos
|
||||||
local item=list[i]
|
local item=list[i]
|
||||||
gc.setColor(0,0,0)
|
gc.setColor(COLOR.D)
|
||||||
gc.print(item[1],29,y-1)
|
gc.print(item[1],29,y-1)
|
||||||
gc.print(item[1],29,y+1)
|
gc.print(item[1],29,y+1)
|
||||||
gc.print(item[1],31,y-1)
|
gc.print(item[1],31,y-1)
|
||||||
@@ -170,7 +167,7 @@ function scene.draw()
|
|||||||
end
|
end
|
||||||
|
|
||||||
gc.setLineWidth(4)
|
gc.setLineWidth(4)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.rectangle('line',300,180,958,526)
|
gc.rectangle('line',300,180,958,526)
|
||||||
gc.rectangle('line',20,180,280,526)
|
gc.rectangle('line',20,180,280,526)
|
||||||
|
|
||||||
|
|||||||
@@ -23,11 +23,12 @@ function scene.draw()
|
|||||||
gc.clear(BGcolor)
|
gc.clear(BGcolor)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
gc.draw(errorShot,100,345,nil,512/errorShot:getWidth(),288/errorShot:getHeight())
|
gc.draw(errorShot,100,345,nil,512/errorShot:getWidth(),288/errorShot:getHeight())
|
||||||
|
gc.setColor(COLOR.Z)
|
||||||
setFont(100)gc.print(":(",100,0,0,1.2)
|
setFont(100)gc.print(":(",100,0,0,1.2)
|
||||||
setFont(40)gc.printf(errorText,100,160,SCR.w0-100)
|
setFont(40)gc.printf(errorText,100,160,SCR.w0-100)
|
||||||
setFont(20)
|
setFont(20)
|
||||||
gc.print(stateInfo,100,640)
|
|
||||||
|
|
||||||
|
gc.print(stateInfo,100,640)
|
||||||
gc.printf(errorInfo[1],626,326,1260-626)
|
gc.printf(errorInfo[1],626,326,1260-626)
|
||||||
gc.print("TRACEBACK",626,390)
|
gc.print("TRACEBACK",626,390)
|
||||||
for i=4,#errorInfo do
|
for i=4,#errorInfo do
|
||||||
@@ -36,8 +37,8 @@ function scene.draw()
|
|||||||
end
|
end
|
||||||
|
|
||||||
scene.widgetList={
|
scene.widgetList={
|
||||||
WIDGET.newKey{name="console",x=940,y=640,w=170,h=80,font=40,code=goScene'app_console'},
|
WIDGET.newKey{name="console",x=940,y=640,w=170,h=80,font=35,code=goScene'app_console'},
|
||||||
WIDGET.newKey{name="quit",x=1140,y=640,w=170,h=80,font=40,code=backScene},
|
WIDGET.newKey{name="quit",x=1140,y=640,w=170,h=80,font=35,code=backScene},
|
||||||
}
|
}
|
||||||
|
|
||||||
return scene
|
return scene
|
||||||
@@ -212,7 +212,7 @@ function scene.draw()
|
|||||||
gc.setColor(logoColor2[1],logoColor2[2],logoColor2[3],progress/maxProgress)for dx=-2,2,2 do for dy=-2,2,2 do mDraw(studioLogo,640+dx,400+dy)end end
|
gc.setColor(logoColor2[1],logoColor2[2],logoColor2[3],progress/maxProgress)for dx=-2,2,2 do for dy=-2,2,2 do mDraw(studioLogo,640+dx,400+dy)end end
|
||||||
gc.setColor(.2,.2,.2,progress/maxProgress)mDraw(studioLogo,640,400)
|
gc.setColor(.2,.2,.2,progress/maxProgress)mDraw(studioLogo,640,400)
|
||||||
|
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
setFont(30)
|
setFont(30)
|
||||||
mStr(text.loadText[loading],640,530)
|
mStr(text.loadText[loading],640,530)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -154,6 +154,7 @@ function scene.draw()
|
|||||||
mDraw(TEXTURE.title_color,640,60,nil,.43)
|
mDraw(TEXTURE.title_color,640,60,nil,.43)
|
||||||
|
|
||||||
--Tip
|
--Tip
|
||||||
|
gc.setColor(COLOR.Z)
|
||||||
gc.push('transform')
|
gc.push('transform')
|
||||||
gc.translate(260,650)
|
gc.translate(260,650)
|
||||||
gc.setLineWidth(2)
|
gc.setLineWidth(2)
|
||||||
@@ -176,7 +177,7 @@ function scene.draw()
|
|||||||
|
|
||||||
--Connecting mark
|
--Connecting mark
|
||||||
if NET.getlock('access_and_login')then
|
if NET.getlock('access_and_login')then
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.setLineWidth(10)
|
gc.setLineWidth(10)
|
||||||
local t=TIME()*6.26%6.2832
|
local t=TIME()*6.26%6.2832
|
||||||
gc.arc('line','open',scene.widgetList[3].x+865,450,40,t,t+4.26)
|
gc.arc('line','open',scene.widgetList[3].x+865,450,40,t,t+4.26)
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ function scene.draw()
|
|||||||
|
|
||||||
gc.setColor(color)
|
gc.setColor(color)
|
||||||
gc.circle('line',0,0,rad,side)
|
gc.circle('line',0,0,rad,side)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
mStr(M.id,0,-28)
|
mStr(M.id,0,-28)
|
||||||
if M.sel>0 and M.list then
|
if M.sel>0 and M.list then
|
||||||
setFont(25)
|
setFont(25)
|
||||||
@@ -139,7 +139,7 @@ function scene.draw()
|
|||||||
gc.pop()
|
gc.pop()
|
||||||
end
|
end
|
||||||
|
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
if selected then
|
if selected then
|
||||||
setFont(30)
|
setFont(30)
|
||||||
gc.printf(text.modInfo[selected.name],70,540,950)
|
gc.printf(text.modInfo[selected.name],70,540,950)
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ function scene.keyDown(key,isRep)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function scene.draw()
|
function scene.draw()
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
|
|
||||||
setFont(50)
|
setFont(50)
|
||||||
gc.print(bgmList[selected],320,355)
|
gc.print(bgmList[selected],320,355)
|
||||||
@@ -90,7 +90,7 @@ function scene.draw()
|
|||||||
gc.setColor(1,1,1,.4)
|
gc.setColor(1,1,1,.4)
|
||||||
gc.setLineWidth(4)
|
gc.setLineWidth(4)
|
||||||
gc.line(500,600,900,600)
|
gc.line(500,600,900,600)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.circle('fill',500+400*BGM.playing:tell()/BGM.playing:getDuration(),600,6)
|
gc.circle('fill',500+400*BGM.playing:tell()/BGM.playing:getDuration(),600,6)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ function scene.sceneInit()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function scene.draw()
|
function scene.draw()
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
setFont(100)
|
setFont(100)
|
||||||
mStr("Tech League",640,120)
|
mStr("Tech League",640,120)
|
||||||
drawSelfProfile()
|
drawSelfProfile()
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ function scene.draw()
|
|||||||
|
|
||||||
--Joining mark
|
--Joining mark
|
||||||
if NET.getlock('enterRoom')then
|
if NET.getlock('enterRoom')then
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.setLineWidth(15)
|
gc.setLineWidth(15)
|
||||||
local t=TIME()*6.26%6.2832
|
local t=TIME()*6.26%6.2832
|
||||||
gc.arc('line','open',640,360,80,t,t+4.26)
|
gc.arc('line','open',640,360,80,t,t+4.26)
|
||||||
|
|||||||
@@ -62,11 +62,12 @@ function scene.draw()
|
|||||||
for x=40,360,40 do
|
for x=40,360,40 do
|
||||||
gc.line(x,-10,x,90)
|
gc.line(x,-10,x,90)
|
||||||
end
|
end
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.line(0,-10,0,90)
|
gc.line(0,-10,0,90)
|
||||||
gc.line(400,-10,400,90)
|
gc.line(400,-10,400,90)
|
||||||
|
|
||||||
--O mino animation
|
--O mino animation
|
||||||
|
gc.setColor(1,1,1)
|
||||||
local O=SKIN.lib[SETTING.skinSet][SETTING.skin[6]]
|
local O=SKIN.lib[SETTING.skinSet][SETTING.skin[6]]
|
||||||
gc.draw(O,40*pos,0,nil,40/30)
|
gc.draw(O,40*pos,0,nil,40/30)
|
||||||
gc.draw(O,40*pos,40,nil,40/30)
|
gc.draw(O,40*pos,40,nil,40/30)
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ end
|
|||||||
|
|
||||||
function scene.draw()
|
function scene.draw()
|
||||||
setFont(15)
|
setFont(15)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
|
|
||||||
for i=0,20 do
|
for i=0,20 do
|
||||||
for j=1,#keyList[i]do
|
for j=1,#keyList[i]do
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ function scene.touchMove(_,_,dx,dy)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function scene.draw()
|
function scene.draw()
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.setLineWidth(3)
|
gc.setLineWidth(3)
|
||||||
gc.rectangle('line',490,65,300,610)
|
gc.rectangle('line',490,65,300,610)
|
||||||
VK.preview(selected)
|
VK.preview(selected)
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ function scene.draw()
|
|||||||
end
|
end
|
||||||
|
|
||||||
gc.replaceTransform(SCR.xOy)
|
gc.replaceTransform(SCR.xOy)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
local T=40*math.min(time,45)
|
local T=40*math.min(time,45)
|
||||||
local L=text.staff
|
local L=text.staff
|
||||||
setFont(40)
|
setFont(40)
|
||||||
|
|||||||
@@ -72,10 +72,10 @@ for i=1,8 do
|
|||||||
gc.translate(12*i,i==1 and 8 or 14)
|
gc.translate(12*i,i==1 and 8 or 14)
|
||||||
|
|
||||||
gc.setLineWidth(16)
|
gc.setLineWidth(16)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.polygon('line',title[i])
|
gc.polygon('line',title[i])
|
||||||
|
|
||||||
gc.setColor(0,0,0)
|
gc.setColor(.2,.2,.2)
|
||||||
for j=1,#titleTriangles[i]do
|
for j=1,#titleTriangles[i]do
|
||||||
gc.polygon('fill',titleTriangles[i][j])
|
gc.polygon('fill',titleTriangles[i][j])
|
||||||
end
|
end
|
||||||
@@ -88,16 +88,16 @@ for i=1,8 do
|
|||||||
gc.translate(12*i,i==1 and 8 or 14)
|
gc.translate(12*i,i==1 and 8 or 14)
|
||||||
|
|
||||||
gc.setLineWidth(16)
|
gc.setLineWidth(16)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(COLOR.Z)
|
||||||
gc.polygon('line',title[i])
|
gc.polygon('line',title[i])
|
||||||
|
|
||||||
gc.setLineWidth(4)
|
gc.setLineWidth(4)
|
||||||
gc.setColor(0,0,0)
|
gc.setColor(COLOR.D)
|
||||||
for j=1,#titleTriangles[i]do
|
for j=1,#titleTriangles[i]do
|
||||||
gc.polygon('fill',titleTriangles[i][j])
|
gc.polygon('fill',titleTriangles[i][j])
|
||||||
end
|
end
|
||||||
|
|
||||||
gc.setColor(titleColor[i])
|
gc.setColor(.2+.8*titleColor[i][1],.2+.8*titleColor[i][2],.2+.8*titleColor[i][3],.7)
|
||||||
gc.translate(-4,-4)
|
gc.translate(-4,-4)
|
||||||
for j=1,#titleTriangles[i]do
|
for j=1,#titleTriangles[i]do
|
||||||
gc.polygon('fill',titleTriangles[i][j])
|
gc.polygon('fill',titleTriangles[i][j])
|
||||||
|
|||||||
Reference in New Issue
Block a user