From 5427e564de60c98ca42ed55f08c83ac37d5a83f1 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Thu, 28 Jan 2021 16:05:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=BB=98=E5=88=B6=E9=A1=BA?= =?UTF-8?q?=E5=BA=8F=EF=BC=8Cghost=E7=9A=84=E6=97=8B=E8=BD=AC=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E4=B8=8B=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/player/draw.lua | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/parts/player/draw.lua b/parts/player/draw.lua index 30ff43d4..dd746641 100644 --- a/parts/player/draw.lua +++ b/parts/player/draw.lua @@ -386,30 +386,28 @@ function draw.norm(P) if P.cur and P.waiting==-1 then local curColor=P.cur.color - --Draw ghost + local trans=P.lockDelay/ENV.lock + local centerX=30*(P.curX+P.sc[2])-15 + + --Draw ghost & rotation center if ENV.ghost then drawGhost(P,curColor)end + if ENV.center and ENV.ghost then + gc_setColor(1,1,1,trans*ENV.center) + gc_draw(IMG.spinCenter,centerX,-30*(P.ghoY+P.sc[1])+15,nil,nil,nil,4,4) + end local dy=ENV.smooth and P.ghoY~=P.curY and(P.dropDelay/ENV.drop-1)*30 or 0 gc_translate(0,-dy) - local trans=P.lockDelay/ENV.lock - - --Draw block - if ENV.block then - drawBlockOutline(P,SKIN.curText[curColor],trans) - drawBlock(P,curColor) - end - - --Draw rotate center - local x=30*(P.curX+P.sc[2])-15 - if ENV.center and ENV.block then - gc_setColor(1,1,1,ENV.center) - gc_draw(IMG.spinCenter,x,-30*(P.curY+P.sc[1])+15,nil,nil,nil,4,4) - end + --Draw block & rotation center + if ENV.block then + drawBlockOutline(P,SKIN.curText[curColor],trans) + drawBlock(P,curColor) + end + if ENV.center and ENV.block then + gc_setColor(1,1,1,ENV.center) + gc_draw(IMG.spinCenter,centerX,-30*(P.curY+P.sc[1])+15,nil,nil,nil,4,4) + end gc_translate(0,dy) - if ENV.center and ENV.ghost then - gc_setColor(1,1,1,trans*ENV.center) - gc_draw(IMG.spinCenter,x,-30*(P.ghoY+P.sc[1])+15,nil,nil,nil,4,4) - end end --Draw next preview