每个旋转系统有自己独特的旋转中心样式

整理代码
This commit is contained in:
MrZ626
2021-08-09 01:15:04 +08:00
parent eb7b637703
commit 78b15b78fa
2 changed files with 367 additions and 310 deletions

View File

@@ -1,4 +1,5 @@
local defaultCenterPos={ local defaultCenterTex=GC.DO{1,1}--No texture
local defaultCenterPos={--For SRS-like RSs
--Tetromino --Tetromino
{[0]={0,1},{1,0},{1,1},{1,1}},--Z {[0]={0,1},{1,0},{1,1},{1,1}},--Z
{[0]={0,1},{1,0},{1,1},{1,1}},--S {[0]={0,1},{1,0},{1,1},{1,1}},--S
@@ -41,21 +42,16 @@ local defaultCenterPos={
local map={}for x=-4,4 do map[x]={}for y=-4,4 do map[x][y]={x,y}end end local map={}for x=-4,4 do map[x]={}for y=-4,4 do map[x][y]={x,y}end end
local noKickSet,noKickSet_180,pushZero do local noKickSet,noKickSet_180 do
local Zero={map[0][0]} local Zero={map[0][0]}
noKickSet={[01]=Zero,[10]=Zero,[03]=Zero,[30]=Zero,[12]=Zero,[21]=Zero,[32]=Zero,[23]=Zero} noKickSet={[01]=Zero,[10]=Zero,[03]=Zero,[30]=Zero,[12]=Zero,[21]=Zero,[32]=Zero,[23]=Zero}
noKickSet_180={[01]=Zero,[10]=Zero,[03]=Zero,[30]=Zero,[12]=Zero,[21]=Zero,[32]=Zero,[23]=Zero,[02]=Zero,[20]=Zero,[13]=Zero,[31]=Zero} noKickSet_180={[01]=Zero,[10]=Zero,[03]=Zero,[30]=Zero,[12]=Zero,[21]=Zero,[32]=Zero,[23]=Zero,[02]=Zero,[20]=Zero,[13]=Zero,[31]=Zero}
function pushZero(t) end
for _,set in next,t do local function strToVec(list)
if type(set)=='table'then for i,vecStr in next,list do
for _,R in next,set do list[i]=map[tonumber(vecStr:sub(1,2))][tonumber(vecStr:sub(3,4))]
if not R[1]or type(R[1])=='string'and R[1]~='+0+0'then
table.insert(R,1,'+0+0')
end
end
end
end
end end
return list
end end
--Use this if the block is centrosymmetry, *PTR!!! --Use this if the block is centrosymmetry, *PTR!!!
@@ -116,51 +112,62 @@ do
{{-1,-1},{-1, 0},{-1, 1},{-1,-2},{-1, 2}}, {{-1,-1},{-1, 0},{-1, 1},{-1,-2},{-1, 2}},
} }
TRS={ TRS={
centerTex=GC.DO{10,10,
{'clear',1,1,1,.2},
{'setCL',1,1,1,.4},
{'fRect',1,1,8,8},
{'setCL',1,1,1,.6},
{'fRect',2,2,6,6},
{'setCL',1,1,1,.8},
{'fRect',3,3,4,4},
{'setCL',1,1,1},
{'fRect',4,4,2,2},
},
centerDisp=TABLE.new(true,29), centerDisp=TABLE.new(true,29),
kickTable={ kickTable={
{ {
[01]={'-1+0','-1+1','+0-2','-1+2','+0+1'}, [01]={'+0+0','-1+0','-1+1','+0-2','-1+2','+0+1'},
[10]={'+1+0','+1-1','+0+2','+1-2','+1-2'}, [10]={'+0+0','+1+0','+1-1','+0+2','+1-2','+1-2'},
[03]={'+1+0','+1+1','+0-2','+1-1','+1-2'}, [03]={'+0+0','+1+0','+1+1','+0-2','+1-1','+1-2'},
[30]={'-1+0','-1-1','+0+2','-1+2','+0-1'}, [30]={'+0+0','-1+0','-1-1','+0+2','-1+2','+0-1'},
[12]={'+1+0','+1-1','+0+2','+1+2'}, [12]={'+0+0','+1+0','+1-1','+0+2','+1+2'},
[21]={'-1+0','-1+1','+0-2','-1-2'}, [21]={'+0+0','-1+0','-1+1','+0-2','-1-2'},
[32]={'-1+0','-1-1','+0+2','-1+2'}, [32]={'+0+0','-1+0','-1-1','+0+2','-1+2'},
[23]={'+1+0','+1+1','+0-2','+1-2'}, [23]={'+0+0','+1+0','+1+1','+0-2','+1-2'},
[02]={'+1+0','-1+0','+0-1','+0+1'}, [02]={'+0+0','+1+0','-1+0','+0-1','+0+1'},
[20]={'-1+0','+1+0','+0+1','+0-1'}, [20]={'+0+0','-1+0','+1+0','+0+1','+0-1'},
[13]={'+0-1','+0+1','+0-2'}, [13]={'+0+0','+0-1','+0+1','+0-2'},
[31]={'+0+1','+0-1','+0+2'}, [31]={'+0+0','+0+1','+0-1','+0+2'},
},--Z },--Z
false,--S false,--S
{ {
[01]={'-1+0','-1+1','+1+0','+0-2','+1+1'}, [01]={'+0+0','-1+0','-1+1','+1+0','+0-2','+1+1'},
[10]={'+1+0','+1-1','-1+0','+0+2','+1+2'}, [10]={'+0+0','+1+0','+1-1','-1+0','+0+2','+1+2'},
[03]={'+1+0','+1+1','+0-2','+1-2','+1-1','+0+1'}, [03]={'+0+0','+1+0','+1+1','+0-2','+1-2','+1-1','+0+1'},
[30]={'-1+0','-1-1','+0+2','-1+2','+0-1','-1+1'}, [30]={'+0+0','-1+0','-1-1','+0+2','-1+2','+0-1','-1+1'},
[12]={'+1+0','+1-1','+1+1','-1+0','+0-1','+0+2','+1+2'}, [12]={'+0+0','+1+0','+1-1','+1+1','-1+0','+0-1','+0+2','+1+2'},
[21]={'-1+0','-1+1','-1-1','+1+0','+0+1','+0-2','-1-2'}, [21]={'+0+0','-1+0','-1+1','-1-1','+1+0','+0+1','+0-2','-1-2'},
[32]={'-1+0','-1-1','+1+0','+0+2','-1+2','-1+1'}, [32]={'+0+0','-1+0','-1-1','+1+0','+0+2','-1+2','-1+1'},
[23]={'+1+0','+1-1','-1+0','+1+1','+0-2','+1-2'}, [23]={'+0+0','+1+0','+1-1','-1+0','+1+1','+0-2','+1-2'},
[02]={'-1+0','+1+0','+0-1','+0+1'}, [02]={'+0+0','-1+0','+1+0','+0-1','+0+1'},
[20]={'+1+0','-1+0','+0+1','+0-1'}, [20]={'+0+0','+1+0','-1+0','+0+1','+0-1'},
[13]={'+0-1','+0+1','+1+0'}, [13]={'+0+0','+0-1','+0+1','+1+0'},
[31]={'+0+1','+0-1','-1+0'}, [31]={'+0+0','+0+1','+0-1','-1+0'},
},--J },--J
false,--L false,--L
{ {
[01]={'-1+0','-1+1','+0-2','-1-2','+0+1'}, [01]={'+0+0','-1+0','-1+1','+0-2','-1-2','+0+1'},
[10]={'+1+0','+1-1','+0+2','+1+2','+0-1'}, [10]={'+0+0','+1+0','+1-1','+0+2','+1+2','+0-1'},
[03]={'+1+0','+1+1','+0-2','+1-2','+0+1'}, [03]={'+0+0','+1+0','+1+1','+0-2','+1-2','+0+1'},
[30]={'-1+0','-1-1','+0+2','-1+2','+0-1'}, [30]={'+0+0','-1+0','-1-1','+0+2','-1+2','+0-1'},
[12]={'+1+0','+1-1','+0-1','-1-1','+0+2','+1+2','+1+1'}, [12]={'+0+0','+1+0','+1-1','+0-1','-1-1','+0+2','+1+2','+1+1'},
[21]={'-1+0','+0-2','-1-2','-1-1','+1+1'}, [21]={'+0+0','-1+0','+0-2','-1-2','-1-1','+1+1'},
[32]={'-1+0','-1-1','+0-1','+1-1','+0+2','-1+2','-1+1'}, [32]={'+0+0','-1+0','-1-1','+0-1','+1-1','+0+2','-1+2','-1+1'},
[23]={'+1+0','+0-2','+1-2','+1-1','-1+1'}, [23]={'+0+0','+1+0','+0-2','+1-2','+1-1','-1+1'},
[02]={'-1+0','+1+0','+0+1'}, [02]={'+0+0','-1+0','+1+0','+0+1'},
[20]={'+1+0','-1+0','+0-1'}, [20]={'+0+0','+1+0','-1+0','+0-1'},
[13]={'+0-1','+0+1','+1+0','+0-2','+0+2'}, [13]={'+0+0','+0-1','+0+1','+1+0','+0-2','+0+2'},
[31]={'+0-1','+0+1','-1+0','+0-2','+0+2'}, [31]={'+0+0','+0-1','+0+1','-1+0','+0-2','+0+2'},
},--T },--T
function(P,d) function(P,d)
if P.gameEnv.easyFresh then if P.gameEnv.easyFresh then
@@ -207,111 +214,111 @@ do
end end
end,--O end,--O
{ {
[01]={'+0+1','+1+0','-2+0','-2-1','+1+2'}, [01]={'+0+0','+0+1','+1+0','-2+0','-2-1','+1+2'},
[10]={'+2+0','-1+0','-1-2','+2+1','+0+1'}, [10]={'+0+0','+2+0','-1+0','-1-2','+2+1','+0+1'},
[03]={'+0+1','-1+0','+2+0','+2-1','-1+2'}, [03]={'+0+0','+0+1','-1+0','+2+0','+2-1','-1+2'},
[30]={'-2+0','+1+0','+1-2','-2+1','+0+1'}, [30]={'+0+0','-2+0','+1+0','+1-2','-2+1','+0+1'},
[12]={'-1+0','+2+0','+2-1','+0-1','-1+2'}, [12]={'+0+0','-1+0','+2+0','+2-1','+0-1','-1+2'},
[21]={'-2+0','+1+0','+1-2','-2+1','+0+1'}, [21]={'+0+0','-2+0','+1+0','+1-2','-2+1','+0+1'},
[32]={'+1+0','-2+0','-2-1','+0-1','+1+2'}, [32]={'+0+0','+1+0','-2+0','-2-1','+0-1','+1+2'},
[23]={'+2+0','-1+0','-1-2','+2+1','+0+1'}, [23]={'+0+0','+2+0','-1+0','-1-2','+2+1','+0+1'},
[02]={'-1+0','+1+0','+0-1','+0+1'}, [02]={'+0+0','-1+0','+1+0','+0-1','+0+1'},
[20]={'+1+0','-1+0','+0+1','+0-1'}, [20]={'+0+0','+1+0','-1+0','+0+1','+0-1'},
[13]={'+0-1','-1+0','+1+0','+0+1'}, [13]={'+0+0','+0-1','-1+0','+1+0','+0+1'},
[31]={'+0-1','+1+0','-1+0','+0+1'}, [31]={'+0+0','+0-1','+1+0','-1+0','+0+1'},
},--I },--I
{ {
[01]={'+0+1','+1+1','-1+0','+0-3','+0+2','+0-2','+0+3','-1+2'}, [01]={'+0+0','+0+1','+1+1','-1+0','+0-3','+0+2','+0-2','+0+3','-1+2'},
[10]={'+0-1','-1-1','+1+0','+0-3','+0+2','+0-2','+0+3','+1-2'}, [10]={'+0+0','+0-1','-1-1','+1+0','+0-3','+0+2','+0-2','+0+3','+1-2'},
[03]={'+1+0','+0-3','+0+1','+0+2','+0+3','+1+2'}, [03]={'+0+0','+1+0','+0-3','+0+1','+0+2','+0+3','+1+2'},
[30]={'-1+0','+0+1','+0-2','+0-3','+0+3','-1-2'}, [30]={'+0+0','-1+0','+0+1','+0-2','+0-3','+0+3','-1-2'},
},--Z5 },--Z5
false,--S5 false,--S5
{ {
[01]={'-1+0','-1+1','+0-2','-1-2','-1-1','+0+1'}, [01]={'+0+0','-1+0','-1+1','+0-2','-1-2','-1-1','+0+1'},
[10]={'+1+0','+1-1','+0+2','+1+2','+0-1','+1+1'}, [10]={'+0+0','+1+0','+1-1','+0+2','+1+2','+0-1','+1+1'},
[03]={'+1+0','+1+1','+0-2','+1-2'}, [03]={'+0+0','+1+0','+1+1','+0-2','+1-2'},
[30]={'-1+0','-1-1','+0+2','-1+2'}, [30]={'+0+0','-1+0','-1-1','+0+2','-1+2'},
[12]={'+1+0','+1-1','+0+2','+1+2','+1+1'}, [12]={'+0+0','+1+0','+1-1','+0+2','+1+2','+1+1'},
[21]={'-1+0','-1-1','-1+1','+0-2','-1-2','-1-1'}, [21]={'+0+0','-1+0','-1-1','-1+1','+0-2','-1-2','-1-1'},
[32]={'-1+0','-1-1','-1+1','+0-1','+0+2','-1+2'}, [32]={'+0+0','-1+0','-1-1','-1+1','+0-1','+0+2','-1+2'},
[23]={'+1+0','+1+1','-1+0','+0-2','+1-2'}, [23]={'+0+0','+1+0','+1+1','-1+0','+0-2','+1-2'},
[02]={'-1+0','+0-1','+0+1'}, [02]={'+0+0','-1+0','+0-1','+0+1'},
[20]={'+1+0','+0+1','+0-1'}, [20]={'+0+0','+1+0','+0+1','+0-1'},
[13]={'+1+0','+0+1','-1+0'}, [13]={'+0+0','+1+0','+0+1','-1+0'},
[31]={'-1+0','+0-1','+1+0'}, [31]={'+0+0','-1+0','+0-1','+1+0'},
},--P },--P
false,--Q false,--Q
{ {
[01]={'-1+0','+1+0','-1+1','+0-2','+0-3'}, [01]={'+0+0','-1+0','+1+0','-1+1','+0-2','+0-3'},
[10]={'+1+0','+1-1','-1+0','+0+2','+0+3'}, [10]={'+0+0','+1+0','+1-1','-1+0','+0+2','+0+3'},
[03]={'+1+0','+1-1','+0+1','+0-2','+0-3'}, [03]={'+0+0','+1+0','+1-1','+0+1','+0-2','+0-3'},
[30]={'-1+1','+1+0','+0-1','+0+2','+0+3'}, [30]={'+0+0','-1+1','+1+0','+0-1','+0+2','+0+3'},
[12]={'+1+0','+0-1','-1+0','+0+2'}, [12]={'+0+0','+1+0','+0-1','-1+0','+0+2'},
[21]={'-1+0','+0+1','+1+0','+0-2'}, [21]={'+0+0','-1+0','+0+1','+1+0','+0-2'},
[32]={'-1+0','+0+1','-1+1','+1+0','+0+2','-2+0'}, [32]={'+0+0','-1+0','+0+1','-1+1','+1+0','+0+2','-2+0'},
[23]={'+1+0','+1-1','+0-1','-1+0','+0-2','+2+0'}, [23]={'+0+0','+1+0','+1-1','+0-1','-1+0','+0-2','+2+0'},
[02]={'+1+0','-1+0','-1-1'}, [02]={'+0+0','+1+0','-1+0','-1-1'},
[20]={'-1+0','+1+0','+1+1'}, [20]={'+0+0','-1+0','+1+0','+1+1'},
[13]={'+0-1','-1+1','+0+1'}, [13]={'+0+0','+0-1','-1+1','+0+1'},
[31]={'+0-1','+1-1','+0+1'}, [31]={'+0+0','+0-1','+1-1','+0+1'},
},--F },--F
false,--E false,--E
{ {
[01]={'+0-1','-1-1','+1+0','+1+1','+0-3','-1+0','+0+2','-1+2'}, [01]={'+0+0','+0-1','-1-1','+1+0','+1+1','+0-3','-1+0','+0+2','-1+2'},
[10]={'+1+0','+0-1','-1-1','+0-2','-1+1','+0-3','+1-2','+0+1'}, [10]={'+0+0','+1+0','+0-1','-1-1','+0-2','-1+1','+0-3','+1-2','+0+1'},
[03]={'+0-1','+1-1','-1+0','-1+1','+0-3','+1+0','+0+2','+1+2'}, [03]={'+0+0','+0-1','+1-1','-1+0','-1+1','+0-3','+1+0','+0+2','+1+2'},
[30]={'-1+0','+0-1','+1-1','+0-2','+1+1','+0-3','-1-2','+0+1'}, [30]={'+0+0','-1+0','+0-1','+1-1','+0-2','+1+1','+0-3','-1-2','+0+1'},
[12]={'+1+0','-1+0','+0-2','+0-3','+0+1','-1+1'}, [12]={'+0+0','+1+0','-1+0','+0-2','+0-3','+0+1','-1+1'},
[21]={'+1-1','-1+0','+1+0','+0-1','+0+2','+0+3'}, [21]={'+0+0','+1-1','-1+0','+1+0','+0-1','+0+2','+0+3'},
[32]={'-1+0','+1+0','+0-2','+0-3','+0+1','+1+1'}, [32]={'+0+0','-1+0','+1+0','+0-2','+0-3','+0+1','+1+1'},
[23]={'-1-1','+1+0','-1+0','+0-1','+0+2','+0+3'}, [23]={'+0+0','-1-1','+1+0','-1+0','+0-1','+0+2','+0+3'},
[02]={'+0-1','+0+1','+0+2'}, [02]={'+0+0','+0-1','+0+1','+0+2'},
[20]={'+0-1','+0+1','+0-2'}, [20]={'+0+0','+0-1','+0+1','+0-2'},
[13]={'+1+0','-1+1','-2+0'}, [13]={'+0+0','+1+0','-1+1','-2+0'},
[31]={'-1+0','+1+1','+2+0'}, [31]={'+0+0','-1+0','+1+1','+2+0'},
},--T5 },--T5
{ {
[01]={'-1+0','-1+1','+0-2','-1-2'}, [01]={'+0+0','-1+0','-1+1','+0-2','-1-2'},
[10]={'+1+0','+1-1','+0+2','+1+2'}, [10]={'+0+0','+1+0','+1-1','+0+2','+1+2'},
[03]={'+1+0','+1+1','+0-2','+1-2'}, [03]={'+0+0','+1+0','+1+1','+0-2','+1-2'},
[30]={'-1+0','-1-1','+0-2','-1+2'}, [30]={'+0+0','-1+0','-1-1','+0-2','-1+2'},
[12]={'+1+0','+1-1','+1+1'}, [12]={'+0+0','+1+0','+1-1','+1+1'},
[21]={'-1-1','-1+1','-1-1'}, [21]={'+0+0','-1-1','-1+1','-1-1'},
[32]={'-1+0','-1-1','-1+1'}, [32]={'+0+0','-1+0','-1-1','-1+1'},
[23]={'+1-1','+1+1','+1-1'}, [23]={'+0+0','+1-1','+1+1','+1-1'},
[02]={'+0+1'}, [02]={'+0+0','+0+1'},
[20]={'+0-1'}, [20]={'+0+0','+0-1'},
[13]={'+0-1','+0+1','+1+0'}, [13]={'+0+0','+0-1','+0+1','+1+0'},
[31]={'+0-1','+0+1','-1+0'}, [31]={'+0+0','+0-1','+0+1','-1+0'},
},--U },--U
{ {
[01]={'+0+1','-1+0','+0-2','-1-2'}, [01]={'+0+0','+0+1','-1+0','+0-2','-1-2'},
[10]={'+0+1','+1+0','+0-2','+1-2'}, [10]={'+0+0','+0+1','+1+0','+0-2','+1-2'},
[03]={'+0-1','+0+1','+0+2'}, [03]={'+0+0','+0-1','+0+1','+0+2'},
[30]={'+0-1','+0+1','+0-2'}, [30]={'+0+0','+0-1','+0+1','+0-2'},
[12]={'+0-1','+0+1'}, [12]={'+0+0','+0-1','+0+1'},
[21]={'+0-1','+0-2'}, [21]={'+0+0','+0-1','+0-2'},
[32]={'+1+0','-1+0'}, [32]={'+0+0','+1+0','-1+0'},
[23]={'-1+0','+1+0'}, [23]={'+0+0','-1+0','+1+0'},
[02]={'-1+1','+1-1'}, [02]={'+0+0','-1+1','+1-1'},
[20]={'+1-1','-1+1'}, [20]={'+0+0','+1-1','-1+1'},
[13]={'+1+1','-1-1'}, [13]={'+0+0','+1+1','-1-1'},
[31]={'-1-1','+1+1'}, [31]={'+0+0','-1-1','+1+1'},
},--V },--V
{ {
[01]={'+0-1','-1+0','+1+0','+1-1','+0+2'}, [01]={'+0+0','+0-1','-1+0','+1+0','+1-1','+0+2'},
[10]={'+0-1','-1-1','+0+1','+0-2','+1-2','+0+2'}, [10]={'+0+0','+0-1','-1-1','+0+1','+0-2','+1-2','+0+2'},
[03]={'+1+0','+1+1','+0-1','+0-2','+0-3','+1-1','+0+1','+0+2','+0+3'}, [03]={'+0+0','+1+0','+1+1','+0-1','+0-2','+0-3','+1-1','+0+1','+0+2','+0+3'},
[30]={'-1+0','-1+1','+0-1','+0-2','+0-3','-1-1','+0+1','+0+2','+0+3'}, [30]={'+0+0','-1+0','-1+1','+0-1','+0-2','+0-3','-1-1','+0+1','+0+2','+0+3'},
[12]={'+1+0','+0-1','-2+0','+1+1','-1+0','+0+1','-1-1'}, [12]={'+0+0','+1+0','+0-1','-2+0','+1+1','-1+0','+0+1','-1-1'},
[21]={'-1+0','+0-1','+2+0','-1+1','+1+0','+0+1','+1-1'}, [21]={'+0+0','-1+0','+0-1','+2+0','-1+1','+1+0','+0+1','+1-1'},
[32]={'+0-1','+1+0','+0+1','-1+0','-1-1','+0+2'}, [32]={'+0+0','+0-1','+1+0','+0+1','-1+0','-1-1','+0+2'},
[23]={'+0-1','+1-1','+0+1','+0-2','-1-2','+0+2'}, [23]={'+0+0','+0-1','+1-1','+0+1','+0-2','-1-2','+0+2'},
[02]={'+0-1','-1+0'}, [02]={'+0+0','+0-1','-1+0'},
[20]={'+0+1','+1+0'}, [20]={'+0+0','+0+1','+1+0'},
[13]={'+0+1','-1+0'}, [13]={'+0+0','+0+1','-1+0'},
[31]={'+0-1','+1+0'}, [31]={'+0+0','+0-1','+1+0'},
},--W },--W
function(P,d) function(P,d)
if P.type=='human'then SFX.play('rotate',nil,P:getCenterX()*.15)end if P.type=='human'then SFX.play('rotate',nil,P:getCenterX()*.15)end
@@ -329,89 +336,89 @@ do
P:freshBlock('fresh') P:freshBlock('fresh')
end,--X end,--X
{ {
[01]={'-1+0','-1+1','+0-3','-1+1','-1+2','+0+1'}, [01]={'+0+0','-1+0','-1+1','+0-3','-1+1','-1+2','+0+1'},
[10]={'-1+0','+1-1','+0+3','+1-1','+1-2','+0+1'}, [10]={'+0+0','-1+0','+1-1','+0+3','+1-1','+1-2','+0+1'},
[03]={'+0-1','+1-1','-1+0','+1+1','+0-2','+1-2','+0-3','+1-3','-1+1'}, [03]={'+0+0','+0-1','+1-1','-1+0','+1+1','+0-2','+1-2','+0-3','+1-3','-1+1'},
[30]={'+0+1','-1+1','+1+0','-1-1','+0+2','-1+2','+0+3','-1+3','+1-1'}, [30]={'+0+0','+0+1','-1+1','+1+0','-1-1','+0+2','-1+2','+0+3','-1+3','+1-1'},
[12]={'+1+0','+1-1','+0-1','+1-2','+0-2','+1+1','-1+0','+0+2','+1+2'}, [12]={'+0+0','+1+0','+1-1','+0-1','+1-2','+0-2','+1+1','-1+0','+0+2','+1+2'},
[21]={'-1+0','-1+1','+0+1','-1+2','+0+2','-1-1','+1+0','+0-2','-1-2'}, [21]={'+0+0','-1+0','-1+1','+0+1','-1+2','+0+2','-1-1','+1+0','+0-2','-1-2'},
[32]={'-1+0','-1+1','-1-1','+1+0','+0+2','-1+2','+0-2'}, [32]={'+0+0','-1+0','-1+1','-1-1','+1+0','+0+2','-1+2','+0-2'},
[23]={'+1+0','+1-1','+1+1','-1+0','+0-2','+1-2','+0+2'}, [23]={'+0+0','+1+0','+1-1','+1+1','-1+0','+0-2','+1-2','+0+2'},
[02]={'+0-1','+1-1','-1+0','+2-1'}, [02]={'+0+0','+0-1','+1-1','-1+0','+2-1'},
[20]={'+0+1','-1+1','+1+0','-2+1'}, [20]={'+0+0','+0+1','-1+1','+1+0','-2+1'},
[13]={'-1+0','-1-1','+0+1','-1-2'}, [13]={'+0+0','-1+0','-1-1','+0+1','-1-2'},
[31]={'+1+0','+1+1','+0-1','+1+2'}, [31]={'+0+0','+1+0','+1+1','+0-1','+1+2'},
},--J5 },--J5
false,--L5 false,--L5
{ {
[01]={'-1+0','-1+0','-1+1','+1+0','-1+2','-1-1','+0-3','+0+1'}, [01]={'+0+0','-1+0','-1+0','-1+1','+1+0','-1+2','-1-1','+0-3','+0+1'},
[10]={'-1+0','+1+0','+1-1','+1+0','+1-2','+1+1','+0+3','+0+1'}, [10]={'+0+0','-1+0','+1+0','+1-1','+1+0','+1-2','+1+1','+0+3','+0+1'},
[03]={'+0-1','+0+1','+1+0','+1-1','-1+0','+1+1','+0-2','+1-2','+0-3','+1-3','-1+1'}, [03]={'+0+0','+0-1','+0+1','+1+0','+1-1','-1+0','+1+1','+0-2','+1-2','+0-3','+1-3','-1+1'},
[30]={'+0-1','+0+1','-1+0','-1+1','+1+0','-1-1','+0+2','-1+2','+0+3','-1+3','+1-1'}, [30]={'+0+0','+0-1','+0+1','-1+0','-1+1','+1+0','-1-1','+0+2','-1+2','+0+3','-1+3','+1-1'},
[12]={'+1+0','+1-1','+0-1','+1-2','+0-2','+1+1','-1+0','+0+2','+1+2'}, [12]={'+0+0','+1+0','+1-1','+0-1','+1-2','+0-2','+1+1','-1+0','+0+2','+1+2'},
[21]={'-1+0','-1+1','+0+1','-1+2','+0+2','-1-1','+1+0','+0-2','-1-2'}, [21]={'+0+0','-1+0','-1+1','+0+1','-1+2','+0+2','-1-1','+1+0','+0-2','-1-2'},
[32]={'+0-1','-1+0','-1+1','-1-1','+1+0','+0+2','-1+2','+0-2'}, [32]={'+0+0','+0-1','-1+0','-1+1','-1-1','+1+0','+0+2','-1+2','+0-2'},
[23]={'+0+1','+1+0','+1-1','+1+1','-1+0','+0-2','+1-2','+0+2'}, [23]={'+0+0','+0+1','+1+0','+1-1','+1+1','-1+0','+0-2','+1-2','+0+2'},
[02]={'+0-1','+1-1','-1+0','+2-1','+0+1'}, [02]={'+0+0','+0-1','+1-1','-1+0','+2-1','+0+1'},
[20]={'+0+1','-1+1','+1+0','-2+1','+0-1'}, [20]={'+0+0','+0+1','-1+1','+1+0','-2+1','+0-1'},
[13]={'-1+0','-1-1','+0+1','-1-2'}, [13]={'+0+0','-1+0','-1-1','+0+1','-1-2'},
[31]={'+1+0','+1+1','+0-1','+1+2'}, [31]={'+0+0','+1+0','+1+1','+0-1','+1+2'},
},--R },--R
false,--Y false,--Y
{ {
[01]={'-1+0','-1+1','+0+1','+1+0','-1+2','-2+0','+0-2'}, [01]={'+0+0','-1+0','-1+1','+0+1','+1+0','-1+2','-2+0','+0-2'},
[10]={'+1+0','-1+0','+0-1','+1-1','+1-2','+2+0','+0+2'}, [10]={'+0+0','+1+0','-1+0','+0-1','+1-1','+1-2','+2+0','+0+2'},
[03]={'-1+0','+1-1','+0-2','+0-3','+1+0','+1-2','+1-3','+0+1','-1+1'}, [03]={'+0+0','-1+0','+1-1','+0-2','+0-3','+1+0','+1-2','+1-3','+0+1','-1+1'},
[30]={'-1+0','+1-1','+1-2','+1+0','+0-2','+1-3','-1+2','+0+3','-1+3'}, [30]={'+0+0','-1+0','+1-1','+1-2','+1+0','+0-2','+1-3','-1+2','+0+3','-1+3'},
[12]={'-1+0','+1-1','-1-1','+1-2','+1+0','+0-2','+1-3','-1+2','+0+3','-1+3'}, [12]={'+0+0','-1+0','+1-1','-1-1','+1-2','+1+0','+0-2','+1-3','-1+2','+0+3','-1+3'},
[21]={'-1+0','+1-1','+1+1','+0-2','+0-3','+1+0','+1-2','+1-3','+0+1','-1+1'}, [21]={'+0+0','-1+0','+1-1','+1+1','+0-2','+0-3','+1+0','+1-2','+1-3','+0+1','-1+1'},
[32]={'-1+0','+0-1','-1-2','+1-1','+1+0','+1+1','+0+2','+0+3'}, [32]={'+0+0','-1+0','+0-1','-1-2','+1-1','+1+0','+1+1','+0+2','+0+3'},
[23]={'+0-2','+0-3','+1+2','+1+0','+0+1','-1+1','+0-1','+0+2'}, [23]={'+0+0','+0-2','+0-3','+1+2','+1+0','+0+1','-1+1','+0-1','+0+2'},
[02]={'-1+0','+0+2','+0-1'}, [02]={'+0+0','-1+0','+0+2','+0-1'},
[20]={'+1+0','+0-2','+0+1'}, [20]={'+0+0','+1+0','+0-2','+0+1'},
[13]={'-1+0','-1-1','+0+1','+1+2'}, [13]={'+0+0','-1+0','-1-1','+0+1','+1+2'},
[31]={'+1+0','+1+1','+0-1','-1-2'}, [31]={'+0+0','+1+0','+1+1','+0-1','-1-2'},
},--N },--N
false,--H false,--H
{ {
[01]={'+1-1','+1+0','+1+1','+0+1','-1+1','-1+0','-1-1','+0-1','+0-2','-2-1','-2-2','+2+0','+2-1','+2-2','+1+2','+2+2','-1+2','-2+2'}, [01]={'+0+0','+1-1','+1+0','+1+1','+0+1','-1+1','-1+0','-1-1','+0-1','+0-2','-2-1','-2-2','+2+0','+2-1','+2-2','+1+2','+2+2','-1+2','-2+2'},
[10]={'-1+0','-1-1','+0-1','+1-1','-2-2','-2-1','-2+0','-1-2','+0-2','+1-2','+2-2','-1+1','-2+1','-2+2','+1+0','+2+0','+2-1','+0+1','+1-1','+2-2'}, [10]={'+0+0','-1+0','-1-1','+0-1','+1-1','-2-2','-2-1','-2+0','-1-2','+0-2','+1-2','+2-2','-1+1','-2+1','-2+2','+1+0','+2+0','+2-1','+0+1','+1-1','+2-2'},
[03]={'-1-1','-1+0','-1+1','-0+1','+1+1','+1+0','+1-1','-0-1','-0-2','+2-1','+2-2','-2+0','-2-1','-2-2','-1+2','-2+2','+1+2','+2+2'}, [03]={'+0+0','-1-1','-1+0','-1+1','-0+1','+1+1','+1+0','+1-1','-0-1','-0-2','+2-1','+2-2','-2+0','-2-1','-2-2','-1+2','-2+2','+1+2','+2+2'},
[30]={'+1+0','+1-1','-0-1','-1-1','+2-2','+2-1','+2+0','+1-2','-0-2','-1-2','-2-2','+1+1','+2+1','+2+2','-1+0','-2+0','-2-1','+0+1','-1-1','-2-2'}, [30]={'+0+0','+1+0','+1-1','-0-1','-1-1','+2-2','+2-1','+2+0','+1-2','-0-2','-1-2','-2-2','+1+1','+2+1','+2+2','-1+0','-2+0','-2-1','+0+1','-1-1','-2-2'},
},--I5 },--I5
{ {
[01]={'-1+0','-1-1','+1+1','-1+1'}, [01]={'+0+0','-1+0','-1-1','+1+1','-1+1'},
[10]={'-1+0','+1+0','-1-1','+1+1'}, [10]={'+0+0','-1+0','+1+0','-1-1','+1+1'},
[03]={'+1+0','+1-1','-1+1','+1+1'}, [03]={'+0+0','+1+0','+1-1','-1+1','+1+1'},
[30]={'+1+0','-1+0','+1-1','-1+1'}, [30]={'+0+0','+1+0','-1+0','+1-1','-1+1'},
},--I3 },--I3
{ {
[01]={'-1+0','+1+0'}, [01]={'+0+0','-1+0','+1+0'},
[10]={'+1+0','-1+0'}, [10]={'+0+0','+1+0','-1+0'},
[03]={'+0+1','+0-1'}, [03]={'+0+0','+0+1','+0-1'},
[30]={'+0-1','+0+1'}, [30]={'+0+0','+0-1','+0+1'},
[12]={'+0+1','+0-1'}, [12]={'+0+0','+0+1','+0-1'},
[21]={'+0-1','+0+1'}, [21]={'+0+0','+0-1','+0+1'},
[32]={'-1+0','+1+0'}, [32]={'+0+0','-1+0','+1+0'},
[23]={'+1+0','-1+0'}, [23]={'+0+0','+1+0','-1+0'},
[02]={'+0-1','+1-1','-1-1'}, [02]={'+0+0','+0-1','+1-1','-1-1'},
[20]={'+0+1','-1+1','+1+1'}, [20]={'+0+0','+0+1','-1+1','+1+1'},
[13]={'+0-1','-1-1','+1-1'}, [13]={'+0+0','+0-1','-1-1','+1-1'},
[31]={'+0+1','+1+1','-1+1'}, [31]={'+0+0','+0+1','+1+1','-1+1'},
},--C },--C
{ {
[01]={'-1+0','+0+1'}, [01]={'+0+0','-1+0','+0+1'},
[10]={'+1+0','+0+1'}, [10]={'+0+0','+1+0','+0+1'},
[03]={'+1+0','+0+1'}, [03]={'+0+0','+1+0','+0+1'},
[30]={'-1+0','+0+1'}, [30]={'+0+0','-1+0','+0+1'},
[12]={'+1+0','+0+2'}, [12]={'+0+0','+1+0','+0+2'},
[21]={'+0-1','-1+0'}, [21]={'+0+0','+0-1','-1+0'},
[32]={'-1+0','+0+2'}, [32]={'+0+0','-1+0','+0+2'},
[23]={'+0-1','-1+0'}, [23]={'+0+0','+0-1','-1+0'},
[02]={'+0-1','+0+1'}, [02]={'+0+0','+0-1','+0+1'},
[20]={'+0+1','+0-1'}, [20]={'+0+0','+0+1','+0-1'},
[13]={'-1+0','+1+0'}, [13]={'+0+0','-1+0','+1+0'},
[31]={'+1+0','-1+0'}, [31]={'+0+0','+1+0','-1+0'},
},--I2 },--I2
nil,--O1 nil,--O1
} }
@@ -428,22 +435,31 @@ do
TRS.kickTable[24]=reflect(TRS.kickTable[23])--NH TRS.kickTable[24]=reflect(TRS.kickTable[23])--NH
centroSymSet(TRS.kickTable[8])centroSymSet(TRS.kickTable[9])--S5Z5 centroSymSet(TRS.kickTable[8])centroSymSet(TRS.kickTable[9])--S5Z5
centroSymSet(TRS.kickTable[25])centroSymSet(TRS.kickTable[26])--I5I3 centroSymSet(TRS.kickTable[25])centroSymSet(TRS.kickTable[26])--I5I3
pushZero(TRS.kickTable)
end end
local SRS local SRS
do do
SRS={ SRS={
centerTex=GC.DO{10,10,
{'setCL',1,1,1,.2},
{'fCirc',5,5,5},
{'setCL',1,1,1,.6},
{'fCirc',5,5,4},
{'setCL',1,1,1,.8},
{'fCirc',5,5,3},
{'setCL',1,1,1},
{'fCirc',5,5,2},
},
kickTable={ kickTable={
{ {
[01]={'-1+0','-1+1','+0-2','-1-2'}, [01]={'+0+0','-1+0','-1+1','+0-2','-1-2'},
[10]={'+1+0','+1-1','+0+2','+1+2'}, [10]={'+0+0','+1+0','+1-1','+0+2','+1+2'},
[03]={'+1+0','+1+1','+0-2','+1-2'}, [03]={'+0+0','+1+0','+1+1','+0-2','+1-2'},
[30]={'-1+0','-1-1','+0+2','-1+2'}, [30]={'+0+0','-1+0','-1-1','+0+2','-1+2'},
[12]={'+1+0','+1-1','+0+2','+1+2'}, [12]={'+0+0','+1+0','+1-1','+0+2','+1+2'},
[21]={'-1+0','-1+1','+0-2','-1-2'}, [21]={'+0+0','-1+0','-1+1','+0-2','-1-2'},
[32]={'-1+0','-1-1','+0+2','-1+2'}, [32]={'+0+0','-1+0','-1-1','+0+2','-1+2'},
[23]={'+1+0','+1+1','+0-2','+1-2'}, [23]={'+0+0','+1+0','+1+1','+0-2','+1-2'},
[02]={},[20]={},[13]={},[31]={}, [02]={},[20]={},[13]={},[31]={},
},--Z },--Z
false,--S false,--S
@@ -452,28 +468,27 @@ do
false,--T false,--T
noKickSet,--O noKickSet,--O
{ {
[01]={'-2+0','+1+0','-2-1','+1+2'}, [01]={'+0+0','-2+0','+1+0','-2-1','+1+2'},
[10]={'+2+0','-1+0','+2+1','-1-2'}, [10]={'+0+0','+2+0','-1+0','+2+1','-1-2'},
[12]={'-1+0','+2+0','-1+2','+2-1'}, [12]={'+0+0','-1+0','+2+0','-1+2','+2-1'},
[21]={'+1+0','-2+0','+1-2','-2+1'}, [21]={'+0+0','+1+0','-2+0','+1-2','-2+1'},
[23]={'+2+0','-1+0','+2+1','-1-2'}, [23]={'+0+0','+2+0','-1+0','+2+1','-1-2'},
[32]={'-2+0','+1+0','-2-1','+1+2'}, [32]={'+0+0','-2+0','+1+0','-2-1','+1+2'},
[30]={'+1+0','-2+0','+1-2','-2+1'}, [30]={'+0+0','+1+0','-2+0','+1-2','-2+1'},
[03]={'-1+0','+2+0','-1+2','+2-1'}, [03]={'+0+0','-1+0','+2+0','-1+2','+2-1'},
[02]={},[20]={},[13]={},[31]={}, [02]={},[20]={},[13]={},[31]={},
}--I }--I
} }
} }
pushZero(SRS.kickTable)
for i=2,5 do SRS.kickTable[i]=SRS.kickTable[1]end for i=2,5 do SRS.kickTable[i]=SRS.kickTable[1]end
for i=8,29 do SRS.kickTable[i]=SRS.kickTable[1]end for i=8,29 do SRS.kickTable[i]=SRS.kickTable[1]end
end end
local BiRS local BiRS
do do
local R={'+0+0','-1+0','-1-1','+0-1','-1+1','+1-1','+1+0','+0+1','+1+1','+0+2','-1+2','+1+2','-2+0','+2+0'} local R=strToVec{'+0+0','-1+0','-1-1','+0-1','-1+1','+1-1','+1+0','+0+1','+1+1','+0+2','-1+2','+1+2','-2+0','+2+0'}
local L={'+0+0','+1+0','+1-1','+0-1','+1+1','-1-1','-1+0','+0+1','-1+1','+0+2','+1+2','-1+2','+2+0','-2+0'} local L=strToVec{'+0+0','+1+0','+1-1','+0-1','+1+1','-1-1','-1+0','+0+1','-1+1','+0+2','+1+2','-1+2','+2+0','-2+0'}
local F={'+0+0','+0-1','+0+1','+0+2'} local F=strToVec{'+0+0','+0-1','+0+1','+0+2'}
local list={ local list={
{[02]=L,[20]=R,[13]=R,[31]=L},--Z {[02]=L,[20]=R,[13]=R,[31]=L},--Z
{[02]=R,[20]=L,[13]=L,[31]=R},--S {[02]=R,[20]=L,[13]=L,[31]=R},--S
@@ -513,79 +528,89 @@ do
list[i][01]=a;list[i][10]=b;list[i][03]=b;list[i][30]=a list[i][01]=a;list[i][10]=b;list[i][03]=b;list[i][30]=a
list[i][12]=a;list[i][21]=b;list[i][32]=b;list[i][23]=a list[i][12]=a;list[i][21]=b;list[i][32]=b;list[i][23]=a
end end
BiRS={} BiRS={
BiRS.kickTable=TABLE.new(function(P,d,ifpre) centerTex=GC.DO{10,10,
local C=P.cur {'setCL',1,1,1,.6},
local idir=(C.dir+d)%4 {'fRect',0,3,10,4},
local kickList=list[C.id][C.dir*10+idir] {'fRect',3,0,4,10},
local icb=BLOCKS[C.id][idir] {'setCL',1,1,1},
local isc=defaultCenterPos[C.id][idir] {'fRect',1,4,8,2},
local ix,iy=P.curX+C.sc[2]-isc[2],P.curY+C.sc[1]-isc[1] {'fRect',4,1,2,8},
local dx,dy=0,0 do {'fRect',3,3,4,4},
local pressing=P.keyPressing },
if pressing[1]and P:ifoverlap(C.bk,P.curX-1,P.curY)then dx=dx-1 end kickTable=TABLE.new(function(P,d,ifpre)
if pressing[2]and P:ifoverlap(C.bk,P.curX+1,P.curY)then dx=dx+1 end local C=P.cur
if pressing[7]and P:ifoverlap(C.bk,P.curX,P.curY-1)then dy= -1 end local idir=(C.dir+d)%4
end local kickList=list[C.id][C.dir*10+idir]
while true do local icb=BLOCKS[C.id][idir]
for test=1,#kickList do local isc=defaultCenterPos[C.id][idir]
local fdx,fdy=kickList[test][1]+dx,kickList[test][2]+dy local ix,iy=P.curX+C.sc[2]-isc[2],P.curY+C.sc[1]-isc[1]
if local dx,dy=0,0 do
dx*fdx>=0 and local pressing=P.keyPressing
fdx^2+fdy^2<=5 and if pressing[1]and P:ifoverlap(C.bk,P.curX-1,P.curY)then dx=dx-1 end
(P.freshTime>0 or fdy<=0) if pressing[2]and P:ifoverlap(C.bk,P.curX+1,P.curY)then dx=dx+1 end
then if pressing[7]and P:ifoverlap(C.bk,P.curX,P.curY-1)then dy= -1 end
local x,y=ix+fdx,iy+fdy end
if not P:ifoverlap(icb,x,y)then while true do
if P.gameEnv.moveFX and P.gameEnv.block then for test=1,#kickList do
P:createMoveFX() local fdx,fdy=kickList[test][1]+dx,kickList[test][2]+dy
end if
P.curX,P.curY,C.dir=x,y,idir dx*fdx>=0 and
C.sc,C.bk=isc,icb fdx^2+fdy^2<=5 and
P.spinLast=test==2 and 0 or 1 (P.freshTime>0 or fdy<=0)
then
local t=P.freshTime local x,y=ix+fdx,iy+fdy
if not ifpre then if not P:ifoverlap(icb,x,y)then
P:freshBlock('move') if P.gameEnv.moveFX and P.gameEnv.block then
end P:createMoveFX()
if fdy>0 and P.freshTime==t and P.curY~=P.imgY then
P.freshTime=P.freshTime-1
end
if P.sound then
local sfx
if ifpre then
sfx='prerotate'
elseif P:ifoverlap(icb,x,y+1)and P:ifoverlap(icb,x-1,y)and P:ifoverlap(icb,x+1,y)then
sfx='rotatekick'
if P.gameEnv.shakeFX then
if d==1 or d==3 then
P.fieldOff.va=P.fieldOff.va+(2-d)*P.gameEnv.shakeFX*6e-3
else
P.fieldOff.va=P.fieldOff.va+P:getCenterX()*P.gameEnv.shakeFX*3e-3
end
end
else
sfx='rotate'
end end
SFX.play(sfx,nil,P:getCenterX()*.15) P.curX,P.curY,C.dir=x,y,idir
C.sc,C.bk=isc,icb
P.spinLast=test==2 and 0 or 1
local t=P.freshTime
if not ifpre then
P:freshBlock('move')
end
if fdy>0 and P.freshTime==t and P.curY~=P.imgY then
P.freshTime=P.freshTime-1
end
if P.sound then
local sfx
if ifpre then
sfx='prerotate'
elseif P:ifoverlap(icb,x,y+1)and P:ifoverlap(icb,x-1,y)and P:ifoverlap(icb,x+1,y)then
sfx='rotatekick'
if P.gameEnv.shakeFX then
if d==1 or d==3 then
P.fieldOff.va=P.fieldOff.va+(2-d)*P.gameEnv.shakeFX*6e-3
else
P.fieldOff.va=P.fieldOff.va+P:getCenterX()*P.gameEnv.shakeFX*3e-3
end
end
else
sfx='rotate'
end
SFX.play(sfx,nil,P:getCenterX()*.15)
end
P.stat.rotate=P.stat.rotate+1
return
end end
P.stat.rotate=P.stat.rotate+1
return
end end
end end
end
--Try release left/right, then softdrop, failed to rotate otherwise --Try release left/right, then softdrop, failed to rotate otherwise
if dx~=0 then if dx~=0 then
dx=0 dx=0
elseif dy~=0 then elseif dy~=0 then
dy=0 dy=0
else else
return return
end
end end
end end,29)
end,29) }
end end
local ASC local ASC
@@ -597,6 +622,16 @@ do
centerPos[6]={[0]={0,0},{1,0},{1,1},{0,1}} centerPos[6]={[0]={0,0},{1,0},{1,1},{0,1}}
centerPos[7]={[0]={0,1},{2,0},{0,2},{1,0}} centerPos[7]={[0]={0,1},{2,0},{0,2},{1,0}}
ASC={ ASC={
centerTex=GC.DO{10,10,
{'setLW',2},
{'setCL',1,1,1,.7},
{'line',1,1,9,9},
{'line',1,9,9,1},
{'setLW',1},
{'setCL',1,1,1},
{'line',1,1,9,9},
{'line',1,9,9,1},
},
centerPos=centerPos, centerPos=centerPos,
kickTable=TABLE.new({ kickTable=TABLE.new({
[01]=R,[10]=L,[03]=L,[30]=R, [01]=R,[10]=L,[03]=L,[30]=R,
@@ -615,6 +650,17 @@ do
centerPos[6]={[0]={0,0},{1,0},{1,1},{0,1}} centerPos[6]={[0]={0,0},{1,0},{1,1},{0,1}}
centerPos[7]={[0]={0,1},{2,0},{0,2},{1,0}} centerPos[7]={[0]={0,1},{2,0},{0,2},{1,0}}
ASC_plus={ ASC_plus={
centerTex=GC.DO{10,10,
{'setLW',2},
{'setCL',1,1,1,.7},
{'line',1,1,9,9},
{'line',1,9,9,1},
{'setLW',1},
{'setCL',1,1,1},
{'line',1,1,9,9},
{'line',1,9,9,1},
{'fCirc',5,5,3},
},
centerPos=centerPos, centerPos=centerPos,
kickTable=TABLE.new({ kickTable=TABLE.new({
[01]=R,[12]=R,[23]=R,[30]=R, [01]=R,[12]=R,[23]=R,[30]=R,
@@ -628,6 +674,10 @@ local C2
do do
local L={'+0+0','-1+0','+1+0','+0-1','-1-1','+1-1','-2+0','+2+0'} local L={'+0+0','-1+0','+1+0','+0-1','-1-1','+1-1','-2+0','+2+0'}
C2={ C2={
centerTex=GC.DO{10,10,
{'setLW',2},
{'dRect',2,2,6,6},
},
kickTable=TABLE.new({ kickTable=TABLE.new({
[01]=L,[10]=L,[12]=L,[21]=L, [01]=L,[10]=L,[12]=L,[21]=L,
[23]=L,[32]=L,[30]=L,[03]=L, [23]=L,[32]=L,[30]=L,[03]=L,
@@ -649,6 +699,11 @@ do
local S=reflect(Z) local S=reflect(Z)
C2_sym={ C2_sym={
centerTex=GC.DO{10,10,
{'setLW',2},
{'dRect',1,1,8,8},
{'fRect',3,3,4,4},
},
kickTable={ kickTable={
Z,S,--Z,S Z,S,--Z,S
Z,S,--J,L Z,S,--J,L
@@ -696,9 +751,22 @@ local Classic_plus do
} }
end end
local None={kickTable=TABLE.new(noKickSet_180,29)} local None={
centerTex=GC.DO{10,10,
{'setLW',2},
{'line',2,2,6,6},
},
kickTable=TABLE.new(noKickSet_180,29)
}
local None_plus={kickTable=TABLE.new(noKickSet,29)} local None_plus={
centerTex=GC.DO{10,10,
{'setLW',2},
{'line',1,1,7,7},
{'fRect',2,2,4,4},
},
kickTable=TABLE.new(noKickSet,29)
}
local RSlist={ local RSlist={
TRS=TRS, TRS=TRS,
@@ -717,15 +785,14 @@ local RSlist={
for _,rs in next,RSlist do for _,rs in next,RSlist do
if not rs.centerDisp then rs.centerDisp=TABLE.new(true,29)end if not rs.centerDisp then rs.centerDisp=TABLE.new(true,29)end
if not rs.centerPos then rs.centerPos=defaultCenterPos end if not rs.centerPos then rs.centerPos=defaultCenterPos end
if not rs.centerTex then rs.centerTex=defaultCenterTex end
--Make all string vec to the same table vec --Make all string vec to the same table vec
for _,set in next,rs.kickTable do for _,set in next,rs.kickTable do
if type(set)=='table'then if type(set)=='table'then
for _,list in next,set do for _,list in next,set do
if type(list[1])=='string'then if type(list[1])=='string'then
for i,vecStr in next,list do strToVec(list)
list[i]=map[tonumber(vecStr:sub(1,2))][tonumber(vecStr:sub(3,4))]
end
end end
end end
end end

View File

@@ -43,16 +43,6 @@ local multiple=GC.DO{15,15,
{'line',2,2,12,12}, {'line',2,2,12,12},
{'line',2,12,12,2}, {'line',2,12,12,2},
} }
local spinCenterImg=GC.DO{9,9,
{'setCL',1,1,1,.2},
{'fRect',0,0,9,9},
{'setCL',1,1,1,.6},
{'fRect',1,1,7,7},
{'setCL',1,1,1,.8},
{'fRect',2,2,5,5},
{'setCL',1,1,1},
{'fRect',3,3,3,3},
}
local playerBoarder=GC.DO{334,620, local playerBoarder=GC.DO{334,620,
{'setLW',2}, {'setLW',2},
{'setCL',.97,.97,.975}, {'setCL',.97,.97,.975},
@@ -708,7 +698,7 @@ function draw.norm(P)
local curColor=C.color local curColor=C.color
local trans=P.lockDelay/ENV.lock local trans=P.lockDelay/ENV.lock
local centerX=30*(P.curX+C.sc[2])-15 local centerX=30*(P.curX+C.sc[2])-20
--Draw ghost & rotation center --Draw ghost & rotation center
local centerDisp=ENV.center and P.RS.centerDisp[C.id] local centerDisp=ENV.center and P.RS.centerDisp[C.id]
@@ -716,7 +706,7 @@ function draw.norm(P)
drawGhost[ENV.ghostType](P,curColor,ENV.ghost) drawGhost[ENV.ghostType](P,curColor,ENV.ghost)
if centerDisp then if centerDisp then
gc_setColor(1,1,1,ENV.center) gc_setColor(1,1,1,ENV.center)
gc_draw(spinCenterImg,centerX,-30*(P.ghoY+C.sc[1])+15,nil,nil,nil,4,4) gc_draw(P.RS.centerTex,centerX,-30*(P.ghoY+C.sc[1])+10)
end end
elseif replaying then elseif replaying then
drawGhost.gray(P,nil,.15) drawGhost.gray(P,nil,.15)
@@ -730,7 +720,7 @@ function draw.norm(P)
drawBlock(P,curColor) drawBlock(P,curColor)
if centerDisp then if centerDisp then
gc_setColor(1,1,1,ENV.center) gc_setColor(1,1,1,ENV.center)
gc_draw(spinCenterImg,centerX,-30*(P.curY+C.sc[1])+15,nil,nil,nil,4,4) gc_draw(P.RS.centerTex,centerX,-30*(P.curY+C.sc[1])+10)
end end
elseif replaying then elseif replaying then
drawBlockShade(P,trans*.3) drawBlockShade(P,trans*.3)