void textcallback(void*self, int*glyphs, int*ypos, int nr, int fontid, int fontsize, int startx, int starty, RGBA*color)
{
int font=-1,t;
- printf(" <%2d glyphs in font %2d, color #%02x%02x%02x%02x> ",nr, fontid, color->r, color->g, color->b, color->a);
+ printf(" <%2d glyphs in font %2d size %d, color #%02x%02x%02x%02x> ",nr, fontid, fontsize, color->r, color->g, color->b, color->a);
for(t=0;t<fontnum;t++)
{
if(fonts[t]->id == fontid) {
FILTER_BLUR*f = (FILTER_BLUR*)filter;
printf("blurx: %f blury: %f\n", f->blurx, f->blury);
printf("passes: %d\n", f->passes);
+ } if(filter->type == FILTERTYPE_GLOW) {
+ FILTER_GLOW*f = (FILTER_GLOW*)filter;
+ printf("color %02x%02x%02x%02x\n", f->rgba.r,f->rgba.g,f->rgba.b,f->rgba.a);
+ printf("blurx: %f blury: %f strength: %f\n", f->blurx, f->blury, f->strength);
+ printf("passes: %d\n", f->passes);
+ printf("flags: %s%s%s\n",
+ f->knockout?"knockout ":"",
+ f->composite?"composite ":"",
+ f->innerglow?"innerglow":"");
} if(filter->type == FILTERTYPE_DROPSHADOW) {
FILTER_DROPSHADOW*f = (FILTER_DROPSHADOW*)filter;
printf("blurx: %f blury: %f\n", f->blurx, f->blury);
}
f = open(filename,O_RDONLY|O_BINARY);
-
if (f<0)
{
char buffer[256];
perror(buffer);
exit(1);
}
+ char header[3];
+ read(f, header, 3);
+ int compressed = (header[0]=='C');
+ close(f);
+ f = open(filename,O_RDONLY|O_BINARY);
+
if FAILED(swf_ReadSWF(f,&swf))
{
fprintf(stderr, "%s is not a valid SWF file or contains errors.\n",filename);
#ifdef HAVE_STAT
fstat(f, &statbuf);
- if(statbuf.st_size != swf.fileSize && !swf.compressed)
+ if(statbuf.st_size != swf.fileSize && !compressed)
dumperror("Real Filesize (%d) doesn't match header Filesize (%d)",
statbuf.st_size, swf.fileSize);
filesize = statbuf.st_size;
close(f);
+ //if(action && swf.fileVersion>=9) {
+ // fprintf(stderr, "Actionscript parsing (-a) not yet supported for SWF versions>=9\n");
+ // action = 0;
+ //}
+
xsize = (swf.movieSize.xmax-swf.movieSize.xmin)/20;
ysize = (swf.movieSize.ymax-swf.movieSize.ymin)/20;
if(xy)
return 0;
}
printf("[HEADER] File version: %d\n", swf.fileVersion);
- if(swf.compressed) {
+ if(compressed) {
printf("[HEADER] File is zlib compressed.");
if(filesize && swf.fileSize)
printf(" Ratio: %02d%%\n", filesize*100/(swf.fileSize));
actions = swf_ActionGet(tag);
swf_DumpActions(actions, myprefix);
}
+ else if(tag->id == ST_DOABC && action) {
+ swf_DissassembleABC(tag);
+ }
else if(tag->id == ST_DOINITACTION && action) {
ActionTAG*actions;
swf_GetU16(tag); // id