X-Git-Url: http://git.draconx.ca/gitweb/liblbx.git/blobdiff_plain/d1728478ec0a212e2c601cfa911e24ee1018c83d..242547a147c741c338b22a095a398785280e6f8f:/src/image.c diff --git a/src/image.c b/src/image.c index 83bac21..76fbfed 100644 --- a/src/image.c +++ b/src/image.c @@ -31,9 +31,11 @@ #include "image.h" #define FLAG_OVERWRITE 0x0400 /* Draw each frame on a clean slate (unsure). */ +#define FLAG_BUILDING 0x0800 /* Buildings have this, related to shadow? */ #define FLAG_PALETTE 0x1000 /* Image contains embedded palette. */ #define FLAG_LOOPING 0x2000 /* Loop over all frames in the image (unsure). */ -#define FLAG_ALL (FLAG_OVERWRITE|FLAG_PALETTE|FLAG_LOOPING) + +#define FLAG_ALL (FLAG_OVERWRITE|FLAG_BUILDING|FLAG_PALETTE|FLAG_LOOPING) #define HDR_LEN 12 @@ -289,8 +291,10 @@ unsigned char **lbximg_getframe(struct lbx_image *img, int frame) memset(img->mask[0], 0, img->width * img->height); } else { /* Start over if we are backtracking. */ - if (img->currentframe > frame) + if (img->currentframe > frame) { + memset(img->mask[0], 0, img->width * img->height); img->currentframe = -1; + } /* We must have previous frame decoded to continue. */ if (frame > img->currentframe + 1) {