git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added flash 8 fill styles
[swftools.git]
/
src
/
swfdump.c
diff --git
a/src/swfdump.c
b/src/swfdump.c
index
8eaeb25
..
4bb5284
100644
(file)
--- a/
src/swfdump.c
+++ b/
src/swfdump.c
@@
-303,7
+303,7
@@
void handleDefineSound(TAG*tag)
{
U16 id = swf_GetU16(tag);
U8 flags = swf_GetU8(tag);
{
U16 id = swf_GetU16(tag);
U8 flags = swf_GetU8(tag);
- int compression = (flags>>4)&3;
+ int compression = (flags>>4)&7;
int rate = (flags>>2)&3;
int bits = flags&2?16:8;
int stereo = flags&1;
int rate = (flags>>2)&3;
int bits = flags&2?16:8;
int stereo = flags&1;
@@
-311,6
+311,8
@@
void handleDefineSound(TAG*tag)
if(compression == 0) printf("Raw ");
else if(compression == 1) printf("ADPCM ");
else if(compression == 2) printf("MP3 ");
if(compression == 0) printf("Raw ");
else if(compression == 1) printf("ADPCM ");
else if(compression == 2) printf("MP3 ");
+ else if(compression == 3) printf("Raw little-endian ");
+ else if(compression == 6) printf("ASAO ");
else printf("? ");
if(rate == 0) printf("5.5Khz ");
if(rate == 1) printf("11Khz ");
else printf("? ");
if(rate == 0) printf("5.5Khz ");
if(rate == 1) printf("11Khz ");
@@
-598,14
+600,14
@@
char* fillstyle2str(FILLSTYLE*style)
case 0x10: case 0x12:
sprintf(stylebuf, "GRADIENT (%d steps)", style->gradient.num);
break;
case 0x10: case 0x12:
sprintf(stylebuf, "GRADIENT (%d steps)", style->gradient.num);
break;
- case 0x40:
+ case 0x40: case 0x42:
/* TODO: display information about that bitmap */
/* TODO: display information about that bitmap */
- sprintf(stylebuf, "BITMAPt %d", style->id_bitmap);
+ sprintf(stylebuf, "BITMAPt%s %d", (style->type&2)?"n":"", style->id_bitmap);
/* TODO: show matrix */
break;
/* TODO: show matrix */
break;
- case 0x41:
+ case 0x41: case 0x43:
/* TODO: display information about that bitmap */
/* TODO: display information about that bitmap */
- sprintf(stylebuf, "BITMAPc %d", style->id_bitmap);
+ sprintf(stylebuf, "BITMAPc%s %d", (style->type&2)?"n":"", style->id_bitmap);
/* TODO: show matrix */
break;
default:
/* TODO: show matrix */
break;
default:
@@
-925,11
+927,6
@@
int main (int argc,char ** argv)
printf("[%03x] %9ld %s%s", tag->id, tag->len, prefix, swf_TagGetName(tag));
}
printf("[%03x] %9ld %s%s", tag->id, tag->len, prefix, swf_TagGetName(tag));
}
- if(tag->id == ST_FREECHARACTER) {
- U16 id = swf_GetU16(tag);
- idtab[id] = 0;
- }
-
if(swf_isDefiningTag(tag)) {
U16 id = swf_GetDefineID(tag);
printf(" defines id %04d", id);
if(swf_isDefiningTag(tag)) {
U16 id = swf_GetDefineID(tag);
printf(" defines id %04d", id);
@@
-1176,6
+1173,13
@@
int main (int argc,char ** argv)
printf("\n");
}
}
printf("\n");
}
}
+
+ if(tag->id == ST_FREECHARACTER) {
+ U16 id;
+ swf_SetTagPos(tag, 0);
+ id = swf_GetU16(tag);
+ idtab[id] = 0;
+ }
if(tag->len && hex) {
hexdumpTag(tag, prefix);
if(tag->len && hex) {
hexdumpTag(tag, prefix);