# HG changeset patch # User pl # Date 1006292707 0 # Node ID fa8665a91729dad027cba930c28ebb271e05d41e # Parent 3fc9a8b9f178f088e94b4ebb9e2a7f74143a890f subtitles looked bad here (inverted colors sometimes) looked like values wrapped around the byte (not sure of the side effects but subtitles look good now) diff -r 3fc9a8b9f178 -r fa8665a91729 spudec.c --- a/spudec.c Tue Nov 20 20:46:39 2001 +0000 +++ b/spudec.c Tue Nov 20 21:45:07 2001 +0000 @@ -153,7 +153,11 @@ len = this->width - x; /* FIXME have to use palette and alpha map*/ memset(this->image + y * this->width + x, cmap[color], len); - memset(this->aimage + y * this->width + x, alpha[color], len); + if (alpha[color] < cmap[color]) { + memset(this->aimage + y * this->width + x, 1, len); + } else { + memset(this->aimage + y * this->width + x, alpha[color] - cmap[color], len); + } x += len; if (x >= this->width) { next_line(this);