X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fmodules%2Fswfrender.c;h=9df996fb5cfdefb51a37ecb3e43e358691aab86f;hb=3d73649bf0e39778e715a07da902d0a858065a43;hp=8cb04c87cd4c4f65a7155a7f2e51b952e7ece551;hpb=4a566feb5f1074db505f5f8a78c7fdf487d94b9a;p=swftools.git diff --git a/lib/modules/swfrender.c b/lib/modules/swfrender.c index 8cb04c8..9df996f 100644 --- a/lib/modules/swfrender.c +++ b/lib/modules/swfrender.c @@ -833,7 +833,7 @@ static void change_state(int y, state_t* state, renderpoint_t*p) layer_t*before=0, *self=0, *after=0; if(DEBUG&2) { - printf("[(%d,%d)/%d/%d-%d]", p->x, y, p->depth, p->shapeline->fillstyle0, p->shapeline->fillstyle1); + printf("[(%f,%d)/%d/%d-%d]", p->x, y, p->depth, p->shapeline->fillstyle0, p->shapeline->fillstyle1); } search_layer(state, p->depth, &before, &self, &after); @@ -1048,7 +1048,7 @@ typedef struct SHAPE2**glyphs; } font_t; -enum CHARACTER_TYPE {none_type, shape_type, image_type, text_type, font_type, sprite_type}; +enum CHARACTER_TYPE {none_type, shape_type, image_type, text_type, edittext_type, font_type, sprite_type}; typedef struct { TAG*tag; @@ -1233,6 +1233,12 @@ static void renderFromTag(RENDERBUF*buf, character_t*idtable, TAG*firstTag, MATR info.buf = buf; swf_ParseDefineText(tag, textcallback, &info); + } else if(idtable[id].type == edittext_type) { + TAG* tag = idtable[id].tag; + U16 flags = swf_GetBits(tag, 16); + if(flags & ET_HASTEXT) { + fprintf(stderr, "edittext not supported yet (id %d)\n", id); + } } else { fprintf(stderr, "Unknown/Unsupported Object Type for id %d: %s\n", id, swf_TagGetName(idtable[id].tag)); } @@ -1247,6 +1253,7 @@ void swf_RenderSWF(RENDERBUF*buf, SWF*swf) int t; RGBA color; + swf_OptimizeTagOrder(swf); swf_FoldAll(swf); character_t* idtable = (character_t*)rfx_calloc(sizeof(character_t)*65536); // id to character mapping @@ -1302,6 +1309,8 @@ void swf_RenderSWF(RENDERBUF*buf, SWF*swf) idtable[id].type = text_type; } else if(tag->id == ST_DEFINESPRITE) { idtable[id].type = sprite_type; + } else if(tag->id == ST_DEFINEEDITTEXT) { + idtable[id].type = edittext_type; } } tag = tag->next;