[Scummvm-cvs-logs] scummvm master -> b404455eaf3fc5b88aaad4dac7190a9e5217c3ec

Strangerke Strangerke at scummvm.org
Thu Jun 5 08:06:56 CEST 2014


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
b404455eaf MADS: remove a magic value, use _transparencyIndex


Commit: b404455eaf3fc5b88aaad4dac7190a9e5217c3ec
    https://github.com/scummvm/scummvm/commit/b404455eaf3fc5b88aaad4dac7190a9e5217c3ec
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-06-05T07:48:03+02:00

Commit Message:
MADS: remove a magic value, use _transparencyIndex

Changed paths:
    engines/mads/sprites.cpp



diff --git a/engines/mads/sprites.cpp b/engines/mads/sprites.cpp
index f5c2792..cd35807 100644
--- a/engines/mads/sprites.cpp
+++ b/engines/mads/sprites.cpp
@@ -54,14 +54,14 @@ typedef Common::List<DepthEntry> DepthList;
 
 /*------------------------------------------------------------------------*/
 
-MSprite::MSprite()
-	: MSurface() {
+MSprite::MSprite() : MSurface() {
+	_transparencyIndex = TRANSPARENT_COLOR_INDEX;
 }
 
 MSprite::MSprite(Common::SeekableReadStream *source, const Common::Array<RGB6> &palette,
 		const Common::Rect &bounds)
 	: MSurface(bounds.width(), bounds.height()),
-	  _offset(Common::Point(bounds.left, bounds.top)), _transparencyIndex(0xFF) {
+	  _offset(Common::Point(bounds.left, bounds.top)), _transparencyIndex(TRANSPARENT_COLOR_INDEX) {
 	// Load the sprite data
 	loadSprite(source, palette);
 }
@@ -133,7 +133,7 @@ void MSprite::loadSprite(Common::SeekableReadStream *source,
 }
 
 byte MSprite::getTransparencyIndex() const {
-	return TRANSPARENT_COLOR_INDEX;
+	return _transparencyIndex;
 }
 
 /*------------------------------------------------------------------------*/






More information about the Scummvm-git-logs mailing list