X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fswfdump.c;h=a74c453f08760a5f5fdb271b90b92f815c3416cf;hb=f72efb3e0b08321fe70a478bf939c312ed7564ce;hp=f6da47abe35d6e528cf0e1c043f4719261696486;hpb=342f82c58b0a333d0d7f6db7d4cd3b8c5e876956;p=swftools.git diff --git a/src/swfdump.c b/src/swfdump.c index f6da47a..a74c453 100644 --- a/src/swfdump.c +++ b/src/swfdump.c @@ -58,6 +58,7 @@ static int showshapes = 0; static int hex = 0; static int used = 0; static int bbox = 0; +static int cumulative = 0; static struct options_t options[] = { {"h", "help"}, @@ -105,6 +106,10 @@ int args_callback_option(char*name,char*val) html = 1; return 0; } + else if(name[0]=='c') { + cumulative = 1; + return 0; + } else if(name[0]=='E') { html = 1; xhtml = 1; @@ -588,9 +593,15 @@ char* fillstyle2str(FILLSTYLE*style) case 0x10: case 0x12: sprintf(stylebuf, "GRADIENT (%d steps)", style->gradient.num); break; - case 0x40: case 0x41: + case 0x40: + /* TODO: display information about that bitmap */ + sprintf(stylebuf, "BITMAPt %d", style->id_bitmap); + /* TODO: show matrix */ + break; + case 0x41: /* TODO: display information about that bitmap */ - sprintf(stylebuf, "BITMAP %d", style->id_bitmap); + sprintf(stylebuf, "BITMAPc %d", style->id_bitmap); + /* TODO: show matrix */ break; default: sprintf(stylebuf, "UNKNOWN[%02x]",style->type); @@ -755,6 +766,7 @@ int main (int argc,char ** argv) char* framelabel = 0; char prefix[128]; int filesize = 0; + int filepos = 0; prefix[0] = 0; memset(idtab,0,65536); @@ -898,10 +910,14 @@ int main (int argc,char ** argv) //tag = tag->next; //continue; } - if(swf_TagGetName(tag)) { - printf("[%03x] %9ld %s%s", tag->id, tag->len, prefix, swf_TagGetName(tag)); + if(!name) { + name = "UNKNOWN TAG"; + } + if(cumulative) { + filepos += tag->len; + printf("[%03x] %9ld %9ld %s%s", tag->id, tag->len, filepos, prefix, swf_TagGetName(tag)); } else { - printf("[%03x] %9ld %sUNKNOWN TAG %03x", tag->id, tag->len, prefix, tag->id); + printf("[%03x] %9ld %s%s", tag->id, tag->len, prefix, swf_TagGetName(tag)); } if(tag->id == ST_FREECHARACTER) {