git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
92013cc
)
added (undocumented) -O parameter.
author
kramm
<kramm>
Sat, 30 Oct 2004 17:06:52 +0000
(17:06 +0000)
committer
kramm
<kramm>
Sat, 30 Oct 2004 17:06:52 +0000
(17:06 +0000)
src/swfc.c
patch
|
blob
|
history
diff --git
a/src/swfc.c
b/src/swfc.c
index
f6157c5
..
6247075
100644
(file)
--- a/
src/swfc.c
+++ b/
src/swfc.c
@@
-40,6
+40,7
@@
static char * filename = 0;
static char * outputname = "output.swf";
static int verbose = 2;
static char * filename = 0;
static char * outputname = "output.swf";
static int verbose = 2;
+static int optimize = 0;
static int override_outputname = 0;
static struct options_t options[] = {
static int override_outputname = 0;
static struct options_t options[] = {
@@
-47,6
+48,7
@@
static struct options_t options[] = {
{"V", "version"},
{"v", "verbose"},
{"o", "output"},
{"V", "version"},
{"v", "verbose"},
{"o", "output"},
+{"O", "optimize"},
{0,0}
};
{0,0}
};
@@
-61,6
+63,10
@@
int args_callback_option(char*name,char*val)
override_outputname = 1;
return 1;
}
override_outputname = 1;
return 1;
}
+ else if(!strcmp(name, "O")) {
+ optimize = 1;
+ return 0;
+ }
else if(!strcmp(name, "v")) {
verbose ++;
return 0;
else if(!strcmp(name, "v")) {
verbose ++;
return 0;
@@
-642,6
+648,10
@@
static void s_endSWF()
tag = swf_InsertTag(tag, ST_END);
swf_OptimizeTagOrder(swf);
tag = swf_InsertTag(tag, ST_END);
swf_OptimizeTagOrder(swf);
+
+ if(optimize) {
+ swf_Optimize(swf);
+ }
if(!(swf->movieSize.xmax-swf->movieSize.xmin) || !(swf->movieSize.ymax-swf->movieSize.ymin)) {
swf->movieSize = currentrect; /* "autocrop" */
if(!(swf->movieSize.xmax-swf->movieSize.xmin) || !(swf->movieSize.ymax-swf->movieSize.ymin)) {
swf->movieSize = currentrect; /* "autocrop" */