aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/cryo/bugs.txt2
-rw-r--r--engines/cryo/eden.cpp6
-rw-r--r--engines/cryo/eden.h2
3 files changed, 6 insertions, 4 deletions
diff --git a/engines/cryo/bugs.txt b/engines/cryo/bugs.txt
index 5f3c47e0e4..a69538a449 100644
--- a/engines/cryo/bugs.txt
+++ b/engines/cryo/bugs.txt
@@ -16,4 +16,4 @@ E. Bogus hitbox in upper right corner of mirror screen (under mini-map)
F. Wrong frescoes cursor on PC
G. Junk on a valley entrance screen on PC
H. On PC, no sound during first Mungo's dialogue, memory corruption after that
-J. PC intro video is out of sync with background voice, crashes later
+J. PC intro video is lagging behind of background voice
diff --git a/engines/cryo/eden.cpp b/engines/cryo/eden.cpp
index bfee1a0d8f..06cd9022cf 100644
--- a/engines/cryo/eden.cpp
+++ b/engines/cryo/eden.cpp
@@ -5713,7 +5713,7 @@ void EdenGame::allocateBuffers() {
ALLOC(_glowBuffer, 0x2800, byte);
ALLOC(_gameFont, 0x900, byte);
ALLOC(_gameLipsync, 0x205C, byte);
- ALLOC(_musicBuf, 0x140000, byte);
+ ALLOC(_musicBuf, kMaxMusicSize, byte);
#undef ALLOC
}
@@ -6714,8 +6714,8 @@ int EdenGame::loadmusicfile(int16 num) {
int32 offs = file->_offs;
_bigfile.seek(offs, SEEK_SET);
int32 numread = size;
- if (numread > 0x140000) //TODO: const
- numread = 0x140000;
+ if (numread > kMaxMusicSize)
+ error("Music file %s is too big", file->_name);
_bigfile.read(_musicBuf, numread);
return size;
}
diff --git a/engines/cryo/eden.h b/engines/cryo/eden.h
index c05b3db1e0..edcfc860a7 100644
--- a/engines/cryo/eden.h
+++ b/engines/cryo/eden.h
@@ -735,6 +735,8 @@ private:
byte *_codePtr;
uint8 tab_2CB1E[8][4];
+
+ const unsigned int kMaxMusicSize = 2200000; // largest .mus file size
};
}