0.8.22:Shader Update
This commit is contained in:
100
callback.lua
100
callback.lua
@@ -121,7 +121,7 @@ function keyDown.load(k)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
function touchDown.load()
|
function touchDown.load()
|
||||||
if #tc.getTouches()>2 then
|
if #tc.getTouches()==2 then
|
||||||
sceneTemp.skip=true
|
sceneTemp.skip=true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -669,6 +669,18 @@ function touchDown.help(id,x,y)
|
|||||||
sceneTemp.pw=pw
|
sceneTemp.pw=pw
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function keyDown.staff(key)
|
||||||
|
if key=="escape"then
|
||||||
|
SCN.back()
|
||||||
|
elseif key=="\122"then
|
||||||
|
if kb.isDown("\109")and kb.isDown("\114")then
|
||||||
|
sceneTemp.v=-2.6
|
||||||
|
marking=nil
|
||||||
|
SFX.play("reach")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function wheelMoved.history(x,y)
|
function wheelMoved.history(x,y)
|
||||||
wheelScroll(y)
|
wheelScroll(y)
|
||||||
end
|
end
|
||||||
@@ -800,16 +812,11 @@ function love.keypressed(i)
|
|||||||
local W=WIDGET.sel
|
local W=WIDGET.sel
|
||||||
if W then W:getInfo()end
|
if W then W:getInfo()end
|
||||||
elseif i=="f3"then
|
elseif i=="f3"then
|
||||||
error("Techmino:挂了")
|
assert(false,"Techmino:挂了")
|
||||||
elseif i=="e"then
|
elseif i=="e"then
|
||||||
for k,v in next,_G do
|
for k,v in next,_G do
|
||||||
print(k,v)
|
print(k,v)
|
||||||
end
|
end
|
||||||
elseif i=="\122"then
|
|
||||||
if kb.isDown("\109")and kb.isDown("\114")then
|
|
||||||
marking=nil
|
|
||||||
SFX.play("reach")
|
|
||||||
end
|
|
||||||
elseif WIDGET.sel then
|
elseif WIDGET.sel then
|
||||||
local W=WIDGET.sel
|
local W=WIDGET.sel
|
||||||
if i=="left"then W.x=W.x-10
|
if i=="left"then W.x=W.x-10
|
||||||
@@ -901,9 +908,10 @@ function love.lowmemory()
|
|||||||
collectgarbage()
|
collectgarbage()
|
||||||
end
|
end
|
||||||
function love.resize(w,h)
|
function love.resize(w,h)
|
||||||
love.timer.sleep(.26)
|
scr.w,scr.h=w,h
|
||||||
scr.w,scr.h,scr.r=w,h,h/w
|
scr.r=h/w
|
||||||
scr.rad=(w^2+h^2)^.5
|
scr.rad=(w^2+h^2)^.5
|
||||||
|
scr.dpi=gc.getDPIScale()
|
||||||
if scr.r>=.5625 then
|
if scr.r>=.5625 then
|
||||||
scr.k=w/1280
|
scr.k=w/1280
|
||||||
scr.x,scr.y=0,(h-w*9/16)*.5
|
scr.x,scr.y=0,(h-w*9/16)*.5
|
||||||
@@ -913,6 +921,9 @@ function love.resize(w,h)
|
|||||||
end
|
end
|
||||||
xOy=xOy:setTransformation(w*.5,h*.5,nil,scr.k,nil,640,360)
|
xOy=xOy:setTransformation(w*.5,h*.5,nil,scr.k,nil,640,360)
|
||||||
BG.resize(w,h)
|
BG.resize(w,h)
|
||||||
|
|
||||||
|
SHADER.warning:send("w",w*scr.dpi)
|
||||||
|
SHADER.warning:send("h",h*scr.dpi)
|
||||||
end
|
end
|
||||||
function love.focus(f)
|
function love.focus(f)
|
||||||
if SCN.cur=="play"and not f and setting.autoPause then pauseGame()end
|
if SCN.cur=="play"and not f and setting.autoPause then pauseGame()end
|
||||||
@@ -938,6 +949,7 @@ function love.run()
|
|||||||
SCN.init("load")--Scene Launch
|
SCN.init("load")--Scene Launch
|
||||||
marking=true
|
marking=true
|
||||||
return function()
|
return function()
|
||||||
|
local _
|
||||||
--EVENT
|
--EVENT
|
||||||
PUMP()
|
PUMP()
|
||||||
for N,a,b,c,d,e in POLL()do
|
for N,a,b,c,d,e in POLL()do
|
||||||
@@ -948,6 +960,7 @@ function love.run()
|
|||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--UPDATE
|
--UPDATE
|
||||||
STEP()local dt=GETDelta()
|
STEP()local dt=GETDelta()
|
||||||
TASK.update()
|
TASK.update()
|
||||||
@@ -955,7 +968,7 @@ function love.run()
|
|||||||
BG.update(dt)
|
BG.update(dt)
|
||||||
sysFX.update(dt)
|
sysFX.update(dt)
|
||||||
TEXT.update()
|
TEXT.update()
|
||||||
local _=Tmr[SCN.cur]if _ then _(dt)end--Scene Updater
|
_=Tmr[SCN.cur]if _ then _(dt)end--Scene Updater
|
||||||
if SCN.swapping then SCN.swapUpdate()end--Scene swapping animation
|
if SCN.swapping then SCN.swapUpdate()end--Scene swapping animation
|
||||||
WIDGET.update()--Widgets animation
|
WIDGET.update()--Widgets animation
|
||||||
|
|
||||||
@@ -1019,76 +1032,11 @@ function love.run()
|
|||||||
if Timer()-lastFrame<.058 then WAIT(.01)end
|
if Timer()-lastFrame<.058 then WAIT(.01)end
|
||||||
while Timer()-lastFrame<.0159 do WAIT(.001)end
|
while Timer()-lastFrame<.0159 do WAIT(.001)end
|
||||||
|
|
||||||
--FRESH POWER
|
--FRESH POWERINFO
|
||||||
lastFrame=Timer()
|
lastFrame=Timer()
|
||||||
if Timer()-lastFreshPow>3 and setting.powerInfo and SCN.cur~="load"then
|
if Timer()-lastFreshPow>3 and setting.powerInfo and SCN.cur~="load"then
|
||||||
updatePowerInfo()
|
updatePowerInfo()
|
||||||
lastFreshPow=Timer()
|
lastFreshPow=Timer()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
function love.errorhandler(msg)
|
|
||||||
local PUMP,POLL=love.event.pump,love.event.poll
|
|
||||||
love.mouse.setVisible(true)
|
|
||||||
love.audio.stop()
|
|
||||||
local err={"Error:"..msg}
|
|
||||||
local trace=debug.traceback("",2)
|
|
||||||
local c=2
|
|
||||||
for l in string.gmatch(trace,"(.-)\n")do
|
|
||||||
if c>2 then
|
|
||||||
if not string.find(l,"boot")then
|
|
||||||
err[c]=string.gsub(l,"^\t*","")
|
|
||||||
c=c+1
|
|
||||||
end
|
|
||||||
else
|
|
||||||
err[2]="Traceback"
|
|
||||||
c=3
|
|
||||||
end
|
|
||||||
end
|
|
||||||
print(table.concat(err,"\n"),1,c-2)
|
|
||||||
gc.reset()
|
|
||||||
local CAP
|
|
||||||
local function _(_)CAP=gc.newImage(_)end
|
|
||||||
gc.captureScreenshot(_)
|
|
||||||
gc.present()
|
|
||||||
setting.sfx=setting.voc--only for error "voice" played with voice volume,not saved
|
|
||||||
if SFX.list.error then SFX.play("error",.8)end
|
|
||||||
local BGcolor=rnd()>.026 and{.3,.5,.9},{.62,.3,.926}
|
|
||||||
local needDraw=true
|
|
||||||
return function()
|
|
||||||
PUMP()
|
|
||||||
for E,a,b,c,d,e in POLL()do
|
|
||||||
if E=="quit"or a=="escape"then
|
|
||||||
destroyPlayers()
|
|
||||||
return 1
|
|
||||||
elseif E=="resize"then
|
|
||||||
love.resize(a,b)
|
|
||||||
needDraw=true
|
|
||||||
elseif E=="focus"then
|
|
||||||
needDraw=true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if needDraw then
|
|
||||||
gc.discard()
|
|
||||||
gc.clear(BGcolor)
|
|
||||||
gc.setColor(1,1,1)
|
|
||||||
gc.push("transform")
|
|
||||||
gc.replaceTransform(xOy)
|
|
||||||
gc.draw(CAP,100,365,nil,512/CAP:getWidth(),288/CAP:getHeight())
|
|
||||||
setFont(120)gc.print(":(",100,40)
|
|
||||||
setFont(38)gc.printf(text.errorMsg,100,200,1280-100)
|
|
||||||
setFont(20)
|
|
||||||
gc.print(system.."-"..gameVersion,100,660)
|
|
||||||
gc.print("scene:"..SCN.cur,400,660)
|
|
||||||
gc.printf(err[1],626,360,1260-626)
|
|
||||||
gc.print("TRACEBACK",626,426)
|
|
||||||
for i=4,#err-2 do
|
|
||||||
gc.print(err[i],626,370+20*i)
|
|
||||||
end
|
|
||||||
gc.pop()
|
|
||||||
gc.present()
|
|
||||||
needDraw=false
|
|
||||||
end
|
|
||||||
love.timer.sleep(.2)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
2
conf.lua
2
conf.lua
@@ -1,4 +1,4 @@
|
|||||||
gameVersion="Alpha V0.8.21"
|
gameVersion="Alpha V0.8.22"
|
||||||
function love.conf(t)
|
function love.conf(t)
|
||||||
t.identity="Techmino"--folder name
|
t.identity="Techmino"--folder name
|
||||||
t.version="11.1"
|
t.version="11.1"
|
||||||
|
|||||||
BIN
image/BG/bg1.png
BIN
image/BG/bg1.png
Binary file not shown.
|
Before Width: | Height: | Size: 1.7 KiB |
BIN
image/BG/bg2.png
BIN
image/BG/bg2.png
Binary file not shown.
|
Before Width: | Height: | Size: 227 B |
BIN
image/mess/electric.png
Normal file
BIN
image/mess/electric.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
4
main.lua
4
main.lua
@@ -55,9 +55,9 @@ WIDGET=require("parts/widget")
|
|||||||
LIGHT=require("parts/light")
|
LIGHT=require("parts/light")
|
||||||
|
|
||||||
require("parts/modes")
|
require("parts/modes")
|
||||||
require("default_data")
|
require("parts/default_data")
|
||||||
require("parts/ai")
|
require("parts/ai")
|
||||||
require("player")
|
PLY=require("player")
|
||||||
widgetList=require("widgetList")
|
widgetList=require("widgetList")
|
||||||
require("callback")
|
require("callback")
|
||||||
|
|
||||||
|
|||||||
@@ -30,11 +30,11 @@ return{
|
|||||||
P:win("finish")
|
P:win("finish")
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
bg="game3",bgm="far",
|
bg="aura",bgm="far",
|
||||||
},
|
},
|
||||||
slowMark=true,
|
slowMark=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
players[1].modeData.event="M7"
|
players[1].modeData.event="M7"
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ return{
|
|||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(55)
|
setFont(55)
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ return{
|
|||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(55)
|
setFont(55)
|
||||||
|
|||||||
@@ -11,13 +11,13 @@ return{
|
|||||||
env={
|
env={
|
||||||
drop=1e99,lock=1e99,
|
drop=1e99,lock=1e99,
|
||||||
hold=false,
|
hold=false,
|
||||||
dropPiece=player.lose,
|
dropPiece=function(P)P:lose()end,
|
||||||
task=nil,
|
task=nil,
|
||||||
bg="game1",bgm="newera",
|
bg="game1",bgm="newera",
|
||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
end,
|
end,
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ return{
|
|||||||
env={
|
env={
|
||||||
drop=30,lock=45,
|
drop=30,lock=45,
|
||||||
visible="time",
|
visible="time",
|
||||||
dropPiece=player.reach_winCheck,
|
dropPiece=PLY.reach_winCheck,
|
||||||
freshLimit=10,
|
freshLimit=10,
|
||||||
target=200,
|
target=200,
|
||||||
bg="glow",bgm="newera",
|
bg="glow",bgm="newera",
|
||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
mText(drawableText.line,-81,300)
|
mText(drawableText.line,-81,300)
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
local gc=love.graphics
|
||||||
local min=math.min
|
local min=math.min
|
||||||
return{
|
return{
|
||||||
color=color.magenta,
|
color=color.magenta,
|
||||||
@@ -6,14 +7,14 @@ return{
|
|||||||
fall=10,lock=60,
|
fall=10,lock=60,
|
||||||
center=false,
|
center=false,
|
||||||
visible="none",
|
visible="none",
|
||||||
dropPiece=player.reach_winCheck,
|
dropPiece=PLY.reach_winCheck,
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
target=200,
|
target=200,
|
||||||
bg="rgb",bgm="secret7th",
|
bg="rgb",bgm="secret7th",
|
||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
mText(drawableText.line,-81,300)
|
mText(drawableText.line,-81,300)
|
||||||
@@ -21,6 +22,8 @@ return{
|
|||||||
setFont(75)
|
setFont(75)
|
||||||
mStr(P.stat.row,-81,220)
|
mStr(P.stat.row,-81,220)
|
||||||
mStr(P.stat.clear_S[4],-81,340)
|
mStr(P.stat.clear_S[4],-81,340)
|
||||||
|
gc.setColor(1,1,1,.2)
|
||||||
|
gc.draw(IMG.electric,-26,120,0,2.6)
|
||||||
end,
|
end,
|
||||||
score=function(P)return{min(P.stat.row or 200),P.stat.time}end,
|
score=function(P)return{min(P.stat.row or 200),P.stat.time}end,
|
||||||
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
local gc=love.graphics
|
||||||
local min=math.min
|
local min=math.min
|
||||||
return{
|
return{
|
||||||
color=color.red,
|
color=color.red,
|
||||||
@@ -7,14 +8,14 @@ return{
|
|||||||
center=false,ghost=false,
|
center=false,ghost=false,
|
||||||
dropFX=0,lockFX=0,
|
dropFX=0,lockFX=0,
|
||||||
visible="none",
|
visible="none",
|
||||||
dropPiece=player.reach_winCheck,
|
dropPiece=PLY.reach_winCheck,
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
target=200,
|
target=200,
|
||||||
bg="rgb",bgm="secret8th",
|
bg="rgb",bgm="secret8th",
|
||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
mText(drawableText.line,-81,300)
|
mText(drawableText.line,-81,300)
|
||||||
@@ -22,6 +23,8 @@ return{
|
|||||||
setFont(75)
|
setFont(75)
|
||||||
mStr(P.stat.row,-81,220)
|
mStr(P.stat.row,-81,220)
|
||||||
mStr(P.stat.clear_S[4],-81,340)
|
mStr(P.stat.clear_S[4],-81,340)
|
||||||
|
gc.setColor(1,1,1,.2)
|
||||||
|
gc.draw(IMG.electric,-26,120,0,2.6)
|
||||||
end,
|
end,
|
||||||
score=function(P)return{min(P.stat.row or 200),P.stat.time}end,
|
score=function(P)return{min(P.stat.row or 200),P.stat.time}end,
|
||||||
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
local gc=love.graphics
|
||||||
local min=math.min
|
local min=math.min
|
||||||
return{
|
return{
|
||||||
color=color.green,
|
color=color.green,
|
||||||
@@ -5,14 +6,14 @@ return{
|
|||||||
drop=15,lock=45,
|
drop=15,lock=45,
|
||||||
freshLimit=10,
|
freshLimit=10,
|
||||||
visible="fast",
|
visible="fast",
|
||||||
dropPiece=player.reach_winCheck,
|
dropPiece=PLY.reach_winCheck,
|
||||||
freshLimit=10,
|
freshLimit=10,
|
||||||
target=200,
|
target=200,
|
||||||
bg="glow",bgm="reason",
|
bg="glow",bgm="reason",
|
||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
mText(drawableText.line,-81,300)
|
mText(drawableText.line,-81,300)
|
||||||
@@ -20,6 +21,8 @@ return{
|
|||||||
setFont(75)
|
setFont(75)
|
||||||
mStr(P.stat.row,-81,220)
|
mStr(P.stat.row,-81,220)
|
||||||
mStr(P.stat.clear_S[4],-81,340)
|
mStr(P.stat.clear_S[4],-81,340)
|
||||||
|
gc.setColor(1,1,1,.2)
|
||||||
|
gc.draw(IMG.electric,-26,120,0,2.6)
|
||||||
end,
|
end,
|
||||||
score=function(P)return{min(P.stat.row or 200),P.stat.time}end,
|
score=function(P)return{min(P.stat.row or 200),P.stat.time}end,
|
||||||
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
local gc=love.graphics
|
||||||
local min=math.min
|
local min=math.min
|
||||||
return{
|
return{
|
||||||
color=color.red,
|
color=color.red,
|
||||||
@@ -8,14 +9,14 @@ return{
|
|||||||
center=false,ghost=false,
|
center=false,ghost=false,
|
||||||
dropFX=0,lockFX=0,
|
dropFX=0,lockFX=0,
|
||||||
visible="none",
|
visible="none",
|
||||||
dropPiece=player.reach_winCheck,
|
dropPiece=PLY.reach_winCheck,
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
target=200,
|
target=200,
|
||||||
bg="rgb",bgm="secret7th",
|
bg="rgb",bgm="secret7th",
|
||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
mText(drawableText.line,-81,300)
|
mText(drawableText.line,-81,300)
|
||||||
@@ -23,6 +24,8 @@ return{
|
|||||||
setFont(75)
|
setFont(75)
|
||||||
mStr(P.stat.row,-81,220)
|
mStr(P.stat.row,-81,220)
|
||||||
mStr(P.stat.clear_S[4],-81,340)
|
mStr(P.stat.clear_S[4],-81,340)
|
||||||
|
gc.setColor(1,1,1,.2)
|
||||||
|
gc.draw(IMG.electric,-26,120,0,2.6)
|
||||||
end,
|
end,
|
||||||
score=function(P)return{min(P.stat.row or 200),P.stat.time}end,
|
score=function(P)return{min(P.stat.row or 200),P.stat.time}end,
|
||||||
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ return{
|
|||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
local P=players[1]
|
local P=players[1]
|
||||||
local F=P.field
|
local F=P.field
|
||||||
for i=1,24 do
|
for i=1,24 do
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ return{
|
|||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
local P=players[1]
|
local P=players[1]
|
||||||
local F=P.field
|
local F=P.field
|
||||||
for i=1,24 do
|
for i=1,24 do
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ return{
|
|||||||
},
|
},
|
||||||
slowMark=true,
|
slowMark=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(75)
|
setFont(75)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ local int=math.floor
|
|||||||
return{
|
return{
|
||||||
color=color.white,
|
color=color.white,
|
||||||
env={
|
env={
|
||||||
dropPiece=player.reach_winCheck,
|
dropPiece=PLY.reach_winCheck,
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
for i=1,#customID do
|
for i=1,#customID do
|
||||||
@@ -12,14 +12,14 @@ return{
|
|||||||
end
|
end
|
||||||
modeEnv._20G=modeEnv.drop==0
|
modeEnv._20G=modeEnv.drop==0
|
||||||
modeEnv.oncehold=customSel[6]==1
|
modeEnv.oncehold=customSel[6]==1
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
local L=modeEnv.opponent
|
local L=modeEnv.opponent
|
||||||
if L~=0 then
|
if L~=0 then
|
||||||
modeEnv.target=nil
|
modeEnv.target=nil
|
||||||
if L<10 then
|
if L<10 then
|
||||||
newAIPlayer(2,965,360,.5,AITemplate("9S",2*L))
|
PLY.newAIPlayer(2,965,360,.5,AITemplate("9S",2*L))
|
||||||
else
|
else
|
||||||
newAIPlayer(2,965,360,.5,AITemplate("CC",L-6,2+int((L-11)*.5),modeEnv.hold,15000+5000*(L-10)))
|
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",L-6,2+int((L-11)*.5),modeEnv.hold,15000+5000*(L-10)))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
preField.h=20
|
preField.h=20
|
||||||
|
|||||||
@@ -32,14 +32,14 @@ return{
|
|||||||
modeEnv._20G=modeEnv.drop==0
|
modeEnv._20G=modeEnv.drop==0
|
||||||
modeEnv.oncehold=customSel[6]==1
|
modeEnv.oncehold=customSel[6]==1
|
||||||
modeEnv.target=0
|
modeEnv.target=0
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
local L=modeEnv.opponent
|
local L=modeEnv.opponent
|
||||||
if L~=0 then
|
if L~=0 then
|
||||||
modeEnv.target=nil
|
modeEnv.target=nil
|
||||||
if L<10 then
|
if L<10 then
|
||||||
newAIPlayer(2,965,360,.5,AITemplate("9S",2*L))
|
PLY.newAIPlayer(2,965,360,.5,AITemplate("9S",2*L))
|
||||||
else
|
else
|
||||||
newAIPlayer(2,965,360,.5,AITemplate("CC",L-6,2+int((L-11)*.5),modeEnv.hold,15000+5000*(L-10)))
|
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",L-6,2+int((L-11)*.5),modeEnv.hold,15000+5000*(L-10)))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
preField.h=20
|
preField.h=20
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ return{
|
|||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(55)
|
setFont(55)
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ return{
|
|||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(55)
|
setFont(55)
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ return{
|
|||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(65)
|
setFont(65)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ return{
|
|||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(65)
|
setFont(65)
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ return{
|
|||||||
P:getNext(res[rnd(#res)])
|
P:getNext(res[rnd(#res)])
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
target=100,dropPiece=player.reach_winCheck,
|
target=100,dropPiece=PLY.reach_winCheck,
|
||||||
next=1,hold=false,
|
next=1,hold=false,
|
||||||
ospin=false,
|
ospin=false,
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
@@ -90,7 +90,7 @@ return{
|
|||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(70)
|
setFont(70)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ return{
|
|||||||
drop=20,lock=60,
|
drop=20,lock=60,
|
||||||
sequence="bag",
|
sequence="bag",
|
||||||
bag={1,1,2,2,3,3,4,4,5,5,6,6},
|
bag={1,1,2,2,3,3,4,4,5,5,6,6},
|
||||||
target=100,dropPiece=player.reach_winCheck,
|
target=100,dropPiece=PLY.reach_winCheck,
|
||||||
next=3,
|
next=3,
|
||||||
ospin=false,
|
ospin=false,
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
@@ -13,7 +13,7 @@ return{
|
|||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(70)
|
setFont(70)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ return{
|
|||||||
bg="glow",bgm="infinite",
|
bg="glow",bgm="infinite",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(45)
|
setFont(45)
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ return{
|
|||||||
bg="glow",bgm="infinite",
|
bg="glow",bgm="infinite",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
for _=1,8 do
|
for _=1,8 do
|
||||||
players[1]:garbageRise(13,1,rnd(10))
|
players[1]:garbageRise(13,1,rnd(10))
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ return{
|
|||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
slowMark=true,
|
slowMark=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(45)
|
setFont(45)
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ return{
|
|||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
slowMark=true,
|
slowMark=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(45)
|
setFont(45)
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ return{
|
|||||||
},
|
},
|
||||||
slowMark=true,
|
slowMark=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(45)
|
setFont(45)
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ return{
|
|||||||
},
|
},
|
||||||
slowMark=true,
|
slowMark=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(45)
|
setFont(45)
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ return{
|
|||||||
},
|
},
|
||||||
slowMark=true,
|
slowMark=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(45)
|
setFont(45)
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ return{
|
|||||||
env={
|
env={
|
||||||
drop=60,lock=120,
|
drop=60,lock=120,
|
||||||
fall=10,
|
fall=10,
|
||||||
target=100,dropPiece=player.reach_winCheck,
|
target=100,dropPiece=PLY.reach_winCheck,
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
ospin=false,
|
ospin=false,
|
||||||
bg="rgb",bgm="infinite",
|
bg="rgb",bgm="infinite",
|
||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(45)
|
setFont(45)
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ return{
|
|||||||
env={
|
env={
|
||||||
drop=20,lock=60,
|
drop=20,lock=60,
|
||||||
fall=20,
|
fall=20,
|
||||||
target=100,dropPiece=player.reach_winCheck,
|
target=100,dropPiece=PLY.reach_winCheck,
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
ospin=false,
|
ospin=false,
|
||||||
bg="rgb",bgm="infinite",
|
bg="rgb",bgm="infinite",
|
||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(45)
|
setFont(45)
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ return{
|
|||||||
env={
|
env={
|
||||||
oncehold=false,
|
oncehold=false,
|
||||||
drop=300,lock=1e99,
|
drop=300,lock=1e99,
|
||||||
target=100,dropPiece=player.reach_winCheck,
|
target=100,dropPiece=PLY.reach_winCheck,
|
||||||
ospin=false,
|
ospin=false,
|
||||||
bg="rgb",bgm="newera",
|
bg="rgb",bgm="newera",
|
||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(45)
|
setFont(45)
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ return{
|
|||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
newPC(players[1])
|
newPC(players[1])
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ return{
|
|||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
newPC(players[1])
|
newPC(players[1])
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ return{
|
|||||||
bg="game2",bgm="push",
|
bg="game2",bgm="push",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
newAIPlayer(2,965,360,.5,AITemplate("CC",10,1,true,5000))
|
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",10,1,true,5000))
|
||||||
game.garbageSpeed=1e99
|
game.garbageSpeed=1e99
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ return{
|
|||||||
bg="game2",bgm="push",
|
bg="game2",bgm="push",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
newAIPlayer(2,965,360,.5,AITemplate("CC",10,1,true,10000))
|
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",10,1,true,10000))
|
||||||
game.garbageSpeed=1e99
|
game.garbageSpeed=1e99
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ return{
|
|||||||
bg="game2",bgm="push",
|
bg="game2",bgm="push",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
newAIPlayer(2,965,360,.5,AITemplate("CC",10,2,true,12600))
|
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",10,2,true,12600))
|
||||||
game.garbageSpeed=1e99
|
game.garbageSpeed=1e99
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ return{
|
|||||||
bg="game2",bgm="push",
|
bg="game2",bgm="push",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
newAIPlayer(2,965,360,.5,AITemplate("CC",10,3,true,16260))
|
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",10,3,true,16260))
|
||||||
game.garbageSpeed=1e99
|
game.garbageSpeed=1e99
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ return{
|
|||||||
bg="game2",bgm="push",
|
bg="game2",bgm="push",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
newAIPlayer(2,965,360,.5,AITemplate("CC",10,3,true,26000))
|
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",10,3,true,26000))
|
||||||
game.garbageSpeed=1e99
|
game.garbageSpeed=1e99
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ return{
|
|||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
newAIPlayer(2,965,360,.5,AITemplate("9S",3))
|
PLY.newAIPlayer(2,965,360,.5,AITemplate("9S",3))
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
end,
|
end,
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ return{
|
|||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
newAIPlayer(2,965,360,.5,AITemplate("9S",5))
|
PLY.newAIPlayer(2,965,360,.5,AITemplate("9S",5))
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
end,
|
end,
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ return{
|
|||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
newAIPlayer(2,965,360,.5,AITemplate("9S",7))
|
PLY.newAIPlayer(2,965,360,.5,AITemplate("9S",7))
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
end,
|
end,
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ return{
|
|||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
newAIPlayer(2,965,360,.5,AITemplate("CC",9,2,true,26000))
|
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",9,2,true,26000))
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
end,
|
end,
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ return{
|
|||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
newAIPlayer(2,965,360,.5,AITemplate("CC",10,3,true,50000))
|
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",10,3,true,50000))
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
end,
|
end,
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ return{
|
|||||||
env={
|
env={
|
||||||
drop=60,lock=60,
|
drop=60,lock=60,
|
||||||
sequence="bag",bag={8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25},
|
sequence="bag",bag={8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25},
|
||||||
target=40,dropPiece=player.reach_winCheck,
|
target=40,dropPiece=PLY.reach_winCheck,
|
||||||
bg="strap",bgm="race",
|
bg="aura",bgm="race",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
local dx,dy=P.fieldOff.x,P.fieldOff.y
|
local dx,dy=P.fieldOff.x,P.fieldOff.y
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ return{
|
|||||||
color=color.cyan,
|
color=color.cyan,
|
||||||
env={
|
env={
|
||||||
drop=60,lock=60,
|
drop=60,lock=60,
|
||||||
target=10,dropPiece=player.reach_winCheck,
|
target=10,dropPiece=PLY.reach_winCheck,
|
||||||
bg="strap",bgm="race",
|
bg="strap",bgm="race",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
local dx,dy=P.fieldOff.x,P.fieldOff.y
|
local dx,dy=P.fieldOff.x,P.fieldOff.y
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ return{
|
|||||||
color=color.orange,
|
color=color.orange,
|
||||||
env={
|
env={
|
||||||
drop=60,lock=60,
|
drop=60,lock=60,
|
||||||
target=100,dropPiece=player.reach_winCheck,
|
target=100,dropPiece=PLY.reach_winCheck,
|
||||||
bg="strap",bgm="race",
|
bg="strap",bgm="race",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
local dx,dy=P.fieldOff.x,P.fieldOff.y
|
local dx,dy=P.fieldOff.x,P.fieldOff.y
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ return{
|
|||||||
color=color.lightGrey,
|
color=color.lightGrey,
|
||||||
env={
|
env={
|
||||||
drop=60,lock=60,
|
drop=60,lock=60,
|
||||||
target=1000,dropPiece=player.reach_winCheck,
|
target=1000,dropPiece=PLY.reach_winCheck,
|
||||||
bg="strap",bgm="push",
|
bg="strap",bgm="push",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
local dx,dy=P.fieldOff.x,P.fieldOff.y
|
local dx,dy=P.fieldOff.x,P.fieldOff.y
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ return{
|
|||||||
color=color.lightBlue,
|
color=color.lightBlue,
|
||||||
env={
|
env={
|
||||||
drop=60,lock=60,
|
drop=60,lock=60,
|
||||||
target=20,dropPiece=player.reach_winCheck,
|
target=20,dropPiece=PLY.reach_winCheck,
|
||||||
bg="strap",bgm="race",
|
bg="strap",bgm="race",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
local dx,dy=P.fieldOff.x,P.fieldOff.y
|
local dx,dy=P.fieldOff.x,P.fieldOff.y
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ return{
|
|||||||
color=color.green,
|
color=color.green,
|
||||||
env={
|
env={
|
||||||
drop=60,lock=60,
|
drop=60,lock=60,
|
||||||
target=40,dropPiece=player.reach_winCheck,
|
target=40,dropPiece=PLY.reach_winCheck,
|
||||||
bg="strap",bgm="race",
|
bg="strap",bgm="race",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
local dx,dy=P.fieldOff.x,P.fieldOff.y
|
local dx,dy=P.fieldOff.x,P.fieldOff.y
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ return{
|
|||||||
color=color.red,
|
color=color.red,
|
||||||
env={
|
env={
|
||||||
drop=60,lock=60,
|
drop=60,lock=60,
|
||||||
target=400,dropPiece=player.reach_winCheck,
|
target=400,dropPiece=PLY.reach_winCheck,
|
||||||
bg="strap",bgm="push",
|
bg="strap",bgm="push",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
local dx,dy=P.fieldOff.x,P.fieldOff.y
|
local dx,dy=P.fieldOff.x,P.fieldOff.y
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ return{
|
|||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(65)
|
setFont(65)
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ return{
|
|||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(65)
|
setFont(65)
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ return{
|
|||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(65)
|
setFont(65)
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ return{
|
|||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(65)
|
setFont(65)
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ return{
|
|||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(65)
|
setFont(65)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ return{
|
|||||||
bg="matrix",bgm="secret8th",
|
bg="matrix",bgm="secret8th",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(45)
|
setFont(45)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ return{
|
|||||||
bg="matrix",bgm="secret8th",
|
bg="matrix",bgm="secret8th",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(45)
|
setFont(45)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ return{
|
|||||||
bg="matrix",bgm="secret7th",
|
bg="matrix",bgm="secret7th",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(45)
|
setFont(45)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ return{
|
|||||||
bg="matrix",bgm="secret7th",
|
bg="matrix",bgm="secret7th",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(45)
|
setFont(45)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ return{
|
|||||||
bg="matrix",bgm="newera",
|
bg="matrix",bgm="newera",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(45)
|
setFont(45)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ return{
|
|||||||
bg="matrix",bgm="newera",
|
bg="matrix",bgm="newera",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(45)
|
setFont(45)
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ return{
|
|||||||
},
|
},
|
||||||
slowMark=true,
|
slowMark=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(45)
|
setFont(45)
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ return{
|
|||||||
},
|
},
|
||||||
slowMark=true,
|
slowMark=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(45)
|
setFont(45)
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ return{
|
|||||||
powerUp={2,5,10,20},
|
powerUp={2,5,10,20},
|
||||||
stage={30,20,15,10,5},
|
stage={30,20,15,10,5},
|
||||||
}
|
}
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
local L={}for i=1,49 do L[i]=true end
|
local L={}for i=1,49 do L[i]=true end
|
||||||
local t=system~="Windows"and 0 or 2
|
local t=system~="Windows"and 0 or 2
|
||||||
while t>0 do
|
while t>0 do
|
||||||
@@ -41,17 +41,17 @@ return{
|
|||||||
local n=2
|
local n=2
|
||||||
for i=1,4 do for j=1,6 do
|
for i=1,4 do for j=1,6 do
|
||||||
if L[n]then
|
if L[n]then
|
||||||
newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("9S",rnd(2,5)))
|
PLY.newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("9S",rnd(2,5)))
|
||||||
else
|
else
|
||||||
newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("CC",rnd(2,5)-1,2,true,10000))
|
PLY.newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("CC",rnd(2,5)-1,2,true,10000))
|
||||||
end
|
end
|
||||||
n=n+1
|
n=n+1
|
||||||
end end
|
end end
|
||||||
for i=9,12 do for j=1,6 do
|
for i=9,12 do for j=1,6 do
|
||||||
if L[n]then
|
if L[n]then
|
||||||
newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("9S",rnd(2,5)))
|
PLY.newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("9S",rnd(2,5)))
|
||||||
else
|
else
|
||||||
newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("CC",rnd(2,5)-1,2,true,10000))
|
PLY.newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("CC",rnd(2,5)-1,2,true,10000))
|
||||||
end
|
end
|
||||||
n=n+1
|
n=n+1
|
||||||
end end
|
end end
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ return{
|
|||||||
powerUp={2,5,10,20},
|
powerUp={2,5,10,20},
|
||||||
stage={30,20,15,10,5},
|
stage={30,20,15,10,5},
|
||||||
}
|
}
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
local L={}for i=1,49 do L[i]=true end
|
local L={}for i=1,49 do L[i]=true end
|
||||||
local t=system~="Windows"and 0 or 4
|
local t=system~="Windows"and 0 or 4
|
||||||
while t>0 do
|
while t>0 do
|
||||||
@@ -41,17 +41,17 @@ return{
|
|||||||
local n=2
|
local n=2
|
||||||
for i=1,4 do for j=1,6 do
|
for i=1,4 do for j=1,6 do
|
||||||
if L[n]then
|
if L[n]then
|
||||||
newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("9S",rnd(4,7)))
|
PLY.newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("9S",rnd(4,7)))
|
||||||
else
|
else
|
||||||
newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("CC",rnd(4,7)-1,3,true,20000))
|
PLY.newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("CC",rnd(4,7)-1,3,true,20000))
|
||||||
end
|
end
|
||||||
n=n+1
|
n=n+1
|
||||||
end end
|
end end
|
||||||
for i=9,12 do for j=1,6 do
|
for i=9,12 do for j=1,6 do
|
||||||
if L[n]then
|
if L[n]then
|
||||||
newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("9S",rnd(4,7)))
|
PLY.newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("9S",rnd(4,7)))
|
||||||
else
|
else
|
||||||
newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("CC",rnd(4,7)-1,3,true,20000))
|
PLY.newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("CC",rnd(4,7)-1,3,true,20000))
|
||||||
end
|
end
|
||||||
n=n+1
|
n=n+1
|
||||||
end end
|
end end
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ return{
|
|||||||
powerUp={2,5,10,20},
|
powerUp={2,5,10,20},
|
||||||
stage={30,20,15,10,5},
|
stage={30,20,15,10,5},
|
||||||
}
|
}
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
local L={}for i=1,49 do L[i]=true end
|
local L={}for i=1,49 do L[i]=true end
|
||||||
local t=system~="Windows"and 0 or 6
|
local t=system~="Windows"and 0 or 6
|
||||||
while t>0 do
|
while t>0 do
|
||||||
@@ -41,17 +41,17 @@ return{
|
|||||||
local n=2
|
local n=2
|
||||||
for i=1,4 do for j=1,6 do
|
for i=1,4 do for j=1,6 do
|
||||||
if L[n]then
|
if L[n]then
|
||||||
newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("9S",rnd(8,10)))
|
PLY.newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("9S",rnd(8,10)))
|
||||||
else
|
else
|
||||||
newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("CC",rnd(8,10)-1,4,true,30000))
|
PLY.newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("CC",rnd(8,10)-1,4,true,30000))
|
||||||
end
|
end
|
||||||
n=n+1
|
n=n+1
|
||||||
end end
|
end end
|
||||||
for i=9,12 do for j=1,6 do
|
for i=9,12 do for j=1,6 do
|
||||||
if L[n]then
|
if L[n]then
|
||||||
newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("9S",rnd(8,10)))
|
PLY.newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("9S",rnd(8,10)))
|
||||||
else
|
else
|
||||||
newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("CC",rnd(8,10)-1,4,true,30000))
|
PLY.newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("CC",rnd(8,10)-1,4,true,30000))
|
||||||
end
|
end
|
||||||
n=n+1
|
n=n+1
|
||||||
end end
|
end end
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ return{
|
|||||||
powerUp={2,6,14,30},
|
powerUp={2,6,14,30},
|
||||||
stage={75,50,35,20,10},
|
stage={75,50,35,20,10},
|
||||||
}
|
}
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
local L={}for i=1,100 do L[i]=true end
|
local L={}for i=1,100 do L[i]=true end
|
||||||
local t=system~="Windows"and 0 or 4
|
local t=system~="Windows"and 0 or 4
|
||||||
while t>0 do
|
while t>0 do
|
||||||
@@ -41,17 +41,17 @@ return{
|
|||||||
local n=2
|
local n=2
|
||||||
for i=1,7 do for j=1,7 do
|
for i=1,7 do for j=1,7 do
|
||||||
if L[n]then
|
if L[n]then
|
||||||
newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("9S",rnd(2,5)))
|
PLY.newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("9S",rnd(2,5)))
|
||||||
else
|
else
|
||||||
newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(2,5)-1,2,true,10000))
|
PLY.newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(2,5)-1,2,true,10000))
|
||||||
end
|
end
|
||||||
n=n+1
|
n=n+1
|
||||||
end end
|
end end
|
||||||
for i=15,21 do for j=1,7 do
|
for i=15,21 do for j=1,7 do
|
||||||
if L[n]then
|
if L[n]then
|
||||||
newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("9S",rnd(2,5)))
|
PLY.newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("9S",rnd(2,5)))
|
||||||
else
|
else
|
||||||
newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(2,5)-1,2,true,10000))
|
PLY.newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(2,5)-1,2,true,10000))
|
||||||
end
|
end
|
||||||
n=n+1
|
n=n+1
|
||||||
end end
|
end end
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ return{
|
|||||||
powerUp={2,6,14,30},
|
powerUp={2,6,14,30},
|
||||||
stage={75,50,35,20,10},
|
stage={75,50,35,20,10},
|
||||||
}
|
}
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
local L={}for i=1,100 do L[i]=true end
|
local L={}for i=1,100 do L[i]=true end
|
||||||
local t=system~="Windows"and 0 or 4
|
local t=system~="Windows"and 0 or 4
|
||||||
while t>0 do
|
while t>0 do
|
||||||
@@ -41,17 +41,17 @@ return{
|
|||||||
local n=2
|
local n=2
|
||||||
for i=1,7 do for j=1,7 do
|
for i=1,7 do for j=1,7 do
|
||||||
if L[n]then
|
if L[n]then
|
||||||
newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("9S",rnd(4,7)))
|
PLY.newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("9S",rnd(4,7)))
|
||||||
else
|
else
|
||||||
newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(4,7)-1,3,true,20000))
|
PLY.newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(4,7)-1,3,true,20000))
|
||||||
end
|
end
|
||||||
n=n+1
|
n=n+1
|
||||||
end end
|
end end
|
||||||
for i=15,21 do for j=1,7 do
|
for i=15,21 do for j=1,7 do
|
||||||
if L[n]then
|
if L[n]then
|
||||||
newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("9S",rnd(4,7)))
|
PLY.newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("9S",rnd(4,7)))
|
||||||
else
|
else
|
||||||
newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(4,7)-1,3,true,20000))
|
PLY.newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(4,7)-1,3,true,20000))
|
||||||
end
|
end
|
||||||
n=n+1
|
n=n+1
|
||||||
end end
|
end end
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ return{
|
|||||||
powerUp={2,6,14,30},
|
powerUp={2,6,14,30},
|
||||||
stage={75,50,35,20,10},
|
stage={75,50,35,20,10},
|
||||||
}
|
}
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
local L={}for i=1,100 do L[i]=true end
|
local L={}for i=1,100 do L[i]=true end
|
||||||
local t=system~="Windows"and 0 or 4
|
local t=system~="Windows"and 0 or 4
|
||||||
while t>0 do
|
while t>0 do
|
||||||
@@ -41,17 +41,17 @@ return{
|
|||||||
local n=2
|
local n=2
|
||||||
for i=1,7 do for j=1,7 do
|
for i=1,7 do for j=1,7 do
|
||||||
if L[n]then
|
if L[n]then
|
||||||
newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("9S",rnd(8,10)))
|
PLY.newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("9S",rnd(8,10)))
|
||||||
else
|
else
|
||||||
newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(8,10)-1,4,true,30000))
|
PLY.newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(8,10)-1,4,true,30000))
|
||||||
end
|
end
|
||||||
n=n+1
|
n=n+1
|
||||||
end end
|
end end
|
||||||
for i=15,21 do for j=1,7 do
|
for i=15,21 do for j=1,7 do
|
||||||
if L[n]then
|
if L[n]then
|
||||||
newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("9S",rnd(8,10)))
|
PLY.newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("9S",rnd(8,10)))
|
||||||
else
|
else
|
||||||
newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(8,10)-1,4,true,30000))
|
PLY.newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(8,10)-1,4,true,30000))
|
||||||
end
|
end
|
||||||
n=n+1
|
n=n+1
|
||||||
end end
|
end end
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ return{
|
|||||||
bg="matrix",bgm="reason",
|
bg="matrix",bgm="reason",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(75)
|
setFont(75)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ return{
|
|||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(75)
|
setFont(75)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ return{
|
|||||||
},
|
},
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(75)
|
setFont(75)
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ return{
|
|||||||
slowMark=true,
|
slowMark=true,
|
||||||
pauseLimit=true,
|
pauseLimit=true,
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
gc.setLineWidth(2)
|
gc.setLineWidth(2)
|
||||||
|
|||||||
@@ -3,11 +3,11 @@ return{
|
|||||||
env={
|
env={
|
||||||
drop=120,lock=120,
|
drop=120,lock=120,
|
||||||
oncehold=false,target=200,
|
oncehold=false,target=200,
|
||||||
dropPiece=player.reach_winCheck,
|
dropPiece=PLY.reach_winCheck,
|
||||||
bg="strap",bgm="infinite",
|
bg="strap",bgm="infinite",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(70)
|
setFont(70)
|
||||||
|
|||||||
41
paint.lua
41
paint.lua
@@ -54,7 +54,7 @@ local function VirtualkeyPreview()
|
|||||||
local c=sceneTemp.sel==i and .6 or 1
|
local c=sceneTemp.sel==i and .6 or 1
|
||||||
gc.setColor(c,1,c,setting.VKAlpha*.1)
|
gc.setColor(c,1,c,setting.VKAlpha*.1)
|
||||||
gc.setLineWidth(B.r*.07)
|
gc.setLineWidth(B.r*.07)
|
||||||
gc.circle("line",B.x,B.y,B.r)
|
gc.circle("line",B.x,B.y,B.r,10)
|
||||||
if setting.VKIcon then gc.draw(VKIcon[i],B.x,B.y,nil,B.r*.025,nil,18,18)end
|
if setting.VKIcon then gc.draw(VKIcon[i],B.x,B.y,nil,B.r*.025,nil,18,18)end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -202,11 +202,9 @@ function Pnt.mode()
|
|||||||
end
|
end
|
||||||
_=drawableText[rankString[modeRanks[M.id]]]
|
_=drawableText[rankString[modeRanks[M.id]]]
|
||||||
if _ then
|
if _ then
|
||||||
local dx,dy=6.26*sin(Timer()*1.26+M.id),12.6*sin(Timer()+M.id)
|
local dx,dy=6.26*sin(Timer()*0.626+M.id),6.6*sin(Timer()+M.id)
|
||||||
gc.setColor(0,0,0,.5)
|
gc.setColor(0,0,0,.26)
|
||||||
mDraw(_,M.x+dx*1.5,M.y+dy*1.5)
|
mDraw(_,M.x+dx*1.5,M.y+dy*1.5)
|
||||||
gc.setColor(1,1,1,.8)
|
|
||||||
mDraw(_,M.x+dx,M.y+dy)
|
|
||||||
end
|
end
|
||||||
--[[
|
--[[
|
||||||
if M.icon then
|
if M.icon then
|
||||||
@@ -416,13 +414,20 @@ function Pnt.play()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
gc.push("transform")
|
||||||
|
gc.origin()
|
||||||
if restartCount>0 then
|
if restartCount>0 then
|
||||||
gc.setColor(0,0,0,restartCount*.05)
|
gc.setColor(0,0,0,restartCount*.05)
|
||||||
gc.push("transform")
|
gc.rectangle("fill",0,0,scr.w,scr.h)
|
||||||
gc.origin()
|
|
||||||
gc.rectangle("fill",0,0,scr.w,scr.h)
|
|
||||||
gc.pop()
|
|
||||||
end
|
end
|
||||||
|
if game.warnLVL>0 then
|
||||||
|
gc.setColor(0,0,0,0)
|
||||||
|
SHADER.warning:send("level",game.warnLVL)
|
||||||
|
gc.setShader(SHADER.warning)
|
||||||
|
gc.rectangle("fill",0,0,scr.w,scr.h)
|
||||||
|
gc.setShader()
|
||||||
|
end
|
||||||
|
gc.pop()
|
||||||
end
|
end
|
||||||
local hexList={1,0,.5,1.732*.5,-.5,1.732*.5}for i=1,6 do hexList[i]=hexList[i]*150 end
|
local hexList={1,0,.5,1.732*.5,-.5,1.732*.5}for i=1,6 do hexList[i]=hexList[i]*150 end
|
||||||
local textPos={90,131,-90,131,-200,-25,-90,-181,90,-181,200,-25}
|
local textPos={90,131,-90,131,-200,-25,-90,-181,90,-181,200,-25}
|
||||||
@@ -667,7 +672,7 @@ function Pnt.help()
|
|||||||
setFont(20)
|
setFont(20)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
for i=1,#text.help do
|
for i=1,#text.help do
|
||||||
gc.printf(text.help[i],150,30*i-10,1000,"center")
|
gc.printf(text.help[i],150,35*i+40,1000,"center")
|
||||||
end
|
end
|
||||||
setFont(19)
|
setFont(19)
|
||||||
gc.print(text.used,30,330)
|
gc.print(text.used,30,330)
|
||||||
@@ -684,6 +689,22 @@ function Pnt.help()
|
|||||||
mStr(text.support,150+sin(Timer()*4)*20,283)
|
mStr(text.support,150+sin(Timer()*4)*20,283)
|
||||||
mStr(text.support,1138-sin(Timer()*4)*20,270)
|
mStr(text.support,1138-sin(Timer()*4)*20,270)
|
||||||
end
|
end
|
||||||
|
function Pnt.staff()
|
||||||
|
local L=text.staff
|
||||||
|
local t=sceneTemp.time
|
||||||
|
if t>45 then t=45 end
|
||||||
|
if t>0 then
|
||||||
|
setFont(40)
|
||||||
|
for i=1,#L do
|
||||||
|
mStr(L[i],640,800+80*i-t*40)
|
||||||
|
end
|
||||||
|
mDraw(IMG.coloredTitleImage,640,800-t*40,nil,2)
|
||||||
|
mDraw(IMG.coloredTitleImage,640,2160-t*40,nil,2)
|
||||||
|
else
|
||||||
|
setFont(60)
|
||||||
|
mStr("Don't tell this to anyone.",640,-100-t*40)
|
||||||
|
end
|
||||||
|
end
|
||||||
function Pnt.stat()
|
function Pnt.stat()
|
||||||
local chart=sceneTemp.chart
|
local chart=sceneTemp.chart
|
||||||
setFont(24)
|
setFont(24)
|
||||||
|
|||||||
497
parts/bg.lua
497
parts/bg.lua
@@ -2,241 +2,302 @@ local gc=love.graphics
|
|||||||
local int,ceil,rnd,abs=math.floor,math.ceil,math.random,math.abs
|
local int,ceil,rnd,abs=math.floor,math.ceil,math.random,math.abs
|
||||||
local max,min,sin,cos=math.max,math.min,math.sin,math.cos
|
local max,min,sin,cos=math.max,math.min,math.sin,math.cos
|
||||||
|
|
||||||
|
local BG
|
||||||
local scr=scr
|
local scr=scr
|
||||||
local BGinit,BGresize,BGupdate,BGdraw,BGdiscard={},{},{},{},{}
|
local BGvars={_G=_G,SHADER=SHADER}
|
||||||
local BGvars={_G=_G}
|
|
||||||
|
|
||||||
function BGdraw.none()
|
local back={}
|
||||||
gc.clear(.15,.15,.15)
|
back.none={
|
||||||
end
|
draw=function()
|
||||||
|
gc.clear(.15,.15,.15)
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
back.grey={
|
||||||
|
draw=function()
|
||||||
|
gc.clear(.3,.3,.3)
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
back.glow={
|
||||||
|
init=function()
|
||||||
|
t=0
|
||||||
|
end,
|
||||||
|
update=function(dt)
|
||||||
|
t=t+dt
|
||||||
|
end,
|
||||||
|
draw=function()
|
||||||
|
local t=(sin(t*.5)+sin(t*.7)+sin(t*.9+1)+sin(t*1.5)+sin(t*2+10))*.08
|
||||||
|
gc.clear(t,t,t)
|
||||||
|
end,
|
||||||
|
}--light-dark
|
||||||
|
back.rgb={
|
||||||
|
init=function()
|
||||||
|
t=0
|
||||||
|
end,
|
||||||
|
update=function(dt)
|
||||||
|
t=t+dt
|
||||||
|
end,
|
||||||
|
draw=function()
|
||||||
|
gc.clear(
|
||||||
|
sin(t*1.2)*.15+.2,
|
||||||
|
sin(t*1.5)*.15+.2,
|
||||||
|
sin(t*1.9)*.15+.2
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
}--Changing pure color
|
||||||
|
back.strap={
|
||||||
|
init=function()
|
||||||
|
t=0
|
||||||
|
end,
|
||||||
|
update=function(dt)
|
||||||
|
t=t+dt
|
||||||
|
end,
|
||||||
|
draw=function()
|
||||||
|
SHADER.strap:send("t",t*.626)
|
||||||
|
gc.setColor(.4,.626,.626)
|
||||||
|
gc.setShader(SHADER.strap)
|
||||||
|
gc.rectangle("fill",0,0,scr.w,scr.h)
|
||||||
|
gc.setShader()
|
||||||
|
end,
|
||||||
|
}--Horizonal ranbow
|
||||||
|
back.flink={
|
||||||
|
init=function()
|
||||||
|
t=0
|
||||||
|
end,
|
||||||
|
update=function(dt)
|
||||||
|
t=t+dt
|
||||||
|
end,
|
||||||
|
draw=function()
|
||||||
|
local t=.13-t%3%1.7
|
||||||
|
if t<.2 then gc.clear(t,t,t)
|
||||||
|
else gc.clear(0,0,0)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
}--flash after random time
|
||||||
|
back.aura={
|
||||||
|
init=function()
|
||||||
|
t=rnd()*3600
|
||||||
|
BG.resize(scr.w,scr.h)
|
||||||
|
end,
|
||||||
|
resize=function(w,h)
|
||||||
|
SHADER.aura:send("w",w*scr.dpi)
|
||||||
|
SHADER.aura:send("h",h*scr.dpi)
|
||||||
|
end,
|
||||||
|
update=function(dt)
|
||||||
|
t=t+dt
|
||||||
|
end,
|
||||||
|
draw=function()
|
||||||
|
SHADER.aura:send("t",t)
|
||||||
|
gc.setShader(SHADER.aura)
|
||||||
|
gc.rectangle("fill",0,0,scr.w,scr.h)
|
||||||
|
gc.setShader()
|
||||||
|
end,
|
||||||
|
}--cool liquid background
|
||||||
|
back.game1={
|
||||||
|
init=function()
|
||||||
|
t=0
|
||||||
|
BG.resize(scr.w,scr.h)
|
||||||
|
end,
|
||||||
|
resize=function(w,h)
|
||||||
|
SHADER.rainbow:send("w",w*scr.dpi)
|
||||||
|
SHADER.rainbow:send("h",h*scr.dpi)
|
||||||
|
end,
|
||||||
|
update=function(dt)
|
||||||
|
t=t+dt
|
||||||
|
end,
|
||||||
|
draw=function()
|
||||||
|
SHADER.rainbow:send("t",t)
|
||||||
|
gc.setColor(.6,.6,.6)
|
||||||
|
gc.setShader(SHADER.rainbow)
|
||||||
|
gc.rectangle("fill",0,0,scr.w,scr.h)
|
||||||
|
gc.setShader()
|
||||||
|
end,
|
||||||
|
}--Rolling rainbow
|
||||||
|
back.game2={
|
||||||
|
init=function()
|
||||||
|
t=0
|
||||||
|
BG.resize(scr.w,scr.h)
|
||||||
|
end,
|
||||||
|
resize=function(w,h)
|
||||||
|
SHADER.rainbow:send("w",w*scr.dpi)
|
||||||
|
SHADER.rainbow:send("h",h*scr.dpi)
|
||||||
|
end,
|
||||||
|
update=function(dt)
|
||||||
|
t=t+dt
|
||||||
|
end,
|
||||||
|
draw=function()
|
||||||
|
SHADER.rainbow:send("t",t)
|
||||||
|
gc.setColor(.7,.4,.4)
|
||||||
|
gc.setShader(SHADER.rainbow)
|
||||||
|
gc.rectangle("fill",0,0,scr.w,scr.h)
|
||||||
|
gc.setShader()
|
||||||
|
end,
|
||||||
|
}--Red rolling rainbow
|
||||||
|
back.game3={
|
||||||
|
init=function()
|
||||||
|
t=0
|
||||||
|
BG.resize(scr.w,scr.h)
|
||||||
|
end,
|
||||||
|
resize=function(w,h)
|
||||||
|
SHADER.rainbow:send("w",w*scr.dpi)
|
||||||
|
SHADER.rainbow:send("h",h*scr.dpi)
|
||||||
|
end,
|
||||||
|
update=function(dt)
|
||||||
|
t=t+dt
|
||||||
|
end,
|
||||||
|
draw=function()
|
||||||
|
SHADER.rainbow:send("t",t)
|
||||||
|
gc.setColor(.5,.5,.8)
|
||||||
|
gc.setShader(SHADER.rainbow)
|
||||||
|
gc.rectangle("fill",0,0,scr.w,scr.h)
|
||||||
|
gc.setShader()
|
||||||
|
end,
|
||||||
|
}--Blue rolling rainbow
|
||||||
|
back.game4={
|
||||||
|
init=function()
|
||||||
|
t=0
|
||||||
|
end,
|
||||||
|
update=function(dt)
|
||||||
|
t=t+dt
|
||||||
|
end,
|
||||||
|
draw=function()
|
||||||
|
SHADER.strap:send("t",t*1.26)
|
||||||
|
gc.setColor(.5,.626,.74)
|
||||||
|
gc.setShader(SHADER.strap)
|
||||||
|
gc.rectangle("fill",0,0,scr.w,scr.h)
|
||||||
|
gc.setShader()
|
||||||
|
end,
|
||||||
|
}--Blue strap
|
||||||
|
back.game5={
|
||||||
|
init=function()
|
||||||
|
t=0
|
||||||
|
end,
|
||||||
|
update=function(dt)
|
||||||
|
t=t+dt
|
||||||
|
end,
|
||||||
|
draw=function()
|
||||||
|
local t=2.5-t%20%6%2.5
|
||||||
|
if t<.3 then gc.clear(t,t,t)
|
||||||
|
else gc.clear(0,0,0)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
}--Lightning
|
||||||
|
|
||||||
function BGdraw.grey()
|
|
||||||
gc.clear(.3,.3,.3)
|
|
||||||
end
|
|
||||||
|
|
||||||
function BGinit.glow()
|
|
||||||
t=0
|
|
||||||
end
|
|
||||||
function BGupdate.glow(dt)
|
|
||||||
t=t+dt
|
|
||||||
end
|
|
||||||
function BGdraw.glow()
|
|
||||||
local t=(sin(t*.5)+sin(t*.7)+sin(t*.9+1)+sin(t*1.5)+sin(t*2+10))*.08
|
|
||||||
gc.clear(t,t,t)
|
|
||||||
end
|
|
||||||
|
|
||||||
function BGinit.rgb()
|
|
||||||
t=0
|
|
||||||
end
|
|
||||||
function BGupdate.rgb(dt)
|
|
||||||
t=t+dt
|
|
||||||
end
|
|
||||||
function BGdraw.rgb()
|
|
||||||
gc.clear(
|
|
||||||
sin(t*1.2)*.15+.2,
|
|
||||||
sin(t*1.5)*.15+.2,
|
|
||||||
sin(t*1.9)*.15+.2
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
function BGinit.strap()
|
|
||||||
t=0
|
|
||||||
img=_G.IMG.gameBG2
|
|
||||||
end
|
|
||||||
function BGupdate.strap(dt)
|
|
||||||
t=t+dt
|
|
||||||
end
|
|
||||||
function BGdraw.strap()
|
|
||||||
gc.setColor(.5,.5,.5)
|
|
||||||
local x=t%16*-64
|
|
||||||
repeat
|
|
||||||
gc.draw(img,x,0,nil,8,scr.h)
|
|
||||||
x=x+1024--image width*8
|
|
||||||
until x>=scr.w
|
|
||||||
end
|
|
||||||
|
|
||||||
function BGinit.flink()
|
|
||||||
t=0
|
|
||||||
end
|
|
||||||
function BGupdate.flink(dt)
|
|
||||||
t=t+dt
|
|
||||||
end
|
|
||||||
function BGdraw.flink()
|
|
||||||
local t=.13-t%3%1.7
|
|
||||||
if t<.2 then gc.clear(t,t,t)
|
|
||||||
else gc.clear(0,0,0)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function BGinit.game1()
|
|
||||||
t=0
|
|
||||||
img=_G.IMG.gameBG1
|
|
||||||
end
|
|
||||||
function BGupdate.game1(dt)
|
|
||||||
t=t+dt
|
|
||||||
end
|
|
||||||
function BGdraw.game1()
|
|
||||||
gc.setColor(.5,.5,.5)
|
|
||||||
gc.draw(img,scr.w*.5,scr.h*.5,t*.15,scr.rad*.0625,nil,16,16)
|
|
||||||
end--Rainbow
|
|
||||||
|
|
||||||
function BGinit.game2()
|
|
||||||
t=0
|
|
||||||
img=_G.IMG.gameBG1
|
|
||||||
end
|
|
||||||
function BGupdate.game2(dt)
|
|
||||||
t=t+dt
|
|
||||||
end
|
|
||||||
function BGdraw.game2()
|
|
||||||
gc.setColor(.5,.26,.26)
|
|
||||||
gc.draw(img,scr.w*.5,scr.h*.5,t*.15,scr.rad*.0625,nil,16,16)
|
|
||||||
end--Red rainbow
|
|
||||||
|
|
||||||
function BGinit.game3()
|
|
||||||
t=0
|
|
||||||
img=_G.IMG.gameBG1
|
|
||||||
end
|
|
||||||
function BGupdate.game3(dt)
|
|
||||||
t=t+dt
|
|
||||||
end
|
|
||||||
function BGdraw.game3()
|
|
||||||
gc.setColor(.4,.4,.8)
|
|
||||||
gc.draw(img,scr.w*.5,scr.h*.5,t*.15,scr.rad*.0625,nil,16,16)
|
|
||||||
end--Blue rainbow
|
|
||||||
|
|
||||||
function BGinit.game4()
|
|
||||||
t=0
|
|
||||||
img=_G.IMG.gameBG2
|
|
||||||
end
|
|
||||||
function BGupdate.game4(dt)
|
|
||||||
t=t+dt
|
|
||||||
end
|
|
||||||
function BGdraw.game4()
|
|
||||||
gc.setColor(.05,.4,.4)
|
|
||||||
local x=t%8*-128
|
|
||||||
repeat
|
|
||||||
gc.draw(img,x,0,nil,8,scr.h)
|
|
||||||
x=x+1024--image width*8
|
|
||||||
until x>=scr.w
|
|
||||||
end--Fast strap
|
|
||||||
|
|
||||||
function BGinit.game5()
|
|
||||||
t=0
|
|
||||||
end
|
|
||||||
function BGupdate.game5(dt)
|
|
||||||
t=t+dt
|
|
||||||
end
|
|
||||||
function BGdraw.game5()
|
|
||||||
local t=2.5-t%20%6%2.5
|
|
||||||
if t<.3 then gc.clear(t,t,t)
|
|
||||||
else gc.clear(0,0,0)
|
|
||||||
end
|
|
||||||
end--Lightning
|
|
||||||
|
|
||||||
function BGinit.game6()
|
|
||||||
t=0
|
|
||||||
colorLib=_G.SKIN.libColor
|
|
||||||
colorSet=_G.setting.skin
|
|
||||||
miniBlock=_G.miniBlock
|
|
||||||
end
|
|
||||||
function BGupdate.game6(dt)
|
|
||||||
t=t+dt
|
|
||||||
end
|
|
||||||
local blocks=require("parts/mino")
|
local blocks=require("parts/mino")
|
||||||
local scs=require("parts/spinCenters")
|
local scs=require("parts/spinCenters")
|
||||||
function BGdraw.game6()
|
back.game6={
|
||||||
local t=1.2-t%10%3%1.2
|
init=function()
|
||||||
if t<.3 then gc.clear(t,t,t)
|
t=0
|
||||||
else gc.clear(0,0,0)
|
colorLib=_G.SKIN.libColor
|
||||||
end
|
colorSet=_G.setting.skin
|
||||||
local R=7-int(t*.5)%7
|
miniBlock=_G.miniBlock
|
||||||
local _=colorLib[colorSet[R]]
|
end,
|
||||||
gc.setColor(_[1],_[2],_[3],.1)
|
update=function(dt)
|
||||||
gc.draw(miniBlock[R],640,360,t%3.1416*6,400,400,scs[R][0][2]-.5,#blocks[R][0]-scs[R][0][1]+.5)
|
t=t+dt
|
||||||
end--Fast lightning&spining tetromino
|
end,
|
||||||
|
draw=function()
|
||||||
|
local t=1.2-t%10%3%1.2
|
||||||
|
if t<.3 then gc.clear(t,t,t)
|
||||||
|
else gc.clear(0,0,0)
|
||||||
|
end
|
||||||
|
local R=7-int(t*.5)%7
|
||||||
|
local _=colorLib[colorSet[R]]
|
||||||
|
gc.setColor(_[1],_[2],_[3],.1)
|
||||||
|
gc.draw(miniBlock[R],640,360,t%3.1416*6,400,400,scs[R][0][2]-.5,#blocks[R][0]-scs[R][0][1]+.5)
|
||||||
|
end,
|
||||||
|
}--Fast lightning + spining tetromino
|
||||||
|
|
||||||
local matrixT={}for i=1,50 do matrixT[i]={}for j=1,50 do matrixT[i][j]=love.math.noise(i,j)+2 end end
|
local matrixT={}for i=1,50 do matrixT[i]={}for j=1,50 do matrixT[i][j]=love.math.noise(i,j)+2 end end
|
||||||
function BGinit.matrix()
|
back.matrix={
|
||||||
t=0
|
init=function()
|
||||||
end
|
t=rnd()*3600
|
||||||
function BGupdate.matrix(dt)
|
end,
|
||||||
t=t+dt
|
update=function(dt)
|
||||||
end
|
t=t+dt
|
||||||
function BGdraw.matrix()
|
end,
|
||||||
gc.scale(scr.k)
|
draw=function()
|
||||||
gc.clear(.15,.15,.15)
|
gc.scale(scr.k)
|
||||||
local _=ceil(scr.h/80)
|
gc.clear(.15,.15,.15)
|
||||||
for i=1,ceil(scr.w/80)do
|
local Y=ceil(scr.h*scr.dpi/80)
|
||||||
for j=1,_ do
|
for x=1,ceil(scr.w*scr.dpi/80)do
|
||||||
gc.setColor(1,1,1,sin(i+matrixT[i][j]*t)*.1+.1)
|
for y=1,Y do
|
||||||
gc.rectangle("fill",80*i,80*j,-80,-80)
|
gc.setColor(1,1,1,sin(x+matrixT[x][y]*t)*.1+.1)
|
||||||
|
gc.rectangle("fill",80*x,80*y,-80,-80)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
gc.scale(1/scr.k)
|
||||||
gc.scale(1/scr.k)
|
end,
|
||||||
end
|
}
|
||||||
|
|
||||||
|
back.space={
|
||||||
|
init=function()
|
||||||
|
stars={}
|
||||||
|
W,H=scr.w+20,scr.h+20
|
||||||
|
BG.resize(scr.w,scr.h)
|
||||||
|
end,
|
||||||
|
resize=function(w,h)
|
||||||
|
local S=stars
|
||||||
|
for i=1,1260,5 do
|
||||||
|
local s=rnd(26,40)*.1
|
||||||
|
S[i]=s*scr.k --size
|
||||||
|
S[i+1]=rnd(W)-10 --x
|
||||||
|
S[i+2]=rnd(H)-10 --y
|
||||||
|
S[i+3]=(rnd()-.5)*.01*s --vx
|
||||||
|
S[i+4]=(rnd()-.5)*.01*s --vy
|
||||||
|
end--800 var
|
||||||
|
end,
|
||||||
|
update=function(dt)
|
||||||
|
local S=stars
|
||||||
|
for i=1,1260,5 do
|
||||||
|
S[i+1]=(S[i+1]+S[i+3])%W
|
||||||
|
S[i+2]=(S[i+2]+S[i+4])%H
|
||||||
|
end--star moving
|
||||||
|
end,
|
||||||
|
draw=function()
|
||||||
|
gc.clear(.2,.2,.2)
|
||||||
|
if not stars[1]then return end
|
||||||
|
gc.translate(-10,-10)
|
||||||
|
gc.setColor(.8,.8,.8)
|
||||||
|
for i=1,1260,5 do
|
||||||
|
local s=stars
|
||||||
|
local x,y=s[i+1],s[i+2]
|
||||||
|
s=s[i]
|
||||||
|
gc.rectangle("fill",x,y,s,s)
|
||||||
|
end
|
||||||
|
gc.translate(10,10)
|
||||||
|
end,
|
||||||
|
discard=function()
|
||||||
|
stars={}
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
function BGinit.space()
|
for _,bg in next,back do
|
||||||
stars={}
|
if not bg.init then bg.init= NULL end setfenv(bg.init ,BGvars)
|
||||||
for i=1,2600,5 do
|
if not bg.resize then bg.resize= NULL end setfenv(bg.resize ,BGvars)
|
||||||
local s=rnd(4)
|
if not bg.update then bg.update= NULL end setfenv(bg.update ,BGvars)
|
||||||
stars[i]=s --size
|
if not bg.discard then bg.discard=NULL end setfenv(bg.discard ,BGvars)
|
||||||
stars[i+1]=rnd(W)-10 --x
|
if not bg.draw then bg.draw= NULL end setfenv(bg.draw ,BGvars)
|
||||||
stars[i+2]=rnd(H)-10 --y
|
end--make BG vars invisible
|
||||||
stars[i+3]=(rnd()-.5)*.01*s --vx
|
|
||||||
stars[i+4]=(rnd()-.5)*.01*s --vy
|
|
||||||
end--800 var
|
|
||||||
end
|
|
||||||
function BGresize.space(w,h)
|
|
||||||
W,H=w+20,h+20
|
|
||||||
BGinit.space()
|
|
||||||
end
|
|
||||||
function BGupdate.space(dt)
|
|
||||||
local s=stars
|
|
||||||
for i=1,2600,5 do
|
|
||||||
s[i+1]=(s[i+1]+s[i+3])%W
|
|
||||||
s[i+2]=(s[i+2]+s[i+4])%H
|
|
||||||
end--star moving
|
|
||||||
end
|
|
||||||
function BGdraw.space()
|
|
||||||
gc.clear(.2,.2,.2)
|
|
||||||
if not stars[1]then return end
|
|
||||||
gc.translate(-10,-10)
|
|
||||||
gc.setColor(.8,.8,.8)
|
|
||||||
for i=1,2600,5 do
|
|
||||||
local s=stars
|
|
||||||
local x,y=s[i+1],s[i+2]
|
|
||||||
s=s[i]
|
|
||||||
gc.rectangle("fill",x,y,s,s)
|
|
||||||
end
|
|
||||||
gc.translate(10,10)
|
|
||||||
end
|
|
||||||
function BGdiscard.space()
|
|
||||||
stars={}
|
|
||||||
end
|
|
||||||
|
|
||||||
for k in next,BGdraw do
|
BG={
|
||||||
if BGinit[k]then setfenv(BGinit[k], BGvars)end
|
|
||||||
if BGresize[k]then setfenv(BGresize[k], BGvars)end
|
|
||||||
if BGupdate[k]then setfenv(BGupdate[k], BGvars)end
|
|
||||||
if BGdraw[k]then setfenv(BGdraw[k], BGvars)end
|
|
||||||
if BGdiscard[k]then setfenv(BGdiscard[k], BGvars)end
|
|
||||||
end
|
|
||||||
|
|
||||||
local BG={
|
|
||||||
cur="none",
|
cur="none",
|
||||||
resize=NULL,
|
resize=NULL,
|
||||||
update=NULL,
|
update=NULL,
|
||||||
draw=BGdraw.none,
|
draw=back.none.draw,
|
||||||
}
|
}
|
||||||
function BG.set(bg)
|
function BG.set(bg)
|
||||||
if bg==BG.cur or not setting.bg then return end
|
if bg==BG.cur or not setting.bg then return end
|
||||||
|
if BG.discard then
|
||||||
|
BG.discard()
|
||||||
|
collectgarbage()
|
||||||
|
end
|
||||||
BG.cur=bg
|
BG.cur=bg
|
||||||
local _=BGdiscard[BG.cur]if _ then _()collectgarbage()end
|
bg=back[bg]
|
||||||
BG.resize=BGresize[bg]or NULL;BG.resize(scr.w,scr.h)
|
|
||||||
_=BGinit[bg]if _ then _()end
|
|
||||||
BG.update=BGupdate[bg]or NULL
|
|
||||||
BG.draw=BGdraw[bg]
|
|
||||||
end
|
|
||||||
|
|
||||||
|
BG.init=bg.init or NULL
|
||||||
|
BG.resize=bg.resize or NULL
|
||||||
|
BG.update=bg.update or NULL
|
||||||
|
BG.discard=bg.discard or NULL
|
||||||
|
BG.draw=bg.draw or NULL
|
||||||
|
BG.init()
|
||||||
|
end
|
||||||
return BG
|
return BG
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
local rem=table.remove
|
local rem=table.remove
|
||||||
|
|
||||||
local BGM={}
|
local BGM={
|
||||||
-- BGM.nowPlay=[str:playing ID]
|
--nowPlay=[str:playing ID]
|
||||||
-- BGM.suspend=[str:pausing ID]
|
--suspend=[str:pausing ID]
|
||||||
-- BGM.playing=[src:playing SRC]
|
--playing=[src:playing SRC]
|
||||||
|
}
|
||||||
BGM.list={
|
BGM.list={
|
||||||
"blank","way","race","newera","push","reason","infinite",
|
"blank","way","race","newera","push","reason","infinite",
|
||||||
"secret7th","secret8th",
|
"secret7th","secret8th",
|
||||||
@@ -11,11 +12,14 @@ BGM.list={
|
|||||||
"rockblock","cruelty","final","8-bit happiness","end",
|
"rockblock","cruelty","final","8-bit happiness","end",
|
||||||
}
|
}
|
||||||
BGM.len=#BGM.list
|
BGM.len=#BGM.list
|
||||||
function BGM.loadOne(_)
|
function BGM.loadOne(N)
|
||||||
local _=BGM.list[_]
|
N=BGM.list[N]
|
||||||
BGM.list[_]=love.audio.newSource("/BGM/".._..".ogg","stream")
|
local file="/BGM/"..N..".ogg"
|
||||||
BGM.list[_]:setLooping(true)
|
if love.filesystem.getInfo(file)then
|
||||||
BGM.list[_]:setVolume(0)
|
BGM.list[N]=love.audio.newSource(file,"stream")
|
||||||
|
BGM.list[N]:setLooping(true)
|
||||||
|
BGM.list[N]:setVolume(0)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
function BGM.loadAll()
|
function BGM.loadAll()
|
||||||
for i=1,#BGM.list do
|
for i=1,#BGM.list do
|
||||||
@@ -27,7 +31,7 @@ function BGM.play(s)
|
|||||||
BGM.playing=BGM.list[s]
|
BGM.playing=BGM.list[s]
|
||||||
BGM.suspend,BGM.nowPlay=s
|
BGM.suspend,BGM.nowPlay=s
|
||||||
return
|
return
|
||||||
elseif not s then
|
elseif not s or not BGM.list[s]then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if BGM.nowPlay~=s then
|
if BGM.nowPlay~=s then
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ local s={
|
|||||||
frameMul=100,
|
frameMul=100,
|
||||||
|
|
||||||
text=true,
|
text=true,
|
||||||
|
warn=true,
|
||||||
fullscreen=false,
|
fullscreen=false,
|
||||||
bg=true,
|
bg=true,
|
||||||
powerInfo=false,
|
powerInfo=false,
|
||||||
@@ -41,14 +41,14 @@ local function dumpTable(L,t)
|
|||||||
end
|
end
|
||||||
elseif T=="string"then k=k.."="
|
elseif T=="string"then k=k.."="
|
||||||
elseif T=="boolean"then k="["..k.."]="
|
elseif T=="boolean"then k="["..k.."]="
|
||||||
else error("Error key type!")
|
else assert(false,"Error key type!")
|
||||||
end
|
end
|
||||||
T=type(v)
|
T=type(v)
|
||||||
if T=="number"then v=tostring(v)
|
if T=="number"then v=tostring(v)
|
||||||
elseif T=="string"then v="\""..v.."\""
|
elseif T=="string"then v="\""..v.."\""
|
||||||
elseif T=="table"then v=dumpTable(v,t+1)
|
elseif T=="table"then v=dumpTable(v,t+1)
|
||||||
elseif T=="boolean"then v=tostring(v)
|
elseif T=="boolean"then v=tostring(v)
|
||||||
else error("Error data type!")
|
else assert(false,"Error data type!")
|
||||||
end
|
end
|
||||||
s=s..tabs[t]..k..v..",\n"
|
s=s..tabs[t]..k..v..",\n"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -17,8 +17,7 @@ local IMG={
|
|||||||
miyaF3="miya/f3.png",
|
miyaF3="miya/f3.png",
|
||||||
miyaF4="miya/f4.png",
|
miyaF4="miya/f4.png",
|
||||||
|
|
||||||
gameBG1="BG/bg1.png",
|
electric="mess/electric.png",
|
||||||
gameBG2="BG/bg2.png",
|
|
||||||
}
|
}
|
||||||
local list={}
|
local list={}
|
||||||
local count=0
|
local count=0
|
||||||
|
|||||||
@@ -62,6 +62,11 @@ local OspinList={
|
|||||||
{121,6,0, 1,-1,1},{112,6,0, 2,-1,2},{122,6,0, 1,-2,2},--O
|
{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
|
{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)}
|
}--{key,id,dir,dx,dy,freeLv(0=unmovable,1=L/R unmovable,2=free)}
|
||||||
|
local XspinList={
|
||||||
|
{{ 1,-1},{ 1, 0},{ 1, 1}},
|
||||||
|
{{ 0,-1},{ 0,-2},{ 0, 1}},
|
||||||
|
{{-1,-1},{-1, 0},{-1, 1}},
|
||||||
|
}
|
||||||
local TRS={
|
local TRS={
|
||||||
{
|
{
|
||||||
[01]={{-1, 0},{-1, 1},{ 0,-2},{-1, 2},{ 0, 1}},
|
[01]={{-1, 0},{-1, 1},{ 0,-2},{-1, 2},{ 0, 1}},
|
||||||
@@ -89,8 +94,8 @@ local TRS={
|
|||||||
[23]={{ 1, 0},{ 1,-1},{ 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}},
|
[02]={{-1, 0},{ 1, 0},{ 0,-1},{ 0, 1}},
|
||||||
[20]={{ 1, 0},{-1, 0},{ 0, 1},{ 0,-1}},
|
[20]={{ 1, 0},{-1, 0},{ 0, 1},{ 0,-1}},
|
||||||
[13]={{ 0,-1},{ 1, 0},{ 0, 1}},
|
[13]={{ 0,-1},{ 0, 1},{ 1, 0}},
|
||||||
[31]={{ 0, 1},{-1, 0},{ 0,-1}},
|
[31]={{ 0, 1},{ 0,-1},{-1, 0}},
|
||||||
},--J
|
},--J
|
||||||
{},--L
|
{},--L
|
||||||
{
|
{
|
||||||
@@ -250,7 +255,19 @@ local TRS={
|
|||||||
[31]={{ 0,-1},{ 1, 0}},
|
[31]={{ 0,-1},{ 1, 0}},
|
||||||
},--W
|
},--W
|
||||||
function(P,d)
|
function(P,d)
|
||||||
return
|
if P.human then SFX.fieldPlay("rotate",nil,P)end
|
||||||
|
if P.gameEnv.easyFresh then P:freshLockDelay()end
|
||||||
|
local iki=XspinList[d]
|
||||||
|
for test=1,#iki do
|
||||||
|
local x,y=P.curX+iki[test][1],P.curY+iki[test][2]
|
||||||
|
if not P:ifoverlap(P.cur.bk,x,y)then
|
||||||
|
P.curX,P.curY=x,y
|
||||||
|
P.spinLast=1
|
||||||
|
P:freshgho()
|
||||||
|
P.stat.rotate=P.stat.rotate+1
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
end,--X
|
end,--X
|
||||||
{
|
{
|
||||||
[01]={{-1, 0},{-1, 1},{ 0,-3},{-1, 1},{-1, 2},{ 0, 1}},
|
[01]={{-1, 0},{-1, 1},{ 0,-3},{-1, 1},{-1, 2},{ 0, 1}},
|
||||||
@@ -259,8 +276,8 @@ local TRS={
|
|||||||
[30]={{ 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}},
|
[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}},
|
[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}},
|
[32]={{-1, 0},{-1, 1},{-1,-1},{ 1, 0},{ 0, 2},{-1, 2},{ 0,-2}},
|
||||||
[23]={{ 1, 0},{ 1,-1},{ 1, 1},{ 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},{ 0, 1}},
|
[02]={{ 0,-1},{ 1,-1},{-1, 0},{ 2,-1},{ 0, 1}},
|
||||||
[20]={{ 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}},
|
[13]={{-1, 0},{-1,-1},{ 0, 1},{-1,-2}},
|
||||||
|
|||||||
@@ -139,21 +139,32 @@ local langList={
|
|||||||
"全/半清:",
|
"全/半清:",
|
||||||
},
|
},
|
||||||
help={
|
help={
|
||||||
"好像也没啥好帮助的吧?就当是关于了",
|
"既然你能玩到这个游戏,应该也不需要什么帮助吧?",
|
||||||
"这只是一个普通的方块游戏,请勿称此游戏为某某某方块",
|
"这只是一个普通的方块游戏,请勿称此游戏为某某某方块",
|
||||||
"从TO/C2/KOS/TGM3/JS等方块获得过灵感",
|
"从TO/C2/KOS/TGM3/JS等方块获得过灵感",
|
||||||
"",
|
"",
|
||||||
"使用LOVE2D引擎",
|
"使用LOVE2D引擎",
|
||||||
"作者:MrZ 邮箱:1046101471@qq.com",
|
|
||||||
"程序:MrZ 美术:MrZ 音乐:MrZ 音效:MrZ 语音:MrZ/Miya",
|
|
||||||
"特别感谢:Flyz,Farter,196,Teatube,[所有内测人员]和 你!",
|
|
||||||
"",
|
|
||||||
"错误或者建议请附带截图发送到内测群或者作者邮箱~",
|
"错误或者建议请附带截图发送到内测群或者作者邮箱~",
|
||||||
"仅通过唯一内测群822023725进行免费下载/更新",
|
"仅通过内测群822023725进行免费下载/更新",
|
||||||
"其他渠道获得游戏皆有被修改/植入病毒的风险,程序只申请了震动&联网权限!",
|
"其他渠道获得游戏皆有被修改/加广告/植入病毒的风险,程序只申请了震动&联网权限!",
|
||||||
"若由于被修改的本游戏产生的各种损失作者不负责(我怎么负责啊跟我有啥关系)",
|
"若由于被修改的本游戏产生的各种损失作者不负责(我怎么负责啊跟我有啥关系)",
|
||||||
"请从正规途径获得最新版,游戏现为免费,不过有打赏当然感谢啦~",
|
"请从正规途径获得最新版,游戏现为免费,不过有打赏当然感谢啦~",
|
||||||
},
|
},
|
||||||
|
staff={
|
||||||
|
"作者:MrZ 邮箱:1046101471@qq.com",
|
||||||
|
"",
|
||||||
|
"使用LOVE2D引擎",
|
||||||
|
"",
|
||||||
|
"程序:MrZ, (FinnTenzor)",
|
||||||
|
"美术:MrZ, (Gnyar)",
|
||||||
|
"音乐:MrZ, (T0722)",
|
||||||
|
"音效:MrZ",
|
||||||
|
"语音:Miya, (MrZ)",
|
||||||
|
"",
|
||||||
|
"特别感谢:",
|
||||||
|
"Flyz, Farter, 蕴空之灵,",
|
||||||
|
"Teatube, [所有内测人员]",
|
||||||
|
},
|
||||||
used=[[
|
used=[[
|
||||||
使用工具:
|
使用工具:
|
||||||
Beepbox
|
Beepbox
|
||||||
@@ -249,6 +260,7 @@ local langList={
|
|||||||
atkFX="攻击特效等级",
|
atkFX="攻击特效等级",
|
||||||
frame="绘制帧率",
|
frame="绘制帧率",
|
||||||
text="消行文本",
|
text="消行文本",
|
||||||
|
warn="死亡预警",
|
||||||
fullscreen="全屏",
|
fullscreen="全屏",
|
||||||
bg="背景",
|
bg="背景",
|
||||||
power="电量显示",
|
power="电量显示",
|
||||||
@@ -321,10 +333,14 @@ local langList={
|
|||||||
back="返回",
|
back="返回",
|
||||||
},--langName added later
|
},--langName added later
|
||||||
help={
|
help={
|
||||||
his="历史",
|
staff="制作人员",
|
||||||
|
his="更新历史",
|
||||||
qq="作者QQ",
|
qq="作者QQ",
|
||||||
back="返回",
|
back="返回",
|
||||||
},
|
},
|
||||||
|
staff={
|
||||||
|
back="返回",
|
||||||
|
},
|
||||||
history={
|
history={
|
||||||
prev="↑",
|
prev="↑",
|
||||||
next="↓",
|
next="↓",
|
||||||
@@ -369,8 +385,8 @@ local langList={
|
|||||||
{"隐形", "半隐", "不强大脑"},
|
{"隐形", "半隐", "不强大脑"},
|
||||||
{"隐形", "全隐", "挺强大脑"},
|
{"隐形", "全隐", "挺强大脑"},
|
||||||
{"隐形", "瞬隐", "很强大脑"},
|
{"隐形", "瞬隐", "很强大脑"},
|
||||||
{"隐形", "瞬隐+", "超强大脑"},
|
{"隐形", "瞬隐+", "最强大脑"},
|
||||||
{"隐形", "啥都不剩隐","最强大脑"},
|
{"隐形", "", "你准备好了吗"},
|
||||||
{"高速经典", "CTWC", "高速经典"},
|
{"高速经典", "CTWC", "高速经典"},
|
||||||
{"生存", "简单", "你能存活多久?"},
|
{"生存", "简单", "你能存活多久?"},
|
||||||
{"生存", "普通", "你能存活多久?"},
|
{"生存", "普通", "你能存活多久?"},
|
||||||
@@ -408,7 +424,7 @@ local langList={
|
|||||||
{"无尽:挖掘", "", "挖呀挖呀挖"},
|
{"无尽:挖掘", "", "挖呀挖呀挖"},
|
||||||
{"自定义", "普通", "画点什么然后把它消除!"},
|
{"自定义", "普通", "画点什么然后把它消除!"},
|
||||||
{"自定义", "拼图", "画点什么然后把它拼出来吧!"},
|
{"自定义", "拼图", "画点什么然后把它拼出来吧!"},
|
||||||
{"竞速", "五联块", "不可能的任务"},
|
{"竞速", "五联块", "伤脑筋十八块"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -549,21 +565,31 @@ local langList={
|
|||||||
"全/半清:",
|
"全/半清:",
|
||||||
},
|
},
|
||||||
help={
|
help={
|
||||||
"好像也没啥好帮助的吧?就当是关于了",
|
"既然你能玩到这个游戏,应该也不需要什么帮助吧?",
|
||||||
"这只是一个普通的方块游戏,请勿称此游戏为某某某方块",
|
"这只是一个普通的方块游戏,请勿称此游戏为某某某方块",
|
||||||
"从TO/C2/KOS/TGM3/JS等方块获得过灵感",
|
"从TO/C2/KOS/TGM3/JS等方块获得过灵感",
|
||||||
"",
|
"",
|
||||||
"使用LOVE2D引擎",
|
|
||||||
"作者:MrZ 邮箱:1046101471@qq.com",
|
|
||||||
"程序:MrZ 美术:MrZ 音乐:MrZ 音效:MrZ 语音:MrZ/Miya",
|
|
||||||
"特别感谢:Flyz,Farter,196,Teatube,[所有内测人员]和 你!",
|
|
||||||
"",
|
|
||||||
"错误或者建议请附带截图发送到内测群或者作者邮箱~",
|
"错误或者建议请附带截图发送到内测群或者作者邮箱~",
|
||||||
"仅通过内测群822023725进行免费下载/更新",
|
"仅通过内测群822023725进行免费下载/更新",
|
||||||
"其他渠道获得游戏皆有被修改/植入病毒的风险,程序只申请了震动&联网权限!",
|
"其他渠道获得游戏皆有被修改/加广告/植入病毒的风险,程序只申请了震动&联网权限!",
|
||||||
"若由于被修改的本游戏产生的各种损失作者不负责(我怎么负责啊跟我有啥关系)",
|
"若由于被修改的本游戏产生的各种损失作者不负责(我怎么负责啊跟我有啥关系)",
|
||||||
"请从正规途径获得最新版,游戏现为免费,不过有打赏当然感谢啦~",
|
"请从正规途径获得最新版,游戏现为免费,不过有打赏当然感谢啦~",
|
||||||
},
|
},
|
||||||
|
staff={
|
||||||
|
"作者:MrZ 邮箱:1046101471@qq.com",
|
||||||
|
"",
|
||||||
|
"使用LOVE2D引擎",
|
||||||
|
"",
|
||||||
|
"程序:MrZ, (FinnTenzor)",
|
||||||
|
"美术:MrZ, (Gnyar)",
|
||||||
|
"音乐:MrZ, (T0722)",
|
||||||
|
"音效:MrZ",
|
||||||
|
"语音:Miya, (MrZ)",
|
||||||
|
"",
|
||||||
|
"特别感谢:",
|
||||||
|
"Flyz, Farter, 蕴空之灵,",
|
||||||
|
"Teatube, [所有内测人员]",
|
||||||
|
},
|
||||||
used=[[
|
used=[[
|
||||||
使用工具:
|
使用工具:
|
||||||
Beepbox
|
Beepbox
|
||||||
@@ -659,6 +685,7 @@ local langList={
|
|||||||
atkFX="攻击特效等级",
|
atkFX="攻击特效等级",
|
||||||
frame="绘制帧率",
|
frame="绘制帧率",
|
||||||
text="消行文本",
|
text="消行文本",
|
||||||
|
warn="死亡预警",
|
||||||
fullscreen="全屏",
|
fullscreen="全屏",
|
||||||
bg="背景",
|
bg="背景",
|
||||||
power="电量显示",
|
power="电量显示",
|
||||||
@@ -731,10 +758,14 @@ local langList={
|
|||||||
back="返回",
|
back="返回",
|
||||||
},--langName added later
|
},--langName added later
|
||||||
help={
|
help={
|
||||||
his="历史",
|
staff="制作人员",
|
||||||
|
his="更新历史",
|
||||||
qq="作者QQ",
|
qq="作者QQ",
|
||||||
back="返回",
|
back="返回",
|
||||||
},
|
},
|
||||||
|
staff={
|
||||||
|
back="返回",
|
||||||
|
},
|
||||||
history={
|
history={
|
||||||
prev="↑",
|
prev="↑",
|
||||||
next="↓",
|
next="↓",
|
||||||
@@ -780,7 +811,7 @@ local langList={
|
|||||||
{"隐形", "全隐", "挺强大脑"},
|
{"隐形", "全隐", "挺强大脑"},
|
||||||
{"隐形", "瞬隐", "很强大脑"},
|
{"隐形", "瞬隐", "很强大脑"},
|
||||||
{"隐形", "瞬隐+", "超强大脑"},
|
{"隐形", "瞬隐+", "超强大脑"},
|
||||||
{"隐形", "啥都不剩隐","最强大脑"},
|
{"隐形", "", "你准备好了吗"},
|
||||||
{"高速经典", "CTWC", "高速经典"},
|
{"高速经典", "CTWC", "高速经典"},
|
||||||
{"生存", "简单", "你能存活多久?"},
|
{"生存", "简单", "你能存活多久?"},
|
||||||
{"生存", "普通", "你能存活多久?"},
|
{"生存", "普通", "你能存活多久?"},
|
||||||
@@ -818,7 +849,7 @@ local langList={
|
|||||||
{"无尽:挖掘", "", "挖呀挖呀挖"},
|
{"无尽:挖掘", "", "挖呀挖呀挖"},
|
||||||
{"自定义", "普通", "画点什么然后把它消除!"},
|
{"自定义", "普通", "画点什么然后把它消除!"},
|
||||||
{"自定义", "拼图", "画点什么然后把它拼出来吧!"},
|
{"自定义", "拼图", "画点什么然后把它拼出来吧!"},
|
||||||
{"竞速", "五联块", "不可能的任务"},
|
{"竞速", "五联块", "伤脑筋十八块"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -956,21 +987,31 @@ local langList={
|
|||||||
"PC/HPC:",
|
"PC/HPC:",
|
||||||
},
|
},
|
||||||
help={
|
help={
|
||||||
"Doesn't this seem to be of \"any help\", right?",
|
"Now you can play this, you are probabaly do not need \"help\"?",
|
||||||
"This is just an ordinary block game, not a certain one.",
|
"This is just an ordinary block game, not a certain one.",
|
||||||
"It plays like TO/C2/KOS/TGM3 and others.",
|
"It plays like TO/C2/KOS/TGM3 and others.",
|
||||||
"",
|
"",
|
||||||
"Made with LOVE2D",
|
|
||||||
"Author: MrZ E-mail: 1046101471@qq.com",
|
|
||||||
"Program: MrZ Art: MrZ Music: MrZ SFX: MrZ Voice: MrZ/Miya",
|
|
||||||
"Special thanks to Flyz, Farter, 196, Teatube, [all testers] and you!",
|
|
||||||
"",
|
|
||||||
"bug reports/suggestions, sent to the author's testing group or email ~",
|
"bug reports/suggestions, sent to the author's testing group or email ~",
|
||||||
"This is a free download available only through discord.gg/f9pUvkh",
|
"This is a free download available only through discord.gg/f9pUvkh",
|
||||||
"The game downloaded from other sources may contain viruses,",
|
"The game downloaded from other sources may contain viruses,",
|
||||||
"and only vibration & networking permissions are needed for mobile versions!",
|
"and only vibration & networking permissions are needed for mobile versions!",
|
||||||
"The author is not responsible for any losses from modifying the game.",
|
"The author is not responsible for any losses from modifying the game.",
|
||||||
},
|
},
|
||||||
|
staff={
|
||||||
|
"Author: MrZ E-mail: 1046101471@qq.com",
|
||||||
|
"",
|
||||||
|
"Powered by LOVE2D",
|
||||||
|
"",
|
||||||
|
"Program: MrZ, (FinnTenzor)",
|
||||||
|
"Art: MrZ, (Gnyar)",
|
||||||
|
"Music: MrZ, (T0722)",
|
||||||
|
"Sound: MrZ",
|
||||||
|
"Voice: Miya, (MrZ)",
|
||||||
|
"",
|
||||||
|
"Secial Thanks:",
|
||||||
|
"Flyz, Farter, 蕴空之灵,",
|
||||||
|
"Teatube, [All test staff]",
|
||||||
|
},
|
||||||
used="Tool used:\n\tBeepbox\n\tGFIE\n\tGoldwave\nLib used:\n\tCold_Clear[MinusKelvin]\n\tsimple-love-lights[dylhunn]",
|
used="Tool used:\n\tBeepbox\n\tGFIE\n\tGoldwave\nLib used:\n\tCold_Clear[MinusKelvin]\n\tsimple-love-lights[dylhunn]",
|
||||||
support="Support author",
|
support="Support author",
|
||||||
group="Official QQ Group(if not hacked):822023725",
|
group="Official QQ Group(if not hacked):822023725",
|
||||||
@@ -1058,6 +1099,7 @@ local langList={
|
|||||||
atkFX="ATK. FX level",
|
atkFX="ATK. FX level",
|
||||||
frame="Render Frame Rate",
|
frame="Render Frame Rate",
|
||||||
text="Action Text",
|
text="Action Text",
|
||||||
|
warn="Death Alert",
|
||||||
fullscreen="Full Screen",
|
fullscreen="Full Screen",
|
||||||
bg="Background",
|
bg="Background",
|
||||||
power="Power Info.",
|
power="Power Info.",
|
||||||
@@ -1130,10 +1172,14 @@ local langList={
|
|||||||
back="Back",
|
back="Back",
|
||||||
},--langName added later
|
},--langName added later
|
||||||
help={
|
help={
|
||||||
|
staff="Staff",
|
||||||
his="History",
|
his="History",
|
||||||
qq="Author's qq",
|
qq="Author's qq",
|
||||||
back="Back",
|
back="Back",
|
||||||
},
|
},
|
||||||
|
staff={
|
||||||
|
back="Back",
|
||||||
|
},
|
||||||
history={
|
history={
|
||||||
prev="↑",
|
prev="↑",
|
||||||
next="↓",
|
next="↓",
|
||||||
@@ -1179,7 +1225,7 @@ local langList={
|
|||||||
{"Blind", "ALL", "For intermediate players."},
|
{"Blind", "ALL", "For intermediate players."},
|
||||||
{"Blind", "SUDDEN", "For experienced players."},
|
{"Blind", "SUDDEN", "For experienced players."},
|
||||||
{"Blind", "SUDDEN+", "For professionals."},
|
{"Blind", "SUDDEN+", "For professionals."},
|
||||||
{"Blind", "NOTHING", "For masters."},
|
{"Blind", "", "R U Ready?"},
|
||||||
{"Classic", "CTWC", "High-speed classic mode."},
|
{"Classic", "CTWC", "High-speed classic mode."},
|
||||||
{"Survivor", "EASY", "How long can you survive?"},
|
{"Survivor", "EASY", "How long can you survive?"},
|
||||||
{"Survivor", "NORMAL", "How long can you survive?"},
|
{"Survivor", "NORMAL", "How long can you survive?"},
|
||||||
@@ -1217,7 +1263,7 @@ local langList={
|
|||||||
{"Infinite: Dig", "", "Dig, dig, dig."},
|
{"Infinite: Dig", "", "Dig, dig, dig."},
|
||||||
{"Custom", "NORMAL", "Draw something then clear it!!"},
|
{"Custom", "NORMAL", "Draw something then clear it!!"},
|
||||||
{"Custom", "PUZZLE", "Draw something then stack it!!"},
|
{"Custom", "PUZZLE", "Draw something then stack it!!"},
|
||||||
{"Sprint", "Pentomino", "???"},
|
{"Sprint", "Pentomino", "Puzzle-18"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1355,21 +1401,31 @@ local langList={
|
|||||||
"#<>#/<>:",
|
"#<>#/<>:",
|
||||||
},
|
},
|
||||||
help={
|
help={
|
||||||
"?↓↓↓?? ?",
|
"□□□□~~~, ?_?x ?",
|
||||||
"□!!~~~,□□□□X",
|
"□!!~~~,□□□□X",
|
||||||
"□!!==*/*/*/*~",
|
"□!!==*/*/*/*~",
|
||||||
"",
|
"",
|
||||||
"Made with LOVE2D",
|
|
||||||
"Author: MrZ E-mail: 1046101471@qq.com",
|
|
||||||
"Program: MrZ Art: MrZ Music: MrZ SFX: MrZ Voice: MrZ/Miya",
|
|
||||||
"Special thanks to Flyz, Farter, 196, Teatube, [all testers] and you!",
|
|
||||||
"",
|
|
||||||
"bug reports/suggestions, sent to the author's testing group or email ~",
|
"bug reports/suggestions, sent to the author's testing group or email ~",
|
||||||
"This is a free download available only through discord.gg/f9pUvkh",
|
"This is a free download available only through discord.gg/f9pUvkh",
|
||||||
"The game downloaded from other sources may contain viruses,",
|
"The game downloaded from other sources may contain viruses,",
|
||||||
"and only vibration & networking permissions are needed for mobile versions!",
|
"and only vibration & networking permissions are needed for mobile versions!",
|
||||||
"The author is not responsible for any losses from modifying the game.",
|
"The author is not responsible for any losses from modifying the game.",
|
||||||
},
|
},
|
||||||
|
staff={
|
||||||
|
"Author: MrZ E-mail: 1046101471@qq.com",
|
||||||
|
"",
|
||||||
|
"Powered by LOVE2D",
|
||||||
|
"",
|
||||||
|
"Program: MrZ, (FinnTenzor)",
|
||||||
|
"Art: MrZ, (Gnyar)",
|
||||||
|
"Music: MrZ, (T0722)",
|
||||||
|
"Sound: MrZ",
|
||||||
|
"Voice: Miya, (MrZ)",
|
||||||
|
"",
|
||||||
|
"Secial Thanks:",
|
||||||
|
"Flyz, Farter, 蕴空之灵,",
|
||||||
|
"Teatube, [All test staff]",
|
||||||
|
},
|
||||||
used="Tool used:\n\tBeepbox\n\tGFIE\n\tGoldwave\nLib used:\n\tCold_Clear[MinusKelvin]\n\tsimple-love-lights[dylhunn]",
|
used="Tool used:\n\tBeepbox\n\tGFIE\n\tGoldwave\nLib used:\n\tCold_Clear[MinusKelvin]\n\tsimple-love-lights[dylhunn]",
|
||||||
support="Support author",
|
support="Support author",
|
||||||
group="Official QQ Group(if not hacked):822023725",
|
group="Official QQ Group(if not hacked):822023725",
|
||||||
@@ -1457,6 +1513,7 @@ local langList={
|
|||||||
atkFX="→→~",
|
atkFX="→→~",
|
||||||
frame="|=|",
|
frame="|=|",
|
||||||
text="ABC",
|
text="ABC",
|
||||||
|
warn="!↑↑↑!",
|
||||||
fullscreen="|←→|",
|
fullscreen="|←→|",
|
||||||
bg="__?__",
|
bg="__?__",
|
||||||
power="+.",
|
power="+.",
|
||||||
@@ -1529,10 +1586,14 @@ local langList={
|
|||||||
back="X",
|
back="X",
|
||||||
},--langName added later
|
},--langName added later
|
||||||
help={
|
help={
|
||||||
|
staff="Orz",
|
||||||
his="_&_",
|
his="_&_",
|
||||||
qq="_@_",
|
qq="_@_",
|
||||||
back="X",
|
back="X",
|
||||||
},
|
},
|
||||||
|
staff={
|
||||||
|
back="X",
|
||||||
|
},
|
||||||
history={
|
history={
|
||||||
prev="↑",
|
prev="↑",
|
||||||
next="↓",
|
next="↓",
|
||||||
@@ -1578,7 +1639,7 @@ local langList={
|
|||||||
{"Blind", "ALL", "For intermediate players."},
|
{"Blind", "ALL", "For intermediate players."},
|
||||||
{"Blind", "SUDDEN", "For experienced players."},
|
{"Blind", "SUDDEN", "For experienced players."},
|
||||||
{"Blind", "SUDDEN+", "For professionals."},
|
{"Blind", "SUDDEN+", "For professionals."},
|
||||||
{"Blind", "NOTHING", "For masters."},
|
{"Blind", "", "R U Ready?"},
|
||||||
{"Classic", "CTWC", "High-speed classic mode."},
|
{"Classic", "CTWC", "High-speed classic mode."},
|
||||||
{"Survivor", "EASY", "How long can you survive?"},
|
{"Survivor", "EASY", "How long can you survive?"},
|
||||||
{"Survivor", "NORMAL", "How long can you survive?"},
|
{"Survivor", "NORMAL", "How long can you survive?"},
|
||||||
@@ -1616,7 +1677,7 @@ local langList={
|
|||||||
{"Infinite: Dig", "", "Dig, dig, dig."},
|
{"Infinite: Dig", "", "Dig, dig, dig."},
|
||||||
{"Custom", "NORMAL", "Draw something then clear it!!"},
|
{"Custom", "NORMAL", "Draw something then clear it!!"},
|
||||||
{"Custom", "PUZZLE", "Draw something then stack it!!"},
|
{"Custom", "PUZZLE", "Draw something then stack it!!"},
|
||||||
{"Sprint", "Pentomino", "???"},
|
{"Sprint", "Pentomino", "Puzzle-18"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
--https://github.com/mattdesl/lwjgl-basics/wiki/2D-Pixel-Perfect-Shadows
|
--https://github.com/mattdesl/lwjgl-basics/wiki/2D-Pixel-Perfect-Shadows
|
||||||
local gc=love.graphics
|
local gc=love.graphics
|
||||||
local C=gc.clear
|
local C=gc.clear
|
||||||
local shadowMapShader=gc.newShader("shader/shadowMap.cs")--Shader for caculating the 1D shadow map.
|
local shadowMapShader=gc.newShader("shader/shadowMap.glsl")--Shader for caculating the 1D shadow map.
|
||||||
local lightRenderShader=gc.newShader("shader/lightRender.cs")--Shader for rendering blurred lights and shadows.
|
local lightRenderShader=gc.newShader("shader/lightRender.glsl")--Shader for rendering blurred lights and shadows.
|
||||||
local Lights={}--Lightsource objects
|
local Lights={}--Lightsource objects
|
||||||
local function move(L,x,y)
|
local function move(L,x,y)
|
||||||
L.x,L.y=x,y
|
L.x,L.y=x,y
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ customRange={
|
|||||||
target={10,20,40,100,200,500,1000,1e99},
|
target={10,20,40,100,200,500,1000,1e99},
|
||||||
freshLimit={0,8,15,1e99},
|
freshLimit={0,8,15,1e99},
|
||||||
opponent={0,1,2,3,4,5,11,12,13,14,15,16},
|
opponent={0,1,2,3,4,5,11,12,13,14,15,16},
|
||||||
bg={"none","game1","game2","game3","strap","rgb","glow","matrix"},
|
bg={"none","game1","game2","game3","strap","aura","rgb","glow","matrix"},
|
||||||
bgm={"blank","way","race","newera","push","reason","infinite","secret7th","secret8th","rockblock"},
|
bgm={"blank","way","race","newera","push","reason","infinite","secret7th","secret8th","rockblock"},
|
||||||
}
|
}
|
||||||
snapLevelValue={1,10,20,40,60,80}
|
snapLevelValue={1,10,20,40,60,80}
|
||||||
@@ -1,5 +1,12 @@
|
|||||||
local gc=love.graphics
|
local function N(file)
|
||||||
|
return love.graphics.newShader("shader/"..file..".glsl")
|
||||||
|
end
|
||||||
return{
|
return{
|
||||||
-- glow=gc.newShader("shader/glow.cs"),
|
-- glow=gc.newShader("shader/glow.cs"),
|
||||||
alpha=gc.newShader("shader/alpha.cs"),
|
alpha=N("alpha"),
|
||||||
|
warning=N("warning"),
|
||||||
|
|
||||||
|
rainbow=N("rainbow"),
|
||||||
|
strap=N("strap"),
|
||||||
|
aura=N("aura"),
|
||||||
}
|
}
|
||||||
@@ -83,7 +83,7 @@ function TEXT.getText(text,x,y,font,style,spd,stop)
|
|||||||
font=font or 40,
|
font=font or 40,
|
||||||
spd=(spd or 1)/60,
|
spd=(spd or 1)/60,
|
||||||
stop=stop,
|
stop=stop,
|
||||||
draw=textFX[style]or error("unavailable type:"..style),
|
draw=textFX[style]or assert(false,"unavailable type:"..style),
|
||||||
}
|
}
|
||||||
end--another version of TEXT()
|
end--another version of TEXT()
|
||||||
function TEXT.show(text,x,y,font,style,spd,stop)
|
function TEXT.show(text,x,y,font,style,spd,stop)
|
||||||
@@ -95,7 +95,7 @@ function TEXT.show(text,x,y,font,style,spd,stop)
|
|||||||
font=font or 40, --font
|
font=font or 40, --font
|
||||||
spd=(spd or 1)/60, --timing speed(1=last 1 sec)
|
spd=(spd or 1)/60, --timing speed(1=last 1 sec)
|
||||||
stop=stop, --stop time(sustained text)
|
stop=stop, --stop time(sustained text)
|
||||||
draw=textFX[style]or error("unavailable type:"..style), --draw method
|
draw=textFX[style]or assert(false,"unavailable type:"..style), --draw method
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
function TEXT.update(list)
|
function TEXT.update(list)
|
||||||
|
|||||||
402
player.lua
402
player.lua
@@ -57,7 +57,6 @@ local spinSCR={--[blockName][row]
|
|||||||
--B2BMUL:1.2/2.0
|
--B2BMUL:1.2/2.0
|
||||||
--Techrash:1K;MUL:1.3/1.8
|
--Techrash:1K;MUL:1.3/1.8
|
||||||
--Mini*=.6
|
--Mini*=.6
|
||||||
local visible_opt={show=1e99,time=300,fast=20,none=0}
|
|
||||||
local reAtk={0,0,1,1,1,2,2,3,3}
|
local reAtk={0,0,1,1,1,2,2,3,3}
|
||||||
local reDef={0,1,1,2,3,3,4,4,5}
|
local reDef={0,1,1,2,3,3,4,4,5}
|
||||||
local scs=require("parts/spinCenters")
|
local scs=require("parts/spinCenters")
|
||||||
@@ -153,6 +152,11 @@ local clear_n={"clear_1","clear_2","clear_3","clear_4","clear_4"}
|
|||||||
local ren_n={}for i=1,11 do ren_n[i]="ren_"..i end
|
local ren_n={}for i=1,11 do ren_n[i]="ren_"..i end
|
||||||
--------------------------</GameData>--------------------------
|
--------------------------</GameData>--------------------------
|
||||||
|
|
||||||
|
--------------------------<LIB>--------------------------
|
||||||
|
local player={}
|
||||||
|
local PLY={}
|
||||||
|
--------------------------</LIB>--------------------------
|
||||||
|
|
||||||
--------------------------<Update>--------------------------
|
--------------------------<Update>--------------------------
|
||||||
local function updateFXs(P,dt)
|
local function updateFXs(P,dt)
|
||||||
if P.stat.score>P.score1 then
|
if P.stat.score>P.score1 then
|
||||||
@@ -162,7 +166,7 @@ local function updateFXs(P,dt)
|
|||||||
P.score1=int(min(P.score1*.9+P.stat.score*.1+1))
|
P.score1=int(min(P.score1*.9+P.stat.score*.1+1))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
for i=#P.lockFX,1,-1 do
|
for i=#P.lockFX,1,-1 do
|
||||||
local S=P.lockFX[i]
|
local S=P.lockFX[i]
|
||||||
S[3]=S[3]+S[4]*dt
|
S[3]=S[3]+S[4]*dt
|
||||||
@@ -844,9 +848,8 @@ local function Pdraw_demo(P)
|
|||||||
gc.pop()
|
gc.pop()
|
||||||
end
|
end
|
||||||
--------------------------</Paint>--------------------------
|
--------------------------</Paint>--------------------------
|
||||||
player={}local player=player
|
|
||||||
--------------------------<FX>--------------------------
|
--------------------------<FX>--------------------------
|
||||||
local textFX=textFX
|
|
||||||
function player.showText(P,text,dx,dy,font,style,spd,stop)
|
function player.showText(P,text,dx,dy,font,style,spd,stop)
|
||||||
if P.gameEnv.text then
|
if P.gameEnv.text then
|
||||||
P.bonus[#P.bonus+1]=TEXT.getText(text,150+dx,300+dy,font*P.size,style,spd,stop)
|
P.bonus[#P.bonus+1]=TEXT.getText(text,150+dx,300+dy,font*P.size,style,spd,stop)
|
||||||
@@ -1543,7 +1546,7 @@ function player.drop(P)--Place piece
|
|||||||
sendTime=60
|
sendTime=60
|
||||||
atk=cc
|
atk=cc
|
||||||
end
|
end
|
||||||
P.b2b=P.b2b+cc*80-300
|
P.b2b=P.b2b+cc*80-220
|
||||||
P.lastClear=P.cur.name*10+cc
|
P.lastClear=P.cur.name*10+cc
|
||||||
else
|
else
|
||||||
if not clear then
|
if not clear then
|
||||||
@@ -1823,11 +1826,6 @@ function player.die(P)--Same thing when win/lose,not really die!
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function player.reach_winCheck(P)
|
|
||||||
if P.stat.row>=P.gameEnv.target then
|
|
||||||
P:win("finish")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
function player.win(P,result)
|
function player.win(P,result)
|
||||||
P:die()
|
P:die()
|
||||||
P.result="WIN"
|
P.result="WIN"
|
||||||
@@ -1843,7 +1841,6 @@ function player.win(P,result)
|
|||||||
BGM.play("8-bit happiness")
|
BGM.play("8-bit happiness")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
TASK.new(tickEvent.finish,P)
|
|
||||||
if curMode.id=="custom_puzzle"then
|
if curMode.id=="custom_puzzle"then
|
||||||
P:showTextF(text.win,0,0,90,"beat",.4)
|
P:showTextF(text.win,0,0,90,"beat",.4)
|
||||||
else
|
else
|
||||||
@@ -1852,6 +1849,7 @@ function player.win(P,result)
|
|||||||
if P.human then
|
if P.human then
|
||||||
gameOver()
|
gameOver()
|
||||||
end
|
end
|
||||||
|
TASK.new(tickEvent.finish,P)
|
||||||
end
|
end
|
||||||
function player.lose(P)
|
function player.lose(P)
|
||||||
if P.life>0 then
|
if P.life>0 then
|
||||||
@@ -1920,14 +1918,18 @@ function player.lose(P)
|
|||||||
SFX.play("fail")
|
SFX.play("fail")
|
||||||
VOC.play("lose")
|
VOC.play("lose")
|
||||||
if modeEnv.royaleMode then BGM.play("end")end
|
if modeEnv.royaleMode then BGM.play("end")end
|
||||||
|
gameOver()
|
||||||
|
TASK.new(#players>1 and tickEvent.lose or tickEvent.finish,P)
|
||||||
end
|
end
|
||||||
if #players.alive==1 then
|
if #players.alive==1 then
|
||||||
players.alive[1]:win()
|
players.alive[1]:win()
|
||||||
end
|
end
|
||||||
if #players==1 or(P.human and not players[2].human)then
|
end
|
||||||
gameOver()
|
|
||||||
|
function PLY.reach_winCheck(P)
|
||||||
|
if P.stat.row>=P.gameEnv.target then
|
||||||
|
P:win("finish")
|
||||||
end
|
end
|
||||||
TASK.new(#players>1 and tickEvent.lose or tickEvent.finish,P)
|
|
||||||
end
|
end
|
||||||
--------------------------<\Events>--------------------------
|
--------------------------<\Events>--------------------------
|
||||||
|
|
||||||
@@ -2178,135 +2180,36 @@ T={
|
|||||||
--------------------------</Control>--------------------------
|
--------------------------</Control>--------------------------
|
||||||
|
|
||||||
--------------------------<Generator>--------------------------
|
--------------------------<Generator>--------------------------
|
||||||
--- 从当前的modeEnv setting和默认配置中读取GameEnv
|
local function newEmptyPlayer(id,x,y,size)
|
||||||
-- @param P 玩家
|
|
||||||
function player.loadGameEnv(P)
|
|
||||||
P.gameEnv={}--Current game setting environment
|
|
||||||
local ENV=P.gameEnv
|
|
||||||
for k,v in next,gameEnv0 do
|
|
||||||
if modeEnv[k]~=nil then
|
|
||||||
v=modeEnv[k]
|
|
||||||
elseif setting[k]~=nil then
|
|
||||||
v=setting[k]
|
|
||||||
end
|
|
||||||
ENV[k]=v
|
|
||||||
end--load game settings
|
|
||||||
end
|
|
||||||
|
|
||||||
--- 整理GameEnv中部分未完成的参数
|
|
||||||
-- @param P 玩家
|
|
||||||
function player.marshalGameEnv(P)
|
|
||||||
local ENV=P.gameEnv
|
|
||||||
ENV.das=max(ENV.das,ENV.mindas)
|
|
||||||
ENV.arr=max(ENV.arr,ENV.minarr)
|
|
||||||
ENV.sdarr=max(ENV.sdarr,ENV.minsdarr)
|
|
||||||
|
|
||||||
ENV.next=min(ENV.next,setting.maxNext)
|
|
||||||
|
|
||||||
if ENV.sequence~="bag"then
|
|
||||||
ENV.bagLine=false
|
|
||||||
else
|
|
||||||
ENV.bagLen=#ENV.bag
|
|
||||||
end
|
|
||||||
|
|
||||||
if ENV.lockFX==0 then ENV.lockFX=nil end
|
|
||||||
if ENV.dropFX==0 then ENV.dropFX=nil end
|
|
||||||
if ENV.clearFX==0 then ENV.clearFX=nil end
|
|
||||||
if ENV.shakeFX==0 then ENV.shakeFX=nil end
|
|
||||||
end
|
|
||||||
|
|
||||||
--- 把部分GameEnv参数写入到Player中
|
|
||||||
-- 该函数会写入Player的 dropDelay lockDelay color showTime keepVisible
|
|
||||||
-- @param P 玩家
|
|
||||||
function player.applyGameEnv(P)
|
|
||||||
local ENV=P.gameEnv
|
|
||||||
P.dropDelay,P.lockDelay=ENV.drop,ENV.lock
|
|
||||||
|
|
||||||
P.color={}
|
|
||||||
for _=1,7 do
|
|
||||||
P.color[_]=SKIN.libColor[ENV.skin[_]]
|
|
||||||
end
|
|
||||||
|
|
||||||
P.showTime=visible_opt[ENV.visible]
|
|
||||||
P.keepVisible=ENV.visible=="show"
|
|
||||||
end
|
|
||||||
|
|
||||||
--- 调用freshPrepare并设置newNext
|
|
||||||
-- @param P 玩家
|
|
||||||
function player.prepareSequence(P)
|
|
||||||
local ENV=P.gameEnv
|
|
||||||
if type(ENV.sequence)=="string"then
|
|
||||||
freshPrepare[ENV.sequence](P)
|
|
||||||
P.newNext=freshMethod[ENV.sequence]
|
|
||||||
else
|
|
||||||
assert(type(ENV.sequence)=="function"and type(ENV.freshMethod)=="function","wrong sequence generator code")
|
|
||||||
ENV.sequence(P)
|
|
||||||
P.newNext=ENV.freshMethod
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
--- 加载AI参数
|
|
||||||
-- @param P 玩家
|
|
||||||
-- @param AIdata AI参数
|
|
||||||
function player.loadAI(P, AIdata)
|
|
||||||
local ENV=P.gameEnv
|
|
||||||
P.AI_mode=AIdata.type
|
|
||||||
P.AI_stage=1
|
|
||||||
P.AI_needFresh=false
|
|
||||||
P.AI_keys={}
|
|
||||||
P.AI_delay=AIdata.delay or min(int(ENV.drop*.8),2*AIdata.delta)
|
|
||||||
P.AI_delay0=AIdata.delta
|
|
||||||
P.AIdata={
|
|
||||||
next=AIdata.next,
|
|
||||||
hold=AIdata.hold,
|
|
||||||
_20G=ENV._20G,
|
|
||||||
bag=AIdata.bag=="bag",
|
|
||||||
node=AIdata.node,
|
|
||||||
}
|
|
||||||
if not BOT then P.AI_mode="9S"end
|
|
||||||
if P.AI_mode=="CC"then
|
|
||||||
P.RS=kickList.AIRS
|
|
||||||
local opt,wei=BOT.getConf()
|
|
||||||
BOT.setHold(opt,P.AIdata.hold)
|
|
||||||
BOT.set20G(opt,P.AIdata._20G)
|
|
||||||
BOT.setBag(opt,P.AIdata.bag)
|
|
||||||
BOT.setNode(opt,P.AIdata.node)
|
|
||||||
P.AI_bot=BOT.new(opt,wei)
|
|
||||||
BOT.free(opt)BOT.free(wei)
|
|
||||||
for i=1,AIdata.next do
|
|
||||||
BOT.addNext(P.AI_bot,CCblockID[P.next[i].id])
|
|
||||||
end
|
|
||||||
elseif P.AI_mode=="9S"then
|
|
||||||
P.RS=kickList.TRS
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
--- 空Player
|
|
||||||
-- 创建出来的Player不能直接用 仅包含所有Player的通用参数
|
|
||||||
-- @params int id
|
|
||||||
-- @params int x
|
|
||||||
-- @params int y
|
|
||||||
-- @params float size 缩放比例
|
|
||||||
-- @params actions 操作序列
|
|
||||||
local function newEmptyPlayer(id, x, y, size)
|
|
||||||
local P={id=id}
|
local P={id=id}
|
||||||
players[id]=P
|
players[id]=P
|
||||||
P.life=0
|
|
||||||
--inherit functions of player class
|
|
||||||
for k,v in next,player do P[k]=v end
|
|
||||||
players.alive[#players.alive+1]=P
|
players.alive[#players.alive+1]=P
|
||||||
P.x,P.y,P.size=x,y,size or 1
|
|
||||||
--for shake FX
|
|
||||||
P.fieldOff={x=0,y=0,vx=0,vy=0}
|
|
||||||
|
|
||||||
P.small=false --
|
P.fieldOff={x=0,y=0,vx=0,vy=0}--for shake FX
|
||||||
P.keyRec=false--if calculate keySpeed
|
P.x,P.y,P.size=x,y,size or 1
|
||||||
P.centerX,P.centerY=P.x+300*P.size,P.y+370*P.size
|
|
||||||
P.absFieldX=P.x+150*P.size
|
P.small=P.size<.1--if draw in small mode
|
||||||
P.absFieldY=P.y+60*P.size
|
if P.small then
|
||||||
P.draw=Pdraw_norm
|
P.centerX,P.centerY=P.x+300*P.size,P.y+600*P.size
|
||||||
|
P.canvas=love.graphics.newCanvas(60,120)
|
||||||
|
P.frameWait=rnd(30,120)
|
||||||
|
P.draw=Pdraw_small
|
||||||
|
else
|
||||||
|
P.keyRec=true--if calculate keySpeed
|
||||||
|
P.centerX,P.centerY=P.x+300*P.size,P.y+370*P.size
|
||||||
|
P.absFieldX=P.x+150*P.size
|
||||||
|
P.absFieldY=P.y+60*P.size
|
||||||
|
P.draw=Pdraw_norm
|
||||||
|
P.bonus={}--text objects
|
||||||
|
end
|
||||||
P.update=Pupdate_alive
|
P.update=Pupdate_alive
|
||||||
|
|
||||||
|
--inherit functions of player class
|
||||||
|
for k,v in next,player do P[k]=v end
|
||||||
|
|
||||||
|
P.small=false
|
||||||
|
P.keyRec=false--if calculate keySpeed
|
||||||
|
P.life=0
|
||||||
P.alive=true
|
P.alive=true
|
||||||
P.control=false
|
P.control=false
|
||||||
P.timing=false
|
P.timing=false
|
||||||
@@ -2321,14 +2224,11 @@ local function newEmptyPlayer(id, x, y, size)
|
|||||||
P.field,P.visTime={},{}
|
P.field,P.visTime={},{}
|
||||||
P.atkBuffer={sum=0}
|
P.atkBuffer={sum=0}
|
||||||
|
|
||||||
|
--Royale-related
|
||||||
P.badge,P.strength=0,0
|
P.badge,P.strength=0,0
|
||||||
P.atkMode,P.swappingAtkMode=1,20
|
P.atkMode,P.swappingAtkMode=1,20
|
||||||
P.atker,P.atking,P.lastRecv={}
|
P.atker,P.atking,P.lastRecv={}
|
||||||
--Royale-related
|
|
||||||
|
|
||||||
-- loadGameEnv
|
|
||||||
-- marshalGameEnv
|
|
||||||
-- applyGameEnv 以下这些参数在applyGameEnv调用时被初始化
|
|
||||||
P.dropDelay,P.lockDelay=0,0
|
P.dropDelay,P.lockDelay=0,0
|
||||||
P.color={}
|
P.color={}
|
||||||
P.showTime=nil
|
P.showTime=nil
|
||||||
@@ -2370,13 +2270,98 @@ local function newEmptyPlayer(id, x, y, size)
|
|||||||
|
|
||||||
return P
|
return P
|
||||||
end
|
end
|
||||||
--- 游戏开场画面的Demo玩家
|
local function loadGameEnv(P)--load gameEnv
|
||||||
-- @params int id
|
P.gameEnv={}--Current game setting environment
|
||||||
-- @params int x
|
local ENV=P.gameEnv
|
||||||
-- @params int y
|
for k,v in next,gameEnv0 do
|
||||||
-- @params float size 缩放比例
|
if modeEnv[k]~=nil then
|
||||||
function newDemoPlayer(id,x,y,size)
|
v=modeEnv[k]
|
||||||
local P = newEmptyPlayer(id, x, y, size)
|
elseif setting[k]~=nil then
|
||||||
|
v=setting[k]
|
||||||
|
end
|
||||||
|
ENV[k]=v
|
||||||
|
end--load game settings
|
||||||
|
end
|
||||||
|
local function applyGameEnv(P)--finish gameEnv processing
|
||||||
|
local ENV=P.gameEnv
|
||||||
|
|
||||||
|
P.dropDelay=ENV.drop
|
||||||
|
P.lockDelay=ENV.lock
|
||||||
|
|
||||||
|
P.color={}
|
||||||
|
for _=1,7 do
|
||||||
|
P.color[_]=SKIN.libColor[ENV.skin[_]]
|
||||||
|
end
|
||||||
|
|
||||||
|
P.keepVisible=ENV.visible=="show"
|
||||||
|
P.showTime=
|
||||||
|
ENV.visible=="show"and 1e99 or
|
||||||
|
ENV.visible=="time"and 300 or
|
||||||
|
ENV.visible=="fast"and 20 or
|
||||||
|
ENV.visible=="none"and 0
|
||||||
|
|
||||||
|
ENV.das=max(ENV.das,ENV.mindas)
|
||||||
|
ENV.arr=max(ENV.arr,ENV.minarr)
|
||||||
|
ENV.sdarr=max(ENV.sdarr,ENV.minsdarr)
|
||||||
|
ENV.next=min(ENV.next,setting.maxNext)
|
||||||
|
|
||||||
|
if ENV.sequence~="bag"then
|
||||||
|
ENV.bagLine=false
|
||||||
|
else
|
||||||
|
ENV.bagLen=#ENV.bag
|
||||||
|
end
|
||||||
|
|
||||||
|
if ENV.lockFX==0 then ENV.lockFX=nil end
|
||||||
|
if ENV.dropFX==0 then ENV.dropFX=nil end
|
||||||
|
if ENV.clearFX==0 then ENV.clearFX=nil end
|
||||||
|
if ENV.shakeFX==0 then ENV.shakeFX=nil end
|
||||||
|
end
|
||||||
|
local function prepareSequence(P)--call freshPrepare and set newNext
|
||||||
|
local ENV=P.gameEnv
|
||||||
|
if type(ENV.sequence)=="string"then
|
||||||
|
freshPrepare[ENV.sequence](P)
|
||||||
|
P.newNext=freshMethod[ENV.sequence]
|
||||||
|
else
|
||||||
|
assert(type(ENV.sequence)=="function"and type(ENV.freshMethod)=="function","wrong sequence generator code")
|
||||||
|
ENV.sequence(P)
|
||||||
|
P.newNext=ENV.freshMethod
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local function loadAI(P,AIdata)--load AI params
|
||||||
|
local ENV=P.gameEnv
|
||||||
|
P.AI_mode=AIdata.type
|
||||||
|
P.AI_stage=1
|
||||||
|
P.AI_needFresh=false
|
||||||
|
P.AI_keys={}
|
||||||
|
P.AI_delay=AIdata.delay or min(int(ENV.drop*.8),2*AIdata.delta)
|
||||||
|
P.AI_delay0=AIdata.delta
|
||||||
|
P.AIdata={
|
||||||
|
next=AIdata.next,
|
||||||
|
hold=AIdata.hold,
|
||||||
|
_20G=ENV._20G,
|
||||||
|
bag=AIdata.bag=="bag",
|
||||||
|
node=AIdata.node,
|
||||||
|
}
|
||||||
|
if not BOT then P.AI_mode="9S"end
|
||||||
|
if P.AI_mode=="CC"then
|
||||||
|
P.RS=kickList.AIRS
|
||||||
|
local opt,wei=BOT.getConf()
|
||||||
|
BOT.setHold(opt,P.AIdata.hold)
|
||||||
|
BOT.set20G(opt,P.AIdata._20G)
|
||||||
|
BOT.setBag(opt,P.AIdata.bag)
|
||||||
|
BOT.setNode(opt,P.AIdata.node)
|
||||||
|
P.AI_bot=BOT.new(opt,wei)
|
||||||
|
BOT.free(opt)BOT.free(wei)
|
||||||
|
for i=1,AIdata.next do
|
||||||
|
BOT.addNext(P.AI_bot,CCblockID[P.next[i].id])
|
||||||
|
end
|
||||||
|
elseif P.AI_mode=="9S"then
|
||||||
|
P.RS=kickList.TRS
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function PLY.newDemoPlayer(id,x,y,size)
|
||||||
|
local P=newEmptyPlayer(id,x,y,size)
|
||||||
P.life=1e99
|
P.life=1e99
|
||||||
|
|
||||||
-- rewrite draw arguments
|
-- rewrite draw arguments
|
||||||
@@ -2388,11 +2373,7 @@ function newDemoPlayer(id,x,y,size)
|
|||||||
P.draw=Pdraw_demo
|
P.draw=Pdraw_demo
|
||||||
P.update=Pupdate_alive
|
P.update=Pupdate_alive
|
||||||
|
|
||||||
P.control = true
|
P.control=true
|
||||||
-- clear key time and drop time
|
|
||||||
-- maybe not necessary
|
|
||||||
P.keyTime={}
|
|
||||||
P.dropTime={}
|
|
||||||
|
|
||||||
P.atker={}P.strength=0
|
P.atker={}P.strength=0
|
||||||
|
|
||||||
@@ -2429,23 +2410,18 @@ function newDemoPlayer(id,x,y,size)
|
|||||||
target=1e99,dropPiece=NULL,
|
target=1e99,dropPiece=NULL,
|
||||||
mindas=0,minarr=0,minsdarr=0,
|
mindas=0,minarr=0,minsdarr=0,
|
||||||
}
|
}
|
||||||
|
applyGameEnv(P)
|
||||||
|
|
||||||
-- no loadGameEnv
|
|
||||||
P:marshalGameEnv()
|
|
||||||
P:applyGameEnv()
|
|
||||||
|
|
||||||
-- rewrite some arguments
|
|
||||||
P.dropDelay,P.lockDelay=1e99,1e99
|
P.dropDelay,P.lockDelay=1e99,1e99
|
||||||
-- P.color is set at applyGameEnv
|
|
||||||
P.showTime=1e99
|
P.showTime=1e99
|
||||||
P.keepVisible=true
|
P.keepVisible=true
|
||||||
|
|
||||||
-- use "bag" manually instead of prepareSequence
|
--always use "bag"
|
||||||
freshPrepare.bag(P)
|
freshPrepare.bag(P)
|
||||||
P.newNext=freshMethod.bag
|
P.newNext=freshMethod.bag
|
||||||
|
|
||||||
P.human=false
|
P.human=false
|
||||||
P:loadAI({
|
loadAI(P,{
|
||||||
type="CC",
|
type="CC",
|
||||||
next=5,
|
next=5,
|
||||||
hold=true,
|
hold=true,
|
||||||
@@ -2457,100 +2433,48 @@ function newDemoPlayer(id,x,y,size)
|
|||||||
|
|
||||||
P:popNext()
|
P:popNext()
|
||||||
end
|
end
|
||||||
--- 远程玩家 即多人联机游戏时的其他玩家
|
function PLY.newRemotePlayer(id,x,y,size,actions)
|
||||||
-- @params int id
|
local P=newEmptyPlayer(id,x,y,size)
|
||||||
-- @params int x
|
|
||||||
-- @params int y
|
|
||||||
-- @params float size 缩放比例
|
|
||||||
-- @params actions 操作序列
|
|
||||||
function newRemotePlayer(id, x, y, size, actions)
|
|
||||||
local P = newEmptyPlayer(id, x, y, size)
|
|
||||||
|
|
||||||
P.human = false -- 录像不是人为操作
|
P.human=false -- 录像不是人为操作
|
||||||
P.remote = true -- 远程操作
|
P.remote=true -- 远程操作
|
||||||
-- 开发中
|
-- 开发中
|
||||||
-- P.updateAction = buildActionFunctionFromActions(P, actions)
|
-- P.updateAction=buildActionFunctionFromActions(P, actions)
|
||||||
|
|
||||||
P:loadGameEnv()
|
loadGameEnv(P)
|
||||||
P:marshalGameEnv()
|
applyGameEnv(P)
|
||||||
P:applyGameEnv()
|
prepareSequence(P)
|
||||||
P:prepareSequence()
|
|
||||||
end
|
end
|
||||||
--- AI玩家 (bot)
|
function PLY.newAIPlayer(id,x,y,size,AIdata)
|
||||||
-- @params int id
|
local P=newEmptyPlayer(id,x,y,size)
|
||||||
-- @params int x
|
|
||||||
-- @params int y
|
|
||||||
-- @params float size 缩放比例
|
|
||||||
-- @params AIdata size AI参数
|
|
||||||
function newAIPlayer(id,x,y,size,AIdata)
|
|
||||||
local P = newEmptyPlayer(id, x, y, size)
|
|
||||||
|
|
||||||
-- rewrite draw arguments
|
|
||||||
P.small=P.size<.1--if draw in small mode
|
|
||||||
if P.small then
|
|
||||||
P.centerX,P.centerY=P.x+300*P.size,P.y+600*P.size
|
|
||||||
P.canvas=love.graphics.newCanvas(60,120)
|
|
||||||
P.frameWait=rnd(30,120)
|
|
||||||
P.draw=Pdraw_small
|
|
||||||
else
|
|
||||||
P.keyRec=true--if calculate keySpeed
|
|
||||||
P.centerX,P.centerY=P.x+300*P.size,P.y+370*P.size
|
|
||||||
P.absFieldX=P.x+150*P.size
|
|
||||||
P.absFieldY=P.y+60*P.size
|
|
||||||
P.draw=Pdraw_norm
|
|
||||||
P.dust=clearDust:clone()
|
|
||||||
P.dust:start()
|
|
||||||
P.bonus={}--texts
|
|
||||||
end
|
|
||||||
P.update=Pupdate_alive
|
|
||||||
|
|
||||||
P:loadGameEnv()
|
|
||||||
P:marshalGameEnv()
|
|
||||||
P:applyGameEnv()
|
|
||||||
P:prepareSequence()
|
|
||||||
|
|
||||||
local ENV = P.gameEnv
|
|
||||||
ENV.face={0,0,0,0,0,0,0}
|
|
||||||
ENV.skin={1,5,8,2,10,3,7}
|
|
||||||
P.human=false
|
|
||||||
P:loadAI(AIdata)
|
|
||||||
|
|
||||||
if P.small then
|
if P.small then
|
||||||
ENV.text=false
|
ENV.text=false
|
||||||
ENV.lockFX=nil
|
ENV.lockFX=nil
|
||||||
ENV.dropFX=nil
|
ENV.dropFX=nil
|
||||||
ENV.shakeFX=nil
|
ENV.shakeFX=nil
|
||||||
else
|
|
||||||
if ENV.lockFX==0 then ENV.lockFX=nil end
|
|
||||||
if ENV.dropFX==0 then ENV.dropFX=nil end
|
|
||||||
if ENV.clearFX==0 then ENV.clearFX=nil end
|
|
||||||
if ENV.shakeFX==0 then ENV.shakeFX=nil end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
loadGameEnv(P)
|
||||||
|
applyGameEnv(P)
|
||||||
|
prepareSequence(P)
|
||||||
|
|
||||||
|
local ENV=P.gameEnv
|
||||||
|
ENV.face={0,0,0,0,0,0,0}
|
||||||
|
ENV.skin={1,5,8,2,10,3,7}
|
||||||
|
P.human=false
|
||||||
|
loadAI(P,AIdata)
|
||||||
end
|
end
|
||||||
--- 普通玩家
|
function PLY.newPlayer(id,x,y,size)
|
||||||
-- @params int id
|
local P=newEmptyPlayer(id,x,y,size)
|
||||||
-- @params int x
|
|
||||||
-- @params int y
|
|
||||||
-- @params float size 缩放比例
|
|
||||||
function newPlayer(id,x,y,size)
|
|
||||||
local P = newEmptyPlayer(id, x, y, size)
|
|
||||||
|
|
||||||
P:loadGameEnv()
|
loadGameEnv(P)
|
||||||
P:marshalGameEnv()
|
applyGameEnv(P)
|
||||||
P:applyGameEnv()
|
prepareSequence(P)
|
||||||
P:prepareSequence()
|
|
||||||
|
|
||||||
P.small=false --
|
|
||||||
P.keyRec=true--if calculate keySpeed
|
|
||||||
P.centerX,P.centerY=P.x+300*P.size,P.y+370*P.size
|
|
||||||
P.absFieldX=P.x+150*P.size
|
|
||||||
P.absFieldY=P.y+60*P.size
|
|
||||||
P.draw=Pdraw_norm
|
|
||||||
P.update=Pupdate_alive
|
|
||||||
|
|
||||||
P.human=true
|
P.human=true
|
||||||
P.RS=kickList.TRS
|
P.RS=kickList.TRS
|
||||||
players.human=players.human+1
|
players.human=players.human+1
|
||||||
end
|
end
|
||||||
--------------------------</Generator>--------------------------
|
--------------------------</Generator>--------------------------
|
||||||
|
return PLY
|
||||||
457
scene.lua
457
scene.lua
@@ -15,235 +15,244 @@ local SCN={
|
|||||||
},
|
},
|
||||||
seq={"quit","slowFade"},--Back sequence
|
seq={"quit","slowFade"},--Back sequence
|
||||||
}--scene datas,returned
|
}--scene datas,returned
|
||||||
local sceneInit={
|
|
||||||
quit=love.event.quit,
|
local sceneInit={}
|
||||||
load=function()
|
sceneInit.quit=love.event.quit
|
||||||
sceneTemp={
|
function sceneInit.load()
|
||||||
phase=1,--Loading stage
|
sceneTemp={
|
||||||
cur=1,--Counter
|
phase=1,--Loading stage
|
||||||
tar=#VOC.name,--Loading bar lenth(current)
|
cur=1,--Counter
|
||||||
tip=require("parts/getTip"),
|
tar=#VOC.name,--Loading bar lenth(current)
|
||||||
list={
|
tip=require("parts/getTip"),
|
||||||
#VOC.name,
|
list={
|
||||||
#BGM.list,
|
#VOC.name,
|
||||||
#SFX.list,
|
#BGM.list,
|
||||||
IMG.getCount(),
|
#SFX.list,
|
||||||
#modes,
|
IMG.getCount(),
|
||||||
1,
|
#modes,
|
||||||
},
|
1,
|
||||||
skip=false,--if skipping
|
},
|
||||||
}
|
skip=false,--if skipping
|
||||||
end,
|
}
|
||||||
intro=function()
|
end
|
||||||
BG.set("space")
|
function sceneInit.intro()
|
||||||
sceneTemp=0--animation timer
|
BG.set("space")
|
||||||
BGM.play("blank")
|
sceneTemp=0--animation timer
|
||||||
end,
|
BGM.play("blank")
|
||||||
main=function()
|
end
|
||||||
BG.set("space")
|
function sceneInit.main()
|
||||||
BGM.play("blank")
|
BG.set("space")
|
||||||
destroyPlayers()
|
BGM.play("blank")
|
||||||
modeEnv={}
|
destroyPlayers()
|
||||||
if not players[1]then
|
modeEnv={}
|
||||||
newDemoPlayer(1,900,35,1.1)
|
if not players[1]then
|
||||||
end--create demo player
|
PLY.newDemoPlayer(1,900,35,1.1)
|
||||||
end,
|
end--create demo player
|
||||||
music=function()
|
end
|
||||||
if BGM.nowPlay then
|
function sceneInit.music()
|
||||||
for i=1,BGM.len do
|
if BGM.nowPlay then
|
||||||
if BGM.list[i]==BGM.nowPlay then
|
for i=1,BGM.len do
|
||||||
sceneTemp=i--music select
|
if BGM.list[i]==BGM.nowPlay then
|
||||||
return
|
sceneTemp=i--music select
|
||||||
end
|
return
|
||||||
end
|
end
|
||||||
else
|
|
||||||
sceneTemp=1
|
|
||||||
end
|
end
|
||||||
end,
|
else
|
||||||
mode=function(org)
|
sceneTemp=1
|
||||||
BG.set("space")
|
end
|
||||||
BGM.play("blank")
|
end
|
||||||
destroyPlayers()
|
function sceneInit.mode(org)
|
||||||
local cam=mapCam
|
BG.set("space")
|
||||||
cam.zoomK=org=="main"and 5 or 1
|
BGM.play("blank")
|
||||||
if cam.sel then
|
destroyPlayers()
|
||||||
local M=modes[cam.sel]
|
local cam=mapCam
|
||||||
cam.x,cam.y=M.x*cam.k+180,M.y*cam.k
|
cam.zoomK=org=="main"and 5 or 1
|
||||||
cam.x1,cam.y1=cam.x,cam.y
|
if cam.sel then
|
||||||
end
|
local M=modes[cam.sel]
|
||||||
end,
|
cam.x,cam.y=M.x*cam.k+180,M.y*cam.k
|
||||||
custom=function()
|
cam.x1,cam.y1=cam.x,cam.y
|
||||||
sceneTemp=1--option select
|
end
|
||||||
destroyPlayers()
|
end
|
||||||
BG.set(customRange.bg[customSel[12]])
|
function sceneInit.custom()
|
||||||
BGM.play(customRange.bgm[customSel[13]])
|
sceneTemp=1--option select
|
||||||
end,
|
destroyPlayers()
|
||||||
draw=function()
|
BG.set(customRange.bg[customSel[12]])
|
||||||
BG.set("space")
|
BGM.play(customRange.bgm[customSel[13]])
|
||||||
sceneTemp={
|
end
|
||||||
sure=0,
|
function sceneInit.draw()
|
||||||
pen=1,
|
BG.set("space")
|
||||||
x=1,y=1,
|
sceneTemp={
|
||||||
demo=false,
|
sure=0,
|
||||||
}
|
pen=1,
|
||||||
end,
|
x=1,y=1,
|
||||||
play=function()
|
demo=false,
|
||||||
love.keyboard.setKeyRepeat(false)
|
}
|
||||||
restartCount=0
|
end
|
||||||
if needResetGameData then
|
function sceneInit.play()
|
||||||
resetGameData()
|
love.keyboard.setKeyRepeat(false)
|
||||||
needResetGameData=nil
|
restartCount=0
|
||||||
end
|
if needResetGameData then
|
||||||
BG.set(modeEnv.bg)
|
resetGameData()
|
||||||
end,
|
needResetGameData=nil
|
||||||
pause=function(org)
|
end
|
||||||
if
|
BG.set(modeEnv.bg)
|
||||||
org=="setting_game"or
|
end
|
||||||
org=="setting_video"or
|
function sceneInit.pause(org)
|
||||||
org=="setting_sound"
|
if
|
||||||
then
|
org=="setting_game"or
|
||||||
TEXT.show(text.needRestart,640,440,50,"fly",.6)
|
org=="setting_video"or
|
||||||
end
|
org=="setting_sound"
|
||||||
local S=players[1].stat
|
then
|
||||||
sceneTemp={
|
TEXT.show(text.needRestart,640,440,50,"fly",.6)
|
||||||
timer=org=="play"and 0 or 50,
|
end
|
||||||
list={
|
local S=players[1].stat
|
||||||
toTime(S.time),
|
sceneTemp={
|
||||||
S.key.."/"..S.rotate.."/"..S.hold,
|
timer=org=="play"and 0 or 50,
|
||||||
format("%d %.2fPPS",S.piece,S.piece/S.time),
|
list={
|
||||||
format("%d(%d) %.2fLPM",S.row,S.dig,S.row/S.time*60),
|
toTime(S.time),
|
||||||
format("%d(%d)",S.atk,S.digatk),
|
S.key.."/"..S.rotate.."/"..S.hold,
|
||||||
format("%d(%d-%d)",S.pend,S.recv,S.recv-S.pend),
|
format("%d %.2fPPS",S.piece,S.piece/S.time),
|
||||||
format("%d/%d/%d/%d",S.clear_S[1],S.clear_S[2],S.clear_S[3],S.clear_S[4]),
|
format("%d(%d) %.2fLPM",S.row,S.dig,S.row/S.time*60),
|
||||||
format("(%d)/%d/%d/%d",S.spin_S[1],S.spin_S[2],S.spin_S[3],S.spin_S[4]),
|
format("%d(%d)",S.atk,S.digatk),
|
||||||
format("%d(+%d)/%d(%d)",S.b2b,S.b3b,S.pc,S.hpc),
|
format("%d(%d-%d)",S.pend,S.recv,S.recv-S.pend),
|
||||||
format("%d[%.2f%%]",S.extraPiece,100*max(1-S.extraRate/S.piece,0)),
|
format("%d/%d/%d/%d",S.clear_S[1],S.clear_S[2],S.clear_S[3],S.clear_S[4]),
|
||||||
},
|
format("(%d)/%d/%d/%d",S.spin_S[1],S.spin_S[2],S.spin_S[3],S.spin_S[4]),
|
||||||
|
format("%d(+%d)/%d(%d)",S.b2b,S.b3b,S.pc,S.hpc),
|
||||||
|
format("%d[%.2f%%]",S.extraPiece,100*max(1-S.extraRate/S.piece,0)),
|
||||||
|
},
|
||||||
|
|
||||||
--from right-down, 60 degree each
|
--from right-down, 60 degree each
|
||||||
radar={
|
radar={
|
||||||
(S.recv-S.pend+S.dig)/S.time*60,--DefPM
|
(S.recv-S.pend+S.dig)/S.time*60,--DefPM
|
||||||
(S.recv-S.pend)/S.time*60, --OffPM
|
(S.recv-S.pend)/S.time*60, --OffPM
|
||||||
S.atk/S.time*60, --AtkPM
|
S.atk/S.time*60, --AtkPM
|
||||||
S.send/S.time*60, --SendPM
|
S.send/S.time*60, --SendPM
|
||||||
S.piece/S.time*24, --LinePM
|
S.piece/S.time*24, --LinePM
|
||||||
S.dig/S.time*60, --DigPM
|
S.dig/S.time*60, --DigPM
|
||||||
},
|
},
|
||||||
val={1/80,1/40,1/60,1/60,1/100,1/40},
|
val={1/80,1/40,1/60,1/60,1/100,1/40},
|
||||||
timing=org=="play",
|
timing=org=="play",
|
||||||
}
|
}
|
||||||
local _=sceneTemp
|
local _=sceneTemp
|
||||||
local A,B=_.radar,_.val
|
local A,B=_.radar,_.val
|
||||||
for i=1,6 do
|
for i=1,6 do
|
||||||
B[i]=B[i]*A[i]if B[i]>1.26 then B[i]=1.26+(B[i]-1.26)*.26 end
|
B[i]=B[i]*A[i]if B[i]>1.26 then B[i]=1.26+(B[i]-1.26)*.26 end
|
||||||
end--normalize vals
|
end--normalize vals
|
||||||
for i=1,6 do
|
for i=1,6 do
|
||||||
A[i]=format("%.2f",A[i])..text.radarData[i]
|
A[i]=format("%.2f",A[i])..text.radarData[i]
|
||||||
end
|
end
|
||||||
local f=1
|
local f=1
|
||||||
for i=1,6 do
|
for i=1,6 do
|
||||||
if B[i]>.5 then f=2 end
|
if B[i]>.5 then f=2 end
|
||||||
if B[i]>1 then f=3 break end
|
if B[i]>1 then f=3 break end
|
||||||
end
|
end
|
||||||
if f==1 then _.color,f={.4,.9,.5},1.25 --Vegetable
|
if f==1 then _.color,f={.4,.9,.5},1.25 --Vegetable
|
||||||
elseif f==2 then _.color,f={.4,.7,.9},1 --Normal
|
elseif f==2 then _.color,f={.4,.7,.9},1 --Normal
|
||||||
elseif f==3 then _.color,f={1,.3,.3},.626 --Diao
|
elseif f==3 then _.color,f={1,.3,.3},.626 --Diao
|
||||||
end
|
end
|
||||||
A={
|
A={
|
||||||
120*.5*f, 120*3^.5*.5*f,
|
120*.5*f, 120*3^.5*.5*f,
|
||||||
120*-.5*f, 120*3^.5*.5*f,
|
120*-.5*f, 120*3^.5*.5*f,
|
||||||
120*-1*f, 120*0*f,
|
120*-1*f, 120*0*f,
|
||||||
120*-.5*f, 120*-3^.5*.5*f,
|
120*-.5*f, 120*-3^.5*.5*f,
|
||||||
120*.5*f, 120*-3^.5*.5*f,
|
120*.5*f, 120*-3^.5*.5*f,
|
||||||
120*1*f, 120*0*f,
|
120*1*f, 120*0*f,
|
||||||
}
|
}
|
||||||
_.scale=f
|
_.scale=f
|
||||||
_.standard=A
|
_.standard=A
|
||||||
|
|
||||||
for i=6,1,-1 do
|
for i=6,1,-1 do
|
||||||
B[2*i-1],B[2*i]=B[i]*A[2*i-1],B[i]*A[2*i]
|
B[2*i-1],B[2*i]=B[i]*A[2*i-1],B[i]*A[2*i]
|
||||||
end
|
end
|
||||||
_.val=B
|
_.val=B
|
||||||
end,
|
end
|
||||||
setting_game=function()
|
function sceneInit.setting_game()
|
||||||
BG.set("space")
|
BG.set("space")
|
||||||
end,
|
end
|
||||||
setting_video=function()
|
function sceneInit.setting_video()
|
||||||
BG.set("space")
|
BG.set("space")
|
||||||
end,
|
end
|
||||||
setting_sound=function()
|
function sceneInit.setting_sound()
|
||||||
sceneTemp={last=0,jump=0}--last sound time,animation count(10 to 0)
|
sceneTemp={last=0,jump=0}--last sound time,animation count(10 to 0)
|
||||||
BG.set("space")
|
BG.set("space")
|
||||||
end,
|
end
|
||||||
setting_control=function()
|
function sceneInit.setting_control()
|
||||||
sceneTemp={
|
sceneTemp={
|
||||||
das=setting.das,
|
das=setting.das,
|
||||||
arr=setting.arr,
|
arr=setting.arr,
|
||||||
pos=0,
|
pos=0,
|
||||||
dir=1,
|
dir=1,
|
||||||
wait=30,
|
wait=30,
|
||||||
|
}
|
||||||
|
BG.set("strap")
|
||||||
|
end
|
||||||
|
function sceneInit.setting_key()
|
||||||
|
sceneTemp={
|
||||||
|
board=1,
|
||||||
|
kb=1,js=1,
|
||||||
|
kS=false,jS=false,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
function sceneInit.setting_touch()
|
||||||
|
BG.set("game2")
|
||||||
|
sceneTemp={
|
||||||
|
default=1,
|
||||||
|
snap=1,
|
||||||
|
sel=nil,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
function sceneInit.setting_touchSwitch()
|
||||||
|
BG.set("matrix")
|
||||||
|
end
|
||||||
|
function sceneInit.help()
|
||||||
|
sceneTemp={
|
||||||
|
pw=0,
|
||||||
|
}
|
||||||
|
BG.set("space")
|
||||||
|
end
|
||||||
|
function sceneInit.staff()
|
||||||
|
sceneTemp={
|
||||||
|
time=0,
|
||||||
|
v=1,
|
||||||
|
}
|
||||||
|
BG.set("space")
|
||||||
|
end
|
||||||
|
function sceneInit.stat()
|
||||||
|
local S=stat
|
||||||
|
sceneTemp={
|
||||||
|
chart={
|
||||||
|
A1=S.spin,A2=S.clear,
|
||||||
|
X1=S.spin_S,X2=S.clear_S,
|
||||||
|
Y1=S.spin_B,Y2=S.clear_B,
|
||||||
|
},
|
||||||
|
item={
|
||||||
|
S.run,
|
||||||
|
S.game,
|
||||||
|
toTime(S.time),
|
||||||
|
S.key.." "..S.rotate.." "..S.hold,
|
||||||
|
S.piece.." "..S.row.." "..int(S.atk),
|
||||||
|
S.recv.." "..(S.recv-S.pend).." "..S.pend,
|
||||||
|
S.dig.." "..int(S.digatk),
|
||||||
|
format("%.2f %.2f",S.atk/S.row,S.digatk/S.dig),
|
||||||
|
format("%d/%.3f%%",S.extraPiece,100*max(1-S.extraRate/S.piece,0)),
|
||||||
|
S.b2b.." "..S.b3b,
|
||||||
|
S.pc.." "..S.hpc,
|
||||||
}
|
}
|
||||||
BG.set("strap")
|
}
|
||||||
end,
|
for i=1,11 do
|
||||||
setting_key=function()
|
sceneTemp.item[i]=text.stat[i].."\t"..sceneTemp.item[i]
|
||||||
sceneTemp={
|
end
|
||||||
board=1,
|
end
|
||||||
kb=1,js=1,
|
function sceneInit.history()
|
||||||
kS=false,jS=false,
|
BG.set("strap")
|
||||||
}
|
sceneTemp={require("updateLog"),1}--scroll pos
|
||||||
end,
|
end
|
||||||
setting_touch=function()
|
function sceneInit.quit()
|
||||||
BG.set("game2")
|
love.timer.sleep(.3)
|
||||||
sceneTemp={
|
love.event.quit()
|
||||||
default=1,
|
end
|
||||||
snap=1,
|
|
||||||
sel=nil,
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
setting_touchSwitch=function()
|
|
||||||
BG.set("matrix")
|
|
||||||
end,
|
|
||||||
help=function()
|
|
||||||
sceneTemp={
|
|
||||||
pw=0,
|
|
||||||
}
|
|
||||||
BG.set("space")
|
|
||||||
end,
|
|
||||||
stat=function()
|
|
||||||
local S=stat
|
|
||||||
sceneTemp={
|
|
||||||
chart={
|
|
||||||
A1=S.spin,A2=S.clear,
|
|
||||||
X1=S.spin_S,X2=S.clear_S,
|
|
||||||
Y1=S.spin_B,Y2=S.clear_B,
|
|
||||||
},
|
|
||||||
item={
|
|
||||||
S.run,
|
|
||||||
S.game,
|
|
||||||
toTime(S.time),
|
|
||||||
S.key.." "..S.rotate.." "..S.hold,
|
|
||||||
S.piece.." "..S.row.." "..int(S.atk),
|
|
||||||
S.recv.." "..(S.recv-S.pend).." "..S.pend,
|
|
||||||
S.dig.." "..int(S.digatk),
|
|
||||||
format("%.2f %.2f",S.atk/S.row,S.digatk/S.dig),
|
|
||||||
format("%d/%.3f%%",S.extraPiece,100*max(1-S.extraRate/S.piece,0)),
|
|
||||||
S.b2b.." "..S.b3b,
|
|
||||||
S.pc.." "..S.hpc,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for i=1,11 do
|
|
||||||
sceneTemp.item[i]=text.stat[i].."\t"..sceneTemp.item[i]
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
history=function()
|
|
||||||
BG.set("strap")
|
|
||||||
sceneTemp={require("updateLog"),1}--scroll pos
|
|
||||||
end,
|
|
||||||
quit=function()
|
|
||||||
love.timer.sleep(.3)
|
|
||||||
love.event.quit()
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
local swap={
|
local swap={
|
||||||
none={1,0,NULL},
|
none={1,0,NULL},
|
||||||
flash={8,1,function()gc.clear(1,1,1)end},
|
flash={8,1,function()gc.clear(1,1,1)end},
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
extern float a;
|
|
||||||
vec4 effect(vec4 color, Image text,vec2 pos,vec2 scr_pos){
|
|
||||||
if(Texel(text,pos)[3]==0.)discard;
|
|
||||||
return vec4(1.,1.,1.,a);
|
|
||||||
}
|
|
||||||
4
shader/alpha.glsl
Normal file
4
shader/alpha.glsl
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
extern float a;
|
||||||
|
vec4 effect(vec4 color,Image text,vec2 pos,vec2 scr_pos){
|
||||||
|
return vec4(1.,1.,1.,sign(Texel(text,pos).a)*a);
|
||||||
|
}
|
||||||
42
shader/aura.glsl
Normal file
42
shader/aura.glsl
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
#define PI 3.1415926535897932384626
|
||||||
|
extern float w,h;
|
||||||
|
extern float t;
|
||||||
|
vec4 effect(vec4 color,Image text,vec2 pos,vec2 scr_pos){
|
||||||
|
float x=scr_pos.x/w;
|
||||||
|
float y=scr_pos.y/h;
|
||||||
|
float dx,dy;
|
||||||
|
vec3 V=vec3(0.);
|
||||||
|
|
||||||
|
dx=0.5+cos(t*3.*0.26)*0.4-x;
|
||||||
|
dy=0.5-sin(t*3.*0.62)*0.4-y;
|
||||||
|
dx=sqrt(dx*dx+dy*dy);
|
||||||
|
V.r=V.r+smoothstep(1.26,0.,dx);
|
||||||
|
|
||||||
|
dx=(0.5+cos(t*3.*0.32)*0.4)-x;
|
||||||
|
dy=(0.5-sin(t*3.*0.80)*0.4)-y;
|
||||||
|
dx=sqrt(dx*dx+dy*dy);
|
||||||
|
V.g=V.g+smoothstep(1.26,0.,dx);
|
||||||
|
|
||||||
|
dx=(0.5-cos(t*3.*0.49)*0.4)-x;
|
||||||
|
dy=(0.5+sin(t*3.*0.18)*0.4)-y;
|
||||||
|
dx=sqrt(dx*dx+dy*dy);
|
||||||
|
V.b=V.b+smoothstep(1.26,0.,dx);
|
||||||
|
|
||||||
|
dx=(0.5+cos(t*0.53)*0.4)-x;
|
||||||
|
dy=(0.5-sin(t*0.46)*0.4)-y;
|
||||||
|
dx=sqrt(dx*dx+dy*dy);
|
||||||
|
V.rg+=vec2(smoothstep(0.626,0.,dx));
|
||||||
|
|
||||||
|
dx=(0.5+cos(t*0.98)*0.4)-x;
|
||||||
|
dy=(0.5+sin(t*0.57)*0.4)-y;
|
||||||
|
dx=sqrt(dx*dx+dy*dy);
|
||||||
|
V.rb+=vec2(smoothstep(0.626,0.,dx));
|
||||||
|
|
||||||
|
dx=(0.5-cos(t*0.86)*0.4)-x;
|
||||||
|
dy=(0.5-sin(t*0.32)*0.4)-y;
|
||||||
|
dx=sqrt(dx*dx+dy*dy);
|
||||||
|
V.gb+=vec2(smoothstep(0.626,0.,dx));
|
||||||
|
|
||||||
|
dx=1.26*max(max(V.r,V.g),V.b);
|
||||||
|
return vec4(V/dx,1.);
|
||||||
|
}
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
extern float X;extern float Y;extern float W;extern float H;
|
|
||||||
vec4 effect(vec4 C,Image Tx,vec2 Tcd,vec2 Pcd){
|
|
||||||
C[3]=min((Pcd.x-X)/W*.3+(Pcd.y-Y)/H*.1,.3)+.5;
|
|
||||||
return C;
|
|
||||||
}
|
|
||||||
5
shader/glow.glsl
Normal file
5
shader/glow.glsl
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
extern float X,Y,W,H;
|
||||||
|
vec4 effect(vec4 C,Image Tx,vec2 pos,vec2 scr_pos){
|
||||||
|
C[3]=min((scr_pos.x-X)/W*0.3+(scr_pos.y-Y)/H*0.1,0.3)+0.5;
|
||||||
|
return C;
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#define PI 3.14
|
#define PI 3.14159
|
||||||
extern float xresolution;
|
extern float xresolution;
|
||||||
//sample from 1D vis-depth map
|
//sample from 1D vis-depth map
|
||||||
float samp(vec2 coord,float r,Image u_texture){
|
float samp(vec2 coord,float r,Image u_texture){
|
||||||
@@ -7,22 +7,22 @@ float samp(vec2 coord,float r,Image u_texture){
|
|||||||
vec4 effect(vec4 color,Image texture,vec2 texture_coords,vec2 screen_coords){
|
vec4 effect(vec4 color,Image texture,vec2 texture_coords,vec2 screen_coords){
|
||||||
//cartesian to polar, y of 1D sample is always 0
|
//cartesian to polar, y of 1D sample is always 0
|
||||||
vec2 norm=texture_coords.st*2.-1.;
|
vec2 norm=texture_coords.st*2.-1.;
|
||||||
float r=length(norm);
|
|
||||||
vec2 tc=vec2((atan(norm.y,norm.x)+PI)/(2.*PI),0.);
|
vec2 tc=vec2((atan(norm.y,norm.x)+PI)/(2.*PI),0.);
|
||||||
|
float r=length(norm);
|
||||||
|
|
||||||
//enlarge blur parameter by distance, light scattering simulation
|
//enlarge blur parameter by distance, light scattering simulation
|
||||||
float blur=(1./xresolution)*smoothstep(.3,1.,r);
|
float blur=(1./xresolution)*smoothstep(0.3,1.,r);
|
||||||
|
|
||||||
//Simple Gaussian blur
|
//Simple Gaussian blur
|
||||||
float sum=//brightness(0~1)
|
float sum=//brightness(0~1)
|
||||||
samp(vec2(tc.x-3.*blur,tc.y),r,texture)*.1
|
samp(vec2(tc.x-3.*blur,tc.y),r,texture)*0.1
|
||||||
+samp(vec2(tc.x-2.*blur,tc.y),r,texture)*.13
|
+samp(vec2(tc.x-2.*blur,tc.y),r,texture)*0.13
|
||||||
+samp(vec2(tc.x-1.*blur,tc.y),r,texture)*.17
|
+samp(vec2(tc.x-1.*blur,tc.y),r,texture)*0.17
|
||||||
|
|
||||||
+samp(tc,r,texture)*.2//The center tex coord,which gives us hard shadows.
|
+samp(tc,r,texture)*0.2//The center tex coord,which gives us hard shadows.
|
||||||
+samp(vec2(tc.x+1.*blur,tc.y),r,texture)*.17
|
+samp(vec2(tc.x+1.*blur,tc.y),r,texture)*0.17
|
||||||
+samp(vec2(tc.x+2.*blur,tc.y),r,texture)*.13
|
+samp(vec2(tc.x+2.*blur,tc.y),r,texture)*0.13
|
||||||
+samp(vec2(tc.x+3.*blur,tc.y),r,texture)*.1;
|
+samp(vec2(tc.x+3.*blur,tc.y),r,texture)*0.1;
|
||||||
|
|
||||||
//Multiply the distance to get a soft fading
|
//Multiply the distance to get a soft fading
|
||||||
return vec4(vec3(1.),sum*smoothstep(1.,0.,r));
|
return vec4(vec3(1.),sum*smoothstep(1.,0.,r));
|
||||||
15
shader/rainbow.glsl
Normal file
15
shader/rainbow.glsl
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#define PI 3.14159265
|
||||||
|
extern float w,h;
|
||||||
|
extern float t;
|
||||||
|
vec4 effect(vec4 color,Image text,vec2 pos,vec2 scr_pos){
|
||||||
|
float x=scr_pos.x-w/2.;
|
||||||
|
float y=scr_pos.y-h/2.;
|
||||||
|
float a=(step(0.,x)*2.-1.)*PI+atan(y,x)+PI*0.5+t*0.626;
|
||||||
|
|
||||||
|
return vec4(
|
||||||
|
color.r*(sin(a+PI*0./3.)*0.3+0.5),
|
||||||
|
color.g*(sin(a+PI*2./3.)*0.3+0.5),
|
||||||
|
color.b*(sin(a+PI*4./3.)*0.3+0.5),
|
||||||
|
1.
|
||||||
|
);
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user