From: Joost P. <jo...@us...> - 2006-09-20 00:08:27
|
Update of /cvsroot/freesynd/freesynd In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv25940 Modified Files: fliplayer.cpp screen.cpp screen.h Log Message: colour 255 shouldn't be transparent in FLC animations; add optional transparency parameter to scale2x fixes a regression in the intro Index: fliplayer.cpp =================================================================== RCS file: /cvsroot/freesynd/freesynd/fliplayer.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- fliplayer.cpp 9 Sep 2006 12:55:44 -0000 1.12 +++ fliplayer.cpp 20 Sep 2006 00:08:18 -0000 1.13 @@ -237,7 +237,7 @@ void FliPlayer::copyCurrentFrameToScreen() { - g_Screen.scale2x(0, 0, fli_info_.width, fli_info_.height, offscreen()); + g_Screen.scale2x(0, 0, fli_info_.width, fli_info_.height, offscreen(), 0, false); } bool FliPlayer::play() Index: screen.h =================================================================== RCS file: /cvsroot/freesynd/freesynd/screen.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- screen.h 9 Sep 2006 12:55:45 -0000 1.13 +++ screen.h 20 Sep 2006 00:08:18 -0000 1.14 @@ -47,7 +47,7 @@ const uint8 * pixels() const { return pixels_; } void blit(int x, int y, int width, int height, const uint8 * pixeldata, bool flipped = false, int stride = 0); - void scale2x(int x, int y, int width, int height, const uint8 * pixeldata, int stride = 0); + void scale2x(int x, int y, int width, int height, const uint8 * pixeldata, int stride = 0, bool transp = true); void vertLine(int x, int y, int length, uint8 color); Index: screen.cpp =================================================================== RCS file: /cvsroot/freesynd/freesynd/screen.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- screen.cpp 9 Sep 2006 12:55:45 -0000 1.11 +++ screen.cpp 20 Sep 2006 00:08:18 -0000 1.12 @@ -89,7 +89,7 @@ } } -void Screen::scale2x(int x, int y, int width, int height, const uint8 * pixeldata, int stride) +void Screen::scale2x(int x, int y, int width, int height, const uint8 * pixeldata, int stride, bool transp) { stride = (stride == 0 ? width : stride); @@ -98,7 +98,7 @@ for (int i = 0; i < width; ++i, d += 2) { uint8 c = *(pixeldata + i); - if (c != 255) { + if (c != 255 || !transp) { *(d + 0) = c; *(d + 1) = c; *(d + 0 + width_) = c; |