git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
swf_FontEnumerate now passes a self pointer to the callback function.
[swftools.git]
/
src
/
swfdump.c
diff --git
a/src/swfdump.c
b/src/swfdump.c
index
a7ea3bb
..
3940141
100644
(file)
--- a/
src/swfdump.c
+++ b/
src/swfdump.c
@@
-623,7
+623,7
@@
void handleShape(TAG*tag, char*prefix)
if(t < shape.numfillstyles) {
printf(" | %-2d) %-18.18s", t+1, fillstyle2str(&shape.fillstyles[t]));
} else {
if(t < shape.numfillstyles) {
printf(" | %-2d) %-18.18s", t+1, fillstyle2str(&shape.fillstyles[t]));
} else {
- printf(" ");
+ printf(" ");
}
if(t < shape.numlinestyles) {
printf("%-2d) %s", t+1, linestyle2str(&shape.linestyles[t]));
}
if(t < shape.numlinestyles) {
printf("%-2d) %s", t+1, linestyle2str(&shape.linestyles[t]));
@@
-655,11
+655,11
@@
void handleShape(TAG*tag, char*prefix)
printf("%s |\n", prefix);
}
printf("%s |\n", prefix);
}
-void fontcallback1(U16 id,U8 * name)
+void fontcallback1(void*self, U16 id,U8 * name)
{ fontnum++;
}
{ fontnum++;
}
-void fontcallback2(U16 id,U8 * name)
+void fontcallback2(void*self, U16 id,U8 * name)
{
swf_FontExtract(&swf,id,&fonts[fontnum]);
fontnum++;
{
swf_FontExtract(&swf,id,&fonts[fontnum]);
fontnum++;
@@
-869,10
+869,10
@@
int main (int argc,char ** argv)
if(showtext) {
fontnum = 0;
if(showtext) {
fontnum = 0;
- swf_FontEnumerate(&swf,&fontcallback1);
+ swf_FontEnumerate(&swf,&fontcallback1, 0);
fonts = (SWFFONT**)malloc(fontnum*sizeof(SWFFONT*));
fontnum = 0;
fonts = (SWFFONT**)malloc(fontnum*sizeof(SWFFONT*));
fontnum = 0;
- swf_FontEnumerate(&swf,&fontcallback2);
+ swf_FontEnumerate(&swf,&fontcallback2, 0);
}
while(tag) {
}
while(tag) {
@@
-984,9
+984,9
@@
int main (int argc,char ** argv)
}
}
if(nframe == frame)
}
}
if(nframe == frame)
- printf(" %d (%s)", frame, timestring(frame*(256.0/(swf.frameRate+0.1))));
+ printf(" %d (%s)", frame+1, timestring(frame*(256.0/(swf.frameRate+0.1))));
else
else
- printf(" %d-%d (%s-%s)", frame, nframe,
+ printf(" %d-%d (%s-%s)", frame+1, nframe+1,
timestring(frame*(256.0/(swf.frameRate+0.1))),
timestring(nframe*(256.0/(swf.frameRate+0.1)))
);
timestring(frame*(256.0/(swf.frameRate+0.1))),
timestring(nframe*(256.0/(swf.frameRate+0.1)))
);