exit(1);
}
close(fi);
+ swf_RemoveJPEGTables(&head);
msg("<verbose> File %s has bounding box %d:%d:%d:%d\n",
slave_filename[t],
head.movieSize.xmin, head.movieSize.ymin,
TAG* write_master(TAG*tag, SWF*master, SWF*slave, int spriteid, int replaceddefine, int flags)
{
int outputslave = 0;
- int frame = 0;
+ int frame = 1;
int sframe = 0;
int slavewritten = 0;
+ int deletedepth = -1;
TAG* rtag = master->firstTag;
TAG* stag = slave->firstTag;
if(rtag->id == ST_SHOWFRAME)
{
frame ++;
+ tag = swf_InsertTag(tag, ST_SHOWFRAME);
+ if(deletedepth>=0) {
+ tag = swf_InsertTag(tag, ST_REMOVEOBJECT2);
+ swf_SetU16(tag, deletedepth);
+ deletedepth=-1;
+ }
+ rtag = rtag->next;
+ continue;
}
if(swf_isDefiningTag(rtag) && (flags&FLAGS_WRITEDEFINES))
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;
{
int id = get_free_id(masterbitmap);
int depth = 65535;
+ deletedepth = 65535;
if(config.clip) {
msg("<fatal> Can't combine --clip and --frame");
}
rtag->id, rtag->len);
tag = swf_InsertTag(tag, rtag->id);
write_changepos(tag, rtag, config.mastermovex, config.mastermovey, config.masterscalex, config.masterscaley, 1);
+
}
}
rtag = rtag->next;
msg("<fatal> Failed to read from %s\n", master_filename);
exit(1);
}
+ swf_RemoveJPEGTables(&master);
msg("<debug> Read %d bytes from masterfile\n", ret);
close(fi);
}
}
msg("<debug> Read %d bytes from slavefile\n", ret);
close(fi);
+ swf_RemoveJPEGTables(&slave);
}
else
{