From 1dc2d1c2358c3ebf7d9d170ae6fd9277de452c39 Mon Sep 17 00:00:00 2001 From: LDDestroier Date: Fri, 26 Oct 2018 13:55:59 -0400 Subject: [PATCH] Disabled fill animation by default --- pain.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pain.lua b/pain.lua index 6e9ee09..136cad4 100644 --- a/pain.lua +++ b/pain.lua @@ -22,7 +22,7 @@ local useFlattenGIF = true local undoBufferSize = 8 local doFillDiagonal = false -- checks for diagonal dots when using fill tool -local doFillAnimation = true -- whether or not to animate the fill tool +local doFillAnimation = false -- whether or not to animate the fill tool local displayHelp = function() local progname = fs.getName(shell.getRunningProgram()) @@ -1529,7 +1529,7 @@ local fillTool = function(_frame,cx,cy,dot) -- "_frame" is the frame NUMBER for chX, isTrue in pairs(v) do if isTrue and (not touched[chY][chX]) then step = step + 1 - if doFillAnimation then + if doFillAnimation and (step % 2 == 0) then if (chX-paint.scrollX >= 1 and chX-paint.scrollX <= scr_x and chY-paint.scrollY >= 1 and chY-paint.scrollY <= scr_y) then reRenderPAIN() end @@ -1584,7 +1584,7 @@ local fillTool = function(_frame,cx,cy,dot) -- "_frame" is the frame NUMBER doBreak = false end end - if step % 1024 == 0 then -- tries to prevent crash + if step % (doFillAnimation and 256 or 1024) == 0 then -- tries to prevent crash sleep(0) end end