[Scummvm-cvs-logs] scummvm master -> 0fe3ecd6d7091d347fb1c2b7c899de5ad2c35b28
fuzzie
fuzzie at fuzzie.org
Sun Feb 20 15:31:33 CET 2011
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:
9fa6b48e1a MOHAWK: A zero matchFrom matches everything.
00f85fb580 MOHAWK: Fix kLBAutoSync notifies.
42ec234a1f MOHAWK: Make LBLiveTextItem call done() when finished.
0fe3ecd6d7 MOHAWK: Don't display LiveText phrases too early.
Commit: 9fa6b48e1ae574c0af5be3ed2f9815c3d98be655
https://github.com/scummvm/scummvm/commit/9fa6b48e1ae574c0af5be3ed2f9815c3d98be655
Author: Alyssa Milburn (fuzzie at fuzzie.org)
Date: 2011-02-20T04:45:33-08:00
Commit Message:
MOHAWK: A zero matchFrom matches everything.
Changed paths:
engines/mohawk/livingbooks.cpp
diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp
index cc38adb..4fa69e8 100644
--- a/engines/mohawk/livingbooks.cpp
+++ b/engines/mohawk/livingbooks.cpp
@@ -1880,8 +1880,8 @@ LBScriptEntry *LBItem::parseScriptEntry(uint16 type, uint16 &size, Common::Seeka
error("not enough bytes (%d) in kLBEventNotified, opcode 0x%04x", size, entry->opcode);
entry->matchFrom = stream->readUint16();
entry->matchNotify = stream->readUint16();
- debug(4, "kLBEventNotified: unknowns %04x, %04x",
- entry->matchFrom, entry->matchNotify);
+ debug(4, "kLBEventNotified: matches %04x (from %04x)",
+ entry->matchNotify, entry->matchFrom);
size -= 4;
}
@@ -2289,7 +2289,7 @@ void LBItem::runScript(uint event, uint16 data, uint16 from) {
continue;
if (event == kLBEventNotified) {
- if (entry->matchFrom != from || entry->matchNotify != data)
+ if ((entry->matchFrom && entry->matchFrom != from) || entry->matchNotify != data)
continue;
}
Commit: 00f85fb58056fef0eb9e6993990393ee1a195b9b
https://github.com/scummvm/scummvm/commit/00f85fb58056fef0eb9e6993990393ee1a195b9b
Author: Alyssa Milburn (fuzzie at fuzzie.org)
Date: 2011-02-20T04:45:34-08:00
Commit Message:
MOHAWK: Fix kLBAutoSync notifies.
Changed paths:
engines/mohawk/livingbooks.cpp
diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp
index 4fa69e8..c2f42b6 100644
--- a/engines/mohawk/livingbooks.cpp
+++ b/engines/mohawk/livingbooks.cpp
@@ -2272,7 +2272,7 @@ void LBItem::stop() {
void LBItem::notify(uint16 data, uint16 from) {
if (_timingMode == kLBAutoSync) {
// TODO: is this correct?
- if (_periodMin == from && _periodMax == data) {
+ if (_periodMin == data && _periodMax == from) {
debug(2, "Handling notify 0x%04x (from %d)", data, from);
setNextTime(0, 0);
}
Commit: 42ec234a1f32724cc713bd045cdb96d871c7d2c0
https://github.com/scummvm/scummvm/commit/42ec234a1f32724cc713bd045cdb96d871c7d2c0
Author: Alyssa Milburn (fuzzie at fuzzie.org)
Date: 2011-02-20T04:46:12-08:00
Commit Message:
MOHAWK: Make LBLiveTextItem call done() when finished.
Changed paths:
engines/mohawk/livingbooks.cpp
diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp
index c2f42b6..e4d51c3 100644
--- a/engines/mohawk/livingbooks.cpp
+++ b/engines/mohawk/livingbooks.cpp
@@ -3284,8 +3284,10 @@ void LBLiveTextItem::notify(uint16 data, uint16 from) {
}
_currentPhrase = i;
// TODO: not sure this is the correct logic
- if (i == _phrases.size() - 1)
+ if (i == _phrases.size() - 1) {
_currentPhrase = 0xFFFF;
+ done(true);
+ }
} else if (_phrases[i].highlightEnd == data && _phrases[i].endId == from) {
debug(2, "Disabling phrase %d", i);
for (uint j = 0; j < _phrases[i].wordCount; j++) {
Commit: 0fe3ecd6d7091d347fb1c2b7c899de5ad2c35b28
https://github.com/scummvm/scummvm/commit/0fe3ecd6d7091d347fb1c2b7c899de5ad2c35b28
Author: Alyssa Milburn (fuzzie at fuzzie.org)
Date: 2011-02-20T04:46:13-08:00
Commit Message:
MOHAWK: Don't display LiveText phrases too early.
Changed paths:
engines/mohawk/livingbooks.cpp
diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp
index e4d51c3..20f7684 100644
--- a/engines/mohawk/livingbooks.cpp
+++ b/engines/mohawk/livingbooks.cpp
@@ -3213,7 +3213,7 @@ void LBLiveTextItem::drawWord(uint word, uint yPos) {
}
void LBLiveTextItem::handleMouseDown(Common::Point pos) {
- if (_neverEnabled || !_enabled || !_globalEnabled || _currentPhrase != 0xFFFF)
+ if (_neverEnabled || !_enabled || !_globalEnabled || _playing)
return LBItem::handleMouseDown(pos);
pos.x -= _rect.left;
@@ -3245,16 +3245,13 @@ bool LBLiveTextItem::togglePlaying(bool playing, bool restart) {
if (!playing)
return LBItem::togglePlaying(playing, restart);
if (_neverEnabled || !_enabled || !_globalEnabled)
- return (_currentPhrase != 0xFFFF);
+ return _playing;
// TODO: handle this properly
_vm->_sound->stopSound();
_currentWord = 0xFFFF;
-
- // some LiveText items don't have any phrases!
- if (_phrases.size() > 0)
- _currentPhrase = 0;
+ _currentPhrase = 0xFFFF;
return true;
}
@@ -3266,7 +3263,7 @@ void LBLiveTextItem::stop() {
}
void LBLiveTextItem::notify(uint16 data, uint16 from) {
- if (_neverEnabled || !_enabled || !_globalEnabled || _currentPhrase == 0xFFFF)
+ if (_neverEnabled || !_enabled || !_globalEnabled || !_playing)
return LBItem::notify(data, from);
if (_currentWord != 0xFFFF) {
More information about the Scummvm-git-logs
mailing list