De-nest Construct modes' display code
This commit is contained in:
@@ -60,42 +60,39 @@ return {
|
|||||||
GC.mStr(text.highest:repD(D.maxRankPts+1),63,336)
|
GC.mStr(text.highest:repD(D.maxRankPts+1),63,336)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if not D.showGuide then return end
|
||||||
ply_applyField(P)
|
ply_applyField(P)
|
||||||
local mark=TEXTURE.puzzleMark
|
local mark=TEXTURE.puzzleMark
|
||||||
if D.showGuide then
|
local firstMistake=nil
|
||||||
local firstMistake=nil
|
for y=1,D.rankPts+1 do
|
||||||
for y=1,D.rankPts+1 do
|
for x=1,10 do
|
||||||
for x=1,10 do
|
local texture=targetField[y][x]
|
||||||
local texture=targetField[y][x]
|
-- Missing blocks
|
||||||
-- Missing blocks
|
if not P:solid(x,y) and texture>0 then
|
||||||
if not P:solid(x,y) and texture>0 then
|
-- Missing block under overhang
|
||||||
|
if P:solid(x,y+1) then
|
||||||
-- Missing block under overhang
|
firstMistake=firstMistake or y
|
||||||
if P:solid(x,y+1) then
|
gc_setColor(COLOR.R)
|
||||||
firstMistake=firstMistake or y
|
else
|
||||||
gc_setColor(COLOR.R)
|
gc_setColor(COLOR.Z)
|
||||||
else
|
|
||||||
gc_setColor(COLOR.Z)
|
|
||||||
end
|
|
||||||
|
|
||||||
gc_draw(mark[texture],30*x-30,600-30*y)
|
|
||||||
elseif texture<0 then
|
|
||||||
-- X always gets displayed, color changes based on whether there is a block there
|
|
||||||
if P:solid(x,y) then
|
|
||||||
gc_setColor(COLOR.R)
|
|
||||||
firstMistake=firstMistake or y
|
|
||||||
elseif D.rankPts>y then
|
|
||||||
gc_setColor(COLOR.G)
|
|
||||||
else
|
|
||||||
gc_setColor(COLOR.Z)
|
|
||||||
end
|
|
||||||
gc_draw(mark[texture],30*x-30,600-30*y)
|
|
||||||
end
|
end
|
||||||
|
gc_draw(mark[texture],30*x-30,600-30*y)
|
||||||
|
elseif texture<0 then
|
||||||
|
-- X always gets displayed, color changes based on whether there is a block there
|
||||||
|
if P:solid(x,y) then
|
||||||
|
gc_setColor(COLOR.R)
|
||||||
|
firstMistake=firstMistake or y
|
||||||
|
elseif D.rankPts>y then
|
||||||
|
gc_setColor(COLOR.G)
|
||||||
|
else
|
||||||
|
gc_setColor(COLOR.Z)
|
||||||
|
end
|
||||||
|
gc_draw(mark[texture],30*x-30,600-30*y)
|
||||||
end
|
end
|
||||||
if y==firstMistake then
|
end
|
||||||
gc_setColor(1,0,0,.2*(math.sin(2*TIME())+1))
|
if y==firstMistake then
|
||||||
love.graphics.rectangle("fill",0,600-30*y,300,30)
|
gc_setColor(1,0,0,.2*(math.sin(2*TIME())+1))
|
||||||
end
|
love.graphics.rectangle("fill",0,600-30*y,300,30)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
PLY.draw.cancelField()
|
PLY.draw.cancelField()
|
||||||
|
|||||||
@@ -61,42 +61,39 @@ return {
|
|||||||
GC.mStr(text.highest:repD(D.maxRankPts+1),63,336)
|
GC.mStr(text.highest:repD(D.maxRankPts+1),63,336)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if not D.showGuide then return end
|
||||||
ply_applyField(P)
|
ply_applyField(P)
|
||||||
local mark=TEXTURE.puzzleMark
|
local mark=TEXTURE.puzzleMark
|
||||||
if D.showGuide then
|
local firstMistake=nil
|
||||||
local firstMistake=nil
|
for y=1,D.rankPts+1 do
|
||||||
for y=1,D.rankPts+1 do
|
for x=1,10 do
|
||||||
for x=1,10 do
|
local texture=targetField[y][x]
|
||||||
local texture=targetField[y][x]
|
-- Missing blocks
|
||||||
-- Missing blocks
|
if not P:solid(x,y) and texture>0 then
|
||||||
if not P:solid(x,y) and texture>0 then
|
-- Missing block under overhang
|
||||||
|
if P:solid(x,y+1) then
|
||||||
-- Missing block under overhang
|
firstMistake=firstMistake or y
|
||||||
if P:solid(x,y+1) then
|
gc_setColor(COLOR.R)
|
||||||
firstMistake=firstMistake or y
|
else
|
||||||
gc_setColor(COLOR.R)
|
gc_setColor(COLOR.Z)
|
||||||
else
|
|
||||||
gc_setColor(COLOR.Z)
|
|
||||||
end
|
|
||||||
|
|
||||||
gc_draw(mark[texture],30*x-30,600-30*y)
|
|
||||||
elseif texture<0 then
|
|
||||||
-- X always gets displayed, color changes based on whether there is a block there
|
|
||||||
if P:solid(x,y) then
|
|
||||||
gc_setColor(COLOR.R)
|
|
||||||
firstMistake=firstMistake or y
|
|
||||||
elseif D.rankPts>y then
|
|
||||||
gc_setColor(COLOR.G)
|
|
||||||
else
|
|
||||||
gc_setColor(COLOR.Z)
|
|
||||||
end
|
|
||||||
gc_draw(mark[texture],30*x-30,600-30*y)
|
|
||||||
end
|
end
|
||||||
|
gc_draw(mark[texture],30*x-30,600-30*y)
|
||||||
|
elseif texture<0 then
|
||||||
|
-- X always gets displayed, color changes based on whether there is a block there
|
||||||
|
if P:solid(x,y) then
|
||||||
|
gc_setColor(COLOR.R)
|
||||||
|
firstMistake=firstMistake or y
|
||||||
|
elseif D.rankPts>y then
|
||||||
|
gc_setColor(COLOR.G)
|
||||||
|
else
|
||||||
|
gc_setColor(COLOR.Z)
|
||||||
|
end
|
||||||
|
gc_draw(mark[texture],30*x-30,600-30*y)
|
||||||
end
|
end
|
||||||
if y==firstMistake then
|
end
|
||||||
gc_setColor(1,0,0,.2*(math.sin(2*TIME())+1))
|
if y==firstMistake then
|
||||||
love.graphics.rectangle("fill",0,600-30*y,300,30)
|
gc_setColor(1,0,0,.2*(math.sin(2*TIME())+1))
|
||||||
end
|
love.graphics.rectangle("fill",0,600-30*y,300,30)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
PLY.draw.cancelField()
|
PLY.draw.cancelField()
|
||||||
|
|||||||
@@ -61,42 +61,39 @@ return {
|
|||||||
GC.mStr(text.highest:repD(D.maxRankPts+1),63,336)
|
GC.mStr(text.highest:repD(D.maxRankPts+1),63,336)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if not D.showGuide then return end
|
||||||
ply_applyField(P)
|
ply_applyField(P)
|
||||||
local mark=TEXTURE.puzzleMark
|
local mark=TEXTURE.puzzleMark
|
||||||
if D.showGuide then
|
local firstMistake=nil
|
||||||
local firstMistake=nil
|
for y=1,D.rankPts+1 do
|
||||||
for y=1,D.rankPts+1 do
|
for x=1,10 do
|
||||||
for x=1,10 do
|
local texture=targetField[y][x]
|
||||||
local texture=targetField[y][x]
|
-- Missing blocks
|
||||||
-- Missing blocks
|
if not P:solid(x,y) and texture>0 then
|
||||||
if not P:solid(x,y) and texture>0 then
|
-- Missing block under overhang
|
||||||
|
if P:solid(x,y+1) then
|
||||||
-- Missing block under overhang
|
firstMistake=firstMistake or y
|
||||||
if P:solid(x,y+1) then
|
gc_setColor(COLOR.R)
|
||||||
firstMistake=firstMistake or y
|
else
|
||||||
gc_setColor(COLOR.R)
|
gc_setColor(COLOR.Z)
|
||||||
else
|
|
||||||
gc_setColor(COLOR.Z)
|
|
||||||
end
|
|
||||||
|
|
||||||
gc_draw(mark[texture],30*x-30,600-30*y)
|
|
||||||
elseif texture<0 then
|
|
||||||
-- X always gets displayed, color changes based on whether there is a block there
|
|
||||||
if P:solid(x,y) then
|
|
||||||
gc_setColor(COLOR.R)
|
|
||||||
firstMistake=firstMistake or y
|
|
||||||
elseif D.rankPts>y then
|
|
||||||
gc_setColor(COLOR.G)
|
|
||||||
else
|
|
||||||
gc_setColor(COLOR.Z)
|
|
||||||
end
|
|
||||||
gc_draw(mark[texture],30*x-30,600-30*y)
|
|
||||||
end
|
end
|
||||||
|
gc_draw(mark[texture],30*x-30,600-30*y)
|
||||||
|
elseif texture<0 then
|
||||||
|
-- X always gets displayed, color changes based on whether there is a block there
|
||||||
|
if P:solid(x,y) then
|
||||||
|
gc_setColor(COLOR.R)
|
||||||
|
firstMistake=firstMistake or y
|
||||||
|
elseif D.rankPts>y then
|
||||||
|
gc_setColor(COLOR.G)
|
||||||
|
else
|
||||||
|
gc_setColor(COLOR.Z)
|
||||||
|
end
|
||||||
|
gc_draw(mark[texture],30*x-30,600-30*y)
|
||||||
end
|
end
|
||||||
if y==firstMistake then
|
end
|
||||||
gc_setColor(1,0,0,.2*(math.sin(2*TIME())+1))
|
if y==firstMistake then
|
||||||
love.graphics.rectangle("fill",0,600-30*y,300,30)
|
gc_setColor(1,0,0,.2*(math.sin(2*TIME())+1))
|
||||||
end
|
love.graphics.rectangle("fill",0,600-30*y,300,30)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
PLY.draw.cancelField()
|
PLY.draw.cancelField()
|
||||||
|
|||||||
Reference in New Issue
Block a user