git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
the advance value is now in twips, not in pixels.
[swftools.git]
/
src
/
swfdump.c
diff --git
a/src/swfdump.c
b/src/swfdump.c
index
05b2865
..
bb7992c
100644
(file)
--- a/
src/swfdump.c
+++ b/
src/swfdump.c
@@
-247,10
+247,10
@@
SWF swf;
int fontnum = 0;
SWFFONT**fonts;
int fontnum = 0;
SWFFONT**fonts;
-void textcallback(int*glyphs, int nr, int fontid)
+void textcallback(void*self, int*glyphs, int*ypos, int nr, int fontid, int fontsize, int startx, int starty, RGBA*color)
{
int font=-1,t;
{
int font=-1,t;
- printf(" <%2d glyphs in font %2d> ",nr, fontid);
+ printf(" <%2d glyphs in font %2d, color #%02x%02x%02x%02x> ",nr, fontid, color->r, color->g, color->b, color->a);
for(t=0;t<fontnum;t++)
{
if(fonts[t]->id == fontid) {
for(t=0;t<fontnum;t++)
{
if(fonts[t]->id == fontid) {
@@
-265,9
+265,9
@@
void textcallback(int*glyphs, int nr, int fontid)
if(font>=0) {
if(glyphs[t] >= fonts[font]->numchars /*glyph is in range*/
|| !fonts[font]->glyph2ascii /* font has ascii<->glyph mapping */
if(font>=0) {
if(glyphs[t] >= fonts[font]->numchars /*glyph is in range*/
|| !fonts[font]->glyph2ascii /* font has ascii<->glyph mapping */
- )
- continue;
- a = fonts[font]->glyph2ascii[glyphs[t]];
+ ) a = glyphs[t];
+ else
+ a = fonts[font]->glyph2ascii[glyphs[t]];
} else {
a = glyphs[t];
}
} else {
a = glyphs[t];
}
@@
-282,7
+282,7
@@
void textcallback(int*glyphs, int nr, int fontid)
void handleText(TAG*tag)
{
printf("\n");
void handleText(TAG*tag)
{
printf("\n");
- swf_FontExtract_DefineTextCallback(-1,0,tag,4, textcallback);
+ swf_ParseDefineText(tag,textcallback, 0);
}
void handleDefineSound(TAG*tag)
}
void handleDefineSound(TAG*tag)
@@
-463,6
+463,7
@@
void handlePlaceObject2(TAG*tag, char*prefix)
char pstr[3][160];
int ppos[3] = {0,0,0};
swf_GetU16(tag); //depth
char pstr[3][160];
int ppos[3] = {0,0,0};
swf_GetU16(tag); //depth
+
//flags&1: move
if(flags&2) swf_GetU16(tag); //id
if(flags&4) {
//flags&1: move
if(flags&2) swf_GetU16(tag); //id
if(flags&4) {
@@
-703,7
+704,7
@@
int main (int argc,char ** argv)
printf(" ");
if(xy&4)
printf(" ");
if(xy&4)
- printf("-r %d", swf.frameRate*100/256);
+ printf("-r %.2f", swf.frameRate/256.0);
if((xy&7) && (xy&8))
printf(" ");
if((xy&7) && (xy&8))
printf(" ");