[Scummvm-git-logs] scummvm master -> cfea90a2615ee9a171c5fb1323aa5aeb5e3b3d40
peterkohaut
peterkohaut at users.noreply.github.com
Sat Mar 6 20:05:22 UTC 2021
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:
876a6a47c9 TINSEL: Fixed resolution for NOIR
cfea90a261 TINSEL: Fixed video palette glitch
Commit: 876a6a47c96c12469ee3998c055ba4227fa199ff
https://github.com/scummvm/scummvm/commit/876a6a47c96c12469ee3998c055ba4227fa199ff
Author: Peter Kohaut (peter.kohaut at gmail.com)
Date: 2021-03-06T20:59:24+01:00
Commit Message:
TINSEL: Fixed resolution for NOIR
Changed paths:
engines/tinsel/tinsel.cpp
diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp
index 157b3e60d5..6275420d45 100644
--- a/engines/tinsel/tinsel.cpp
+++ b/engines/tinsel/tinsel.cpp
@@ -1030,7 +1030,7 @@ Common::Error TinselEngine::run() {
initGraphics(width, height, &noirFormat);
- _screenSurface.create(width, height, noirFormat);
+ _screenSurface.create(width, 432, noirFormat);
} else if (getGameID() == GID_DW2) {
#ifndef DW2_EXACT_SIZE
initGraphics(640, 480);
Commit: cfea90a2615ee9a171c5fb1323aa5aeb5e3b3d40
https://github.com/scummvm/scummvm/commit/cfea90a2615ee9a171c5fb1323aa5aeb5e3b3d40
Author: Peter Kohaut (peter.kohaut at gmail.com)
Date: 2021-03-06T21:03:20+01:00
Commit Message:
TINSEL: Fixed video palette glitch
Changed paths:
engines/tinsel/bmv.cpp
diff --git a/engines/tinsel/bmv.cpp b/engines/tinsel/bmv.cpp
index 4b46e7639e..bdf17d346a 100644
--- a/engines/tinsel/bmv.cpp
+++ b/engines/tinsel/bmv.cpp
@@ -540,9 +540,16 @@ void BMVPlayer::ReadHeader() {
}
void BMVPlayer::InitBMV(byte *memoryBuffer) {
- // Clear the two extra 'off-screen' rows
- memset(memoryBuffer, 0, SCREEN_WIDE * bpp);
- memset(memoryBuffer + SCREEN_WIDE * (SCREEN_HIGH + 1) * bpp, 0, SCREEN_WIDE * bpp);
+ if (TinselV3) {
+ // Clear the whole buffer
+ memset(memoryBuffer, 0, SCREEN_WIDE * (SCREEN_HIGH + 2) * bpp);
+ // Reset the pallete as it might be partially updated
+ memset(moviePal, 0, sizeof(moviePal));
+ } else {
+ // Clear the two extra 'off-screen' rows
+ memset(memoryBuffer, 0, SCREEN_WIDE * bpp);
+ memset(memoryBuffer + SCREEN_WIDE * (SCREEN_HIGH + 1) * bpp, 0, SCREEN_WIDE * bpp);
+ }
if (_audioStream) {
_vm->_mixer->stopHandle(_audioHandle);
@@ -1331,21 +1338,21 @@ void BMVPlayer::CopyMovieToScreen() {
return;
}
- int yStart = 0;
- if (!TinselV3) {
+ if (TinselV3) {
+ // Videos in Tinsel V3 are using 432 lines
+ memcpy(_vm->screen().getPixels(), ScreenBeg, SCREEN_WIDTH * SCREEN_HIGH * bpp);
+ } else {
// The movie surface is slightly less high than the output screen (429 rows versus 432).
// Because of this, there's some extra line clearing above and below the displayed area
- yStart = (SCREEN_HEIGHT - SCREEN_HIGH) / 2;
+ int yStart = (SCREEN_HEIGHT - SCREEN_HIGH) / 2;
+ memset(_vm->screen().getPixels(), 0, yStart * SCREEN_WIDTH * bpp);
+ memcpy(_vm->screen().getBasePtr(0, yStart), ScreenBeg, SCREEN_WIDTH * SCREEN_HIGH * bpp);
+ memset(_vm->screen().getBasePtr(0, yStart + SCREEN_HIGH), 0, (SCREEN_HEIGHT - SCREEN_HIGH - yStart) * SCREEN_WIDTH * bpp);
+
+ PalettesToVideoDAC(); // Keep palette up-to-date
}
- memset(_vm->screen().getPixels(), 0, yStart * SCREEN_WIDTH * bpp);
- memcpy(_vm->screen().getBasePtr(0, yStart), ScreenBeg, SCREEN_WIDTH * SCREEN_HIGH * bpp);
- memset(_vm->screen().getBasePtr(0, yStart + SCREEN_HIGH), 0,
- (SCREEN_HEIGHT - SCREEN_HIGH - yStart) * SCREEN_WIDTH * bpp);
BmvDrawText(true);
- if (!TinselV3) {
- PalettesToVideoDAC(); // Keep palette up-to-date
- }
UpdateScreenRect(Common::Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT));
g_system->updateScreen();
BmvDrawText(false);
More information about the Scummvm-git-logs
mailing list