summaryrefslogtreecommitdiff
path: root/src/spriteloader
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-06-13 10:31:40 +0000
committertruelight <truelight@openttd.org>2007-06-13 10:31:40 +0000
commite7221d1fa93229b8a56a84155bf20930c7b5d2aa (patch)
tree98a70aa7bd079e3d0a506b21ae4262f53fdd811c /src/spriteloader
parent97b74fe4f205fc65fbc2e3933fd7cb4d08e8df33 (diff)
downloadopenttd-e7221d1fa93229b8a56a84155bf20930c7b5d2aa.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.cpp4
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;
}