5 Extension module for the rfxswf library.
6 Part of the swftools package.
8 Copyright (c) 2001 Rainer Böhme <rfxswf@reflex-studio.de>
10 This file is distributed under the GPL, see file COPYING for details
14 void swf_DumpHeader(FILE * f,SWF * swf)
16 fprintf(f,"File size\t%u\n",swf->fileSize);
17 fprintf(f,"Movie width\t%u\n",(swf->movieSize.xmax - swf->movieSize.xmin)/20);
18 fprintf(f,"Movie height\t%u\n",(swf->movieSize.ymax - swf->movieSize.ymin)/20);
19 fprintf(f,"Frame rate\t%u.%u\n",swf->frameRate>>8,swf->frameRate&0xff);
20 fprintf(f,"Frame count\t%u\n",swf->frameCount);
23 void swf_DumpMatrix(FILE * f,MATRIX * m)
25 fprintf(f,"[%08x][%08x]\n",m->sx,m->r1);
26 fprintf(f,"[%08x][%08x]\n",m->r0,m->sy);
27 fprintf(f," %08x, %08x\n",m->tx,m->ty);
30 void swf_DumpTag(FILE * f,TAG * t)
33 for (i=0;i<t->len;i++)
34 { if (!(i&15)) fprintf(f,"\n");
35 fprintf(f,"%02x ",t->data[i]);
40 void swf_DumpFont(SWFFONT * font)
42 printf("ID: %d\n", font->id);
43 printf("Version: %d\n", font->version);
44 printf("name: %s\n", font->name);
45 printf("characters: %d\n", font->numchars);
46 printf("layout: %s\n", font->layout?"yes":"no");
49 printf(" ascent:%d\n", font->layout->ascent);
50 printf(" descent:%d\n", font->layout->descent);
51 printf(" leading:%d\n", font->layout->leading);
52 printf(" bounds: (not shown)\n");
53 printf(" kerning records:%d\n", font->layout->kerningcount);
54 printf(" kerning records: (not shown)\n");
58 char* swf_TagGetName(TAG*tag)
68 case ST_FREECHARACTER:
69 return "FREECHARACTER";
73 return "REMOVEOBJECT";
77 return "DEFINEBUTTON";
80 case ST_SETBACKGROUNDCOLOR:
81 return "SETBACKGROUNDCOLOR";
86 case ST_DEFINEEDITTEXT:
87 return "DEFINEEDITTEXT";
90 case ST_DEFINEFONTINFO:
91 return "DEFINEFONTINFO";
96 case ST_DEFINEBUTTONSOUND:
97 return "DEFINEBUTTONSOUND";
98 case ST_SOUNDSTREAMHEAD:
99 return "SOUNDSTREAMHEAD";
100 case ST_SOUNDSTREAMBLOCK:
101 return "SOUNDSTREAMBLOCK";
102 case ST_DEFINEBITSLOSSLESS:
103 return "DEFINEBITSLOSSLESS";
104 case ST_DEFINEBITSJPEG2:
105 return "DEFINEBITSJPEG2";
106 case ST_DEFINESHAPE2:
107 return "DEFINESHAPE2";
108 case ST_DEFINEBUTTONCXFORM:
109 return "DEFINEBUTTONCXFORM";
112 case ST_PLACEOBJECT2:
113 return "PLACEOBJECT2";
114 case ST_REMOVEOBJECT2:
115 return "REMOVEOBJECT2";
116 case ST_DEFINESHAPE3:
117 return "DEFINESHAPE3";
119 return "DEFINETEXT2";
120 case ST_DEFINEBUTTON2:
121 return "DEFINEBUTTON2";
122 case ST_DEFINEBITSJPEG3:
123 return "DEFINEBITSJPEG3";
124 case ST_DEFINEBITSLOSSLESS2:
125 return "DEFINEBITSLOSSLESS2";
126 case ST_DEFINESPRITE:
127 return "DEFINESPRITE";
128 case ST_NAMECHARACTER:
129 return "NAMECHARACTER";
130 case ST_SERIALNUMBER:
131 return "SERIALNUMBER";
132 case ST_GENERATORTEXT:
133 return "GENERATORTEXT";
136 case ST_SOUNDSTREAMHEAD2:
137 return "SOUNDSTREAMHEAD2";
138 case ST_DEFINEMORPHSHAPE:
139 return "DEFINEMORPHSHAPE";
141 return "DEFINEFONT2";
142 case ST_TEMPLATECOMMAND:
143 return "TEMPLATECOMMAND";
146 case ST_EXTERNALFONT:
147 return "EXTERNALFONT";
148 case ST_EXPORTASSETS:
149 return "EXPORTASSETS";
150 case ST_IMPORTASSETS:
151 return "IMPORTASSETS";
152 case ST_ENABLEDEBUGGER:
153 return "ENABLEDEBUGGER";
156 case ST_DOINITACTION:
157 return "DOINITACTION";
158 case ST_DEFINEVIDEOSTREAM:
159 return "DEFINEVIDEOSTREAM";
162 case ST_DEFINEFONTINFO2:
163 return "DEFINEFONTINFO2";