aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Hesse2015-09-02 20:26:00 +0200
committerSven Hesse2015-09-02 20:38:16 +0200
commit1fa01972297965dfd9a1e0c9b414f63df4e6b36d (patch)
treeb438db3d40c1138b8db85cdd6093065167d35418
parenta23c6042322e9f64482c3b35e253b2e3fdda926a (diff)
downloadscummvm-rg350-1fa01972297965dfd9a1e0c9b414f63df4e6b36d.tar.gz
scummvm-rg350-1fa01972297965dfd9a1e0c9b414f63df4e6b36d.tar.bz2
scummvm-rg350-1fa01972297965dfd9a1e0c9b414f63df4e6b36d.zip
GOB: Make the currently playing CD track all-uppercase
This is what the original game does too, and the scripts query for all-uppercase CD track names. Interestingly, this being wrong has been mostly inconsequential. It does, however, manifest in one bug in the underwater wreck level of Gobliins 2. After calling the Moray Eel by lighting the lamp with Winkle, speaking to said eel has the scripts wait for the currently playing background track to end before playing the voice lines, instead of ending the audio track forcefully. The track is only about a minute long, so it's "only" annoying, not a game-stopper. The scripts also try to compare the CD track name with some different, all-uppercase names, so this is possibly relevant in some other places as well. No such bug report exists at the moment, though. See also the forum post with the bug report: http://forums.scummvm.org/viewtopic.php?p=81733#81733 A somewhat related bug report is #2999 "GOB2 : Moray Eel Game Freeze (Wreck Scene)" (<http://sourceforge.net/p/scummvm/bugs/2999/>). At that time, the script expression parser still did a stricmp for the NEQ expression (which is wrong), and that made the bug not trigger. Commit 5c58b9a3a4a8848474aba18c02c0da997fb138a2, which fixed that incorrect NEQ behaviour, then made this bug here appear.
-rw-r--r--engines/gob/sound/cdrom.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/gob/sound/cdrom.cpp b/engines/gob/sound/cdrom.cpp
index eca6ca4c9e..b862ca96fb 100644
--- a/engines/gob/sound/cdrom.cpp
+++ b/engines/gob/sound/cdrom.cpp
@@ -91,7 +91,10 @@ void CDROM::startTrack(const char *trackName) {
return;
}
- Common::strlcpy(_curTrack, trackName, 16);
+ Common::String curTrack(trackName);
+ curTrack.toUppercase();
+
+ Common::strlcpy(_curTrack, curTrack.c_str(), 16);
stopPlaying();
_curTrackBuffer = matchPtr;