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

bluegr bluegr at gmail.com
Thu Oct 25 01:57:15 CEST 2018


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:
6a32f07ee8 SCI32: Add support for upscaling VMD videos
e7d23d2cd9 SCI32: Add a game option to upscale videos in PQ:SWAT


Commit: 6a32f07ee8b32a947472220ff47942a332de61fc
    https://github.com/scummvm/scummvm/commit/6a32f07ee8b32a947472220ff47942a332de61fc
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2018-10-25T02:55:35+03:00

Commit Message:
SCI32: Add support for upscaling VMD videos

This feature can be used for the Windows version of KQ7, as well as
PQ:SWAT

Changed paths:
    engines/sci/graphics/video32.cpp
    engines/sci/graphics/video32.h


diff --git a/engines/sci/graphics/video32.cpp b/engines/sci/graphics/video32.cpp
index 8d68c8e..8849e98 100644
--- a/engines/sci/graphics/video32.cpp
+++ b/engines/sci/graphics/video32.cpp
@@ -570,11 +570,26 @@ VMDPlayer::IOStatus VMDPlayer::open(const Common::String &fileName, const OpenFl
 	return kIOError;
 }
 
-void VMDPlayer::init(int16 x, const int16 y, const PlayFlags flags, const int16 boostPercent, const int16 boostStartColor, const int16 boostEndColor) {
+void VMDPlayer::init(int16 x, int16 y, const PlayFlags flags, const int16 boostPercent, const int16 boostStartColor, const int16 boostEndColor) {
+	const int16 screenWidth = g_sci->_gfxFrameout->getScreenWidth();
+	const int16 screenHeight = g_sci->_gfxFrameout->getScreenHeight();
+	const bool upscaleVideos = ConfMan.getBool("enable_video_upscale");
+
+	_doublePixels = (flags & kPlayFlagDoublePixels) || upscaleVideos;
+	_stretchVertical = flags & kPlayFlagStretchVertical;
+
+	const int16 width = _decoder->getWidth() << _doublePixels;
+	const int16 height = _decoder->getHeight() << (_doublePixels || _stretchVertical);
+
 	if (getSciVersion() < SCI_VERSION_3) {
 		x &= ~1;
 	}
-	_doublePixels = flags & kPlayFlagDoublePixels;
+	
+	if (upscaleVideos) {
+		x = (screenWidth - width) / 2;
+		y = (screenHeight - height) / 2;
+	}
+
 	_blackLines = ConfMan.getBool("enable_black_lined_video") && (flags & kPlayFlagBlackLines);
 	// If ScummVM has been configured to disable black lines on video playback,
 	// the boosts need to be ignored too or else the brightness of the video
@@ -587,11 +602,8 @@ void VMDPlayer::init(int16 x, const int16 y, const PlayFlags flags, const int16
 #ifdef SCI_VMD_BLACK_PALETTE
 	_blackPalette = flags & kPlayFlagBlackPalette;
 #endif
-	_stretchVertical = flags & kPlayFlagStretchVertical;
 
-	setDrawRect(x, y,
-				(_decoder->getWidth() << _doublePixels),
-				(_decoder->getHeight() << (_doublePixels || _stretchVertical)));
+	setDrawRect(x, y, width, height);
 }
 
 VMDPlayer::IOStatus VMDPlayer::close() {
diff --git a/engines/sci/graphics/video32.h b/engines/sci/graphics/video32.h
index ce5e4ba..d418c58 100644
--- a/engines/sci/graphics/video32.h
+++ b/engines/sci/graphics/video32.h
@@ -319,7 +319,7 @@ public:
 	 * Initializes the VMD rendering parameters for the current VMD. This must
 	 * be called after `open`.
 	 */
-	void init(const int16 x, const int16 y, const PlayFlags flags, const int16 boostPercent, const int16 boostStartColor, const int16 boostEndColor);
+	void init(int16 x, int16 y, const PlayFlags flags, const int16 boostPercent, const int16 boostStartColor, const int16 boostEndColor);
 
 	/**
 	 * Stops playback and closes the currently open VMD stream.


Commit: e7d23d2cd914fb66cd43bd2628af3fc2bc861e12
    https://github.com/scummvm/scummvm/commit/e7d23d2cd914fb66cd43bd2628af3fc2bc861e12
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2018-10-25T02:55:35+03:00

Commit Message:
SCI32: Add a game option to upscale videos in PQ:SWAT

Requested in enhancement #10713

Changed paths:
    engines/sci/detection_tables.h


diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h
index da24bf9..0174ac4 100644
--- a/engines/sci/detection_tables.h
+++ b/engines/sci/detection_tables.h
@@ -3642,13 +3642,14 @@ static const struct ADGameDescription SciGameDescriptions[] = {
                                GUIO_LINKSPEECHTOSFX, \
                                GUIO_NOASPECT, \
                                GUIO_NOLAUNCHLOAD)
-#define GUIO_PQSWAT      GUIO7(GUIO_NOSUBTITLES, \
+#define GUIO_PQSWAT      GUIO8(GUIO_NOSUBTITLES, \
                                GUIO_NOMIDI, \
                                GUIO_LINKMUSICTOSFX, \
                                GUIO_LINKSPEECHTOSFX, \
                                GUIO_NOASPECT, \
                                GAMEOPTION_ENABLE_BLACK_LINED_VIDEO, \
-                               GAMEOPTION_HQ_VIDEO)
+                               GAMEOPTION_HQ_VIDEO, \
+                               GAMEOPTION_UPSCALE_VIDEOS)
 
 	// Police Quest: SWAT - English DOS/Windows Demo (from jvprat)
 	// Executable scanning reports "2.100.002", VERSION file reports "0.001.200"





More information about the Scummvm-git-logs mailing list