diff options
author | Sven Hesse | 2006-08-12 09:16:08 +0000 |
---|---|---|
committer | Sven Hesse | 2006-08-12 09:16:08 +0000 |
commit | 1c4715b71f79acede6b3758cfd16881bad14e23e (patch) | |
tree | cf69fad6a6ab92b973405b058f035f3c00223033 /engines/gob/music.cpp | |
parent | de9ba3adeec3a89a1155685d8e3fc589962f1d11 (diff) | |
download | scummvm-rg350-1c4715b71f79acede6b3758cfd16881bad14e23e.tar.gz scummvm-rg350-1c4715b71f79acede6b3758cfd16881bad14e23e.tar.bz2 scummvm-rg350-1c4715b71f79acede6b3758cfd16881bad14e23e.zip |
- Some more goblins-handling functions
- Fixed some mistakes I made in the Parse_v2 functions. Now the goblins
(finally) move. Also, the correct music is played in the first screen.
- Found the hook for the menu
- On freeing a sound slot, only stop the playing music if it's in the
slot to free
svn-id: r23700
Diffstat (limited to 'engines/gob/music.cpp')
-rw-r--r-- | engines/gob/music.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/engines/gob/music.cpp b/engines/gob/music.cpp index 782e07bd04..56bbcb0313 100644 --- a/engines/gob/music.cpp +++ b/engines/gob/music.cpp @@ -76,6 +76,7 @@ const unsigned char Music::_volRegNums[] = { Music::Music(GobEngine *vm) : _vm(vm) { int i; + _index = -1; _data = 0; _playPos = 0; _dataSize = 0; @@ -365,6 +366,9 @@ void Music::pollMusic(void) { _pollNotes[channel] = note; setKey(channel, note, true, false); break; + case 0x60: + warning("GOB2 Stub! ADL command 0x60"); + break; // Last note off case 0x80: note = _pollNotes[channel]; @@ -452,6 +456,7 @@ void Music::playTrack(const char *trackname) { bool Music::loadMusic(const char *filename) { Common::File song; + unloadMusic(); song.open(filename); if (!song.isOpen()) return false; @@ -469,12 +474,13 @@ bool Music::loadMusic(const char *filename) { return true; } -void Music::loadFromMemory(byte *data) { +void Music::loadFromMemory(byte *data, int index) { unloadMusic(); _repCount = 0; _dataSize = (uint32) -1; _data = data; + _index = index; reset(); setVoices(); @@ -483,6 +489,7 @@ void Music::loadFromMemory(byte *data) { void Music::unloadMusic(void) { _playing = false; + _index = -1; if (_data && _needFree) delete[] _data; |