diff options
author | Sven Hesse | 2006-11-30 13:13:35 +0000 |
---|---|---|
committer | Sven Hesse | 2006-11-30 13:13:35 +0000 |
commit | 3f627e73e4375af62db297f47befc6a38a868abc (patch) | |
tree | d854701a1e01d7f92265717229393d2645c4a9f3 /engines/gob | |
parent | c18f01d609fd5fb57810ee1a6b8fa1ecead83797 (diff) | |
download | scummvm-rg350-3f627e73e4375af62db297f47befc6a38a868abc.tar.gz scummvm-rg350-3f627e73e4375af62db297f47befc6a38a868abc.tar.bz2 scummvm-rg350-3f627e73e4375af62db297f47befc6a38a868abc.zip |
The music in the Mac version of Gob1 seems to be selected randomly for each scene
svn-id: r24797
Diffstat (limited to 'engines/gob')
-rw-r--r-- | engines/gob/music.cpp | 24 | ||||
-rw-r--r-- | engines/gob/music.h | 2 |
2 files changed, 11 insertions, 15 deletions
diff --git a/engines/gob/music.cpp b/engines/gob/music.cpp index 56bbcb0313..0bbe71c39c 100644 --- a/engines/gob/music.cpp +++ b/engines/gob/music.cpp @@ -28,6 +28,7 @@ #include "gob/music.h" #include "gob/gob.h" #include "gob/game.h" +#include "gob/util.h" namespace Gob { @@ -56,14 +57,13 @@ const char *Music::_tracks[][2] = { {"avt022.tot", "zombie"} }; -const char *Music::_tracksToFiles[][2] = { - {"campagne", "Musmac2.adl"}, - {"extsor1", "Musmac3.adl"}, - {"interieure", "Musmac4.adl"}, - {"mine", "Musmac5.adl"}, - {"nuit", "Musmac6.adl"}, - {"statue", "Musmac2.adl"}, - {"zombie", "Musmac3.adl"} +const char *Music::_trackFiles[] = { +// "musmac1.adl", // TODO: This track isn't played correctly at all yet + "musmac2.adl", + "musmac3.adl", + "musmac4.adl", + "musmac5.adl", + "musmac6.adl" }; const unsigned char Music::_operators[] = {0, 1, 2, 8, 9, 10, 16, 17, 18}; @@ -445,12 +445,8 @@ void Music::playTrack(const char *trackname) { debugC(1, DEBUG_MUSIC, "Music::playTrack(%s)", trackname); unloadMusic(); - for (int i = 0; i < ARRAYSIZE(_tracksToFiles); i++) - if (!scumm_stricmp(trackname, _tracksToFiles[i][0])) { - loadMusic(_tracksToFiles[i][1]); - startPlay(); - break; - } + loadMusic(_trackFiles[_vm->_util->getRandom(ARRAYSIZE(_trackFiles))]); + startPlay(); } bool Music::loadMusic(const char *filename) { diff --git a/engines/gob/music.h b/engines/gob/music.h index 4752dc3e1d..f2db978f75 100644 --- a/engines/gob/music.h +++ b/engines/gob/music.h @@ -65,7 +65,7 @@ public: protected: static const char *_tracks[][2]; - static const char *_tracksToFiles[][2]; + static const char *_trackFiles[]; static const unsigned char _operators[]; static const unsigned char _volRegNums []; FM_OPL *_opl; |