From: kramm Date: Wed, 21 May 2003 18:58:01 +0000 (+0000) Subject: added extra curlies and chopped away the unneccessary digits from the X-Git-Tag: release-0-5-0~221 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=40741ca413f28404d7a3e1c09563caf4f2e59f03 added extra curlies and chopped away the unneccessary digits from the coords for --swifty. --- diff --git a/src/swfbbox.c b/src/swfbbox.c index c358887..1c80cf6 100644 --- a/src/swfbbox.c +++ b/src/swfbbox.c @@ -353,8 +353,10 @@ int main (int argc,char ** argv) swf_FoldAll(&swf); tag = swf.firstTag; - if(swifty) + if(swifty) { + printf("{\n"); printf("{frame %d}\n", frame++); + } while (tag) { if (tag->id == ST_DEFINESHAPE || @@ -400,13 +402,16 @@ int main (int argc,char ** argv) if(!name) { sprintf(buf, "ID%d", id);name = buf; } - printf("{%s {%f %f %f %f %f %f %f %f}}\n", name, + printf("{%s {%.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f}}\n", name, p1.x/20.0, p1.y/20.0, p2.x/20.0, p2.y/20.0, p3.x/20.0, p3.y/20.0, p4.x/20.0, p4.y/20.0); } } tag = tag->next; } + if(swifty) { + printf("}\n"); + } if(optimize) { fi = open(outfilename, O_BINARY | O_RDWR | O_CREAT | O_TRUNC, 0666);