X-Git-Url: https://git.draconx.ca/gitweb/liblbx.git/blobdiff_plain/9bc1032f0879cf57b478adad15a3d1a6c2e34a70..4e74df93acc6594cd8a212c30dc2b429520caef2:/src/image.c diff --git a/src/image.c b/src/image.c index 4657208..98d1a31 100644 --- a/src/image.c +++ b/src/image.c @@ -413,9 +413,9 @@ lbx_img_loadpalette(void *f, const struct lbx_file_ops *fops, } palette[i] = (struct lbx_colour) { - .red = entry[1] << 2, - .green = entry[2] << 2, - .blue = entry[3] << 2, + .red = entry[1] & 0x3f, + .green = entry[2] & 0x3f, + .blue = entry[3] & 0x3f, .active = 1, }; } @@ -451,9 +451,9 @@ lbx_img_getpalette(struct lbx_image *pub, struct lbx_colour palette[static 256]) } palette[img->palstart + i] = (struct lbx_colour){ - .red = entry[1] << 2, - .green = entry[2] << 2, - .blue = entry[3] << 2, + .red = entry[1], + .green = entry[2], + .blue = entry[3], .active = 1, }; }