场地遮挡和场地反转的mod完成

This commit is contained in:
MrZ626
2020-12-15 23:56:49 +08:00
parent 81aab6bdb3
commit 13b176d515
3 changed files with 32 additions and 1 deletions

View File

@@ -45,7 +45,7 @@ MODOPT={--Mod options
},
{no=8,id="FB",name="flipBoard",
key="p",x=1160,y=230,color="grass",
list={"UD","LR","180"},
list={"U-D","L-R","180"},
func=function(P,O)P.gameEnv.flipBoard=O end,
},
@@ -172,6 +172,8 @@ CUSTOMENV={--gameEnv for cutsom game
highCam=false,
nextPos=false,
bone=false,
hideBoard=false,
flipBoard=false,
--Rule
mindas=0,

View File

@@ -303,6 +303,11 @@ local function drawDial(x,y,speed)
gc.setColor(1,1,1,.8)
gc.draw(IMG.dialNeedle,x,y,2.094+(speed<=175 and .02094*speed or 4.712-52.36/(speed-125)),nil,nil,5,4)
end
local hideBoardStencil={
up=function()gc.rectangle("fill",0,0,300,300)end,
down=function()gc.rectangle("fill",0,300,300,300)end,
all=function()gc.rectangle("fill",0,0,300,600)end,
}
function draw.norm(P)
local _
local ENV=P.gameEnv
@@ -328,6 +333,18 @@ function draw.norm(P)
--In-field things
gc.push("transform")
if ENV.flipBoard then
if ENV.flipBoard=="U-D"then
gc.translate(0,590)
gc.scale(1,-1)
elseif ENV.flipBoard=="L-R"then
gc.translate(300,0)
gc.scale(-1,1)
elseif ENV.flipBoard=="180"then
gc.translate(300,590)
gc.scale(-1,-1)
end
end
gc.translate(0,600+FBN+FUP)
gc.setScissor(SCR.x+(P.absFieldX+P.fieldOff.x)*SCR.k,SCR.y+(P.absFieldY+P.fieldOff.y)*SCR.k,300*P.size*SCR.k,610*P.size*SCR.k)
@@ -468,6 +485,16 @@ function draw.norm(P)
gc.printf(text.atkModeName[i],RCPB[2*i-1]-4,RCPB[2*i]+4,200,"center",nil,.5)
end
end
if ENV.hideBoard then
gc.stencil(hideBoardStencil[ENV.hideBoard],"replace",1)
gc.setStencilTest("equal",1)
gc.setLineWidth(20)
for i=0,24 do
gc.setColor(COLOR.rainbow_grey(t*.626+i*.1))
gc.line(20*i-190,-2,20*i+10,602)
end
gc.setStencilTest()
end
gc.pop()
--Bonus texts

View File

@@ -24,6 +24,8 @@ return{
highCam=false,
nextPos=false,
hideBoard=false,
flipBoard=false,
drop=60,lock=60,
wait=0,fall=0,