- if(tag->id == ST_DEFINESPRITE) {
- sprintf(prefix, " ");
- }
- else if(tag->id == ST_END) {
- *prefix = 0;
- }
- else if(tag->id == ST_DOACTION && action) {
- char myprefix[128];
- ActionTAG*actions;
- sprintf(myprefix, " %s", prefix);
-
- actions = swf_GetActions(tag);
-
- swf_DumpActions(actions, myprefix);
-
-/* what = "URL";
- ActionEnumerateURLs(actions, testfunc);
- what = "String";
- ActionEnumerateStrings(actions, testfunc);
- what = "Target";
- ActionEnumerateTargets(actions, testfunc);*/
- }
- tag = tag->next;
+ if(swf_isDefiningTag(tag)) {
+ U16 id = swf_GetDefineID(tag);
+ printf(" defines id %04x", id);
+ if(idtab[id])
+ fprintf(stderr, "Error: Id %04x is defined more than once.\n", id);
+ idtab[id] = 1;
+ }
+ else if(tag->id == ST_PLACEOBJECT ||
+ tag->id == ST_PLACEOBJECT2) {
+ printf(" places id %04x at depth %04x", swf_GetPlaceID(tag), swf_GetDepth(tag));
+ if(swf_GetName(tag))
+ printf(" name \"%s\"",swf_GetName(tag));
+ }
+ else if(tag->id == ST_REMOVEOBJECT) {
+ printf(" removes id %04x from depth %04x", swf_GetPlaceID(tag), swf_GetDepth(tag));
+ }
+ else if(tag->id == ST_REMOVEOBJECT2) {
+ printf(" removes object from depth %04x", swf_GetDepth(tag));
+ }
+
+ printf("\n");
+
+ if(tag->id == ST_DEFINESPRITE) {
+ sprintf(prefix, " ");
+ }
+ else if(tag->id == ST_END) {
+ *prefix = 0;
+ }
+ else if(tag->id == ST_DOACTION && action) {
+ char myprefix[128];
+ ActionTAG*actions;
+ sprintf(myprefix, " %s", prefix);
+
+ actions = swf_GetActions(tag);
+
+ swf_DumpActions(actions, myprefix);
+
+/* what = "URL";
+ ActionEnumerateURLs(actions, testfunc);
+ what = "String";
+ ActionEnumerateStrings(actions, testfunc);
+ what = "Target";
+ ActionEnumerateTargets(actions, testfunc);*/
+ }
+ tag = tag->next;