更多全局变量改为全大写

This commit is contained in:
MrZ626
2021-10-18 15:05:35 +08:00
parent b7832c133a
commit 033a770759
65 changed files with 206 additions and 214 deletions

View File

@@ -117,7 +117,7 @@ do--Z.setCursor
Z.setCursor(function(time,x,y)
if not SETTING.sysCursor then
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))
_=DSCP[R][0]
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.update(FILE.load('conf/settings')or{},SETTING)
TABLE.update(FILE.load('conf/data')or{},STAT)
TABLE.cover (FILE.load('conf/key')or{},keyMap)
TABLE.cover (FILE.load('conf/virtualkey')or{},VK_org)
TABLE.cover (FILE.load('conf/key')or{},KEY_MAP)
TABLE.cover (FILE.load('conf/virtualkey')or{},VK_ORG)
--Initialize fields, sequence, missions, gameEnv for cutsom game
local fieldData=FILE.load('conf/customBoards','string')
@@ -327,7 +327,7 @@ LANG.init('zh',
--3. Add a button in parts/scenes/setting_lang.lua;
},
{
block=BLOCKNAMES
block=BLOCK_NAMES
},
(function()
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 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
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
if type(name)=='number'or type(rank)~='number'then
RANKS[name]=nil
@@ -471,7 +471,7 @@ do
needSave=true
end
for k,v in next,oldModeNameTable do
for k,v in next,MODE_UPDATE_MAP do
if RANKS[k]then
RANKS[v]=RANKS[k]
RANKS[k]=nil
@@ -511,7 +511,7 @@ for _,fileName in next,fs.getDirectoryItems('replay')do
local date,mode,version,player,seed,setting,mod
local fileData=fs.read('replay/'..fileName)
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)
player, fileData=STRING.readLine(fileData)if player=="Local Player"then player="Stacker"end
local success

View File

