diff options
-rw-r--r-- | common/gameDetector.cpp | 12 | ||||
-rw-r--r-- | common/gameDetector.h | 2 | ||||
-rw-r--r-- | scumm/resource.cpp | 4 | ||||
-rw-r--r-- | scumm/saveload.cpp | 2 | ||||
-rw-r--r-- | scumm/script_v5.cpp | 6 | ||||
-rw-r--r-- | scumm/scumm.h | 2 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 7 | ||||
-rw-r--r-- | scumm/sound.cpp | 2 |
8 files changed, 28 insertions, 9 deletions
diff --git a/common/gameDetector.cpp b/common/gameDetector.cpp index 2b705c2a8a..25ffcc3936 100644 --- a/common/gameDetector.cpp +++ b/common/gameDetector.cpp @@ -174,6 +174,8 @@ GameDetector::GameDetector() { _music_volume = kDefaultMusicVolume; _sfx_volume = kDefaultSFXVolume; _amiga = false; + _atari_st = false; + _macintosh = false; _language = 0; #ifndef DISABLE_SCUMM @@ -281,6 +283,8 @@ void GameDetector::updateconfig() { const char *val; _amiga = g_config->getBool("amiga", _amiga); + _atari_st = g_config->getBool("atari_st", _atari_st); + _macintosh = g_config->getBool("macintosh", _macintosh); _save_slot = g_config->getInt("save_slot", _save_slot); @@ -513,7 +517,13 @@ void GameDetector::parseCommandLine(int argc, char **argv) { } else long_option_value = true; - if (!strcmp (s, "multi-midi")) { + if (!strcmp (s, "atari-st")) { + _atari_st = long_option_value; + g_config->setBool ("atari_st", _atari_st); + } else if (!strcmp (s, "macintosh")) { + _macintosh = long_option_value; + g_config->setBool ("macintosh", _macintosh); + } else if (!strcmp (s, "multi-midi")) { _multi_midi = long_option_value; g_config->setBool ("multi_midi", _multi_midi); } else if (!strcmp (s, "native-mt32")) { diff --git a/common/gameDetector.h b/common/gameDetector.h index df43f68095..9641f6dc0a 100644 --- a/common/gameDetector.h +++ b/common/gameDetector.h @@ -124,6 +124,8 @@ public: int _music_volume; int _sfx_volume; bool _amiga; + bool _atari_st; + bool _macintosh; int _language; bool _demo_mode; diff --git a/scumm/resource.cpp b/scumm/resource.cpp index c07288924b..a979bfa4d5 100644 --- a/scumm/resource.cpp +++ b/scumm/resource.cpp @@ -1487,8 +1487,8 @@ int Scumm::readSoundResourceSmallHeader(int type, int idx) { wa_size = _fileHandle.readUint16LE(); _fileHandle.seek(wa_size - 2, SEEK_CUR); - //FIXME AD resources don't exist in Atari ST and Mac versions - if (_midiDriver == MD_ADLIB) { + if (!(_features & GF_ATARI_ST || _features & GF_MACINTOSH)) { + warning("Loader"); ad_offs = _fileHandle.pos(); ad_size = _fileHandle.readUint16LE(); } diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp index 53e6ba4c4b..7cb699d4d0 100644 --- a/scumm/saveload.cpp +++ b/scumm/saveload.cpp @@ -176,7 +176,7 @@ bool Scumm::loadState(int slot, bool compat, SaveFileManager *mgr) { else setupV1ZakPalette(); } else if (_features & GF_16COLOR) { - if (_features & GF_AMIGA) + if ((_features & GF_AMIGA) || (_features & GF_ATARI_ST)) setupAmigaPalette(); else setupEGAPalette(); diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp index b85ffa8438..db79e581a1 100644 --- a/scumm/script_v5.cpp +++ b/scumm/script_v5.cpp @@ -1057,7 +1057,7 @@ void Scumm_v5::o5_getActorX() { int a; getResultPos(); - if (_gameId == GID_INDY3) + if ((_gameId == GID_INDY3) && !(_features & GF_MACINTOSH)) a = getVarOrDirectByte(0x80); else a = getVarOrDirectWord(0x80); @@ -1069,7 +1069,7 @@ void Scumm_v5::o5_getActorY() { int a; getResultPos(); - if (_gameId == GID_INDY3) { + if ((_gameId == GID_INDY3) && !(_features & GF_MACINTOSH)) { a = getVarOrDirectByte(0x80); // WORKAROUND bug #636433 (can't get into Zeppelin) @@ -2496,7 +2496,7 @@ void Scumm_v5::o5_verbOps() { void Scumm_v5::o5_wait() { const byte *oldaddr = _scriptPointer - 1; - if (_gameId == GID_INDY3) { + if ((_gameId == GID_INDY3) && !(_features & GF_MACINTOSH)) { _opcode = 2; } else _opcode = fetchScriptByte(); diff --git a/scumm/scumm.h b/scumm/scumm.h index b82d967102..dd8bf89803 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -86,6 +86,8 @@ enum GameFeatures { GF_FMTOWNS = 1 << 16, GF_FEW_LOCALS = 1 << 17, GF_NES = 1 << 18, + GF_ATARI_ST = 1 << 19, + GF_MACINTOSH = 1 << 20, GF_EXTERNAL_CHARSET = GF_SMALL_HEADER }; diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index 382b758eaf..6901725373 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -234,6 +234,11 @@ Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) { if (detector->_amiga) detector->_game.features |= GF_AMIGA; + if (detector->_atari_st) + detector->_game.features |= GF_ATARI_ST; + if (detector->_macintosh) { + detector->_game.features |= GF_MACINTOSH; + } switch (detector->_game.version) { case 1: @@ -943,7 +948,7 @@ void Scumm::scummInit() { _roomPalette[i] = i; _shadowPalette[i] = i; } - if (_features & GF_AMIGA) + if ((_features & GF_AMIGA) || (_features & GF_ATARI_ST)) setupAmigaPalette(); else setupEGAPalette(); diff --git a/scumm/sound.cpp b/scumm/sound.cpp index e720f081f2..fbfdcc838b 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -436,7 +436,7 @@ void Sound::playSound(int soundID) { // Used in Amiga verisons of indy3ega and loom // Used in Mac. version of indy3ega - if (((_scumm->_features & GF_OLD_BUNDLE) && (_scumm->_gameId == GID_INDY3)) || ((_scumm->_features & GF_AMIGA) && (_scumm->_version == 3))) { + if (((_scumm->_features & GF_MACINTOSH) && (_scumm->_gameId == GID_INDY3)) || ((_scumm->_features & GF_AMIGA) && (_scumm->_version == 3))) { if (ptr[26] == 00) { size = READ_BE_UINT16(ptr + 12); rate = 3579545 / READ_BE_UINT16(ptr + 20); |