- char*name = swf_TagGetName(tag);
- if(!name) {
- fprintf(stderr, "Error: Unknown tag:0x%03x\n", tag->id);
- tag = tag->next;
- continue;
- }
- printf("[%03x] %9ld %s%s", tag->id, tag->len, prefix, swf_TagGetName(tag));
-
- 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_TagGetName(tag))
- printf(" name \"%s\"",swf_TagGetName(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);
+ char*name = swf_GetTagName(tag);
+ if(!name) {
+ fprintf(stderr, "Error: Unknown tag:0x%03x\n", tag->id);
+ tag = tag->next;
+ continue;
+ }
+ printf("[%03x] %9ld %s%s", tag->id, tag->len, prefix, swf_GetTagName(tag));
+
+ 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_TagGetName(tag))
+ printf(" name \"%s\"",swf_TagGetName(tag));