#define DEBUG_ENUMERATE if(0)
-static void enumerateUsedIDs_styles(TAG * tag, void (*callback)(TAG*, int, void*), void*callback_data, int num, int morph)
+void enumerateUsedIDs_styles(TAG * tag, void (*callback)(TAG*, int, void*), void*callback_data, int num, int morph)
{
U16 count;
int t;
for(t=0;t<num;t++) {
int id = GET16(&tag->data[ptr[t]]);
if(slaveids[id]<0) {
- fprintf(stderr, "swf_Relocate: Mapping id never encountered before: %d\n", id);
+ fprintf(stderr, "swf_Relocate: Mapping id (%d) never encountered before in %s\n", id,
+ swf_TagGetName(tag));
return ;
}
id = slaveids[id];
}
}
+RGBA swf_GetSWFBackgroundColor(SWF*swf)
+{
+ TAG*t=swf->firstTag;
+ RGBA color;
+ color.r = color.b = color.g = 0;
+ color.a = 255;
+ while(t) {
+ if(t->id == ST_SETBACKGROUNDCOLOR) {
+ swf_SetTagPos(t, 0);
+ color.r = swf_GetU8(t);
+ color.g = swf_GetU8(t);
+ color.b = swf_GetU8(t);
+ break;
+ }
+ t=t->next;
+ }
+ return color;
+}
+