[Scummvm-cvs-logs] SF.net SVN: scummvm:[54928] scummvm/trunk

mthreepwood at users.sourceforge.net mthreepwood at users.sourceforge.net
Thu Dec 16 02:41:12 CET 2010


Revision: 54928
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54928&view=rev
Author:   mthreepwood
Date:     2010-12-16 01:41:11 +0000 (Thu, 16 Dec 2010)

Log Message:
-----------
VIDEO: Make VideoDecoder::getPalette() return a const byte pointer

Modified Paths:
--------------
    scummvm/trunk/engines/mohawk/video.cpp
    scummvm/trunk/engines/sci/video/seq_decoder.h
    scummvm/trunk/engines/sword1/animation.cpp
    scummvm/trunk/engines/sword2/animation.cpp
    scummvm/trunk/graphics/video/avi_decoder.h
    scummvm/trunk/graphics/video/coktel_decoder.cpp
    scummvm/trunk/graphics/video/coktel_decoder.h
    scummvm/trunk/graphics/video/dxa_decoder.h
    scummvm/trunk/graphics/video/flic_decoder.h
    scummvm/trunk/graphics/video/qt_decoder.h
    scummvm/trunk/graphics/video/smk_decoder.h
    scummvm/trunk/graphics/video/video_decoder.cpp
    scummvm/trunk/graphics/video/video_decoder.h

Modified: scummvm/trunk/engines/mohawk/video.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/video.cpp	2010-12-16 01:35:13 UTC (rev 54927)
+++ scummvm/trunk/engines/mohawk/video.cpp	2010-12-16 01:41:11 UTC (rev 54928)
@@ -187,7 +187,7 @@
 
 				if (frame->bytesPerPixel == 1 && pixelFormat.bytesPerPixel != 1) {
 					convertedFrame = new Graphics::Surface();
-					byte *palette = _videoStreams[i]->getPalette();
+					const byte *palette = _videoStreams[i]->getPalette();
 					assert(palette);
 
 					convertedFrame->create(frame->w, frame->h, pixelFormat.bytesPerPixel);

Modified: scummvm/trunk/engines/sci/video/seq_decoder.h
===================================================================
--- scummvm/trunk/engines/sci/video/seq_decoder.h	2010-12-16 01:35:13 UTC (rev 54927)
+++ scummvm/trunk/engines/sci/video/seq_decoder.h	2010-12-16 01:41:11 UTC (rev 54928)
@@ -49,7 +49,7 @@
 	uint32 getFrameCount() const { return _frameCount; }
 	const Graphics::Surface *decodeNextFrame();
 	Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); }
-	byte *getPalette() { _dirtyPalette = false; return _palette; }
+	const byte *getPalette() { _dirtyPalette = false; return _palette; }
 	bool hasDirtyPalette() const { return _dirtyPalette; }
   
 protected:

Modified: scummvm/trunk/engines/sword1/animation.cpp
===================================================================
--- scummvm/trunk/engines/sword1/animation.cpp	2010-12-16 01:35:13 UTC (rev 54927)
+++ scummvm/trunk/engines/sword1/animation.cpp	2010-12-16 01:41:11 UTC (rev 54928)
@@ -264,7 +264,7 @@
 				uint32 weight;
 				byte r, g, b;
 				
