X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Freaders%2Fswf.c;h=bf950226b72dfbb77bfe83aa861901b42cd0bee7;hp=58e027c1080f979387e2ae4efa672de41150fb45;hb=6f78b0ef3998e959ce09c5ef11d46149756b682b;hpb=ca203bf4cf215ea6e5e1713c5b4140f0bb8d93c8 diff --git a/lib/readers/swf.c b/lib/readers/swf.c index 58e027c..bf95022 100644 --- a/lib/readers/swf.c +++ b/lib/readers/swf.c @@ -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;