From 31ace2c66cba4e2e689daef8fb28fc8f3ab0b14e Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 20 Jun 2009 08:15:39 +0000 Subject: Implemented the library function Op_SongExist svn-id: r41703 --- engines/cruise/function.cpp | 11 +++++++++-- 1 file 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; } -- cgit v1.2.3