X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Freaders%2Fswf.c;h=598177e59bfe9e94e6b8864c8abcee492080fadc;hb=bdad407fb79c2f7be9f3603694ebdeadc645b52d;hp=98c340ce0637563d7ad354b42a44e7d8db63bdb4;hpb=b5a996ee217aea486eb78860fe7bab2b522f9678;p=swftools.git diff --git a/lib/readers/swf.c b/lib/readers/swf.c index 98c340c..598177e 100644 --- a/lib/readers/swf.c +++ b/lib/readers/swf.c @@ -340,7 +340,8 @@ static map16_t* extractDefinitions(SWF*swf) map16_add_id(map, id, c); } else if(tag->id == ST_DEFINEFONT || - tag->id == ST_DEFINEFONT2) { + tag->id == ST_DEFINEFONT2 || + tag->id == ST_DEFINEFONT3) { character_t*c = rfx_calloc(sizeof(character_t)); SWFFONT*swffont = 0; font_t*font = (font_t*)rfx_calloc(sizeof(font_t)); @@ -355,6 +356,10 @@ static map16_t* extractDefinitions(SWF*swf) } SHAPE2*s2 = swf_ShapeToShape2(swffont->glyph[t].shape); font->glyphs[t] = swfline_to_gfxline(s2->lines, 0, 1); + if(tag->id==ST_DEFINEFONT3) { + gfxmatrix_t m = {1/20.0,0,0, 0,1/20.0,0}; + gfxline_transform(font->glyphs[t], &m); + } swf_Shape2Free(s2); } swf_FontFree(swffont); @@ -560,7 +565,7 @@ static void placeObject(void*self, int id, void*data) sprite_t* s = (sprite_t*)c->data; - map16_t* depths = extractFrame(c->tag->next, p->age % s->frameCount); + map16_t* depths = extractFrame(c->tag->next, s->frameCount>0? p->age % s->frameCount : 0); map16_enumerate(depths, placeObject, r); int t;