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

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

View File

@@ -43,16 +43,6 @@ local multiple=GC.DO{15,15,
{'line',2,2,12,12},
{'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,
{'setLW',2},
{'setCL',.97,.97,.975},
@@ -708,7 +698,7 @@ function draw.norm(P)
local curColor=C.color
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
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)
if centerDisp then
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
elseif replaying then
drawGhost.gray(P,nil,.15)
@@ -730,7 +720,7 @@ function draw.norm(P)
drawBlock(P,curColor)
if centerDisp then
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
elseif replaying then
drawBlockShade(P,trans*.3)