Add atarist and macintosh options, since there seem to be no way to detect version been used.

svn-id: r9999
This commit is contained in:
Travis Howell 2003-09-05 07:36:05 +00:00
parent 7bc63a0ce3
commit 3187b565dd
8 changed files with 28 additions and 9 deletions

View File

@ -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")) {

View File

@ -124,6 +124,8 @@ public:
int _music_volume;
int _sfx_volume;
bool _amiga;
bool _atari_st;
bool _macintosh;
int _language;
bool _demo_mode;

View File

@ -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();
}

View File

@ -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();

View File

@ -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();

View File

@ -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
};

View File

@ -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();

View File

@ -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);