整理代码,玩家的“录像绘制模式”不再自己决定而由外部传入
This commit is contained in:
@@ -648,12 +648,11 @@ function draw.drawRoyaleInfo(P)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function draw.norm(P)
|
function draw.norm(P,repMode)
|
||||||
local ENV=P.gameEnv
|
local ENV=P.gameEnv
|
||||||
local FBN,FUP=P.fieldBeneath,P.fieldUp
|
local FBN,FUP=P.fieldBeneath,P.fieldUp
|
||||||
local camDY=FBN+FUP
|
local camDY=FBN+FUP
|
||||||
local t=TIME()
|
local t=TIME()
|
||||||
local replaying=GAME.replaying
|
|
||||||
gc_push('transform')
|
gc_push('transform')
|
||||||
gc_translate(P.x,P.y)
|
gc_translate(P.x,P.y)
|
||||||
gc_scale(P.size)
|
gc_scale(P.size)
|
||||||
@@ -693,7 +692,7 @@ function draw.norm(P)
|
|||||||
end
|
end
|
||||||
|
|
||||||
--Draw field
|
--Draw field
|
||||||
drawField(P,replaying)
|
drawField(P,repMode)
|
||||||
|
|
||||||
if ENV.fieldH>20 and ENV.lineNum then
|
if ENV.fieldH>20 and ENV.lineNum then
|
||||||
gc_setColor(1,1,1,ENV.lineNum)
|
gc_setColor(1,1,1,ENV.lineNum)
|
||||||
@@ -732,7 +731,7 @@ function draw.norm(P)
|
|||||||
gc_setColor(1,1,1,ENV.center)
|
gc_setColor(1,1,1,ENV.center)
|
||||||
gc_draw(P.RS.centerTex,centerX,-30*(P.ghoY+C.sc[1])+10)
|
gc_draw(P.RS.centerTex,centerX,-30*(P.ghoY+C.sc[1])+10)
|
||||||
end
|
end
|
||||||
elseif replaying then
|
elseif repMode then
|
||||||
drawGhost.gray(P,nil,.15)
|
drawGhost.gray(P,nil,.15)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -746,7 +745,7 @@ function draw.norm(P)
|
|||||||
gc_setColor(1,1,1,ENV.center)
|
gc_setColor(1,1,1,ENV.center)
|
||||||
gc_draw(P.RS.centerTex,centerX,-30*(P.curY+C.sc[1])+10)
|
gc_draw(P.RS.centerTex,centerX,-30*(P.curY+C.sc[1])+10)
|
||||||
end
|
end
|
||||||
elseif replaying then
|
elseif repMode then
|
||||||
drawBlockShade(P,trans*.3)
|
drawBlockShade(P,trans*.3)
|
||||||
end
|
end
|
||||||
gc_translate(0,dy)
|
gc_translate(0,dy)
|
||||||
@@ -771,7 +770,7 @@ function draw.norm(P)
|
|||||||
gc_stencil(hideBoardStencil[ENV.hideBoard])
|
gc_stencil(hideBoardStencil[ENV.hideBoard])
|
||||||
gc_setStencilTest('equal',1)
|
gc_setStencilTest('equal',1)
|
||||||
local alpha
|
local alpha
|
||||||
if replaying then
|
if repMode then
|
||||||
gc_setLineWidth(18.8)
|
gc_setLineWidth(18.8)
|
||||||
alpha=.7
|
alpha=.7
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -332,9 +332,11 @@ local function drawAtkPointer(x,y)
|
|||||||
gc.circle('line',x,y,30*(1+a),6)
|
gc.circle('line',x,y,30*(1+a),6)
|
||||||
end
|
end
|
||||||
function scene.draw()
|
function scene.draw()
|
||||||
|
local repMode=GAME.replaying
|
||||||
|
|
||||||
--Players
|
--Players
|
||||||
for p=1,#PLAYERS do
|
for p=1,#PLAYERS do
|
||||||
PLAYERS[p]:draw()
|
PLAYERS[p]:draw(repMode)
|
||||||
end
|
end
|
||||||
|
|
||||||
--Virtual keys
|
--Virtual keys
|
||||||
|
|||||||
Reference in New Issue
Block a user