diff options
author | truelight <truelight@openttd.org> | 2007-06-13 10:31:40 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2007-06-13 10:31:40 +0000 |
commit | f782a311f8bf371faa026f423719a21c399ed31b (patch) | |
tree | 98a70aa7bd079e3d0a506b21ae4262f53fdd811c /src/spriteloader | |
parent | 5eda486f9336b520e0374a200651b05599030b89 (diff) | |
download | openttd-f782a311f8bf371faa026f423719a21c399ed31b.tar.xz |
(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
Diffstat (limited to 'src/spriteloader')
-rw-r--r-- | src/spriteloader/grf.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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; } |