[Scummvm-cvs-logs] scummvm master -> 1c228c488e765fc3e0e19dbcc91b3c40d4712697
csnover
csnover at users.noreply.github.com
Sun Jul 24 18:39:21 CEST 2016
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
b141ececdd SCI32: Fix KQ7 uninitialized read
65ca749f0a SCI32: Improve behaviour of screen transitions
a6370aa688 SCI: Fix memory leaks in ResourceManager
1c228c488e SCI32: Fix bad VMD palettes in GK2
Commit: b141ececdd77e72d3a6ddf2d3ca71de5366cb123
https://github.com/scummvm/scummvm/commit/b141ececdd77e72d3a6ddf2d3ca71de5366cb123
Author: Colin Snover (github.com at zetafleet.com)
Date: 2016-07-24T11:36:48-05:00
Commit Message:
SCI32: Fix KQ7 uninitialized read
Changed paths:
engines/sci/engine/workarounds.cpp
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index 2a2540b..f304f77 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -298,6 +298,7 @@ const SciWorkaroundEntry uninitializedReadWorkarounds[] = {
{ GID_KQ6, -1, 907, 0, "tomato", "doVerb", NULL, 2, { WORKAROUND_FAKE, 0 } }, // when looking at the rotten tomato in the inventory - bug #5331
{ GID_KQ6, -1, 928, 0, NULL, "startText", NULL, 0, { WORKAROUND_FAKE, 0 } }, // gets caused by Text+Audio support (see script patcher)
{ GID_KQ7, -1, 64996, 0, "User", "handleEvent", NULL, 1, { WORKAROUND_FAKE, 0 } }, // called when pushing a keyboard key
+ { GID_KQ7, 2450, 2450, 0, "exBridge", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // called when walking up to the throne in the cave in chapter 2
{ GID_LAURABOW, 37, 0, 0, "CB1", "doit", NULL, 1, { WORKAROUND_FAKE, 0 } }, // when going up the stairs - bug #5084
{ GID_LAURABOW, -1, 967, 0, "myIcon", "cycle", NULL, 1, { WORKAROUND_FAKE, 0 } }, // having any portrait conversation coming up - initial bug #4971
{ GID_LAURABOW2, -1, 24, 0, "gcWin", "open", NULL, 5, { WORKAROUND_FAKE, 0xf } }, // is used as priority for game menu
Commit: 65ca749f0ac3fef8e056f9df7cb7520c38669c16
https://github.com/scummvm/scummvm/commit/65ca749f0ac3fef8e056f9df7cb7520c38669c16
Author: Colin Snover (github.com at zetafleet.com)
Date: 2016-07-24T11:36:48-05:00
Commit Message:
SCI32: Improve behaviour of screen transitions
1. Use the same throttling speed as normal frameouts. The
old throttling speed seemed a bit too slow.
2. Exit the event loop immediately if the engine is supposed to
quit, instead of forcing the user to wait until the transition
has finished before quitting.
Changed paths:
engines/sci/graphics/frameout.cpp
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index 7bb9a4f..a7899b8 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -1516,6 +1516,10 @@ void GfxFrameout::processShowStyles() {
}
}
+ if (g_engine->shouldQuit()) {
+ return;
+ }
+
if (doFrameOut) {
frameOut(true);
@@ -1523,9 +1527,7 @@ void GfxFrameout::processShowStyles() {
// fast, but the throttle value is arbitrary. Someone on
// real hardware probably needs to test what the actual
// speed of these transitions should be
- EngineState *state = g_sci->getEngineState();
- state->speedThrottler(33);
- state->_throttleTrigger = true;
+ throttle();
}
} while(continueProcessing && doFrameOut);
}
Commit: a6370aa68847bf110e6fd3d8a41114ec79c8456a
https://github.com/scummvm/scummvm/commit/a6370aa68847bf110e6fd3d8a41114ec79c8456a
Author: Colin Snover (github.com at zetafleet.com)
Date: 2016-07-24T11:36:48-05:00
Commit Message:
SCI: Fix memory leaks in ResourceManager
Changed paths:
engines/sci/resource.cpp
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index 3e50fc1..48278e3 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -1367,6 +1367,7 @@ void ResourceManager::processPatch(ResourceSource *source, ResourceType resource
if (!file->open(source->getLocationName())) {
warning("ResourceManager::processPatch(): failed to open %s", source->getLocationName().c_str());
delete source;
+ delete file;
return;
}
fileStream = file;
@@ -1376,6 +1377,7 @@ void ResourceManager::processPatch(ResourceSource *source, ResourceType resource
if (fsize < 3) {
debug("Patching %s failed - file too small", source->getLocationName().c_str());
delete source;
+ delete fileStream;
return;
}
Commit: 1c228c488e765fc3e0e19dbcc91b3c40d4712697
https://github.com/scummvm/scummvm/commit/1c228c488e765fc3e0e19dbcc91b3c40d4712697
Author: Colin Snover (github.com at zetafleet.com)
Date: 2016-07-24T11:36:48-05:00
Commit Message:
SCI32: Fix bad VMD palettes in GK2
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 dfddac1..dd841f5 100644
--- a/engines/sci/graphics/video32.cpp
+++ b/engines/sci/graphics/video32.cpp
@@ -348,6 +348,12 @@ void VMDPlayer::renderFrame() const {
if (dirtyPalette) {
Palette palette;
palette.timestamp = g_sci->getTickCount();
+ for (uint16 i = 0; i < _startColor; ++i) {
+ palette.colors[i].used = false;
+ }
+ for (uint16 i = _endColor; i < 256; ++i) {
+ palette.colors[i].used = false;
+ }
if (_blackPalette) {
for (uint16 i = _startColor; i <= _endColor; ++i) {
palette.colors[i].r = palette.colors[i].g = palette.colors[i].b = 0;
@@ -398,9 +404,12 @@ void VMDPlayer::fillPalette(Palette &palette) const {
#pragma mark -
#pragma mark VMDPlayer - Palette
-void VMDPlayer::restrictPalette(const uint8 startColor, const uint8 endColor) {
+void VMDPlayer::restrictPalette(const uint8 startColor, const int16 endColor) {
_startColor = startColor;
- _endColor = endColor;
+ // At least GK2 sends 256 as the end color, which is wrong,
+ // but works in the original engine as the storage size is 4 bytes
+ // and used values are clamped to 0-255
+ _endColor = MIN((int16)255, endColor);
}
} // End of namespace Sci
diff --git a/engines/sci/graphics/video32.h b/engines/sci/graphics/video32.h
index cf863ba..7033f7c 100644
--- a/engines/sci/graphics/video32.h
+++ b/engines/sci/graphics/video32.h
@@ -233,7 +233,7 @@ public:
* Restricts use of the system palette by VMD playback to
* the given range of palette indexes.
*/
- void restrictPalette(const uint8 startColor, const uint8 endColor);
+ void restrictPalette(const uint8 startColor, const int16 endColor);
private:
/**
More information about the Scummvm-git-logs
mailing list