aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2009-06-20 08:15:39 +0000
committerPaul Gilbert2009-06-20 08:15:39 +0000
commit31ace2c66cba4e2e689daef8fb28fc8f3ab0b14e (patch)
treedfd94fcf20d036fa1b8fbd5fa0826d7adbd123d1
parent4f622ab295f53ad9d2417d1d1ee2b1fddfa98298 (diff)
downloadscummvm-rg350-31ace2c66cba4e2e689daef8fb28fc8f3ab0b14e.tar.gz
scummvm-rg350-31ace2c66cba4e2e689daef8fb28fc8f3ab0b14e.tar.bz2
scummvm-rg350-31ace2c66cba4e2e689daef8fb28fc8f3ab0b14e.zip
Implemented the library function Op_SongExist
svn-id: r41703
-rw-r--r--engines/cruise/function.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/engines/cruise/function.cpp b/engines/cruise/function.cpp
index 7df674a3d3..a27fa7a044 100644
--- a/engines/cruise/function.cpp
+++ b/engines/cruise/function.cpp
@@ -1647,9 +1647,16 @@ int16 Op_SetVolume(void) {
}
int16 Op_SongExist(void) {
- char* songName = (char*)popPtr();
+ const char *songName = (char*)popPtr();
- warning("Unimplemented \"Op_SongExist\": %s", songName);
+ if (songName) {
+ char name[33];
+ strcpy(name, songName);
+ strToUpper(name);
+
+ if (!strcmp(_vm->sound().musicName(), name))
+ return 1;
+ }
return 0;
}