From f782a311f8bf371faa026f423719a21c399ed31b Mon Sep 17 00:00:00 2001 From: truelight Date: Wed, 13 Jun 2007 10:31:40 +0000 Subject: (svn r10132) -Codechange: split out the last direct video-buffer read access to the blitter-layer -Add: added a new renderer and blitter to make room for some optimized bpp -Fix: fill the alpha channel in the grf-spriteloader --- src/spriteloader/grf.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/spriteloader') diff --git a/src/spriteloader/grf.cpp b/src/spriteloader/grf.cpp index 5fd837b6d..7b72f1ac1 100644 --- a/src/spriteloader/grf.cpp +++ b/src/spriteloader/grf.cpp @@ -95,6 +95,10 @@ bool SpriteLoaderGrf::LoadSprite(SpriteLoader::Sprite *sprite, uint32 file_pos) sprite->data[i].m = dest[i]; } + /* Make sure to mark all transparent pixels transparent on the alpha channel too */ + for (int i = 0; i < sprite->width * sprite->height; i++) + if (sprite->data[i].m != 0) sprite->data[i].a = 0xFF; + free(dest_orig); return true; } -- cgit v1.2.3-70-g09d2