renamed png functions
[swftools.git] / lib / readers / swf.c
index 58e027c..bf95022 100644 (file)
@@ -200,7 +200,7 @@ static gfximage_t* findimage(render_t*r, U16 id)
 
     /*char filename[80];
     sprintf(filename, "bitmap%d.png", id);
-    writePNG(filename, (unsigned char*)img->data, img->width, img->height);
+    png_write(filename, (unsigned char*)img->data, img->width, img->height);
     printf("saving bitmap %d to %s\n", id, filename);*/
 
     return c->data;
@@ -565,7 +565,7 @@ static void placeObject(void*self, int id, void*data)
 
         sprite_t* s = (sprite_t*)c->data;
 
-        map16_t* depths = extractFrame(c->tag->next, p->age % s->frameCount);
+        map16_t* depths = extractFrame(c->tag->next, s->frameCount>0? p->age % s->frameCount : 0);
         map16_enumerate(depths, placeObject, r);
        
         int t;