[Scummvm-cvs-logs] scummvm master -> 2d42ab88b714ba720971482b31378f9c985dfab7

bluegr bluegr at gmail.com
Mon Nov 3 11:42:52 CET 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:
2d42ab88b7 GROOVIE: Fix video transparency in V2 games


Commit: 2d42ab88b714ba720971482b31378f9c985dfab7
    https://github.com/scummvm/scummvm/commit/2d42ab88b714ba720971482b31378f9c985dfab7
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2014-11-03T12:41:37+02:00

Commit Message:
GROOVIE: Fix video transparency in V2 games

Changed paths:
    engines/groovie/roq.cpp



diff --git a/engines/groovie/roq.cpp b/engines/groovie/roq.cpp
index 0c73596..065621e 100644
--- a/engines/groovie/roq.cpp
+++ b/engines/groovie/roq.cpp
@@ -28,6 +28,7 @@
 #include "groovie/groovie.h"
 
 #include "common/debug.h"
+#include "common/debug-channels.h"
 #include "common/rect.h"
 #include "common/substream.h"
 #include "common/textconsole.h"
@@ -63,6 +64,18 @@ ROQPlayer::~ROQPlayer() {
 }
 
 uint16 ROQPlayer::loadInternal() {
+	if (DebugMan.isDebugChannelEnabled(kDebugVideo)) {
+		int8 i;
+		debugN(1, "Groovie::ROQ: New ROQ: bitflags are ");
+		for (i = 15; i >= 0; i--) {
+			debugN(1, "%d", _flags & (1 << i)? 1 : 0);
+			if (i % 4 == 0) {
+				debugN(1, " ");
+			}
+		}
+		debug(1, " <- 0 ");
+	}
+
 	// Begin reading the file
 	debugC(1, kDebugVideo, "Groovie::ROQ: Loading video");
 
@@ -106,13 +119,18 @@ uint16 ROQPlayer::loadInternal() {
 }
 
 void ROQPlayer::buildShowBuf() {
+	uint32 transparent = _alpha ? 0 : _vm->_pixelFormat.RGBToColor(255, 255, 255);
+
 	for (int line = 0; line < _bg->h; line++) {
 		uint32 *out = (uint32 *)_bg->getBasePtr(0, line);
 		uint32 *in = (uint32 *)_currBuf->getBasePtr(0, line / _scaleY);
 
 		for (int x = 0; x < _bg->w; x++) {
 			// Copy a pixel
-			*out++ = *in;
+			if (*in != transparent)
+				*out++ = *in;
+			else
+				out++;
 
 			// Skip to the next pixel
 			if (!(x % _scaleX))






More information about the Scummvm-git-logs mailing list