aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Stewart2018-07-28 16:30:10 -0400
committerEugene Sandulenko2018-08-09 08:37:30 +0200
commit06d7656d42ec5e4ba540dc613b6f6793c9979cfc (patch)
treeab6ab910984caf71af7d1760bf3afaee45cf3b8b
parenta1107f0500e97782a69b6a2d3edac25d67fb75d6 (diff)
downloadscummvm-rg350-06d7656d42ec5e4ba540dc613b6f6793c9979cfc.tar.gz
scummvm-rg350-06d7656d42ec5e4ba540dc613b6f6793c9979cfc.tar.bz2
scummvm-rg350-06d7656d42ec5e4ba540dc613b6f6793c9979cfc.zip
STARTREK: Play midi sounds on floppy version
-rw-r--r--engines/startrek/sound.cpp4
-rw-r--r--engines/startrek/startrek.cpp103
2 files changed, 59 insertions, 48 deletions
diff --git a/engines/startrek/sound.cpp b/engines/startrek/sound.cpp
index f159e0c296..2c4abff30c 100644
--- a/engines/startrek/sound.cpp
+++ b/engines/startrek/sound.cpp
@@ -63,7 +63,9 @@ Sound::Sound(StarTrekEngine *vm) : _vm(vm) {
_midiSlotList.push_back(&_midiSlots[i]);
}
- if (!SearchMan.hasFile("voc/speech.mrk")) {
+ if (!_vm->isCDEdition())
+ _vm->_sfxWorking = false;
+ else if (!SearchMan.hasFile("voc/speech.mrk")) {
warning("Couldn't find 'voc/speech.mrk'. The 'trekcd/voc/' directory should be dumped from the CD. Continuing without CD audio");
_vm->_sfxWorking = false;
}
diff --git a/engines/startrek/startrek.cpp b/engines/startrek/startrek.cpp
index 2086b36e97..c201e3fa54 100644
--- a/engines/startrek/startrek.cpp
+++ b/engines/startrek/startrek.cpp
@@ -55,6 +55,11 @@ StarTrekEngine::StarTrekEngine(OSystem *syst, const StarTrekGameDescription *gam
_redshirtActor(&_actorList[3]),
_sineTable(10) {
+ if (getPlatform() != Common::kPlatformDOS)
+ error("Only DOS versions of Star Trek: 25th Anniversary are currently supported");
+ else if (getGameType() == GType_STJR)
+ error("Star Trek: Judgment Rites not yet supported");
+
DebugMan.addDebugChannel(kDebugSound, "sound", "Sound");
DebugMan.addDebugChannel(kDebugGraphics, "graphics", "Graphics");
DebugMan.addDebugChannel(kDebugSavegame, "savegame", "Savegames");
@@ -524,54 +529,58 @@ void StarTrekEngine::runTransportSequence(const Common::String &name) {
}
void StarTrekEngine::playSoundEffectIndex(int index) {
- switch (index) {
- case 0x04:
- _sound->playVoc("tricorde");
- break;
- case 0x05:
- _sound->playVoc("STDOOR1");
- break;
- case 0x06:
- _sound->playVoc("PHASSHOT");
- break;
- case 0x07:
- _sound->playMidiTrack(index);
- break;
- case 0x08:
- _sound->playVoc("TRANSDEM");
- break;
- case 0x09: // Beaming in?
- _sound->playVoc("TRANSMAT");
- break;
- case 0x0a: // Beaming out?
- _sound->playVoc("TRANSENE");
- break;
- case 0x10: // Menu selection sound
- _sound->playMidiTrack(index);
- break;
- case 0x22:
- _sound->playVoc("HAILING");
- break;
- case 0x24:
- _sound->playVoc("PHASSHOT");
- break;
- case 0x25:
- _sound->playVoc("PHOTSHOT");
- break;
- case 0x26:
- _sound->playVoc("HITSHIEL");
- break;
- case 0x27:
+ if (!isCDEdition())
_sound->playMidiTrack(index);
- break;
- case 0x28:
- _sound->playVoc("REDALERT");
- break;
- case 0x29:
- _sound->playVoc("WARP");
- break;
- default:
- break;
+ else {
+ switch (index) {
+ case 0x04:
+ _sound->playVoc("tricorde");
+ break;
+ case 0x05:
+ _sound->playVoc("STDOOR1");
+ break;
+ case 0x06:
+ _sound->playVoc("PHASSHOT");
+ break;
+ case 0x07:
+ _sound->playMidiTrack(index);
+ break;
+ case 0x08:
+ _sound->playVoc("TRANSDEM");
+ break;
+ case 0x09: // Beaming in?
+ _sound->playVoc("TRANSMAT");
+ break;
+ case 0x0a: // Beaming out?
+ _sound->playVoc("TRANSENE");
+ break;
+ case 0x10: // Menu selection sound
+ _sound->playMidiTrack(index);
+ break;
+ case 0x22:
+ _sound->playVoc("HAILING");
+ break;
+ case 0x24:
+ _sound->playVoc("PHASSHOT");
+ break;
+ case 0x25:
+ _sound->playVoc("PHOTSHOT");
+ break;
+ case 0x26:
+ _sound->playVoc("HITSHIEL");
+ break;
+ case 0x27:
+ _sound->playMidiTrack(index);
+ break;
+ case 0x28:
+ _sound->playVoc("REDALERT");
+ break;
+ case 0x29:
+ _sound->playVoc("WARP");
+ break;
+ default:
+ break;
+ }
}
}