0.8.19/20: Fantastic Global Update II
This commit is contained in:
@@ -1,10 +1,68 @@
|
||||
return{
|
||||
{3,3,3,0,0,0,0,0,2,2},
|
||||
{3,6,6,0,0,0,0,2,2,5},
|
||||
{4,6,6,0,0,0,1,1,5,5},
|
||||
{4,4,4,0,0,0,0,1,1,5},
|
||||
{1,1,0,0,0,0,0,4,4,4},
|
||||
{5,1,1,0,0,0,0,6,6,4},
|
||||
{5,5,2,2,0,0,0,6,6,3},
|
||||
{5,2,2,0,0,0,0,3,3,3},
|
||||
{
|
||||
{
|
||||
{4,4,4,3,3,3,7,0,0,0},
|
||||
{4,1,6,6,2,3,7,0,0,0},
|
||||
{1,1,6,6,2,2,7,0,0,0},
|
||||
{1,7,7,7,7,2,7,0,0,0},
|
||||
},
|
||||
{
|
||||
{4,4,4,3,3,3,0,0,0,7},
|
||||
{4,1,6,6,2,3,0,0,0,7},
|
||||
{1,1,6,6,2,2,0,0,0,7},
|
||||
{1,7,7,7,7,2,0,0,0,7},
|
||||
},
|
||||
{
|
||||
{2,7,7,7,7,1,7,0,0,0},
|
||||
{2,2,6,6,1,1,7,0,0,0},
|
||||
{3,2,6,6,1,4,7,0,0,0},
|
||||
{3,3,3,4,4,4,7,0,0,0},
|
||||
},
|
||||
{
|
||||
{2,7,7,7,7,1,0,0,0,7},
|
||||
{2,2,6,6,1,1,0,0,0,7},
|
||||
{3,2,6,6,1,4,0,0,0,7},
|
||||
{3,3,3,4,4,4,0,0,0,7},
|
||||
},
|
||||
},--3*4 shape
|
||||
{
|
||||
{
|
||||
{1,1,0,0,0,0,0,3,3,3},
|
||||
{5,1,1,0,0,0,0,6,6,3},
|
||||
{5,5,2,2,0,0,0,6,6,4},
|
||||
{5,2,2,0,0,0,0,4,4,4},
|
||||
},
|
||||
{
|
||||
{1,1,0,0,0,0,0,4,4,4},
|
||||
{5,1,1,0,0,0,0,4,6,6},
|
||||
{5,5,2,2,0,0,0,3,6,6},
|
||||
{5,2,2,0,0,0,0,3,3,3},
|
||||
},
|
||||
{
|
||||
{3,3,3,1,1,0,0,0,0,0},
|
||||
{6,6,3,5,1,1,0,0,0,0},
|
||||
{6,6,4,5,5,2,2,0,0,0},
|
||||
{4,4,4,5,2,2,0,0,0,0},
|
||||
},
|
||||
{
|
||||
{4,4,4,1,1,0,0,0,0,0},
|
||||
{4,6,6,5,1,1,0,0,0,0},
|
||||
{3,6,6,5,5,2,2,0,0,0},
|
||||
{3,3,3,5,2,2,0,0,0,0},
|
||||
},
|
||||
},--7 piece opener(right>)(without i)
|
||||
{
|
||||
{
|
||||
{4,4,4,3,3,3,0,0,0,0},
|
||||
{4,1,6,6,2,3,0,0,0,0},
|
||||
{1,1,6,6,2,2,0,0,0,0},
|
||||
{1,7,7,7,7,2,0,0,0,0},
|
||||
},
|
||||
{
|
||||
{2,7,7,7,7,1,0,0,0,0},
|
||||
{2,2,6,6,1,1,0,0,0,0},
|
||||
{3,2,6,6,1,4,0,0,0,0},
|
||||
{3,3,3,4,4,4,0,0,0,0},
|
||||
},
|
||||
},--6 piece opener
|
||||
}
|
||||
@@ -1,11 +1,77 @@
|
||||
return{
|
||||
{7,7,4,5},{7,7,6,4},{7,7,2,4},{7,7,1,3},{7,7,5,6},{7,7,5,2},{7,7,5,4},{7,7,5,3},
|
||||
{7,4,1,2},{7,3,5,7},{7,5,4,3},{7,5,1,2},{7,1,4,2},{7,4,2,5},{7,6,4,5},{7,5,4,2},
|
||||
{7,5,6,4},{7,5,3,6},{7,2,5,6},{7,2,6,4},{7,2,1,3},{7,5,2,7},{7,5,7,2},{7,5,2,3},
|
||||
{7,5,3,2},{7,6,5,4},{7,3,1,5},{7,3,2,5},{7,4,1,5},{7,4,5,2},{7,7,3,6},{7,3,7,6},
|
||||
{7,3,6,2},{7,3,7,1},{7,6,4,2},{3,2,7,6},{3,2,6,7},{7,7,4,5},{7,5,3,4},{7,3,6,5},
|
||||
{7,3,2,5},{7,4,6,5},{7,5,2,3},{7,3,5,7},{7,3,2,5},{7,3,5,1},{7,5,2,3},{3,6,2,5},
|
||||
{3,1,2,5},{3,1,1,5},{3,1,5,2},{3,1,5,1},{3,5,1,2},{4,5,3,2},{4,2,6,5},{6,5,3,2},
|
||||
{1,4,2,5},{1,5,3,6},{5,2,6,3},{5,2,1,3},{5,2,7,4},{2,4,1,5},{2,4,5,1},{2,1,4,5},
|
||||
{2,5,4,3},{2,5,6,7},{7,5,4,2},{4,5,3,5},
|
||||
{
|
||||
{1,3,3},{1,3,4},{1,5,3},{3,1,3},{3,1,4},{3,2,4},{3,3,2},{3,3,5},{3,3,6},{3,3,7},
|
||||
{3,4,1},{3,4,5},{3,4,6},{3,5,3},{3,5,4},{3,5,5},{3,6,3},{3,6,4},{3,7,3},{3,7,4},
|
||||
{5,3,4},{5,3,5},{5,5,1},{5,5,3},{5,7,3},{6,3,3},{6,3,4},{6,6,7},{6,7,6},{7,3,3},
|
||||
{7,3,4},{7,5,3},{7,6,6},{7,7,7},
|
||||
},--3*4 shape
|
||||
{
|
||||
{5,3,4,4},{5,3,7,7},{5,7,4,4},{4,2,4,4},{3,5,4,4},{3,4,5,4},{3,3,7,4},{7,5,4,4},{1,5,1,1},{1,5,5,5},
|
||||
{1,5,7,4},{1,2,4,5},{1,4,5,5},{1,4,5,2},{1,4,2,5},{1,4,4,4},{5,1,4,5},{5,5,4,1},{5,5,4,2},{5,5,4,4},
|
||||
{5,4,5,4},{5,4,4,5},{5,4,4,3},{5,7,4,6},{5,7,4,3},{2,5,4,4},{6,4,4,4},{6,7,4,6},{4,1,2,5},{4,1,4,4},
|
||||
{4,5,4,5},{4,5,7,7},{4,6,4,4},{4,4,6,4},{4,4,3,5},{4,4,3,6},{4,3,4,5},{4,3,4,6},{4,7,3,4},{4,7,7,5},
|
||||
{3,1,4,4},{3,1,4,3},{3,1,3,4},{3,5,5,4},{3,5,4,5},{3,5,7,7},{3,2,5,2},{3,2,4,4},{3,6,4,4},{3,6,3,3},
|
||||
{3,4,1,3},{3,4,4,5},{3,4,4,6},{3,4,3,7},{3,3,6,3},{3,7,5,7},{3,7,4,3},{3,7,3,4},{7,5,4,6},{7,5,4,3},
|
||||
{7,5,3,4},{7,5,7,1},{7,6,4,6},{7,4,1,5},{7,4,5,6},{7,4,3,4},{7,4,7,5},{7,3,1,5},{7,3,5,7},{7,3,4,4},
|
||||
{7,3,3,4},{7,3,7,5},{7,7,4,5},{7,7,7,4},{1,1,5,2},{1,1,7,4},{1,5,1,2},{1,5,1,3},{1,5,5,2},{1,5,2,1},
|
||||
{1,5,2,3},{1,5,6,3},{1,5,6,7},{1,5,4,1},{1,5,4,5},{1,5,4,2},{1,5,4,3},{1,5,4,7},{1,5,3,1},{1,5,3,4},
|
||||
{1,5,7,2},{1,5,7,6},{1,5,7,7},{1,2,5,1},{1,2,5,4},{1,2,7,4},{1,4,1,5},{1,4,5,1},{1,4,5,4},{1,4,6,5},
|
||||
{1,4,4,3},{1,4,3,3},{1,3,1,2},{1,3,5,2},{1,3,4,4},{1,3,4,3},{1,3,3,4},{1,7,1,4},{1,7,5,6},{1,7,5,4},
|
||||
{1,7,5,3},{1,7,5,7},{1,7,2,3},{1,7,6,4},{1,7,4,1},{1,7,4,5},{1,7,4,7},{1,7,3,1},{1,7,7,4},{5,1,5,5},
|
||||
{5,1,5,2},{5,1,5,4},{5,1,2,3},{5,1,6,3},{5,1,4,1},{5,1,4,2},{5,1,4,7},{5,1,7,2},{5,1,7,4},{5,5,1,5},
|
||||
{5,5,1,2},{5,5,1,4},{5,5,5,1},{5,5,5,2},{5,5,5,4},{5,5,5,7},{5,5,2,1},{5,5,2,5},{5,5,6,7},{5,5,4,5},
|
||||
{5,5,4,3},{5,5,3,1},{5,5,3,4},{5,5,7,5},{5,5,7,6},{5,2,1,3},{5,2,5,4},{5,2,4,5},{5,2,3,1},{5,2,3,6},
|
||||
{5,2,7,1},{5,6,1,3},{5,6,5,7},{5,6,6,1},{5,4,1,5},{5,4,1,7},{5,4,5,1},{5,4,5,5},{5,4,5,2},{5,4,5,3},
|
||||
{5,4,2,5},{5,4,4,1},{5,4,4,4},{5,4,3,1},{5,4,3,5},{5,4,3,4},{5,4,7,1},{5,3,5,4},{5,3,5,3},{5,3,2,2},
|
||||
{5,3,6,6},{5,3,4,1},{5,3,4,5},{5,3,4,3},{5,3,3,1},{5,3,3,4},{5,3,3,3},{5,7,1,2},{5,7,1,4},{5,7,1,3},
|
||||
{5,7,5,5},{5,7,5,7},{5,7,2,1},{5,7,6,4},{5,7,6,7},{5,7,4,1},{5,7,4,2},{5,7,4,7},{5,7,3,1},{5,7,3,2},
|
||||
{5,7,3,6},{5,7,3,4},{5,7,3,7},{5,7,7,1},{5,7,7,6},{5,7,7,4},{5,7,7,3},{2,1,5,1},{2,1,4,5},{2,1,7,4},
|
||||
{2,5,1,1},{2,5,4,5},{2,5,3,6},{2,4,1,5},{2,4,4,4},{2,4,4,3},{2,3,5,6},{2,7,1,4},{2,7,5,5},{2,7,4,1},
|
||||
{2,7,3,7},{2,7,7,3},{6,5,6,1},{6,5,3,1},{6,6,5,1},{6,6,4,5},{6,6,7,4},{6,4,6,5},{6,4,7,5},{6,3,4,3},
|
||||
{6,3,3,4},{6,7,6,4},{6,7,4,1},{6,7,4,5},{6,7,4,7},{6,7,7,4},{4,1,1,5},{4,1,5,1},{4,1,5,5},{4,1,5,2},
|
||||
{4,1,5,7},{4,1,6,5},{4,1,4,3},{4,1,3,4},{4,1,3,3},{4,1,7,5},{4,5,5,4},{4,5,4,1},{4,5,4,4},{4,5,4,3},
|
||||
{4,5,3,1},{4,5,3,5},{4,2,1,5},{4,2,4,3},{4,2,3,4},{4,6,6,5},{4,6,4,3},{4,6,3,4},{4,4,1,4},{4,4,1,3},
|
||||
{4,4,5,1},{4,4,5,4},{4,4,5,3},{4,4,2,4},{4,4,4,1},{4,4,4,5},{4,4,4,6},{4,4,7,4},{4,4,7,3},{4,3,6,4},
|
||||
{4,3,4,7},{4,3,3,5},{4,3,7,4},{4,7,1,5},{4,7,5,6},{4,7,5,7},{4,7,2,1},{4,7,2,5},{4,7,6,5},{4,7,4,4},
|
||||
{4,7,4,3},{3,1,1,2},{3,1,5,1},{3,1,5,2},{3,1,2,1},{3,1,6,5},{3,1,6,7},{3,1,7,6},{3,5,1,2},{3,5,5,1},
|
||||
{3,5,5,6},{3,5,5,3},{3,5,2,1},{3,5,2,2},{3,5,6,5},{3,5,6,6},{3,5,4,1},{3,5,4,3},{3,5,3,1},{3,5,3,5},
|
||||
{3,5,3,4},{3,5,3,3},{3,2,1,5},{3,2,5,1},{3,2,2,5},{3,6,1,5},{3,6,1,7},{3,6,5,5},{3,6,5,6},{3,6,6,5},
|
||||
{3,6,4,3},{3,6,3,4},{3,4,5,3},{3,4,2,4},{3,4,6,4},{3,4,6,3},{3,4,3,1},{3,4,3,5},{3,4,3,2},{3,4,3,6},
|
||||
{3,4,7,3},{3,3,1,4},{3,3,5,1},{3,3,5,4},{3,3,5,3},{3,3,6,4},{3,3,4,1},{3,3,4,5},{3,3,4,2},{3,3,4,6},
|
||||
{3,3,4,7},{3,3,3,1},{3,3,3,5},{3,3,3,6},{3,7,1,5},{3,7,5,1},{3,7,5,2},{3,7,2,5},{3,7,6,5},{3,7,7,5},
|
||||
{7,1,1,4},{7,1,5,6},{7,1,5,4},{7,1,5,3},{7,1,5,7},{7,1,2,3},{7,1,6,4},{7,1,4,1},{7,1,4,5},{7,1,4,7},
|
||||
{7,1,3,1},{7,1,7,4},{7,5,1,2},{7,5,1,6},{7,5,1,4},{7,5,1,3},{7,5,1,7},{7,5,5,5},{7,5,5,7},{7,5,2,1},
|
||||
{7,5,6,4},{7,5,6,7},{7,5,4,1},{7,5,4,2},{7,5,4,7},{7,5,3,1},{7,5,3,2},{7,5,3,6},{7,5,3,7},{7,5,7,6},
|
||||
{7,5,7,4},{7,5,7,3},{7,2,1,4},{7,2,1,3},{7,2,5,5},{7,2,4,1},{7,2,3,7},{7,2,7,3},{7,6,1,4},{7,6,5,4},
|
||||
{7,6,6,4},{7,6,4,1},{7,6,4,5},{7,6,4,7},{7,6,7,4},{7,4,5,1},{7,4,5,2},{7,4,5,7},{7,4,2,1},{7,4,2,5},
|
||||
{7,4,6,5},{7,4,4,4},{7,4,4,3},{7,3,5,1},{7,3,5,2},{7,3,5,6},{7,3,5,4},{7,3,2,5},{7,3,2,7},{7,3,6,1},
|
||||
{7,3,6,5},{7,3,4,3},{7,3,7,2},{7,3,7,6},{7,7,1,4},{7,7,5,1},{7,7,5,6},{7,7,5,4},{7,7,5,3},{7,7,2,3},
|
||||
{7,7,6,4},{7,7,6,3},{7,7,4,7},{7,7,3,6},
|
||||
},--7 piece opener (right>)
|
||||
{
|
||||
{1,1,3,4},{1,1,4,3},{1,2,5,3},{1,2,5,4},{1,3,4,7},{1,3,5,5},{1,3,7,3},{1,3,7,4},{1,4,1,4},{1,4,4,6},
|
||||
{1,5,2,3},{1,5,3,2},{1,5,3,5},{1,5,4,7},{1,5,5,2},{1,5,5,4},{1,5,5,5},{1,5,7,3},{1,5,7,4},{1,6,3,3},
|
||||
{1,6,5,3},{1,7,3,3},{1,7,3,4},{1,7,5,3},{1,7,5,4},{3,1,3,7},{3,1,4,7},{3,1,5,5},{3,1,6,3},{3,1,7,3},
|
||||
{3,1,7,4},{3,2,2,3},{3,2,3,2},{3,2,3,6},{3,2,4,5},{3,2,4,7},{3,2,5,5},{3,2,6,3},{3,2,6,4},{3,2,7,4},
|
||||
{3,3,1,5},{3,3,2,6},{3,3,2,7},{3,3,3,3},{3,3,3,4},{3,3,4,3},{3,3,4,4},{3,3,5,3},{3,3,5,4},{3,3,6,1},
|
||||
{3,3,6,6},{3,3,6,7},{3,3,7,2},{3,3,7,5},{3,3,7,6},{3,3,7,7},{3,4,1,2},{3,4,1,5},{3,4,1,7},{3,4,2,1},
|
||||
{3,4,2,5},{3,4,2,7},{3,4,3,3},{3,4,3,4},{3,4,4,3},{3,4,4,4},{3,4,5,3},{3,4,5,4},{3,4,5,7},{3,4,6,1},
|
||||
{3,4,6,2},{3,4,6,7},{3,4,7,1},{3,4,7,2},{3,4,7,5},{3,4,7,6},{3,5,1,2},{3,5,2,3},{3,5,2,5},{3,5,3,2},
|
||||
{3,5,3,3},{3,5,3,4},{3,5,4,3},{3,5,4,6},{3,5,4,7},{3,5,5,5},{3,5,5,7},{3,5,6,4},{3,5,7,3},{3,5,7,4},
|
||||
{3,5,7,5},{3,6,1,3},{3,6,2,3},{3,6,2,4},{3,6,3,1},{3,6,3,5},{3,6,3,6},{3,6,3,7},{3,6,4,2},{3,6,4,7},
|
||||
{3,6,5,4},{3,6,6,3},{3,6,6,4},{3,6,7,3},{3,6,7,4},{3,7,1,3},{3,7,1,4},{3,7,2,4},{3,7,3,2},{3,7,3,5},
|
||||
{3,7,3,6},{3,7,3,7},{3,7,4,1},{3,7,4,2},{3,7,4,5},{3,7,4,6},{3,7,5,3},{3,7,5,4},{3,7,5,5},{3,7,6,3},
|
||||
{3,7,6,4},{3,7,7,3},{3,7,7,4},{5,1,2,3},{5,1,3,2},{5,1,3,4},{5,1,4,1},{5,1,4,7},{5,1,5,4},{5,1,5,5},
|
||||
{5,1,7,4},{5,3,1,2},{5,3,1,4},{5,3,2,5},{5,3,3,3},{5,3,3,4},{5,3,3,6},{5,3,4,3},{5,3,5,2},{5,3,5,4},
|
||||
{5,3,5,5},{5,3,5,7},{5,3,7,4},{5,3,7,5},{5,5,1,2},{5,5,1,4},{5,5,3,2},{5,5,3,3},{5,5,3,4},{5,5,3,5},
|
||||
{5,5,3,7},{5,5,5,1},{5,5,5,5},{5,5,6,3},{5,5,6,7},{5,5,7,1},{5,5,7,3},{5,5,7,6},{5,6,3,5},{5,6,3,6},
|
||||
{5,6,3,7},{5,6,5,3},{5,6,6,3},{5,6,7,3},{5,7,1,4},{5,7,3,4},{5,7,3,5},{5,7,5,1},{5,7,5,3},{5,7,5,6},
|
||||
{5,7,6,3},{5,7,7,3},{6,1,3,3},{6,3,3,5},{6,3,3,6},{6,3,3,7},{6,3,4,7},{6,3,6,3},{6,3,6,4},{6,3,7,3},
|
||||
{6,3,7,4},{6,5,3,5},{6,5,3,6},{6,5,3,7},{6,5,6,3},{6,5,7,3},{6,6,3,3},{6,6,3,4},{6,6,5,3},{6,6,6,6},
|
||||
{6,6,7,7},{6,7,3,3},{6,7,3,4},{6,7,5,3},{6,7,6,7},{6,7,7,6},{7,1,3,3},{7,1,3,4},{7,1,5,3},{7,1,5,4},
|
||||
{7,3,1,3},{7,3,1,4},{7,3,2,4},{7,3,3,2},{7,3,3,5},{7,3,3,6},{7,3,3,7},{7,3,4,1},{7,3,4,2},{7,3,4,5},
|
||||
{7,3,4,6},{7,3,5,3},{7,3,5,4},{7,3,5,5},{7,3,6,3},{7,3,6,4},{7,3,7,3},{7,3,7,4},{7,5,1,4},{7,5,3,4},
|
||||
{7,5,3,5},{7,5,5,1},{7,5,5,3},{7,5,5,6},{7,5,6,3},{7,5,7,3},{7,6,3,3},{7,6,3,4},{7,6,5,3},{7,6,6,7},
|
||||
{7,6,7,6},{7,7,3,3},{7,7,3,4},{7,7,5,3},{7,7,6,6},{7,7,7,7},
|
||||
},--6 piece opener
|
||||
}
|
||||
@@ -77,7 +77,7 @@ if system=="Windows"then
|
||||
collectgarbage()
|
||||
end
|
||||
end
|
||||
-------------------------------------------------⑨Stack setup
|
||||
-------------------------------------------------9 Stack setup
|
||||
local dirCount={1,1,3,3,3,0,1}
|
||||
local spinOffset={
|
||||
{[0]=0,1,0,0},--Z
|
||||
@@ -180,7 +180,7 @@ local function getScore(field,cb,cy)
|
||||
HclearScore[clear]--Clearing
|
||||
-hole*70--Hole
|
||||
-cy*50--Height
|
||||
-sdh--∫Δh
|
||||
-sdh--Sum of DeltaH
|
||||
or
|
||||
LclearScore[clear]
|
||||
-hole*100
|
||||
|
||||
@@ -168,7 +168,7 @@ function BGdraw.matrix()
|
||||
local _=ceil(scr.h/80)
|
||||
for i=1,ceil(scr.w/80)do
|
||||
for j=1,_ do
|
||||
gc.setColor(1,1,1,sin(matrixT[i][j]*t)*.1+.1)
|
||||
gc.setColor(1,1,1,sin(i+matrixT[i][j]*t)*.1+.1)
|
||||
gc.rectangle("fill",80*i,80*j,-80,-80)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -5,13 +5,14 @@ local BGM={}
|
||||
-- BGM.suspend=[str:pausing ID]
|
||||
-- BGM.playing=[src:playing SRC]
|
||||
BGM.list={
|
||||
"blank","way","newera","infinite","reason",
|
||||
"race","push","secret7th","secret8th",
|
||||
"rockblock","cruelty","final","8-bit happiness","end",
|
||||
"blank","way","race","newera","push",
|
||||
"reason","infinite","secret7th","secret8th",
|
||||
"shining terminal","oxygen","distortion",
|
||||
"rockblock","cruelty","final","8-bit happiness","end",
|
||||
}
|
||||
BGM.len=#BGM.list
|
||||
function BGM.loadOne(_)
|
||||
_,BGM.list[_]=BGM.list[_]
|
||||
local _=BGM.list[_]
|
||||
BGM.list[_]=love.audio.newSource("/BGM/".._..".ogg","stream")
|
||||
BGM.list[_]:setLooping(true)
|
||||
BGM.list[_]:setVolume(0)
|
||||
|
||||
@@ -136,10 +136,6 @@ function File.loadData()
|
||||
if s then
|
||||
setfenv(s,{})
|
||||
local S=s()
|
||||
if S.version~=gameVersion then
|
||||
S.version=gameVersion
|
||||
TEXT.show(text.newVersion,640,200,30,"fly",.3)
|
||||
end
|
||||
if not S.version or S.version=="Alpha V0.8.15"then
|
||||
S.clear_S={S.clear_1,S.clear_2,S.clear_3,S.clear_4}
|
||||
S.clear={{},{},{},{},{},{},{}}
|
||||
@@ -184,6 +180,35 @@ function File.loadData()
|
||||
S.clear[i][4]=0
|
||||
end
|
||||
end
|
||||
if not S.clear_B[8]then
|
||||
for i=1,7 do
|
||||
S.clear[i][5]=0
|
||||
S.spin[i][5]=0
|
||||
end
|
||||
for i=8,25 do
|
||||
S.clear[i]={0,0,0,0,0}
|
||||
S.spin[i]={0,0,0,0,0}
|
||||
S.spin_B[i]=0
|
||||
S.clear_B[i]=0
|
||||
end
|
||||
S.spin_S[5]=0
|
||||
S.clear_S[5]=0
|
||||
end
|
||||
if S.version=="Alpha V0.8.18"or S.version=="Alpha V0.8.19"then
|
||||
S.clear[3],S.clear[4]=S.clear[4],S.clear[3]
|
||||
S.spin[3],S.spin[4]=S.spin[4],S.spin[3]
|
||||
S.clear_B[3],S.clear_B[4]=S.clear_B[4],S.clear_B[3]
|
||||
S.spin_B[3],S.spin_B[4]=S.spin_B[4],S.spin_B[3]
|
||||
end
|
||||
if #modeRanks==76 then
|
||||
for i=1,4 do
|
||||
table.remove(modeRanks)
|
||||
end
|
||||
end
|
||||
if S.version~=gameVersion then
|
||||
S.version=gameVersion
|
||||
TEXT.show(text.newVersion,640,200,30,"fly",.3)
|
||||
end
|
||||
addToTable(S,stat)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -13,31 +13,37 @@ if setting.lang==1 then
|
||||
"2+2=Miya",
|
||||
"225238922 哔哩哔哩 干杯~",
|
||||
"适度游戏益脑,沉迷游戏伤身,合理安排时间,享受健康生活",
|
||||
"合群了就会消失,但是消失不代表没有意义",
|
||||
"学会使用两个旋转键,三个更好",
|
||||
"合群了就会消失, 但是消失不代表没有意义",
|
||||
"学会使用两个旋转键, 三个更好",
|
||||
"更小的DAS和ARR拥有更高的操作上限(如果你还能控制得了的话)",
|
||||
"注意到\"旋转\"到底对方块做了些什么吗?",
|
||||
"20G本质是一套全新的游戏规则",
|
||||
"不要在上课时玩游戏!",
|
||||
"本游戏难度上限很高,做好心理准备",
|
||||
"本游戏难度上限很高, 做好心理准备",
|
||||
"本游戏可不是休闲游戏",
|
||||
"调到特殊的日期也不会发生什么的",
|
||||
"3.1415926535897932384",
|
||||
"2.7182818284590452353",
|
||||
"Let-The-Bass-Kick!",
|
||||
"使用love2d引擎制作",
|
||||
"有疑问?先看设置有没有你想要的",
|
||||
"有疑问? 先看设置有没有你想要的",
|
||||
"有建议的话可以把信息反馈给作者~",
|
||||
"不要按F10",
|
||||
"秘密数字:626",
|
||||
"CLASSIC SEXY RUSSIAN BLOCKS",
|
||||
"戴上耳机以获得最佳体验",
|
||||
"少女祈祷中",
|
||||
"LrL,RlR LLr,RRl RRR,LLL RfR,RRf,rFF FFF",--ZSLJTOI
|
||||
"RUR'U'R'FR2U'R'U'RUR'F'",
|
||||
"LrL RlR LLr RRl RRR LLL FFF RfR RRf rFF",
|
||||
"(RUR'U')R'FR2U'R'U'(RUR'F')",
|
||||
"Am G F G",
|
||||
"Techmino 好玩!",
|
||||
"联网还没做呢, 别急",
|
||||
"\"免费吃鸡方块\"",
|
||||
"Techminohaowan",
|
||||
"Techmino 好玩!",
|
||||
"tetr.js 也很好玩!",
|
||||
"jstris 也很好玩!",
|
||||
"tetr.io 也很好玩!",
|
||||
"nullpomino 也很好玩!",
|
||||
}
|
||||
elseif setting.lang==2 then
|
||||
L={
|
||||
@@ -73,11 +79,17 @@ elseif setting.lang==2 then
|
||||
"CLASSIC SEXY RUSSIAN BLOCKS",
|
||||
"戴上耳机以获得最佳体验",
|
||||
"少女祈祷中",
|
||||
"LrL,RlR LLr,RRl RRR,LLL RfR,RRf,rFF FFF",--ZSLJTOI
|
||||
"RUR'U'R'FR2U'R'U'RUR'F'",
|
||||
"LrL RlR LLr RRl RRR LLL FFF RfR RRf rFF",
|
||||
"(RUR'U')R'FR2U'R'U'(RUR'F')",
|
||||
"Am G F G",
|
||||
"Techmino 好玩!",
|
||||
"联网还没做呢, 别急",
|
||||
"\"免费吃鸡方块\"",
|
||||
"Techminohaowan",
|
||||
"Techmino 好玩!",
|
||||
"tetr.js 也很好玩!",
|
||||
"jstris 也很好玩!",
|
||||
"tetr.io 也很好玩!",
|
||||
"nullpomino 也很好玩!",
|
||||
}
|
||||
elseif setting.lang==3 then
|
||||
L={
|
||||
@@ -114,10 +126,24 @@ elseif setting.lang==3 then
|
||||
"CLASSIC SEXY RUSSIAN BLOCKS",
|
||||
"Headphones for better experience",
|
||||
"少女祈禱中",
|
||||
"RUR'U'R'FR2U'R'U'RUR'F'",
|
||||
"(RUR'U')R'FR2U'R'U'(RUR'F')",
|
||||
"Am G F G",
|
||||
"LrL,RlR LLr,RRl RRR,LLL RfR,RRf,rFF FFF",--ZSLJTOI
|
||||
"LrL RlR LLr RRl RRR LLL FFF RfR RRf rFF",
|
||||
"Only offline game now",
|
||||
"\"Free block game with royale-mode\"",
|
||||
"Techmino is so fun!",
|
||||
"Who is diao",
|
||||
"Also try tetr.js!",
|
||||
"Also try jstris!",
|
||||
"Also try tetr.io!",
|
||||
"Also try nullpomino!",
|
||||
}
|
||||
elseif setting.lang==4 then
|
||||
L={'!','@','#','$','%','^','&','*','(',')','-','=','_','+','[',']','{','}','\\','|',';',':','\'','"',',','<','.','>','/','?'}
|
||||
local s=""
|
||||
for i=1,math.random(16,26)do
|
||||
s=s..L[math.random(#L)]
|
||||
end
|
||||
return s
|
||||
end
|
||||
return L[math.random(#L)]
|
||||
@@ -1,4 +1,5 @@
|
||||
local IMG={
|
||||
batteryImage="/mess/power.png",
|
||||
titleImage="mess/title.png",
|
||||
coloredTitleImage="mess/title_colored.png",
|
||||
dialCircle="mess/dialCircle.png",
|
||||
|
||||
@@ -1,125 +1,354 @@
|
||||
local map={{},{},{},{},{}}
|
||||
for x=1,5 do for y=1,5 do map[x][y]={x-3,y-3}end end
|
||||
local zero={0,0}
|
||||
local Zero={zero}
|
||||
local ZERO={[01]=Zero,[10]=Zero,[03]=Zero,[30]=Zero,[12]=Zero,[21]=Zero,[32]=Zero,[23]=Zero,[02]=Zero,[20]=Zero,[13]=Zero,[31]=Zero}
|
||||
|
||||
local map={}
|
||||
for x=-3,3 do map[x]={}for y=-3,3 do map[x][y]={x,y}end end
|
||||
local function collect(T)
|
||||
for _,T in next,T do
|
||||
for k,vec in next,T do
|
||||
T[k]=map[vec[1]+3][vec[2]+3]
|
||||
if type(T)=="table"then
|
||||
for _,T in next,T do
|
||||
for k,vec in next,T do
|
||||
T[k]=map[vec[1]][vec[2]]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function sym(L)
|
||||
L[23]=L[01]L[32]=L[10]
|
||||
L[21]=L[03]L[12]=L[30]
|
||||
end
|
||||
local function flipList(O)
|
||||
if not O then return end
|
||||
local L={}
|
||||
for i=1,#O do
|
||||
L[i]={-O[i][1],O[i][2]}
|
||||
end
|
||||
return L
|
||||
end
|
||||
local function reflect(a,b)
|
||||
b[03]=flipList(a[01])
|
||||
b[01]=flipList(a[03])
|
||||
b[30]=flipList(a[10])
|
||||
b[32]=flipList(a[12])
|
||||
b[23]=flipList(a[21])
|
||||
b[21]=flipList(a[23])
|
||||
b[10]=flipList(a[30])
|
||||
b[12]=flipList(a[32])
|
||||
b[02]=flipList(a[02])
|
||||
b[20]=flipList(a[20])
|
||||
b[31]=flipList(a[13])
|
||||
b[13]=flipList(a[31])
|
||||
end
|
||||
local function pushZero(T)
|
||||
local L
|
||||
for i=1,#T do
|
||||
L=T[i]
|
||||
if type(L)=="table"then
|
||||
for _,v in next,L do
|
||||
table.insert(v,1,zero)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local scs=require("parts/spinCenters")
|
||||
local OspinList={
|
||||
{111,5,2, 0,-1,0},{111,5,2,-1,-1,0},{111,5,0,-1, 0,0},--T
|
||||
{333,5,2,-1,-1,0},{333,5,2, 0,-1,0},{333,5,0, 0, 0,0},--T
|
||||
{313,1,2,-1, 0,0},{313,1,2, 0,-1,0},{313,1,2, 0, 0,0},--Z
|
||||
{131,2,2, 0, 0,0},{131,2,2,-1,-1,0},{131,2,2,-1, 0,0},--S
|
||||
{331,3,2, 0,-1,0},{113,3,0, 0, 0,0},{113,3,2,-1, 0,0},--J
|
||||
{113,4,2,-1,-1,0},{331,4,0,-1, 0,0},{331,4,2, 0, 0,0},--L
|
||||
{222,7,2,-1, 0,1},{222,7,2,-2, 0,1},{222,7,2, 0, 0,1},--I
|
||||
{121,6,0, 1,-1,1},{112,6,0, 2,-1,2},{122,6,0, 1,-2,2},--O
|
||||
{323,6,0,-1,-1,2},{332,6,0,-2,-1,2},{322,6,0,-1,-2,2},--O
|
||||
}--{key,id,dir,dx,dy,freeLv(0=unmovable,1=L/R unmovable,2=free)}
|
||||
local TRS={
|
||||
[1]={
|
||||
[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,-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}, {-1,0}, {0,-2} },
|
||||
[31]={{0,0},{0,1}, {0,-1}, {1,0}, {0,2} },
|
||||
{
|
||||
[01]={{-1, 0},{-1, 1},{ 0,-2},{-1, 2},{ 0, 1}},
|
||||
[10]={{ 1, 0},{ 1,-1},{ 0, 2},{ 1,-1},{ 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},{-1, 0},{ 0,-2}},
|
||||
[31]={{ 0, 1},{ 0,-1},{ 1, 0},{ 0, 2}},
|
||||
},--Z
|
||||
[2]={
|
||||
[01]={{0,0},{-1,0}, {-1,1}, {0,-2}, {-1,-1},{-1,-2} },
|
||||
[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,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}, {-1,0}, {0,2} },
|
||||
[31]={{0,0},{0,-1}, {0,1}, {1,0}, {0,-2} },
|
||||
},--S
|
||||
[3]={
|
||||
[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,1} },
|
||||
[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}, {1,0}, {0,-1}, {0,2}, {-1,2} },
|
||||
[23]={{0,0},{1,0}, {1,1}, {-1,0}, {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}, {1,0}, {0,-1} },
|
||||
[31]={{0,0},{0,-1}, {-1,0}, {0,1} },
|
||||
},--L
|
||||
[4]={
|
||||
[01]={{0,0},{-1,0}, {-1,1}, {0,-2}, {1,1} },
|
||||
[10]={{0,0},{1,0}, {1,-1}, {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,0}, {0,-2}, {-1,-2} },
|
||||
[32]={{0,0},{-1,0}, {-1,-1},{0,2}, {-1,2}, {-1,1} },
|
||||
[23]={{0,0},{1,0}, {1,-1}, {1,1}, {0,-2}, {1,-2}, {1,-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}, {0,1} },
|
||||
[31]={{0,0},{0,1}, {-1,0}, {0,-1} },
|
||||
{},--S
|
||||
{
|
||||
[01]={{-1, 0},{-1, 1},{ 0,-2},{ 1, 1}},
|
||||
[10]={{ 1, 0},{ 1,-1},{ 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, 0},{ 0,-2},{-1,-2}},
|
||||
[32]={{-1, 0},{-1,-1},{ 0, 2},{-1, 2},{-1, 1}},
|
||||
[23]={{ 1, 0},{ 1,-1},{ 1, 1},{ 0,-2},{ 1,-2},{ 1,-1}},
|
||||
[02]={{-1, 0},{ 1, 0},{ 0,-1},{ 0, 1}},
|
||||
[20]={{ 1, 0},{-1, 0},{ 0, 1},{ 0,-1}},
|
||||
[13]={{ 0,-1},{ 1, 0},{ 0, 1}},
|
||||
[31]={{ 0, 1},{-1, 0},{ 0,-1}},
|
||||
},--J
|
||||
[5]={
|
||||
[01]={{0,0},{-1,0}, {-1,1}, {0,-2}, {-1,-2},{-1,-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}, {0,-1} },
|
||||
[12]={{0,0},{1,0}, {1,-1}, {0,-1}, {-1,-1},{0,2}, {1,2}},
|
||||
[21]={{0,0},{-1,0}, {-1,1}, {0,-2}, {-1,-2},{1,1} },
|
||||
[32]={{0,0},{-1,0}, {-1,-1},{0,-1}, {1,-1}, {0,2}, {-1,2}},
|
||||
[23]={{0,0},{1,0}, {1,1}, {0,-2}, {1,-2}, {-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}},
|
||||
{},--L
|
||||
{
|
||||
[01]={{-1, 0},{-1, 1},{ 0,-2},{-1,-2},{-1,-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},{ 0,-1}},
|
||||
[12]={{ 1, 0},{ 1,-1},{ 0,-1},{-1,-1},{ 0, 2},{ 1, 2}},
|
||||
[21]={{-1, 0},{-1, 1},{ 0,-2},{-1,-2},{ 1, 1}},
|
||||
[32]={{-1, 0},{-1,-1},{ 0,-1},{ 1,-1},{ 0, 2},{-1, 2}},
|
||||
[23]={{ 1, 0},{ 1, 1},{ 0,-2},{ 1,-2},{-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}},
|
||||
},--T
|
||||
[6]={},--O(special)
|
||||
[7]={
|
||||
[01]={{0,0},{0,1}, {1,0}, {-2,0}, {-2,-1},{1,2} },
|
||||
[03]={{0,0},{0,1}, {-1,0}, {2,0}, {2,-1}, {-1,2} },
|
||||
[10]={{0,0},{2,0}, {-1,0}, {-1,-2},{2,1}, {0,2} },
|
||||
[30]={{0,0},{-2,0}, {1,0}, {1,-2}, {-2,1}, {0,2} },
|
||||
[12]={{0,0},{-1,0}, {2,0}, {-1,2}, {2,-1} },
|
||||
[32]={{0,0},{1,0}, {-2,0}, {1,-2}, {-2,-1} },
|
||||
[21]={{0,0},{-2,0}, {1,0}, {1,-2}, {-2,1} },
|
||||
[23]={{0,0},{2,0}, {-1,0}, {-1,-2},{2,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
|
||||
}for i=1,7 do collect(TRS[i])end
|
||||
function(P,d)
|
||||
if P.human then SFX.fieldPlay("rotate",nil,P)end
|
||||
if P.gameEnv.easyFresh then P:freshLockDelay()end
|
||||
if not P.gameEnv.ospin then return end
|
||||
local x,y=P.curX,P.curY
|
||||
if y==P.y_img and((P:solid(x-1,y)or P:solid(x-1,y+1)))and(P:solid(x+2,y)or P:solid(x+2,y+1))then
|
||||
local D=P.spinSeq%100*10+d
|
||||
P.spinSeq=D
|
||||
if D<100 then return end
|
||||
for i=1,#OspinList do
|
||||
local L=OspinList[i]
|
||||
if D==L[1]then
|
||||
local id,dir=L[2],L[3]
|
||||
local bk=blocks[id][dir]
|
||||
local x,y=P.curX+L[4],P.curY+L[5]
|
||||
if not P:ifoverlap(bk,x,y)and(L[6]>0 or P:ifoverlap(bk,x-1,y)and P:ifoverlap(bk,x+1,y))and(L[6]==2 or P:ifoverlap(bk,x,y-1))and P:ifoverlap(bk,x,y+1)then
|
||||
local C=P.cur
|
||||
C.id=id
|
||||
C.bk=bk
|
||||
P.curX,P.curY=x,y
|
||||
P.r,P.c=#bk,#bk[1]
|
||||
P.dir,P.sc=dir,scs[id][dir]
|
||||
P.spinLast=2
|
||||
P.stat.rotate=P.stat.rotate+1
|
||||
P:freshgho()
|
||||
P.spinSeq=0
|
||||
SFX.fieldPlay("rotatekick",nil,P)
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
P.spinSeq=0
|
||||
end
|
||||
end,--O
|
||||
{
|
||||
[01]={{ 0, 1},{ 1, 0},{-2, 0},{-2,-1},{ 1, 2}},
|
||||
[10]={{ 2, 0},{-1, 0},{-1,-2},{ 2, 1},{ 0, 2}},
|
||||
[03]={{ 0, 1},{-1, 0},{ 2, 0},{ 2,-1},{-1, 2}},
|
||||
[30]={{-2, 0},{ 1, 0},{ 1,-2},{-2, 1},{ 0, 2}},
|
||||
[12]={{-1, 0},{ 2, 0},{-1, 2},{ 2,-1}},
|
||||
[21]={{-2, 0},{ 1, 0},{ 1,-2},{-2, 1}},
|
||||
[32]={{ 1, 0},{-2, 0},{ 1,-2},{-2,-1}},
|
||||
[23]={{ 2, 0},{-1, 0},{-1,-2},{ 2, 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}},
|
||||
},--I
|
||||
{
|
||||
[01]={{-1, 0},{ 0, 1},{ 1, 1},{ 0,-3},{ 0, 2},{ 0, 3},{-1, 2}},
|
||||
[10]={{ 1, 0},{ 0,-1},{-1,-1},{ 0,-2},{ 0,-3},{ 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}},
|
||||
},--5Z
|
||||
{},--5S
|
||||
{
|
||||
[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, 1}},
|
||||
[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},{ 1, 0},{ 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}},
|
||||
},--Q
|
||||
{},--P
|
||||
{
|
||||
[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, 0},{-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},{-1, 1},{ 0, 1},{ 0,-1},{ 1, 0},{ 0, 2},{-2, 0}},
|
||||
[23]={{ 1, 0},{ 1,-1},{ 0,-1},{ 0, 1},{-1, 0},{ 0,-2},{ 2, 0}},
|
||||
[02]={{ 1, 0},{-1, 0},{ 0, 1}},
|
||||
[20]={{-1, 0},{ 1, 0},{ 0,-1}},
|
||||
[13]={{ 0,-1},{ 1, 0},{ 0, 1}},
|
||||
[31]={{ 0,-1},{-1, 0},{ 0, 1}},
|
||||
},--F
|
||||
{},--E
|
||||
{
|
||||
[01]={{ 0,-1},{-1,-1},{ 1,-1},{ 1, 0},{ 1,-3},{-1, 0},{ 0, 2},{-1, 2}},
|
||||
[10]={{ 1, 0},{ 0,-1},{-1,-1},{ 0,-2},{ 0,-3},{ 1,-2},{ 0, 1}},
|
||||
[03]={{ 0,-1},{ 1,-1},{-1,-1},{-1, 0},{-1,-3},{ 1, 0},{ 0, 2},{ 1, 2}},
|
||||
[30]={{-1, 0},{ 0,-1},{ 1,-1},{ 0,-2},{ 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}},
|
||||
},--5T
|
||||
{
|
||||
[01]={{-1, 0},{-1, 1},{ 0,-2},{-1,-1},{-1,-2}},
|
||||
[10]={{ 1, 0},{ 1,-1}},
|
||||
[03]={{ 1, 0},{ 1, 1},{ 0,-2},{ 1,-1},{ 1,-2}},
|
||||
[30]={{-1, 0},{-1,-1}},
|
||||
[12]={{ 1, 0},{ 1, 1}},
|
||||
[21]={{-1,-1},{-1, 1}},
|
||||
[32]={{-1, 0},{-1, 1}},
|
||||
[23]={{ 1,-1},{ 1, 1}},
|
||||
[02]={{ 0, 1}},
|
||||
[20]={{ 0,-1}},
|
||||
[13]={{ 0,-1},{ 0, 1},{ 1, 0}},
|
||||
[31]={{ 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}},
|
||||
},--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},{ 1, 1},{-1, 0},{ 0, 1},{-1,-1}},
|
||||
[21]={{-1, 0},{ 0,-1},{-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}},
|
||||
},--W
|
||||
function(P,d)
|
||||
return
|
||||
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},{ 0, 2},{-1, 2},{ 0,-2}},
|
||||
[23]={{ 1, 0},{ 1,-1},{ 1, 1},{ 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}},
|
||||
},--5J
|
||||
{},--5L
|
||||
{
|
||||
[01]={{-1, 0},{-1, 1},{ 1, 0},{-1, 2},{-1,-1},{ 0,-3},{ 0, 1}},
|
||||
[10]={{-1, 0},{ 1,-1},{-1, 0},{ 1,-2},{ 1, 1},{ 0, 3},{ 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},{ 0, 2},{-1, 2},{ 0,-2}},
|
||||
[23]={{ 1, 0},{ 1,-1},{ 1, 1},{ 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}},
|
||||
},--R
|
||||
{},--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}},
|
||||
},--N
|
||||
{},--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}},
|
||||
},--5I
|
||||
}
|
||||
TRS[25][03]=flipList(TRS[25][01])
|
||||
TRS[25][30]=flipList(TRS[25][10])
|
||||
sym(TRS[8])sym(TRS[9])sym(TRS[25])
|
||||
reflect(TRS[1],TRS[2])--SZ
|
||||
reflect(TRS[3],TRS[4])--LJ
|
||||
reflect(TRS[8],TRS[9])--5S5Z
|
||||
reflect(TRS[10],TRS[11])--PQ
|
||||
reflect(TRS[12],TRS[13])--FE
|
||||
reflect(TRS[19],TRS[20])--5L5J
|
||||
reflect(TRS[21],TRS[22])--RY
|
||||
reflect(TRS[23],TRS[24])--HN
|
||||
for i=1,25 do collect(TRS[i])end
|
||||
pushZero(TRS)
|
||||
|
||||
local AIRS={
|
||||
[1]={
|
||||
[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} },
|
||||
[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}},
|
||||
},
|
||||
[7]={
|
||||
[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} },
|
||||
[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}},
|
||||
}
|
||||
}
|
||||
for i=2,6 do AIRS[i]=AIRS[1]end
|
||||
collect(AIRS[1])collect(AIRS[7])
|
||||
for i=2,25 do AIRS[i]=AIRS[1]end
|
||||
pushZero(AIRS)
|
||||
|
||||
local NONE={}
|
||||
for i=1,25 do NONE[i]=ZERO end
|
||||
|
||||
return{
|
||||
TRS=TRS,
|
||||
AIRS=AIRS,
|
||||
NONE=NONE,
|
||||
}
|
||||
1188
parts/languages.lua
1188
parts/languages.lua
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,6 @@
|
||||
do return end
|
||||
--LIGHT MODULE(Optimized by MrZ,Original on github/love2d community/simple-love-lights)
|
||||
--Heavily based on mattdesl's libGDX implementation:
|
||||
--https://github.com/mattdesl/lwjgl-basics/wiki/2D-Pixel-Perfect-Shadows
|
||||
--Private--
|
||||
local gc=love.graphics
|
||||
local C=gc.clear
|
||||
local shadowMapShader=gc.newShader("shader/shadowMap.cs")--Shader for caculating the 1D shadow map.
|
||||
@@ -20,62 +18,72 @@ local function destroy(L)
|
||||
L.renderCanvas:release()
|
||||
end
|
||||
local function draw(L)
|
||||
--Initialization
|
||||
local r,g,b,a=love.graphics.getColor()
|
||||
gc.setCanvas(L.blackCanvas)C()
|
||||
gc.setCanvas(L.shadowCanvas)C()
|
||||
gc.setCanvas(L.renderCanvas)C()
|
||||
lightRenderShader:send("xresolution",L.size);
|
||||
shadowMapShader:send("yresolution",L.size);
|
||||
--初始化数据
|
||||
|
||||
--get up-left of light
|
||||
local X=L.x-L.size*.5
|
||||
local Y=L.y-L.size*.5
|
||||
--整束光的左上角
|
||||
|
||||
--Render solid
|
||||
gc.translate(-X,-Y)
|
||||
L.blackCanvas:renderTo(L.blackFn)
|
||||
gc.translate(X,Y)
|
||||
--渲染遮光物
|
||||
|
||||
--Render shade canvas by solid
|
||||
gc.setShader(shadowMapShader)
|
||||
gc.setCanvas(L.shadowCanvas)
|
||||
gc.draw(L.blackCanvas)
|
||||
--根据遮光物渲染阴影画布
|
||||
|
||||
--Render light canvas by shade
|
||||
gc.setShader(lightRenderShader)
|
||||
gc.setCanvas(L.renderCanvas)
|
||||
gc.draw(L.shadowCanvas,0,0,0,1,L.size)
|
||||
--根据阴影画布渲染光画布
|
||||
|
||||
--Ready to final render
|
||||
gc.setShader()gc.setCanvas()gc.setBlendMode("add")
|
||||
--准备渲染
|
||||
|
||||
--Render to screes
|
||||
gc.setColor(r,g,b,a)
|
||||
gc.draw(L.renderCanvas,X,Y+L.size,0,1,-1)
|
||||
--渲染到屏幕
|
||||
|
||||
--Reset
|
||||
gc.setBlendMode("alpha")
|
||||
--复位
|
||||
end
|
||||
--Public--
|
||||
function Lights.draw()
|
||||
|
||||
local LIGHT={}
|
||||
function LIGHT.draw()
|
||||
for i=1,#Lights do
|
||||
Lights[i]:draw()
|
||||
end
|
||||
end
|
||||
function Lights.clear(L)
|
||||
function LIGHT.clear(L)
|
||||
for i=#Lights,1,-1 do
|
||||
Lights[i]:destroy()
|
||||
Lights[i]=nil
|
||||
end
|
||||
end
|
||||
function Lights.add(x,y,R,F)
|
||||
function LIGHT.add(x,y,R,F)
|
||||
local id=#Lights+1
|
||||
Lights[id]={
|
||||
--Methods
|
||||
id=id,
|
||||
x=x,y=y,size=R,
|
||||
blackCanvas=gc.newCanvas(R,R),--遮挡物画布
|
||||
shadowCanvas=gc.newCanvas(R,1),--1D视深画布
|
||||
renderCanvas=gc.newCanvas(R,R),--灯光画布
|
||||
blackFn=F,--遮挡物绘图函数
|
||||
--方法
|
||||
blackCanvas=gc.newCanvas(R,R),--solid canvas
|
||||
shadowCanvas=gc.newCanvas(R,1),--1D vis-depth canvas
|
||||
renderCanvas=gc.newCanvas(R,R),--light canvas
|
||||
blackFn=F,--solid draw funcion
|
||||
|
||||
|
||||
move=move,
|
||||
setPow=setPow,
|
||||
draw=draw,
|
||||
destroy=destroy,
|
||||
}
|
||||
end
|
||||
return Lights
|
||||
return LIGHT
|
||||
@@ -1,31 +1,3 @@
|
||||
actName={
|
||||
"moveLeft","moveRight",
|
||||
"rotRight","rotLeft","rot180",
|
||||
"hardDrop","softDrop",
|
||||
"hold","func",
|
||||
"restart",
|
||||
"insLeft","insRight","insDown","down1","down4","down10",
|
||||
"dropLeft","dropRight","addLeft","addRight",--Super contorl system
|
||||
}
|
||||
musicID={
|
||||
"blank",
|
||||
"way",
|
||||
"race",
|
||||
"newera",
|
||||
"push",
|
||||
"reason",
|
||||
"infinite",
|
||||
"secret7th",
|
||||
"secret8th",
|
||||
"shining terminal",
|
||||
"oxygen",
|
||||
"distortion",
|
||||
"rockblock",
|
||||
"cruelty",
|
||||
"final",
|
||||
"8-bit happiness",
|
||||
"end",
|
||||
}
|
||||
customID={
|
||||
"drop","lock",
|
||||
"wait","fall",
|
||||
@@ -51,5 +23,4 @@ customRange={
|
||||
bg={"none","game1","game2","game3","strap","rgb","glow","matrix"},
|
||||
bgm={"blank","way","race","newera","push","reason","infinite","secret7th","secret8th","rockblock"},
|
||||
}
|
||||
RCPB={10,33,200,33,105,5,105,60}
|
||||
snapLevelValue={1,10,20,40,60,80}
|
||||
@@ -11,13 +11,34 @@ local function RotCW(B)
|
||||
end
|
||||
local O,_=true,false
|
||||
local L={
|
||||
--Tetramino
|
||||
{{_,O,O},{O,O,_}}, --Z
|
||||
{{O,O,_},{_,O,O}}, --S
|
||||
{{O,O,O},{_,_,O}}, --L
|
||||
{{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,_}}, --Z
|
||||
{{O,O,_},{_,O,_},{_,O,O}}, --S
|
||||
{{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,_}}, --T
|
||||
{{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,_,_,_}}, --J
|
||||
{{O,O,O,O},{_,_,_,O}}, --L
|
||||
{{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}}, --I
|
||||
}
|
||||
for i=1,#L do
|
||||
local B=L[i]
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
modes={
|
||||
{"sprint_10", id=1, x=0, y=0, size=35,shape=1,icon="timer", unlock={2,3}},
|
||||
{"sprint_20", id=2, x=-300, y=0, size=45,shape=1,icon="timer", unlock={73,74,75}},
|
||||
{"sprint_40", id=3, x=0, y=-400, size=55,shape=1,icon="timer", unlock={4,9,71,72}},
|
||||
{"sprint_100", id=4, x=-200, y=-400, size=45,shape=1,icon="timer", unlock={5,7}},
|
||||
{"sprint_400", id=5, x=-400, y=-400, size=35,shape=1,icon="timer", unlock={6}},
|
||||
{"sprint_1000", id=6, x=-600, y=-400, size=35,shape=1,icon="timer", unlock={}},
|
||||
{"sprint_10", id=1, x=0, y=0, size=35,shape=1,icon="sprint", unlock={2,3}},
|
||||
{"sprint_20", id=2, x=-300, y=0, size=45,shape=1,icon="sprint", unlock={}},
|
||||
{"sprint_40", id=3, x=0, y=-400, size=55,shape=1,icon="sprint", unlock={4,9,71,72,73}},
|
||||
{"sprint_100", id=4, x=-200, y=-400, size=45,shape=1,icon="sprint", unlock={5,7}},
|
||||
{"sprint_400", id=5, x=-400, y=-400, size=35,shape=1,icon="sprint", unlock={6}},
|
||||
{"sprint_1000", id=6, x=-600, y=-400, size=35,shape=1,icon="sprint", unlock={}},
|
||||
{"drought_normal", id=7, x=-400, y=-200, size=35,shape=1,icon="noI", unlock={8}},
|
||||
{"drought_lunatic", id=8, x=-600, y=-200, size=35,shape=1,icon="mess", unlock={}},
|
||||
{"marathon_normal", id=9, x=0, y=-600, size=55,shape=1,icon="flag", unlock={10,11,22,31,36,37,48,67}},
|
||||
@@ -39,7 +39,7 @@ modes={
|
||||
{"blind_ultimate", id=35, x=150, y=-1100, size=35,shape=1,icon="blind", unlock={}},
|
||||
|
||||
{"classic_fast", id=36, x=-300, y=-1200, size=40,shape=2,icon="classic", unlock={}},
|
||||
|
||||
|
||||
{"survivor_easy", id=37, x=300, y=-600, size=35,shape=1,icon="survivor",unlock={38}},
|
||||
{"survivor_normal", id=38, x=500, y=-600, size=35,shape=1,icon="survivor",unlock={39,42,44,46}},
|
||||
{"survivor_hard", id=39, x=700, y=-600, size=35,shape=1,icon="survivor",unlock={40}},
|
||||
@@ -81,9 +81,7 @@ modes={
|
||||
{"infinite_dig", id=70, x=-1100, y=-600, size=35,shape=1,icon="infinite_dig",unlock={}},
|
||||
{"custom_clear", id=71, x=200, y=-350, size=45,shape=3,icon="custom", unlock={}},
|
||||
{"custom_puzzle", id=72, x=200, y=-200, size=45,shape=3,icon="puzzle", unlock={}},
|
||||
{"hotseat_2P", id=73, x=-300, y=200, size=45,shape=3,icon="hotseat", unlock={}},
|
||||
{"hotseat_3P", id=74, x=-450, y=200, size=45,shape=3,icon="hotseat", unlock={}},
|
||||
{"hotseat_4P", id=75, x=-600, y=200, size=45,shape=3,icon="hotseat", unlock={}},
|
||||
{"sprintPenta", id=73, x=-200, y=-200, size=45,shape=3,icon="sprint", unlock={}},
|
||||
}
|
||||
modeRanks={}
|
||||
for i=1,#modes do
|
||||
|
||||
@@ -32,6 +32,9 @@ function SFX.loadAll()
|
||||
SFX.loadOne(i)
|
||||
end
|
||||
end
|
||||
function SFX.fieldPlay(s,v,P)
|
||||
SFX.play(s,v,(P.curX+P.sc[2]-6.5)*.15)
|
||||
end
|
||||
function SFX.play(s,v,pos)
|
||||
if setting.sfx==0 then return end
|
||||
local S=SFX.list[s]--source list
|
||||
|
||||
@@ -1,12 +1,40 @@
|
||||
local TMP1,TMP2,TMP3,TMP4={1,2},{2,1},{2,2},{1.5,1.5}
|
||||
local N1,N2={1,2},{2,1}
|
||||
local N3,N4={2,2},{1.5,1.5}
|
||||
local I1,I2={0.5,2.5},{2.5,0.5}
|
||||
local I3,I4={1.5,2.5},{2.5,1.5}
|
||||
local V4={2.5,2.5}
|
||||
local L1,L2={1,3},{3,1}
|
||||
local scs={
|
||||
{[0]=TMP1,TMP2,TMP3,TMP3},
|
||||
{[0]=TMP1,TMP2,TMP3,TMP3},
|
||||
{[0]=TMP1,TMP2,TMP3,TMP3},
|
||||
{[0]=TMP1,TMP2,TMP3,TMP3},
|
||||
{[0]=TMP1,TMP2,TMP3,TMP3},
|
||||
{[0]=TMP4,TMP4,TMP4,TMP4},
|
||||
{[0]={0.5,2.5},{2.5,0.5},{1.5,2.5},{2.5,1.5}},
|
||||
--Tetramino
|
||||
{[0]=N1,N2,N3,N3},--Z
|
||||
{[0]=N1,N2,N3,N3},--S
|
||||
{[0]=N1,N2,N3,N3},--L
|
||||
{[0]=N1,N2,N3,N3},--J
|
||||
{[0]=N1,N2,N3,N3},--T
|
||||
{[0]=N4,N4,N4,N4},--O
|
||||
{[0]=I1,I2,I3,I4},--I
|
||||
|
||||
--Pentomino
|
||||
{[0]=N3,N3,N3,N3},--Z
|
||||
{[0]=N3,N3,N3,N3},--S
|
||||
{[0]=N1,N2,N3,N3},--P
|
||||
{[0]=N1,N2,N3,N3},--Q
|
||||
{[0]=N3,N3,N3,N3},--F
|
||||
{[0]=N3,N3,N3,N3},--E
|
||||
{[0]=N3,N3,N3,N3},--T
|
||||
{[0]=N1,N2,N3,N3},--U
|
||||
{[0]=I3,N4,I4,V4},--V
|
||||
{[0]=N3,N3,N3,N3},--W
|
||||
{[0]=N3,N3,N3,N3},--X
|
||||
{[0]=I3,I4,I3,I4},--J
|
||||
{[0]=I3,I4,I3,I4},--L
|
||||
{[0]=I3,I4,I3,I4},--R
|
||||
{[0]=I3,I4,I3,I4},--Y
|
||||
{[0]=I3,I4,I3,I4},--N
|
||||
{[0]=I3,I4,I3,I4},--H
|
||||
{[0]=L1,L2,L1,L2},--I
|
||||
}
|
||||
TMP1,TMP2,TMP3,TMP4=nil
|
||||
N1,N2,N3,N4=nil
|
||||
I1,I2,I3,I4=nil
|
||||
L1,L2=nil
|
||||
return scs
|
||||
@@ -85,30 +85,30 @@ end
|
||||
function VOC.update()
|
||||
for i=#voiceQueue,1,-1 do
|
||||
local Q=voiceQueue[i]
|
||||
if Q.s==0 then--闲置轨,自动删除多余
|
||||
if Q.s==0 then--Free channel, auto delete when >3
|
||||
if i>3 then
|
||||
rem(voiceQueue,i)
|
||||
end
|
||||
elseif Q.s==1 then--等待转换
|
||||
elseif Q.s==1 then--Waiting load source
|
||||
Q[1]=getVoice(Q[1])
|
||||
Q[1]:setVolume(setting.voc*.1)
|
||||
Q[1]:play()
|
||||
Q.s=Q[2]and 2 or 4
|
||||
elseif Q.s==2 then--播放1,准备2
|
||||
elseif Q.s==2 then--playing 1,ready 2
|
||||
if Q[1]:getDuration()-Q[1]:tell()<.08 then
|
||||
Q[2]=getVoice(Q[2])
|
||||
Q[2]:setVolume(setting.voc*.1)
|
||||
Q[2]:play()
|
||||
Q.s=3
|
||||
end
|
||||
elseif Q.s==3 then--12同时播放
|
||||
elseif Q.s==3 then--playing 12 same time
|
||||
if not Q[1]:isPlaying()then
|
||||
for i=1,#Q do
|
||||
Q[i]=Q[i+1]
|
||||
end
|
||||
Q.s=Q[2]and 2 or 4
|
||||
end
|
||||
elseif Q.s==4 then--最后播放
|
||||
elseif Q.s==4 then--playing last
|
||||
if not Q[1].isPlaying(Q[1])then
|
||||
Q[1]=nil
|
||||
Q.s=0
|
||||
@@ -121,12 +121,13 @@ function VOC.play(s,chn)
|
||||
if chn then
|
||||
local L=voiceQueue[chn]
|
||||
local _=VOC.list[s]
|
||||
if not _ then print("no VOC called:"..s)return end
|
||||
L[#L+1]=_[rnd(#_)]
|
||||
L.s=1
|
||||
--添加到queue[chn]
|
||||
--add to queue[chn]
|
||||
else
|
||||
voiceQueue[VOC.getFreeChannel()]={s=1,VOC.list[s][rnd(#VOC.list[s])]}
|
||||
--自动创建空轨/播放
|
||||
--create new channel & play
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
194
parts/widget.lua
194
parts/widget.lua
@@ -1,21 +1,14 @@
|
||||
local gc=love.graphics
|
||||
local kb=love.keyboard
|
||||
local int=math.floor
|
||||
local format=string.format
|
||||
local next=next
|
||||
local EMPTY={}
|
||||
|
||||
local button={
|
||||
type="button",
|
||||
ATV=0,--activating time(0~8)
|
||||
}
|
||||
function newButton(x,y,w,h,color,font,code,hide,N)
|
||||
local _={
|
||||
x=x-w*.5,y=y-h*.5,
|
||||
w=w,h=h,
|
||||
color=color,
|
||||
font=font,
|
||||
code=code,
|
||||
hide=hide,
|
||||
next=N,
|
||||
}for k,v in next,button do _[k]=v end return _
|
||||
end
|
||||
function button:reset()
|
||||
self.ATV=0
|
||||
end
|
||||
@@ -26,7 +19,7 @@ function button:FX()
|
||||
sysFX.new("ripple",.16,self.x-self.ATV,self.y-self.ATV,self.w+2*self.ATV,self.h+2*self.ATV)
|
||||
end
|
||||
function button:update()
|
||||
if widget_sel==self then
|
||||
if WIDGET.sel==self then
|
||||
if self.ATV<8 then self.ATV=self.ATV+1 end
|
||||
else
|
||||
if self.ATV>0 then self.ATV=self.ATV-1 end
|
||||
@@ -65,15 +58,6 @@ local switch={
|
||||
ATV=0,--activating time(0~8)
|
||||
CHK=0,--check alpha(0~6)
|
||||
}
|
||||
function newSwitch(x,y,font,disp,code,hide,N)
|
||||
local _={
|
||||
x=x,y=y,font=font,
|
||||
disp=disp,
|
||||
code=code,
|
||||
hide=hide,
|
||||
next=N,
|
||||
}for k,v in next,switch do _[k]=v end return _
|
||||
end
|
||||
function switch:reset()
|
||||
self.ATV=0
|
||||
self.CHK=0
|
||||
@@ -83,7 +67,7 @@ function switch:isAbove(x,y)
|
||||
end
|
||||
function switch:update()
|
||||
local _=self.ATV
|
||||
if widget_sel==self then if _<8 then self.ATV=_+1 end
|
||||
if WIDGET.sel==self then if _<8 then self.ATV=_+1 end
|
||||
else if _>0 then self.ATV=_-1 end
|
||||
end
|
||||
_=self.CHK
|
||||
@@ -123,18 +107,6 @@ local slider={
|
||||
ATV=0,--activating time(0~8)
|
||||
pos=0,--position shown
|
||||
}
|
||||
function newSlider(x,y,w,unit,font,change,disp,code,hide,N)
|
||||
local _={
|
||||
x=x,y=y,
|
||||
w=w,unit=unit,
|
||||
font=font,
|
||||
change=change,
|
||||
disp=disp,
|
||||
code=code,
|
||||
hide=hide,
|
||||
next=N,
|
||||
}for k,v in next,slider do _[k]=v end return _
|
||||
end
|
||||
function slider:reset()
|
||||
self.ATV=0
|
||||
self.pos=0
|
||||
@@ -143,7 +115,7 @@ function slider:isAbove(x,y)
|
||||
return x>self.x-10 and x<self.x+self.w+10 and y>self.y-20 and y<self.y+20
|
||||
end
|
||||
function slider:update()
|
||||
if widget_sel==self then
|
||||
if WIDGET.sel==self then
|
||||
if self.ATV<6 then self.ATV=self.ATV+1 end
|
||||
else
|
||||
if self.ATV>0 then self.ATV=self.ATV-1 end
|
||||
@@ -184,4 +156,154 @@ function slider:draw()
|
||||
end
|
||||
function slider:getInfo()
|
||||
print(format("x=%d,y=%d,w=%d",self.x,self.y,self.w))
|
||||
end
|
||||
end
|
||||
|
||||
local WIDGET={}
|
||||
WIDGET.active=EMPTY--table, contains all active widgets
|
||||
WIDGET.sel=nil--selected widget
|
||||
function WIDGET.set(L)
|
||||
WIDGET.sel=nil
|
||||
WIDGET.active=L or EMPTY
|
||||
if L then
|
||||
for _,W in next,L do
|
||||
W:reset()
|
||||
end--Reset all widgets
|
||||
end
|
||||
end
|
||||
|
||||
WIDGET.new={}
|
||||
function WIDGET.new.button(x,y,w,h,color,font,code,hide,N)
|
||||
local _={
|
||||
x=x-w*.5,y=y-h*.5,
|
||||
w=w,h=h,
|
||||
color=color,
|
||||
font=font,
|
||||
code=code,
|
||||
hide=hide,
|
||||
next=N,
|
||||
}for k,v in next,button do _[k]=v end return _
|
||||
end
|
||||
function WIDGET.new.switch(x,y,font,disp,code,hide,N)
|
||||
local _={
|
||||
x=x,y=y,font=font,
|
||||
disp=disp,
|
||||
code=code,
|
||||
hide=hide,
|
||||
next=N,
|
||||
}for k,v in next,switch do _[k]=v end return _
|
||||
end
|
||||
function WIDGET.new.slider(x,y,w,unit,font,change,disp,code,hide,N)
|
||||
local _={
|
||||
x=x,y=y,
|
||||
w=w,unit=unit,
|
||||
font=font,
|
||||
change=change,
|
||||
disp=disp,
|
||||
code=code,
|
||||
hide=hide,
|
||||
next=N,
|
||||
}for k,v in next,slider do _[k]=v end return _
|
||||
end
|
||||
|
||||
function WIDGET.moveCursor(x,y)
|
||||
WIDGET.sel=nil
|
||||
for _,W in next,WIDGET.active do
|
||||
if not(W.hide and W.hide())and W:isAbove(x,y)then
|
||||
WIDGET.sel=W
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
function WIDGET.press(x,y)
|
||||
local W=WIDGET.sel
|
||||
if not W then return end
|
||||
if W.type=="button"then
|
||||
W.code()
|
||||
W:FX()
|
||||
SFX.play("button")
|
||||
VOC.play("nya")
|
||||
elseif W.type=="switch"then
|
||||
W.code()
|
||||
SFX.play("move",.6)
|
||||
elseif W.type=="slider"then
|
||||
if not x then return end
|
||||
local p,P=W.disp(),x<W.x and 0 or x>W.x+W.w and W.unit or int((x-W.x)*W.unit/W.w+.5)
|
||||
if p==P then return end
|
||||
W.code(P)
|
||||
if W.change then W.change()end
|
||||
end
|
||||
if W.hide and W.hide()then WIDGET.sel=nil end
|
||||
end
|
||||
function WIDGET.drag(x,y,dx,dy)
|
||||
local W=WIDGET.sel
|
||||
if not W then return end
|
||||
if W.type=="slider"then
|
||||
local p,P=W.disp(),x<W.x and 0 or x>W.x+W.w and W.unit or int((x-W.x)*W.unit/W.w+.5)
|
||||
if p==P then return end
|
||||
W.code(P)
|
||||
if W.change then W.change()end
|
||||
elseif not W:isAbove(x,y)then
|
||||
WIDGET.sel=nil
|
||||
end
|
||||
end
|
||||
function WIDGET.keyPressed(i)
|
||||
if i=="tab"then
|
||||
if WIDGET.sel then
|
||||
WIDGET.sel=kb.isDown("lshift")and WIDGET.sel.prev or WIDGET.sel.next or WIDGET.sel
|
||||
else
|
||||
WIDGET.sel=select(2,next(WIDGET.active))
|
||||
end
|
||||
elseif i=="space"or i=="return"then
|
||||
if WIDGET.sel then
|
||||
WIDGET.press(WIDGET.sel)
|
||||
end
|
||||
elseif i=="left"or i=="right"then
|
||||
local W=WIDGET.sel
|
||||
if W then
|
||||
if W.type=="slider"then
|
||||
local p=W.disp()
|
||||
local P=i=="left"and(p>0 and p-1)or p<W.unit and p+1
|
||||
if p==P or not P then return end
|
||||
W.code(P)
|
||||
if W.change then W.change()end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
function WIDGET.gamepadPressed(i)
|
||||
if i=="dpup"or i=="dpdown"then
|
||||
if WIDGET.sel then
|
||||
WIDGET.sel=i=="dpup"and WIDGET.sel.prev or WIDGET.sel.next or WIDGET.sel
|
||||
else
|
||||
WIDGET.sel=select(2,next(WIDGET.active))
|
||||
end
|
||||
elseif i=="start"then
|
||||
if WIDGET.sel then
|
||||
WIDGET.press(WIDGET.sel)
|
||||
end
|
||||
elseif i=="dpleft"or i=="dpright"then
|
||||
if WIDGET.sel then
|
||||
local W=WIDGET.sel
|
||||
if W.type=="slider"then
|
||||
local p=W.disp()
|
||||
local P=i=="left"and(p>0 and p-1)or p<W.unit and p+1
|
||||
if p==P or not P then return end
|
||||
W.code(P)
|
||||
if W.change then W.change()end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function WIDGET.update()
|
||||
for _,W in next,WIDGET.active do W:update()end
|
||||
end
|
||||
function WIDGET.draw()
|
||||
for _,W in next,WIDGET.active do
|
||||
if not(W.hide and W.hide())then
|
||||
W:draw()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return WIDGET
|
||||
Reference in New Issue
Block a user