-				byte *palette = _decoder->getPalette();
+				const byte *palette = _decoder->getPalette();
 
 				for (int i = 0; i < 256; i++) {
 					r = *palette++;

Modified: scummvm/trunk/engines/sword2/animation.cpp
===================================================================
--- scummvm/trunk/engines/sword2/animation.cpp	2010-12-16 01:35:13 UTC (rev 54927)
+++ scummvm/trunk/engines/sword2/animation.cpp	2010-12-16 01:41:11 UTC (rev 54928)
@@ -291,7 +291,7 @@
 				uint32 weight;
 				byte r, g, b;
 				
-				byte *palette = _decoder->getPalette();
+				const byte *palette = _decoder->getPalette();
 
 				for (int i = 0; i < 256; i++) {
 					r = *palette++;

Modified: scummvm/trunk/graphics/video/avi_decoder.h
===================================================================
--- scummvm/trunk/graphics/video/avi_decoder.h	2010-12-16 01:35:13 UTC (rev 54927)
+++ scummvm/trunk/graphics/video/avi_decoder.h	2010-12-16 01:41:11 UTC (rev 54928)
@@ -178,7 +178,7 @@
 	uint32 getElapsedTime() const;
 	const Surface *decodeNextFrame();
 	PixelFormat getPixelFormat() const;
-	byte *getPalette() { _dirtyPalette = false; return _palette; }
+	const byte *getPalette() { _dirtyPalette = false; return _palette; }
 	bool hasDirtyPalette() const { return _dirtyPalette; }
 
 protected:

Modified: scummvm/trunk/graphics/video/coktel_decoder.cpp
===================================================================
--- scummvm/trunk/graphics/video/coktel_decoder.cpp	2010-12-16 01:35:13 UTC (rev 54927)
+++ scummvm/trunk/graphics/video/coktel_decoder.cpp	2010-12-16 01:41:11 UTC (rev 54928)
@@ -257,7 +257,7 @@
 	return _frameCount;
 }
 
-byte *CoktelDecoder::getPalette() {
+const byte *CoktelDecoder::getPalette() {
 	return _palette;
 }
 

Modified: scummvm/trunk/graphics/video/coktel_decoder.h
===================================================================
--- scummvm/trunk/graphics/video/coktel_decoder.h	2010-12-16 01:35:13 UTC (rev 54927)
+++ scummvm/trunk/graphics/video/coktel_decoder.h	2010-12-16 01:41:11 UTC (rev 54928)
@@ -123,7 +123,7 @@
 
 	uint32 getFrameCount() const;
 
-	byte *getPalette();
+	const byte *getPalette();
 	bool  hasDirtyPalette() const;
 
 

Modified: scummvm/trunk/graphics/video/dxa_decoder.h
===================================================================
--- scummvm/trunk/graphics/video/dxa_decoder.h	2010-12-16 01:35:13 UTC (rev 54927)
+++ scummvm/trunk/graphics/video/dxa_decoder.h	2010-12-16 01:41:11 UTC (rev 54928)
@@ -52,7 +52,7 @@
 	uint32 getFrameCount() const { return _frameCount; }
 	const Surface *decodeNextFrame();
 	PixelFormat getPixelFormat() const { return PixelFormat::createFormatCLUT8(); }
-	byte *getPalette() { _dirtyPalette = false; return _palette; }
+	const byte *getPalette() { _dirtyPalette = false; return _palette; }
 	bool hasDirtyPalette() const { return _dirtyPalette; }
 
 	/**

Modified: scummvm/trunk/graphics/video/flic_decoder.h
===================================================================
--- scummvm/trunk/graphics/video/flic_decoder.h	2010-12-16 01:35:13 UTC (rev 54927)
+++ scummvm/trunk/graphics/video/flic_decoder.h	2010-12-16 01:41:11 UTC (rev 54928)
@@ -71,7 +71,7 @@
 	void clearDirtyRects() { _dirtyRects.clear(); }
 	void copyDirtyRectsToBuffer(uint8 *dst, uint pitch);
 
-	byte *getPalette() { _paletteChanged = false; return _palette; }
+	const byte *getPalette() { _paletteChanged = false; return _palette; }
 	bool hasDirtyPalette() const { return _paletteChanged; }
 	void reset();
 

Modified: scummvm/trunk/graphics/video/qt_decoder.h
===================================================================
--- scummvm/trunk/graphics/video/qt_decoder.h	2010-12-16 01:35:13 UTC (rev 54927)
+++ scummvm/trunk/graphics/video/qt_decoder.h	2010-12-16 01:41:11 UTC (rev 54928)
@@ -96,7 +96,7 @@
 	 * Returns the palette of the video
 	 * @return the palette of the video
 	 */
-	byte *getPalette() { _dirtyPalette = false; return _palette; }
+	const byte *getPalette() { _dirtyPalette = false; return _palette; }
 	bool hasDirtyPalette() const { return _dirtyPalette; }
 
 	/**

Modified: scummvm/trunk/graphics/video/smk_decoder.h
===================================================================
--- scummvm/trunk/graphics/video/smk_decoder.h	2010-12-16 01:35:13 UTC (rev 54927)
+++ scummvm/trunk/graphics/video/smk_decoder.h	2010-12-16 01:41:11 UTC (rev 54928)
@@ -67,7 +67,7 @@
 	uint32 getElapsedTime() const;
 	const Surface *decodeNextFrame();
 	PixelFormat getPixelFormat() const { return PixelFormat::createFormatCLUT8(); }
-	byte *getPalette() { _dirtyPalette = false; return _palette; }
+	const byte *getPalette() { _dirtyPalette = false; return _palette; }
 	bool hasDirtyPalette() const { return _dirtyPalette; }
 	virtual void handleAudioTrack(byte track, uint32 chunkSize, uint32 unpackedSize);
 

Modified: scummvm/trunk/graphics/video/video_decoder.cpp
===================================================================
--- scummvm/trunk/graphics/video/video_decoder.cpp	2010-12-16 01:35:13 UTC (rev 54927)
+++ scummvm/trunk/graphics/video/video_decoder.cpp	2010-12-16 01:41:11 UTC (rev 54928)
@@ -50,7 +50,7 @@
 }
 
 void VideoDecoder::setSystemPalette() {
-	byte *vidPalette = getPalette();
+	const byte *vidPalette = getPalette();
 	byte *sysPalette = new byte[256 * 4];
 
 	for (uint16 i = 0; i < 256; i++) {

Modified: scummvm/trunk/graphics/video/video_decoder.h
===================================================================
--- scummvm/trunk/graphics/video/video_decoder.h	2010-12-16 01:35:13 UTC (rev 54927)
+++ scummvm/trunk/graphics/video/video_decoder.h	2010-12-16 01:41:11 UTC (rev 54928)
@@ -119,7 +119,7 @@
 	/**
 	 * Get the palette for the video in RGB format (if 8bpp or less)
 	 */
-	virtual byte *getPalette() { return 0; }
+	virtual const byte *getPalette() { return 0; }
 
 	/**
 	 * Returns if the palette is dirty or not


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list