dummy checkin, for re-syncing
[swftools.git] / lib / modules / swftools.c
index e7e03f6..16ab87d 100644 (file)
@@ -123,6 +123,7 @@ U16 swf_GetDefineID(TAG * t)
     case ST_DEFINEFONTALIGNZONES: //pseudodefine
     case ST_DEFINEFONTNAME: //pseudodefine
     case ST_DEFINETEXT:
+    case ST_DEFINEBINARY:
     case ST_DEFINETEXT2:
     case ST_DEFINESOUND:
     case ST_DEFINESPRITE:
@@ -635,6 +636,10 @@ void enumerateUsedIDs(TAG * tag, int base, void (*callback)(TAG*, int, void*), v
            }
        } break;
 
+        case ST_DOABC:
+        case ST_RAWABC:
+        break;
+
        case ST_FREECHARACTER: /* unusual tags, which all start with an ID */
        case ST_NAMECHARACTER:
        case ST_DEFINEBINARY:
@@ -686,7 +691,7 @@ void enumerateUsedIDs(TAG * tag, int base, void (*callback)(TAG*, int, void*), v
                /* I never saw recursive sprites, but they are (theoretically) 
                   possible, so better add base here again */
                enumerateUsedIDs(tag2, tag->pos + base, callback, callback_data);
-               swf_DeleteTag(tag2);
+               swf_DeleteTag(0, tag2);
                swf_GetBlock(tag, NULL, len);
            }
        } 
@@ -1268,9 +1273,7 @@ void swf_Optimize(SWF*swf)
                /* we found two identical tags- remap one
                   of them */
                 remap[id] = swf_GetDefineID(tag2);
-                swf_DeleteTag(tag);
-                if(tag == swf->firstTag)
-                    swf->firstTag = next;
+                swf_DeleteTag(swf, tag);
             }
         } else if(swf_isPseudoDefiningTag(tag)) {
             int id = swf_GetDefineID(tag);
@@ -1278,9 +1281,7 @@ void swf_Optimize(SWF*swf)
                 /* if this tag was remapped, we don't
                    need the helper tag anymore. Discard
                    it. */
-                swf_DeleteTag(tag);
-                if(tag == swf->firstTag)
-                    swf->firstTag = next;
+                swf_DeleteTag(swf, tag);
             }
         }