旋转中心相对坐标向左下修正负一

This commit is contained in:
MrZ_26
2020-08-08 01:46:58 +08:00
parent dc5aa83cfb
commit 0278f13583
5 changed files with 15 additions and 15 deletions

View File

@@ -1022,7 +1022,7 @@ function love.focus(f)
pauseGame()
end
end
local scs={1,2,1,2,1,2,1,2,1,2,1.5,1.5,.5,2.5}
local scs={.5,1.5,.5,1.5,.5,1.5,.5,1.5,.5,1.5,1,1,0,2}
local devColor={
color.white,
color.lMagenta,
@@ -1099,7 +1099,7 @@ function love.run()
local R=int(r)%7+1
_=SKIN.libColor[setting.skin[R]]
gc.setColor(_[1],_[2],_[3],min(1-abs(1-r%1*2),.3))
gc.draw(TEXTURE.miniBlock[R],mx,my,Timer()%3.1416*4,20,20,scs[2*R]-.5,#blocks[R][0]-scs[2*R-1]+.5)
gc.draw(TEXTURE.miniBlock[R],mx,my,Timer()%3.1416*4,20,20,scs[2*R],#blocks[R][0]-scs[2*R-1])
gc.setColor(1,1,1,.5)gc.circle("fill",mx,my,5)
gc.setColor(1,1,1)gc.circle("fill",mx,my,3)
end

View File

@@ -738,7 +738,7 @@ function Pnt.setting_skin()
for N=1,7 do
local face=setting.face[N]
local B=blocks[N][face]
local x,y=-25+140*N-scs[N][face][2]*30,325+scs[N][face][1]*30
local x,y=-55+140*N-scs[N][face][2]*30,355+scs[N][face][1]*30
local col=#B[1]
for i=1,#B do for j=1,col do
if B[i][j]then

View File

@@ -16,7 +16,7 @@ local Timer=love.timer.getTime
-- 6~10:hD,sD,H,A,R,
-- 11~13:LL,RR,DD
local blockPos={4,4,4,4,4,5,4}
local scs={{1,2},{1,2},{1,2},{1,2},{1,2},{1.5,1.5},{0.5,2.5}}
local scs={{0,1},{0,1},{0,1},{0,1},{0,1},{.5,.5},{-.5,1.5}}
-------------------------------------------------Cold clear
local CCblockID={4,3,6,5,1,2,0}
if system=="Windows"then

View File

@@ -662,12 +662,12 @@ local function Pdraw_norm(P)
--Rotate center
if P.gameEnv.center then
gc.setColor(1,1,1,trans)
local x=30*(P.curX+P.sc[2]-1)-15
gc.draw(IMG.spinCenter,x,600-30*(P.curY+P.sc[1]-1)+15,nil,nil,nil,4,4)
local x=30*(P.curX+P.sc[2])-15
gc.draw(IMG.spinCenter,x,600-30*(P.curY+P.sc[1])+15,nil,nil,nil,4,4)
if P.gameEnv.ghost then
gc.translate(0,dy)
gc.setColor(1,1,1,.5)
gc.draw(IMG.spinCenter,x,600-30*(P.y_img+P.sc[1]-1)+15,nil,nil,nil,4,4)
gc.draw(IMG.spinCenter,x,600-30*(P.imgY+P.sc[1])+15,nil,nil,nil,4,4)
goto E
end
end
@@ -1001,7 +1001,7 @@ end
function player.createBeam(P,R,send,time,target,color,clear,spin,combo)
local x1,y1,x2,y2
if P.small then x1,y1=P.centerX,P.centerY
else x1,y1=P.x+(30*(P.curX+P.sc[2]-1)-30+15+150)*P.size,P.y+(600-30*(P.curY+P.sc[1]-1)+15+70)*P.size
else x1,y1=P.x+(30*(P.curX+P.sc[2])-30+15+150)*P.size,P.y+(600-30*(P.curY+P.sc[1])+15+70)*P.size
end
if R.small then x2,y2=R.centerX,R.centerY
else x2,y2=R.x+308*R.size,R.y+450*R.size
@@ -1544,7 +1544,7 @@ function player.drop(P)--Place piece
--Tri-corner
if P.cur.id<6 then
local x,y=P.curX+P.sc[2]-1,P.curY+P.sc[1]-1
local x,y=P.curX+P.sc[2],P.curY+P.sc[1]
local c=0
if P:solid(x-1,y+1)then c=c+1 end
if P:solid(x+1,y+1)then c=c+1 end

View File

@@ -1,9 +1,9 @@
local N1,N2={1,2},{2,1}
local N3,N4={2,2},{1.5,1.5}
local I1,I2={0.5,2.5},{2.5,0.5}
local I3,I4={1.5,2.5},{2.5,1.5}
local V4={2.5,2.5}
local L1,L2={1,3},{3,1}
local N1,N2={0,1},{1,0}
local N3,N4={1,1},{.5,.5}
local I1,I2={-.5,1.5},{1.5,-.5}
local I3,I4={.5,1.5},{1.5,.5}
local V4={1.5,1.5}
local L1,L2={0,2},{2,0}
local scs={
--Tetramino
{[0]=N1,N2,N3,N3},--Z