X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=lib%2Fmodules%2Fswftools.c;h=564825d72ae0bca6400aac3639b35b0a71b86fdc;hb=64a243ac0abed2a4607a1ed7cfd147ea4aade891;hp=0b2a740b0bec212ca85a1f745993cd1f2e52af93;hpb=63238b27c482e8b760d2e6db5568b31a4b2cdb5f;p=swftools.git diff --git a/lib/modules/swftools.c b/lib/modules/swftools.c index 0b2a740..564825d 100644 --- a/lib/modules/swftools.c +++ b/lib/modules/swftools.c @@ -291,6 +291,30 @@ char* swf_GetName(TAG * t) return name; } +/* used in enumerateUsedIDs */ +void swf_GetMorphGradient(TAG * tag, GRADIENT * gradient1, GRADIENT * gradient2) +{ + GRADIENT dummy1; + GRADIENT dummy2; + int t; + if(!gradient1) + gradient1 = &dummy1; + if(!gradient2) + gradient2 = &dummy2; + gradient1->num = + gradient2->num = swf_GetU8(tag); + for(t=0;tnum;t++) + { + int s=t; + if(s>=8) //FIXME + s=7; + gradient1->ratios[t] = swf_GetU8(tag); + swf_GetRGBA(tag, &gradient1->rgba[t]); + gradient2->ratios[t] = swf_GetU8(tag); + swf_GetRGBA(tag, &gradient2->rgba[t]); + } +} + #define DEBUG_ENUMERATE if(0) static void enumerateUsedIDs_styles(TAG * tag, void (*callback)(TAG*, int, void*), void*callback_data, int num, int morph)