From 748d002a813bbe6309dd22259bdce3278c02b0c8 Mon Sep 17 00:00:00 2001 From: Sam Moore Date: Thu, 25 Sep 2014 20:31:29 +0800 Subject: [PATCH] Script should still work after loadsvg is used This is why I always use "<= 0" not "== 0"... Although if loops were unsigned that still wouldn't help. --- src/debugscript.cpp | 4 ++-- src/eye_of_the_rabbit.script | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 src/eye_of_the_rabbit.script diff --git a/src/debugscript.cpp b/src/debugscript.cpp index 19b51d7..fa32fc2 100644 --- a/src/debugscript.cpp +++ b/src/debugscript.cpp @@ -93,7 +93,7 @@ void DebugScript::ParseAction() bool DebugScript::Execute(View *view, Screen *scr) { - if (currentAction.loops == 0) + if (currentAction.loops <= 0) ParseAction(); switch(currentAction.type) @@ -137,7 +137,7 @@ bool DebugScript::Execute(View *view, Screen *scr) view->ForceRenderDirty(); view->ForceBufferDirty(); view->ForceBoundsDirty(); - currentAction.loops = 0; + currentAction.loops = 1; break; default: Fatal("Unknown script command in queue."); diff --git a/src/eye_of_the_rabbit.script b/src/eye_of_the_rabbit.script new file mode 100644 index 0000000..89ef39d --- /dev/null +++ b/src/eye_of_the_rabbit.script @@ -0,0 +1,11 @@ +# Test how well document scales back to original... +cpu +nolazy +loadsvg svg-tests/rabbit_simple.svg +loop 200 pxzoom 508 305 1 +loadsvg svg-tests/rabbit_simple.svg +loop 200 pxzoom 508 305 1 +loadsvg svg-tests/rabbit_simple.svg +loop 400 pxzoom 508 305 -1 +loop 400 pxzoom 508 305 1 +wait -- 2.20.1