可选六种阴影样式,默认贴图
This commit is contained in:
@@ -388,7 +388,7 @@ do--function dumpBasicConfig()
|
|||||||
'skin','face',
|
'skin','face',
|
||||||
|
|
||||||
--Graphic
|
--Graphic
|
||||||
'block','ghost','center','bagLine',
|
'ghostType','block','ghost','center','bagLine',
|
||||||
'dropFX','moveFX','shakeFX',
|
'dropFX','moveFX','shakeFX',
|
||||||
'text','highCam','nextPos',
|
'text','highCam','nextPos',
|
||||||
|
|
||||||
|
|||||||
@@ -314,6 +314,7 @@ SETTING={--Settings
|
|||||||
face={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
|
face={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
|
||||||
|
|
||||||
--Graphic
|
--Graphic
|
||||||
|
ghostType='gray',
|
||||||
block=true,ghost=.3,center=1,
|
block=true,ghost=.3,center=1,
|
||||||
smooth=true,grid=.16,
|
smooth=true,grid=.16,
|
||||||
upEdge=true,
|
upEdge=true,
|
||||||
|
|||||||
@@ -322,6 +322,7 @@ return{
|
|||||||
upEdge="3D Block",
|
upEdge="3D Block",
|
||||||
bagLine="Bag Separator",
|
bagLine="Bag Separator",
|
||||||
|
|
||||||
|
ghostType="Ghost Type",
|
||||||
ghost="Ghost",
|
ghost="Ghost",
|
||||||
grid="Grid",
|
grid="Grid",
|
||||||
center="Center",
|
center="Center",
|
||||||
|
|||||||
@@ -297,6 +297,7 @@ return{
|
|||||||
upEdge="Bloques en 3D",
|
upEdge="Bloques en 3D",
|
||||||
bagLine="Línea de Bag de Pzas.",
|
bagLine="Línea de Bag de Pzas.",
|
||||||
|
|
||||||
|
-- ghostType="Ghost Type",
|
||||||
ghost="Fantasma",
|
ghost="Fantasma",
|
||||||
grid="Grilla",
|
grid="Grilla",
|
||||||
center="Centrar",
|
center="Centrar",
|
||||||
|
|||||||
@@ -295,6 +295,7 @@ return{
|
|||||||
upEdge="Bloc 3D",
|
upEdge="Bloc 3D",
|
||||||
bagLine="Ligne du Sac",
|
bagLine="Ligne du Sac",
|
||||||
|
|
||||||
|
-- ghostType="Ghost Type",
|
||||||
ghost="Pièce fantôme",
|
ghost="Pièce fantôme",
|
||||||
grid="Grille",
|
grid="Grille",
|
||||||
center="Centre",
|
center="Centre",
|
||||||
|
|||||||
@@ -321,6 +321,7 @@ return{
|
|||||||
upEdge="3D bloco",
|
upEdge="3D bloco",
|
||||||
bagLine="Linha da bolsa",
|
bagLine="Linha da bolsa",
|
||||||
|
|
||||||
|
-- ghostType="Ghost Type",
|
||||||
ghost="Fantasma",
|
ghost="Fantasma",
|
||||||
grid="Rede",
|
grid="Rede",
|
||||||
center="Centro",
|
center="Centro",
|
||||||
|
|||||||
@@ -150,6 +150,7 @@ return{
|
|||||||
upEdge="[]`",
|
upEdge="[]`",
|
||||||
bagLine="123|123",
|
bagLine="123|123",
|
||||||
|
|
||||||
|
ghostType="__↓?__",
|
||||||
ghost="__↓__",
|
ghost="__↓__",
|
||||||
grid="#",
|
grid="#",
|
||||||
center="+",
|
center="+",
|
||||||
|
|||||||
@@ -322,6 +322,7 @@ return{
|
|||||||
upEdge="3D方块",
|
upEdge="3D方块",
|
||||||
bagLine="包分界线",
|
bagLine="包分界线",
|
||||||
|
|
||||||
|
ghostType="阴影样式",
|
||||||
ghost="阴影不透明度",
|
ghost="阴影不透明度",
|
||||||
grid="网格不透明度",
|
grid="网格不透明度",
|
||||||
center="旋转中心不透明度",
|
center="旋转中心不透明度",
|
||||||
|
|||||||
@@ -205,16 +205,68 @@ local function drawFXs(P)
|
|||||||
gc_rectangle('fill',150-x*150,15-S[1]*30-y*15,300*x,y*30)
|
gc_rectangle('fill',150-x*150,15-S[1]*30-y*15,300*x,y*30)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local function drawGhost(P,clr,alpha)
|
local drawGhost={
|
||||||
gc_setColor(1,1,1,alpha)
|
color=function(P,clr,alpha)
|
||||||
local texture=SKIN.curText
|
gc_setColor(1,1,1,alpha)
|
||||||
local CB=P.cur.bk
|
local texture=SKIN.curText
|
||||||
for i=1,#CB do for j=1,#CB[1]do
|
local CB=P.cur.bk
|
||||||
if CB[i][j]then
|
for i=1,#CB do for j=1,#CB[1]do
|
||||||
gc_draw(texture[clr],30*(j+P.curX-1)-30,-30*(i+P.ghoY-1))
|
if CB[i][j]then
|
||||||
end
|
gc_draw(texture[clr],30*(j+P.curX-1)-30,-30*(i+P.ghoY-1))
|
||||||
end end
|
end
|
||||||
end
|
end end
|
||||||
|
end,
|
||||||
|
gray=function(P,_,alpha)
|
||||||
|
gc_setColor(1,1,1,alpha)
|
||||||
|
local texture=SKIN.curText
|
||||||
|
local CB=P.cur.bk
|
||||||
|
for i=1,#CB do for j=1,#CB[1]do
|
||||||
|
if CB[i][j]then
|
||||||
|
gc_draw(texture[21],30*(j+P.curX-1)-30,-30*(i+P.ghoY-1))
|
||||||
|
end
|
||||||
|
end end
|
||||||
|
end,
|
||||||
|
colorLine=function(P,clr,alpha)
|
||||||
|
clr=minoColor[clr]
|
||||||
|
gc_setColor(clr[1],clr[2],clr[3],alpha)
|
||||||
|
gc_setLineWidth(4)
|
||||||
|
local CB=P.cur.bk
|
||||||
|
for i=1,#CB do for j=1,#CB[1]do
|
||||||
|
if CB[i][j]then
|
||||||
|
gc_rectangle('line',30*(j+P.curX-1)-30+2,-30*(i+P.ghoY-1)+2,26,26)
|
||||||
|
end
|
||||||
|
end end
|
||||||
|
end,
|
||||||
|
grayLine=function(P,_,alpha)
|
||||||
|
gc_setColor(1,1,1,alpha)
|
||||||
|
gc_setLineWidth(4)
|
||||||
|
local CB=P.cur.bk
|
||||||
|
for i=1,#CB do for j=1,#CB[1]do
|
||||||
|
if CB[i][j]then
|
||||||
|
gc_rectangle('line',30*(j+P.curX-1)-30+2,-30*(i+P.ghoY-1)+2,26,26)
|
||||||
|
end
|
||||||
|
end end
|
||||||
|
end,
|
||||||
|
colorCell=function(P,clr,alpha)
|
||||||
|
clr=minoColor[clr]
|
||||||
|
gc_setColor(clr[1],clr[2],clr[3],alpha)
|
||||||
|
local CB=P.cur.bk
|
||||||
|
for i=1,#CB do for j=1,#CB[1]do
|
||||||
|
if CB[i][j]then
|
||||||
|
gc_rectangle('fill',30*(j+P.curX-1)-30,-30*(i+P.ghoY-1),30,30)
|
||||||
|
end
|
||||||
|
end end
|
||||||
|
end,
|
||||||
|
greyCell=function(P,_,alpha)
|
||||||
|
gc_setColor(1,1,1,alpha)
|
||||||
|
local CB=P.cur.bk
|
||||||
|
for i=1,#CB do for j=1,#CB[1]do
|
||||||
|
if CB[i][j]then
|
||||||
|
gc_rectangle('fill',30*(j+P.curX-1)-30,-30*(i+P.ghoY-1),30,30)
|
||||||
|
end
|
||||||
|
end end
|
||||||
|
end,
|
||||||
|
}
|
||||||
local function drawBlockOutline(P,texture,trans)
|
local function drawBlockOutline(P,texture,trans)
|
||||||
shader_alpha:send("a",trans)
|
shader_alpha:send("a",trans)
|
||||||
gc_setShader(shader_alpha)
|
gc_setShader(shader_alpha)
|
||||||
@@ -611,7 +663,7 @@ function draw.norm(P)
|
|||||||
|
|
||||||
--Draw ghost & rotation center
|
--Draw ghost & rotation center
|
||||||
if ENV.ghost then
|
if ENV.ghost then
|
||||||
drawGhost(P,curColor,ENV.ghost)
|
drawGhost[ENV.ghostType](P,curColor,ENV.ghost)
|
||||||
if ENV.center then
|
if ENV.center then
|
||||||
gc_setColor(1,1,1,ENV.center)
|
gc_setColor(1,1,1,ENV.center)
|
||||||
gc_draw(spinCenterImg,centerX,-30*(P.ghoY+P.cur.sc[1])+15,nil,nil,nil,4,4)
|
gc_draw(spinCenterImg,centerX,-30*(P.ghoY+P.cur.sc[1])+15,nil,nil,nil,4,4)
|
||||||
@@ -819,7 +871,7 @@ function draw.demo(P)
|
|||||||
drawField(P)
|
drawField(P)
|
||||||
drawFXs(P)
|
drawFXs(P)
|
||||||
if P.cur and P.waiting==-1 then
|
if P.cur and P.waiting==-1 then
|
||||||
if ENV.ghost then drawGhost(P,curColor,ENV.ghost)end
|
if ENV.ghost then drawGhost[ENV.ghostType](P,curColor,ENV.ghost)end
|
||||||
if ENV.block then
|
if ENV.block then
|
||||||
local dy=ENV.smooth and P.ghoY~=P.curY and(P.dropDelay/ENV.drop-1)*30 or 0
|
local dy=ENV.smooth and P.ghoY~=P.curY and(P.dropDelay/ENV.drop-1)*30 or 0
|
||||||
gc_translate(0,-dy)
|
gc_translate(0,-dy)
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ return{
|
|||||||
ihs=true,irs=true,ims=true,
|
ihs=true,irs=true,ims=true,
|
||||||
swap=true,
|
swap=true,
|
||||||
|
|
||||||
|
ghostType='gray',
|
||||||
block=true,ghost=.3,center=1,
|
block=true,ghost=.3,center=1,
|
||||||
smooth=false,grid=.16,
|
smooth=false,grid=.16,
|
||||||
upEdge=true,
|
upEdge=true,
|
||||||
|
|||||||
@@ -15,36 +15,37 @@ scene.widgetList={
|
|||||||
WIDGET.newButton{name="game", x=1080,y=80,w=240,h=80,color='lC',font=35,code=swapScene('setting_game','swipeL')},
|
WIDGET.newButton{name="game", x=1080,y=80,w=240,h=80,color='lC',font=35,code=swapScene('setting_game','swipeL')},
|
||||||
|
|
||||||
WIDGET.newSwitch{name="block", x=380,y=180,disp=SETval("block"),code=SETrev("block")},
|
WIDGET.newSwitch{name="block", x=380,y=180,disp=SETval("block"),code=SETrev("block")},
|
||||||
WIDGET.newSwitch{name="smooth", x=380,y=230,disp=SETval("smooth"),code=SETrev("smooth")},
|
WIDGET.newSwitch{name="smooth", x=380,y=250,disp=SETval("smooth"),code=SETrev("smooth")},
|
||||||
WIDGET.newSwitch{name="upEdge", x=380,y=280,disp=SETval("upEdge"),code=SETrev("upEdge")},
|
WIDGET.newSwitch{name="upEdge", x=380,y=320,disp=SETval("upEdge"),code=SETrev("upEdge")},
|
||||||
WIDGET.newSwitch{name="bagLine", x=380,y=330,disp=SETval("bagLine"),code=SETrev("bagLine")},
|
WIDGET.newSwitch{name="bagLine", x=380,y=390,disp=SETval("bagLine"),code=SETrev("bagLine")},
|
||||||
|
|
||||||
WIDGET.newSlider{name="ghost", x=740,y=180,w=350,unit=.6, disp=SETval("ghost"),show="percent",code=SETsto("ghost")},
|
WIDGET.newSelector{name="ghostType",x=915,y=180,w=350,list={'color','gray','colorLine','grayLine','colorCell','greyCell'},disp=SETval("ghostType"),code=SETsto("ghostType")},
|
||||||
WIDGET.newSlider{name="grid", x=740,y=260,w=350,unit=.4, disp=SETval("grid"),show="percent", code=SETsto("grid")},
|
WIDGET.newSlider{name="ghost", x=740,y=240,w=350,unit=1, disp=SETval("ghost"),show="percent",code=SETsto("ghost")},
|
||||||
WIDGET.newSlider{name="center", x=740,y=340,w=350,unit=1, disp=SETval("center"), code=SETsto("center")},
|
WIDGET.newSlider{name="grid", x=740,y=320,w=350,unit=.4, disp=SETval("grid"),show="percent", code=SETsto("grid")},
|
||||||
|
WIDGET.newSlider{name="center", x=740,y=400,w=350,unit=1, disp=SETval("center"), code=SETsto("center")},
|
||||||
|
|
||||||
WIDGET.newSlider{name="lockFX", x=330,y=400,w=540,unit=5, disp=SETval("lockFX"), code=SETsto("lockFX")},
|
WIDGET.newSlider{name="lockFX", x=330,y=460,w=540,unit=5, disp=SETval("lockFX"), code=SETsto("lockFX")},
|
||||||
WIDGET.newSlider{name="dropFX", x=330,y=460,w=540,unit=5, disp=SETval("dropFX"), code=SETsto("dropFX")},
|
WIDGET.newSlider{name="dropFX", x=330,y=520,w=540,unit=5, disp=SETval("dropFX"), code=SETsto("dropFX")},
|
||||||
WIDGET.newSlider{name="moveFX", x=330,y=520,w=540,unit=5, disp=SETval("moveFX"), code=SETsto("moveFX")},
|
WIDGET.newSlider{name="moveFX", x=330,y=580,w=540,unit=5, disp=SETval("moveFX"), code=SETsto("moveFX")},
|
||||||
WIDGET.newSlider{name="clearFX", x=330,y=580,w=540,unit=5, disp=SETval("clearFX"), code=SETsto("clearFX")},
|
WIDGET.newSlider{name="clearFX", x=330,y=640,w=540,unit=5, disp=SETval("clearFX"), code=SETsto("clearFX")},
|
||||||
WIDGET.newSlider{name="splashFX", x=330,y=640,w=540,unit=5, disp=SETval("splashFX"),code=SETsto("splashFX")},
|
WIDGET.newSlider{name="splashFX", x=330,y=700,w=540,unit=5, disp=SETval("splashFX"),code=SETsto("splashFX")},
|
||||||
WIDGET.newSlider{name="shakeFX", x=330,y=700,w=540,unit=5, disp=SETval("shakeFX"), code=SETsto("shakeFX")},
|
WIDGET.newSlider{name="shakeFX", x=330,y=760,w=540,unit=5, disp=SETval("shakeFX"), code=SETsto("shakeFX")},
|
||||||
WIDGET.newSlider{name="atkFX", x=330,y=760,w=540,unit=5, disp=SETval("atkFX"), code=SETsto("atkFX")},
|
WIDGET.newSlider{name="atkFX", x=330,y=820,w=540,unit=5, disp=SETval("atkFX"), code=SETsto("atkFX")},
|
||||||
WIDGET.newSelector{name="frame", x=600,y=830,w=460,list={8,10,13,17,22,29,37,47,62,80,100},disp=SETval("frameMul"),code=SETsto("frameMul")},
|
WIDGET.newSelector{name="frame", x=600,y=890,w=460,list={8,10,13,17,22,29,37,47,62,80,100},disp=SETval("frameMul"),code=SETsto("frameMul")},
|
||||||
|
|
||||||
WIDGET.newSwitch{name="text", x=450,y=920,disp=SETval("text"), code=SETrev("text")},
|
WIDGET.newSwitch{name="text", x=450,y=980,disp=SETval("text"), code=SETrev("text")},
|
||||||
WIDGET.newSwitch{name="score", x=450,y=970,disp=SETval("score"), code=SETrev("score")},
|
WIDGET.newSwitch{name="score", x=450,y=1030,disp=SETval("score"), code=SETrev("score")},
|
||||||
WIDGET.newSwitch{name="bufferWarn", x=450,y=1040,disp=SETval("bufferWarn"), code=SETrev("bufferWarn")},
|
WIDGET.newSwitch{name="bufferWarn", x=450,y=1100,disp=SETval("bufferWarn"), code=SETrev("bufferWarn")},
|
||||||
WIDGET.newSwitch{name="showSpike", x=450,y=1090,disp=SETval("showSpike"), code=SETrev("showSpike")},
|
WIDGET.newSwitch{name="showSpike", x=450,y=1150,disp=SETval("showSpike"), code=SETrev("showSpike")},
|
||||||
WIDGET.newSwitch{name="nextPos", x=450,y=1160,disp=SETval("nextPos"), code=SETrev("nextPos")},
|
WIDGET.newSwitch{name="nextPos", x=450,y=1220,disp=SETval("nextPos"), code=SETrev("nextPos")},
|
||||||
WIDGET.newSwitch{name="highCam", x=450,y=1210,disp=SETval("highCam"), code=SETrev("highCam")},
|
WIDGET.newSwitch{name="highCam", x=450,y=1270,disp=SETval("highCam"), code=SETrev("highCam")},
|
||||||
WIDGET.newSwitch{name="warn", x=450,y=1280,disp=SETval("warn"), code=SETrev("warn")},
|
WIDGET.newSwitch{name="warn", x=450,y=1340,disp=SETval("warn"), code=SETrev("warn")},
|
||||||
|
|
||||||
WIDGET.newSwitch{name="clickFX", x=950,y=920,disp=SETval("clickFX"), code=SETrev("clickFX")},
|
WIDGET.newSwitch{name="clickFX", x=950,y=980,disp=SETval("clickFX"), code=SETrev("clickFX")},
|
||||||
WIDGET.newSwitch{name="power", x=950,y=1010,disp=SETval("powerInfo"), code=SETrev("powerInfo")},
|
WIDGET.newSwitch{name="power", x=950,y=1070,disp=SETval("powerInfo"), code=SETrev("powerInfo")},
|
||||||
WIDGET.newSwitch{name="clean", x=950,y=1100,disp=SETval("cleanCanvas"),code=SETrev("cleanCanvas")},
|
WIDGET.newSwitch{name="clean", x=950,y=1160,disp=SETval("cleanCanvas"),code=SETrev("cleanCanvas")},
|
||||||
WIDGET.newSwitch{name="fullscreen", x=950,y=1190,disp=SETval("fullscreen"), code=switchFullscreen},
|
WIDGET.newSwitch{name="fullscreen", x=950,y=1250,disp=SETval("fullscreen"), code=switchFullscreen},
|
||||||
WIDGET.newSwitch{name="bg", x=950,y=1280,disp=SETval("bg"),
|
WIDGET.newSwitch{name="bg", x=950,y=1340,disp=SETval("bg"),
|
||||||
code=function()
|
code=function()
|
||||||
BG.set('none')
|
BG.set('none')
|
||||||
SETTING.bg=not SETTING.bg
|
SETTING.bg=not SETTING.bg
|
||||||
|
|||||||
Reference in New Issue
Block a user