[Scummvm-git-logs] scummvm master -> 00b19320fcacaecde8a957e44f200bbbbfa88302

sev- noreply at scummvm.org
Sat Feb 18 19:59:31 UTC 2023


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:
00b19320fc TESTBED: Properly set palette for the video playback


Commit: 00b19320fcacaecde8a957e44f200bbbbfa88302
    https://github.com/scummvm/scummvm/commit/00b19320fcacaecde8a957e44f200bbbbfa88302
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-02-18T20:59:17+01:00

Commit Message:
TESTBED: Properly set palette for the video playback

Changed paths:
    engines/testbed/video.cpp


diff --git a/engines/testbed/video.cpp b/engines/testbed/video.cpp
index 0be61b48a46..9d19c332f15 100644
--- a/engines/testbed/video.cpp
+++ b/engines/testbed/video.cpp
@@ -22,6 +22,7 @@
 #include "common/events.h"
 #include "engines/util.h"
 #include "video/qt_decoder.h"
+#include "video/qt_data.h"
 
 #include "testbed/testbed.h"
 #include "graphics/palette.h"
@@ -30,15 +31,6 @@ namespace Testbed {
 
 void TestbedEngine::videoTest() {
 	Graphics::PixelFormat pixelformat = Graphics::PixelFormat::createFormatCLUT8();
-	byte palette[768];
-
-	for (int i = 0; i < 256; i++) {
-		palette[i * 3 + 0] = i;
-		palette[i * 3 + 1] = i;
-		palette[i * 3 + 2] = i;
-	}
-
-	g_system->getPaletteManager()->setPalette(palette, 0, 256);
 	initGraphics(640, 480, &pixelformat);
 
 	Common::String path = ConfMan.get("start_movie");
@@ -50,6 +42,13 @@ void TestbedEngine::videoTest() {
 		return;
 	}
 
+	const byte *palette = video->getPalette();
+
+	if (!palette) {
+		palette = Video::quickTimeDefaultPalette256;
+	}
+	g_system->getPaletteManager()->setPalette(palette, 0, 256);
+
 	video->start();
 
 	while (!video->endOfVideo()) {




More information about the Scummvm-git-logs mailing list