更多全局变量改为全大写
This commit is contained in:
14
main.lua
14
main.lua
@@ -117,7 +117,7 @@ do--Z.setCursor
|
|||||||
Z.setCursor(function(time,x,y)
|
Z.setCursor(function(time,x,y)
|
||||||
if not SETTING.sysCursor then
|
if not SETTING.sysCursor then
|
||||||
local R=int((time+1)/2)%7+1
|
local R=int((time+1)/2)%7+1
|
||||||
_=minoColor[SETTING.skin[R]]
|
_=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]
|
_=DSCP[R][0]
|
||||||
gc_draw(TEXTURE.miniBlock[R],x,y,time%3.14159265359*4,16,16,_[2]+.5,#BLOCKS[R][0]-_[1]-.5)
|
gc_draw(TEXTURE.miniBlock[R],x,y,time%3.14159265359*4,16,16,_[2]+.5,#BLOCKS[R][0]-_[1]-.5)
|
||||||
@@ -190,8 +190,8 @@ TABLE.cover (FILE.load('conf/user')or{},USER)
|
|||||||
TABLE.cover (FILE.load('conf/unlock')or{},RANKS)
|
TABLE.cover (FILE.load('conf/unlock')or{},RANKS)
|
||||||
TABLE.update(FILE.load('conf/settings')or{},SETTING)
|
TABLE.update(FILE.load('conf/settings')or{},SETTING)
|
||||||
TABLE.update(FILE.load('conf/data')or{},STAT)
|
TABLE.update(FILE.load('conf/data')or{},STAT)
|
||||||
TABLE.cover (FILE.load('conf/key')or{},keyMap)
|
TABLE.cover (FILE.load('conf/key')or{},KEY_MAP)
|
||||||
TABLE.cover (FILE.load('conf/virtualkey')or{},VK_org)
|
TABLE.cover (FILE.load('conf/virtualkey')or{},VK_ORG)
|
||||||
|
|
||||||
--Initialize fields, sequence, missions, gameEnv for cutsom game
|
--Initialize fields, sequence, missions, gameEnv for cutsom game
|
||||||
local fieldData=FILE.load('conf/customBoards','string')
|
local fieldData=FILE.load('conf/customBoards','string')
|
||||||
@@ -327,7 +327,7 @@ LANG.init('zh',
|
|||||||
--3. Add a button in parts/scenes/setting_lang.lua;
|
--3. Add a button in parts/scenes/setting_lang.lua;
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
block=BLOCKNAMES
|
block=BLOCK_NAMES
|
||||||
},
|
},
|
||||||
(function()
|
(function()
|
||||||
local tipMeta={__call=function(L)return L[math.random(#L)]end}
|
local tipMeta={__call=function(L)return L[math.random(#L)]end}
|
||||||
@@ -445,7 +445,7 @@ do
|
|||||||
if not RANKS.sprint_10l then RANKS.sprint_10l=0 end
|
if not RANKS.sprint_10l then RANKS.sprint_10l=0 end
|
||||||
if RANKS.master_l then RANKS.master_n,RANKS.master_l=RANKS.master_l needSave=true end
|
if RANKS.master_l then RANKS.master_n,RANKS.master_l=RANKS.master_l needSave=true end
|
||||||
if RANKS.master_u then RANKS.master_h,RANKS.master_u=RANKS.master_u needSave=true end
|
if RANKS.master_u then RANKS.master_h,RANKS.master_u=RANKS.master_u needSave=true end
|
||||||
for _,v in next,VK_org do v.color=nil end
|
for _,v in next,VK_ORG do v.color=nil end
|
||||||
for name,rank in next,RANKS do
|
for name,rank in next,RANKS do
|
||||||
if type(name)=='number'or type(rank)~='number'then
|
if type(name)=='number'or type(rank)~='number'then
|
||||||
RANKS[name]=nil
|
RANKS[name]=nil
|
||||||
@@ -471,7 +471,7 @@ do
|
|||||||
needSave=true
|
needSave=true
|
||||||
end
|
end
|
||||||
|
|
||||||
for k,v in next,oldModeNameTable do
|
for k,v in next,MODE_UPDATE_MAP do
|
||||||
if RANKS[k]then
|
if RANKS[k]then
|
||||||
RANKS[v]=RANKS[k]
|
RANKS[v]=RANKS[k]
|
||||||
RANKS[k]=nil
|
RANKS[k]=nil
|
||||||
@@ -511,7 +511,7 @@ for _,fileName in next,fs.getDirectoryItems('replay')do
|
|||||||
local date,mode,version,player,seed,setting,mod
|
local date,mode,version,player,seed,setting,mod
|
||||||
local fileData=fs.read('replay/'..fileName)
|
local fileData=fs.read('replay/'..fileName)
|
||||||
date, fileData=STRING.readLine(fileData)date=date:gsub("[a-zA-Z]","")
|
date, fileData=STRING.readLine(fileData)date=date:gsub("[a-zA-Z]","")
|
||||||
mode, fileData=STRING.readLine(fileData)mode=oldModeNameTable[mode]or mode
|
mode, fileData=STRING.readLine(fileData)mode=MODE_UPDATE_MAP[mode]or mode
|
||||||
version,fileData=STRING.readLine(fileData)
|
version,fileData=STRING.readLine(fileData)
|
||||||
player, fileData=STRING.readLine(fileData)if player=="Local Player"then player="Stacker"end
|
player, fileData=STRING.readLine(fileData)if player=="Local Player"then player="Stacker"end
|
||||||
local success
|
local success
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ function back.update()
|
|||||||
ins(mino,{
|
ins(mino,{
|
||||||
bid=r,
|
bid=r,
|
||||||
block=TEXTURE.miniBlock[r],
|
block=TEXTURE.miniBlock[r],
|
||||||
color=minoColor[SETTING.skin[r]],
|
color=BLOCK_COLORS[SETTING.skin[r]],
|
||||||
x=SCR.w*rnd(),
|
x=SCR.w*rnd(),
|
||||||
y=SCR.h*-.05,
|
y=SCR.h*-.05,
|
||||||
k=SCR.rad/100,
|
k=SCR.rad/100,
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ function back.update()
|
|||||||
local r=rnd(29)
|
local r=rnd(29)
|
||||||
ins(mino,{
|
ins(mino,{
|
||||||
block=TEXTURE.miniBlock[r],
|
block=TEXTURE.miniBlock[r],
|
||||||
color=minoColor[SETTING.skin[r]],
|
color=BLOCK_COLORS[SETTING.skin[r]],
|
||||||
ang=6.2832*rnd(),
|
ang=6.2832*rnd(),
|
||||||
rotate=6.2832*rnd(),
|
rotate=6.2832*rnd(),
|
||||||
vr=.05-rnd()*.1,
|
vr=.05-rnd()*.1,
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ local t
|
|||||||
local fan,petal
|
local fan,petal
|
||||||
function back.init()
|
function back.init()
|
||||||
t=0
|
t=0
|
||||||
fan=title_fan
|
fan=SVG_TITLE_FAN
|
||||||
petal={}
|
petal={}
|
||||||
end
|
end
|
||||||
function back.update()
|
function back.update()
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ local int,rnd=math.floor,math.random
|
|||||||
local back={}
|
local back={}
|
||||||
|
|
||||||
local t
|
local t
|
||||||
local colorLib=minoColor
|
local colorLib=BLOCK_COLORS
|
||||||
local blocks=BLOCKS
|
local blocks=BLOCKS
|
||||||
local scs=RSlist.TRS.centerPos
|
local scs=RSlist.TRS.centerPos
|
||||||
function back.init()
|
function back.init()
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ function DATA.pasteMission(str)
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
if b>=34 and b<=114 then
|
if b>=34 and b<=114 then
|
||||||
if missionEnum[reg]then
|
if ENUM_MISSION[reg]then
|
||||||
ins(MISSION,reg)
|
ins(MISSION,reg)
|
||||||
reg=b-33
|
reg=b-33
|
||||||
else
|
else
|
||||||
@@ -390,7 +390,7 @@ function DATA.parseReplayData(fileName,fileData,ifFull)
|
|||||||
if not metaData then goto BREAK_cannotParse end
|
if not metaData then goto BREAK_cannotParse end
|
||||||
|
|
||||||
--Convert ancient replays
|
--Convert ancient replays
|
||||||
metaData.mode=oldModeNameTable[metaData.mode]or metaData.mode
|
metaData.mode=MODE_UPDATE_MAP[metaData.mode]or metaData.mode
|
||||||
if not MODES[metaData.mode]then goto BREAK_cannotParse end
|
if not MODES[metaData.mode]then goto BREAK_cannotParse end
|
||||||
|
|
||||||
--Create replay object
|
--Create replay object
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ return{
|
|||||||
setFont(55)
|
setFont(55)
|
||||||
mStr(P.modeData.wave,63,200)
|
mStr(P.modeData.wave,63,200)
|
||||||
mStr("22",63,320)
|
mStr("22",63,320)
|
||||||
mText(drawableText.wave,63,260)
|
mText(TEXTOBJ.wave,63,260)
|
||||||
mText(drawableText.nextWave,63,380)
|
mText(TEXTOBJ.nextWave,63,380)
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
while true do
|
while true do
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ return{
|
|||||||
setFont(55)
|
setFont(55)
|
||||||
mStr(P.modeData.wave,63,200)
|
mStr(P.modeData.wave,63,200)
|
||||||
mStr(20+4*math.min(math.floor(P.modeData.wave/10),2),63,320)
|
mStr(20+4*math.min(math.floor(P.modeData.wave/10),2),63,320)
|
||||||
mText(drawableText.wave,63,260)
|
mText(TEXTOBJ.wave,63,260)
|
||||||
mText(drawableText.nextWave,63,380)
|
mText(TEXTOBJ.nextWave,63,380)
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
while true do
|
while true do
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ local gc=love.graphics
|
|||||||
|
|
||||||
return{
|
return{
|
||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
mText(drawableText.techrash,63,420)
|
mText(TEXTOBJ.techrash,63,420)
|
||||||
setFont(75)
|
setFont(75)
|
||||||
mStr(P.stat.clears[4],63,340)
|
mStr(P.stat.clears[4],63,340)
|
||||||
PLY.draw.applyField(P)
|
PLY.draw.applyField(P)
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ return{
|
|||||||
setFont(45)
|
setFont(45)
|
||||||
mStr(P.combo,63,310)
|
mStr(P.combo,63,310)
|
||||||
mStr(P.modeData.maxCombo,63,400)
|
mStr(P.modeData.maxCombo,63,400)
|
||||||
mText(drawableText.combo,63,358)
|
mText(TEXTOBJ.combo,63,358)
|
||||||
mText(drawableText.maxcmb,63,450)
|
mText(TEXTOBJ.maxcmb,63,450)
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
local F=P.field
|
local F=P.field
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ return{
|
|||||||
setFont(45)
|
setFont(45)
|
||||||
mStr(("%.1f"):format(P.stat.atk),63,190)
|
mStr(("%.1f"):format(P.stat.atk),63,190)
|
||||||
mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310)
|
mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310)
|
||||||
mText(drawableText.atk,63,243)
|
mText(TEXTOBJ.atk,63,243)
|
||||||
mText(drawableText.eff,63,363)
|
mText(TEXTOBJ.eff,63,363)
|
||||||
end,
|
end,
|
||||||
dropPiece=function(P)
|
dropPiece=function(P)
|
||||||
if P.stat.atk>=100 then
|
if P.stat.atk>=100 then
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ return{
|
|||||||
setFont(75)
|
setFont(75)
|
||||||
local r=P.modeData.target/10
|
local r=P.modeData.target/10
|
||||||
mStr(r<10 and 9 or r<30 and r or("%02x"):format(r*10-300),63,210)
|
mStr(r<10 and 9 or r<30 and r or("%02x"):format(r*10-300),63,210)
|
||||||
mText(drawableText.speedLV,63,290)
|
mText(TEXTOBJ.speedLV,63,290)
|
||||||
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ return{
|
|||||||
setFont(75)
|
setFont(75)
|
||||||
local r=P.modeData.target/10
|
local r=P.modeData.target/10
|
||||||
mStr(r<11 and 18 or r<22 and r+8 or("%02x"):format(r*10-220),63,210)
|
mStr(r<11 and 18 or r<22 and r+8 or("%02x"):format(r*10-220),63,210)
|
||||||
mText(drawableText.speedLV,63,290)
|
mText(TEXTOBJ.speedLV,63,290)
|
||||||
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ return{
|
|||||||
setFont(75)
|
setFont(75)
|
||||||
local r=P.modeData.target/10
|
local r=P.modeData.target/10
|
||||||
mStr(r==1 and 29 or("%02x"):format(r*10-20),63,210)
|
mStr(r==1 and 29 or("%02x"):format(r*10-20),63,210)
|
||||||
mText(drawableText.speedLV,63,290)
|
mText(TEXTOBJ.speedLV,63,290)
|
||||||
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ return{
|
|||||||
setFont(55)
|
setFont(55)
|
||||||
mStr(P.modeData.wave,63,200)
|
mStr(P.modeData.wave,63,200)
|
||||||
mStr(P.modeData.rpm,63,320)
|
mStr(P.modeData.rpm,63,320)
|
||||||
mText(drawableText.wave,63,260)
|
mText(TEXTOBJ.wave,63,260)
|
||||||
mText(drawableText.rpm,63,380)
|
mText(TEXTOBJ.rpm,63,380)
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
while true do
|
while true do
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ return{
|
|||||||
setFont(55)
|
setFont(55)
|
||||||
mStr(P.modeData.wave,63,200)
|
mStr(P.modeData.wave,63,200)
|
||||||
mStr(P.modeData.rpm,63,320)
|
mStr(P.modeData.rpm,63,320)
|
||||||
mText(drawableText.wave,63,260)
|
mText(TEXTOBJ.wave,63,260)
|
||||||
mText(drawableText.rpm,63,380)
|
mText(TEXTOBJ.rpm,63,380)
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
while true do
|
while true do
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ return{
|
|||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
setFont(60)
|
setFont(60)
|
||||||
mStr(P.modeData.wave,63,310)
|
mStr(P.modeData.wave,63,310)
|
||||||
mText(drawableText.wave,63,375)
|
mText(TEXTOBJ.wave,63,375)
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
while true do
|
while true do
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ return{
|
|||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
setFont(60)
|
setFont(60)
|
||||||
mStr(P.modeData.wave,63,310)
|
mStr(P.modeData.wave,63,310)
|
||||||
mText(drawableText.wave,63,375)
|
mText(TEXTOBJ.wave,63,375)
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
while true do
|
while true do
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ return{
|
|||||||
gc.rectangle('fill',0,475-h,125,h,4)
|
gc.rectangle('fill',0,475-h,125,h,4)
|
||||||
gc.setColor(COLOR.Z)
|
gc.setColor(COLOR.Z)
|
||||||
end
|
end
|
||||||
mText(drawableText.line,63,310)
|
mText(TEXTOBJ.line,63,310)
|
||||||
mText(drawableText.techrash,63,420)
|
mText(TEXTOBJ.techrash,63,420)
|
||||||
mText(drawableText.grade,63,180)
|
mText(TEXTOBJ.grade,63,180)
|
||||||
setFont(20)
|
setFont(20)
|
||||||
mStr(("%.1f"):format(P.modeData.rankPoint/10),63,208)
|
mStr(("%.1f"):format(P.modeData.rankPoint/10),63,208)
|
||||||
setFont(55)
|
setFont(55)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ return{
|
|||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
setFont(60)
|
setFont(60)
|
||||||
mStr(P.stat.pc,63,340)
|
mStr(P.stat.pc,63,340)
|
||||||
mText(drawableText.pc,63,410)
|
mText(TEXTOBJ.pc,63,410)
|
||||||
end,
|
end,
|
||||||
dropPiece=function(P)
|
dropPiece=function(P)
|
||||||
if P.lastPiece.pc and P.stat.row%4==0 then
|
if P.lastPiece.pc and P.stat.row%4==0 then
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ return{
|
|||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
setFont(60)
|
setFont(60)
|
||||||
mStr(P.stat.pc,63,340)
|
mStr(P.stat.pc,63,340)
|
||||||
mText(drawableText.pc,63,410)
|
mText(TEXTOBJ.pc,63,410)
|
||||||
end,
|
end,
|
||||||
dropPiece=check,
|
dropPiece=check,
|
||||||
task=check,
|
task=check,
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ return{
|
|||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
setFont(60)
|
setFont(60)
|
||||||
mStr(P.stat.pc,63,340)
|
mStr(P.stat.pc,63,340)
|
||||||
mText(drawableText.pc,63,410)
|
mText(TEXTOBJ.pc,63,410)
|
||||||
end,
|
end,
|
||||||
dropPiece=check,
|
dropPiece=check,
|
||||||
task=check,
|
task=check,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ return{
|
|||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
setFont(60)
|
setFont(60)
|
||||||
mStr(P.modeData.wave,63,310)
|
mStr(P.modeData.wave,63,310)
|
||||||
mText(drawableText.wave,63,375)
|
mText(TEXTOBJ.wave,63,375)
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
while true do
|
while true do
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ return{
|
|||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
setFont(60)
|
setFont(60)
|
||||||
mStr(P.modeData.wave,63,310)
|
mStr(P.modeData.wave,63,310)
|
||||||
mText(drawableText.wave,63,375)
|
mText(TEXTOBJ.wave,63,375)
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
while true do
|
while true do
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ return{
|
|||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
setFont(60)
|
setFont(60)
|
||||||
mStr(P.modeData.wave,63,310)
|
mStr(P.modeData.wave,63,310)
|
||||||
mText(drawableText.wave,63,375)
|
mText(TEXTOBJ.wave,63,375)
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
while true do
|
while true do
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ return{
|
|||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
setFont(60)
|
setFont(60)
|
||||||
mStr(P.modeData.wave,63,310)
|
mStr(P.modeData.wave,63,310)
|
||||||
mText(drawableText.wave,63,375)
|
mText(TEXTOBJ.wave,63,375)
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
while true do
|
while true do
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ return{
|
|||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
setFont(60)
|
setFont(60)
|
||||||
mStr(P.modeData.wave,63,310)
|
mStr(P.modeData.wave,63,310)
|
||||||
mText(drawableText.wave,63,375)
|
mText(TEXTOBJ.wave,63,375)
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
while true do
|
while true do
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ return{
|
|||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
setFont(60)
|
setFont(60)
|
||||||
mStr(P.stat.clear[7][4],63,250)
|
mStr(P.stat.clear[7][4],63,250)
|
||||||
mText(drawableText.techrash,63,315)
|
mText(TEXTOBJ.techrash,63,315)
|
||||||
end,
|
end,
|
||||||
dropPiece=function(P)
|
dropPiece=function(P)
|
||||||
if P.lastPiece.row>0 and P.lastPiece.row<4 then
|
if P.lastPiece.row>0 and P.lastPiece.row<4 then
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ return{
|
|||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
setFont(60)
|
setFont(60)
|
||||||
mStr(P.modeData.techrash,63,250)
|
mStr(P.modeData.techrash,63,250)
|
||||||
mText(drawableText.techrash,63,315)
|
mText(TEXTOBJ.techrash,63,315)
|
||||||
PLY.draw.applyField(P)
|
PLY.draw.applyField(P)
|
||||||
local L=P.modeData.history
|
local L=P.modeData.history
|
||||||
for i=1,#L do
|
for i=1,#L do
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ return{
|
|||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
setFont(60)
|
setFont(60)
|
||||||
mStr(P.modeData.tsd,63,250)
|
mStr(P.modeData.tsd,63,250)
|
||||||
mText(drawableText.tsd,63,315)
|
mText(TEXTOBJ.tsd,63,315)
|
||||||
end,
|
end,
|
||||||
dropPiece=function(P)
|
dropPiece=function(P)
|
||||||
local C=P.lastPiece
|
local C=P.lastPiece
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ return{
|
|||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
setFont(60)
|
setFont(60)
|
||||||
mStr(P.modeData.tsd,63,250)
|
mStr(P.modeData.tsd,63,250)
|
||||||
mText(drawableText.tsd,63,315)
|
mText(TEXTOBJ.tsd,63,315)
|
||||||
local L=P.modeData.history
|
local L=P.modeData.history
|
||||||
if L[1]and L[1]==L[2]and L[1]==L[3]then
|
if L[1]and L[1]==L[2]and L[1]==L[3]then
|
||||||
PLY.draw.applyField(P)
|
PLY.draw.applyField(P)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ return{
|
|||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
setFont(60)
|
setFont(60)
|
||||||
mStr(P.modeData.tsd,63,250)
|
mStr(P.modeData.tsd,63,250)
|
||||||
mText(drawableText.tsd,63,315)
|
mText(TEXTOBJ.tsd,63,315)
|
||||||
PLY.draw.applyField(P)
|
PLY.draw.applyField(P)
|
||||||
local L=P.modeData.history
|
local L=P.modeData.history
|
||||||
for i=1,#L do
|
for i=1,#L do
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ end
|
|||||||
function applyLanguage()
|
function applyLanguage()
|
||||||
text=LANG.get(SETTING.locale)
|
text=LANG.get(SETTING.locale)
|
||||||
WIDGET.setLang(text.WidgetText)
|
WIDGET.setLang(text.WidgetText)
|
||||||
for k,v in next,drawableText do
|
for k,v in next,TEXTOBJ do
|
||||||
if text[k]then
|
if text[k]then
|
||||||
v:set(text[k])
|
v:set(text[k])
|
||||||
end
|
end
|
||||||
@@ -340,7 +340,7 @@ function loadGame(mode,ifQuickPlay,ifNet)--Load a mode and go to game scene
|
|||||||
SCN.go('net_game','swipeD')
|
SCN.go('net_game','swipeD')
|
||||||
else
|
else
|
||||||
local modeText=text.modes[mode]or{"["..MODES[mode].name.."]",""}
|
local modeText=text.modes[mode]or{"["..MODES[mode].name.."]",""}
|
||||||
drawableText.modeName:set(modeText[1].." "..modeText[2])
|
TEXTOBJ.modeName:set(modeText[1].." "..modeText[2])
|
||||||
SCN.go('game',ifQuickPlay and'swipeD'or'fade_togame')
|
SCN.go('game',ifQuickPlay and'swipeD'or'fade_togame')
|
||||||
SFX.play('enter')
|
SFX.play('enter')
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,29 @@
|
|||||||
--Static data tables
|
--Static data tables
|
||||||
do--title
|
SFXPACKS={'chiptune'}
|
||||||
title={
|
VOCPACKS={'miya','mono','xiaoya','miku'}
|
||||||
|
BLOCK_NAMES={
|
||||||
|
'Z','S','J','L','T','O','I',
|
||||||
|
'Z5','S5','P','Q','F','E',
|
||||||
|
'T5','U','V','W','X',
|
||||||
|
'J5','L5','R','Y','N','H','I5',
|
||||||
|
'I3','C','I2','O1'
|
||||||
|
}
|
||||||
|
BLOCK_CHARS={}for i=1,#BLOCK_NAMES do BLOCK_CHARS[i]=CHAR.mino[BLOCK_NAMES[i]]end
|
||||||
|
BLOCK_COLORS={
|
||||||
|
COLOR.R,COLOR.F,COLOR.O,COLOR.Y,COLOR.L,COLOR.J,COLOR.G,COLOR.A,
|
||||||
|
COLOR.C,COLOR.N,COLOR.S,COLOR.B,COLOR.V,COLOR.P,COLOR.M,COLOR.W,
|
||||||
|
COLOR.dH,COLOR.D,COLOR.lY,COLOR.H,COLOR.lH,COLOR.dV,COLOR.dR,COLOR.dG,
|
||||||
|
}
|
||||||
|
RANK_CHARS={'B','A','S','U','X'}for i=1,#RANK_CHARS do RANK_CHARS[i]=CHAR.icon['rank'..RANK_CHARS[i]]end
|
||||||
|
RANK_COLORS={
|
||||||
|
{.5,.7,.9},
|
||||||
|
{.5,1,.6},
|
||||||
|
{.95,.95,.5},
|
||||||
|
{1,.5,.4},
|
||||||
|
{.95,.5,.95},
|
||||||
|
}
|
||||||
|
do--SVG_TITLE
|
||||||
|
SVG_TITLE={
|
||||||
{
|
{
|
||||||
53, 60,
|
53, 60,
|
||||||
1035, 0,
|
1035, 0,
|
||||||
@@ -115,20 +138,20 @@ do--title
|
|||||||
5878, 463,
|
5878, 463,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
for _,C in next,title do
|
for _,C in next,SVG_TITLE do
|
||||||
for i=1,#C do
|
for i=1,#C do
|
||||||
C[i]=C[i]*.1626
|
C[i]=C[i]*.1626
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
do--title_fan
|
do--SVG_TITLE_FAN
|
||||||
title_fan={}
|
SVG_TITLE_FAN={}
|
||||||
local sin,cos=math.sin,math.cos
|
local sin,cos=math.sin,math.cos
|
||||||
for i=1,8 do
|
for i=1,8 do
|
||||||
local L={}
|
local L={}
|
||||||
title_fan[i]=L
|
SVG_TITLE_FAN[i]=L
|
||||||
for j=1,#title[i]do
|
for j=1,#SVG_TITLE[i]do
|
||||||
L[j]=title[i][j]
|
L[j]=SVG_TITLE[i][j]
|
||||||
end
|
end
|
||||||
for j=1,#L,2 do
|
for j=1,#L,2 do
|
||||||
local x,y=L[j],L[j+1]--0<x<3041, 290<y<1280
|
local x,y=L[j],L[j+1]--0<x<3041, 290<y<1280
|
||||||
@@ -138,8 +161,8 @@ do--title_fan
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
do--missionEnum
|
do--MISSIONENUM
|
||||||
missionEnum={
|
ENUM_MISSION={
|
||||||
_1=01,_2=02,_3=03,_4=04,
|
_1=01,_2=02,_3=03,_4=04,
|
||||||
A1=05,A2=06,A3=07,A4=08,
|
A1=05,A2=06,A3=07,A4=08,
|
||||||
PC=09,
|
PC=09,
|
||||||
@@ -152,12 +175,12 @@ do--missionEnum
|
|||||||
I1=71,I2=72,I3=73,I4=74,
|
I1=71,I2=72,I3=73,I4=74,
|
||||||
}
|
}
|
||||||
local L={}
|
local L={}
|
||||||
for k,v in next,missionEnum do L[v]=k end
|
for k,v in next,ENUM_MISSION do L[v]=k end
|
||||||
for k,v in next,L do missionEnum[k]=v end
|
for k,v in next,L do ENUM_MISSION[k]=v end
|
||||||
end
|
end
|
||||||
do--drawableText
|
do--TEXTOBJ
|
||||||
local function T(s,t)return love.graphics.newText(getFont(s),t)end
|
local function T(s,t)return love.graphics.newText(getFont(s),t)end
|
||||||
drawableText={
|
TEXTOBJ={
|
||||||
modeName=T(30),
|
modeName=T(30),
|
||||||
|
|
||||||
win=T(120),
|
win=T(120),
|
||||||
@@ -179,15 +202,6 @@ do--drawableText
|
|||||||
noScore=T(45),highScore=T(30),modeLocked=T(45),
|
noScore=T(45),highScore=T(30),modeLocked=T(45),
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
BLOCKNAMES={
|
|
||||||
'Z','S','J','L','T','O','I',
|
|
||||||
'Z5','S5','P','Q','F','E',
|
|
||||||
'T5','U','V','W','X',
|
|
||||||
'J5','L5','R','Y','N','H','I5',
|
|
||||||
'I3','C','I2','O1'
|
|
||||||
}
|
|
||||||
BLOCKCHARS={}for i=1,#BLOCKNAMES do BLOCKCHARS[i]=CHAR.mino[BLOCKNAMES[i]]end
|
|
||||||
RANKCHARS={'B','A','S','U','X'}for i=1,#RANKCHARS do RANKCHARS[i]=CHAR.icon['rank'..RANKCHARS[i]]end
|
|
||||||
do--BLOCKS
|
do--BLOCKS
|
||||||
local O,_=true,false
|
local O,_=true,false
|
||||||
BLOCKS={
|
BLOCKS={
|
||||||
@@ -250,7 +264,7 @@ do--BLOCKS
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
oldModeNameTable={
|
MODE_UPDATE_MAP={
|
||||||
attacker_hard="attacker_h",
|
attacker_hard="attacker_h",
|
||||||
attacker_ultimate="attacker_u",
|
attacker_ultimate="attacker_u",
|
||||||
blind_easy="blind_e",
|
blind_easy="blind_e",
|
||||||
@@ -320,7 +334,7 @@ oldModeNameTable={
|
|||||||
master_phantasm="master_ph",
|
master_phantasm="master_ph",
|
||||||
master_extra="master_ex",
|
master_extra="master_ex",
|
||||||
}
|
}
|
||||||
eventSetList={
|
EVENTSETS={
|
||||||
'X',
|
'X',
|
||||||
'attacker_h','attacker_u',
|
'attacker_h','attacker_u',
|
||||||
'backfire_120','backfire_60','backfire_30','backfire_0',
|
'backfire_120','backfire_60','backfire_30','backfire_0',
|
||||||
@@ -338,18 +352,6 @@ eventSetList={
|
|||||||
'tsd_e','tsd_h','tsd_u',
|
'tsd_e','tsd_h','tsd_u',
|
||||||
'ultra',
|
'ultra',
|
||||||
}
|
}
|
||||||
rankColor={
|
|
||||||
{.5,.7,.9},
|
|
||||||
{.5,1,.6},
|
|
||||||
{.95,.95,.5},
|
|
||||||
{1,.5,.4},
|
|
||||||
{.95,.5,.95},
|
|
||||||
}
|
|
||||||
minoColor={
|
|
||||||
COLOR.R,COLOR.F,COLOR.O,COLOR.Y,COLOR.L,COLOR.J,COLOR.G,COLOR.A,
|
|
||||||
COLOR.C,COLOR.N,COLOR.S,COLOR.B,COLOR.V,COLOR.P,COLOR.M,COLOR.W,
|
|
||||||
COLOR.dH,COLOR.D,COLOR.lY,COLOR.H,COLOR.lH,COLOR.dV,COLOR.dR,COLOR.dG,
|
|
||||||
}
|
|
||||||
|
|
||||||
do--Mod data
|
do--Mod data
|
||||||
local function _disableKey(P,key)
|
local function _disableKey(P,key)
|
||||||
@@ -681,7 +683,7 @@ do--Userdata tables
|
|||||||
VKIcon=true,--If disp icon
|
VKIcon=true,--If disp icon
|
||||||
VKAlpha=.3,
|
VKAlpha=.3,
|
||||||
}
|
}
|
||||||
keyMap={--Key setting
|
KEY_MAP={--Key setting
|
||||||
keyboard={
|
keyboard={
|
||||||
left=1,right=2,x=3,z=4,c=5,
|
left=1,right=2,x=3,z=4,c=5,
|
||||||
up=6,down=7,space=8,a=9,s=10,
|
up=6,down=7,space=8,a=9,s=10,
|
||||||
@@ -693,7 +695,7 @@ do--Userdata tables
|
|||||||
leftshoulder=0,
|
leftshoulder=0,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
VK_org={--Virtualkey layout, refresh all VKs' position with this before each game
|
VK_ORG={--Virtualkey layout, refresh all VKs' position with this before each game
|
||||||
{ava=true, x=80, y=720-200,r=80},--moveLeft
|
{ava=true, x=80, y=720-200,r=80},--moveLeft
|
||||||
{ava=true, x=320, y=720-200,r=80},--moveRight
|
{ava=true, x=320, y=720-200,r=80},--moveRight
|
||||||
{ava=true, x=1280-80, y=720-200,r=80},--rotRight
|
{ava=true, x=1280-80, y=720-200,r=80},--rotRight
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ return{
|
|||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
setFont(60)
|
setFont(60)
|
||||||
mStr(P.stat.atk,63,280)
|
mStr(P.stat.atk,63,280)
|
||||||
mText(drawableText.atk,63,350)
|
mText(TEXTOBJ.atk,63,350)
|
||||||
end,
|
end,
|
||||||
bg='tunnel',bgm='echo',
|
bg='tunnel',bgm='echo',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ return{
|
|||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
setFont(60)
|
setFont(60)
|
||||||
mStr(P.stat.atk,63,280)
|
mStr(P.stat.atk,63,280)
|
||||||
mText(drawableText.atk,63,350)
|
mText(TEXTOBJ.atk,63,350)
|
||||||
end,
|
end,
|
||||||
bg='blackhole',bgm='echo',
|
bg='blackhole',bgm='echo',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ return{
|
|||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
setFont(60)
|
setFont(60)
|
||||||
mStr(P.stat.atk,63,280)
|
mStr(P.stat.atk,63,280)
|
||||||
mText(drawableText.atk,63,350)
|
mText(TEXTOBJ.atk,63,350)
|
||||||
end,
|
end,
|
||||||
bg='tunnel',bgm='echo',
|
bg='tunnel',bgm='echo',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ return{
|
|||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
setFont(60)
|
setFont(60)
|
||||||
mStr(P.stat.atk,63,280)
|
mStr(P.stat.atk,63,280)
|
||||||
mText(drawableText.atk,63,350)
|
mText(TEXTOBJ.atk,63,350)
|
||||||
end,
|
end,
|
||||||
bg='blackhole',bgm='echo',
|
bg='blackhole',bgm='echo',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ return{
|
|||||||
|
|
||||||
--Texts
|
--Texts
|
||||||
gc.setColor(.8,.8,.8)
|
gc.setColor(.8,.8,.8)
|
||||||
mText(drawableText.techrash,63,420)
|
mText(TEXTOBJ.techrash,63,420)
|
||||||
setFont(75)
|
setFont(75)
|
||||||
mStr(P.stat.clears[4],63,340)
|
mStr(P.stat.clears[4],63,340)
|
||||||
end,
|
end,
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ return{
|
|||||||
setFont(45)
|
setFont(45)
|
||||||
mStr(("%.1f"):format(P.stat.atk),63,190)
|
mStr(("%.1f"):format(P.stat.atk),63,190)
|
||||||
mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310)
|
mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310)
|
||||||
mText(drawableText.atk,63,243)
|
mText(TEXTOBJ.atk,63,243)
|
||||||
mText(drawableText.eff,63,363)
|
mText(TEXTOBJ.eff,63,363)
|
||||||
end,
|
end,
|
||||||
bg='blockfall',bgm='infinite',
|
bg='blockfall',bgm='infinite',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -37,9 +37,9 @@ return{
|
|||||||
mStr(P.stat.dig,63,190)
|
mStr(P.stat.dig,63,190)
|
||||||
mStr(P.stat.atk,63,310)
|
mStr(P.stat.atk,63,310)
|
||||||
mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,420)
|
mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,420)
|
||||||
mText(drawableText.line,63,243)
|
mText(TEXTOBJ.line,63,243)
|
||||||
mText(drawableText.atk,63,363)
|
mText(TEXTOBJ.atk,63,363)
|
||||||
mText(drawableText.eff,63,475)
|
mText(TEXTOBJ.eff,63,475)
|
||||||
end,
|
end,
|
||||||
bg='wing',bgm='dream',
|
bg='wing',bgm='dream',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ return{
|
|||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
setFont(60)
|
setFont(60)
|
||||||
mStr(P.stat.pc,63,340)
|
mStr(P.stat.pc,63,340)
|
||||||
mText(drawableText.pc,63,410)
|
mText(TEXTOBJ.pc,63,410)
|
||||||
end,
|
end,
|
||||||
eventSet='checkLine_100',
|
eventSet='checkLine_100',
|
||||||
bg='rgb',bgm='truth',
|
bg='rgb',bgm='truth',
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ return{
|
|||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
setFont(60)
|
setFont(60)
|
||||||
mStr(P.stat.pc,63,340)
|
mStr(P.stat.pc,63,340)
|
||||||
mText(drawableText.pc,63,410)
|
mText(TEXTOBJ.pc,63,410)
|
||||||
end,
|
end,
|
||||||
eventSet='checkLine_100',
|
eventSet='checkLine_100',
|
||||||
bg='rgb',bgm='moonbeam',
|
bg='rgb',bgm='moonbeam',
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ return{
|
|||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
setFont(60)
|
setFont(60)
|
||||||
mStr(P.stat.pc,63,340)
|
mStr(P.stat.pc,63,340)
|
||||||
mText(drawableText.pc,63,410)
|
mText(TEXTOBJ.pc,63,410)
|
||||||
end,
|
end,
|
||||||
eventSet='checkLine_100',
|
eventSet='checkLine_100',
|
||||||
bg='rgb',bgm='truth',
|
bg='rgb',bgm='truth',
|
||||||
|
|||||||
@@ -238,8 +238,8 @@ function NET.uploadSave()
|
|||||||
{section=1,data=STRING.packTable(STAT)},
|
{section=1,data=STRING.packTable(STAT)},
|
||||||
{section=2,data=STRING.packTable(RANKS)},
|
{section=2,data=STRING.packTable(RANKS)},
|
||||||
{section=3,data=STRING.packTable(SETTING)},
|
{section=3,data=STRING.packTable(SETTING)},
|
||||||
{section=4,data=STRING.packTable(keyMap)},
|
{section=4,data=STRING.packTable(KEY_MAP)},
|
||||||
{section=5,data=STRING.packTable(VK_org)},
|
{section=5,data=STRING.packTable(VK_ORG)},
|
||||||
{section=6,data=STRING.packTable(FILE.load('conf/vkSave1'))},
|
{section=6,data=STRING.packTable(FILE.load('conf/vkSave1'))},
|
||||||
{section=7,data=STRING.packTable(FILE.load('conf/vkSave2'))},
|
{section=7,data=STRING.packTable(FILE.load('conf/vkSave2'))},
|
||||||
}..'}}')
|
}..'}}')
|
||||||
@@ -282,11 +282,11 @@ function NET.loadSavedData(sections)
|
|||||||
success=success and saveSettings()
|
success=success and saveSettings()
|
||||||
applySettings()
|
applySettings()
|
||||||
|
|
||||||
TABLE.cover(NET.cloudData.keyMap,keyMap)
|
TABLE.cover(NET.cloudData.keyMap,KEY_MAP)
|
||||||
success=success and FILE.save(keyMap,'conf/key')
|
success=success and FILE.save(KEY_MAP,'conf/key')
|
||||||
|
|
||||||
TABLE.cover(NET.cloudData.VK_org,VK_org)
|
TABLE.cover(NET.cloudData.VK_org,VK_ORG)
|
||||||
success=success and FILE.save(VK_org,'conf/virtualkey')
|
success=success and FILE.save(VK_ORG,'conf/virtualkey')
|
||||||
|
|
||||||
success=success and FILE.save(NET.cloudData.vkSave1,'conf/vkSave1')
|
success=success and FILE.save(NET.cloudData.vkSave1,'conf/vkSave1')
|
||||||
success=success and FILE.save(NET.cloudData.vkSave2,'conf/vkSave2')
|
success=success and FILE.save(NET.cloudData.vkSave2,'conf/vkSave2')
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ local SKIN,TEXTURE,IMG=SKIN,TEXTURE,IMG
|
|||||||
local TEXT,COLOR,GAME,TIME=TEXT,COLOR,GAME,TIME
|
local TEXT,COLOR,GAME,TIME=TEXT,COLOR,GAME,TIME
|
||||||
local shader_alpha,shader_lighter=SHADER.alpha,SHADER.lighter
|
local shader_alpha,shader_lighter=SHADER.alpha,SHADER.lighter
|
||||||
local shader_fieldSatur,shader_blockSatur=SHADER.fieldSatur,SHADER.blockSatur
|
local shader_fieldSatur,shader_blockSatur=SHADER.fieldSatur,SHADER.blockSatur
|
||||||
local drawableText,missionEnum,minoColor=drawableText,missionEnum,minoColor
|
local TEXTOBJ,ENUM_MISSION,BLOCK_COLORS=TEXTOBJ,ENUM_MISSION,BLOCK_COLORS
|
||||||
|
|
||||||
local PLAYERS,PLY_ALIVE=PLAYERS,PLY_ALIVE
|
local PLAYERS,PLY_ALIVE=PLAYERS,PLY_ALIVE
|
||||||
|
|
||||||
@@ -212,7 +212,7 @@ local drawGhost={
|
|||||||
end end
|
end end
|
||||||
end,
|
end,
|
||||||
colorCell=function(CB,curX,ghoY,alpha,_,clr)
|
colorCell=function(CB,curX,ghoY,alpha,_,clr)
|
||||||
clr=minoColor[clr]
|
clr=BLOCK_COLORS[clr]
|
||||||
gc_setColor(clr[1],clr[2],clr[3],alpha)
|
gc_setColor(clr[1],clr[2],clr[3],alpha)
|
||||||
for i=1,#CB do for j=1,#CB[1]do
|
for i=1,#CB do for j=1,#CB[1]do
|
||||||
if CB[i][j]then
|
if CB[i][j]then
|
||||||
@@ -229,7 +229,7 @@ local drawGhost={
|
|||||||
end end
|
end end
|
||||||
end,
|
end,
|
||||||
colorLine=function(CB,curX,ghoY,alpha,_,clr)
|
colorLine=function(CB,curX,ghoY,alpha,_,clr)
|
||||||
clr=minoColor[clr]
|
clr=BLOCK_COLORS[clr]
|
||||||
gc_setColor(clr[1],clr[2],clr[3],alpha)
|
gc_setColor(clr[1],clr[2],clr[3],alpha)
|
||||||
gc_setLineWidth(4)
|
gc_setLineWidth(4)
|
||||||
for i=1,#CB do for j=1,#CB[1]do
|
for i=1,#CB do for j=1,#CB[1]do
|
||||||
@@ -462,7 +462,7 @@ local function _drawNext(P,repMode)
|
|||||||
local n=N
|
local n=N
|
||||||
while n<=10 and queue[n]do
|
while n<=10 and queue[n]do
|
||||||
local id=queue[n].id
|
local id=queue[n].id
|
||||||
local _=minoColor[queue[n].color]
|
local _=BLOCK_COLORS[queue[n].color]
|
||||||
gc_setColor(_[1],_[2],_[3],.26)
|
gc_setColor(_[1],_[2],_[3],.26)
|
||||||
_=blockImg[id]
|
_=blockImg[id]
|
||||||
gc_draw(_,-_:getWidth()*10,0,nil,10,nil)
|
gc_draw(_,-_:getWidth()*10,0,nil,10,nil)
|
||||||
@@ -546,14 +546,14 @@ local function _drawMission(curMission,L,missionkill)
|
|||||||
else
|
else
|
||||||
gc_setColor(.97,.97,.97)
|
gc_setColor(.97,.97,.97)
|
||||||
end
|
end
|
||||||
gc_print(missionEnum[L[curMission]],85,110)
|
gc_print(ENUM_MISSION[L[curMission]],85,110)
|
||||||
|
|
||||||
--Draw next mission
|
--Draw next mission
|
||||||
setFont(20)
|
setFont(20)
|
||||||
for i=1,3 do
|
for i=1,3 do
|
||||||
local m=L[curMission+i]
|
local m=L[curMission+i]
|
||||||
if m then
|
if m then
|
||||||
m=missionEnum[m]
|
m=ENUM_MISSION[m]
|
||||||
gc_print(m,87-28*i,117)
|
gc_print(m,87-28*i,117)
|
||||||
else
|
else
|
||||||
break
|
break
|
||||||
@@ -609,7 +609,7 @@ function draw.drawRoyaleInfo(P)
|
|||||||
setFont(35)
|
setFont(35)
|
||||||
mStr(#PLY_ALIVE.."/"..#PLAYERS,63,175)
|
mStr(#PLY_ALIVE.."/"..#PLAYERS,63,175)
|
||||||
mStr(P.modeData.ko,80,215)
|
mStr(P.modeData.ko,80,215)
|
||||||
gc_draw(drawableText.ko,60-drawableText.ko:getWidth(),222)
|
gc_draw(TEXTOBJ.ko,60-TEXTOBJ.ko:getWidth(),222)
|
||||||
setFont(20)
|
setFont(20)
|
||||||
gc_setColor(1,.5,0,.6)
|
gc_setColor(1,.5,0,.6)
|
||||||
gc_print(P.badge,103,227)
|
gc_print(P.badge,103,227)
|
||||||
@@ -878,7 +878,7 @@ function draw.small(P)
|
|||||||
--Draw result
|
--Draw result
|
||||||
if P.result then
|
if P.result then
|
||||||
gc_setColor(1,1,1,min(P.endCounter,60)*.01)
|
gc_setColor(1,1,1,min(P.endCounter,60)*.01)
|
||||||
setFont(20)mDraw(drawableText[P.result],30,60,nil,P.size)
|
setFont(20)mDraw(TEXTOBJ[P.result],30,60,nil,P.size)
|
||||||
setFont(15)mStr(P.modeData.place,30,82)
|
setFont(15)mStr(P.modeData.place,30,82)
|
||||||
end
|
end
|
||||||
gc_pop()
|
gc_pop()
|
||||||
@@ -933,7 +933,7 @@ function draw.demo(P)
|
|||||||
local N=1
|
local N=1
|
||||||
while P.holdQueue[N]do
|
while P.holdQueue[N]do
|
||||||
local id=P.holdQueue[N].id
|
local id=P.holdQueue[N].id
|
||||||
local _=minoColor[skinSet[id]]
|
local _=BLOCK_COLORS[skinSet[id]]
|
||||||
gc_setColor(_[1],_[2],_[3],.3)
|
gc_setColor(_[1],_[2],_[3],.3)
|
||||||
_=blockImg[id]
|
_=blockImg[id]
|
||||||
gc_draw(_,15,40*N-10,nil,16,nil,0,_:getHeight()*.5)
|
gc_draw(_,15,40*N-10,nil,16,nil,0,_:getHeight()*.5)
|
||||||
@@ -944,7 +944,7 @@ function draw.demo(P)
|
|||||||
N=1
|
N=1
|
||||||
while N<=ENV.nextCount and P.nextQueue[N]do
|
while N<=ENV.nextCount and P.nextQueue[N]do
|
||||||
local id=P.nextQueue[N].id
|
local id=P.nextQueue[N].id
|
||||||
local _=minoColor[skinSet[id]]
|
local _=BLOCK_COLORS[skinSet[id]]
|
||||||
gc_setColor(_[1],_[2],_[3],.3)
|
gc_setColor(_[1],_[2],_[3],.3)
|
||||||
_=blockImg[id]
|
_=blockImg[id]
|
||||||
gc_draw(_,285,40*N-10,nil,16,nil,_:getWidth(),_:getHeight()*.5)
|
gc_draw(_,285,40*N-10,nil,16,nil,_:getWidth(),_:getHeight()*.5)
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ function Player:createBeam(R,send)
|
|||||||
else x2,y2=R.x+308*R.size,R.y+450*R.size
|
else x2,y2=R.x+308*R.size,R.y+450*R.size
|
||||||
end
|
end
|
||||||
|
|
||||||
local c=minoColor[color]
|
local c=BLOCK_COLORS[color]
|
||||||
local r,g,b=c[1]*2,c[2]*2,c[3]*2
|
local r,g,b=c[1]*2,c[2]*2,c[3]*2
|
||||||
|
|
||||||
local a=GAME.modeEnv.royaleMode and not(self.type=='human'or R.type=='human')and .2 or 1
|
local a=GAME.modeEnv.royaleMode and not(self.type=='human'or R.type=='human')and .2 or 1
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ local sList={
|
|||||||
lock={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99},
|
lock={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99},
|
||||||
wait={0,1,2,3,4,5,6,7,8,10,15,20,30,60},
|
wait={0,1,2,3,4,5,6,7,8,10,15,20,30,60},
|
||||||
fall={0,1,2,3,4,5,6,7,8,10,15,20,30,60},
|
fall={0,1,2,3,4,5,6,7,8,10,15,20,30,60},
|
||||||
eventSet=eventSetList,
|
eventSet=EVENTSETS,
|
||||||
holdMode={'hold','swap'},
|
holdMode={'hold','swap'},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -342,7 +342,7 @@ function scene.draw()
|
|||||||
gc.draw(cross,30*penPath[i][1]-30+math.random(-1,1),600-30*penPath[i][2]+math.random(-1,1))
|
gc.draw(cross,30*penPath[i][1]-30+math.random(-1,1),600-30*penPath[i][2]+math.random(-1,1))
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local c=minoColor[pens[curPen]]
|
local c=BLOCK_COLORS[pens[curPen]]
|
||||||
gc.setColor(c[1],c[2],c[3],.7+.2*math.sin(TIME()*12.6))
|
gc.setColor(c[1],c[2],c[3],.7+.2*math.sin(TIME()*12.6))
|
||||||
for i=1,#penPath do
|
for i=1,#penPath do
|
||||||
gc.rectangle('line',30*penPath[i][1]-30+2,600-30*penPath[i][2]+2,30-4,30-4,3)
|
gc.rectangle('line',30*penPath[i][1]-30+2,600-30*penPath[i][2]+2,30-4,30-4,3)
|
||||||
@@ -375,7 +375,7 @@ function scene.draw()
|
|||||||
|
|
||||||
--Left button
|
--Left button
|
||||||
if pens[1]>0 then
|
if pens[1]>0 then
|
||||||
gc.setColor(minoColor[pens[1]])
|
gc.setColor(BLOCK_COLORS[pens[1]])
|
||||||
gc.rectangle('fill',5,5,23,30,3)
|
gc.rectangle('fill',5,5,23,30,3)
|
||||||
elseif pens[1]==-1 then
|
elseif pens[1]==-1 then
|
||||||
gc.setColor(COLOR.Z)
|
gc.setColor(COLOR.Z)
|
||||||
@@ -396,7 +396,7 @@ function scene.draw()
|
|||||||
|
|
||||||
--Right button
|
--Right button
|
||||||
if pens[2]>0 then
|
if pens[2]>0 then
|
||||||
gc.setColor(minoColor[pens[2]])
|
gc.setColor(BLOCK_COLORS[pens[2]])
|
||||||
gc.rectangle('fill',52,5,23,30,3)
|
gc.rectangle('fill',52,5,23,30,3)
|
||||||
elseif pens[2]==-1 then
|
elseif pens[2]==-1 then
|
||||||
gc.setColor(COLOR.Z)
|
gc.setColor(COLOR.Z)
|
||||||
@@ -418,7 +418,7 @@ function scene.draw()
|
|||||||
|
|
||||||
--Middle button
|
--Middle button
|
||||||
if pens[3]>0 then
|
if pens[3]>0 then
|
||||||
gc.setColor(minoColor[pens[3]])
|
gc.setColor(BLOCK_COLORS[pens[3]])
|
||||||
gc.rectangle('fill',35,2,10,21,3)
|
gc.rectangle('fill',35,2,10,21,3)
|
||||||
elseif pens[3]==-1 then
|
elseif pens[3]==-1 then
|
||||||
gc.setColor(COLOR.Z)
|
gc.setColor(COLOR.Z)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ function scene.sceneBack()
|
|||||||
FILE.save(DATA.copyMission(),'conf/customMissions')
|
FILE.save(DATA.copyMission(),'conf/customMissions')
|
||||||
end
|
end
|
||||||
|
|
||||||
local missionEnum=missionEnum
|
local ENUM_MISSION=ENUM_MISSION
|
||||||
local legalInput={Z=true,S=true,J=true,L=true,T=true,O=true,I=true,A=true,_=true,P=true}
|
local legalInput={Z=true,S=true,J=true,L=true,T=true,O=true,I=true,A=true,_=true,P=true}
|
||||||
function scene.keyDown(key)
|
function scene.keyDown(key)
|
||||||
if key=="left"then
|
if key=="left"then
|
||||||
@@ -106,9 +106,9 @@ function scene.keyDown(key)
|
|||||||
end
|
end
|
||||||
|
|
||||||
input=input..key
|
input=input..key
|
||||||
if missionEnum[input]then
|
if ENUM_MISSION[input]then
|
||||||
cur=cur+1
|
cur=cur+1
|
||||||
ins(MISSION,cur,missionEnum[input])
|
ins(MISSION,cur,ENUM_MISSION[input])
|
||||||
SFX.play('lock')
|
SFX.play('lock')
|
||||||
input=""
|
input=""
|
||||||
elseif #input>1 or not legalInput[input]then
|
elseif #input>1 or not legalInput[input]then
|
||||||
@@ -135,7 +135,7 @@ function scene.draw()
|
|||||||
gc.print(input,1200,275)
|
gc.print(input,1200,275)
|
||||||
|
|
||||||
--Draw targets
|
--Draw targets
|
||||||
local libColor=minoColor
|
local libColor=BLOCK_COLORS
|
||||||
local set=SETTING.skin
|
local set=SETTING.skin
|
||||||
local L=MISSION
|
local L=MISSION
|
||||||
local x,y=100,136--Next block pos
|
local x,y=100,136--Next block pos
|
||||||
@@ -171,7 +171,7 @@ function scene.draw()
|
|||||||
else
|
else
|
||||||
gc.setColor(COLOR.H)
|
gc.setColor(COLOR.H)
|
||||||
end
|
end
|
||||||
gc.print(missionEnum[L[i]],x,y-25)
|
gc.print(ENUM_MISSION[L[i]],x,y-25)
|
||||||
x=x+56
|
x=x+56
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ function scene.update(dt)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local blockCharWidth={}for i=1,#BLOCKCHARS do blockCharWidth[i]=gc.newText(FONT.get(60),BLOCKCHARS[i]):getWidth()end
|
local blockCharWidth={}for i=1,#BLOCK_CHARS do blockCharWidth[i]=gc.newText(FONT.get(60),BLOCK_CHARS[i]):getWidth()end
|
||||||
function scene.draw()
|
function scene.draw()
|
||||||
--Draw frame
|
--Draw frame
|
||||||
gc_setColor(COLOR.Z)
|
gc_setColor(COLOR.Z)
|
||||||
@@ -133,7 +133,7 @@ function scene.draw()
|
|||||||
gc.rectangle('line',100,110,1080,260,5)
|
gc.rectangle('line',100,110,1080,260,5)
|
||||||
|
|
||||||
--Draw sequence
|
--Draw sequence
|
||||||
local minoColor=minoColor
|
local BLOCK_COLORS=BLOCK_COLORS
|
||||||
local skinSetting=SETTING.skin
|
local skinSetting=SETTING.skin
|
||||||
local BAG=BAG
|
local BAG=BAG
|
||||||
local x,y=120,136--Next block pos
|
local x,y=120,136--Next block pos
|
||||||
@@ -160,8 +160,8 @@ function scene.draw()
|
|||||||
end
|
end
|
||||||
if i<=j then
|
if i<=j then
|
||||||
setFont(60)
|
setFont(60)
|
||||||
gc_setColor(minoColor[skinSetting[BAG[i]]])
|
gc_setColor(BLOCK_COLORS[skinSetting[BAG[i]]])
|
||||||
gc_print(BLOCKCHARS[BAG[i]],x,y-40)
|
gc_print(BLOCK_CHARS[BAG[i]],x,y-40)
|
||||||
x=x+blockCharWidth[BAG[i]]
|
x=x+blockCharWidth[BAG[i]]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ local function _updateMenuButtons()
|
|||||||
if GAME.replaying or pos=='right'then
|
if GAME.replaying or pos=='right'then
|
||||||
WIDGET.active.restart.x=1125
|
WIDGET.active.restart.x=1125
|
||||||
WIDGET.active.pause.x=1195
|
WIDGET.active.pause.x=1195
|
||||||
modeTextPos=1100-drawableText.modeName:getWidth()
|
modeTextPos=1100-TEXTOBJ.modeName:getWidth()
|
||||||
elseif pos=='middle'then
|
elseif pos=='middle'then
|
||||||
WIDGET.active.restart.x=360
|
WIDGET.active.restart.x=360
|
||||||
WIDGET.active.pause.x=860
|
WIDGET.active.pause.x=860
|
||||||
@@ -34,7 +34,7 @@ local function _updateMenuButtons()
|
|||||||
elseif pos=='left'then
|
elseif pos=='left'then
|
||||||
WIDGET.active.restart.x=120
|
WIDGET.active.restart.x=120
|
||||||
WIDGET.active.pause.x=190
|
WIDGET.active.pause.x=190
|
||||||
modeTextPos=1200-drawableText.modeName:getWidth()
|
modeTextPos=1200-TEXTOBJ.modeName:getWidth()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local function _updateRepButtons()
|
local function _updateRepButtons()
|
||||||
@@ -116,7 +116,7 @@ local function _restart()
|
|||||||
_updateRepButtons()
|
_updateRepButtons()
|
||||||
end
|
end
|
||||||
local function _checkGameKeyDown(key)
|
local function _checkGameKeyDown(key)
|
||||||
local k=keyMap.keyboard[key]
|
local k=KEY_MAP.keyboard[key]
|
||||||
if k then
|
if k then
|
||||||
if k>0 then
|
if k>0 then
|
||||||
if noKey then return end
|
if noKey then return end
|
||||||
@@ -247,7 +247,7 @@ function scene.keyDown(key,isRep)
|
|||||||
end
|
end
|
||||||
function scene.keyUp(key)
|
function scene.keyUp(key)
|
||||||
if noKey then return end
|
if noKey then return end
|
||||||
local k=keyMap.keyboard[key]
|
local k=KEY_MAP.keyboard[key]
|
||||||
if k then
|
if k then
|
||||||
if k>0 then
|
if k>0 then
|
||||||
PLAYERS[1]:releaseKey(k)
|
PLAYERS[1]:releaseKey(k)
|
||||||
@@ -257,7 +257,7 @@ function scene.keyUp(key)
|
|||||||
end
|
end
|
||||||
function scene.gamepadDown(key)
|
function scene.gamepadDown(key)
|
||||||
if noKey then return end
|
if noKey then return end
|
||||||
local k=keyMap.joystick[key]
|
local k=KEY_MAP.joystick[key]
|
||||||
if k then
|
if k then
|
||||||
if k>0 then
|
if k>0 then
|
||||||
PLAYERS[1]:pressKey(k)
|
PLAYERS[1]:pressKey(k)
|
||||||
@@ -271,7 +271,7 @@ function scene.gamepadDown(key)
|
|||||||
end
|
end
|
||||||
function scene.gamepadUp(key)
|
function scene.gamepadUp(key)
|
||||||
if noKey then return end
|
if noKey then return end
|
||||||
local k=keyMap.joystick[key]
|
local k=KEY_MAP.joystick[key]
|
||||||
if k then
|
if k then
|
||||||
if k>0 then
|
if k>0 then
|
||||||
PLAYERS[1]:releaseKey(k)
|
PLAYERS[1]:releaseKey(k)
|
||||||
@@ -357,7 +357,7 @@ function scene.draw()
|
|||||||
|
|
||||||
--Mode info
|
--Mode info
|
||||||
gc_setColor(1,1,1,.82)
|
gc_setColor(1,1,1,.82)
|
||||||
gc_draw(drawableText.modeName,modeTextPos,10)
|
gc_draw(TEXTOBJ.modeName,modeTextPos,10)
|
||||||
local M=GAME.curMode
|
local M=GAME.curMode
|
||||||
if M then
|
if M then
|
||||||
if M.score and M.records[1]then
|
if M.score and M.records[1]then
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ function scene.draw()
|
|||||||
else
|
else
|
||||||
gc.setLineWidth(4)
|
gc.setLineWidth(4)
|
||||||
end
|
end
|
||||||
local L=title
|
local L=SVG_TITLE
|
||||||
gc.push('transform')
|
gc.push('transform')
|
||||||
gc.translate(126,100)
|
gc.translate(126,100)
|
||||||
for i=1,8 do
|
for i=1,8 do
|
||||||
|
|||||||
@@ -209,7 +209,6 @@ local baseRankColor={
|
|||||||
{.85,.5,.4,.3},
|
{.85,.5,.4,.3},
|
||||||
{.85,.3,.8,.3},
|
{.85,.3,.8,.3},
|
||||||
}
|
}
|
||||||
local rankColor=rankColor
|
|
||||||
local function _drawModeShape(M,S,drawType)
|
local function _drawModeShape(M,S,drawType)
|
||||||
if M.shape==1 then--Rectangle
|
if M.shape==1 then--Rectangle
|
||||||
gc_rectangle(drawType,M.x-S,M.y-S,2*S,2*S)
|
gc_rectangle(drawType,M.x-S,M.y-S,2*S,2*S)
|
||||||
@@ -269,11 +268,11 @@ function scene.draw()
|
|||||||
|
|
||||||
--Rank
|
--Rank
|
||||||
if unlocked==1 then
|
if unlocked==1 then
|
||||||
name=RANKCHARS[rank]
|
name=RANK_CHARS[rank]
|
||||||
if name then
|
if name then
|
||||||
gc_setColor(0,0,0,.8)
|
gc_setColor(0,0,0,.8)
|
||||||
mStr(name,M.x+M.size*.7,M.y-50-M.size*.7)
|
mStr(name,M.x+M.size*.7,M.y-50-M.size*.7)
|
||||||
gc_setColor(rankColor[rank])
|
gc_setColor(RANK_COLORS[rank])
|
||||||
mStr(name,M.x+M.size*.7+4,M.y-50-M.size*.7-4)
|
mStr(name,M.x+M.size*.7+4,M.y-50-M.size*.7-4)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -295,13 +294,13 @@ function scene.draw()
|
|||||||
gc_draw(IMG.ctrlSpeedLimit,1230,50,nil,.4)
|
gc_draw(IMG.ctrlSpeedLimit,1230,50,nil,.4)
|
||||||
end
|
end
|
||||||
if M.score then
|
if M.score then
|
||||||
mText(drawableText.highScore,1100,240)
|
mText(TEXTOBJ.highScore,1100,240)
|
||||||
gc_setColor(.3,.3,.3,.7)
|
gc_setColor(.3,.3,.3,.7)
|
||||||
gc_rectangle('fill',940,290,320,280,5)--Highscore board
|
gc_rectangle('fill',940,290,320,280,5)--Highscore board
|
||||||
local L=M.records
|
local L=M.records
|
||||||
gc_setColor(1,1,1)
|
gc_setColor(1,1,1)
|
||||||
if visibleModes[sel]==2 then
|
if visibleModes[sel]==2 then
|
||||||
mText(drawableText.modeLocked,1100,370)
|
mText(TEXTOBJ.modeLocked,1100,370)
|
||||||
elseif L[1]then
|
elseif L[1]then
|
||||||
for i=1,#L do
|
for i=1,#L do
|
||||||
local t=M.scoreDisp(L[i])
|
local t=M.scoreDisp(L[i])
|
||||||
@@ -315,7 +314,7 @@ function scene.draw()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
mText(drawableText.noScore,1100,370)
|
mText(TEXTOBJ.noScore,1100,370)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ function scene.keyDown(key,isRep)
|
|||||||
inputBox:keypress(key)
|
inputBox:keypress(key)
|
||||||
elseif playing then
|
elseif playing then
|
||||||
if noKey or isRep then return end
|
if noKey or isRep then return end
|
||||||
local k=keyMap.keyboard[key]
|
local k=KEY_MAP.keyboard[key]
|
||||||
if k and k>0 then
|
if k and k>0 then
|
||||||
PLAYERS[1]:pressKey(k)
|
PLAYERS[1]:pressKey(k)
|
||||||
VK.press(k)
|
VK.press(k)
|
||||||
@@ -170,7 +170,7 @@ function scene.keyDown(key,isRep)
|
|||||||
end
|
end
|
||||||
function scene.keyUp(key)
|
function scene.keyUp(key)
|
||||||
if not playing or noKey then return end
|
if not playing or noKey then return end
|
||||||
local k=keyMap.keyboard[key]
|
local k=KEY_MAP.keyboard[key]
|
||||||
if k and k>0 then
|
if k and k>0 then
|
||||||
PLAYERS[1]:releaseKey(k)
|
PLAYERS[1]:releaseKey(k)
|
||||||
VK.release(k)
|
VK.release(k)
|
||||||
@@ -181,7 +181,7 @@ function scene.gamepadDown(key)
|
|||||||
scene.keyDown("escape")
|
scene.keyDown("escape")
|
||||||
else
|
else
|
||||||
if not playing then return end
|
if not playing then return end
|
||||||
local k=keyMap.joystick[key]
|
local k=KEY_MAP.joystick[key]
|
||||||
if k and k>0 then
|
if k and k>0 then
|
||||||
PLAYERS[1]:pressKey(k)
|
PLAYERS[1]:pressKey(k)
|
||||||
VK.press(k)
|
VK.press(k)
|
||||||
@@ -190,7 +190,7 @@ function scene.gamepadDown(key)
|
|||||||
end
|
end
|
||||||
function scene.gamepadUp(key)
|
function scene.gamepadUp(key)
|
||||||
if not playing then return end
|
if not playing then return end
|
||||||
local k=keyMap.joystick[key]
|
local k=KEY_MAP.joystick[key]
|
||||||
if k and k>0 then
|
if k and k>0 then
|
||||||
PLAYERS[1]:releaseKey(k)
|
PLAYERS[1]:releaseKey(k)
|
||||||
VK.release(k)
|
VK.release(k)
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ local sList={
|
|||||||
lock={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99},
|
lock={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99},
|
||||||
wait={0,1,2,3,4,5,6,7,8,10,15,20,30,60},
|
wait={0,1,2,3,4,5,6,7,8,10,15,20,30,60},
|
||||||
fall={0,1,2,3,4,5,6,7,8,10,15,20,30,60},
|
fall={0,1,2,3,4,5,6,7,8,10,15,20,30,60},
|
||||||
eventSet=eventSetList,
|
eventSet=EVENTSETS,
|
||||||
}
|
}
|
||||||
|
|
||||||
local scene={}
|
local scene={}
|
||||||
|
|||||||
@@ -208,21 +208,21 @@ function scene.draw()
|
|||||||
gc.setColor(.97,.97,.97,timer1)
|
gc.setColor(.97,.97,.97,timer1)
|
||||||
|
|
||||||
--Result Text
|
--Result Text
|
||||||
mDraw(GAME.result and drawableText[GAME.result]or drawableText.pause,640,70-10*(5-timer1*5)^1.5)
|
mDraw(GAME.result and TEXTOBJ[GAME.result]or TEXTOBJ.pause,640,70-10*(5-timer1*5)^1.5)
|
||||||
|
|
||||||
--Mode Info (outside)
|
--Mode Info (outside)
|
||||||
gc.draw(drawableText.modeName,745-drawableText.modeName:getWidth(),143)
|
gc.draw(TEXTOBJ.modeName,745-TEXTOBJ.modeName:getWidth(),143)
|
||||||
|
|
||||||
--Level rank
|
--Level rank
|
||||||
if RANKCHARS[GAME.rank]then
|
if RANK_CHARS[GAME.rank]then
|
||||||
gc.push('transform')
|
gc.push('transform')
|
||||||
gc.translate(1050,5)
|
gc.translate(1050,5)
|
||||||
setFont(80)
|
setFont(80)
|
||||||
gc.setColor(0,0,0,timer1*.7)
|
gc.setColor(0,0,0,timer1*.7)
|
||||||
gc.print(RANKCHARS[GAME.rank],-5,-4,nil,1.5)
|
gc.print(RANK_CHARS[GAME.rank],-5,-4,nil,1.5)
|
||||||
local L=rankColor[GAME.rank]
|
local L=RANK_COLORS[GAME.rank]
|
||||||
gc.setColor(L[1],L[2],L[3],timer1)
|
gc.setColor(L[1],L[2],L[3],timer1)
|
||||||
gc.print(RANKCHARS[GAME.rank],0,0,nil,1.5)
|
gc.print(RANK_CHARS[GAME.rank],0,0,nil,1.5)
|
||||||
gc.pop()
|
gc.pop()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ scene.widgetList={
|
|||||||
WIDGET.newButton{name="unlock", x=190,y=170,w=280,h=100,color='lY',code=function()_dumpCB(RANKS)end},
|
WIDGET.newButton{name="unlock", x=190,y=170,w=280,h=100,color='lY',code=function()_dumpCB(RANKS)end},
|
||||||
WIDGET.newButton{name="data", x=490,y=170,w=280,h=100,color='lY',code=function()_dumpCB(STAT)end},
|
WIDGET.newButton{name="data", x=490,y=170,w=280,h=100,color='lY',code=function()_dumpCB(STAT)end},
|
||||||
WIDGET.newButton{name="setting", x=790,y=170,w=280,h=100,color='lY',code=function()_dumpCB(SETTING)end},
|
WIDGET.newButton{name="setting", x=790,y=170,w=280,h=100,color='lY',code=function()_dumpCB(SETTING)end},
|
||||||
WIDGET.newButton{name="vk", x=1090,y=170,w=280,h=100,color='lY',code=function()_dumpCB(VK_org)end},
|
WIDGET.newButton{name="vk", x=1090,y=170,w=280,h=100,color='lY',code=function()_dumpCB(VK_ORG)end},
|
||||||
|
|
||||||
WIDGET.newText{name="import", x=55,y=265,color='lR',align='L',font=50},
|
WIDGET.newText{name="import", x=55,y=265,color='lR',align='L',font=50},
|
||||||
WIDGET.newButton{name="unlock", x=190,y=390,w=280,h=100,color='lR',
|
WIDGET.newButton{name="unlock", x=190,y=390,w=280,h=100,color='lR',
|
||||||
@@ -31,7 +31,7 @@ scene.widgetList={
|
|||||||
local D=_parseCB()
|
local D=_parseCB()
|
||||||
if D then
|
if D then
|
||||||
TABLE.cover(D,RANKS)
|
TABLE.cover(D,RANKS)
|
||||||
for k,v in next,oldModeNameTable do
|
for k,v in next,MODE_UPDATE_MAP do
|
||||||
if RANKS[k]then
|
if RANKS[k]then
|
||||||
RANKS[v]=RANKS[k]
|
RANKS[v]=RANKS[k]
|
||||||
RANKS[k]=nil
|
RANKS[k]=nil
|
||||||
@@ -70,8 +70,8 @@ scene.widgetList={
|
|||||||
code=function()
|
code=function()
|
||||||
local D=_parseCB()
|
local D=_parseCB()
|
||||||
if D then
|
if D then
|
||||||
TABLE.update(D,VK_org)
|
TABLE.update(D,VK_ORG)
|
||||||
FILE.save(VK_org,'conf/virtualkey')
|
FILE.save(VK_ORG,'conf/virtualkey')
|
||||||
MES.new('check',text.importSuccess)
|
MES.new('check',text.importSuccess)
|
||||||
else
|
else
|
||||||
MES.new('error',text.dataCorrupted)
|
MES.new('error',text.dataCorrupted)
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ local keyList
|
|||||||
|
|
||||||
local function _freshKeyList()
|
local function _freshKeyList()
|
||||||
keyList={}for i=0,20 do keyList[i]={}end
|
keyList={}for i=0,20 do keyList[i]={}end
|
||||||
for k,v in next,keyMap.keyboard do
|
for k,v in next,KEY_MAP.keyboard do
|
||||||
ins(keyList[v],{COLOR.lB,k})
|
ins(keyList[v],{COLOR.lB,k})
|
||||||
end
|
end
|
||||||
for k,v in next,keyMap.joystick do
|
for k,v in next,KEY_MAP.joystick do
|
||||||
ins(keyList[v],{COLOR.lR,k})
|
ins(keyList[v],{COLOR.lR,k})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -23,7 +23,7 @@ function scene.sceneInit()
|
|||||||
BG.set('none')
|
BG.set('none')
|
||||||
end
|
end
|
||||||
function scene.sceneBack()
|
function scene.sceneBack()
|
||||||
FILE.save(keyMap,'conf/key')
|
FILE.save(KEY_MAP,'conf/key')
|
||||||
end
|
end
|
||||||
|
|
||||||
local forbbidenKeys={
|
local forbbidenKeys={
|
||||||
@@ -40,9 +40,9 @@ function scene.keyDown(key,isRep)
|
|||||||
end
|
end
|
||||||
elseif key=="backspace"then
|
elseif key=="backspace"then
|
||||||
if selected then
|
if selected then
|
||||||
for k,v in next,keyMap.keyboard do
|
for k,v in next,KEY_MAP.keyboard do
|
||||||
if v==selected then
|
if v==selected then
|
||||||
keyMap.keyboard[k]=nil
|
KEY_MAP.keyboard[k]=nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
_freshKeyList()
|
_freshKeyList()
|
||||||
@@ -51,7 +51,7 @@ function scene.keyDown(key,isRep)
|
|||||||
end
|
end
|
||||||
elseif selected then
|
elseif selected then
|
||||||
if not forbbidenKeys[key]then
|
if not forbbidenKeys[key]then
|
||||||
keyMap.keyboard[key]=selected
|
KEY_MAP.keyboard[key]=selected
|
||||||
_freshKeyList()
|
_freshKeyList()
|
||||||
selected=false
|
selected=false
|
||||||
SFX.play('reach',.5)
|
SFX.play('reach',.5)
|
||||||
@@ -63,9 +63,9 @@ end
|
|||||||
function scene.gamepadDown(key)
|
function scene.gamepadDown(key)
|
||||||
if key=="back"then
|
if key=="back"then
|
||||||
if selected then
|
if selected then
|
||||||
for k,v in next,keyMap.joystick do
|
for k,v in next,KEY_MAP.joystick do
|
||||||
if v==selected then
|
if v==selected then
|
||||||
keyMap.joystick[k]=nil
|
KEY_MAP.joystick[k]=nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
_freshKeyList()
|
_freshKeyList()
|
||||||
@@ -75,7 +75,7 @@ function scene.gamepadDown(key)
|
|||||||
SCN.back()
|
SCN.back()
|
||||||
end
|
end
|
||||||
elseif selected then
|
elseif selected then
|
||||||
keyMap.joystick[key]=selected
|
KEY_MAP.joystick[key]=selected
|
||||||
_freshKeyList()
|
_freshKeyList()
|
||||||
selected=false
|
selected=false
|
||||||
SFX.play('reach',.5)
|
SFX.play('reach',.5)
|
||||||
|
|||||||
@@ -91,9 +91,9 @@ scene.widgetList={
|
|||||||
WIDGET.newSwitch{name="autoMute", x=1150,y=180,lim=380,disp=SETval('autoMute'),code=SETrev('autoMute')},
|
WIDGET.newSwitch{name="autoMute", x=1150,y=180,lim=380,disp=SETval('autoMute'),code=SETrev('autoMute')},
|
||||||
WIDGET.newSwitch{name="fine", x=1150,y=250,lim=380,disp=SETval('fine'),code=function()SETTING.fine=not SETTING.fine if SETTING.fine then SFX.play('finesseError',.6)end end},
|
WIDGET.newSwitch{name="fine", x=1150,y=250,lim=380,disp=SETval('fine'),code=function()SETTING.fine=not SETTING.fine if SETTING.fine then SFX.play('finesseError',.6)end end},
|
||||||
|
|
||||||
WIDGET.newSelector{name="sfxPack",x=1100,y=330,w=200,color='lV',list={'chiptune'},disp=function()return sfxPack end,code=function(i)sfxPack=i end},
|
WIDGET.newSelector{name="sfxPack",x=1100,y=330,w=200,color='lV',list=SFXPACKS,disp=function()return sfxPack end,code=function(i)sfxPack=i end},
|
||||||
WIDGET.newButton{name="apply", x=1100,y=400,w=180,h=60,code=function()SETTING.sfxPack=sfxPack SFX.load('media/effect/'..sfxPack..'/')end,hideF=function()return SETTING.sfxPack==sfxPack end},
|
WIDGET.newButton{name="apply", x=1100,y=400,w=180,h=60,code=function()SETTING.sfxPack=sfxPack SFX.load('media/effect/'..sfxPack..'/')end,hideF=function()return SETTING.sfxPack==sfxPack end},
|
||||||
WIDGET.newSelector{name="vocPack",x=1100,y=470,w=200,color='lV',list={'miya','mono','xiaoya','miku'},disp=function()return vocPack end,code=function(i)vocPack=i end},
|
WIDGET.newSelector{name="vocPack",x=1100,y=470,w=200,color='lV',list=VOCPACKS,disp=function()return vocPack end,code=function(i)vocPack=i end},
|
||||||
WIDGET.newButton{name="apply", x=1100,y=540,w=180,h=60,code=function()SETTING.vocPack=vocPack VOC.load('media/vocal/'..vocPack..'/')end,hideF=function()return SETTING.vocPack==vocPack end},
|
WIDGET.newButton{name="apply", x=1100,y=540,w=180,h=60,code=function()SETTING.vocPack=vocPack VOC.load('media/vocal/'..vocPack..'/')end,hideF=function()return SETTING.vocPack==vocPack end},
|
||||||
WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,font=60,fText=CHAR.icon.back,code=backScene},
|
WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,font=60,fText=CHAR.icon.back,code=backScene},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
local gc,ms=love.graphics,love.mouse
|
local gc,ms=love.graphics,love.mouse
|
||||||
local int,sin=math.floor,math.sin
|
local int,sin=math.floor,math.sin
|
||||||
local VK_org=VK_org
|
local VK_ORG=VK_ORG
|
||||||
|
|
||||||
local scene={}
|
local scene={}
|
||||||
|
|
||||||
@@ -9,23 +9,23 @@ local snapUnit=1
|
|||||||
local selected--Button selected
|
local selected--Button selected
|
||||||
|
|
||||||
local function _save1()
|
local function _save1()
|
||||||
FILE.save(VK_org,'conf/vkSave1')
|
FILE.save(VK_ORG,'conf/vkSave1')
|
||||||
end
|
end
|
||||||
local function _load1()
|
local function _load1()
|
||||||
local D=FILE.load('conf/vkSave1')
|
local D=FILE.load('conf/vkSave1')
|
||||||
if D then
|
if D then
|
||||||
TABLE.update(D,VK_org)
|
TABLE.update(D,VK_ORG)
|
||||||
else
|
else
|
||||||
MES.new('error',text.noFile)
|
MES.new('error',text.noFile)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local function _save2()
|
local function _save2()
|
||||||
FILE.save(VK_org,'conf/vkSave2')
|
FILE.save(VK_ORG,'conf/vkSave2')
|
||||||
end
|
end
|
||||||
local function _load2()
|
local function _load2()
|
||||||
local D=FILE.load('conf/vkSave2')
|
local D=FILE.load('conf/vkSave2')
|
||||||
if D then
|
if D then
|
||||||
TABLE.update(D,VK_org)
|
TABLE.update(D,VK_ORG)
|
||||||
else
|
else
|
||||||
MES.new('error',text.noFile)
|
MES.new('error',text.noFile)
|
||||||
end
|
end
|
||||||
@@ -37,13 +37,13 @@ function scene.sceneInit()
|
|||||||
selected=false
|
selected=false
|
||||||
end
|
end
|
||||||
function scene.sceneBack()
|
function scene.sceneBack()
|
||||||
FILE.save(VK_org,'conf/virtualkey')
|
FILE.save(VK_ORG,'conf/virtualkey')
|
||||||
end
|
end
|
||||||
|
|
||||||
local function _onVK_org(x,y)
|
local function _onVK_org(x,y)
|
||||||
local dist,nearest=1e10
|
local dist,nearest=1e10
|
||||||
for K=1,#VK_org do
|
for K=1,#VK_ORG do
|
||||||
local B=VK_org[K]
|
local B=VK_ORG[K]
|
||||||
if B.ava then
|
if B.ava then
|
||||||
local d1=(x-B.x)^2+(y-B.y)^2
|
local d1=(x-B.x)^2+(y-B.y)^2
|
||||||
if d1<B.r^2 then
|
if d1<B.r^2 then
|
||||||
@@ -73,13 +73,13 @@ function scene.touchDown(x,y)
|
|||||||
end
|
end
|
||||||
function scene.touchUp()
|
function scene.touchUp()
|
||||||
if selected then
|
if selected then
|
||||||
local B=VK_org[selected]
|
local B=VK_ORG[selected]
|
||||||
B.x,B.y=int(B.x/snapUnit+.5)*snapUnit,int(B.y/snapUnit+.5)*snapUnit
|
B.x,B.y=int(B.x/snapUnit+.5)*snapUnit,int(B.y/snapUnit+.5)*snapUnit
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function scene.touchMove(_,_,dx,dy)
|
function scene.touchMove(_,_,dx,dy)
|
||||||
if selected and not WIDGET.isFocus()then
|
if selected and not WIDGET.isFocus()then
|
||||||
local B=VK_org[selected]
|
local B=VK_ORG[selected]
|
||||||
B.x,B.y=B.x+dx,B.y+dy
|
B.x,B.y=B.x+dx,B.y+dy
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -122,11 +122,11 @@ scene.widgetList={
|
|||||||
WIDGET.newKey{name="load2", x=805,y=290,w=90,h=70,code=_load2,font=45,fText=CHAR.icon.loadTwo},
|
WIDGET.newKey{name="load2", x=805,y=290,w=90,h=70,code=_load2,font=45,fText=CHAR.icon.loadTwo},
|
||||||
WIDGET.newSlider{name="size", x=440,y=370,w=460,unit=19,font=40,show="vkSize",
|
WIDGET.newSlider{name="size", x=440,y=370,w=460,unit=19,font=40,show="vkSize",
|
||||||
disp=function()
|
disp=function()
|
||||||
return VK_org[selected].r/10-1
|
return VK_ORG[selected].r/10-1
|
||||||
end,
|
end,
|
||||||
code=function(v)
|
code=function(v)
|
||||||
if selected then
|
if selected then
|
||||||
VK_org[selected].r=(v+1)*10
|
VK_ORG[selected].r=(v+1)*10
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
hideF=function()
|
hideF=function()
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ function scene.draw()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function _VKAdisp(n)return function()return VK_org[n].ava end end
|
local function _VKAdisp(n)return function()return VK_ORG[n].ava end end
|
||||||
local function _VKAcode(n)return function()VK_org[n].ava=not VK_org[n].ava end end
|
local function _VKAcode(n)return function()VK_ORG[n].ava=not VK_ORG[n].ava end end
|
||||||
local function _notShow()return not SETTING.VKSwitch end
|
local function _notShow()return not SETTING.VKSwitch end
|
||||||
local function _notTrack()return not(SETTING.VKSwitch and SETTING.VKTrack)end
|
local function _notTrack()return not(SETTING.VKSwitch and SETTING.VKTrack)end
|
||||||
|
|
||||||
@@ -42,8 +42,8 @@ scene.widgetList={
|
|||||||
WIDGET.newSwitch{name="b19", x=580, y=560, lim=230,disp=_VKAdisp(19),code=_VKAcode(19)},
|
WIDGET.newSwitch{name="b19", x=580, y=560, lim=230,disp=_VKAdisp(19),code=_VKAcode(19)},
|
||||||
WIDGET.newSwitch{name="b20", x=580, y=620, lim=230,disp=_VKAdisp(20),code=_VKAcode(20)},
|
WIDGET.newSwitch{name="b20", x=580, y=620, lim=230,disp=_VKAdisp(20),code=_VKAcode(20)},
|
||||||
|
|
||||||
WIDGET.newButton{name="norm", x=840, y=80, w=240,h=80, font=35,code=function()for i=1,20 do VK_org[i].ava=i<11 end end},
|
WIDGET.newButton{name="norm", x=840, y=80, w=240,h=80, font=35,code=function()for i=1,20 do VK_ORG[i].ava=i<11 end end},
|
||||||
WIDGET.newButton{name="pro", x=1120, y=80, w=240,h=80, font=35,code=function()for i=1,20 do VK_org[i].ava=true end end},
|
WIDGET.newButton{name="pro", x=1120, y=80, w=240,h=80, font=35,code=function()for i=1,20 do VK_ORG[i].ava=true end end},
|
||||||
WIDGET.newSwitch{name="hide", x=1150, y=200, lim=400, font=40,disp=SETval('VKSwitch'),code=SETrev('VKSwitch')},
|
WIDGET.newSwitch{name="hide", x=1150, y=200, lim=400, font=40,disp=SETval('VKSwitch'),code=SETrev('VKSwitch')},
|
||||||
WIDGET.newSwitch{name="icon", x=1150, y=300, lim=400, font=40,disp=SETval('VKIcon'),code=SETrev('VKIcon'),hideF=_notShow},
|
WIDGET.newSwitch{name="icon", x=1150, y=300, lim=400, font=40,disp=SETval('VKIcon'),code=SETrev('VKIcon'),hideF=_notShow},
|
||||||
WIDGET.newSlider{name="sfx", x=830, y=380, lim=160,w=400, font=35,change=function()SFX.play('virtualKey',SETTING.VKSFX)end,disp=SETval('VKSFX'),code=SETsto('VKSFX'),hideF=_notShow},
|
WIDGET.newSlider{name="sfx", x=830, y=380, lim=160,w=400, font=35,change=function()SFX.play('virtualKey',SETTING.VKSFX)end,disp=SETval('VKSFX'),code=SETsto('VKSFX'),hideF=_notShow},
|
||||||
|
|||||||
@@ -62,15 +62,6 @@ function scene.keyDown(key)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local minoChars={
|
|
||||||
CHAR.mino.Z,
|
|
||||||
CHAR.mino.S,
|
|
||||||
CHAR.mino.J,
|
|
||||||
CHAR.mino.L,
|
|
||||||
CHAR.mino.T,
|
|
||||||
CHAR.mino.O,
|
|
||||||
CHAR.mino.I,
|
|
||||||
}
|
|
||||||
local spinChars={
|
local spinChars={
|
||||||
CHAR.icon.num0InSpin,
|
CHAR.icon.num0InSpin,
|
||||||
CHAR.icon.num1InSpin,
|
CHAR.icon.num1InSpin,
|
||||||
@@ -104,10 +95,10 @@ function scene.draw()
|
|||||||
end
|
end
|
||||||
|
|
||||||
for x=1,7 do
|
for x=1,7 do
|
||||||
gc_setColor(minoColor[SETTING.skin[x]])
|
gc_setColor(BLOCK_COLORS[SETTING.skin[x]])
|
||||||
setFont(70)
|
setFont(70)
|
||||||
mStr(minoChars[x],80*x-40,-70)
|
mStr(BLOCK_CHARS[x],80*x-40,-70)
|
||||||
mStr(minoChars[x],80*x-40,170)
|
mStr(BLOCK_CHARS[x],80*x-40,170)
|
||||||
setFont(25)
|
setFont(25)
|
||||||
for y=1,4 do
|
for y=1,4 do
|
||||||
mStr(A[x][y],80*x-40,-37+40*y)
|
mStr(A[x][y],80*x-40,-37+40*y)
|
||||||
|
|||||||
@@ -31,14 +31,14 @@ do
|
|||||||
for i=1,17 do
|
for i=1,17 do
|
||||||
TEXTURE.puzzleMark[i]=GC.DO{30,30,
|
TEXTURE.puzzleMark[i]=GC.DO{30,30,
|
||||||
{'setLW',2},
|
{'setLW',2},
|
||||||
{'setCL',minoColor[i][1],minoColor[i][2],minoColor[i][3],.7},
|
{'setCL',BLOCK_COLORS[i][1],BLOCK_COLORS[i][2],BLOCK_COLORS[i][3],.7},
|
||||||
{'dRect',5,5,20,20},
|
{'dRect',5,5,20,20},
|
||||||
{'dRect',10,10,10,10},
|
{'dRect',10,10,10,10},
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
for i=18,24 do
|
for i=18,24 do
|
||||||
TEXTURE.puzzleMark[i]=GC.DO{30,30,
|
TEXTURE.puzzleMark[i]=GC.DO{30,30,
|
||||||
{'setCL',minoColor[i]},
|
{'setCL',BLOCK_COLORS[i]},
|
||||||
{'dRect',7,7,16,16},
|
{'dRect',7,7,16,16},
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
@@ -72,13 +72,13 @@ gc.setDefaultFilter('linear','linear')
|
|||||||
TEXTURE.title=NSC(1160,236)--Title image (Middle: 580,118)
|
TEXTURE.title=NSC(1160,236)--Title image (Middle: 580,118)
|
||||||
do
|
do
|
||||||
for i=1,8 do
|
for i=1,8 do
|
||||||
local triangles=love.math.triangulate(title[i])
|
local triangles=love.math.triangulate(SVG_TITLE[i])
|
||||||
|
|
||||||
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(COLOR.Z)
|
gc.setColor(COLOR.Z)
|
||||||
gc.polygon('line',title[i])
|
gc.polygon('line',SVG_TITLE[i])
|
||||||
|
|
||||||
gc.setColor(.2,.2,.2)
|
gc.setColor(.2,.2,.2)
|
||||||
for j=1,#triangles do
|
for j=1,#triangles do
|
||||||
@@ -94,13 +94,13 @@ do
|
|||||||
local titleColor={COLOR.P,COLOR.F,COLOR.V,COLOR.A,COLOR.M,COLOR.N,COLOR.W,COLOR.Y}
|
local titleColor={COLOR.P,COLOR.F,COLOR.V,COLOR.A,COLOR.M,COLOR.N,COLOR.W,COLOR.Y}
|
||||||
|
|
||||||
for i=1,8 do
|
for i=1,8 do
|
||||||
local triangles=love.math.triangulate(title[i])
|
local triangles=love.math.triangulate(SVG_TITLE[i])
|
||||||
|
|
||||||
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(COLOR.Z)
|
gc.setColor(COLOR.Z)
|
||||||
gc.polygon('line',title[i])
|
gc.polygon('line',SVG_TITLE[i])
|
||||||
|
|
||||||
gc.setLineWidth(4)
|
gc.setLineWidth(4)
|
||||||
gc.setColor(COLOR.D)
|
gc.setColor(COLOR.D)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ local max=math.max
|
|||||||
local next=next
|
local next=next
|
||||||
|
|
||||||
local SETTING,TIME=SETTING,TIME
|
local SETTING,TIME=SETTING,TIME
|
||||||
local VK_org=VK_org
|
local VK_ORG=VK_ORG
|
||||||
|
|
||||||
local skin=1
|
local skin=1
|
||||||
local buttonImages={
|
local buttonImages={
|
||||||
@@ -115,7 +115,7 @@ for i=1,20 do VKIcon[i]=GC.DO{90,90,{'draw',VKI,(i-1)%5*-90,math.floor((i-1)*.2)
|
|||||||
VKI:release()
|
VKI:release()
|
||||||
|
|
||||||
--In-game virtualkey layout data
|
--In-game virtualkey layout data
|
||||||
local keys={}for i=1,#VK_org do keys[i]={}end
|
local keys={}for i=1,#VK_ORG do keys[i]={}end
|
||||||
|
|
||||||
local VK={keys=keys}
|
local VK={keys=keys}
|
||||||
|
|
||||||
@@ -144,7 +144,7 @@ function VK.touch(id,x,y)
|
|||||||
|
|
||||||
if SETTING.VKTrack then
|
if SETTING.VKTrack then
|
||||||
--Auto follow
|
--Auto follow
|
||||||
local O=VK_org[id]
|
local O=VK_ORG[id]
|
||||||
local _FW,_CW=SETTING.VKTchW,1-SETTING.VKCurW
|
local _FW,_CW=SETTING.VKTchW,1-SETTING.VKCurW
|
||||||
local _OW=1-_FW-_CW
|
local _OW=1-_FW-_CW
|
||||||
--(finger+current+origin)
|
--(finger+current+origin)
|
||||||
@@ -186,8 +186,8 @@ function VK.switchKey(id,on)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function VK.restore()
|
function VK.restore()
|
||||||
for i=1,#VK_org do
|
for i=1,#VK_ORG do
|
||||||
local B,O=keys[i],VK_org[i]
|
local B,O=keys[i],VK_ORG[i]
|
||||||
B.ava=O.ava
|
B.ava=O.ava
|
||||||
B.x=O.x
|
B.x=O.x
|
||||||
B.y=O.y
|
B.y=O.y
|
||||||
@@ -204,10 +204,10 @@ end
|
|||||||
|
|
||||||
function VK.changeSet(id)
|
function VK.changeSet(id)
|
||||||
local set=virtualkeySet[id]
|
local set=virtualkeySet[id]
|
||||||
for i=1,#VK_org do VK_org[i].ava=false end
|
for i=1,#VK_ORG do VK_ORG[i].ava=false end
|
||||||
for n=1,#set do
|
for n=1,#set do
|
||||||
local vk=set[n]
|
local vk=set[n]
|
||||||
local B=VK_org[vk.id]
|
local B=VK_ORG[vk.id]
|
||||||
B.ava,B.x,B.y,B.r=true,vk.x,vk.y,vk.r
|
B.ava,B.x,B.y,B.r=true,vk.x,vk.y,vk.r
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -278,7 +278,7 @@ function VK.preview(selected)
|
|||||||
if not SETTING.VKSwitch then return end
|
if not SETTING.VKSwitch then return end
|
||||||
local buttonImage=buttonImages[skin]
|
local buttonImage=buttonImages[skin]
|
||||||
local holdImage=holdImages[skin]
|
local holdImage=holdImages[skin]
|
||||||
for i,B in next,VK_org do
|
for i,B in next,VK_ORG do
|
||||||
if B.ava then
|
if B.ava then
|
||||||
local r=B.r
|
local r=B.r
|
||||||
gc_setColor(1,1,1,SETTING.VKAlpha)
|
gc_setColor(1,1,1,SETTING.VKAlpha)
|
||||||
|
|||||||
Reference in New Issue
Block a user