X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;ds=sidebyside;f=src%2Fflash.c;fp=src%2Fflash.c;h=289dcbb717c95d3de7318f7aedf80adf3a8cdaa3;hb=e1752ee77f9bc5529aa551fe89ded25d879d0119;hp=f24b83450710cc31f3cbe28fc15f3d6b883d0d6b;hpb=1f2bb519aa0b3880fe6487c9a210db667d7ae273;p=swftools.git diff --git a/src/flash.c b/src/flash.c index f24b834..289dcbb 100644 --- a/src/flash.c +++ b/src/flash.c @@ -494,7 +494,28 @@ int spritetagids[] = int getidfromtag(struct swf_tag* tag) { - // todo: check for more than one id + int num = 1; + switch(tag->id) { + case TAGID_PLACEOBJECT2: + num++; + case TAGID_PLACEOBJECT: + reader_init (tag->data, tag->length); + if(num>=2) { + char b = readu8(); + if(!(b&2)) + return -1; + } + readu16(); + return readu16(); + break; + case TAGID_REMOVEOBJECT: + return *(u16*)tag->data; + break; + case TAGID_REMOVEOBJECT2: + return -1; + break; + } + return *(u16*)tag->data; }