diff options
author | Eugene Sandulenko | 2014-04-26 14:43:08 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2014-04-26 14:43:08 +0300 |
commit | e804b8fa2c6f7f60523b19b5fdc96371d009b729 (patch) | |
tree | a7480d53a2e8fecb814cb4ae05ac5345685a0fec | |
parent | 81b24d0c4042cec0b11fff73c5594f386c06418e (diff) | |
download | scummvm-rg350-e804b8fa2c6f7f60523b19b5fdc96371d009b729.tar.gz scummvm-rg350-e804b8fa2c6f7f60523b19b5fdc96371d009b729.tar.bz2 scummvm-rg350-e804b8fa2c6f7f60523b19b5fdc96371d009b729.zip |
FULLPIPE: Implement FullpipeEngine::getSceneTrack()
-rw-r--r-- | engines/fullpipe/sound.cpp | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp index 8071129e5c..1d58f8bc16 100644 --- a/engines/fullpipe/sound.cpp +++ b/engines/fullpipe/sound.cpp @@ -154,9 +154,31 @@ void FullpipeEngine::startSceneTrack() { } int FullpipeEngine::getSceneTrack() { - warning("STUB: FullpipeEngine::getSceneTrack()"); + int res; - return -1; + if (_sceneTrackHasSequence) { + int num = _musicGameVar->getSubVarAsInt("TRACKS"); + + if (_trackName[num + 1] == 's') { // 'silence' + res = -1; + } else { + res = _trackName[num + 1] - '0'; + + if (res < 0 || res >= _numSceneTracks) + res = 0; + } + + int track = num + 1; + + if (!_trackName[num + 2]) + track = 0; + + _musicGameVar->setSubVarAsInt("TRACKS", track); + } else { + res = _numSceneTracks * (_updateTicks % 10) / 10; + } + + return res; } void FullpipeEngine::startSoundStream1(char *trackName) { |