diff -ur ScummVM-cvs20030705/scummvm/sky/intro.cpp ScummVM-cvs20030705+hack/scummvm/sky/intro.cpp
old
|
new
|
|
32 | 32 | _mixer->stopAll(); |
33 | 33 | #define CHECK_ESC if (_key_pressed == 27) { _skyScreen->stopSequence(); REMOVE_INTRO return false; } |
34 | 34 | #define WAIT_SEQUENCE while (_skyScreen->sequenceRunning()) { checkCommands(commandPtr); delay(50); CHECK_ESC } |
| 35 | #define WAIT_MUSIC while (_skyMusic->musicIsPlaying()) { delay(50); CHECK_ESC } |
35 | 36 | |
36 | 37 | #define INTRO_TEXT_WIDTH 128 |
37 | 38 | |
… |
… |
|
349 | 350 | commandPtr = (uint32 *)anim5Commands; |
350 | 351 | |
351 | 352 | WAIT_SEQUENCE; |
| 353 | |
| 354 | // There is no synchronization mechanism between the music and |
| 355 | // the graphics. Which means that there is no guarantee that |
| 356 | // they both end at the same time. So just to be safe, wait |
| 357 | // for the music to stop before continuing with the final part. |
| 358 | // |
| 359 | // This part of the intro looks pretty nice even as a static |
| 360 | // image, so it makes sense to do the waiting before fading |
| 361 | // down the palette. |
| 362 | |
| 363 | WAIT_MUSIC; |
| 364 | |
352 | 365 | _skyDisk->prefetchFile(FN_6_PAL); |
353 | 366 | _skyDisk->prefetchFile(FN_6_LOG); |
354 | 367 | _skyDisk->prefetchFile(FN_6A); |
diff -ur ScummVM-cvs20030705/scummvm/sky/music/adlibchannel.cpp ScummVM-cvs20030705+hack/scummvm/sky/music/adlibchannel.cpp
old
|
new
|
|
61 | 61 | _musicVolume = 0x100; |
62 | 62 | } |
63 | 63 | |
| 64 | bool SkyAdlibChannel::isActive(void) { |
| 65 | |
| 66 | return _channelData.channelActive != 0; |
| 67 | } |
| 68 | |
64 | 69 | void SkyAdlibChannel::updateVolume(uint16 pVolume) { |
65 | 70 | |
66 | 71 | _musicVolume = pVolume; |
diff -ur ScummVM-cvs20030705/scummvm/sky/music/adlibchannel.h ScummVM-cvs20030705+hack/scummvm/sky/music/adlibchannel.h
old
|
new
|
|
64 | 64 | virtual void stopNote(void); |
65 | 65 | virtual uint8 process(uint16 aktTime); |
66 | 66 | virtual void updateVolume(uint16 pVolume); |
| 67 | virtual bool isActive(void); |
67 | 68 | private: |
68 | 69 | uint8 *_musicData; |
69 | 70 | uint16 _musicVolume; |
diff -ur ScummVM-cvs20030705/scummvm/sky/music/gmchannel.cpp ScummVM-cvs20030705+hack/scummvm/sky/music/gmchannel.cpp
old
|
new
|
|
63 | 63 | _musicVolume = 0x100; |
64 | 64 | } |
65 | 65 | |
| 66 | bool SkyGmChannel::isActive(void) { |
| 67 | |
| 68 | return _channelData.channelActive != 0; |
| 69 | } |
| 70 | |
66 | 71 | void SkyGmChannel::updateVolume(uint16 pVolume) { |
67 | 72 | |
68 | 73 | _musicVolume = pVolume; |
diff -ur ScummVM-cvs20030705/scummvm/sky/music/gmchannel.h ScummVM-cvs20030705+hack/scummvm/sky/music/gmchannel.h
old
|
new
|
|
42 | 42 | virtual void stopNote(void); |
43 | 43 | virtual uint8 process(uint16 aktTime); |
44 | 44 | virtual void updateVolume(uint16 pVolume); |
| 45 | virtual bool isActive(void); |
45 | 46 | private: |
46 | 47 | byte *_mt32_to_gm; |
47 | 48 | static uint8 _veloTab[128]; |
diff -ur ScummVM-cvs20030705/scummvm/sky/music/musicbase.cpp ScummVM-cvs20030705+hack/scummvm/sky/music/musicbase.cpp
old
|
new
|
|
57 | 57 | _system->unlock_mutex(_mutex); |
58 | 58 | } |
59 | 59 | |
| 60 | bool SkyMusicBase::musicIsPlaying(void) |
| 61 | { |
| 62 | for (uint8 cnt = 0; cnt < _numberOfChannels; cnt++) |
| 63 | if (_channels[cnt]->isActive()) |
| 64 | return true; |
| 65 | return false; |
| 66 | } |
| 67 | |
60 | 68 | void SkyMusicBase::musicCommand(uint16 command) |
61 | 69 | { |
62 | 70 | if (_musicData == NULL) { |
diff -ur ScummVM-cvs20030705/scummvm/sky/music/musicbase.h ScummVM-cvs20030705+hack/scummvm/sky/music/musicbase.h
old
|
new
|
|
38 | 38 | virtual void stopNote(void) = 0; |
39 | 39 | virtual uint8 process(uint16 aktTime) = 0; |
40 | 40 | virtual void updateVolume(uint16 pVolume) = 0; |
| 41 | virtual bool isActive(void) = 0; |
41 | 42 | private: |
42 | 43 | }; |
43 | 44 | |
… |
… |
|
48 | 49 | void loadSection(uint8 pSection); |
49 | 50 | void musicCommand(uint16 command); |
50 | 51 | void startMusic(uint16 param) { _onNextPoll.musicToProcess = param & 0xF; }; // 4 |
| 52 | bool musicIsPlaying(void); |
51 | 53 | virtual void setVolume(uint8 volume) = 0; |
52 | 54 | uint8 giveVolume(void) { return (uint8)_musicVolume; }; |
53 | 55 | uint8 giveCurrentMusic(void) { return _currentMusic; }; |