[Scummvm-git-logs] scummvm master -> fa9f8850bfaa8ec7dc9cf750e5861a5bf6140add

sev- noreply at scummvm.org
Wed Mar 2 19:18:28 UTC 2022


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:
e584eddd50 DIRECTOR: Added sanity chack to PACo palette handler
fa9f8850bf VIDEO: Added override keywords


Commit: e584eddd505ac3fda5cc86f1d3bf78f5726a88b8
    https://github.com/scummvm/scummvm/commit/e584eddd505ac3fda5cc86f1d3bf78f5726a88b8
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-03-02T20:15:56+01:00

Commit Message:
DIRECTOR: Added sanity chack to PACo palette handler

Changed paths:
    engines/director/lingo/lingo-builtins.cpp


diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index b3f1ebc049b..18134c9b333 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -2710,6 +2710,12 @@ void LB::b_xPlayAnim(int nargs){
 	// save the current palette
 	byte origPalette[256 * 3];
 	uint16 origCount = g_director->getPaletteColorCount();
+
+	if (origCount > 255) {
+		warning("b_xPlayAnim: too big palette, %d > 256", origCount);
+		origCount = 255;
+	}
+
 	memcpy(origPalette, g_director->getPalette(), origCount * 3);
 
 	Common::Event event;


Commit: fa9f8850bfaa8ec7dc9cf750e5861a5bf6140add
    https://github.com/scummvm/scummvm/commit/fa9f8850bfaa8ec7dc9cf750e5861a5bf6140add
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-03-02T20:18:09+01:00

Commit Message:
VIDEO: Added override keywords

Changed paths:
    video/paco_decoder.h


diff --git a/video/paco_decoder.h b/video/paco_decoder.h
index f594458e458..feca06f946d 100644
--- a/video/paco_decoder.h
+++ b/video/paco_decoder.h
@@ -64,24 +64,24 @@ protected:
 			bool hasAudio, uint16 width, uint16 height);
 		~PacoVideoTrack();
 
-		bool endOfTrack() const;
-		virtual bool isRewindable() const { return false; }
-
-		uint16 getWidth() const;
-		uint16 getHeight() const;
-		Graphics::PixelFormat getPixelFormat() const;
-		int getCurFrame() const { return _curFrame; }
-		int getFrameCount() const { return _frameCount; }
-		virtual const Graphics::Surface *decodeNextFrame();
+		bool endOfTrack() const override;
+		virtual bool isRewindable() const override { return false; }
+
+		uint16 getWidth() const override;
+		uint16 getHeight() const override;
+		Graphics::PixelFormat getPixelFormat() const override;
+		int getCurFrame() const override { return _curFrame; }
+		int getFrameCount() const override { return _frameCount; }
+		virtual const Graphics::Surface *decodeNextFrame() override;
 		virtual void handleFrame(uint32 chunkSize);
 		void handlePalette();
 		const byte *getPalette() const override;
-		bool hasDirtyPalette() const { return _dirtyPalette; }
+		bool hasDirtyPalette() const override { return _dirtyPalette; }
 
 		const Common::List<Common::Rect> *getDirtyRects() const { return &_dirtyRects; }
 		void clearDirtyRects() { _dirtyRects.clear(); }
 		void copyDirtyRectsToBuffer(uint8 *dst, uint pitch);
-		Common::Rational getFrameRate() const { return Common::Rational(_frameRate, 1); }
+		Common::Rational getFrameRate() const override { return Common::Rational(_frameRate, 1); }
 
 
 	protected:




More information about the Scummvm-git-logs mailing list