[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog utilities/processor.cpp
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog utilities/processor.cpp |
Date: |
Fri, 16 Feb 2007 09:32:28 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/02/16 09:32:28
Modified files:
. : ChangeLog
utilities : processor.cpp
Log message:
* utilities/processor.cpp: add -f <frames> switch to control
the number of "advance" calls on the top movie.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2371&r2=1.2372
http://cvs.savannah.gnu.org/viewcvs/gnash/utilities/processor.cpp?cvsroot=gnash&r1=1.47&r2=1.48
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2371
retrieving revision 1.2372
diff -u -b -r1.2371 -r1.2372
--- ChangeLog 16 Feb 2007 05:34:20 -0000 1.2371
+++ ChangeLog 16 Feb 2007 09:32:27 -0000 1.2372
@@ -1,3 +1,8 @@
+2007-02-16 Sandro Santilli <address@hidden>
+
+ * utilities/processor.cpp: add -f <frames> switch to control
+ the number of "advance" calls on the top movie.
+
2007-02-15 Sandro Santilli <address@hidden>
* server/parser/movie_definition.h: documented get_frame_size().
Index: utilities/processor.cpp
===================================================================
RCS file: /sources/gnash/gnash/utilities/processor.cpp,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -b -r1.47 -r1.48
--- utilities/processor.cpp 6 Feb 2007 23:06:18 -0000 1.47
+++ utilities/processor.cpp 16 Feb 2007 09:32:27 -0000 1.48
@@ -15,7 +15,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-/* $Id: processor.cpp,v 1.47 2007/02/06 23:06:18 rsavoye Exp $ */
+/* $Id: processor.cpp,v 1.48 2007/02/16 09:32:27 strk Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -55,6 +55,12 @@
// (goto frame < current frame)
static const size_t allowloopbacks = 10;
+// How many times to call 'advance' ?
+// If 0 number of advance is unlimited
+// (see other constraints)
+// TODO: add a command-line switch to control this
+static size_t limit_advances = 0;
+
bool gofast = false; // FIXME: this flag gets set based on
// an XML message written using
// SendCommand(""). This way a movie
@@ -142,7 +148,7 @@
dbglogfile.setVerbosity();
}
- while ((c = getopt (argc, argv, "hwvapr:g")) != -1) {
+ while ((c = getopt (argc, argv, ":hwvapr:gf:")) != -1) {
switch (c) {
case 'h':
usage (argv[0]);
@@ -180,6 +186,16 @@
case 'r':
allowed_end_hits = strtol(optarg, NULL, 0);
break;
+ case 'f':
+ limit_advances = strtol(optarg, NULL, 0);
+ break;
+ case ':':
+ fprintf(stderr, "Missing argument for switch ``%c''\n", optopt);
+ exit(1);
+ case '?':
+ default:
+ fprintf(stderr, "Unknown switch ``%c''\n", optopt);
+ exit(1);
}
}
@@ -292,6 +308,7 @@
size_t loop_back_count=0;
size_t latest_frame=0;
size_t end_hitcount=0;
+ size_t nadvances=0;
// Run through the movie.
for (;;) {
// @@ do we also have to run through all sprite frames
@@ -307,6 +324,12 @@
size_t last_frame = m.get_current_frame();
m.advance(0.010f);
m.display();
+ ++nadvances;
+ if ( limit_advances && nadvances >= limit_advances)
+ {
+ printf("exiting after %d advances\n", nadvances);
+ break;
+ }
size_t curr_frame = m.get_current_frame();
@@ -424,9 +447,13 @@
#if VERBOSE_ACTION
" -va Be verbose about ActionScript\n"
#endif
- " -r <times> Allow the given number of runs.\n"
+ " -r <times> Allow the given number of complete runs.\n"
" Keep looping undefinitely if set to 0.\n"
" Default is 1 (end as soon as the last frame is
reached).\n"
+ " -f <frames> \n"
+ " Allow the given number of frame advancements.\n"
+ " Keep advancing untill any other stop condition\n"
+ " is encountered if set to 0 (default).\n"
, name
);
}
- [Gnash-commit] gnash ChangeLog utilities/processor.cpp,
Sandro Santilli <=