From d62cb1554777a36472134a3c5cd013fb60977466 Mon Sep 17 00:00:00 2001 From: Nyeogmi Date: Mon, 19 Dec 2022 18:13:18 -0800 Subject: [PATCH] Use same rule to touch as to elide --- chameleonic.p8 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/chameleonic.p8 b/chameleonic.p8 index 4c5748c..9ec60c5 100644 --- a/chameleonic.p8 +++ b/chameleonic.p8 @@ -986,17 +986,17 @@ function rope:draw(artificial_dx,artificial_dy) end end - --[[ for i=0,#self.ancs+1 do p=self:_anc(i) local c=12 if (p.dirty) c=13 rectfill(p.x-1,p.y-1,p.x+1,p.y+1,c) - print(tostr(p.id)..":"..p.x..","..p.y..","..#p.todo,0,-8+i*8,9) + print(tostr(p.id)..":"..p.x..","..p.y..","..#p.todo,0,i*8,9) end for _,p in pairs(level._anch) do pset(p.x,p.y,11) end + --[[ print("dirty:"..tostr(self.dirty),32,0,9) print("busy:"..tostr(self:busy()),32,7,9) print("state:"..tostr(self.state.name),32,14,9) @@ -1168,6 +1168,7 @@ function rope:_find_needed_anchors(i,busy) end end +local ELIDE_POINT=0.01 function rope:_find_touched_anchors(i) if (i<=0) return false if (#self.ancs