整理代码,大规模整理(展开)使用次数不多的局部变量名
框架跟进
This commit is contained in:
Submodule Zframework updated: 66f4509b26...11b8ee6b29
12
main.lua
12
main.lua
@@ -80,9 +80,8 @@ table.insert(_LOADTIMELIST_,("Load Zframework: %.3fs"):format(TIME()-_LOADTIME_)
|
||||
--Create shortcuts
|
||||
setFont=FONT.set
|
||||
getFont=FONT.get
|
||||
mStr=GC.mStr
|
||||
mText=GC.simpX
|
||||
mDraw=GC.draw
|
||||
mDraw=GC.mDraw
|
||||
Snd=SFX.playSample
|
||||
string.repD=STRING.repD
|
||||
string.sArg=STRING.sArg
|
||||
@@ -151,17 +150,16 @@ do--Z.setCursor
|
||||
{'fCirc',8,8,3},
|
||||
}
|
||||
local min,int,abs=math.min,math.floor,math.abs
|
||||
local gc_setColor,gc_draw=love.graphics.setColor,love.graphics.draw
|
||||
local ms=love.mouse
|
||||
Z.setCursor(function(time,x,y)
|
||||
if not SETTING.sysCursor then
|
||||
local R=int((time+1)/2)%7+1
|
||||
_=BLOCK_COLORS[SETTING.skin[R]]
|
||||
gc_setColor(_[1],_[2],_[3],min(abs(1-time%2),.3))
|
||||
GC.setColor(_[1],_[2],_[3],min(abs(1-time%2),.3))
|
||||
_=DSCP[R][0]
|
||||
gc_draw(TEXTURE.miniBlock[R],x,y,time%3.14159265359*4,8,8,2*_[2]+1,2*(#BLOCKS[R][0]-_[1])-1)
|
||||
gc_setColor(1,1,1)
|
||||
gc_draw(ms.isDown(1)and holdImg or normImg,x,y,nil,nil,nil,8,8)
|
||||
GC.draw(TEXTURE.miniBlock[R],x,y,time%3.14159265359*4,8,8,2*_[2]+1,2*(#BLOCKS[R][0]-_[1])-1)
|
||||
GC.setColor(1,1,1)
|
||||
GC.draw(ms.isDown(1)and holdImg or normImg,x,y,nil,nil,nil,8,8)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
--Cool liquid background
|
||||
local gc=love.graphics
|
||||
local back={}
|
||||
local shader=SHADER.aura
|
||||
local t
|
||||
@@ -12,10 +11,10 @@ function back.update(dt)
|
||||
t=(t+dt)%2600
|
||||
end
|
||||
function back.draw()
|
||||
gc.clear(.08,.08,.084)
|
||||
GC.clear(.08,.08,.084)
|
||||
shader:send('phase',t)
|
||||
gc.setShader(shader)
|
||||
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||
gc.setShader()
|
||||
GC.setShader(shader)
|
||||
GC.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||
GC.setShader()
|
||||
end
|
||||
return back
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
--Horizonal red-blue gradient
|
||||
local gc=love.graphics
|
||||
local back={}
|
||||
local shader=SHADER.grad1
|
||||
|
||||
@@ -11,10 +10,10 @@ function back.update(dt)
|
||||
t=(t+dt)%2600
|
||||
end
|
||||
function back.draw()
|
||||
gc.clear(.08,.08,.084)
|
||||
GC.clear(.08,.08,.084)
|
||||
shader:send('phase',t)
|
||||
gc.setShader(shader)
|
||||
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||
gc.setShader()
|
||||
GC.setShader(shader)
|
||||
GC.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||
GC.setShader()
|
||||
end
|
||||
return back
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
--Vertical red-green gradient
|
||||
local gc=love.graphics
|
||||
local back={}
|
||||
local shader=SHADER.grad2
|
||||
|
||||
@@ -12,10 +11,10 @@ function back.update(dt)
|
||||
t=(t+dt)%2600
|
||||
end
|
||||
function back.draw()
|
||||
gc.clear(.08,.08,.084)
|
||||
GC.clear(.08,.08,.084)
|
||||
shader:send('phase',t)
|
||||
gc.setShader(shader)
|
||||
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||
gc.setShader()
|
||||
GC.setShader(shader)
|
||||
GC.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||
GC.setShader()
|
||||
end
|
||||
return back
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
--Customizable grey background
|
||||
local gc=love.graphics
|
||||
local back={}
|
||||
local r,g,b=.26,.26,.26
|
||||
function back.draw()
|
||||
gc.clear(r,g,b)
|
||||
GC.clear(r,g,b)
|
||||
end
|
||||
function back.event(_r,_g,_b)
|
||||
r,g,b=_r,_g,_b
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
--Flash after random time
|
||||
local gc=love.graphics
|
||||
local back={}
|
||||
|
||||
local t
|
||||
@@ -11,8 +10,8 @@ function back.update(dt)
|
||||
end
|
||||
function back.draw()
|
||||
local t1=.13-t%3%1.9
|
||||
if t1<.2 then gc.clear(t1,t1,t1)
|
||||
else gc.clear(0,0,0)
|
||||
if t1<.2 then GC.clear(t1,t1,t1)
|
||||
else GC.clear(0,0,0)
|
||||
end
|
||||
end
|
||||
return back
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
--Light-dark
|
||||
local gc=love.graphics
|
||||
local sin=math.sin
|
||||
local back={}
|
||||
|
||||
@@ -12,6 +11,6 @@ function back.update(dt)
|
||||
end
|
||||
function back.draw()
|
||||
local t1=(sin(t*.5)+sin(t*.7)+sin(t*.9+1)+sin(t*1.5)+sin(t*2+10))*.08
|
||||
gc.clear(t1,t1,t1)
|
||||
GC.clear(t1,t1,t1)
|
||||
end
|
||||
return back
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
--A lantern background which is full of festive atmosphere. Lantern image by ScF
|
||||
local gc=love.graphics
|
||||
local int,rnd=math.floor,math.random
|
||||
local ins,rem=table.insert,table.remove
|
||||
local mDraw=mDraw
|
||||
@@ -37,8 +36,8 @@ function back.update(dt)
|
||||
end
|
||||
end
|
||||
function back.draw()
|
||||
gc.clear(.08,.08,.084)
|
||||
gc.setColor(1,1,1,.2)
|
||||
GC.clear(.08,.08,.084)
|
||||
GC.setColor(1,1,1,.2)
|
||||
local img=IMG.lanterns
|
||||
for i=1,#lanterns do
|
||||
local L=lanterns[i]
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
--Space with stars
|
||||
local gc=love.graphics
|
||||
local back={}
|
||||
|
||||
local upCover do
|
||||
@@ -29,8 +28,8 @@ end
|
||||
function back.update()
|
||||
end
|
||||
function back.draw()
|
||||
gc.clear(.08,.08,.084)
|
||||
gc.draw(upCover,0,0,0,W,H*.3/64)
|
||||
gc.draw(downCover,0,H*.7,0,W,H*.3/64)
|
||||
GC.clear(.08,.08,.084)
|
||||
GC.draw(upCover,0,0,0,W,H*.3/64)
|
||||
GC.draw(downCover,0,H*.7,0,W,H*.3/64)
|
||||
end
|
||||
return back
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
--Lightning
|
||||
local gc=love.graphics
|
||||
local back={}
|
||||
|
||||
local t
|
||||
@@ -11,8 +10,8 @@ function back.update(dt)
|
||||
end
|
||||
function back.draw()
|
||||
local t1=2.5-t%20%6%2.5
|
||||
if t1<.3 then gc.clear(t1,t1,t1)
|
||||
else gc.clear(0,0,0)
|
||||
if t1<.3 then GC.clear(t1,t1,t1)
|
||||
else GC.clear(0,0,0)
|
||||
end
|
||||
end
|
||||
return back
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
--Fast lightning + spining tetromino
|
||||
local gc=love.graphics
|
||||
local int,rnd=math.floor,math.random
|
||||
local back={}
|
||||
|
||||
@@ -15,11 +14,11 @@ end
|
||||
function back.draw()
|
||||
local R=7-int(t*.5%7)
|
||||
local T=1.2-t%15%6%1.8
|
||||
if T<.26 then gc.clear(T,T,T)
|
||||
else gc.clear(0,0,0)
|
||||
if T<.26 then GC.clear(T,T,T)
|
||||
else GC.clear(0,0,0)
|
||||
end
|
||||
local _=colorLib[SETTING.skin[R]]
|
||||
gc.setColor(_[1],_[2],_[3],.12)
|
||||
gc.draw(TEXTURE.miniBlock[R],SCR.cx,SCR.cy,t%3.1416*6,200*SCR.k,nil,2*DSCP[R][0][2]+1,2*(#blocks[R][0]-DSCP[R][0][1])-1)
|
||||
GC.setColor(_[1],_[2],_[3],.12)
|
||||
GC.draw(TEXTURE.miniBlock[R],SCR.cx,SCR.cy,t%3.1416*6,200*SCR.k,nil,2*DSCP[R][0][2]+1,2*(#blocks[R][0]-DSCP[R][0][1])-1)
|
||||
end
|
||||
return back
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
--Colorful RGB
|
||||
local gc=love.graphics
|
||||
local back={}
|
||||
local shader=SHADER.rgb1
|
||||
|
||||
@@ -12,10 +11,10 @@ function back.update(dt)
|
||||
t=(t+dt)%2600
|
||||
end
|
||||
function back.draw()
|
||||
gc.clear(.08,.08,.084)
|
||||
GC.clear(.08,.08,.084)
|
||||
shader:send('phase',t)
|
||||
gc.setShader(shader)
|
||||
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||
gc.setShader()
|
||||
GC.setShader(shader)
|
||||
GC.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||
GC.setShader()
|
||||
end
|
||||
return back
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
--Blue RGB
|
||||
local gc=love.graphics
|
||||
local back={}
|
||||
local shader=SHADER.rgb2
|
||||
|
||||
@@ -12,10 +11,10 @@ function back.update(dt)
|
||||
t=(t+dt)%2600
|
||||
end
|
||||
function back.draw()
|
||||
gc.clear(.08,.08,.084)
|
||||
GC.clear(.08,.08,.084)
|
||||
shader:send('phase',t)
|
||||
gc.setShader(shader)
|
||||
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||
gc.setShader()
|
||||
GC.setShader(shader)
|
||||
GC.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||
GC.setShader()
|
||||
end
|
||||
return back
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
--Changing pure color
|
||||
local gc=love.graphics
|
||||
local sin=math.sin
|
||||
local back={}
|
||||
|
||||
@@ -11,7 +10,7 @@ function back.update(dt)
|
||||
t=t+dt
|
||||
end
|
||||
function back.draw()
|
||||
gc.clear(
|
||||
GC.clear(
|
||||
sin(t*1.2)*.06+.08,
|
||||
sin(t*1.5)*.06+.08,
|
||||
sin(t*1.9)*.06+.08
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
--Cool Tunnel
|
||||
local gc=love.graphics
|
||||
local rnd=math.random
|
||||
local ins,rem=table.insert,table.remove
|
||||
local back={}
|
||||
@@ -29,12 +28,12 @@ function back.update(dt)
|
||||
end
|
||||
end
|
||||
function back.draw()
|
||||
gc.clear(.08,.08,.084)
|
||||
gc.setColor(1,1,1,.1)
|
||||
GC.clear(.08,.08,.084)
|
||||
GC.setColor(1,1,1,.1)
|
||||
for i=1,#ring do
|
||||
local r=ring[i]^2/12
|
||||
gc.setLineWidth(30-15/(r+.5))
|
||||
gc.rectangle('line',W*.5-W*r/2,H*.5-H*r/2,W*r,H*r)
|
||||
GC.setLineWidth(30-15/(r+.5))
|
||||
GC.rectangle('line',W*.5-W*r/2,H*.5-H*r/2,W*r,H*r)
|
||||
end
|
||||
end
|
||||
function back.discard()
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
--Welcome to Techmino
|
||||
local gc=love.graphics
|
||||
local sin=math.sin
|
||||
local back={}
|
||||
|
||||
@@ -7,33 +6,33 @@ local t
|
||||
local textObj
|
||||
function back.init()
|
||||
t=math.random()*2600
|
||||
textObj=gc.newText(getFont(80),"Welcome To Techmino")
|
||||
textObj=GC.newText(getFont(80),"Welcome To Techmino")
|
||||
end
|
||||
function back.update(dt)
|
||||
t=t+dt
|
||||
end
|
||||
function back.draw()
|
||||
if -t%13.55<.1283 then
|
||||
gc.clear(.2+.1*sin(t),.2+.1*sin(1.26*t),.2+.1*sin(1.626*t))
|
||||
GC.clear(.2+.1*sin(t),.2+.1*sin(1.26*t),.2+.1*sin(1.626*t))
|
||||
else
|
||||
gc.clear(.08,.08,.084)
|
||||
GC.clear(.08,.08,.084)
|
||||
end
|
||||
gc.push('transform')
|
||||
gc.replaceTransform(SCR.xOy_m)
|
||||
gc.translate(0,20*sin(t*.02))
|
||||
gc.scale(1.26,1.36)
|
||||
GC.push('transform')
|
||||
GC.replaceTransform(SCR.xOy_m)
|
||||
GC.translate(0,20*sin(t*.02))
|
||||
GC.scale(1.26,1.36)
|
||||
if -t%6.26<.1355 then
|
||||
gc.translate(60*sin(t*.26),100*sin(t*.626))
|
||||
GC.translate(60*sin(t*.26),100*sin(t*.626))
|
||||
end
|
||||
if -t%12.6<.1626 then
|
||||
gc.rotate(t+5*sin(.26*t)+5*sin(.626*t))
|
||||
GC.rotate(t+5*sin(.26*t)+5*sin(.626*t))
|
||||
end
|
||||
gc.setColor(.4,.6,1,.3)
|
||||
GC.setColor(.4,.6,1,.3)
|
||||
mDraw(textObj,4*sin(t*.7942),4*sin(t*.7355))
|
||||
gc.setColor(.5,.7,1,.4)
|
||||
GC.setColor(.5,.7,1,.4)
|
||||
mDraw(textObj,2*sin(t*.77023),2*sin(t*.7026))
|
||||
gc.setColor(1,1,1,.5)
|
||||
GC.setColor(1,1,1,.5)
|
||||
mDraw(textObj,3*sin(t*.7283),3*sin(t*.7626))
|
||||
gc.pop()
|
||||
GC.pop()
|
||||
end
|
||||
return back
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
--Flandre's wing
|
||||
local gc=love.graphics
|
||||
local rnd=math.random
|
||||
local back={}
|
||||
local crystal_img,crystals
|
||||
local wingColor={
|
||||
@@ -46,31 +44,31 @@ function back.update()
|
||||
end
|
||||
end
|
||||
function back.draw()
|
||||
gc.clear(.06,.06,.06)
|
||||
gc.setColor(.12,.10,.08)
|
||||
gc.setLineJoin('bevel')
|
||||
gc.setLineWidth(14*SCR.k)
|
||||
GC.clear(.06,.06,.06)
|
||||
GC.setColor(.12,.10,.08)
|
||||
GC.setLineJoin('bevel')
|
||||
GC.setLineWidth(14*SCR.k)
|
||||
local W,H=SCR.w,SCR.h
|
||||
gc.line(.018*W,.567*H,.101*W,.512*H,.202*W,.369*H,.260*W,.212*H)
|
||||
gc.line(.247*W,.257*H,.307*W,.383*H,.352*W,.436*H,.401*W,.309*H)
|
||||
gc.line(.982*W,.567*H,.899*W,.512*H,.798*W,.369*H,.740*W,.212*H)
|
||||
gc.line(.753*W,.257*H,.693*W,.383*H,.648*W,.436*H,.599*W,.309*H)
|
||||
GC.line(.018*W,.567*H,.101*W,.512*H,.202*W,.369*H,.260*W,.212*H)
|
||||
GC.line(.247*W,.257*H,.307*W,.383*H,.352*W,.436*H,.401*W,.309*H)
|
||||
GC.line(.982*W,.567*H,.899*W,.512*H,.798*W,.369*H,.740*W,.212*H)
|
||||
GC.line(.753*W,.257*H,.693*W,.383*H,.648*W,.436*H,.599*W,.309*H)
|
||||
|
||||
local k=SCR.k
|
||||
for i=1,8 do
|
||||
gc.setColor(wingColor[i])
|
||||
GC.setColor(wingColor[i])
|
||||
local B=crystals[i]
|
||||
gc.draw(crystal_img,B.x,B.y,B.a,k,k,21,0)
|
||||
GC.draw(crystal_img,B.x,B.y,B.a,k,k,21,0)
|
||||
B=crystals[8+i]
|
||||
gc.draw(crystal_img,B.x,B.y,B.a,-k,k,21,0)
|
||||
GC.draw(crystal_img,B.x,B.y,B.a,-k,k,21,0)
|
||||
end
|
||||
end
|
||||
function back.event(level)
|
||||
for i=1,8 do
|
||||
local B=crystals[i]
|
||||
B.va=B.va+.001*level*(1+rnd())
|
||||
B.va=B.va+.001*level*(1+math.random())
|
||||
B=crystals[17-i]
|
||||
B.va=B.va-.001*level*(1+rnd())
|
||||
B.va=B.va-.001*level*(1+math.random())
|
||||
end
|
||||
end
|
||||
function back.discard()
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
return{
|
||||
mesDisp=function(P)
|
||||
setFont(55)
|
||||
mStr(P.modeData.wave,63,200)
|
||||
mStr("22",63,320)
|
||||
GC.mStr(P.modeData.wave,63,200)
|
||||
GC.mStr("22",63,320)
|
||||
mText(TEXTOBJ.wave,63,260)
|
||||
mText(TEXTOBJ.nextWave,63,380)
|
||||
end,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
return{
|
||||
mesDisp=function(P)
|
||||
setFont(55)
|
||||
mStr(P.modeData.wave,63,200)
|
||||
mStr(20+4*math.min(math.floor(P.modeData.wave/10),2),63,320)
|
||||
GC.mStr(P.modeData.wave,63,200)
|
||||
GC.mStr(20+4*math.min(math.floor(P.modeData.wave/10),2),63,320)
|
||||
mText(TEXTOBJ.wave,63,260)
|
||||
mText(TEXTOBJ.nextWave,63,380)
|
||||
end,
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
local gc=love.graphics
|
||||
|
||||
return{
|
||||
mesDisp=function(P)
|
||||
mText(TEXTOBJ.techrash,63,420)
|
||||
setFont(75)
|
||||
mStr(P.stat.clears[4],63,340)
|
||||
GC.mStr(P.stat.clears[4],63,340)
|
||||
PLY.draw.applyField(P)
|
||||
gc.setColor(1,1,1,.1)
|
||||
gc.draw(IMG.electric,0,106,0,2.6)
|
||||
GC.setColor(1,1,1,.1)
|
||||
GC.draw(IMG.electric,0,106,0,2.6)
|
||||
PLY.draw.cancelField(P)
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@ local rem=table.remove
|
||||
return{
|
||||
mesDisp=function(P)
|
||||
setFont(45)
|
||||
mStr(P.combo,63,310)
|
||||
mStr(P.modeData.maxCombo,63,400)
|
||||
GC.mStr(P.combo,63,310)
|
||||
GC.mStr(P.modeData.maxCombo,63,400)
|
||||
mText(TEXTOBJ.combo,63,358)
|
||||
mText(TEXTOBJ.maxcmb,63,450)
|
||||
end,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
return{
|
||||
mesDisp=function(P)
|
||||
setFont(45)
|
||||
mStr(("%.1f"):format(P.stat.atk),63,190)
|
||||
mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310)
|
||||
GC.mStr(("%.1f"):format(P.stat.atk),63,190)
|
||||
GC.mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310)
|
||||
mText(TEXTOBJ.atk,63,243)
|
||||
mText(TEXTOBJ.eff,63,363)
|
||||
end,
|
||||
|
||||
@@ -3,7 +3,7 @@ return{
|
||||
setFont(55)
|
||||
local r=10-P.stat.row
|
||||
if r<0 then r=0 end
|
||||
mStr(r,63,265)
|
||||
GC.mStr(r,63,265)
|
||||
PLY.draw.drawTargetLine(P,r)
|
||||
end,
|
||||
hook_drop=function(P)
|
||||
|
||||
@@ -3,7 +3,7 @@ return{
|
||||
setFont(55)
|
||||
local r=100-P.stat.row
|
||||
if r<0 then r=0 end
|
||||
mStr(r,63,265)
|
||||
GC.mStr(r,63,265)
|
||||
PLY.draw.drawTargetLine(P,r)
|
||||
end,
|
||||
hook_drop=function(P)
|
||||
|
||||
@@ -3,7 +3,7 @@ return{
|
||||
setFont(55)
|
||||
local r=1000-P.stat.row
|
||||
if r<0 then r=0 end
|
||||
mStr(r,63,265)
|
||||
GC.mStr(r,63,265)
|
||||
PLY.draw.drawTargetLine(P,r)
|
||||
end,
|
||||
hook_drop=function(P)
|
||||
|
||||
@@ -3,7 +3,7 @@ return{
|
||||
setFont(55)
|
||||
local r=20-P.stat.row
|
||||
if r<0 then r=0 end
|
||||
mStr(r,63,265)
|
||||
GC.mStr(r,63,265)
|
||||
PLY.draw.drawTargetLine(P,r)
|
||||
end,
|
||||
hook_drop=function(P)
|
||||
|
||||
@@ -3,7 +3,7 @@ return{
|
||||
setFont(55)
|
||||
local r=200-P.stat.row
|
||||
if r<0 then r=0 end
|
||||
mStr(r,63,265)
|
||||
GC.mStr(r,63,265)
|
||||
PLY.draw.drawTargetLine(P,r)
|
||||
end,
|
||||
hook_drop=function(P)
|
||||
|
||||
@@ -3,7 +3,7 @@ return{
|
||||
setFont(55)
|
||||
local r=40-P.stat.row
|
||||
if r<0 then r=0 end
|
||||
mStr(r,63,265)
|
||||
GC.mStr(r,63,265)
|
||||
PLY.draw.drawTargetLine(P,r)
|
||||
end,
|
||||
hook_drop=function(P)
|
||||
|
||||
@@ -3,7 +3,7 @@ return{
|
||||
setFont(55)
|
||||
local r=400-P.stat.row
|
||||
if r<0 then r=0 end
|
||||
mStr(r,63,265)
|
||||
GC.mStr(r,63,265)
|
||||
PLY.draw.drawTargetLine(P,r)
|
||||
end,
|
||||
hook_drop=function(P)
|
||||
|
||||
@@ -23,7 +23,6 @@ local function GetGravity(lvl)
|
||||
lvl<29 and 2 or
|
||||
1
|
||||
end
|
||||
local gc_setColor=love.graphics.setColor
|
||||
return{
|
||||
das=16,arr=6,
|
||||
sddas=6,sdarr=6,
|
||||
@@ -40,18 +39,18 @@ return{
|
||||
keyCancel={5,6},
|
||||
mesDisp=function(P)
|
||||
setFont(75)
|
||||
mStr(GetLevelStr(P.modeData.lvl),63,210)
|
||||
GC.mStr(GetLevelStr(P.modeData.lvl),63,210)
|
||||
mText(TEXTOBJ.speedLV,63,290)
|
||||
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
||||
if P.modeData.drought>7 then
|
||||
if P.modeData.drought<=14 then
|
||||
gc_setColor(1,1,1,P.modeData.drought/7-1)
|
||||
GC.setColor(1,1,1,P.modeData.drought/7-1)
|
||||
else
|
||||
local gb=P.modeData.drought<=21 and 2-P.modeData.drought/14 or .5
|
||||
gc_setColor(1,gb,gb)
|
||||
GC.setColor(1,gb,gb)
|
||||
end
|
||||
setFont(50)
|
||||
mStr(P.modeData.drought,63,130)
|
||||
GC.mStr(P.modeData.drought,63,130)
|
||||
mDraw(MODES.drought_l.icon,63,200,nil,.5)
|
||||
end
|
||||
end,
|
||||
|
||||
@@ -23,7 +23,6 @@ local function GetGravity(lvl)
|
||||
lvl<29 and 2 or
|
||||
1
|
||||
end
|
||||
local gc_setColor=love.graphics.setColor
|
||||
return{
|
||||
das=16,arr=6,
|
||||
sddas=3,sdarr=3,
|
||||
@@ -40,18 +39,18 @@ return{
|
||||
keyCancel={5,6},
|
||||
mesDisp=function(P)
|
||||
setFont(75)
|
||||
mStr(GetLevelStr(P.modeData.lvl),63,210)
|
||||
GC.mStr(GetLevelStr(P.modeData.lvl),63,210)
|
||||
mText(TEXTOBJ.speedLV,63,290)
|
||||
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
||||
if P.modeData.drought>7 then
|
||||
if P.modeData.drought<=14 then
|
||||
gc_setColor(1,1,1,P.modeData.drought/7-1)
|
||||
GC.setColor(1,1,1,P.modeData.drought/7-1)
|
||||
else
|
||||
local gb=P.modeData.drought<=21 and 2-P.modeData.drought/14 or .5
|
||||
gc_setColor(1,gb,gb)
|
||||
GC.setColor(1,gb,gb)
|
||||
end
|
||||
setFont(50)
|
||||
mStr(P.modeData.drought,63,130)
|
||||
GC.mStr(P.modeData.drought,63,130)
|
||||
mDraw(MODES.drought_l.icon,63,200,nil,.5)
|
||||
end
|
||||
end,
|
||||
|
||||
@@ -23,7 +23,6 @@ local function GetGravity(lvl)
|
||||
lvl<29 and 2 or
|
||||
1
|
||||
end
|
||||
local gc_setColor=love.graphics.setColor
|
||||
return{
|
||||
das=16,arr=6,
|
||||
sddas=2,sdarr=2,
|
||||
@@ -40,18 +39,18 @@ return{
|
||||
keyCancel={5,6},
|
||||
mesDisp=function(P)
|
||||
setFont(75)
|
||||
mStr(GetLevelStr(P.modeData.lvl),63,210)
|
||||
GC.mStr(GetLevelStr(P.modeData.lvl),63,210)
|
||||
mText(TEXTOBJ.speedLV,63,290)
|
||||
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
||||
if P.modeData.drought>7 then
|
||||
if P.modeData.drought<=14 then
|
||||
gc_setColor(1,1,1,P.modeData.drought/7-1)
|
||||
GC.setColor(1,1,1,P.modeData.drought/7-1)
|
||||
else
|
||||
local gb=P.modeData.drought<=21 and 2-P.modeData.drought/14 or .5
|
||||
gc_setColor(1,gb,gb)
|
||||
GC.setColor(1,gb,gb)
|
||||
end
|
||||
setFont(50)
|
||||
mStr(P.modeData.drought,63,130)
|
||||
GC.mStr(P.modeData.drought,63,130)
|
||||
mDraw(MODES.drought_l.icon,63,200,nil,.5)
|
||||
end
|
||||
end,
|
||||
|
||||
@@ -4,26 +4,6 @@ local function GetLevelStr(lvl)
|
||||
lvl=lvl%256
|
||||
return list[lvl]
|
||||
end
|
||||
local function GetGravity(lvl)
|
||||
lvl=lvl%256
|
||||
return
|
||||
lvl==0 and 48 or
|
||||
lvl==1 and 43 or
|
||||
lvl==2 and 38 or
|
||||
lvl==3 and 33 or
|
||||
lvl==4 and 28 or
|
||||
lvl==5 and 23 or
|
||||
lvl==6 and 18 or
|
||||
lvl==7 and 13 or
|
||||
lvl==8 and 8 or
|
||||
lvl==9 and 6 or
|
||||
lvl<13 and 5 or
|
||||
lvl<16 and 4 or
|
||||
lvl<19 and 3 or
|
||||
lvl<29 and 2 or
|
||||
1
|
||||
end
|
||||
local gc_setColor=love.graphics.setColor
|
||||
return{
|
||||
das=16,arr=6,
|
||||
sddas=1,sdarr=1,
|
||||
@@ -40,18 +20,18 @@ return{
|
||||
keyCancel={5,6},
|
||||
mesDisp=function(P)
|
||||
setFont(75)
|
||||
mStr(GetLevelStr(P.modeData.lvl),63,210)
|
||||
GC.mStr(GetLevelStr(P.modeData.lvl),63,210)
|
||||
mText(TEXTOBJ.speedLV,63,290)
|
||||
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
||||
if P.modeData.drought>7 then
|
||||
if P.modeData.drought<=14 then
|
||||
gc_setColor(1,1,1,P.modeData.drought/7-1)
|
||||
GC.setColor(1,1,1,P.modeData.drought/7-1)
|
||||
else
|
||||
local gb=P.modeData.drought<=21 and 2-P.modeData.drought/14 or .5
|
||||
gc_setColor(1,gb,gb)
|
||||
GC.setColor(1,gb,gb)
|
||||
end
|
||||
setFont(50)
|
||||
mStr(P.modeData.drought,63,130)
|
||||
GC.mStr(P.modeData.drought,63,130)
|
||||
mDraw(MODES.drought_l.icon,63,200,nil,.5)
|
||||
end
|
||||
end,
|
||||
|
||||
@@ -3,8 +3,8 @@ return{
|
||||
fall=6,
|
||||
mesDisp=function(P)
|
||||
setFont(55)
|
||||
mStr(P.modeData.wave,63,200)
|
||||
mStr(P.modeData.rpm,63,320)
|
||||
GC.mStr(P.modeData.wave,63,200)
|
||||
GC.mStr(P.modeData.rpm,63,320)
|
||||
mText(TEXTOBJ.wave,63,260)
|
||||
mText(TEXTOBJ.rpm,63,380)
|
||||
end,
|
||||
|
||||
@@ -3,8 +3,8 @@ return{
|
||||
fall=10,
|
||||
mesDisp=function(P)
|
||||
setFont(55)
|
||||
mStr(P.modeData.wave,63,200)
|
||||
mStr(P.modeData.rpm,63,320)
|
||||
GC.mStr(P.modeData.wave,63,200)
|
||||
GC.mStr(P.modeData.rpm,63,320)
|
||||
mText(TEXTOBJ.wave,63,260)
|
||||
mText(TEXTOBJ.rpm,63,380)
|
||||
end,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
return{
|
||||
mesDisp=function(P)
|
||||
setFont(55)
|
||||
mStr(100-P.stat.dig,63,265)
|
||||
GC.mStr(100-P.stat.dig,63,265)
|
||||
end,
|
||||
hook_drop=function(P)
|
||||
for _=1,math.min(10,100-P.stat.dig)-P.garbageBeneath do
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
return{
|
||||
mesDisp=function(P)
|
||||
setFont(55)
|
||||
mStr(10-P.stat.dig,63,265)
|
||||
GC.mStr(10-P.stat.dig,63,265)
|
||||
end,
|
||||
hook_drop=function(P)
|
||||
if P.stat.dig==10 then
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
return{
|
||||
mesDisp=function(P)
|
||||
setFont(55)
|
||||
mStr(400-P.stat.dig,63,265)
|
||||
GC.mStr(400-P.stat.dig,63,265)
|
||||
end,
|
||||
hook_drop=function(P)
|
||||
for _=1,math.min(10,400-P.stat.dig)-P.garbageBeneath do
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
return{
|
||||
mesDisp=function(P)
|
||||
setFont(55)
|
||||
mStr(40-P.stat.dig,63,265)
|
||||
GC.mStr(40-P.stat.dig,63,265)
|
||||
end,
|
||||
hook_drop=function(P)
|
||||
for _=1,math.min(10,40-P.stat.dig)-P.garbageBeneath do
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
return{
|
||||
mesDisp=function(P)
|
||||
setFont(60)
|
||||
mStr(P.modeData.wave,63,310)
|
||||
GC.mStr(P.modeData.wave,63,310)
|
||||
mText(TEXTOBJ.wave,63,375)
|
||||
end,
|
||||
task=function(P)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
return{
|
||||
mesDisp=function(P)
|
||||
setFont(60)
|
||||
mStr(P.modeData.wave,63,310)
|
||||
GC.mStr(P.modeData.wave,63,310)
|
||||
mText(TEXTOBJ.wave,63,375)
|
||||
end,
|
||||
task=function(P)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
local gc=love.graphics
|
||||
local sectionName={"D","C","B","A","A+","S-","S","S+","S+","SS","SS","U","U","X","X+"}
|
||||
local passPoint=16
|
||||
|
||||
@@ -24,20 +23,20 @@ return{
|
||||
mesDisp=function(P)
|
||||
local h=(3600-P.stat.frame)/10
|
||||
if h>0 then
|
||||
gc.setColor(1,1,1,.12)
|
||||
gc.rectangle('fill',0,475-h,125,h,4)
|
||||
gc.setColor(COLOR.Z)
|
||||
GC.setColor(1,1,1,.12)
|
||||
GC.rectangle('fill',0,475-h,125,h,4)
|
||||
GC.setColor(COLOR.Z)
|
||||
end
|
||||
mText(TEXTOBJ.line,63,310)
|
||||
mText(TEXTOBJ.techrash,63,420)
|
||||
mText(TEXTOBJ.grade,63,180)
|
||||
setFont(20)
|
||||
mStr(("%.1f"):format(P.modeData.rankPoint/10),63,208)
|
||||
GC.mStr(("%.1f"):format(P.modeData.rankPoint/10),63,208)
|
||||
setFont(55)
|
||||
mStr(P.modeData.rankName,63,125)
|
||||
GC.mStr(P.modeData.rankName,63,125)
|
||||
setFont(75)
|
||||
mStr(P.stat.row,63,230)
|
||||
mStr(P.stat.clears[4],63,340)
|
||||
GC.mStr(P.stat.row,63,230)
|
||||
GC.mStr(P.stat.clears[4],63,340)
|
||||
PLY.draw.drawTargetLine(P,getRollGoal(P))
|
||||
end,
|
||||
hook_drop=function(P)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
local gc=love.graphics
|
||||
local regretDelay=-1
|
||||
local int_grade=0
|
||||
local grade_points=0
|
||||
@@ -130,51 +129,51 @@ return{
|
||||
minsdarr=1,
|
||||
ihs=true,irs=true,ims=false,
|
||||
mesDisp=function(P)
|
||||
gc.setColor(1,1,1,1)
|
||||
GC.setColor(1,1,1,1)
|
||||
setFont(45)
|
||||
mText(TEXTOBJ.grade,63,180)
|
||||
setFont(60)
|
||||
mStr(getGrade(),63,110) -- draw grade
|
||||
GC.mStr(getGrade(),63,110) -- draw grade
|
||||
for i=1,10 do -- draw cool/regret history
|
||||
if not (coolList[i] or regretList[i]) then -- neither cool nor regret
|
||||
gc.setColor(0.6,0.6,0.6,P.modeData.pt<(i-1)*100 and 0.25 or 0.6)
|
||||
GC.setColor(0.6,0.6,0.6,P.modeData.pt<(i-1)*100 and 0.25 or 0.6)
|
||||
else
|
||||
gc.setColor(regretList[i] and 1 or 0, coolList[i] and 1 or 0, 0, 1)
|
||||
GC.setColor(regretList[i] and 1 or 0, coolList[i] and 1 or 0, 0, 1)
|
||||
end
|
||||
gc.circle('fill',-10,150+i*25,10)
|
||||
gc.setColor(1,1,1,1)
|
||||
GC.circle('fill',-10,150+i*25,10)
|
||||
GC.setColor(1,1,1,1)
|
||||
end
|
||||
if isInRoll then
|
||||
setFont(20)
|
||||
mStr(("%.1f"):format(rollGrades),63,208) -- draw roll grades
|
||||
gc.setLineWidth(2)
|
||||
gc.setColor(.98,.98,.98,.8)
|
||||
gc.rectangle('line',0,240,126,80,4)
|
||||
gc.setColor(.98,.98,.98,.4)
|
||||
gc.rectangle('fill',0+2,240+2,126-4,80-4,2) -- draw time box
|
||||
GC.mStr(("%.1f"):format(rollGrades),63,208) -- draw roll grades
|
||||
GC.setLineWidth(2)
|
||||
GC.setColor(.98,.98,.98,.8)
|
||||
GC.rectangle('line',0,240,126,80,4)
|
||||
GC.setColor(.98,.98,.98,.4)
|
||||
GC.rectangle('fill',0+2,240+2,126-4,80-4,2) -- draw time box
|
||||
setFont(45)
|
||||
local t=(P.stat.frame-prevSectTime)/60
|
||||
local T=("%.1f"):format(60-t)
|
||||
gc.setColor(COLOR.dH)
|
||||
mStr(T,65,250) -- draw time
|
||||
GC.setColor(COLOR.dH)
|
||||
GC.mStr(T,65,250) -- draw time
|
||||
t=t/60
|
||||
gc.setColor(1.7*t,2.3-2*t,.3)
|
||||
mStr(T,63,248)
|
||||
GC.setColor(1.7*t,2.3-2*t,.3)
|
||||
GC.mStr(T,63,248)
|
||||
PLY.draw.drawTargetLine(P,getRollGoal())
|
||||
else
|
||||
-- draw level counter
|
||||
setFont(20)
|
||||
mStr(grade_points,63,208)
|
||||
GC.mStr(grade_points,63,208)
|
||||
setFont(45)
|
||||
if coolList[math.ceil(P.modeData.pt/100+0.01)] then
|
||||
gc.setColor(0,1,0,1)
|
||||
GC.setColor(0,1,0,1)
|
||||
elseif P.stat.frame-prevSectTime > cool_time[math.ceil(P.modeData.pt/100+0.01)] then
|
||||
gc.setColor(0.7,0.7,0.7,1)
|
||||
GC.setColor(0.7,0.7,0.7,1)
|
||||
end
|
||||
if coolList[math.ceil(P.modeData.pt/100+0.01)] and regretList[math.ceil(P.modeData.pt/100+0.01)] then
|
||||
gc.setColor(1,1,0,1)
|
||||
GC.setColor(1,1,0,1)
|
||||
elseif regretList[math.ceil(P.modeData.pt/100+0.01)] then
|
||||
gc.setColor(1,0,0,1)
|
||||
GC.setColor(1,0,0,1)
|
||||
end
|
||||
PLY.draw.drawProgress(P.modeData.pt,P.modeData.target)
|
||||
end
|
||||
|
||||
@@ -2,7 +2,7 @@ return{
|
||||
heightLimit=4,
|
||||
mesDisp=function(P)
|
||||
setFont(60)
|
||||
mStr(P.stat.pc,63,340)
|
||||
GC.mStr(P.stat.pc,63,340)
|
||||
mText(TEXTOBJ.pc,63,410)
|
||||
end,
|
||||
hook_drop=function(P)
|
||||
|
||||
@@ -46,7 +46,7 @@ return{
|
||||
RS="SRS",
|
||||
mesDisp=function(P)
|
||||
setFont(60)
|
||||
mStr(P.stat.pc,63,260)
|
||||
GC.mStr(P.stat.pc,63,260)
|
||||
mText(TEXTOBJ.pc,63,330)
|
||||
end,
|
||||
hook_drop=_check,
|
||||
|
||||
@@ -39,7 +39,7 @@ return{
|
||||
RS="SRS",
|
||||
mesDisp=function(P)
|
||||
setFont(60)
|
||||
mStr(P.stat.pc,63,260)
|
||||
GC.mStr(P.stat.pc,63,260)
|
||||
mText(TEXTOBJ.pc,63,330)
|
||||
end,
|
||||
hook_drop=_check,
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
local gc=love.graphics
|
||||
local gc_draw,gc_print,gc_setColor=gc.draw,gc.print,gc.setColor
|
||||
local setFont=setFont
|
||||
|
||||
local PLAYERS,PLY_ALIVE=PLAYERS,PLY_ALIVE
|
||||
|
||||
return{
|
||||
layout='royale',
|
||||
fkey1=function(P)
|
||||
@@ -12,20 +6,20 @@ return{
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(35)
|
||||
mStr(#PLY_ALIVE.."/"..#PLAYERS,63,175)
|
||||
mStr(P.modeData.ko,80,215)
|
||||
gc_draw(TEXTOBJ.ko,60-TEXTOBJ.ko:getWidth(),222)
|
||||
GC.mStr(#PLY_ALIVE.."/"..#PLAYERS,63,175)
|
||||
GC.mStr(P.modeData.ko,80,215)
|
||||
GC.draw(TEXTOBJ.ko,60-TEXTOBJ.ko:getWidth(),222)
|
||||
|
||||
setFont(20)
|
||||
gc_setColor(1,.5,0,.6)
|
||||
gc_print(P.badge,103,227)
|
||||
gc_setColor(.97,.97,.97)
|
||||
GC.setColor(1,.5,0,.6)
|
||||
GC.print(P.badge,103,227)
|
||||
GC.setColor(.97,.97,.97)
|
||||
|
||||
setFont(25)
|
||||
mStr(text.powerUp[P.strength],63,290)
|
||||
gc_setColor(1,1,1)
|
||||
GC.mStr(text.powerUp[P.strength],63,290)
|
||||
GC.setColor(1,1,1)
|
||||
for i=1,P.strength do
|
||||
gc_draw(IMG.badgeIcon,16*i+6,260)
|
||||
GC.draw(IMG.badgeIcon,16*i+6,260)
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -51,8 +51,8 @@ return{
|
||||
mText(TEXTOBJ.grade,63,190)
|
||||
mText(TEXTOBJ.line,63,310)
|
||||
setFont(55)
|
||||
mStr(getRank(P.modeData.rankPts),63,125)
|
||||
mStr(P.modeData.rankPts-1,63,245)
|
||||
GC.mStr(getRank(P.modeData.rankPts),63,125)
|
||||
GC.mStr(P.modeData.rankPts-1,63,245)
|
||||
ply_applyField(P)
|
||||
local mark=TEXTURE.puzzleMark
|
||||
gc_setColor(1,1,1)
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
return{
|
||||
mesDisp=function(P)
|
||||
setFont(45)
|
||||
mStr(("%.1f"):format(P.stat.atk),63,270)
|
||||
GC.mStr(("%.1f"):format(P.stat.atk),63,270)
|
||||
mText(TEXTOBJ.atk,63,323)
|
||||
mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,370)
|
||||
GC.mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,370)
|
||||
mText(TEXTOBJ.eff,63,423)
|
||||
|
||||
setFont(55)
|
||||
local r=40-P.stat.row
|
||||
if r<0 then r=0 end
|
||||
mStr(r,63,170)
|
||||
GC.mStr(r,63,170)
|
||||
PLY.draw.drawTargetLine(P,r)
|
||||
end,
|
||||
hook_drop=function(P)
|
||||
|
||||
@@ -3,7 +3,7 @@ return{
|
||||
setFont(55)
|
||||
local r=40-P.stat.row
|
||||
if r<0 then r=0 end
|
||||
mStr(r,63,265)
|
||||
GC.mStr(r,63,265)
|
||||
PLY.draw.drawTargetLine(P,r)
|
||||
end,
|
||||
task=function(P)
|
||||
|
||||
@@ -11,7 +11,7 @@ return{
|
||||
setFont(55)
|
||||
local r=40-P.stat.row
|
||||
if r<0 then r=0 end
|
||||
mStr(r,63,265)
|
||||
GC.mStr(r,63,265)
|
||||
PLY.draw.drawTargetLine(P,r)
|
||||
end,
|
||||
hook_drop=function(P)
|
||||
|
||||
@@ -3,7 +3,7 @@ return{
|
||||
fillClear=false,
|
||||
mesDisp=function(P)
|
||||
setFont(60)
|
||||
mStr(P.stat.row,63,280)
|
||||
GC.mStr(P.stat.row,63,280)
|
||||
mText(TEXTOBJ.line,63,350)
|
||||
PLY.draw.drawMarkLine(P,20,.3,1,1,TIME()%.42<.21 and .95 or .6)
|
||||
end,
|
||||
|
||||
@@ -3,7 +3,7 @@ return{
|
||||
fillClear=false,
|
||||
mesDisp=function(P)
|
||||
setFont(60)
|
||||
mStr(P.stat.row,63,280)
|
||||
GC.mStr(P.stat.row,63,280)
|
||||
mText(TEXTOBJ.line,63,350)
|
||||
PLY.draw.drawMarkLine(P,17,.3,1,1,TIME()%.42<.21 and .95 or .6)
|
||||
end,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
return{
|
||||
mesDisp=function(P)
|
||||
setFont(60)
|
||||
mStr(P.modeData.wave,63,310)
|
||||
GC.mStr(P.modeData.wave,63,310)
|
||||
mText(TEXTOBJ.wave,63,375)
|
||||
end,
|
||||
task=function(P)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
return{
|
||||
mesDisp=function(P)
|
||||
setFont(60)
|
||||
mStr(P.modeData.wave,63,310)
|
||||
GC.mStr(P.modeData.wave,63,310)
|
||||
mText(TEXTOBJ.wave,63,375)
|
||||
end,
|
||||
task=function(P)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
return{
|
||||
mesDisp=function(P)
|
||||
setFont(60)
|
||||
mStr(P.modeData.wave,63,310)
|
||||
GC.mStr(P.modeData.wave,63,310)
|
||||
mText(TEXTOBJ.wave,63,375)
|
||||
end,
|
||||
task=function(P)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
return{
|
||||
mesDisp=function(P)
|
||||
setFont(60)
|
||||
mStr(P.modeData.wave,63,310)
|
||||
GC.mStr(P.modeData.wave,63,310)
|
||||
mText(TEXTOBJ.wave,63,375)
|
||||
end,
|
||||
task=function(P)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
return{
|
||||
mesDisp=function(P)
|
||||
setFont(60)
|
||||
mStr(P.modeData.wave,63,310)
|
||||
GC.mStr(P.modeData.wave,63,310)
|
||||
mText(TEXTOBJ.wave,63,375)
|
||||
end,
|
||||
task=function(P)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
return{
|
||||
mesDisp=function(P)
|
||||
setFont(60)
|
||||
mStr(P.stat.clear[7][4],63,250)
|
||||
GC.mStr(P.stat.clear[7][4],63,250)
|
||||
mText(TEXTOBJ.techrash,63,315)
|
||||
end,
|
||||
hook_drop=function(P)
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
local gc=love.graphics
|
||||
|
||||
return{
|
||||
mesDisp=function(P)
|
||||
setFont(60)
|
||||
mStr(P.modeData.techrash,63,250)
|
||||
GC.mStr(P.modeData.techrash,63,250)
|
||||
mText(TEXTOBJ.techrash,63,315)
|
||||
PLY.draw.applyField(P)
|
||||
local L=P.modeData.history
|
||||
for i=1,#L do
|
||||
gc.setColor(1,.3,.3,.5-i*.04)
|
||||
gc.rectangle('fill',30*L[i]-30,0,30,600)
|
||||
GC.setColor(1,.3,.3,.5-i*.04)
|
||||
GC.rectangle('fill',30*L[i]-30,0,30,600)
|
||||
end
|
||||
PLY.draw.cancelField(P)
|
||||
end,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
return{
|
||||
mesDisp=function(P)
|
||||
setFont(60)
|
||||
mStr(P.modeData.tsd,63,250)
|
||||
GC.mStr(P.modeData.tsd,63,250)
|
||||
mText(TEXTOBJ.tsd,63,315)
|
||||
end,
|
||||
hook_drop=function(P)
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
local gc=love.graphics
|
||||
|
||||
return{
|
||||
mesDisp=function(P)
|
||||
setFont(60)
|
||||
mStr(P.modeData.tsd,63,250)
|
||||
GC.mStr(P.modeData.tsd,63,250)
|
||||
mText(TEXTOBJ.tsd,63,315)
|
||||
local L=P.modeData.history
|
||||
if L[1]and L[1]==L[2]and L[1]==L[3]then
|
||||
PLY.draw.applyField(P)
|
||||
gc.setColor(1,.3,.3,.2)
|
||||
gc.rectangle('fill',30*L[1]-30,0,30,600)
|
||||
GC.setColor(1,.3,.3,.2)
|
||||
GC.rectangle('fill',30*L[1]-30,0,30,600)
|
||||
PLY.draw.cancelField(P)
|
||||
end
|
||||
end,
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
local gc=love.graphics
|
||||
|
||||
return{
|
||||
mesDisp=function(P)
|
||||
setFont(60)
|
||||
mStr(P.modeData.tsd,63,250)
|
||||
GC.mStr(P.modeData.tsd,63,250)
|
||||
mText(TEXTOBJ.tsd,63,315)
|
||||
PLY.draw.applyField(P)
|
||||
local L=P.modeData.history
|
||||
for i=1,#L do
|
||||
gc.setColor(1,.3,.3,.4-i*.05)
|
||||
gc.rectangle('fill',30*L[i]-30,0,30,600)
|
||||
GC.setColor(1,.3,.3,.4-i*.05)
|
||||
GC.rectangle('fill',30*L[i]-30,0,30,600)
|
||||
end
|
||||
PLY.draw.cancelField(P)
|
||||
end,
|
||||
|
||||
@@ -1,22 +1,21 @@
|
||||
local gc=love.graphics
|
||||
local warnTime={60,90,105,115,116,117,118,119,120}
|
||||
for i=1,#warnTime do warnTime[i]=warnTime[i]*60 end
|
||||
|
||||
return{
|
||||
mesDisp=function(P)
|
||||
gc.setLineWidth(2)
|
||||
gc.setColor(.98,.98,.98,.8)
|
||||
gc.rectangle('line',0,260,126,80,4)
|
||||
gc.setColor(.98,.98,.98,.4)
|
||||
gc.rectangle('fill',0+2,260+2,126-4,80-4,2)
|
||||
GC.setLineWidth(2)
|
||||
GC.setColor(.98,.98,.98,.8)
|
||||
GC.rectangle('line',0,260,126,80,4)
|
||||
GC.setColor(.98,.98,.98,.4)
|
||||
GC.rectangle('fill',0+2,260+2,126-4,80-4,2)
|
||||
setFont(45)
|
||||
local t=P.stat.frame/60
|
||||
local T=("%.1f"):format(120-t)
|
||||
gc.setColor(COLOR.dH)
|
||||
mStr(T,65,270)
|
||||
GC.setColor(COLOR.dH)
|
||||
GC.mStr(T,65,270)
|
||||
t=t/120
|
||||
gc.setColor(1.7*t,2.3-2*t,.3)
|
||||
mStr(T,63,268)
|
||||
GC.setColor(1.7*t,2.3-2*t,.3)
|
||||
GC.mStr(T,63,268)
|
||||
end,
|
||||
task=function(P)
|
||||
BGM.seek(0)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -8,7 +8,7 @@ return{
|
||||
},
|
||||
mesDisp=function(P)
|
||||
setFont(60)
|
||||
mStr(P.stat.atk,63,280)
|
||||
GC.mStr(P.stat.atk,63,280)
|
||||
mText(TEXTOBJ.atk,63,350)
|
||||
end,
|
||||
bg='tunnel',bgm='echo',
|
||||
|
||||
@@ -8,7 +8,7 @@ return{
|
||||
},
|
||||
mesDisp=function(P)
|
||||
setFont(60)
|
||||
mStr(P.stat.atk,63,280)
|
||||
GC.mStr(P.stat.atk,63,280)
|
||||
mText(TEXTOBJ.atk,63,350)
|
||||
end,
|
||||
bg='blockhole',bgm='echo',
|
||||
|
||||
@@ -7,7 +7,7 @@ return{
|
||||
},
|
||||
mesDisp=function(P)
|
||||
setFont(60)
|
||||
mStr(P.stat.atk,63,280)
|
||||
GC.mStr(P.stat.atk,63,280)
|
||||
mText(TEXTOBJ.atk,63,350)
|
||||
end,
|
||||
bg='tunnel',bgm='echo',
|
||||
|
||||
@@ -8,7 +8,7 @@ return{
|
||||
},
|
||||
mesDisp=function(P)
|
||||
setFont(60)
|
||||
mStr(P.stat.atk,63,280)
|
||||
GC.mStr(P.stat.atk,63,280)
|
||||
mText(TEXTOBJ.atk,63,350)
|
||||
end,
|
||||
bg='blockhole',bgm='echo',
|
||||
|
||||
@@ -6,7 +6,6 @@ local border=GC.DO{334,620,
|
||||
{'dRect',318,10,15,604,3},
|
||||
{'dRect',1,10,15,604,3},
|
||||
}
|
||||
local gc=love.graphics
|
||||
local sin,min=math.sin,math.min
|
||||
return{
|
||||
env={
|
||||
@@ -18,38 +17,38 @@ return{
|
||||
freshLimit=15,
|
||||
mesDisp=function(P,repMode)
|
||||
if not GAME.result then
|
||||
gc.push('transform')
|
||||
GC.push('transform')
|
||||
if repMode then
|
||||
gc.origin()
|
||||
gc.setColor(COLOR.X)
|
||||
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||
GC.origin()
|
||||
GC.setColor(COLOR.X)
|
||||
GC.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||
else
|
||||
gc.clear(.2,.2,.2)
|
||||
gc.setColor(.5,.5,.5)
|
||||
GC.clear(.2,.2,.2)
|
||||
GC.setColor(.5,.5,.5)
|
||||
|
||||
--Frame & Username
|
||||
gc.setColor(.8,.8,.8)
|
||||
gc.setLineWidth(2)
|
||||
gc.rectangle('line',12,20,100,80,5)
|
||||
gc.rectangle('line',488,20,100,80,5)
|
||||
gc.draw(border,-17+150,-12)
|
||||
GC.setColor(.8,.8,.8)
|
||||
GC.setLineWidth(2)
|
||||
GC.rectangle('line',12,20,100,80,5)
|
||||
GC.rectangle('line',488,20,100,80,5)
|
||||
GC.draw(border,-17+150,-12)
|
||||
setFont(30)
|
||||
mStr(P.username,300,-60)
|
||||
GC.mStr(P.username,300,-60)
|
||||
end
|
||||
gc.pop()
|
||||
GC.pop()
|
||||
end
|
||||
|
||||
--Figures
|
||||
local t=TIME()
|
||||
gc.setColor(1,1,1,.5+.2*sin(t))
|
||||
gc.draw(IMG.hbm,-276,-86,0,1.5)
|
||||
gc.draw(IMG.electric,476,152,0,2.6)
|
||||
GC.setColor(1,1,1,.5+.2*sin(t))
|
||||
GC.draw(IMG.hbm,-276,-86,0,1.5)
|
||||
GC.draw(IMG.electric,476,152,0,2.6)
|
||||
|
||||
--Texts
|
||||
gc.setColor(.8,.8,.8)
|
||||
GC.setColor(.8,.8,.8)
|
||||
mText(TEXTOBJ.techrash,63,420)
|
||||
setFont(75)
|
||||
mStr(P.stat.clears[4],63,340)
|
||||
GC.mStr(P.stat.clears[4],63,340)
|
||||
end,
|
||||
eventSet='checkLine_40',
|
||||
bg='none',bgm='far',
|
||||
|
||||
@@ -4,7 +4,7 @@ return{
|
||||
bg='bg1',bgm='way',
|
||||
mesDisp=function(P)
|
||||
setFont(55)
|
||||
mStr(10-P.stat.dig_quad,63,265)
|
||||
GC.mStr(10-P.stat.dig_quad,63,265)
|
||||
end,
|
||||
hook_drop=function(P)
|
||||
if P.lastPiece.row>0 and P.lastPiece.row<4 then
|
||||
|
||||
@@ -4,8 +4,8 @@ return{
|
||||
infHold=true,
|
||||
mesDisp=function(P)
|
||||
setFont(45)
|
||||
mStr(("%.1f"):format(P.stat.atk),63,190)
|
||||
mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310)
|
||||
GC.mStr(("%.1f"):format(P.stat.atk),63,190)
|
||||
GC.mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310)
|
||||
mText(TEXTOBJ.atk,63,243)
|
||||
mText(TEXTOBJ.eff,63,363)
|
||||
end,
|
||||
|
||||
@@ -33,9 +33,9 @@ return{
|
||||
hook_drop=check_rise,
|
||||
mesDisp=function(P)
|
||||
setFont(45)
|
||||
mStr(P.stat.dig,63,190)
|
||||
mStr(P.stat.atk,63,310)
|
||||
mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,420)
|
||||
GC.mStr(P.stat.dig,63,190)
|
||||
GC.mStr(P.stat.atk,63,310)
|
||||
GC.mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,420)
|
||||
mText(TEXTOBJ.line,63,243)
|
||||
mText(TEXTOBJ.atk,63,363)
|
||||
mText(TEXTOBJ.eff,63,475)
|
||||
|
||||
@@ -6,7 +6,7 @@ return{
|
||||
ospin=false,
|
||||
mesDisp=function(P)
|
||||
setFont(60)
|
||||
mStr(P.stat.pc,63,340)
|
||||
GC.mStr(P.stat.pc,63,340)
|
||||
mText(TEXTOBJ.pc,63,410)
|
||||
end,
|
||||
eventSet='checkLine_100',
|
||||
|
||||
@@ -6,7 +6,7 @@ return{
|
||||
ospin=false,
|
||||
mesDisp=function(P)
|
||||
setFont(60)
|
||||
mStr(P.stat.pc,63,340)
|
||||
GC.mStr(P.stat.pc,63,340)
|
||||
mText(TEXTOBJ.pc,63,410)
|
||||
end,
|
||||
eventSet='checkLine_100',
|
||||
|
||||
@@ -4,7 +4,7 @@ return{
|
||||
drop=150,lock=1e99,
|
||||
mesDisp=function(P)
|
||||
setFont(60)
|
||||
mStr(P.stat.pc,63,340)
|
||||
GC.mStr(P.stat.pc,63,340)
|
||||
mText(TEXTOBJ.pc,63,410)
|
||||
end,
|
||||
eventSet='checkLine_100',
|
||||
|
||||
@@ -3,11 +3,8 @@ local gc_draw,gc_rectangle,gc_print,gc_printf=gc.draw,gc.rectangle,gc.print,gc.p
|
||||
local gc_setColor,gc_setLineWidth,gc_translate=gc.setColor,gc.setLineWidth,gc.translate
|
||||
local gc_stencil,gc_setStencilTest=gc.stencil,gc.setStencilTest
|
||||
|
||||
local rnd,min=math.random,math.min
|
||||
local sin,cos=math.sin,math.cos
|
||||
local ins,rem=table.insert,table.remove
|
||||
local setFont=FONT.set
|
||||
local approach=MATH.expApproach
|
||||
|
||||
local posLists={
|
||||
--1~5
|
||||
@@ -118,8 +115,8 @@ function NETPLY.add(d)
|
||||
place=1e99,
|
||||
stat=false,
|
||||
}
|
||||
local a=rnd()*6.2832
|
||||
p.x,p.y,p.w,p.h=640+2600*cos(a),360+2600*sin(a),47,47
|
||||
local a=math.random()*6.2832
|
||||
p.x,p.y,p.w,p.h=640+2600*math.cos(a),360+2600*math.sin(a),47,47
|
||||
|
||||
ins(PLYlist,p)
|
||||
PLYmap[p.uid]=p
|
||||
@@ -199,10 +196,10 @@ function NETPLY.update(dt)
|
||||
local p=PLYlist[i]
|
||||
local t=posList[i]
|
||||
local d=dt*12
|
||||
p.x=approach(p.x,t.x,d)
|
||||
p.y=approach(p.y,t.y,d)
|
||||
p.w=approach(p.w,t.w,d)
|
||||
p.h=approach(p.h,t.h,d)
|
||||
p.x=MATH.expApproach(p.x,t.x,d)
|
||||
p.y=MATH.expApproach(p.y,t.y,d)
|
||||
p.w=MATH.expApproach(p.w,t.w,d)
|
||||
p.h=MATH.expApproach(p.h,t.h,d)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -235,7 +232,7 @@ function NETPLY.draw()
|
||||
gc_setColor(1,1,1)
|
||||
|
||||
--Avatar
|
||||
local avatarSize=min(p.h,50)/128*.9
|
||||
local avatarSize=math.min(p.h,50)/128*.9
|
||||
gc_draw(USERS.getAvatar(p.uid),2,2,nil,avatarSize)
|
||||
|
||||
--UID & Username
|
||||
@@ -268,7 +265,7 @@ function NETPLY.draw()
|
||||
gc_translate(-p.x,-p.y)
|
||||
end
|
||||
if selP then
|
||||
gc_translate(min(mouseX,880),min(mouseY,460))
|
||||
gc_translate(math.min(mouseX,880),math.min(mouseY,460))
|
||||
gc_setColor(COLOR.X)
|
||||
gc_rectangle('fill',0,0,400,260)
|
||||
gc_setColor(1,1,1)
|
||||
@@ -288,7 +285,7 @@ function NETPLY.draw()
|
||||
gc_print(S.apm,5,213)
|
||||
gc_print(S.adpm,5,233)
|
||||
end
|
||||
gc_translate(-min(mouseX,880),-min(mouseY,460))
|
||||
gc_translate(-math.min(mouseX,880),-math.min(mouseY,460))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ local gc_stencil,gc_setStencilTest=gc.stencil,gc.setStencilTest
|
||||
|
||||
local int,ceil,rnd=math.floor,math.ceil,math.random
|
||||
local max,min,sin,modf=math.max,math.min,math.sin,math.modf
|
||||
local setFont,mDraw,mStr=FONT.set,GC.draw,GC.mStr
|
||||
local setFont=FONT.set
|
||||
local SKIN,TEXTURE,IMG=SKIN,TEXTURE,IMG
|
||||
local TEXT,COLOR,TIME=TEXT,COLOR,TIME
|
||||
local shader_alpha,shader_lighter=SHADER.alpha,SHADER.lighter
|
||||
@@ -576,7 +576,7 @@ local function _drawDial(x,y,speed)
|
||||
gc_setColor(1,1,1,.3)
|
||||
gc_draw(dialNeedle,x+40,y+40,2.094+(speed<=175 and .02094*speed or 4.712-52.36/(speed-125)),nil,nil,1,1)
|
||||
gc_setColor(.9,.9,.91)
|
||||
setFont(30)mStr(int(speed),x+40,y+19)
|
||||
setFont(30)GC.mStr(int(speed),x+40,y+19)
|
||||
end
|
||||
local function _drawFinesseCombo_norm(P)
|
||||
if P.finesseCombo>2 then
|
||||
@@ -667,12 +667,12 @@ local function _drawStartCounter(time)
|
||||
gc_setColor(r,g,b,d/60)
|
||||
gc_push('transform')
|
||||
gc_scale((1.5-d/60*.6)^1.5)
|
||||
mStr(num,0,-70)
|
||||
GC.mStr(num,0,-70)
|
||||
gc_pop()
|
||||
|
||||
gc_setColor(r,g,b)
|
||||
gc_scale(min(d/20,1)^.4)
|
||||
mStr(num,0,-70)
|
||||
GC.mStr(num,0,-70)
|
||||
gc_pop()
|
||||
end
|
||||
|
||||
@@ -705,8 +705,8 @@ function draw.drawMarkLine(P,h,r,g,b,a)
|
||||
end
|
||||
function draw.drawProgress(s1,s2)
|
||||
setFont(40)
|
||||
mStr(s1,62,322)
|
||||
mStr(s2,62,376)
|
||||
GC.mStr(s1,62,322)
|
||||
GC.mStr(s2,62,376)
|
||||
gc_rectangle('fill',15,375,90,4,2)
|
||||
end
|
||||
|
||||
@@ -722,7 +722,7 @@ function draw.norm(P,repMode)
|
||||
--Draw username
|
||||
setFont(30)
|
||||
gc_setColor(.97,.97,.97)
|
||||
mStr(P.username,300,-60)
|
||||
GC.mStr(P.username,300,-60)
|
||||
|
||||
--Draw HUD
|
||||
if ENV.nextCount>0 then _drawNext(P,repMode)end
|
||||
@@ -967,7 +967,7 @@ function draw.small(P)
|
||||
if P.result then
|
||||
gc_setColor(1,1,1,min(P.endCounter,60)*.01)
|
||||
setFont(20)mDraw(TEXTOBJ[P.result],30,60,nil,P.size)
|
||||
setFont(15)mStr(P.modeData.place,30,82)
|
||||
setFont(15)GC.mStr(P.modeData.place,30,82)
|
||||
end
|
||||
gc_pop()
|
||||
gc_setCanvas()
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
local gc=love.graphics
|
||||
|
||||
local int,rnd=math.floor,math.random
|
||||
local mStr=GC.mStr
|
||||
|
||||
local scene={}
|
||||
|
||||
@@ -295,10 +294,10 @@ function scene.draw()
|
||||
gc.rectangle('line',j*160+163,i*160-117,154,154,8)
|
||||
if not mono then
|
||||
gc.setColor(.1,.1,.1)
|
||||
mStr(N,j*160+240,i*160-96)
|
||||
mStr(N,j*160+242,i*160-98)
|
||||
GC.mStr(N,j*160+240,i*160-96)
|
||||
GC.mStr(N,j*160+242,i*160-98)
|
||||
gc.setColor(COLOR.Z)
|
||||
mStr(N,j*160+243,i*160-95)
|
||||
GC.mStr(N,j*160+243,i*160-95)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -5,7 +5,6 @@ local int,abs=math.floor,math.abs
|
||||
local rnd,min=math.random,math.min
|
||||
local ins=table.insert
|
||||
local setFont=FONT.set
|
||||
local mStr=GC.mStr
|
||||
|
||||
local scene={}
|
||||
|
||||
@@ -381,7 +380,7 @@ function scene.draw()
|
||||
--Score
|
||||
setFont(40)
|
||||
setColor(1,.7,.7)
|
||||
mStr(score,1130,510)
|
||||
GC.mStr(score,1130,510)
|
||||
|
||||
--Messages
|
||||
if state==2 then
|
||||
@@ -411,7 +410,7 @@ function scene.draw()
|
||||
setColor(N<3 and COLOR.D or COLOR.Z)
|
||||
local fontSize=tileFont[N]
|
||||
setFont(fontSize)
|
||||
mStr(tileName[N],320+(x-.5)*160,40+(y-.5)*160-fontSize*.7)
|
||||
GC.mStr(tileName[N],320+(x-.5)*160,40+(y-.5)*160-fontSize*.7)
|
||||
end
|
||||
else
|
||||
setColor(COLOR.H)
|
||||
@@ -425,7 +424,7 @@ function scene.draw()
|
||||
setColor(c,c,c,prevSpawnTime)
|
||||
local fontSize=tileFont[N]
|
||||
setFont(fontSize)
|
||||
mStr(tileName[N],320+(x-.5)*160,40+(y-.5)*160-fontSize*.7)
|
||||
GC.mStr(tileName[N],320+(x-.5)*160,40+(y-.5)*160-fontSize*.7)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -445,13 +444,13 @@ function scene.draw()
|
||||
setColor(1,.5,.4)
|
||||
end
|
||||
setFont(70)
|
||||
mStr(tileName[nextTile],220,175)
|
||||
GC.mStr(tileName[nextTile],220,175)
|
||||
|
||||
--Skip CoolDown
|
||||
if skipper.cd and skipper.cd>0 then
|
||||
setFont(50)
|
||||
setColor(1,1,.5)
|
||||
mStr(skipper.cd,155,600)
|
||||
GC.mStr(skipper.cd,155,600)
|
||||
end
|
||||
|
||||
--Skip mark
|
||||
|
||||
@@ -202,13 +202,13 @@ function scene.draw()
|
||||
FONT.set(60)
|
||||
if gameover==0 then
|
||||
gc.setColor(1,.6,.6)
|
||||
mStr("RED\nWON",1140,200)
|
||||
GC.mStr("RED\nWON",1140,200)
|
||||
elseif gameover==1 then
|
||||
gc.setColor(.6,.6,1)
|
||||
mStr("BLUE\nWON",1140,200)
|
||||
GC.mStr("BLUE\nWON",1140,200)
|
||||
else
|
||||
gc.setColor(.8,.8,.8)
|
||||
mStr("TIE",1140,240)
|
||||
GC.mStr("TIE",1140,240)
|
||||
end
|
||||
else
|
||||
--Draw current round mark
|
||||
|
||||
@@ -171,7 +171,7 @@ function scene.draw()
|
||||
gc_rectangle('fill',x,y,w,h,12)
|
||||
end
|
||||
gc_setColor(1,1,1)
|
||||
mStr(cardText[c],x+w/2,y-17)
|
||||
GC.mStr(cardText[c],x+w/2,y-17)
|
||||
if i==selected then gc_translate(0,10)end
|
||||
end
|
||||
for i=1,#pool do
|
||||
@@ -184,7 +184,7 @@ function scene.draw()
|
||||
gc_rectangle('fill',x,y,w,h,12)
|
||||
end
|
||||
gc_setColor(1,1,1)
|
||||
mStr(cardText[c],x+w/2,y-17)
|
||||
GC.mStr(cardText[c],x+w/2,y-17)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -66,10 +66,10 @@ end
|
||||
|
||||
function scene.draw()
|
||||
FONT.set(60)
|
||||
mStr(CHAR.icon.import,340,230)
|
||||
mStr(CHAR.icon.export,940,230)
|
||||
mStr(time1,340,300)
|
||||
mStr(time2,940,300)
|
||||
GC.mStr(CHAR.icon.import,340,230)
|
||||
GC.mStr(CHAR.icon.export,940,230)
|
||||
GC.mStr(time1,340,300)
|
||||
GC.mStr(time2,940,300)
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
|
||||
@@ -347,8 +347,8 @@ function scene.draw()
|
||||
--Draw page
|
||||
setFont(55)
|
||||
gc.setColor(COLOR.Z)
|
||||
mStr(page,100,530)
|
||||
mStr(#FIELD,100,600)
|
||||
GC.mStr(page,100,530)
|
||||
GC.mStr(#FIELD,100,600)
|
||||
gc.rectangle('fill',50,600,100,6)
|
||||
|
||||
--Draw mouse & pen color
|
||||
@@ -431,7 +431,7 @@ function scene.draw()
|
||||
gc.setColor(1,1,1)
|
||||
for i=1,7 do
|
||||
local skin=SETTING.skin[i]-1
|
||||
mStr(text.block[i],580+(skin%8)*80,90+80*int(skin/8))
|
||||
GC.mStr(text.block[i],580+(skin%8)*80,90+80*int(skin/8))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ local kb=love.keyboard
|
||||
|
||||
local sin=math.sin
|
||||
local ins,rem=table.insert,table.remove
|
||||
local setFont=FONT.set
|
||||
local gc_setColor,gc_print=gc.setColor,gc.print
|
||||
|
||||
local scene={}
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
local gc=love.graphics
|
||||
local rnd=math.random
|
||||
|
||||
local BGcolor
|
||||
local sysAndScn,errorText
|
||||
local errorShot,errorInfo
|
||||
@@ -8,7 +5,7 @@ local errorShot,errorInfo
|
||||
local scene={}
|
||||
|
||||
function scene.sceneInit()
|
||||
BGcolor=rnd()>.026 and{.3,.5,.9}or{.62,.3,.926}
|
||||
BGcolor=math.random()>.026 and{.3,.5,.9}or{.62,.3,.926}
|
||||
sysAndScn=SYSTEM.."-"..VERSION.string.." scene:"..Z.getErr('#').scene
|
||||
errorText=LOADED and text.errorMsg or"An error has occurred while the game was loading.\nAn error log has been created so you can send it to the author."
|
||||
errorShot,errorInfo=Z.getErr('#').shot,Z.getErr('#').mes
|
||||
@@ -22,19 +19,19 @@ function scene.sceneInit()
|
||||
end
|
||||
|
||||
function scene.draw()
|
||||
gc.clear(BGcolor)
|
||||
gc.setColor(1,1,1)
|
||||
gc.draw(errorShot,100,326,nil,512/errorShot:getWidth(),288/errorShot:getHeight())
|
||||
gc.setColor(COLOR.Z)
|
||||
setFont(100)gc.print(":(",100,0,0,1.2)
|
||||
setFont(40)gc.printf(errorText,100,160,SCR.w0-100)
|
||||
GC.clear(BGcolor)
|
||||
GC.setColor(1,1,1)
|
||||
GC.draw(errorShot,100,326,nil,512/errorShot:getWidth(),288/errorShot:getHeight())
|
||||
GC.setColor(COLOR.Z)
|
||||
setFont(100)GC.print(":(",100,0,0,1.2)
|
||||
setFont(40)GC.printf(errorText,100,160,SCR.w0-100)
|
||||
setFont(20,'mono')
|
||||
gc.print(sysAndScn,100,630)
|
||||
GC.print(sysAndScn,100,630)
|
||||
setFont(15,'mono')
|
||||
gc.printf(errorInfo[1],626,326,1260-626)
|
||||
gc.print("TRACEBACK",626,390)
|
||||
GC.printf(errorInfo[1],626,326,1260-626)
|
||||
GC.print("TRACEBACK",626,390)
|
||||
for i=4,#errorInfo do
|
||||
gc.print(errorInfo[i],626,340+20*i)
|
||||
GC.print(errorInfo[i],626,340+20*i)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
local gc,tc=love.graphics,love.touch
|
||||
local gc_setColor,gc_setLineWidth=gc.setColor,gc.setLineWidth
|
||||
local gc_draw,gc_line=gc.draw,gc.line
|
||||
local gc_circle,gc_print=gc.circle,gc.print
|
||||
|
||||
local sin=math.sin
|
||||
local tc=love.touch
|
||||
local gc_setColor,gc_setLineWidth=GC.setColor,GC.setLineWidth
|
||||
local gc_draw,gc_line=GC.draw,GC.line
|
||||
local gc_circle,gc_print=GC.circle,GC.print
|
||||
|
||||
local SCR,VK=SCR,VK
|
||||
local GAME,PLAYERS=GAME,PLAYERS
|
||||
@@ -308,11 +306,11 @@ function scene.update(dt)
|
||||
end
|
||||
end
|
||||
|
||||
local tasText=gc.newText(getFont(100),"TAS")
|
||||
local tasText=GC.newText(getFont(100),"TAS")
|
||||
local function _drawAtkPointer(x,y)
|
||||
local t=TIME()
|
||||
local a=t*3%1*.8
|
||||
t=sin(t*20)
|
||||
t=math.sin(t*20)
|
||||
|
||||
gc_setColor(.2,.7+t*.2,1,.6+t*.4)
|
||||
gc_circle('fill',x,y,25,6)
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
local gc=love.graphics
|
||||
local gc_push,gc_pop=gc.push,gc.pop
|
||||
local gc_translate=gc.translate
|
||||
local gc_setColor,gc_setLineWidth=gc.setColor,gc.setLineWidth
|
||||
local gc_rectangle,gc_circle=gc.rectangle,gc.circle
|
||||
local gc_push,gc_pop=GC.push,GC.pop
|
||||
local gc_translate=GC.translate
|
||||
local gc_setColor,gc_setLineWidth=GC.setColor,GC.setLineWidth
|
||||
local gc_rectangle,gc_circle=GC.rectangle,GC.circle
|
||||
|
||||
local isDown=love.keyboard.isDown
|
||||
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
local gc=love.graphics
|
||||
|
||||
local max,min,sin,cos=math.max,math.min,math.sin,math.cos
|
||||
local rnd=math.random
|
||||
|
||||
local scene={}
|
||||
|
||||
@@ -12,11 +9,11 @@ local studioLogo--Studio logo text object
|
||||
local logoColor1,logoColor2
|
||||
|
||||
local titleTransform={
|
||||
function(t)gc.translate(0,max(50-t,0)^2/25)end,
|
||||
function(t)gc.translate(0,-max(50-t,0)^2/25)end,
|
||||
function(t,i)local d=max(50-t,0)gc.translate(sin(TIME()*3+626*i)*d,cos(TIME()*3+626*i)*d)end,
|
||||
function(t,i)local d=max(50-t,0)gc.translate(sin(TIME()*3+626*i)*d,-cos(TIME()*3+626*i)*d)end,
|
||||
function(t)gc.setColor(1,1,1,min(t*.02,1)+rnd()*.2)end,
|
||||
function(t)GC.translate(0,max(50-t,0)^2/25)end,
|
||||
function(t)GC.translate(0,-max(50-t,0)^2/25)end,
|
||||
function(t,i)local d=max(50-t,0)GC.translate(sin(TIME()*3+626*i)*d,cos(TIME()*3+626*i)*d)end,
|
||||
function(t,i)local d=max(50-t,0)GC.translate(sin(TIME()*3+626*i)*d,-cos(TIME()*3+626*i)*d)end,
|
||||
function(t)GC.setColor(1,1,1,min(t*.02,1)+math.random()*.2)end,
|
||||
}
|
||||
|
||||
local loadingThread=coroutine.wrap(function()
|
||||
@@ -97,7 +94,7 @@ local loadingThread=coroutine.wrap(function()
|
||||
YIELD('loadMode')
|
||||
for _,M in next,MODES do
|
||||
M.records=loadFile("record/"..M.name..".rec",'-luaon -canSkip')or M.score and{}
|
||||
M.icon=M.icon and(modeIcons[M.icon]or gc.newImage("media/image/modeicon/"..M.icon..".png"))
|
||||
M.icon=M.icon and(modeIcons[M.icon]or GC.newImage("media/image/modeicon/"..M.icon..".png"))
|
||||
end
|
||||
|
||||
YIELD('loadOther')
|
||||
@@ -119,11 +116,11 @@ local loadingThread=coroutine.wrap(function()
|
||||
end)
|
||||
|
||||
function scene.sceneInit()
|
||||
studioLogo=gc.newText(getFont(90),"26F Studio")
|
||||
studioLogo=GC.newText(getFont(90),"26F Studio")
|
||||
progress=0
|
||||
maxProgress=10
|
||||
t1,t2=0,0--Timer
|
||||
animeType={}for i=1,#SVG_TITLE_FILL do animeType[i]=rnd(#titleTransform)end--Random animation type
|
||||
animeType={}for i=1,#SVG_TITLE_FILL do animeType[i]=math.random(#titleTransform)end--Random animation type
|
||||
end
|
||||
function scene.sceneBack()
|
||||
love.event.quit()
|
||||
@@ -159,45 +156,45 @@ end
|
||||
|
||||
local titleColor={COLOR.P,COLOR.F,COLOR.V,COLOR.A,COLOR.M,COLOR.N,COLOR.W,COLOR.Y}
|
||||
function scene.draw()
|
||||
gc.clear(.08,.08,.084)
|
||||
GC.clear(.08,.08,.084)
|
||||
|
||||
local T=(t1+110)%300
|
||||
if T<30 then
|
||||
gc.setLineWidth(4+(30-T)^1.626/62)
|
||||
GC.setLineWidth(4+(30-T)^1.626/62)
|
||||
else
|
||||
gc.setLineWidth(4)
|
||||
GC.setLineWidth(4)
|
||||
end
|
||||
gc.push('transform')
|
||||
gc.translate(126,100)
|
||||
GC.push('transform')
|
||||
GC.translate(126,100)
|
||||
for i=1,#SVG_TITLE_FILL do
|
||||
local triangles=love.math.triangulate(SVG_TITLE_FILL[i])
|
||||
local t=t1-i*15
|
||||
if t>0 then
|
||||
gc.push('transform')
|
||||
GC.push('transform')
|
||||
titleTransform[animeType[i]](t,i)
|
||||
local dt=(t1+62-5*i)%300
|
||||
if dt<20 then
|
||||
gc.translate(0,math.abs(10-dt)-10)
|
||||
GC.translate(0,math.abs(10-dt)-10)
|
||||
end
|
||||
gc.setColor(titleColor[i][1],titleColor[i][2],titleColor[i][3],min(t*.025,1)*.2)
|
||||
GC.setColor(titleColor[i][1],titleColor[i][2],titleColor[i][3],min(t*.025,1)*.2)
|
||||
for j=1,#triangles do
|
||||
gc.polygon('fill',triangles[j])
|
||||
GC.polygon('fill',triangles[j])
|
||||
end
|
||||
gc.setColor(1,1,1,min(t*.025,1))
|
||||
gc.polygon('line',SVG_TITLE_LINE[i])
|
||||
if i==8 then gc.polygon('line',SVG_TITLE_LINE[9])end
|
||||
gc.pop()
|
||||
GC.setColor(1,1,1,min(t*.025,1))
|
||||
GC.polygon('line',SVG_TITLE_LINE[i])
|
||||
if i==8 then GC.polygon('line',SVG_TITLE_LINE[9])end
|
||||
GC.pop()
|
||||
end
|
||||
end
|
||||
gc.pop()
|
||||
GC.pop()
|
||||
|
||||
gc.setColor(logoColor1[1],logoColor1[2],logoColor1[3],progress/maxProgress)mDraw(studioLogo,640,400)
|
||||
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(logoColor1[1],logoColor1[2],logoColor1[3],progress/maxProgress)mDraw(studioLogo,640,400)
|
||||
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(COLOR.Z)
|
||||
GC.setColor(COLOR.Z)
|
||||
setFont(30)
|
||||
mStr(text.loadText[loading]or"",640,530)
|
||||
GC.mStr(text.loadText[loading]or"",640,530)
|
||||
end
|
||||
|
||||
return scene
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
local gc=love.graphics
|
||||
|
||||
local scene={}
|
||||
|
||||
local verName=("%s %s %s"):format(SYSTEM,VERSION.string,VERSION.name)
|
||||
local tipLength=760
|
||||
local tip=gc.newText(getFont(30),"")
|
||||
local tip=GC.newText(getFont(30),"")
|
||||
local scrollX--Tip scroll position
|
||||
|
||||
local widgetX0={
|
||||
@@ -142,30 +140,30 @@ function scene.update(dt)
|
||||
end
|
||||
|
||||
local function _tipStencil()
|
||||
gc.rectangle('fill',0,0,tipLength,42)
|
||||
GC.rectangle('fill',0,0,tipLength,42)
|
||||
end
|
||||
function scene.draw()
|
||||
--Version
|
||||
setFont(20)
|
||||
gc.setColor(.6,.6,.6)
|
||||
mStr(verName,640,110)
|
||||
GC.setColor(.6,.6,.6)
|
||||
GC.mStr(verName,640,110)
|
||||
|
||||
--Title
|
||||
gc.setColor(1,1,1)
|
||||
GC.setColor(1,1,1)
|
||||
mDraw(TEXTURE.title_color,640,60,nil,.43)
|
||||
|
||||
--Tip
|
||||
gc.setColor(COLOR.Z)
|
||||
gc.push('transform')
|
||||
gc.translate(260,650)
|
||||
gc.setLineWidth(2)
|
||||
gc.rectangle('line',0,0,tipLength,42,3)
|
||||
gc.stencil(_tipStencil)
|
||||
gc.setStencilTest('equal',1)
|
||||
gc.draw(tip,0+scrollX,0)
|
||||
gc.setColor(1,1,1,.2)
|
||||
gc.setStencilTest()
|
||||
gc.pop()
|
||||
GC.setColor(COLOR.Z)
|
||||
GC.push('transform')
|
||||
GC.translate(260,650)
|
||||
GC.setLineWidth(2)
|
||||
GC.rectangle('line',0,0,tipLength,42,3)
|
||||
GC.stencil(_tipStencil)
|
||||
GC.setStencilTest('equal',1)
|
||||
GC.draw(tip,0+scrollX,0)
|
||||
GC.setColor(1,1,1,.2)
|
||||
GC.setStencilTest()
|
||||
GC.pop()
|
||||
|
||||
--Player
|
||||
PLAYERS[1]:draw()
|
||||
@@ -178,10 +176,10 @@ function scene.draw()
|
||||
|
||||
--Connecting mark
|
||||
if NET.getlock('access_and_login')then
|
||||
gc.setColor(COLOR.Z)
|
||||
gc.setLineWidth(10)
|
||||
GC.setColor(COLOR.Z)
|
||||
GC.setLineWidth(10)
|
||||
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)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
local gc=love.graphics
|
||||
|
||||
local scene={}
|
||||
|
||||
local tip=gc.newText(getFont(30),"")
|
||||
local tip=GC.newText(getFont(30),"")
|
||||
|
||||
function scene.sceneInit()
|
||||
tip:set(text.getTip())
|
||||
@@ -10,7 +8,7 @@ function scene.sceneInit()
|
||||
end
|
||||
|
||||
function scene.draw()
|
||||
gc.setColor(1,1,1)
|
||||
GC.setColor(1,1,1)
|
||||
mDraw(TEXTURE.title_color,640,160)
|
||||
mDraw(tip,640,660)
|
||||
end
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
local gc=love.graphics
|
||||
local kb=love.keyboard
|
||||
local ins,rem=table.insert,table.remove
|
||||
|
||||
local scene={}
|
||||
|
||||
local selected--Mod selected
|
||||
@@ -12,12 +8,12 @@ end
|
||||
local function _remMod(M)
|
||||
local i=TABLE.find(GAME.mod,M)
|
||||
if i then
|
||||
rem(GAME.mod,i)
|
||||
table.remove(GAME.mod,i)
|
||||
end
|
||||
end
|
||||
local function _toggleMod(M,back)
|
||||
if M.sel==0 then
|
||||
ins(GAME.mod,M)
|
||||
table.insert(GAME.mod,M)
|
||||
table.sort(GAME.mod,_modComp)
|
||||
end
|
||||
if M.list then
|
||||
@@ -60,7 +56,7 @@ end
|
||||
function scene.mouseDown(x,y,k)
|
||||
for _,M in next,MODOPT do
|
||||
if(x-M.x)^2+(y-M.y)^2<2000 then
|
||||
_toggleMod(M,k==2 or kb.isDown('lshift','rshift'))
|
||||
_toggleMod(M,k==2 or love.keyboard.isDown('lshift','rshift'))
|
||||
break
|
||||
end
|
||||
end
|
||||
@@ -76,7 +72,7 @@ function scene.keyDown(key)
|
||||
if key=='tab'or key=='delete'then
|
||||
if GAME.mod[1]then
|
||||
while GAME.mod[1]do
|
||||
rem(GAME.mod).sel=0
|
||||
table.remove(GAME.mod).sel=0
|
||||
end
|
||||
scene.widgetList.unranked.hide=scoreValid()
|
||||
SFX.play('hold')
|
||||
@@ -84,7 +80,7 @@ function scene.keyDown(key)
|
||||
elseif #key==1 then
|
||||
for _,M in next,MODOPT do
|
||||
if key==M.key then
|
||||
_toggleMod(M,kb.isDown('lshift','rshift'))
|
||||
_toggleMod(M,love.keyboard.isDown('lshift','rshift'))
|
||||
selected=M
|
||||
break
|
||||
end
|
||||
@@ -109,13 +105,13 @@ function scene.update()
|
||||
end
|
||||
function scene.draw()
|
||||
setFont(40)
|
||||
gc.setLineWidth(5)
|
||||
GC.setLineWidth(5)
|
||||
for _,M in next,MODOPT do
|
||||
gc.push('transform')
|
||||
gc.translate(M.x,M.y)
|
||||
GC.push('transform')
|
||||
GC.translate(M.x,M.y)
|
||||
local t=M.time*.01--t range:0~0.1
|
||||
gc.scale(1+3*t)
|
||||
gc.rotate(t)
|
||||
GC.scale(1+3*t)
|
||||
GC.rotate(t)
|
||||
local rad,side
|
||||
if M.unranked then
|
||||
rad,side=45,5
|
||||
@@ -123,34 +119,34 @@ function scene.draw()
|
||||
rad=40
|
||||
end
|
||||
local color=M.color
|
||||
gc.setColor(color[1],color[2],color[3],5*t)
|
||||
gc.circle('fill',0,0,rad,side)
|
||||
GC.setColor(color[1],color[2],color[3],5*t)
|
||||
GC.circle('fill',0,0,rad,side)
|
||||
|
||||
gc.setColor(color)
|
||||
gc.circle('line',0,0,rad,side)
|
||||
gc.setColor(COLOR.Z)
|
||||
mStr(M.id,0,-27)
|
||||
GC.setColor(color)
|
||||
GC.circle('line',0,0,rad,side)
|
||||
GC.setColor(COLOR.Z)
|
||||
GC.mStr(M.id,0,-27)
|
||||
if M.sel>0 and M.list then
|
||||
setFont(25)
|
||||
gc.setColor(1,1,1,10*t)
|
||||
mStr(M.list[M.sel],20,8)
|
||||
GC.setColor(1,1,1,10*t)
|
||||
GC.mStr(M.list[M.sel],20,8)
|
||||
setFont(40)
|
||||
end
|
||||
|
||||
if M.list then
|
||||
gc.setColor(1,1,1,t*6)
|
||||
gc.arc('line','open',0,0,rad+6,0,(M.sel/#M.list)*6.2832)
|
||||
GC.setColor(1,1,1,t*6)
|
||||
GC.arc('line','open',0,0,rad+6,0,(M.sel/#M.list)*6.2832)
|
||||
end
|
||||
gc.pop()
|
||||
GC.pop()
|
||||
end
|
||||
|
||||
gc.setColor(COLOR.Z)
|
||||
GC.setColor(COLOR.Z)
|
||||
if selected then
|
||||
setFont(30)
|
||||
gc.printf(text.modInfo[selected.name],70,540,950)
|
||||
GC.printf(text.modInfo[selected.name],70,540,950)
|
||||
else
|
||||
setFont(25)
|
||||
gc.printf(text.modInstruction,70,540,950)
|
||||
GC.printf(text.modInstruction,70,540,950)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,22 +1,18 @@
|
||||
local gc=love.graphics
|
||||
local gc_push,gc_pop=gc.push,gc.pop
|
||||
local gc_translate,gc_scale,gc_rotate,gc_applyTransform=gc.translate,gc.scale,gc.rotate,gc.applyTransform
|
||||
local gc_setColor,gc_setLineWidth=gc.setColor,gc.setLineWidth
|
||||
local gc_draw,gc_line=gc.draw,gc.line
|
||||
local gc_rectangle,gc_circle=gc.rectangle,gc.circle
|
||||
local gc_print,gc_printf=gc.print,gc.printf
|
||||
local gc_push,gc_pop=GC.push,GC.pop
|
||||
local gc_translate,gc_scale,gc_rotate,gc_applyTransform=GC.translate,GC.scale,GC.rotate,GC.applyTransform
|
||||
local gc_setColor,gc_setLineWidth=GC.setColor,GC.setLineWidth
|
||||
local gc_draw,gc_line=GC.draw,GC.line
|
||||
local gc_rectangle,gc_circle=GC.rectangle,GC.circle
|
||||
local gc_print,gc_printf=GC.print,GC.printf
|
||||
|
||||
local ms,kb,tc=love.mouse,love.keyboard,love.touch
|
||||
local mt=love.math
|
||||
|
||||
local max,min=math.max,math.min
|
||||
local int,abs=math.floor,math.abs
|
||||
|
||||
local setFont=FONT.set
|
||||
|
||||
local mapCam={
|
||||
sel=false,--Selected mode ID
|
||||
xOy=mt.newTransform(0,0,0,1),--Transformation for map display
|
||||
xOy=love.math.newTransform(0,0,0,1),--Transformation for map display
|
||||
keyCtrl=false,--If controlling with key
|
||||
|
||||
--For auto zooming when enter/leave scene
|
||||
@@ -272,9 +268,9 @@ function scene.draw()
|
||||
name=RANK_CHARS[rank]
|
||||
if name then
|
||||
gc_setColor(COLOR.dX)
|
||||
mStr(name,M.x+M.size*.7,M.y-50-M.size*.7)
|
||||
GC.mStr(name,M.x+M.size*.7,M.y-50-M.size*.7)
|
||||
gc_setColor(RANK_COLORS[rank])
|
||||
mStr(name,M.x+M.size*.7+4,M.y-50-M.size*.7-4)
|
||||
GC.mStr(name,M.x+M.size*.7+4,M.y-50-M.size*.7-4)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -287,8 +283,8 @@ function scene.draw()
|
||||
gc_setColor(COLOR.lX)
|
||||
gc_rectangle('fill',920,0,360,720,5)--Info board
|
||||
gc_setColor(COLOR.Z)
|
||||
setFont(40)mStr(text.modes[sel][1],1100,5)
|
||||
setFont(30)mStr(text.modes[sel][2],1100,50)
|
||||
setFont(40)GC.mStr(text.modes[sel][1],1100,5)
|
||||
setFont(30)GC.mStr(text.modes[sel][2],1100,50)
|
||||
setFont(25)gc_printf(text.modes[sel][3],920,110,360,'center')
|
||||
if M.slowMark then
|
||||
gc_draw(IMG.ctrlSpeedLimit,1230,50,nil,.4)
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
local gc=love.graphics
|
||||
local gc_setColor,gc_print=gc.setColor,gc.print
|
||||
local sin=math.sin
|
||||
local setFont=FONT.set
|
||||
|
||||
local author={
|
||||
battle="Aether & MrZ",
|
||||
@@ -69,56 +66,56 @@ function scene.draw()
|
||||
local t=TIME()
|
||||
|
||||
--Character
|
||||
gc.push('transform')
|
||||
gc.setColor(1,1,1)
|
||||
gc.translate(906,456)
|
||||
gc.scale(.6)
|
||||
GC.draw(IMG.z.character)
|
||||
GC.draw(IMG.z.screen1, -91, -157+16*math.sin(t))
|
||||
GC.draw(IMG.z.screen2, 120, -166+16*math.sin(t+1))
|
||||
gc.setColor(1,1,1,.7+.3*math.sin(.6*t)) GC.draw(IMG.z.particle1, -50, 42+6*math.sin(t*0.36))
|
||||
gc.setColor(1,1,1,.7+.3*math.sin(.7*t)) GC.draw(IMG.z.particle2, 110+6*math.sin(t*0.92), 55)
|
||||
gc.setColor(1,1,1,.7+.3*math.sin(.8*t)) GC.draw(IMG.z.particle3, -54+6*math.sin(t*0.48), -248)
|
||||
gc.setColor(1,1,1,.7+.3*math.sin(.9*t)) GC.draw(IMG.z.particle4, 133, -305+6*math.sin(t*0.40))
|
||||
gc.pop()
|
||||
GC.push('transform')
|
||||
GC.setColor(1,1,1)
|
||||
GC.translate(906,456)
|
||||
GC.scale(.6)
|
||||
mDraw(IMG.z.character)
|
||||
mDraw(IMG.z.screen1, -91, -157+16*math.sin(t))
|
||||
mDraw(IMG.z.screen2, 120, -166+16*math.sin(t+1))
|
||||
GC.setColor(1,1,1,.7+.3*math.sin(.6*t)) mDraw(IMG.z.particle1, -50, 42+6*math.sin(t*0.36))
|
||||
GC.setColor(1,1,1,.7+.3*math.sin(.7*t)) mDraw(IMG.z.particle2, 110+6*math.sin(t*0.92), 55)
|
||||
GC.setColor(1,1,1,.7+.3*math.sin(.8*t)) mDraw(IMG.z.particle3, -54+6*math.sin(t*0.48), -248)
|
||||
GC.setColor(1,1,1,.7+.3*math.sin(.9*t)) mDraw(IMG.z.particle4, 133, -305+6*math.sin(t*0.40))
|
||||
GC.pop()
|
||||
|
||||
gc_setColor(COLOR.Z)
|
||||
GC.setColor(COLOR.Z)
|
||||
|
||||
--Scroller
|
||||
gc.setLineWidth(2)
|
||||
gc.line(315,307,315,482)
|
||||
GC.setLineWidth(2)
|
||||
GC.line(315,307,315,482)
|
||||
setFont(50)
|
||||
gc_print(bgmList[selected],320,355)
|
||||
GC.print(bgmList[selected],320,355)
|
||||
setFont(35)
|
||||
if selected>1 then gc_print(bgmList[selected-1],322,350-30)end
|
||||
if selected<#bgmList then gc_print(bgmList[selected+1],322,350+65)end
|
||||
if selected>1 then GC.print(bgmList[selected-1],322,350-30)end
|
||||
if selected<#bgmList then GC.print(bgmList[selected+1],322,350+65)end
|
||||
setFont(20)
|
||||
if selected>2 then gc_print(bgmList[selected-2],322,350-50)end
|
||||
if selected<#bgmList-1 then gc_print(bgmList[selected+2],322,350+110)end
|
||||
if selected>2 then GC.print(bgmList[selected-2],322,350-50)end
|
||||
if selected<#bgmList-1 then GC.print(bgmList[selected+2],322,350+110)end
|
||||
|
||||
--Title
|
||||
if BGM.nowPlay then
|
||||
GC.draw(TEXTURE.title,570,190,nil,.42)
|
||||
mDraw(TEXTURE.title,570,190,nil,.42)
|
||||
local a=-t%2.3/2.3
|
||||
gc_setColor(1,1,1,math.min(a,1))
|
||||
GC.draw(TEXTURE.title_color,570,190,nil,.42+.062-.062*a)
|
||||
GC.setColor(1,1,1,math.min(a,1))
|
||||
mDraw(TEXTURE.title_color,570,190,nil,.42+.062-.062*a)
|
||||
end
|
||||
|
||||
--Music player
|
||||
if BGM.nowPlay then
|
||||
setFont(45)
|
||||
GC.shadedPrint(BGM.nowPlay,710,508,'left',2)
|
||||
gc_setColor(sin(t*.5)*.2+.8,sin(t*.7)*.2+.8,sin(t)*.2+.8)
|
||||
gc_print(BGM.nowPlay,710,508)
|
||||
GC.setColor(sin(t*.5)*.2+.8,sin(t*.7)*.2+.8,sin(t)*.2+.8)
|
||||
GC.print(BGM.nowPlay,710,508)
|
||||
setFont(35)
|
||||
gc_setColor(1,sin(t*2.6)*.5+.5,sin(t*2.6)*.5+.5)
|
||||
gc_print(author[BGM.nowPlay]or"MrZ",670,465)
|
||||
GC.setColor(1,sin(t*2.6)*.5+.5,sin(t*2.6)*.5+.5)
|
||||
GC.print(author[BGM.nowPlay]or"MrZ",670,465)
|
||||
|
||||
setFont(20)
|
||||
gc_setColor(COLOR.Z)
|
||||
GC.setColor(COLOR.Z)
|
||||
local cur=BGM.playing:tell()
|
||||
local dur=BGM.playing:getDuration()
|
||||
gc_print(STRING.time_simp(cur%dur).." / "..STRING.time_simp(dur),480,626)
|
||||
GC.print(STRING.time_simp(cur%dur).." / "..STRING.time_simp(dur),480,626)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ end
|
||||
function scene.draw()
|
||||
gc.setColor(COLOR.Z)
|
||||
setFont(100)
|
||||
mStr("Tech League",640,120)
|
||||
GC.mStr("Tech League",640,120)
|
||||
drawSelfProfile()
|
||||
drawOnlinePlayerCount()
|
||||
end
|
||||
|
||||
@@ -1,39 +1,33 @@
|
||||
local gc=love.graphics
|
||||
local gc_setColor=gc.setColor
|
||||
local gc_rectangle=gc.rectangle
|
||||
local gc_print,gc_printf=gc.print,gc.printf
|
||||
|
||||
local kb=love.keyboard
|
||||
local setFont=FONT.set
|
||||
|
||||
local listBox=WIDGET.newListBox{name='list',x=50,y=50,w=1200,h=520,lineH=40,drawF=function(rep,id,ifSel)
|
||||
if ifSel then
|
||||
gc_setColor(1,1,1,.3)
|
||||
gc_rectangle('fill',0,0,1200,40)
|
||||
GC.setColor(1,1,1,.3)
|
||||
GC.rectangle('fill',0,0,1200,40)
|
||||
end
|
||||
|
||||
setFont(30)
|
||||
gc_setColor(.8,.8,.8)
|
||||
gc_print(id,10,0)
|
||||
GC.setColor(.8,.8,.8)
|
||||
GC.print(id,10,0)
|
||||
if rep.tasUsed then
|
||||
gc_setColor(COLOR.R)
|
||||
gc_print("TAS",680,1)
|
||||
GC.setColor(COLOR.R)
|
||||
GC.print("TAS",680,1)
|
||||
end
|
||||
|
||||
if rep.available then
|
||||
gc_setColor(.9,.9,1)
|
||||
GC.setColor(.9,.9,1)
|
||||
local modeName=text.modes[rep.mode]
|
||||
gc_print(modeName and modeName[1].." "..modeName[2]or rep.mode,310,0)
|
||||
GC.print(modeName and modeName[1].." "..modeName[2]or rep.mode,310,0)
|
||||
setFont(20)
|
||||
gc_setColor(1,1,.8)
|
||||
gc_print(rep.date,80,6)
|
||||
gc_setColor(1,.4,.4,.6)
|
||||
gc_printf(rep.version,0,6,1190,'right')
|
||||
gc_setColor(COLOR.Z)
|
||||
gc_printf(rep.player,0,6,960,'right')
|
||||
GC.setColor(1,1,.8)
|
||||
GC.print(rep.date,80,6)
|
||||
GC.setColor(1,.4,.4,.6)
|
||||
GC.printf(rep.version,0,6,1190,'right')
|
||||
GC.setColor(COLOR.Z)
|
||||
GC.printf(rep.player,0,6,960,'right')
|
||||
else
|
||||
gc_setColor(.6,.6,.6)
|
||||
gc_print(rep.fileName,80,0)
|
||||
GC.setColor(.6,.6,.6)
|
||||
GC.print(rep.fileName,80,0)
|
||||
end
|
||||
end}
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@ function scene.draw()
|
||||
if SETTING.VKTrack then
|
||||
love.graphics.setColor(1,1,1)
|
||||
setFont(30)
|
||||
mStr(text.VKTchW,140+500*SETTING.VKTchW,800-WIDGET.scrollPos)
|
||||
mStr(text.VKOrgW,140+500*SETTING.VKTchW+500*SETTING.VKCurW,870-WIDGET.scrollPos)
|
||||
mStr(text.VKCurW,640+500*SETTING.VKCurW,950-WIDGET.scrollPos)
|
||||
GC.mStr(text.VKTchW,140+500*SETTING.VKTchW,800-WIDGET.scrollPos)
|
||||
GC.mStr(text.VKOrgW,140+500*SETTING.VKTchW+500*SETTING.VKCurW,870-WIDGET.scrollPos)
|
||||
GC.mStr(text.VKCurW,640+500*SETTING.VKCurW,950-WIDGET.scrollPos)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ function scene.draw()
|
||||
local L=text.staff
|
||||
setFont(40)
|
||||
for i=1,#L do
|
||||
mStr(L[i],640,950+65*i-T)
|
||||
GC.mStr(L[i],640,950+65*i-T)
|
||||
end
|
||||
gc.setColor(1,1,1)
|
||||
mDraw(TEXTURE.title_color,640,900-T,nil,.6)
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
local gc=love.graphics
|
||||
local gc_translate=gc.translate
|
||||
local gc_setColor,gc_setLineWidth=gc.setColor,gc.setLineWidth
|
||||
local gc_draw,gc_line=gc.draw,gc.line
|
||||
local gc_print=gc.print
|
||||
local gc_translate=GC.translate
|
||||
local gc_setColor,gc_setLineWidth=GC.setColor,GC.setLineWidth
|
||||
local gc_draw,gc_line=GC.draw,GC.line
|
||||
local gc_print=GC.print
|
||||
|
||||
local int,sin=math.floor,math.sin
|
||||
local mStr=GC.mStr
|
||||
|
||||
local scene={}
|
||||
|
||||
@@ -82,8 +80,8 @@ function scene.draw()
|
||||
local A,B=form.A1,form.A2
|
||||
gc_translate(60,80)
|
||||
gc_setLineWidth(2)
|
||||
gc.rectangle('line',0,0,560,160,5)
|
||||
gc.rectangle('line',0,240,560,160,5)
|
||||
GC.rectangle('line',0,0,560,160,5)
|
||||
GC.rectangle('line',0,240,560,160,5)
|
||||
for x=1,6 do
|
||||
x=80*x
|
||||
gc_line(x,0,x,160)
|
||||
@@ -97,15 +95,15 @@ function scene.draw()
|
||||
for x=1,7 do
|
||||
gc_setColor(BLOCK_COLORS[SETTING.skin[x]])
|
||||
setFont(70)
|
||||
mStr(BLOCK_CHARS[x],80*x-40,-70)
|
||||
mStr(BLOCK_CHARS[x],80*x-40,170)
|
||||
GC.mStr(BLOCK_CHARS[x],80*x-40,-70)
|
||||
GC.mStr(BLOCK_CHARS[x],80*x-40,170)
|
||||
setFont(25)
|
||||
for y=1,4 do
|
||||
mStr(A[x][y],80*x-40,-37+40*y)
|
||||
mStr(B[x][y],80*x-40,203+40*y)
|
||||
GC.mStr(A[x][y],80*x-40,-37+40*y)
|
||||
GC.mStr(B[x][y],80*x-40,203+40*y)
|
||||
end
|
||||
mStr(form.Y1[x],80*x-40,163)
|
||||
mStr(form.Y2[x],80*x-40,403)
|
||||
GC.mStr(form.Y1[x],80*x-40,163)
|
||||
GC.mStr(form.Y2[x],80*x-40,403)
|
||||
end
|
||||
|
||||
A,B=form.X1,form.X2
|
||||
@@ -114,8 +112,8 @@ function scene.draw()
|
||||
gc_print(spinChars[y],-33,-37+40*y)
|
||||
gc_print(y,-28,203+40*y)
|
||||
gc_setColor(COLOR.H)
|
||||
mStr(A[y],612,-37+40*y)
|
||||
mStr(B[y],612,203+40*y)
|
||||
GC.mStr(A[y],612,-37+40*y)
|
||||
GC.mStr(B[y],612,203+40*y)
|
||||
end
|
||||
gc_translate(-60,-80)
|
||||
end
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user