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

csnover csnover at users.noreply.github.com
Wed Jan 11 18:18:51 CET 2017


This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
7b90f0693a IMAGE: Return correct pixel format for Indeo3
7156a82a64 SCI32: Improve mouse responsiveness
4eecd48c64 SCI32: Remove unnecessary call to unalloc
e00c773d95 SCI32: Remove backslashes from PQ:SWAT extra save game files
63ad0a6715 SCI32: Fix null references in Robot decoder
d951026578 SCI32: Add workarounds for PQ:SWAT


Commit: 7b90f0693ab04dd2d03c097a4a49858f3685a75f
    https://github.com/scummvm/scummvm/commit/7b90f0693ab04dd2d03c097a4a49858f3685a75f
Author: Colin Snover (github.com at zetafleet.com)
Date: 2017-01-11T10:59:55-06:00

Commit Message:
IMAGE: Return correct pixel format for Indeo3

This gives Indeo3 the same behavior as other codecs when
encapsulated in a container that provides bit depth information
(e.g. AVI).

Closes #888.

Changed paths:
    image/codecs/codec.cpp
    image/codecs/indeo3.cpp
    image/codecs/indeo3.h
    video/coktel_decoder.cpp


diff --git a/image/codecs/codec.cpp b/image/codecs/codec.cpp
index 7d6d3cb..048d52d 100644
--- a/image/codecs/codec.cpp
+++ b/image/codecs/codec.cpp
@@ -210,7 +210,7 @@ Codec *createBitmapCodec(uint32 tag, int width, int height, int bitsPerPixel) {
 	case MKTAG('c','v','i','d'):
 		return new CinepakDecoder(bitsPerPixel);
 	case MKTAG('I','V','3','2'):
-		return new Indeo3Decoder(width, height);
+		return new Indeo3Decoder(width, height, bitsPerPixel);
 	case MKTAG('I', 'V', '4', '1'):
 	case MKTAG('I', 'V', '4', '2'):
 		return new Indeo4Decoder(width, height, bitsPerPixel);
diff --git a/image/codecs/indeo3.cpp b/image/codecs/indeo3.cpp
index 560658d..d862d53 100644
--- a/image/codecs/indeo3.cpp
+++ b/image/codecs/indeo3.cpp
@@ -40,11 +40,24 @@
 
 namespace Image {
 
-Indeo3Decoder::Indeo3Decoder(uint16 width, uint16 height) : _ModPred(0), _corrector_type(0) {
+Indeo3Decoder::Indeo3Decoder(uint16 width, uint16 height, uint bitsPerPixel) : _ModPred(0), _corrector_type(0) {
 	_iv_frame[0].the_buf = 0;
 	_iv_frame[1].the_buf = 0;
 
-	_pixelFormat = g_system->getScreenFormat();
+	switch (bitsPerPixel) {
+	case 16:
+		_pixelFormat = Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0);
+		break;
+	case 24:
+		_pixelFormat = Graphics::PixelFormat(4, 8, 8, 8, 0, 16, 8, 0, 0);
+		break;
+	case 32:
+		_pixelFormat = Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0);
+		break;
+	default:
+		error("Invalid color depth");
+		break;
+	}
 
 	_surface = new Graphics::Surface;
 	_surface->create(width, height, _pixelFormat);
diff --git a/image/codecs/indeo3.h b/image/codecs/indeo3.h
index 0ff0265..ad12bb7 100644
--- a/image/codecs/indeo3.h
+++ b/image/codecs/indeo3.h
@@ -46,7 +46,7 @@ namespace Image {
  */
 class Indeo3Decoder : public Codec {
 public:
-	Indeo3Decoder(uint16 width, uint16 height);
+	Indeo3Decoder(uint16 width, uint16 height, uint bitsPerPixel = 24);
 	~Indeo3Decoder();
 
 	const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);
diff --git a/video/coktel_decoder.cpp b/video/coktel_decoder.cpp
index 4e05499..4c9ef67 100644
--- a/video/coktel_decoder.cpp
+++ b/video/coktel_decoder.cpp
@@ -1691,7 +1691,7 @@ bool VMDDecoder::openExternalCodec() {
 		if (_videoCodec == kVideoCodecIndeo3) {
 			_isPaletted = false;
 
-			_codec = new Image::Indeo3Decoder(_width, _height);
+			_codec = new Image::Indeo3Decoder(_width, _height, g_system->getScreenFormat().bpp());
 
 		} else {
 			warning("VMDDecoder::openExternalCodec(): Unknown video codec FourCC \"%s\"",


Commit: 7156a82a64dea2b2836d42b0d5bcffe4841eb40c
    https://github.com/scummvm/scummvm/commit/7156a82a64dea2b2836d42b0d5bcffe4841eb40c
Author: Colin Snover (github.com at zetafleet.com)
Date: 2017-01-11T11:01:38-06:00

Commit Message:
SCI32: Improve mouse responsiveness

This is most noticeable at the beginning of the game during
benchmarking, where the benchmarking loop used to cause the mouse
to get stuck for the duration of the benchmark.

Changed paths:
    engines/sci/graphics/frameout.cpp


diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index 08fdd51..7494030 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -35,6 +35,7 @@
 
 #include "sci/sci.h"
 #include "sci/console.h"
+#include "sci/event.h"
 #include "sci/engine/features.h"
 #include "sci/engine/kernel.h"
 #include "sci/engine/state.h"
@@ -507,6 +508,14 @@ void GfxFrameout::kernelAddPicAt(const reg_t planeObject, const GuiResourceId pi
 #pragma mark Rendering
 
 void GfxFrameout::frameOut(const bool shouldShowBits, const Common::Rect &eraseRect) {
+	// In SSCI, mouse events were received via hardware interrupt, so the mouse
+	// cursor would always get updated whenever the user moved the mouse. Since
+	// we must poll for mouse events instead, poll here so that the mouse gets
+	// updated with its current position at render time. If we do not do this,
+	// the mouse gets "stuck" during loops that do not make calls to kGetEvent,
+	// like transitions and the benchmarking loop at the start of every game.
+	g_sci->getEventManager()->getSciEvent(SCI_EVENT_PEEK);
+
 	RobotDecoder &robotPlayer = g_sci->_video32->getRobotPlayer();
 	const bool robotIsActive = robotPlayer.getStatus() != RobotDecoder::kRobotStatusUninitialized;
 


Commit: 4eecd48c64792c327bb1e5e85f38b75717da0947
    https://github.com/scummvm/scummvm/commit/4eecd48c64792c327bb1e5e85f38b75717da0947
Author: Colin Snover (github.com at zetafleet.com)
Date: 2017-01-11T11:01:38-06:00

Commit Message:
SCI32: Remove unnecessary call to unalloc

When the Resource is deleted, it will deallocate the memory, so
it is not necessary to do that manually.

Changed paths:
    engines/sci/resource_audio.cpp


diff --git a/engines/sci/resource_audio.cpp b/engines/sci/resource_audio.cpp
index bd6eee3..f17a684 100644
--- a/engines/sci/resource_audio.cpp
+++ b/engines/sci/resource_audio.cpp
@@ -987,9 +987,6 @@ void ResourceManager::changeAudioDirectory(const Common::String &path) {
 			if (resource->_status == kResStatusEnqueued) {
 				removeFromLRU(resource);
 			}
-			if (resource->_status != kResStatusNoMalloc) {
-				resource->unalloc();
-			}
 			delete resource;
 			_resMap.erase(resIt);
 		}


Commit: e00c773d9529ba7915d1ef9443df289ef8eb34a5
    https://github.com/scummvm/scummvm/commit/e00c773d9529ba7915d1ef9443df289ef8eb34a5
Author: Colin Snover (github.com at zetafleet.com)
Date: 2017-01-11T11:13:44-06:00

Commit Message:
SCI32: Remove backslashes from PQ:SWAT extra save game files

The original interpreter created subdirectories for each in-game
profile, but copying this behaviour would add a lot of
superfluous complexity to the save game system in ScummVM, and
may not be portable to all supported platforms. Instead, when the
game tries to save its files to a subdirectory, the backslash in
the file name is replaced with an underscore so it can be created
successfully on filesystems where backslash is an illegal file
name character.

This has a side-effect of causing all save games to be displayed
under all profiles, instead of just the ones "belonging" to a
particular profile, but this seems like a reasonable trade-off
given that there is no reason to play this game with more than one
profile.

Changed paths:
    engines/sci/engine/kfile.cpp


diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index 9d74ed1..7bc3c2d 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -427,6 +427,13 @@ reg_t kFileIOOpen(EngineState *s, int argc, reg_t *argv) {
 				return make_reg(0, handle);
 			}
 		}
+	} else if (g_sci->getGameId() == GID_PQSWAT) {
+		// PQSWAT tries to create subdirectories for each game profile
+		for (Common::String::iterator it = name.begin(); it != name.end(); ++it) {
+			if (*it == '\\') {
+				*it = '_';
+			}
+		}
 	}
 
 	// See kMakeSaveCatName


Commit: 63ad0a67153e880d72897221354245920a25514c
    https://github.com/scummvm/scummvm/commit/63ad0a67153e880d72897221354245920a25514c
Author: Colin Snover (github.com at zetafleet.com)
Date: 2017-01-11T11:13:44-06:00

Commit Message:
SCI32: Fix null references in Robot decoder

Failing to reduce the size of the ScreenItem arrays causes other
parts of the decoder (like RobotDecoder::getFrameSize) to try
reading ScreenItems that were already destroyed and nulled out in
the list. (In SSCI, the screen item count was held in a separate
property instead of being part of the screen item list.)

Changed paths:
    engines/sci/video/robot_decoder.cpp


diff --git a/engines/sci/video/robot_decoder.cpp b/engines/sci/video/robot_decoder.cpp
index 296fdf8..0cb4831 100644
--- a/engines/sci/video/robot_decoder.cpp
+++ b/engines/sci/video/robot_decoder.cpp
@@ -1436,6 +1436,14 @@ void RobotDecoder::doVersion5(const bool shouldSubmitAudio) {
 			_screenItemList[i] = nullptr;
 		}
 	}
+
+	if (screenItemCount < oldScreenItemCount) {
+		_screenItemList.resize(screenItemCount);
+		_screenItemX.resize(screenItemCount);
+		_screenItemY.resize(screenItemCount);
+		_originalScreenItemX.resize(screenItemCount);
+		_originalScreenItemY.resize(screenItemCount);
+	}
 }
 
 void RobotDecoder::createCels5(const byte *rawVideoData, const int16 numCels, const bool usePalette) {


Commit: d95102657841a48be16d5593ee67f02f3a2aff7e
    https://github.com/scummvm/scummvm/commit/d95102657841a48be16d5593ee67f02f3a2aff7e
Author: Colin Snover (github.com at zetafleet.com)
Date: 2017-01-11T11:13:45-06:00

Commit Message:
SCI32: Add workarounds for PQ:SWAT

Changed paths:
    engines/sci/engine/workarounds.cpp


diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index d173ee2..1201b9f 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -353,6 +353,8 @@ const SciWorkaroundEntry uninitializedReadWorkarounds[] = {
 	{ GID_PEPPER,        150,   928,  0,           "Narrator", "startText",                       NULL,     0, { WORKAROUND_FAKE,   0 } }, // happens during the non-interactive demo of Pepper
 	{ GID_PQ4,            -1,    25,  0,         "iconToggle", "select",                          NULL,     1, { WORKAROUND_FAKE,   0 } }, // when toggling the icon bar to auto-hide or not
 	{ GID_PQSWAT,         -1, 64950,  0,                 NULL, "handleEvent",                     NULL,     0, { WORKAROUND_FAKE,   0 } }, // Using any menus in-game
+	{ GID_PQSWAT,         -1,    73,  0,   "theLashInterface", "transmit",                        NULL,     0, { WORKAROUND_FAKE,   0 } }, // Clicking the transmit button in LASH
+	{ GID_PQSWAT,       2990,  2990,  0,    "talkToSchienbly", "changeState",                     NULL,     1, { WORKAROUND_FAKE,   0 } }, // When the video of Schienbly talking for the first time ends
 	{ GID_QFG1,           -1,   210,  0,          "Encounter", "init",           sig_uninitread_qfg1_1,     0, { WORKAROUND_FAKE,   0 } }, // qfg1/hq1: going to the brigands hideout
 	{ GID_QFG1VGA,        16,    16,  0,        "lassoFailed", "changeState",                     NULL,    -1, { WORKAROUND_FAKE,   0 } }, // qfg1vga: casting the "fetch" spell in the screen with the flowers, temps 0 and 1 - bug #5309
 	{ GID_QFG1VGA,        -1,   210,  0,          "Encounter", "init",        sig_uninitread_qfg1vga_1,     0, { WORKAROUND_FAKE,   0 } }, // qfg1vga: going to the brigands hideout - bug #5515





More information about the Scummvm-git-logs mailing list