注释后加空格
联网稍微推进
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
--Static data tables
|
||||
-- Static data tables
|
||||
BLOCK_NAMES={
|
||||
'Z','S','J','L','T','O','I',
|
||||
'Z5','S5','P','Q','F','E',
|
||||
@@ -20,7 +20,7 @@ RANK_COLORS={
|
||||
{1,.5,.4},
|
||||
{.95,.5,.95},
|
||||
}
|
||||
do--SVG_TITLE_FILL, SVG_TITLE_LINE
|
||||
do-- SVG_TITLE_FILL, SVG_TITLE_LINE
|
||||
SVG_TITLE_FILL={
|
||||
{
|
||||
0,0,
|
||||
@@ -134,21 +134,21 @@ do--SVG_TITLE_FILL, SVG_TITLE_LINE
|
||||
for j=1,16 do SVG_TITLE_LINE[8][j]=SVG_TITLE_FILL[8][j] end
|
||||
for j=19,#SVG_TITLE_FILL[8]-2 do SVG_TITLE_LINE[9][j-18]=SVG_TITLE_FILL[8][j] end
|
||||
end
|
||||
do--SVG_TITLE_FAN
|
||||
do-- SVG_TITLE_FAN
|
||||
SVG_TITLE_FAN={}
|
||||
local sin,cos=math.sin,math.cos
|
||||
for i=1,9 do
|
||||
local L=TABLE.copy(SVG_TITLE_LINE[i])
|
||||
SVG_TITLE_FAN[i]=L
|
||||
for j=1,#L,2 do
|
||||
local x,y=L[j],L[j+1]--0<x<988, 290<y<1280
|
||||
x,y=-(x+280)*.002,(y-580)*.9--X=ang, Y=dist
|
||||
x,y=y*cos(x),-y*sin(x)--Rec-Pol-Rec
|
||||
local x,y=L[j],L[j+1]-- 0<x<988, 290<y<1280
|
||||
x,y=-(x+280)*.002,(y-580)*.9-- X=ang, Y=dist
|
||||
x,y=y*cos(x),-y*sin(x)-- Rec-Pol-Rec
|
||||
L[j],L[j+1]=x,y+300
|
||||
end
|
||||
end
|
||||
end
|
||||
do--MISSIONENUM
|
||||
do-- MISSIONENUM
|
||||
ENUM_MISSION={
|
||||
_1=01,_2=02,_3=03,_4=04,
|
||||
A1=05,A2=06,A3=07,A4=08,
|
||||
@@ -165,7 +165,7 @@ do--MISSIONENUM
|
||||
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--TEXTOBJ
|
||||
do-- TEXTOBJ
|
||||
local function T(s,t) return love.graphics.newText(getFont(s),t) end
|
||||
TEXTOBJ={
|
||||
modeName=T(30),
|
||||
@@ -189,51 +189,51 @@ do--TEXTOBJ
|
||||
noScore=T(45),highScore=T(30),modeLocked=T(45),
|
||||
}
|
||||
end
|
||||
do--BLOCKS
|
||||
do-- BLOCKS
|
||||
local O,_=true,false
|
||||
BLOCKS={
|
||||
--Tetromino
|
||||
{{_,O,O},{O,O,_}},--Z
|
||||
{{O,O,_},{_,O,O}},--S
|
||||
{{O,O,O},{O,_,_}},--J
|
||||
{{O,O,O},{_,_,O}},--L
|
||||
{{O,O,O},{_,O,_}},--T
|
||||
{{O,O},{O,O}}, --O
|
||||
{{O,O,O,O}}, --I
|
||||
-- Tetromino
|
||||
{{_,O,O},{O,O,_}},-- Z
|
||||
{{O,O,_},{_,O,O}},-- S
|
||||
{{O,O,O},{O,_,_}},-- J
|
||||
{{O,O,O},{_,_,O}},-- L
|
||||
{{O,O,O},{_,O,_}},-- T
|
||||
{{O,O},{O,O}}, -- O
|
||||
{{O,O,O,O}}, -- I
|
||||
|
||||
--Pentomino
|
||||
{{_,O,O},{_,O,_},{O,O,_}},--Z5
|
||||
{{O,O,_},{_,O,_},{_,O,O}},--S5
|
||||
{{O,O,O},{O,O,_}}, --P
|
||||
{{O,O,O},{_,O,O}}, --Q
|
||||
{{_,O,_},{O,O,O},{O,_,_}},--F
|
||||
{{_,O,_},{O,O,O},{_,_,O}},--E
|
||||
{{O,O,O},{_,O,_},{_,O,_}},--T5
|
||||
{{O,O,O},{O,_,O}}, --U
|
||||
{{O,O,O},{_,_,O},{_,_,O}},--V
|
||||
{{_,O,O},{O,O,_},{O,_,_}},--W
|
||||
{{_,O,_},{O,O,O},{_,O,_}},--X
|
||||
{{O,O,O,O},{O,_,_,_}}, --J5
|
||||
{{O,O,O,O},{_,_,_,O}}, --L5
|
||||
{{O,O,O,O},{_,O,_,_}}, --R
|
||||
{{O,O,O,O},{_,_,O,_}}, --Y
|
||||
{{_,O,O,O},{O,O,_,_}}, --N
|
||||
{{O,O,O,_},{_,_,O,O}}, --H
|
||||
{{O,O,O,O,O}}, --I5
|
||||
-- Pentomino
|
||||
{{_,O,O},{_,O,_},{O,O,_}},-- Z5
|
||||
{{O,O,_},{_,O,_},{_,O,O}},-- S5
|
||||
{{O,O,O},{O,O,_}}, -- P
|
||||
{{O,O,O},{_,O,O}}, -- Q
|
||||
{{_,O,_},{O,O,O},{O,_,_}},-- F
|
||||
{{_,O,_},{O,O,O},{_,_,O}},-- E
|
||||
{{O,O,O},{_,O,_},{_,O,_}},-- T5
|
||||
{{O,O,O},{O,_,O}}, -- U
|
||||
{{O,O,O},{_,_,O},{_,_,O}},-- V
|
||||
{{_,O,O},{O,O,_},{O,_,_}},-- W
|
||||
{{_,O,_},{O,O,O},{_,O,_}},-- X
|
||||
{{O,O,O,O},{O,_,_,_}}, -- J5
|
||||
{{O,O,O,O},{_,_,_,O}}, -- L5
|
||||
{{O,O,O,O},{_,O,_,_}}, -- R
|
||||
{{O,O,O,O},{_,_,O,_}}, -- Y
|
||||
{{_,O,O,O},{O,O,_,_}}, -- N
|
||||
{{O,O,O,_},{_,_,O,O}}, -- H
|
||||
{{O,O,O,O,O}}, -- I5
|
||||
|
||||
--Trimino
|
||||
{{O,O,O}}, --I3
|
||||
{{O,O},{_,O}},--C
|
||||
-- Trimino
|
||||
{{O,O,O}}, -- I3
|
||||
{{O,O},{_,O}},-- C
|
||||
|
||||
--Domino
|
||||
{{O,O}},--I2
|
||||
-- Domino
|
||||
{{O,O}},-- I2
|
||||
|
||||
--Dot
|
||||
{{O}},--O1
|
||||
-- Dot
|
||||
{{O}},-- O1
|
||||
}
|
||||
local function _RotCW(B)
|
||||
local N={}
|
||||
local r,c=#B,#B[1]--row,col
|
||||
local r,c=#B,#B[1]-- row,col
|
||||
for x=1,c do
|
||||
N[x]={}
|
||||
for y=1,r do
|
||||
@@ -339,11 +339,11 @@ EVENTSETS={
|
||||
'ultra',
|
||||
}
|
||||
|
||||
do--Mod data
|
||||
do-- Mod data
|
||||
local function _disableKey(P,key)
|
||||
table.insert(P.gameEnv.keyCancel,key)
|
||||
end
|
||||
MODOPT={--Mod options
|
||||
MODOPT={-- Mod options
|
||||
{no=0,id="NX",name="next",
|
||||
key="q",x=80,y=230,color='lO',
|
||||
list={0,1,2,3,4,5,6},
|
||||
@@ -489,44 +489,44 @@ do--Mod data
|
||||
M.color=COLOR[M.color]
|
||||
end
|
||||
end
|
||||
do--Game data tables
|
||||
PLAYERS={}--Players data
|
||||
do-- Game data tables
|
||||
PLAYERS={}-- Players data
|
||||
PLY_ALIVE={}
|
||||
FIELD={}--Field(s) for custom game
|
||||
BAG={}--Sequence for custom game
|
||||
MISSION={}--Clearing mission for custom game
|
||||
GAME={--Global game data
|
||||
playing=false, --If in-game
|
||||
init=false, --If need initializing game when enter scene-play
|
||||
net=false, --If play net game
|
||||
FIELD={}-- Field(s) for custom game
|
||||
BAG={}-- Sequence for custom game
|
||||
MISSION={}-- Clearing mission for custom game
|
||||
GAME={-- Global game data
|
||||
playing=false, -- If in-game
|
||||
init=false, -- If need initializing game when enter scene-play
|
||||
net=false, -- If play net game
|
||||
|
||||
result=false, --Game result (string)
|
||||
rank=0, --Rank reached
|
||||
pauseTime=0, --Time paused
|
||||
pauseCount=0, --Pausing count
|
||||
warnLVL0=0, --Warning level
|
||||
warnLVL=0, --Warning level (show)
|
||||
result=false, -- Game result (string)
|
||||
rank=0, -- Rank reached
|
||||
pauseTime=0, -- Time paused
|
||||
pauseCount=0, -- Pausing count
|
||||
warnLVL0=0, -- Warning level
|
||||
warnLVL=0, -- Warning level (show)
|
||||
|
||||
seed=1046101471, --Game seed
|
||||
curMode=false, --Current gamemode object
|
||||
mod={}, --List of loaded mods
|
||||
modeEnv=false, --Current gamemode environment
|
||||
setting={}, --Game settings
|
||||
rep={}, --Recording list, key,time,key,time...
|
||||
statSaved=true, --If recording saved
|
||||
recording=false, --If recording
|
||||
replaying=false, --If replaying
|
||||
saved=false, --If recording saved
|
||||
tasUsed=false, --If tasMode used
|
||||
seed=1046101471, -- Game seed
|
||||
curMode=false, -- Current gamemode object
|
||||
mod={}, -- List of loaded mods
|
||||
modeEnv=false, -- Current gamemode environment
|
||||
setting={}, -- Game settings
|
||||
rep={}, -- Recording list, key,time,key,time...
|
||||
statSaved=true, -- If recording saved
|
||||
recording=false, -- If recording
|
||||
replaying=false, -- If replaying
|
||||
saved=false, -- If recording saved
|
||||
tasUsed=false, -- If tasMode used
|
||||
|
||||
prevBG=false, --Previous background, for restore BG when quit setting page
|
||||
prevBG=false, -- Previous background, for restore BG when quit setting page
|
||||
|
||||
--Data for royale mode
|
||||
stage=false, --Game stage
|
||||
mostBadge=false, --Most badge owner
|
||||
secBadge=false, --Second badge owner
|
||||
mostDangerous=false,--Most dangerous player
|
||||
secDangerous=false, --Second dangerous player
|
||||
-- Data for royale mode
|
||||
stage=false, -- Game stage
|
||||
mostBadge=false, -- Most badge owner
|
||||
secBadge=false, -- Second badge owner
|
||||
mostDangerous=false,-- Most dangerous player
|
||||
secDangerous=false, -- Second dangerous player
|
||||
}
|
||||
ROYALEDATA={
|
||||
powerUp=false,
|
||||
@@ -534,25 +534,25 @@ do--Game data tables
|
||||
}
|
||||
CUSTOMENV={}
|
||||
ROOMENV={
|
||||
--Room config
|
||||
-- Room config
|
||||
capacity=10,
|
||||
|
||||
--Basic
|
||||
-- Basic
|
||||
drop=30,lock=60,
|
||||
wait=0,fall=0,
|
||||
hang=5,hurry=1e99,
|
||||
|
||||
--Control
|
||||
-- Control
|
||||
nextCount=6,
|
||||
holdMode='hold',
|
||||
holdCount=1,
|
||||
infHold=false,
|
||||
phyHold=false,
|
||||
|
||||
--Visual
|
||||
-- Visual
|
||||
bone=false,
|
||||
|
||||
--Rule
|
||||
-- Rule
|
||||
life=0,
|
||||
pushSpeed=5,
|
||||
garbageSpeed=2,
|
||||
@@ -571,10 +571,10 @@ do--Game data tables
|
||||
|
||||
eventSet="X",
|
||||
}
|
||||
REPLAY={}--Replay objects (not include stream data)
|
||||
REPLAY={}-- Replay objects (not include stream data)
|
||||
end
|
||||
do--Userdata tables
|
||||
USER=setmetatable({--User infomation
|
||||
do-- Userdata tables
|
||||
USER=setmetatable({-- User infomation
|
||||
__data={
|
||||
email=false,
|
||||
password=false,
|
||||
@@ -592,8 +592,8 @@ do--Userdata tables
|
||||
end
|
||||
end,
|
||||
})
|
||||
SETTING={--Settings
|
||||
--Tuning
|
||||
SETTING={-- Settings
|
||||
-- Tuning
|
||||
das=10,arr=2,
|
||||
dascut=0,dropcut=0,
|
||||
sddas=0,sdarr=2,
|
||||
@@ -601,7 +601,7 @@ do--Userdata tables
|
||||
holdMode='hold',
|
||||
RS='TRS',
|
||||
|
||||
--System
|
||||
-- System
|
||||
reTime=2,
|
||||
allowTAS=false,
|
||||
autoPause=true,
|
||||
@@ -621,7 +621,7 @@ do--Userdata tables
|
||||
},
|
||||
face={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
|
||||
|
||||
--Graphic
|
||||
-- Graphic
|
||||
ghostType='gray',
|
||||
block=true,ghost=.3,center=1,
|
||||
smooth=true,grid=.16,lineNum=.5,
|
||||
@@ -651,7 +651,7 @@ do--Userdata tables
|
||||
clickFX=true,
|
||||
warn=true,
|
||||
|
||||
--Sound
|
||||
-- Sound
|
||||
autoMute=true,
|
||||
sfxPack='chiptune',
|
||||
vocPack='miya',
|
||||
@@ -664,19 +664,19 @@ do--Userdata tables
|
||||
vib=0,
|
||||
voc=0,
|
||||
|
||||
--Virtualkey
|
||||
VKSFX=.2,--SFX volume
|
||||
VKVIB=0,--VIB
|
||||
VKSwitch=false,--If disp
|
||||
VKSkin=1,--If disp
|
||||
VKTrack=false,--If tracked
|
||||
VKDodge=false,--If dodge
|
||||
VKTchW=.3,--Touch-Pos Weight
|
||||
VKCurW=.4,--Cur-Pos Weight
|
||||
VKIcon=true,--If disp icon
|
||||
-- Virtualkey
|
||||
VKSFX=.2,-- SFX volume
|
||||
VKVIB=0,-- VIB
|
||||
VKSwitch=false,-- If disp
|
||||
VKSkin=1,-- If disp
|
||||
VKTrack=false,-- If tracked
|
||||
VKDodge=false,-- If dodge
|
||||
VKTchW=.3,-- Touch-Pos Weight
|
||||
VKCurW=.4,-- Cur-Pos Weight
|
||||
VKIcon=true,-- If disp icon
|
||||
VKAlpha=.3,
|
||||
}
|
||||
KEY_MAP={--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,
|
||||
@@ -688,29 +688,29 @@ do--Userdata tables
|
||||
leftshoulder=0,
|
||||
},
|
||||
}
|
||||
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
|
||||
{ava=true, x=1280-200,y=720-80, r=80},--rotLeft
|
||||
{ava=true, x=1280-200,y=720-320,r=80},--rot180
|
||||
{ava=true, x=200, y=720-320,r=80},--hardDrop
|
||||
{ava=true, x=200, y=720-80, r=80},--softDrop
|
||||
{ava=true, x=1280-320,y=720-200,r=80},--hold
|
||||
{ava=true, x=80, y=280, r=80},--func1
|
||||
{ava=true, x=1280-80, y=280, r=80},--func2
|
||||
{ava=false, x=670, y=50, r=30},--insLeft
|
||||
{ava=false, x=730, y=50, r=30},--insRight
|
||||
{ava=false, x=790, y=50, r=30},--insDown
|
||||
{ava=false, x=850, y=50, r=30},--down1
|
||||
{ava=false, x=910, y=50, r=30},--down4
|
||||
{ava=false, x=970, y=50, r=30},--down10
|
||||
{ava=false, x=1030, y=50, r=30},--dropLeft
|
||||
{ava=false, x=1090, y=50, r=30},--dropRight
|
||||
{ava=false, x=1150, y=50, r=30},--zangiLeft
|
||||
{ava=false, x=1210, y=50, r=30},--zangiRight
|
||||
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
|
||||
{ava=true, x=1280-200,y=720-80, r=80},-- rotLeft
|
||||
{ava=true, x=1280-200,y=720-320,r=80},-- rot180
|
||||
{ava=true, x=200, y=720-320,r=80},-- hardDrop
|
||||
{ava=true, x=200, y=720-80, r=80},-- softDrop
|
||||
{ava=true, x=1280-320,y=720-200,r=80},-- hold
|
||||
{ava=true, x=80, y=280, r=80},-- func1
|
||||
{ava=true, x=1280-80, y=280, r=80},-- func2
|
||||
{ava=false, x=670, y=50, r=30},-- insLeft
|
||||
{ava=false, x=730, y=50, r=30},-- insRight
|
||||
{ava=false, x=790, y=50, r=30},-- insDown
|
||||
{ava=false, x=850, y=50, r=30},-- down1
|
||||
{ava=false, x=910, y=50, r=30},-- down4
|
||||
{ava=false, x=970, y=50, r=30},-- down10
|
||||
{ava=false, x=1030, y=50, r=30},-- dropLeft
|
||||
{ava=false, x=1090, y=50, r=30},-- dropRight
|
||||
{ava=false, x=1150, y=50, r=30},-- zangiLeft
|
||||
{ava=false, x=1210, y=50, r=30},-- zangiRight
|
||||
}
|
||||
RANKS={sprint_10l=0}--Ranks of modes
|
||||
RANKS={sprint_10l=0}-- Ranks of modes
|
||||
STAT={
|
||||
version=VERSION.code,
|
||||
run=0,game=0,time=0,frame=0,
|
||||
@@ -722,7 +722,7 @@ do--Userdata tables
|
||||
clear=(function() local L={} for i=1,29 do L[i]={0,0,0,0,0,0} end return L end)(),
|
||||
spin=(function() local L={} for i=1,29 do L[i]={0,0,0,0,0,0,0} end return L end)(),
|
||||
pc=0,hpc=0,b2b=0,b3b=0,score=0,
|
||||
lastPlay='sprint_10l',--Last played mode ID
|
||||
lastPlay='sprint_10l',-- Last played mode ID
|
||||
item=setmetatable({},{__index=function(self,k)
|
||||
self[k]=0
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user