switch(newtag->id)
{
+ case TAGID_DEFINEBUTTONCXFORM: {
+ int t;
+ maponeid(&newtag->data[0]); //button id
+ reader_init (newtag->data, newtag->length);
+ for(t=0;t<4;t++) {
+ int flags;
+ maponeid(&newtag->data[0]);
+ readu16(); //sound id
+ flags = readu8();
+ if(flags&1)
+ readu32(); // in point
+ if(flags&2)
+ readu32(); // out points
+ if(flags&4)
+ readu16(); // loop count
+ if(flags&8)
+ {
+ int npoints = readu8();
+ int s;
+ for(s=0;s<npoints;s++)
+ {
+ readu32();
+ readu16();
+ readu16();
+ }
+ }
+ }
+ } break;
+ case TAGID_DEFINEBUTTONSOUND:
+ maponeid(&newtag->data[0]); //button id
+ break;
case TAGID_PLACEOBJECT:
maponeid(&newtag->data[0]);
break;
readu16(); //char
readu16(); //layer
readMATRIX();
- readCXFORM();
+ if(num>1)
+ readCXFORM();
}
// ...
break;
// printf("%d shape bounds: %d %d %d %d\n",newtag->id,r.x1,r.y1,r.x2,r.y2);
resetbits();
count = readu8();
- if(count == 0xff && num>1)
+ if(count == 0xff && num>1) // defineshape2,3 only
count = readu16();
// printf("%d fillstyles\n", count);
for(t=0;t<count;t++)
pos=getinputpos();
// printf("%02x %02x %02x %02x %02x %02x %02x %02x\n",
// pos[0],pos[1],pos[2],pos[3],pos[4],pos[5],pos[6],pos[7]);
+ resetbits();
type = readu8(); //type
// printf("fillstyle %d is type 0x%02x\n", t, type);
if(type == 0) {
while(file.tags[pos].id != 0) {
struct swf_tag*tag = &file.tags[pos];
+ logf("<debug> relocator: processing tag %02x", tag->id);
map_ids(&file.tags[pos]);
if(is_defining_tag(tag->id))
bitmap[newid] = 1;
slaveids[id] = newid;
- logf("<debug> sprite id %d mapped to %d",id, newid);
+ logf("<debug> relocator: id %d mapped to %d",id, newid);
setidintag(tag, newid);
- logf("<debug> [sprite defs] write tag %02x (%d bytes in body)",
+ logf("<debug> [reloc] write tag %02x (%d bytes in body)",
tag->id, tag->length);
}
pos++;