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

rvanlaar noreply at scummvm.org
Wed Sep 28 14:15:05 UTC 2022


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:
a149939144 TESTBED: Prepare video for QTVR tests


Commit: a149939144cd47647a06de2854dc8ee3860dfe5b
    https://github.com/scummvm/scummvm/commit/a149939144cd47647a06de2854dc8ee3860dfe5b
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2022-09-28T16:14:36+02:00

Commit Message:
TESTBED: Prepare video for QTVR tests

Changed paths:
    engines/testbed/video.cpp


diff --git a/engines/testbed/video.cpp b/engines/testbed/video.cpp
index cdaed16f29e..250990fca40 100644
--- a/engines/testbed/video.cpp
+++ b/engines/testbed/video.cpp
@@ -24,12 +24,21 @@
 #include "video/qt_decoder.h"
 
 #include "testbed/testbed.h"
+#include "graphics/palette.h"
 
 namespace Testbed {
 
 void TestbedEngine::videoTest() {
-	Graphics::PixelFormat pixelformat = Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0);
+	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");
@@ -61,6 +70,7 @@ void TestbedEngine::videoTest() {
 				g_system->copyRectToScreen(conv->getPixels(), conv->pitch, x, y, MIN<uint16>(conv->w, 640), MIN<uint16>(conv->h, 480));
 
 				delete conv;
+				delete frame;
 			}
 
 			Common::Event event;




More information about the Scummvm-git-logs mailing list