X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fmodules%2Fswftools.c;h=fbc6bb78ac0c90a71ed50cb220c8fe7d7c2f6128;hb=0389433248293338bb20bc0e2a2e62e38cbd0c1b;hp=3aadf8d2c171d325a4ab3bca586b8af4e757c992;hpb=07eb543b62d6e1185a915620934609f38682a62d;p=swftools.git diff --git a/lib/modules/swftools.c b/lib/modules/swftools.c index 3aadf8d..fbc6bb7 100644 --- a/lib/modules/swftools.c +++ b/lib/modules/swftools.c @@ -886,6 +886,22 @@ void swf_RelocateDepth(SWF*swf, char*bitmap) /* TODO * clip depths * sprites */ + if(tag->id == ST_PLACEOBJECT2) { + SWFPLACEOBJECT obj; + swf_GetPlaceObject(tag, &obj); + if(obj.clipdepth) { + int newdepth = obj.clipdepth+nr; + if(newdepth>65535) { + fprintf(stderr, "Couldn't relocate depths: too large values\n"); + newdepth = 65535; + } + obj.clipdepth = newdepth; + swf_ResetTag(tag, ST_PLACEOBJECT2); + swf_SetPlaceObject(tag, &obj); + } + swf_PlaceObjectFree(&obj); + } + int depth = swf_GetDepth(tag); if(depth>=0) { int newdepth = depth+nr;