From fba07f954ee57839bb73c6481d4dbc52c4afcc5a Mon Sep 17 00:00:00 2001 From: kramm Date: Mon, 16 Jan 2006 17:05:24 +0000 Subject: [PATCH] bugfixes --- src/swfcombine.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/swfcombine.c b/src/swfcombine.c index b1b0d69..72d1147 100644 --- a/src/swfcombine.c +++ b/src/swfcombine.c @@ -687,7 +687,7 @@ TAG* write_master(TAG*tag, SWF*master, SWF*slave, int spriteid, int replaceddefi } if(tag_ok_for_slave(stag->id)) { tag = swf_InsertTag(tag, stag->id); - swf_SetBlock(tag, stag->data, stag->len); + write_changepos(tag, stag, config.movex, config.movey, config.scalex, config.scaley, 0); } stag = stag->next; } @@ -718,17 +718,19 @@ TAG* write_master(TAG*tag, SWF*master, SWF*slave, int spriteid, int replaceddefi swf_SetDefineID(tag, replaceddefine); } else { /* don't write this tag */ - msg(" replacing tag %d id %d with sprite", rtag->id - ,spriteid); + msg(" replacing tag %d ID %d with sprite", rtag->id ,spriteid); } if(flags&FLAGS_WRITESPRITE) { + msg(" writing sprite defines"); tag = write_sprite_defines(tag, slave); + msg(" writing sprite"); tag = write_sprite(tag, slave, spriteid, replaceddefine); } if(flags&FLAGS_WRITESLAVE) { + msg(" writing slave"); outputslave = 1; } } else { @@ -797,8 +799,9 @@ TAG* write_master(TAG*tag, SWF*master, SWF*slave, int spriteid, int replaceddefi while(stag && stag->id!=ST_END) { if(tag_ok_for_slave(stag->id)) { + msg(" [slave] write tag %02x (%d bytes in body), %.2f %.2f", rtag->id, rtag->len, config.movex /20.0, config.movey /20.0); tag = swf_InsertTag(tag, stag->id); - swf_SetBlock(tag, stag->data, stag->len); + write_changepos(tag, stag, config.movex, config.movey, config.scalex, config.scaley, 0); } stag = stag->next; } @@ -955,6 +958,15 @@ void normalcombine(SWF*master, char*slave_name, SWF*slave, SWF*newswf) char * name = swf_GetName(tag); int id = swf_GetPlaceID(tag); + { + SWFPLACEOBJECT obj; + swf_GetPlaceObject(tag, &obj); + swf_PlaceObjectFree(&obj); + if(obj.clipdepth) { + depthbitmap[obj.clipdepth] = 1; + } + } + if(name) msg(" tagid %02x places object %d named \"%s\"", tag->id, id, name); else -- 1.7.10.4