diff options
author | Max Horn | 2003-06-06 22:51:33 +0000 |
---|---|---|
committer | Max Horn | 2003-06-06 22:51:33 +0000 |
commit | 4b227da824c984fca082d2c6f90ed13cfaa0dd09 (patch) | |
tree | d5ef3ed3dd32861bce4a5a7a8b9588a909084240 | |
parent | 15d58d9f52d4e410b4aa1578bce549d21c9c25f3 (diff) | |
download | scummvm-rg350-4b227da824c984fca082d2c6f90ed13cfaa0dd09.tar.gz scummvm-rg350-4b227da824c984fca082d2c6f90ed13cfaa0dd09.tar.bz2 scummvm-rg350-4b227da824c984fca082d2c6f90ed13cfaa0dd09.zip |
Preparations for removing GF_AFTER_V? flags
svn-id: r8364
-rw-r--r-- | common/engine.cpp | 6 | ||||
-rw-r--r-- | common/gameDetector.cpp | 48 | ||||
-rw-r--r-- | common/gameDetector.h | 10 | ||||
-rw-r--r-- | common/main.cpp | 2 | ||||
-rw-r--r-- | scumm/scumm.h | 5 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 123 | ||||
-rw-r--r-- | simon/simon.cpp | 26 | ||||
-rw-r--r-- | sky/sky.cpp | 6 |
8 files changed, 115 insertions, 111 deletions
diff --git a/common/engine.cpp b/common/engine.cpp index dd6e208a88..d68b9e46da 100644 --- a/common/engine.cpp +++ b/common/engine.cpp @@ -82,21 +82,21 @@ Engine *Engine::createFromDetector(GameDetector *detector, OSystem *syst) { Engine *engine = NULL; #ifndef DISABLE_SCUMM - if (detector->_gameId >= GID_SCUMM_FIRST && detector->_gameId <= GID_SCUMM_LAST) { + if (detector->_game.id >= GID_SCUMM_FIRST && detector->_game.id <= GID_SCUMM_LAST) { // Some kind of Scumm game engine = Engine_SCUMM_create(detector, syst); } #endif #ifndef DISABLE_SIMON - if (detector->_gameId >= GID_SIMON_FIRST && detector->_gameId <= GID_SIMON_LAST) { + if (detector->_game.id >= GID_SIMON_FIRST && detector->_game.id <= GID_SIMON_LAST) { // Simon the Sorcerer engine = Engine_SIMON_create(detector, syst); } #endif #ifndef DISABLE_SKY - if (detector->_gameId >= GID_SKY_FIRST && detector->_gameId <= GID_SKY_LAST) { + if (detector->_game.id >= GID_SKY_FIRST && detector->_game.id <= GID_SKY_LAST) { // Beneath a Steel Sky engine = Engine_SKY_create(detector, syst); } diff --git a/common/gameDetector.cpp b/common/gameDetector.cpp index 6ecd7cdff0..aa5225b0ff 100644 --- a/common/gameDetector.cpp +++ b/common/gameDetector.cpp @@ -148,7 +148,6 @@ static int countVersions(const VersionSettings *v) { GameDetector::GameDetector() { _fullScreen = false; - _gameId = 0; _use_adlib = false; @@ -168,7 +167,8 @@ GameDetector::GameDetector() { _gameDataPath = 0; _gameTempo = 0; _midi_driver = MD_AUTO; - _features = 0; + _game.id = 0; + _game.features = 0; _multi_midi = false; _native_mt32 = false; @@ -289,26 +289,14 @@ void GameDetector::updateconfig() { void GameDetector::list_games() { const VersionSettings *v = version_settings; - char config[4] = ""; + const char *config; printf("Game SCUMM ver Full Title Config\n" "------------- --------- ---------------------------------------------- -------\n"); while (v->filename && v->gamename) { - if (g_config->has_domain(v->filename)) { - strcpy(config, "Yes"); - } - else { - strcpy(config, ""); - } - - if (v->major != 99) - printf("%-14s%d.%d.%d\t%-47s%s\n", v->filename, - v->major, v->middle, v->minor, v->gamename, config); - else - printf("%-14s%-7s\t%-47s%s\n", v->filename, "n/a", - v->gamename, config); - + config = (g_config->has_domain(v->filename)) ? "Yes" : ""; + printf("%-14s%-7s\t%-47s%s\n", v->filename, "n/a", v->gamename, config); v++; } @@ -578,27 +566,23 @@ bool GameDetector::parseMusicDriver(const char *s) { bool GameDetector::detectGame() { const VersionSettings *gnl = version_settings; const char *realGame, *basename; - _gameId = 0; + _game.id = 0; _gameText.clear(); - if (!(realGame = g_config->get("gameid"))) + realGame = g_config->get("gameid"); + if (!realGame) realGame = _gameFileName.c_str(); printf("Looking for %s\n", realGame); do { if (!scumm_stricmp(realGame, gnl->filename)) { - _gameId = gnl->id; - if ((basename = g_config->get("basename"))) - _gameRealName = basename; - else - _gameRealName = gnl->filename; - _features = gnl->features; + _game = *gnl; + if ((basename = g_config->get("basename"))) { + // FIXME: What is this good for? + _game.filename = basename; + } _gameText = gnl->gamename; - if (gnl->major != 99) - debug(1, "Trying to start game '%s', version %d.%d.%d", - gnl->gamename, gnl->major, gnl->middle, gnl->minor); - else - debug(1, "Trying to start game '%s'",gnl->gamename); + debug(1, "Trying to start game '%s'",gnl->gamename); return true; } } while ((++gnl)->filename); @@ -633,7 +617,7 @@ int GameDetector::detectMain() { * default, OR if the game is an older game that doesn't * support anything else anyway. */ #ifndef __PALM_OS__ // currently adlib is not supported, is this really needed ? - if ((_midi_driver == MD_AUTO && _features & GF_ADLIB_DEFAULT) || _features & GF_SMALL_HEADER) { + if ((_midi_driver == MD_AUTO && _game.features & GF_ADLIB_DEFAULT) || _game.features & GF_SMALL_HEADER) { _midi_driver = MD_ADLIB; _use_adlib = true; } @@ -668,7 +652,7 @@ OSystem *GameDetector::createSystem() { #elif defined(X11_BACKEND) return OSystem_X11_create(); #elif defined(__MORPHOS__) - return OSystem_MorphOS_create(_gameId, _gfx_mode, _fullScreen); + return OSystem_MorphOS_create(_game.id, _gfx_mode, _fullScreen); #elif defined(_WIN32_WCE) return OSystem_WINCE3_create(); #elif defined(MACOS_CARBON) diff --git a/common/gameDetector.h b/common/gameDetector.h index 15d28230e4..9330641ad7 100644 --- a/common/gameDetector.h +++ b/common/gameDetector.h @@ -100,7 +100,7 @@ enum GameFeatures { struct VersionSettings { const char *filename; const char *gamename; - byte id, major, middle, minor; + byte id, version; uint32 features; char *detectname; }; @@ -142,7 +142,6 @@ public: const String& getGameName(void); bool _fullScreen; - byte _gameId; bool _use_adlib; @@ -162,10 +161,9 @@ public: char *_gameDataPath; int _gameTempo; int _midi_driver; + String _gameFileName; - String _gameText; - String _gameRealName; - uint32 _features; + VersionSettings _game; int _gfx_mode; bool _default_gfx_mode; @@ -187,6 +185,8 @@ public: void updateconfig(); protected: + String _gameText; + bool detectGame(void); bool parseMusicDriver(const char *s); int parseLanguage(const char *s); diff --git a/common/main.cpp b/common/main.cpp index c220a0a137..658895c27d 100644 --- a/common/main.cpp +++ b/common/main.cpp @@ -213,7 +213,7 @@ int main(int argc, char *argv[]) { // See if the game should default to 1x scaler if ((detector._default_gfx_mode) && - (detector._features & GF_DEFAULT_TO_1X_SCALER)) { + (detector._game.features & GF_DEFAULT_TO_1X_SCALER)) { prop.gfx_mode = GFX_NORMAL; system->property(OSystem::PROP_SET_GFX_MODE, &prop); } diff --git a/scumm/scumm.h b/scumm/scumm.h index 8635913dd5..87521ef4fa 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -446,7 +446,10 @@ protected: uint16 _mouseButStat; byte _leftBtnPressed, _rightBtnPressed; - int _bootParam; // The bootparam, to be passed to the script 1, the bootscript + /** The bootparam, to be passed to the script 1, the bootscript. */ + int _bootParam; + + byte _version; // Various options useful for debugging bool _dumpScripts; diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index 46794acfc9..29ac074a52 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -87,96 +87,96 @@ static const VersionSettings scumm_settings[] = { /* Scumm Version 1 */ /* Scumm Version 2 */ - {"maniac", "Maniac Mansion", GID_MANIAC, 2, 0, 0, + {"maniac", "Maniac Mansion", GID_MANIAC, 2, GF_AFTER_V2 | GF_SMALL_HEADER | GF_USE_KEY | GF_SMALL_NAMES | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALLING, "00.LFL"}, - {"zak", "Zak McKracken and the Alien Mindbenders", GID_ZAK, 2, 0, 0, + {"zak", "Zak McKracken and the Alien Mindbenders", GID_ZAK, 2, GF_AFTER_V2 | GF_SMALL_HEADER | GF_USE_KEY | GF_SMALL_NAMES | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALLING, "00.LFL"}, /* Scumm Version 3 */ - {"indy3EGA", "Indiana Jones and the Last Crusade", GID_INDY3, 3, 0, 0, + {"indy3EGA", "Indiana Jones and the Last Crusade", GID_INDY3, 3, GF_AFTER_V3 | GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALLING | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE, "00.LFL"}, - {"indy3", "Indiana Jones and the Last Crusade (256)", GID_INDY3_256, 3, 0, 22, + {"indy3", "Indiana Jones and the Last Crusade (256)", GID_INDY3_256, 3, GF_AFTER_V3 | GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALLING | GF_OLD256 | GF_ADLIB_DEFAULT, "00.LFL"}, - {"zak256", "Zak McKracken and the Alien Mindbenders (256)", GID_ZAK256, 3, 0, 0, + {"zak256", "Zak McKracken and the Alien Mindbenders (256)", GID_ZAK256, 3, GF_AFTER_V3 | GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALLING | GF_OLD256 | GF_AUDIOTRACKS, "00.LFL"}, - {"loom", "Loom", GID_LOOM, 3, 5, 40, + {"loom", "Loom", GID_LOOM, 3, GF_AFTER_V3 | GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALLING | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE, "00.LFL"}, /* Scumm Version 4 */ - {"monkeyEGA", "Monkey Island 1 (EGA)", GID_MONKEY_EGA, 4, 0, 62, + {"monkeyEGA", "Monkey Island 1 (EGA)", GID_MONKEY_EGA, 4, GF_AFTER_V4 | GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR | GF_ADLIB_DEFAULT, "000.LFL"}, - {"pass", "Passport to Adventure", GID_MONKEY_EGA, 4, 0, 62, + {"pass", "Passport to Adventure", GID_MONKEY_EGA, 4, GF_AFTER_V4 | GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR | GF_ADLIB_DEFAULT, "000.LFL"}, /* Scumm version 5 */ - {"monkeyVGA", "Monkey Island 1 (256 color Floppy version)", GID_MONKEY_VGA, 5, 0, 16, + {"monkeyVGA", "Monkey Island 1 (256 color Floppy version)", GID_MONKEY_VGA, 4, GF_AFTER_V4 | GF_SMALL_HEADER | GF_USE_KEY | GF_ADLIB_DEFAULT, "000.LFL"}, - {"loomcd", "Loom (256 color CD version)", GID_LOOM256, 5, 1, 42, + {"loomcd", "Loom (256 color CD version)", GID_LOOM256, 4, GF_AFTER_V4 | GF_SMALL_HEADER | GF_USE_KEY | GF_AUDIOTRACKS | GF_ADLIB_DEFAULT, "000.LFL"}, - {"monkey", "Monkey Island 1", GID_MONKEY, 5, 2, 2, + {"monkey", "Monkey Island 1", GID_MONKEY, 5, GF_AFTER_V5 | GF_USE_KEY | GF_AUDIOTRACKS | GF_ADLIB_DEFAULT, 0}, - {"monkey1", "Monkey Island 1 (alt)", GID_MONKEY, 5, 2, 2, + {"monkey1", "Monkey Island 1 (alt)", GID_MONKEY, 5, GF_AFTER_V5 | GF_USE_KEY | GF_AUDIOTRACKS | GF_ADLIB_DEFAULT, 0}, - {"monkey2", "Monkey Island 2: LeChuck's revenge", GID_MONKEY2, 5, 2, 2, + {"monkey2", "Monkey Island 2: LeChuck's revenge", GID_MONKEY2, 5, GF_AFTER_V5 | GF_USE_KEY | GF_ADLIB_DEFAULT, 0}, - {"mi2demo", "Monkey Island 2: LeChuck's revenge (Demo)", GID_MONKEY2, 5, 2, 2, + {"mi2demo", "Monkey Island 2: LeChuck's revenge (Demo)", GID_MONKEY2, 5, GF_AFTER_V5 | GF_USE_KEY | GF_ADLIB_DEFAULT, 0}, - {"indydemo", "Indiana Jones and the Fate of Atlantis (FM Towns Demo)", GID_INDY4, 5, 2, 02, + {"indydemo", "Indiana Jones and the Fate of Atlantis (FM Towns Demo)", GID_INDY4, 5, GF_AFTER_V5 | GF_USE_KEY | GF_ADLIB_DEFAULT, 0}, - {"atlantis", "Indiana Jones and the Fate of Atlantis", GID_INDY4, 5, 5, 0, + {"atlantis", "Indiana Jones and the Fate of Atlantis", GID_INDY4, 5, GF_AFTER_V5 | GF_USE_KEY | GF_ADLIB_DEFAULT, 0}, - {"playfate", "Indiana Jones and the Fate of Atlantis (Demo)", GID_INDY4, 5, 5, 0, + {"playfate", "Indiana Jones and the Fate of Atlantis (Demo)", GID_INDY4, 5, GF_AFTER_V5 | GF_USE_KEY | GF_ADLIB_DEFAULT, 0}, - {"fate", "Indiana Jones and the Fate of Atlantis (Demo)", GID_INDY4, 5, 5, 0, + {"fate", "Indiana Jones and the Fate of Atlantis (Demo)", GID_INDY4, 5, GF_AFTER_V5 | GF_USE_KEY | GF_ADLIB_DEFAULT, 0}, /* Scumm Version 6 */ - {"puttputt", "Putt-Putt Joins The Parade (DOS)", GID_SAMNMAX, 6, 1, 1, + {"puttputt", "Putt-Putt Joins The Parade (DOS)", GID_SAMNMAX, 6, GF_NEW_OPCODES | GF_AFTER_V6 | GF_USE_KEY | GF_ADLIB_DEFAULT | GF_HUMONGOUS | GF_NEW_COSTUMES, 0}, - {"puttdemo", "Putt-Putt Joins The Parade (DOS Demo)", GID_PUTTDEMO, 6, 1, 1, + {"puttdemo", "Putt-Putt Joins The Parade (DOS Demo)", GID_PUTTDEMO, 6, GF_NEW_OPCODES | GF_AFTER_V6 | GF_USE_KEY | GF_ADLIB_DEFAULT | GF_HUMONGOUS, 0}, - {"moondemo", "Putt-Putt Goes To The Moon (DOS Demo)", GID_SAMNMAX, 6, 1, 1, + {"moondemo", "Putt-Putt Goes To The Moon (DOS Demo)", GID_SAMNMAX, 6, GF_NEW_OPCODES | GF_AFTER_V6 | GF_USE_KEY | GF_ADLIB_DEFAULT | GF_HUMONGOUS | GF_NEW_COSTUMES, 0}, - {"puttmoon", "Putt-Putt Goes To The Moon (DOS)", GID_SAMNMAX, 6, 1, 1, + {"puttmoon", "Putt-Putt Goes To The Moon (DOS)", GID_SAMNMAX, 6, GF_NEW_OPCODES | GF_AFTER_V6 | GF_USE_KEY | GF_ADLIB_DEFAULT | GF_HUMONGOUS | GF_NEW_COSTUMES, 0}, - {"funpack", "Putt-Putt's Fun Pack", GID_SAMNMAX, 6, 1, 1, + {"funpack", "Putt-Putt's Fun Pack", GID_SAMNMAX, 6, GF_NEW_OPCODES | GF_AFTER_V6 | GF_USE_KEY | GF_ADLIB_DEFAULT | GF_HUMONGOUS | GF_NEW_COSTUMES, 0}, - {"fbpack", "Fatty Bear's Fun Pack", GID_SAMNMAX, 6, 1, 1, + {"fbpack", "Fatty Bear's Fun Pack", GID_SAMNMAX, 6, GF_NEW_OPCODES | GF_AFTER_V6 | GF_USE_KEY | GF_ADLIB_DEFAULT | GF_HUMONGOUS | GF_NEW_COSTUMES, 0}, - {"fbear", "Fatty Bear's Birthday Surprise (DOS)", GID_SAMNMAX, 6, 1, 1, + {"fbear", "Fatty Bear's Birthday Surprise (DOS)", GID_SAMNMAX, 6, GF_NEW_OPCODES | GF_AFTER_V6 | GF_USE_KEY | GF_ADLIB_DEFAULT | GF_HUMONGOUS | GF_NEW_COSTUMES, 0}, - {"fbdemo", "Fatty Bear's Birthday Surprise (DOS Demo)", GID_SAMNMAX, 6, 1, 1, + {"fbdemo", "Fatty Bear's Birthday Surprise (DOS Demo)", GID_SAMNMAX, 6, GF_NEW_OPCODES | GF_AFTER_V6 | GF_USE_KEY | GF_ADLIB_DEFAULT | GF_HUMONGOUS | GF_NEW_COSTUMES, 0}, - {"tentacle", "Day Of The Tentacle", GID_TENTACLE, 6, 4, 2, + {"tentacle", "Day Of The Tentacle", GID_TENTACLE, 6, GF_NEW_OPCODES | GF_AFTER_V6 | GF_USE_KEY | GF_ADLIB_DEFAULT, 0}, - {"dottdemo", "Day Of The Tentacle (Demo)", GID_TENTACLE, 6, 3, 2, + {"dottdemo", "Day Of The Tentacle (Demo)", GID_TENTACLE, 6, GF_NEW_OPCODES | GF_AFTER_V6 | GF_USE_KEY | GF_ADLIB_DEFAULT, 0}, - {"samnmax", "Sam & Max", GID_SAMNMAX, 6, 4, 2, + {"samnmax", "Sam & Max", GID_SAMNMAX, 6, GF_NEW_OPCODES | GF_AFTER_V6 | GF_USE_KEY | GF_DRAWOBJ_OTHER_ORDER, 0}, - {"samdemo", "Sam & Max (Demo)", GID_SAMNMAX, 6, 3, 0, + {"samdemo", "Sam & Max (Demo)", GID_SAMNMAX, 6, GF_NEW_OPCODES | GF_AFTER_V6 | GF_USE_KEY | GF_DRAWOBJ_OTHER_ORDER | GF_ADLIB_DEFAULT, 0}, - {"snmdemo", "Sam & Max (Demo)", GID_SAMNMAX, 6, 5, 0, + {"snmdemo", "Sam & Max (Demo)", GID_SAMNMAX, 6, GF_NEW_OPCODES | GF_AFTER_V6 | GF_USE_KEY | GF_DRAWOBJ_OTHER_ORDER | GF_ADLIB_DEFAULT, 0}, - {"snmidemo", "Sam & Max (Interactive WIP Demo)", GID_SAMNMAX, 6, 5, 0, + {"snmidemo", "Sam & Max (Interactive WIP Demo)", GID_SAMNMAX, 6, GF_NEW_OPCODES | GF_AFTER_V6 | GF_USE_KEY | GF_DRAWOBJ_OTHER_ORDER | GF_ADLIB_DEFAULT, 0}, - {"test", "Test demo game", GID_SAMNMAX, 6, 6, 6, GF_NEW_OPCODES | GF_AFTER_V6, 0}, + {"test", "Test demo game", GID_SAMNMAX, 6, GF_NEW_OPCODES | GF_AFTER_V6, 0}, /* Humongous Entertainment Scumm Version 7 */ - {"farmdemo", "Let's Explore the Farm with Buzzy (Demo)", GID_SAMNMAX, 7, 0, 0, + {"farmdemo", "Let's Explore the Farm with Buzzy (Demo)", GID_SAMNMAX, 6, GF_NEW_OPCODES | GF_AFTER_V6 | GF_AFTER_HEV7 | GF_USE_KEY | GF_HUMONGOUS | GF_NEW_COSTUMES, 0}, /* Scumm Version 7 */ - {"ft", "Full Throttle", GID_FT, 7, 3, 0, + {"ft", "Full Throttle", GID_FT, 7, GF_NEW_OPCODES | GF_AFTER_V6 | GF_AFTER_V7 | GF_NEW_COSTUMES, 0}, - {"dig", "The Dig", GID_DIG, 7, 5, 0, + {"dig", "The Dig", GID_DIG, 7, GF_NEW_OPCODES | GF_AFTER_V6 | GF_AFTER_V7 | GF_NEW_COSTUMES, 0}, /* Scumm Version 8 */ - {"comi", "The Curse of Monkey Island", GID_CMI, 8, 1, 0, + {"comi", "The Curse of Monkey Island", GID_CMI, 8, GF_NEW_OPCODES | GF_AFTER_V6 | GF_AFTER_V7 | GF_AFTER_V8 | GF_NEW_COSTUMES | GF_DEFAULT_TO_1X_SCALER, 0}, - {NULL, NULL, 0, 0, 0, 0, 0, NULL} + {NULL, NULL, 0, 0, 0, NULL} }; const VersionSettings *Engine_SCUMM_targetList() { @@ -187,24 +187,34 @@ Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) { Engine *engine; if (detector->_amiga) - detector->_features |= GF_AMIGA; + detector->_game.features |= GF_AMIGA; - if (detector->_features & GF_AFTER_V8) - engine = new Scumm_v8(detector, syst); - else if (detector->_features & GF_AFTER_V7) - engine = new Scumm_v7(detector, syst); - else if (detector->_features & GF_AFTER_V6) - engine = new Scumm_v6(detector, syst); - else if (detector->_features & GF_AFTER_V5) - engine = new Scumm_v5(detector, syst); - else if (detector->_features & GF_AFTER_V4) - engine = new Scumm_v4(detector, syst); - else if (detector->_features & GF_AFTER_V3) - engine = new Scumm_v3(detector, syst); - else if (detector->_features & GF_AFTER_V2) + switch (detector->_game.version) { + case 1: + case 2: engine = new Scumm_v2(detector, syst); - else + break; + case 3: + engine = new Scumm_v3(detector, syst); + break; + case 4: + engine = new Scumm_v4(detector, syst); + break; + case 5: + engine = new Scumm_v5(detector, syst); + break; + case 6: + engine = new Scumm_v6(detector, syst); + break; + case 7: + engine = new Scumm_v7(detector, syst); + break; + case 8: + engine = new Scumm_v8(detector, syst); + break; + default: error("Engine_SCUMM_create(): Unknown version of game engine"); + } return engine; } @@ -546,10 +556,17 @@ Scumm::Scumm (GameDetector *detector, OSystem *syst) _debugLevel = detector->_debugLevel; _dumpScripts = detector->_dumpScripts; _bootParam = detector->_bootParam; +#if 1 + _exe_name = strdup(detector->_game.filename); + _game_name = strdup(detector->_gameFileName.c_str()); + _gameId = detector->_game.id; + setFeatures(detector->_game.features); +#else _exe_name = strdup(detector->_gameRealName.c_str()); // FIXME: probably should use String class here _game_name = strdup(detector->_gameFileName.c_str()); _gameId = detector->_gameId; setFeatures (detector->_features); +#endif _noSubtitles = detector->_noSubtitles; _defaultTalkDelay = detector->_talkSpeed; _use_adlib = detector->_use_adlib; diff --git a/simon/simon.cpp b/simon/simon.cpp index 8a62f013d2..ee6926d38c 100644 --- a/simon/simon.cpp +++ b/simon/simon.cpp @@ -38,18 +38,18 @@ extern bool draw_keyboard; static const VersionSettings simon_settings[] = { // Simon the Sorcerer 1 & 2 (not SCUMM games) - {"simon1dos", "Simon the Sorcerer 1 (DOS)", GID_SIMON_FIRST, 99, 99, 99, GAME_SIMON1DOS, "GAMEPC"}, - {"simon1amiga", "Simon the Sorcerer 1 (Amiga)", GID_SIMON_FIRST, 99, 99, 99, GAME_SIMON1AMIGA, "gameamiga"}, - {"simon2dos", "Simon the Sorcerer 2 (DOS)", GID_SIMON_FIRST, 99, 99, 99, GAME_SIMON2DOS, "GAME32"}, - {"simon1talkie", "Simon the Sorcerer 1 Talkie (DOS)", GID_SIMON_FIRST, 99, 99, 99, GAME_SIMON1TALKIE, "SIMON.GME"}, - {"simon2talkie", "Simon the Sorcerer 2 Talkie (DOS)", GID_SIMON_FIRST, 99, 99, 99, GAME_SIMON2TALKIE, "GSPTR30"}, - {"simon1win", "Simon the Sorcerer 1 Talkie (Windows)", GID_SIMON_FIRST, 99, 99, 99, GAME_SIMON1WIN, "SIMON.GME"}, - {"simon1cd32", "Simon the Sorcerer 1 Talkie (Amiga CD32)", GID_SIMON_FIRST, 99, 99, 99, GAME_SIMON1CD32, "gameamiga"}, - {"simon2win", "Simon the Sorcerer 2 Talkie (Windows)", GID_SIMON_FIRST, 99, 99, 99, GAME_SIMON2WIN, "GSPTR30"}, - {"simon2mac", "Simon the Sorcerer 2 Talkie (Amiga or Mac)", GID_SIMON_FIRST, 99, 99, 99, GAME_SIMON2MAC, "GSPTR30"}, - {"simon1demo", "Simon the Sorcerer 1 (DOS Demo)", GID_SIMON_FIRST, 99, 99, 99, GAME_SIMON1DEMO, "GDEMO"}, - - {NULL, NULL, 0, 0, 0, 0, 0, NULL} + {"simon1dos", "Simon the Sorcerer 1 (DOS)", GID_SIMON_FIRST, 99, GAME_SIMON1DOS, "GAMEPC"}, + {"simon1amiga", "Simon the Sorcerer 1 (Amiga)", GID_SIMON_FIRST, 99, GAME_SIMON1AMIGA, "gameamiga"}, + {"simon2dos", "Simon the Sorcerer 2 (DOS)", GID_SIMON_FIRST, 99, GAME_SIMON2DOS, "GAME32"}, + {"simon1talkie", "Simon the Sorcerer 1 Talkie (DOS)", GID_SIMON_FIRST, 99, GAME_SIMON1TALKIE, "SIMON.GME"}, + {"simon2talkie", "Simon the Sorcerer 2 Talkie (DOS)", GID_SIMON_FIRST, 99, GAME_SIMON2TALKIE, "GSPTR30"}, + {"simon1win", "Simon the Sorcerer 1 Talkie (Windows)", GID_SIMON_FIRST, 99, GAME_SIMON1WIN, "SIMON.GME"}, + {"simon1cd32", "Simon the Sorcerer 1 Talkie (Amiga CD32)", GID_SIMON_FIRST, 99, GAME_SIMON1CD32, "gameamiga"}, + {"simon2win", "Simon the Sorcerer 2 Talkie (Windows)", GID_SIMON_FIRST, 99, GAME_SIMON2WIN, "GSPTR30"}, + {"simon2mac", "Simon the Sorcerer 2 Talkie (Amiga or Mac)", GID_SIMON_FIRST, 99, GAME_SIMON2MAC, "GSPTR30"}, + {"simon1demo", "Simon the Sorcerer 1 (DOS Demo)", GID_SIMON_FIRST, 99, GAME_SIMON1DEMO, "GDEMO"}, + + {NULL, NULL, 0, 0, 0, NULL} }; const VersionSettings *Engine_SIMON_targetList() { @@ -418,7 +418,7 @@ SimonEngine::SimonEngine(GameDetector *detector, OSystem *syst) if (ret) warning ("MIDI Player init failed: \"%s\"", midi.getErrorName (ret)); - _game = (byte)detector->_features; + _game = (byte)detector->_game.features; // Setup mixer if (!_mixer->bindToSystem(syst)) diff --git a/sky/sky.cpp b/sky/sky.cpp index d4d6075638..bd402f826c 100644 --- a/sky/sky.cpp +++ b/sky/sky.cpp @@ -40,8 +40,8 @@ extern bool draw_keyboard; static const VersionSettings sky_settings[] = { /* Beneath a Steel Sky */ - {"sky", "Beneath a Steel Sky", GID_SKY_FIRST, 99, 99, 99, 0, "sky.dsk" }, - {NULL, NULL, 0, 0, 0, 0, 0, NULL} + {"sky", "Beneath a Steel Sky", GID_SKY_FIRST, 99, 0, "sky.dsk" }, + {NULL, NULL, 0, 0, 0, NULL} }; const VersionSettings *Engine_SKY_targetList() { @@ -59,7 +59,7 @@ SystemVars SkyState::_systemVars = {0, 0, 0, 0, 4316}; SkyState::SkyState(GameDetector *detector, OSystem *syst) : Engine(detector, syst) { - _game = detector->_gameId; + _game = detector->_game.id; if (!_mixer->bindToSystem(syst)) warning("Sound initialisation failed."); |