aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-05-17 20:54:51 +0000
committerTorbjörn Andersson2006-05-17 20:54:51 +0000
commit6bf1e10768e5d3d71bd9e06fe2000254f6dbd955 (patch)
tree3302e312ac3eea11cde1be79a97c29fe3bb2ff3e /engines
parent0099932d0d74665ec0e0e4f0ace6abe7b5a32cdd (diff)
downloadscummvm-rg350-6bf1e10768e5d3d71bd9e06fe2000254f6dbd955.tar.gz
scummvm-rg350-6bf1e10768e5d3d71bd9e06fe2000254f6dbd955.tar.bz2
scummvm-rg350-6bf1e10768e5d3d71bd9e06fe2000254f6dbd955.zip
Fixed two off-by-one errors. One would cause the same frame of the Kyra 3 to be
displayed twice in a row. The other, more serious one, would cause ScummVM to crash when reaching the end of the music. Now the music loops properly. (It does fade down before looping, but that's how it is in the original as well. It's just the way the music is recorded.) svn-id: r22503
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/kyra3.cpp2
-rw-r--r--engines/kyra/sound_digital.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/engines/kyra/kyra3.cpp b/engines/kyra/kyra3.cpp
index 040f3b4908..cadf35e4db 100644
--- a/engines/kyra/kyra3.cpp
+++ b/engines/kyra/kyra3.cpp
@@ -90,7 +90,7 @@ int KyraEngine_v3::go() {
delayUntil(nextRun);
}
- for (int i = 64; i >= 29; --i) {
+ for (int i = 64; i > 29; --i) {
uint32 nextRun = _system->getMillis() + 3 * _tickLength;
logo->displayFrame(i);
_screen->updateScreen();
diff --git a/engines/kyra/sound_digital.cpp b/engines/kyra/sound_digital.cpp
index a41ca053ef..755bc710cd 100644
--- a/engines/kyra/sound_digital.cpp
+++ b/engines/kyra/sound_digital.cpp
@@ -133,7 +133,9 @@ int AUDStream::readChunk(int16 *buffer, const int maxSamples) {
// if no bytes of the old chunk are left, read the next one
if (_bytesLeft <= 0) {
- if (_processedSize > _totalSize) {
+ if (_processedSize >= _totalSize) {
+ // TODO: Eventually, we're probably going to need the
+ // ability to loop the sound. Add this here?
_endOfData = true;
return 0;
}