From 9b848dc7bd48d7e1088b4fe2f26ea863aea3396d Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 11 Dec 2015 21:36:40 -0500 Subject: ACCESS: Add a constant for transparency --- engines/access/asurface.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/engines/access/asurface.cpp b/engines/access/asurface.cpp index cb51431657..f693e6a3a0 100644 --- a/engines/access/asurface.cpp +++ b/engines/access/asurface.cpp @@ -28,6 +28,8 @@ namespace Access { +const int TRANSPARENCY = 0; + SpriteResource::SpriteResource(AccessEngine *vm, Resource *res) { Common::Array offsets; int count = res->_stream->readUint16LE(); @@ -64,7 +66,7 @@ SpriteFrame::SpriteFrame(AccessEngine *vm, Common::SeekableReadStream *stream, i // Empty surface byte *data = (byte *)getPixels(); - Common::fill(data, data + w * h, 0); + Common::fill(data, data + w * h, TRANSPARENCY); // Decode the data for (int y = 0; y < h; ++y) { @@ -202,7 +204,7 @@ void ASurface::transBlitFrom(ASurface *src, const Common::Point &destPos) { byte *destP = (byte *)getBasePtr(destPos.x, destPos.y + yp); for (int xp = 0; xp < this->w; ++xp, ++srcP, ++destP) { - if (*srcP != 0) + if (*srcP != TRANSPARENCY) *destP = *srcP; } } -- cgit v1.2.3