X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fswfdump.c;h=12c653d04a9584ade0ae9c5843711b8e36b06882;hb=0983af6ba15f2969fa6e0ec068ffe34635ea0c88;hp=0d63c2ce5e9656467702f09cdb90b9458b5a4ac3;hpb=ebb61a567502ebe4b3d3c4b3284964600fecd90b;p=swftools.git diff --git a/src/swfdump.c b/src/swfdump.c index 0d63c2c..12c653d 100644 --- a/src/swfdump.c +++ b/src/swfdump.c @@ -375,9 +375,9 @@ void dumpFont(TAG*tag, char*prefix) swf_FontFree(font); } -SWF swf; -int fontnum = 0; -SWFFONT**fonts; +static SWF swf; +static int fontnum = 0; +static SWFFONT**fonts; void textcallback(void*self, int*glyphs, int*ypos, int nr, int fontid, int fontsize, int startx, int starty, RGBA*color) { @@ -415,10 +415,24 @@ void textcallback(void*self, int*glyphs, int*ypos, int nr, int fontid, int fonts printf("\n"); } -void handleText(TAG*tag) +void handleText(TAG*tag, char*prefix) { printf("\n"); - swf_ParseDefineText(tag,textcallback, 0); + if(placements) { + swf_SetTagPos(tag, 0); + swf_GetU16(tag); + swf_GetRect(tag, 0); + swf_ResetReadBits(tag); + MATRIX m; + swf_GetMatrix(tag, &m); + printf("%s| Matrix\n",prefix); + printf("%s| %5.3f %5.3f %6.2f\n", prefix, m.sx/65536.0, m.r1/65536.0, m.tx/20.0); + printf("%s| %5.3f %5.3f %6.2f\n", prefix, m.r0/65536.0, m.sy/65536.0, m.ty/20.0); + swf_SetTagPos(tag, 0); + } + if(showtext) { + swf_ParseDefineText(tag,textcallback, 0); + } } void handleDefineSound(TAG*tag) @@ -1363,10 +1377,7 @@ int main (int argc,char ** argv) printf(" URL: %s\n", s); } else if(tag->id == ST_DEFINETEXT || tag->id == ST_DEFINETEXT2) { - if(showtext) - handleText(tag); - else - printf("\n"); + handleText(tag, myprefix); } else if(tag->id == ST_DEFINESCALINGGRID) { U16 id = swf_GetU16(tag);