X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fswfcombine.c;h=838efe243991b08fc7a1ef6ca2de9f83ad6cac68;hb=1c5d4b4a5f1d36f1cfbb570a1f132ba1184ddabe;hp=0bc978cb98ea05defc00d49c13fcf1885301f871;hpb=4e49c4742a2e430c37940de8793a9bae88a03162;p=swftools.git diff --git a/src/swfcombine.c b/src/swfcombine.c index 0bc978c..838efe2 100644 --- a/src/swfcombine.c +++ b/src/swfcombine.c @@ -497,6 +497,8 @@ void write_changepos(TAG*output, TAG*tag) MATRIX m; U8 flags; swf_GetMatrix(0, &m); + tag->pos = 0; + tag->readBit = 0; flags = swf_GetU8(tag); swf_SetU8(output, flags|4); @@ -506,7 +508,11 @@ void write_changepos(TAG*output, TAG*tag) swf_SetU16(output, swf_GetU16(tag)); //id } // flags & 4 - swf_GetMatrix(tag, &m); + if(flags&4) { + swf_GetMatrix(tag, &m); + } else { + swf_GetMatrix(0, &m); + } matrix_adjust(&m); swf_SetMatrix(output, &m); @@ -562,7 +568,7 @@ TAG* write_sprite(TAG*tag, SWF*sprite, int spriteid, int replaceddefine) if(config.overlay && !config.isframe) { tag = swf_InsertTag(tag, ST_PLACEOBJECT2); swf_SetU8(tag, 2); //flags: character - swf_SetU16(tag, 0); //depth + swf_SetU16(tag, 1); //depth swf_SetU16(tag, replaceddefine); //id } @@ -575,8 +581,8 @@ TAG* write_sprite(TAG*tag, SWF*sprite, int spriteid, int replaceddefine) rtag->id, rtag->len); tag = swf_InsertTag(tag, rtag->id); write_changepos(tag, rtag); - - changedepth(tag, +1); + + changedepth(tag, +2); if(tag->id == ST_SHOWFRAME) {