[Scummvm-cvs-logs] scummvm master -> 805acaa81e836761fc5dee8f94b5f09e7831ed99
fuzzie
fuzzie at fuzzie.org
Sun Feb 20 12:46:13 CET 2011
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:
417dd6314b MOHAWK: Fix LB palettes which don't start at 0.
805acaa81e MOHAWK: Ignore out-of-bounds LB words.
Commit: 417dd6314b5355f74423cb2de22c18da1b0e968b
https://github.com/scummvm/scummvm/commit/417dd6314b5355f74423cb2de22c18da1b0e968b
Author: Alyssa Milburn (fuzzie at fuzzie.org)
Date: 2011-02-20T03:36:21-08:00
Commit Message:
MOHAWK: Fix LB palettes which don't start at 0.
(Thanks to LordHoto for pointing out this was crazy.)
Changed paths:
engines/mohawk/livingbooks.cpp
diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp
index 29d2822..a7af9ac 100644
--- a/engines/mohawk/livingbooks.cpp
+++ b/engines/mohawk/livingbooks.cpp
@@ -2988,6 +2988,10 @@ void LBPaletteItem::readData(uint16 type, uint16 size, Common::SeekableSubReadSt
if (_drawStart + _drawCount > 256)
error("encountered palette trying to set more than 256 colors");
assert(size == 8 + _drawCount * 4);
+
+ // TODO: _drawCount is really more like _drawEnd, so once we're sure that
+ // there's really no use for the palette entries before _drawCount, we
+ // might want to just discard them here, at load time.
_palette = new byte[_drawCount * 3];
for (uint i = 0; i < _drawCount; i++) {
_palette[i*3 + 0] = stream->readByte();
@@ -3032,7 +3036,7 @@ void LBPaletteItem::update() {
// TODO: actual fading-in
if (_visible && _globalVisible) {
- _vm->_system->getPaletteManager()->setPalette(_palette + _drawStart * 3, _drawStart, _drawCount);
+ _vm->_system->getPaletteManager()->setPalette(_palette + _drawStart * 3, _drawStart, _drawCount - _drawStart);
_vm->_needsRedraw = true;
}
}
Commit: 805acaa81e836761fc5dee8f94b5f09e7831ed99
https://github.com/scummvm/scummvm/commit/805acaa81e836761fc5dee8f94b5f09e7831ed99
Author: Alyssa Milburn (fuzzie at fuzzie.org)
Date: 2011-02-20T03:45:15-08:00
Commit Message:
MOHAWK: Ignore out-of-bounds LB words.
Changed paths:
engines/mohawk/livingbooks.cpp
diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp
index a7af9ac..cc38adb 100644
--- a/engines/mohawk/livingbooks.cpp
+++ b/engines/mohawk/livingbooks.cpp
@@ -3142,6 +3142,11 @@ bool LBLiveTextItem::contains(Common::Point point) {
void LBLiveTextItem::paletteUpdate(uint16 word, bool on) {
_vm->_needsRedraw = true;
+ // Sometimes the last phrase goes out-of-bounds, the original engine
+ // only checks the words which are valid in the palette updating code.
+ if (word >= _words.size())
+ return;
+
if (_resourceId) {
// with a resource, we draw a bitmap in draw() rather than changing the palette
return;
More information about the Scummvm-git-logs
mailing list