diff --git a/assets/game/puyoPlayer.lua b/assets/game/puyoPlayer.lua index 2315caec..2c4e594b 100644 --- a/assets/game/puyoPlayer.lua +++ b/assets/game/puyoPlayer.lua @@ -1061,11 +1061,12 @@ function PP:render() gc_translate(0,-40) -- Move to up-left corner of first cell local width=SET.fieldW + local connH=self.settings.connH for y=1,#matrix do for x=1,width do local C=matrix[y][x] if C then - skin.drawFieldCell(C,matrix,x,y) + skin.drawFieldCell(C,matrix,x,y,connH) end gc_translate(40,0) end diff --git a/assets/skin/init.lua b/assets/skin/init.lua index 22c3c140..4bdbdfa6 100644 --- a/assets/skin/init.lua +++ b/assets/skin/init.lua @@ -9,7 +9,7 @@ local function _getTime() return SKIN.time end ---@field base string ---@field getTime function ---@field drawFieldBackground fun(fieldW:number) ----@field drawFieldCell fun(C:Techmino.Cell, F:Techmino.RectField, x:number, y:number) +---@field drawFieldCell fun(C:Techmino.Cell, F:Techmino.RectField, x:number, y:number, connH?:number) ---@field drawGhostCell fun(C:Techmino.Cell, B:Techmino.RectPiece, x:number, y:number) ---@field drawHandCellStroke fun(C:Techmino.Cell, B:Techmino.RectPiece, x:number, y:number) ---@field drawHandCell fun(C:Techmino.Cell, B:Techmino.RectPiece, x:number, y:number) diff --git a/assets/skin/puyo_jelly.lua b/assets/skin/puyo_jelly.lua index a5d7a7ff..55b18433 100644 --- a/assets/skin/puyo_jelly.lua +++ b/assets/skin/puyo_jelly.lua @@ -6,20 +6,22 @@ local gc_rectangle,gc_polygon=gc.rectangle,gc.polygon local S={} S.base='puyo_template' -local function drawSide(B,x,y) +local function drawSide(B,x,y,connH) local c=B[y][x].color local t + if connH and y>connH then return end if B[y ] then t=B[y ][x+1] if t and t.connClear and t.color==c then gc_polygon('fill',40,8 ,40,32, 30,35, 30,5 ) end end if B[y ] then t=B[y ][x-1] if t and t.connClear and t.color==c then gc_polygon('fill',0 ,8 ,0 ,32, 10,35, 10,5 ) end end if B[y-1] then t=B[y-1][x ] if t and t.connClear and t.color==c then gc_polygon('fill',8 ,40, 32,40, 35,30 ,5 ,30) end end + if connH and y+1>connH then return end if B[y+1] then t=B[y+1][x ] if t and t.connClear and t.color==c then gc_polygon('fill',8 ,0 , 32,0 , 35,10 ,5 ,10) end end end -function S.drawFieldCell(C,F,x,y) +function S.drawFieldCell(C,F,x,y,connH) if not C.clearing or S.getTime()%100<=50 then gc_setColor(ColorTable[C.color]) gc_rectangle('fill',2,2,36,36,15) - drawSide(F,x,y) + drawSide(F,x,y,connH) end end diff --git a/assets/skin/puyo_template.lua b/assets/skin/puyo_template.lua index e9653c7e..e9dde016 100644 --- a/assets/skin/puyo_template.lua +++ b/assets/skin/puyo_template.lua @@ -12,7 +12,7 @@ function S.drawFieldBackground(fieldW) gc_rectangle('fill',0,0,40*fieldW,-80*fieldW) end -function S.drawFieldCell(C,_,x,y) +function S.drawFieldCell(C,_,x,y,_) if not C.clearing or S.getTime()%100<=50 then gc_setColor(ColorTable[C.color]) gc_rectangle('fill',x,y,36,36,15)