fixed z-order problems in poly2bitmap
[swftools.git] / swfs / PreLoaderTemplate.c
index 80f5b12..ed1a3ba 100644 (file)
@@ -31,7 +31,7 @@ int main (int argc,char ** argv)
 { SWF swf;
   RGBA rgb;
   SRECT r;
-  LPSHAPE s;
+  SHAPE* s;
   MATRIX m;
   ActionTAG*a1,*a2,*a3;
   S32 width = 826, height = 1169;
@@ -98,11 +98,15 @@ int main (int argc,char ** argv)
   
   tag = swf_InsertTag(tag,ST_END);
 
-  f = open("PreLoaderTemplate.swf",O_WRONLY|O_CREAT|O_TRUNC, 0644);
+  f = open("PreLoaderTemplate.swf",O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0644);
   if FAILED(swf_WriteSWF(f,&swf)) fprintf(stderr,"WriteSWF() failed.\n");
   close(f);
 
   swf_FreeTags(&swf);                       // cleanup
+
+  swf_ActionFree(a1);
+  swf_ActionFree(a2);
+
   return 0;
 }