From: Sam Moore Date: Thu, 25 Sep 2014 12:31:29 +0000 (+0800) Subject: Script should still work after loadsvg is used X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=commitdiff_plain;h=748d002a813bbe6309dd22259bdce3278c02b0c8 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. --- 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