static struct options_t options[] = {
{"h", "help"},
-{"O", "optimize"},
-{"S", "swifty"},
-{"o", "output"},
{"b", "bbox"},
{"B", "newbbox"},
{"e", "expand"},
+{"O", "optimize"},
+{"S", "swifty"},
+{"o", "output"},
{"v", "verbose"},
{"V", "version"},
{0,0}
void args_callback_usage(char *name)
{
printf("\n");
- printf("Usage: %s [-OSe] file.swf\n", name);
+ printf("Usage: %s [-OS] file.swf\n", name);
printf("\n");
printf("-h , --help Print help and exit\n");
+ printf("-b , --bbox Show movie bounding box (default)\n");
+ printf("-B , --newbbox Show recalculated (optimized/expanded) bounding box\n");
+ printf("-e , --expand Write out a new file using the recalculated bounding box\n");
+ printf("-O , --optimize Recalculate bounding boxes\n");
printf("-S , --swifty Print out transformed bounding boxes\n");
- printf("-O , --optimize Recalculate bounding boxes and write new file\n");
- printf("-e , --expand Recalculate main bounding box and write new file\n");
- printf("-o , --output <filename> Set output filename to <filename> (for -O/-e)\n");
+ printf("-o , --output <filename> Set output filename to <filename> (for -O)\n");
printf("-v , --verbose Be more verbose\n");
printf("-V , --version Print program version and exit\n");
printf("\n");
static int fontnum = -1;
static SWFFONT**fonts;
static SWF*c_swf;
-static void fontcallback1(U16 id,U8 * name)
+static void fontcallback1(void*self, U16 id,U8 * name)
{ fontnum++;
}
-static void fontcallback2(U16 id,U8 * name)
+static void fontcallback2(void*self, U16 id,U8 * name)
{
fonts[fontnum] = 0;
swf_FontExtract(c_swf,id,&fonts[fontnum]);
if(verbose) printf("Extracting fonts...\n");
c_swf = swf;
fontnum = 0;
- swf_FontEnumerate(swf,&fontcallback1);
+ swf_FontEnumerate(swf,&fontcallback1,0);
fonts = (SWFFONT**)malloc(fontnum*sizeof(SWFFONT*));
memset(fonts, 0, fontnum*sizeof(SWFFONT*));
fontnum = 0;
- swf_FontEnumerate(swf,&fontcallback2);
+ swf_FontEnumerate(swf,&fontcallback2,0);
}
memset(&bounds, 0, sizeof(bounds));