diff options
author | athrxx | 2019-01-26 22:55:25 +0100 |
---|---|---|
committer | athrxx | 2019-03-06 20:48:20 +0100 |
commit | 890c4c5f41e74938640f4bc8ddb843ac3ca9928d (patch) | |
tree | 1574c7a04f65cc2ce468380b8b9d05a70c0cfaec /engines/kyra/sound/sound_towns_darkmoon.cpp | |
parent | 4cc9c81a75f73216ba98b3744a32c900aad36061 (diff) | |
download | scummvm-rg350-890c4c5f41e74938640f4bc8ddb843ac3ca9928d.tar.gz scummvm-rg350-890c4c5f41e74938640f4bc8ddb843ac3ca9928d.tar.bz2 scummvm-rg350-890c4c5f41e74938640f4bc8ddb843ac3ca9928d.zip |
KYRA: (EOB1/Amiga) - fix start up
First efforts to get this running. The intro is shown with severe palette glitches. The Main Menu does not show, thanks to the lack of font drawing.
- implement endian aware stream wrapper for amiga files
- implement sound file handling
- implement some Amiga palette handling
- etc
Diffstat (limited to 'engines/kyra/sound/sound_towns_darkmoon.cpp')
-rw-r--r-- | engines/kyra/sound/sound_towns_darkmoon.cpp | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/engines/kyra/sound/sound_towns_darkmoon.cpp b/engines/kyra/sound/sound_towns_darkmoon.cpp index 25fd4142b9..747e1bd3f4 100644 --- a/engines/kyra/sound/sound_towns_darkmoon.cpp +++ b/engines/kyra/sound/sound_towns_darkmoon.cpp @@ -39,7 +39,7 @@ SoundTowns_Darkmoon::SoundTowns_Darkmoon(KyraEngine_v1 *vm, Audio::Mixer *mixer) _pcmVol = 0; _timer = 0; _timerSwitch = 0; - memset(_pcmResource, 0, sizeof(_pcmResource)); + memset(_resource, 0, sizeof(_resource)); } SoundTowns_Darkmoon::~SoundTowns_Darkmoon() { @@ -85,31 +85,39 @@ void SoundTowns_Darkmoon::timerCallback(int timerId) { } void SoundTowns_Darkmoon::initAudioResourceInfo(int set, void *info) { - delete _pcmResource[set]; - _pcmResource[set] = info ? new SoundResourceInfo_TownsEoB(*(SoundResourceInfo_TownsEoB*)info) : 0; + delete _resource[set]; + _resource[set] = info ? new SoundResourceInfo_TownsEoB(*(SoundResourceInfo_TownsEoB*)info) : 0; } void SoundTowns_Darkmoon::selectAudioResourceSet(int set) { delete[] _pcmData; - if (!_pcmResource[set] || !_pcmResource[kMusicIngame]) + if (!_resource[set] || !_resource[kMusicIngame]) return; - - _pcmDataSize = _pcmResource[kMusicIngame]->pcmDataSize; + + _fileList = _resource[set]->fileList; + _fileListLen = _resource[set]->numFiles; + + _pcmDataSize = _resource[kMusicIngame]->pcmDataSize; _pcmData = new uint8[_pcmDataSize]; - _pcmVol = _pcmResource[set]->pcmVolume; - memcpy(_pcmData, _pcmResource[kMusicIngame]->pcmData, _pcmDataSize); + _pcmVol = _resource[set]->pcmVolume; + memcpy(_pcmData, _resource[kMusicIngame]->pcmData, _pcmDataSize); if (set == kMusicIngame) return; - memcpy(_pcmData, _pcmResource[set]->pcmData, _pcmResource[set]->pcmDataSize); + memcpy(_pcmData, _resource[set]->pcmData, _resource[set]->pcmDataSize); } bool SoundTowns_Darkmoon::hasSoundFile(uint file) const { return true; } +void SoundTowns_Darkmoon::loadSoundFile(uint file) { + if (file < _fileListLen) + loadSoundFile(_fileList[file]); +} + void SoundTowns_Darkmoon::loadSoundFile(Common::String name) { Common::SeekableReadStream *s = _vm->resource()->createReadStream(Common::String::format("%s.SDT", name.c_str())); if (!s) |