git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
flash9 tags implementation
[swftools.git]
/
src
/
swfcombine.c
diff --git
a/src/swfcombine.c
b/src/swfcombine.c
index
b1b0d69
..
16589b1
100644
(file)
--- a/
src/swfcombine.c
+++ b/
src/swfcombine.c
@@
-161,6
+161,16
@@
int args_callback_option(char*name,char*val) {
config.scalex = config.scaley = atoi(val)/100.0;
return 1;
}
config.scalex = config.scaley = atoi(val)/100.0;
return 1;
}
+ else if (!strcmp(name, "w"))
+ {
+ config.scalex = atoi(val)/100.0;
+ return 1;
+ }
+ else if (!strcmp(name, "h"))
+ {
+ config.scaley = atoi(val)/100.0;
+ return 1;
+ }
else if (!strcmp(name, "t") || !strcmp(name, "T"))
{
if(master_filename) {
else if (!strcmp(name, "t") || !strcmp(name, "T"))
{
if(master_filename) {
@@
-687,7
+697,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);
}
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;
}
}
stag = stag->next;
}
@@
-718,17
+728,19
@@
TAG* write_master(TAG*tag, SWF*master, SWF*slave, int spriteid, int replaceddefi
swf_SetDefineID(tag, replaceddefine);
} else {
/* don't write this tag */
swf_SetDefineID(tag, replaceddefine);
} else {
/* don't write this tag */
- msg("<verbose> replacing tag %d id %d with sprite", rtag->id
- ,spriteid);
+ msg("<verbose> replacing tag %d ID %d with sprite", rtag->id ,spriteid);
}
if(flags&FLAGS_WRITESPRITE)
{
}
if(flags&FLAGS_WRITESPRITE)
{
+ msg("<debug> writing sprite defines");
tag = write_sprite_defines(tag, slave);
tag = write_sprite_defines(tag, slave);
+ msg("<debug> writing sprite");
tag = write_sprite(tag, slave, spriteid, replaceddefine);
}
if(flags&FLAGS_WRITESLAVE)
{
tag = write_sprite(tag, slave, spriteid, replaceddefine);
}
if(flags&FLAGS_WRITESLAVE)
{
+ msg("<debug> writing slave");
outputslave = 1;
}
} else {
outputslave = 1;
}
} else {
@@
-797,8
+809,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)) {
while(stag && stag->id!=ST_END)
{
if(tag_ok_for_slave(stag->id)) {
+ msg("<debug> [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);
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;
}
}
stag = stag->next;
}
@@
-955,6
+968,15
@@
void normalcombine(SWF*master, char*slave_name, SWF*slave, SWF*newswf)
char * name = swf_GetName(tag);
int id = swf_GetPlaceID(tag);
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("<verbose> tagid %02x places object %d named \"%s\"", tag->id, id, name);
else
if(name)
msg("<verbose> tagid %02x places object %d named \"%s\"", tag->id, id, name);
else