@@ -17,7 +17,7 @@ function back.update()
ins(mino,{
bid=r,
block=TEXTURE.miniBlock[r],
color=minoColor[SETTING.skin[r]],
color=BLOCK_COLORS[SETTING.skin[r]],
x=SCR.w*rnd(),
y=SCR.h*-.05,
k=SCR.rad/100,

View File

@@ -20,7 +20,7 @@ function back.update()
local r=rnd(29)
ins(mino,{
block=TEXTURE.miniBlock[r],
color=minoColor[SETTING.skin[r]],
color=BLOCK_COLORS[SETTING.skin[r]],
ang=6.2832*rnd(),
rotate=6.2832*rnd(),
vr=.05-rnd()*.1,

View File

@@ -15,7 +15,7 @@ local t
local fan,petal
function back.init()
t=0
fan=title_fan
fan=SVG_TITLE_FAN
petal={}
end
function back.update()

View File

@@ -4,7 +4,7 @@ local int,rnd=math.floor,math.random
local back={}
local t
local colorLib=minoColor
local colorLib=BLOCK_COLORS
local blocks=BLOCKS
local scs=RSlist.TRS.centerPos
function back.init()

View File

@@ -186,7 +186,7 @@ function DATA.pasteMission(str)
end
else
if b>=34 and b<=114 then
if missionEnum[reg]then
if ENUM_MISSION[reg]then
ins(MISSION,reg)
reg=b-33
else
@@ -390,7 +390,7 @@ function DATA.parseReplayData(fileName,fileData,ifFull)
if not metaData then goto BREAK_cannotParse end
--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
--Create replay object

View File

@@ -3,8 +3,8 @@ return{
setFont(55)
mStr(P.modeData.wave,63,200)
mStr("22",63,320)
mText(drawableText.wave,63,260)
mText(drawableText.nextWave,63,380)
mText(TEXTOBJ.wave,63,260)
mText(TEXTOBJ.nextWave,63,380)
end,
task=function(P)
while true do

View File

@@ -3,8 +3,8 @@ return{
setFont(55)
mStr(P.modeData.wave,63,200)
mStr(20+4*math.min(math.floor(P.modeData.wave/10),2),63,320)
mText(drawableText.wave,63,260)
mText(drawableText.nextWave,63,380)
mText(TEXTOBJ.wave,63,260)
mText(TEXTOBJ.nextWave,63,380)
end,
task=function(P)
while true do

View File

@@ -2,7 +2,7 @@ local gc=love.graphics
return{
mesDisp=function(P)
mText(drawableText.techrash,63,420)
mText(TEXTOBJ.techrash,63,420)
setFont(75)
mStr(P.stat.clears[4],63,340)
PLY.draw.applyField(P)

View File

@@ -5,8 +5,8 @@ return{
setFont(45)
mStr(P.combo,63,310)
mStr(P.modeData.maxCombo,63,400)
mText(drawableText.combo,63,358)
mText(drawableText.maxcmb,63,450)
mText(TEXTOBJ.combo,63,358)
mText(TEXTOBJ.maxcmb,63,450)
end,
task=function(P)
local F=P.field

View File

@@ -3,8 +3,8 @@ return{
setFont(45)
mStr(("%.1f"):format(P.stat.atk),63,190)
mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310)
mText(drawableText.atk,63,243)
mText(drawableText.eff,63,363)
mText(TEXTOBJ.atk,63,243)
mText(TEXTOBJ.eff,63,363)
end,
dropPiece=function(P)
if P.stat.atk>=100 then

View File

@@ -16,7 +16,7 @@ return{
setFont(75)
local r=P.modeData.target/10
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)
end,
task=function(P)

View File

@@ -16,7 +16,7 @@ return{
setFont(75)
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)
mText(drawableText.speedLV,63,290)
mText(TEXTOBJ.speedLV,63,290)
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
end,
task=function(P)

View File

@@ -16,7 +16,7 @@ return{
setFont(75)
local r=P.modeData.target/10
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)
end,
task=function(P)

View File

@@ -5,8 +5,8 @@ return{
setFont(55)
mStr(P.modeData.wave,63,200)
mStr(P.modeData.rpm,63,320)
mText(drawableText.wave,63,260)
mText(drawableText.rpm,63,380)
mText(TEXTOBJ.wave,63,260)
mText(TEXTOBJ.rpm,63,380)
end,
task=function(P)
while true do

View File

@@ -5,8 +5,8 @@ return{
setFont(55)
mStr(P.modeData.wave,63,200)
mStr(P.modeData.rpm,63,320)
mText(drawableText.wave,63,260)
mText(drawableText.rpm,63,380)
mText(TEXTOBJ.wave,63,260)
mText(TEXTOBJ.rpm,63,380)
end,
task=function(P)
while true do

View File

@@ -2,7 +2,7 @@ return{
mesDisp=function(P)
setFont(60)
mStr(P.modeData.wave,63,310)
mText(drawableText.wave,63,375)
mText(TEXTOBJ.wave,63,375)
end,
task=function(P)
while true do

View File

@@ -2,7 +2,7 @@ return{
mesDisp=function(P)
setFont(60)
mStr(P.modeData.wave,63,310)
mText(drawableText.wave,63,375)
mText(TEXTOBJ.wave,63,375)
end,
task=function(P)
while true do

View File

@@ -19,9 +19,9 @@ return{
gc.rectangle('fill',0,475-h,125,h,4)
gc.setColor(COLOR.Z)
end
mText(drawableText.line,63,310)
mText(drawableText.techrash,63,420)
mText(drawableText.grade,63,180)
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)
setFont(55)

View File

@@ -3,7 +3,7 @@ return{
mesDisp=function(P)
setFont(60)
mStr(P.stat.pc,63,340)
mText(drawableText.pc,63,410)
mText(TEXTOBJ.pc,63,410)
end,
dropPiece=function(P)
if P.lastPiece.pc and P.stat.row%4==0 then

View File

@@ -44,7 +44,7 @@ return{
mesDisp=function(P)
setFont(60)
mStr(P.stat.pc,63,340)
mText(drawableText.pc,63,410)
mText(TEXTOBJ.pc,63,410)
end,
dropPiece=check,
task=check,

View File

@@ -35,7 +35,7 @@ return{
mesDisp=function(P)
setFont(60)
mStr(P.stat.pc,63,340)
mText(drawableText.pc,63,410)
mText(TEXTOBJ.pc,63,410)
end,
dropPiece=check,
task=check,

View File

@@ -2,7 +2,7 @@ return{
mesDisp=function(P)
setFont(60)
mStr(P.modeData.wave,63,310)
mText(drawableText.wave,63,375)
mText(TEXTOBJ.wave,63,375)
end,
task=function(P)
while true do

View File

@@ -2,7 +2,7 @@ return{
mesDisp=function(P)
setFont(60)
mStr(P.modeData.wave,63,310)
mText(drawableText.wave,63,375)
mText(TEXTOBJ.wave,63,375)
end,
task=function(P)
while true do

View File

@@ -2,7 +2,7 @@ return{
mesDisp=function(P)
setFont(60)
mStr(P.modeData.wave,63,310)
mText(drawableText.wave,63,375)
mText(TEXTOBJ.wave,63,375)
end,
task=function(P)
while true do

View File

@@ -2,7 +2,7 @@ return{
mesDisp=function(P)
setFont(60)
mStr(P.modeData.wave,63,310)
mText(drawableText.wave,63,375)
mText(TEXTOBJ.wave,63,375)
end,
task=function(P)
while true do

View File

@@ -2,7 +2,7 @@ return{
mesDisp=function(P)
setFont(60)
mStr(P.modeData.wave,63,310)
mText(drawableText.wave,63,375)
mText(TEXTOBJ.wave,63,375)
end,
task=function(P)
while true do

View File

@@ -2,7 +2,7 @@ return{
mesDisp=function(P)
setFont(60)
mStr(P.stat.clear[7][4],63,250)
mText(drawableText.techrash,63,315)
mText(TEXTOBJ.techrash,63,315)
end,
dropPiece=function(P)
if P.lastPiece.row>0 and P.lastPiece.row<4 then

View File

@@ -4,7 +4,7 @@ return{
mesDisp=function(P)
setFont(60)
mStr(P.modeData.techrash,63,250)
mText(drawableText.techrash,63,315)
mText(TEXTOBJ.techrash,63,315)
PLY.draw.applyField(P)
local L=P.modeData.history
for i=1,#L do

View File

@@ -2,7 +2,7 @@ return{
mesDisp=function(P)
setFont(60)
mStr(P.modeData.tsd,63,250)
mText(drawableText.tsd,63,315)
mText(TEXTOBJ.tsd,63,315)
end,
dropPiece=function(P)
local C=P.lastPiece

View File

@@ -4,7 +4,7 @@ return{
mesDisp=function(P)
setFont(60)
mStr(P.modeData.tsd,63,250)
mText(drawableText.tsd,63,315)
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)

View File

@@ -4,7 +4,7 @@ return{
mesDisp=function(P)
setFont(60)
mStr(P.modeData.tsd,63,250)
mText(drawableText.tsd,63,315)
mText(TEXTOBJ.tsd,63,315)
PLY.draw.applyField(P)
local L=P.modeData.history
for i=1,#L do

View File

@@ -25,7 +25,7 @@ end
function applyLanguage()
text=LANG.get(SETTING.locale)
WIDGET.setLang(text.WidgetText)
for k,v in next,drawableText do
for k,v in next,TEXTOBJ do
if text[k]then
v:set(text[k])
end
@@ -340,7 +340,7 @@ function loadGame(mode,ifQuickPlay,ifNet)--Load a mode and go to game scene
SCN.go('net_game','swipeD')
else
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')
SFX.play('enter')
end

View File

@@ -1,6 +1,29 @@
--Static data tables
do--title
title={
SFXPACKS={'chiptune'}
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,
1035, 0,
@@ -115,20 +138,20 @@ do--title
5878, 463,
},
}
for _,C in next,title do
for _,C in next,SVG_TITLE do
for i=1,#C do
C[i]=C[i]*.1626
end
end
end
do--title_fan
title_fan={}
do--SVG_TITLE_FAN
SVG_TITLE_FAN={}
local sin,cos=math.sin,math.cos
for i=1,8 do
local L={}
title_fan[i]=L
for j=1,#title[i]do
L[j]=title[i][j]
SVG_TITLE_FAN[i]=L
for j=1,#SVG_TITLE[i]do
L[j]=SVG_TITLE[i][j]
end
for j=1,#L,2 do
local x,y=L[j],L[j+1]--0<x<3041, 290<y<1280
@@ -138,8 +161,8 @@ do--title_fan
end
end
end
do--missionEnum
missionEnum={
do--MISSIONENUM
ENUM_MISSION={
_1=01,_2=02,_3=03,_4=04,
A1=05,A2=06,A3=07,A4=08,
PC=09,
@@ -152,12 +175,12 @@ do--missionEnum
I1=71,I2=72,I3=73,I4=74,
}
local L={}
for k,v in next,missionEnum do L[v]=k end
for k,v in next,L do missionEnum[k]=v end
for k,v in next,ENUM_MISSION do L[v]=k end
for k,v in next,L do ENUM_MISSION[k]=v end
end
do--drawableText
do--TEXTOBJ
local function T(s,t)return love.graphics.newText(getFont(s),t)end
drawableText={
TEXTOBJ={
modeName=T(30),
win=T(120),
@@ -179,15 +202,6 @@ do--drawableText
noScore=T(45),highScore=T(30),modeLocked=T(45),
}
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
local O,_=true,false
BLOCKS={
@@ -250,7 +264,7 @@ do--BLOCKS
end
end
end
oldModeNameTable={
MODE_UPDATE_MAP={
attacker_hard="attacker_h",
attacker_ultimate="attacker_u",
blind_easy="blind_e",
@@ -320,7 +334,7 @@ oldModeNameTable={
master_phantasm="master_ph",
master_extra="master_ex",
}
eventSetList={
EVENTSETS={
'X',
'attacker_h','attacker_u',
'backfire_120','backfire_60','backfire_30','backfire_0',
@@ -338,18 +352,6 @@ eventSetList={
'tsd_e','tsd_h','tsd_u',
'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
local function _disableKey(P,key)
@@ -681,7 +683,7 @@ do--Userdata tables
VKIcon=true,--If disp icon
VKAlpha=.3,
}
keyMap={--Key setting
KEY_MAP={--Key setting
keyboard={
left=1,right=2,x=3,z=4,c=5,
up=6,down=7,space=8,a=9,s=10,
@@ -693,7 +695,7 @@ do--Userdata tables
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=320, y=720-200,r=80},--moveRight
{ava=true, x=1280-80, y=720-200,r=80},--rotRight

View File

@@ -10,7 +10,7 @@ return{
mesDisp=function(P)
setFont(60)
mStr(P.stat.atk,63,280)
mText(drawableText.atk,63,350)
mText(TEXTOBJ.atk,63,350)
end,
bg='tunnel',bgm='echo',
},

View File

@@ -10,7 +10,7 @@ return{
mesDisp=function(P)
setFont(60)
mStr(P.stat.atk,63,280)
mText(drawableText.atk,63,350)
mText(TEXTOBJ.atk,63,350)
end,
bg='blackhole',bgm='echo',
},

View File

@@ -9,7 +9,7 @@ return{
mesDisp=function(P)
setFont(60)
mStr(P.stat.atk,63,280)
mText(drawableText.atk,63,350)
mText(TEXTOBJ.atk,63,350)
end,
bg='tunnel',bgm='echo',
},

View File

@@ -10,7 +10,7 @@ return{
mesDisp=function(P)
setFont(60)
mStr(P.stat.atk,63,280)
mText(drawableText.atk,63,350)
mText(TEXTOBJ.atk,63,350)
end,
bg='blackhole',bgm='echo',
},

View File

@@ -48,7 +48,7 @@ return{
--Texts
gc.setColor(.8,.8,.8)
mText(drawableText.techrash,63,420)
mText(TEXTOBJ.techrash,63,420)
setFont(75)
mStr(P.stat.clears[4],63,340)
end,

View File

@@ -7,8 +7,8 @@ return{
setFont(45)
mStr(("%.1f"):format(P.stat.atk),63,190)
mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310)
mText(drawableText.atk,63,243)
mText(drawableText.eff,63,363)
mText(TEXTOBJ.atk,63,243)
mText(TEXTOBJ.eff,63,363)
end,
bg='blockfall',bgm='infinite',
},

View File

@@ -37,9 +37,9 @@ return{
mStr(P.stat.dig,63,190)
mStr(P.stat.atk,63,310)
mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,420)
mText(drawableText.line,63,243)
mText(drawableText.atk,63,363)
mText(drawableText.eff,63,475)
mText(TEXTOBJ.line,63,243)
mText(TEXTOBJ.atk,63,363)
mText(TEXTOBJ.eff,63,475)
end,
bg='wing',bgm='dream',
},

View File

@@ -8,7 +8,7 @@ return{
mesDisp=function(P)
setFont(60)
mStr(P.stat.pc,63,340)
mText(drawableText.pc,63,410)
mText(TEXTOBJ.pc,63,410)
end,
eventSet='checkLine_100',
bg='rgb',bgm='truth',

View File

@@ -8,7 +8,7 @@ return{
mesDisp=function(P)
setFont(60)
mStr(P.stat.pc,63,340)
mText(drawableText.pc,63,410)
mText(TEXTOBJ.pc,63,410)
end,
eventSet='checkLine_100',
bg='rgb',bgm='moonbeam',

View File

@@ -6,7 +6,7 @@ return{
mesDisp=function(P)
setFont(60)
mStr(P.stat.pc,63,340)
mText(drawableText.pc,63,410)
mText(TEXTOBJ.pc,63,410)
end,
eventSet='checkLine_100',
bg='rgb',bgm='truth',

View File

@@ -238,8 +238,8 @@ function NET.uploadSave()
{section=1,data=STRING.packTable(STAT)},
{section=2,data=STRING.packTable(RANKS)},
{section=3,data=STRING.packTable(SETTING)},
{section=4,data=STRING.packTable(keyMap)},
{section=5,data=STRING.packTable(VK_org)},
{section=4,data=STRING.packTable(KEY_MAP)},
{section=5,data=STRING.packTable(VK_ORG)},
{section=6,data=STRING.packTable(FILE.load('conf/vkSave1'))},
{section=7,data=STRING.packTable(FILE.load('conf/vkSave2'))},
}..'}}')
@@ -282,11 +282,11 @@ function NET.loadSavedData(sections)
success=success and saveSettings()
applySettings()
TABLE.cover(NET.cloudData.keyMap,keyMap)
success=success and FILE.save(keyMap,'conf/key')
TABLE.cover(NET.cloudData.keyMap,KEY_MAP)
success=success and FILE.save(KEY_MAP,'conf/key')
TABLE.cover(NET.cloudData.VK_org,VK_org)
success=success and FILE.save(VK_org,'conf/virtualkey')
TABLE.cover(NET.cloudData.VK_org,VK_ORG)
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.vkSave2,'conf/vkSave2')

View File

@@ -14,7 +14,7 @@ local SKIN,TEXTURE,IMG=SKIN,TEXTURE,IMG
local TEXT,COLOR,GAME,TIME=TEXT,COLOR,GAME,TIME
local shader_alpha,shader_lighter=SHADER.alpha,SHADER.lighter
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
@@ -212,7 +212,7 @@ local drawGhost={
end end
end,
colorCell=function(CB,curX,ghoY,alpha,_,clr)
clr=minoColor[clr]
clr=BLOCK_COLORS[clr]
gc_setColor(clr[1],clr[2],clr[3],alpha)
for i=1,#CB do for j=1,#CB[1]do
if CB[i][j]then
@@ -229,7 +229,7 @@ local drawGhost={
end end
end,
colorLine=function(CB,curX,ghoY,alpha,_,clr)
clr=minoColor[clr]
clr=BLOCK_COLORS[clr]
gc_setColor(clr[1],clr[2],clr[3],alpha)
gc_setLineWidth(4)
for i=1,#CB do for j=1,#CB[1]do
@@ -462,7 +462,7 @@ local function _drawNext(P,repMode)
local n=N
while n<=10 and queue[n]do
local id=queue[n].id
local _=minoColor[queue[n].color]
local _=BLOCK_COLORS[queue[n].color]
gc_setColor(_[1],_[2],_[3],.26)
_=blockImg[id]
gc_draw(_,-_:getWidth()*10,0,nil,10,nil)
@@ -546,14 +546,14 @@ local function _drawMission(curMission,L,missionkill)
else
gc_setColor(.97,.97,.97)
end
gc_print(missionEnum[L[curMission]],85,110)
gc_print(ENUM_MISSION[L[curMission]],85,110)
--Draw next mission
setFont(20)
for i=1,3 do
local m=L[curMission+i]
if m then
m=missionEnum[m]
m=ENUM_MISSION[m]
gc_print(m,87-28*i,117)
else
break
@@ -609,7 +609,7 @@ function draw.drawRoyaleInfo(P)
setFont(35)
mStr(#PLY_ALIVE.."/"..#PLAYERS,63,175)
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)
gc_setColor(1,.5,0,.6)
gc_print(P.badge,103,227)
@@ -878,7 +878,7 @@ function draw.small(P)
--Draw result
if P.result then
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)
end
gc_pop()
@@ -933,7 +933,7 @@ function draw.demo(P)
local N=1
while P.holdQueue[N]do
local id=P.holdQueue[N].id
local _=minoColor[skinSet[id]]
local _=BLOCK_COLORS[skinSet[id]]
gc_setColor(_[1],_[2],_[3],.3)
_=blockImg[id]
gc_draw(_,15,40*N-10,nil,16,nil,0,_:getHeight()*.5)
@@ -944,7 +944,7 @@ function draw.demo(P)
N=1
while N<=ENV.nextCount and P.nextQueue[N]do
local id=P.nextQueue[N].id
local _=minoColor[skinSet[id]]
local _=BLOCK_COLORS[skinSet[id]]
gc_setColor(_[1],_[2],_[3],.3)
_=blockImg[id]
gc_draw(_,285,40*N-10,nil,16,nil,_:getWidth(),_:getHeight()*.5)

View File

@@ -172,7 +172,7 @@ function Player:createBeam(R,send)
else x2,y2=R.x+308*R.size,R.y+450*R.size
end
local c=minoColor[color]
local c=BLOCK_COLORS[color]
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

View File

@@ -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},
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},
eventSet=eventSetList,
eventSet=EVENTSETS,
holdMode={'hold','swap'},
}

View File

@@ -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))
end
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))
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)
@@ -375,7 +375,7 @@ function scene.draw()
--Left button
if pens[1]>0 then
gc.setColor(minoColor[pens[1]])
gc.setColor(BLOCK_COLORS[pens[1]])
gc.rectangle('fill',5,5,23,30,3)
elseif pens[1]==-1 then
gc.setColor(COLOR.Z)
@@ -396,7 +396,7 @@ function scene.draw()
--Right button
if pens[2]>0 then
gc.setColor(minoColor[pens[2]])
gc.setColor(BLOCK_COLORS[pens[2]])
gc.rectangle('fill',52,5,23,30,3)
elseif pens[2]==-1 then
gc.setColor(COLOR.Z)
@@ -418,7 +418,7 @@ function scene.draw()
--Middle button
if pens[3]>0 then
gc.setColor(minoColor[pens[3]])
gc.setColor(BLOCK_COLORS[pens[3]])
gc.rectangle('fill',35,2,10,21,3)
elseif pens[3]==-1 then
gc.setColor(COLOR.Z)

View File

@@ -19,7 +19,7 @@ function scene.sceneBack()
FILE.save(DATA.copyMission(),'conf/customMissions')
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}
function scene.keyDown(key)
if key=="left"then
@@ -106,9 +106,9 @@ function scene.keyDown(key)
end
input=input..key
if missionEnum[input]then
if ENUM_MISSION[input]then
cur=cur+1
ins(MISSION,cur,missionEnum[input])
ins(MISSION,cur,ENUM_MISSION[input])
SFX.play('lock')
input=""
elseif #input>1 or not legalInput[input]then
@@ -135,7 +135,7 @@ function scene.draw()
gc.print(input,1200,275)
--Draw targets
local libColor=minoColor
local libColor=BLOCK_COLORS
local set=SETTING.skin
local L=MISSION
local x,y=100,136--Next block pos
@@ -171,7 +171,7 @@ function scene.draw()
else
gc.setColor(COLOR.H)
end
gc.print(missionEnum[L[i]],x,y-25)
gc.print(ENUM_MISSION[L[i]],x,y-25)
x=x+56
end
end

View File

@@ -125,7 +125,7 @@ function scene.update(dt)
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()
--Draw frame
gc_setColor(COLOR.Z)
@@ -133,7 +133,7 @@ function scene.draw()
gc.rectangle('line',100,110,1080,260,5)
--Draw sequence
local minoColor=minoColor
local BLOCK_COLORS=BLOCK_COLORS
local skinSetting=SETTING.skin
local BAG=BAG
local x,y=120,136--Next block pos
@@ -160,8 +160,8 @@ function scene.draw()
end
if i<=j then
setFont(60)
gc_setColor(minoColor[skinSetting[BAG[i]]])
gc_print(BLOCKCHARS[BAG[i]],x,y-40)
gc_setColor(BLOCK_COLORS[skinSetting[BAG[i]]])
gc_print(BLOCK_CHARS[BAG[i]],x,y-40)
x=x+blockCharWidth[BAG[i]]
end
end

View File

@@ -26,7 +26,7 @@ local function _updateMenuButtons()
if GAME.replaying or pos=='right'then
WIDGET.active.restart.x=1125
WIDGET.active.pause.x=1195
modeTextPos=1100-drawableText.modeName:getWidth()
modeTextPos=1100-TEXTOBJ.modeName:getWidth()
elseif pos=='middle'then
WIDGET.active.restart.x=360
WIDGET.active.pause.x=860
@@ -34,7 +34,7 @@ local function _updateMenuButtons()
elseif pos=='left'then
WIDGET.active.restart.x=120
WIDGET.active.pause.x=190
modeTextPos=1200-drawableText.modeName:getWidth()
modeTextPos=1200-TEXTOBJ.modeName:getWidth()
end
end
local function _updateRepButtons()
@@ -116,7 +116,7 @@ local function _restart()
_updateRepButtons()
end
local function _checkGameKeyDown(key)
local k=keyMap.keyboard[key]
local k=KEY_MAP.keyboard[key]
if k then
if k>0 then
if noKey then return end
@@ -247,7 +247,7 @@ function scene.keyDown(key,isRep)
end
function scene.keyUp(key)
if noKey then return end
local k=keyMap.keyboard[key]
local k=KEY_MAP.keyboard[key]
if k then
if k>0 then
PLAYERS[1]:releaseKey(k)
@@ -257,7 +257,7 @@ function scene.keyUp(key)
end
function scene.gamepadDown(key)
if noKey then return end
local k=keyMap.joystick[key]
local k=KEY_MAP.joystick[key]
if k then
if k>0 then
PLAYERS[1]:pressKey(k)
@@ -271,7 +271,7 @@ function scene.gamepadDown(key)
end
function scene.gamepadUp(key)
if noKey then return end
local k=keyMap.joystick[key]
local k=KEY_MAP.joystick[key]
if k then
if k>0 then
PLAYERS[1]:releaseKey(k)
@@ -357,7 +357,7 @@ function scene.draw()
--Mode info
gc_setColor(1,1,1,.82)
gc_draw(drawableText.modeName,modeTextPos,10)
gc_draw(TEXTOBJ.modeName,modeTextPos,10)
local M=GAME.curMode
if M then
if M.score and M.records[1]then

View File

@@ -161,7 +161,7 @@ function scene.draw()
else
gc.setLineWidth(4)
end
local L=title
local L=SVG_TITLE
gc.push('transform')
gc.translate(126,100)
for i=1,8 do

View File

@@ -209,7 +209,6 @@ local baseRankColor={
{.85,.5,.4,.3},
{.85,.3,.8,.3},
}
local rankColor=rankColor
local function _drawModeShape(M,S,drawType)
if M.shape==1 then--Rectangle
gc_rectangle(drawType,M.x-S,M.y-S,2*S,2*S)
@@ -269,11 +268,11 @@ function scene.draw()
--Rank
if unlocked==1 then
name=RANKCHARS[rank]
name=RANK_CHARS[rank]
if name then
gc_setColor(0,0,0,.8)
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)
end
end
@@ -295,13 +294,13 @@ function scene.draw()
gc_draw(IMG.ctrlSpeedLimit,1230,50,nil,.4)
end
if M.score then
mText(drawableText.highScore,1100,240)
mText(TEXTOBJ.highScore,1100,240)
gc_setColor(.3,.3,.3,.7)
gc_rectangle('fill',940,290,320,280,5)--Highscore board
local L=M.records
gc_setColor(1,1,1)
if visibleModes[sel]==2 then
mText(drawableText.modeLocked,1100,370)
mText(TEXTOBJ.modeLocked,1100,370)
elseif L[1]then
for i=1,#L do
local t=M.scoreDisp(L[i])
@@ -315,7 +314,7 @@ function scene.draw()
end
end
else
mText(drawableText.noScore,1100,370)
mText(TEXTOBJ.noScore,1100,370)
end
end
end

View File

@@ -151,7 +151,7 @@ function scene.keyDown(key,isRep)
inputBox:keypress(key)
elseif playing then
if noKey or isRep then return end
local k=keyMap.keyboard[key]
local k=KEY_MAP.keyboard[key]
if k and k>0 then
PLAYERS[1]:pressKey(k)
VK.press(k)
@@ -170,7 +170,7 @@ function scene.keyDown(key,isRep)
end
function scene.keyUp(key)
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
PLAYERS[1]:releaseKey(k)
VK.release(k)
@@ -181,7 +181,7 @@ function scene.gamepadDown(key)
scene.keyDown("escape")
else
if not playing then return end
local k=keyMap.joystick[key]
local k=KEY_MAP.joystick[key]
if k and k>0 then
PLAYERS[1]:pressKey(k)
VK.press(k)
@@ -190,7 +190,7 @@ function scene.gamepadDown(key)
end
function scene.gamepadUp(key)
if not playing then return end
local k=keyMap.joystick[key]
local k=KEY_MAP.joystick[key]
if k and k>0 then
PLAYERS[1]:releaseKey(k)
VK.release(k)

View File

@@ -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},
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},
eventSet=eventSetList,
eventSet=EVENTSETS,
}
local scene={}

View File

@@ -208,21 +208,21 @@ function scene.draw()
gc.setColor(.97,.97,.97,timer1)
--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)
gc.draw(drawableText.modeName,745-drawableText.modeName:getWidth(),143)
gc.draw(TEXTOBJ.modeName,745-TEXTOBJ.modeName:getWidth(),143)
--Level rank
if RANKCHARS[GAME.rank]then
if RANK_CHARS[GAME.rank]then
gc.push('transform')
gc.translate(1050,5)
setFont(80)
gc.setColor(0,0,0,timer1*.7)
gc.print(RANKCHARS[GAME.rank],-5,-4,nil,1.5)
local L=rankColor[GAME.rank]
gc.print(RANK_CHARS[GAME.rank],-5,-4,nil,1.5)
local L=RANK_COLORS[GAME.rank]
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()
end

View File

@@ -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="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="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.newButton{name="unlock", x=190,y=390,w=280,h=100,color='lR',
@@ -31,7 +31,7 @@ scene.widgetList={
local D=_parseCB()
if D then
TABLE.cover(D,RANKS)
for k,v in next,oldModeNameTable do
for k,v in next,MODE_UPDATE_MAP do
if RANKS[k]then
RANKS[v]=RANKS[k]
RANKS[k]=nil
@@ -70,8 +70,8 @@ scene.widgetList={
code=function()
local D=_parseCB()
if D then
TABLE.update(D,VK_org)
FILE.save(VK_org,'conf/virtualkey')
TABLE.update(D,VK_ORG)
FILE.save(VK_ORG,'conf/virtualkey')
MES.new('check',text.importSuccess)
else
MES.new('error',text.dataCorrupted)

View File

@@ -9,10 +9,10 @@ local keyList
local function _freshKeyList()
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})
end
for k,v in next,keyMap.joystick do
for k,v in next,KEY_MAP.joystick do
ins(keyList[v],{COLOR.lR,k})
end
end
@@ -23,7 +23,7 @@ function scene.sceneInit()
BG.set('none')
end
function scene.sceneBack()
FILE.save(keyMap,'conf/key')
FILE.save(KEY_MAP,'conf/key')
end
local forbbidenKeys={
@@ -40,9 +40,9 @@ function scene.keyDown(key,isRep)
end
elseif key=="backspace"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
keyMap.keyboard[k]=nil
KEY_MAP.keyboard[k]=nil
end
end
_freshKeyList()
@@ -51,7 +51,7 @@ function scene.keyDown(key,isRep)
end
elseif selected then
if not forbbidenKeys[key]then
keyMap.keyboard[key]=selected
KEY_MAP.keyboard[key]=selected
_freshKeyList()
selected=false
SFX.play('reach',.5)
@@ -63,9 +63,9 @@ end
function scene.gamepadDown(key)
if key=="back"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
keyMap.joystick[k]=nil
KEY_MAP.joystick[k]=nil
end
end
_freshKeyList()
@@ -75,7 +75,7 @@ function scene.gamepadDown(key)
SCN.back()
end
elseif selected then
keyMap.joystick[key]=selected
KEY_MAP.joystick[key]=selected
_freshKeyList()
selected=false
SFX.play('reach',.5)

View File

@@ -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="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.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="back", x=1140,y=640,w=170,h=80,font=60,fText=CHAR.icon.back,code=backScene},
}

View File

@@ -1,6 +1,6 @@
local gc,ms=love.graphics,love.mouse
local int,sin=math.floor,math.sin
local VK_org=VK_org
local VK_ORG=VK_ORG
local scene={}
@@ -9,23 +9,23 @@ local snapUnit=1
local selected--Button selected
local function _save1()
FILE.save(VK_org,'conf/vkSave1')
FILE.save(VK_ORG,'conf/vkSave1')
end
local function _load1()
local D=FILE.load('conf/vkSave1')
if D then
TABLE.update(D,VK_org)
TABLE.update(D,VK_ORG)
else
MES.new('error',text.noFile)
end
end
local function _save2()
FILE.save(VK_org,'conf/vkSave2')
FILE.save(VK_ORG,'conf/vkSave2')
end
local function _load2()
local D=FILE.load('conf/vkSave2')
if D then
TABLE.update(D,VK_org)
TABLE.update(D,VK_ORG)
else
MES.new('error',text.noFile)
end
@@ -37,13 +37,13 @@ function scene.sceneInit()
selected=false
end
function scene.sceneBack()
FILE.save(VK_org,'conf/virtualkey')
FILE.save(VK_ORG,'conf/virtualkey')
end
local function _onVK_org(x,y)
local dist,nearest=1e10
for K=1,#VK_org do
local B=VK_org[K]
for K=1,#VK_ORG do
local B=VK_ORG[K]
if B.ava then
local d1=(x-B.x)^2+(y-B.y)^2
if d1<B.r^2 then
@@ -73,13 +73,13 @@ function scene.touchDown(x,y)
end
function scene.touchUp()
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
end
end
function scene.touchMove(_,_,dx,dy)
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
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.newSlider{name="size", x=440,y=370,w=460,unit=19,font=40,show="vkSize",
disp=function()
return VK_org[selected].r/10-1
return VK_ORG[selected].r/10-1
end,
code=function(v)
if selected then
VK_org[selected].r=(v+1)*10
VK_ORG[selected].r=(v+1)*10
end
end,
hideF=function()

View File

@@ -14,8 +14,8 @@ function scene.draw()
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 _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 _notShow()return not SETTING.VKSwitch 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="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="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="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.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.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},

View File

@@ -62,15 +62,6 @@ function scene.keyDown(key)
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={
CHAR.icon.num0InSpin,
CHAR.icon.num1InSpin,
@@ -104,10 +95,10 @@ function scene.draw()
end
for x=1,7 do
gc_setColor(minoColor[SETTING.skin[x]])
gc_setColor(BLOCK_COLORS[SETTING.skin[x]])
setFont(70)
mStr(minoChars[x],80*x-40,-70)
mStr(minoChars[x],80*x-40,170)
mStr(BLOCK_CHARS[x],80*x-40,-70)
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)

View File

@@ -31,14 +31,14 @@ do
for i=1,17 do
TEXTURE.puzzleMark[i]=GC.DO{30,30,
{'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',10,10,10,10},
}
end
for i=18,24 do
TEXTURE.puzzleMark[i]=GC.DO{30,30,
{'setCL',minoColor[i]},
{'setCL',BLOCK_COLORS[i]},
{'dRect',7,7,16,16},
}
end
@@ -72,13 +72,13 @@ gc.setDefaultFilter('linear','linear')
TEXTURE.title=NSC(1160,236)--Title image (Middle: 580,118)
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.setLineWidth(16)
gc.setColor(COLOR.Z)
gc.polygon('line',title[i])
gc.polygon('line',SVG_TITLE[i])
gc.setColor(.2,.2,.2)
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}
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.setLineWidth(16)
gc.setColor(COLOR.Z)
gc.polygon('line',title[i])
gc.polygon('line',SVG_TITLE[i])
gc.setLineWidth(4)
gc.setColor(COLOR.D)

View File

@@ -5,7 +5,7 @@ local max=math.max
local next=next
local SETTING,TIME=SETTING,TIME
local VK_org=VK_org
local VK_ORG=VK_ORG
local skin=1
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()
--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}
@@ -144,7 +144,7 @@ function VK.touch(id,x,y)
if SETTING.VKTrack then
--Auto follow
local O=VK_org[id]
local O=VK_ORG[id]
local _FW,_CW=SETTING.VKTchW,1-SETTING.VKCurW
local _OW=1-_FW-_CW
--(finger+current+origin)
@@ -186,8 +186,8 @@ function VK.switchKey(id,on)
end
function VK.restore()
for i=1,#VK_org do
local B,O=keys[i],VK_org[i]
for i=1,#VK_ORG do
local B,O=keys[i],VK_ORG[i]
B.ava=O.ava
B.x=O.x
B.y=O.y
@@ -204,10 +204,10 @@ end
function VK.changeSet(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
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
end
end
@@ -278,7 +278,7 @@ function VK.preview(selected)
if not SETTING.VKSwitch then return end
local buttonImage=buttonImages[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
local r=B.r
gc_setColor(1,1,1,SETTING.VKAlpha)