[Scummvm-cvs-logs] scummvm master -> 231586d924c03eeb8b9fb825cc87e5dd56aa0500

DrMcCoy drmccoy at drmccoy.de
Sun Jun 30 19:02:18 CEST 2013


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

Summary:
9a88fe8485 GOB: Add hypothetical 32bpp support
231586d924 VIDEO: Add hypothetical 32bpp support


Commit: 9a88fe848576e63b2fa2ab79e087ae34c21bb5d1
    https://github.com/scummvm/scummvm/commit/9a88fe848576e63b2fa2ab79e087ae34c21bb5d1
Author: Sven Hesse (drmccoy at users.sourceforge.net)
Date: 2013-06-30T10:00:05-07:00

Commit Message:
GOB: Add hypothetical 32bpp support

Changed paths:
    engines/gob/surface.cpp



diff --git a/engines/gob/surface.cpp b/engines/gob/surface.cpp
index 6b65eb6..839378a 100644
--- a/engines/gob/surface.cpp
+++ b/engines/gob/surface.cpp
@@ -45,7 +45,7 @@ static void plotPixel(int x, int y, int color, void *data) {
 Pixel::Pixel(byte *vidMem, uint8 bpp, byte *min, byte *max) :
 	_vidMem(vidMem), _bpp(bpp), _min(min), _max(max) {
 
-	assert((_bpp == 1) || (_bpp == 2));
+	assert((_bpp == 1) || (_bpp == 2) || (_bpp == 4));
 	assert(_vidMem >= _min);
 	assert(_vidMem <  _max);
 }
@@ -91,6 +91,8 @@ uint32 Pixel::get() const {
 		return *((byte *) _vidMem);
 	if (_bpp == 2)
 		return *((uint16 *) _vidMem);
+	if (_bpp == 4)
+		return *((uint32 *) _vidMem);
 
 	return 0;
 }
@@ -103,6 +105,8 @@ void Pixel::set(uint32 p) {
 		*((byte *) _vidMem) = (byte) p;
 	if (_bpp == 2)
 		*((uint16 *) _vidMem) = (uint16) p;
+	if (_bpp == 4)
+		*((uint32 *) _vidMem) = (uint32) p;
 }
 
 bool Pixel::isValid() const {
@@ -113,7 +117,7 @@ bool Pixel::isValid() const {
 ConstPixel::ConstPixel(const byte *vidMem, uint8 bpp, const byte *min, const byte *max) :
 	_vidMem(vidMem), _bpp(bpp), _min(min), _max(max) {
 
-	assert((_bpp == 1) || (_bpp == 2));
+	assert((_bpp == 1) || (_bpp == 2) || (_bpp == 4));
 	assert(_vidMem >= _min);
 	assert(_vidMem <  _max);
 }
@@ -159,6 +163,8 @@ uint32 ConstPixel::get() const {
 		return *((const byte *) _vidMem);
 	if (_bpp == 2)
 		return *((const uint16 *) _vidMem);
+	if (_bpp == 4)
+		return *((const uint32 *) _vidMem);
 
 	return 0;
 }
@@ -172,7 +178,7 @@ Surface::Surface(uint16 width, uint16 height, uint8 bpp, byte *vidMem) :
 	_width(width), _height(height), _bpp(bpp), _vidMem(vidMem) {
 
 	assert((_width > 0) && (_height > 0));
-	assert((_bpp == 1) || (_bpp == 2));
+	assert((_bpp == 1) || (_bpp == 2) || (_bpp == 4));
 
 	if (!_vidMem) {
 		_vidMem    = new byte[_bpp * _width * _height];
@@ -187,7 +193,7 @@ Surface::Surface(uint16 width, uint16 height, uint8 bpp, const byte *vidMem) :
 	_width(width), _height(height), _bpp(bpp), _vidMem(0) {
 
 	assert((_width > 0) && (_height > 0));
-	assert((_bpp == 1) || (_bpp == 2));
+	assert((_bpp == 1) || (_bpp == 2) || (_bpp == 4));
 
 	_vidMem    = new byte[_bpp * _width * _height];
 	_ownVidMem = true;
@@ -504,7 +510,7 @@ void Surface::fillRect(uint16 left, uint16 top, uint16 right, uint16 bottom, uin
 		return;
 	}
 
-	assert(_bpp == 2);
+	assert((_bpp == 2) || (_bpp == 4));
 
 	// Otherwise, we have to fill by pixel
 


Commit: 231586d924c03eeb8b9fb825cc87e5dd56aa0500
    https://github.com/scummvm/scummvm/commit/231586d924c03eeb8b9fb825cc87e5dd56aa0500
Author: Sven Hesse (drmccoy at users.sourceforge.net)
Date: 2013-06-30T10:00:17-07:00

Commit Message:
VIDEO: Add hypothetical 32bpp support

Changed paths:
    video/codecs/indeo3.cpp



diff --git a/video/codecs/indeo3.cpp b/video/codecs/indeo3.cpp
index 7bf7fc8..65fb6da 100644
--- a/video/codecs/indeo3.cpp
+++ b/video/codecs/indeo3.cpp
@@ -322,6 +322,8 @@ const Graphics::Surface *Indeo3Decoder::decodeImage(Common::SeekableReadStream *
 						*((uint8 *)rowDest) = (uint8)color;
 					else if (_surface->format.bytesPerPixel == 2)
 						*((uint16 *)rowDest) = (uint16)color;
+					else if (_surface->format.bytesPerPixel == 4)
+						*((uint32 *)rowDest) = (uint32)color;
 				}
 			}
 






More information about the Scummvm-git-logs mailing list