X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fswfcombine.c;h=6fcbe64ceab7382ec567615dbbb605683870eec4;hb=95fbd8559c7022491a117be76407354db84846a5;hp=78af8395c6f4eb76eddb3a704c6e159e27ce028a;hpb=5f963ea2ff1243b25634bd380bbc0c0fe4c448ec;p=swftools.git diff --git a/src/swfcombine.c b/src/swfcombine.c index 78af839..6fcbe64 100644 --- a/src/swfcombine.c +++ b/src/swfcombine.c @@ -480,13 +480,19 @@ TAG* write_sprite_defines(TAG*tag, SWF*sprite) case ST_SETBACKGROUNDCOLOR: msg(" deliberately ignoring BACKGROUNDCOLOR tag"); break; + case ST_SHOWFRAME: + msg(" deliberately ignoring SHOWFRAME tag"); + break; + case ST_REFLEX: + msg(" deliberately ignoring REFLEX tag"); + break; case 40: case 49: case 51: - msg(" found tag %d. This is a Generator template, isn't it?", tag->id); + msg(" found tag %d. This is a Generator template, isn't it?", rtag->id); break; default: - msg(" funny tag: %d is neither defining nor sprite", tag->id); + msg(" funny tag: %d is neither defining nor sprite", rtag->id); } } } @@ -663,6 +669,7 @@ TAG* write_master(TAG*tag, SWF*master, SWF*slave, int spriteid, int replaceddefi int frame = 0; int sframe = 0; int slavewritten = 0; + int deletedepth = -1; TAG* rtag = master->firstTag; TAG* stag = slave->firstTag; @@ -720,7 +727,7 @@ TAG* write_master(TAG*tag, SWF*master, SWF*slave, int spriteid, int replaceddefi swf_SetBlock(tag, rtag->data, rtag->len); } } - if(frame == slaveframe) + if(frame == slaveframe) /* only happens with config.isframe: put slave at specific frame */ { if(flags&FLAGS_WRITESLAVE) { outputslave = 1; @@ -729,7 +736,8 @@ TAG* write_master(TAG*tag, SWF*master, SWF*slave, int spriteid, int replaceddefi if((flags&FLAGS_WRITESPRITE) && !slavewritten) { int id = get_free_id(masterbitmap); - int depth = 0; + int depth = 65535; + deletedepth = 65536; if(config.clip) { msg(" Can't combine --clip and --frame"); } @@ -770,6 +778,12 @@ TAG* write_master(TAG*tag, SWF*master, SWF*slave, int spriteid, int replaceddefi rtag->id, rtag->len); tag = swf_InsertTag(tag, rtag->id); write_changepos(tag, rtag, config.mastermovex, config.mastermovey, config.masterscalex, config.masterscaley, 1); + + if(rtag->id == ST_SHOWFRAME && deletedepth) { + tag = swf_InsertTag(tag, ST_REMOVEOBJECT2); + swf_SetU16(tag, deletedepth); + deletedepth = -1; + } } } rtag = rtag->next;