Preparations for removing GF_AFTER_V? flags

svn-id: r8364
This commit is contained in:
Max Horn 2003-06-06 22:51:33 +00:00
parent 15d58d9f52
commit 4b227da824
8 changed files with 114 additions and 110 deletions

View file

@ -82,21 +82,21 @@ Engine *Engine::createFromDetector(GameDetector *detector, OSystem *syst) {
Engine *engine = NULL; Engine *engine = NULL;
#ifndef DISABLE_SCUMM #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 // Some kind of Scumm game
engine = Engine_SCUMM_create(detector, syst); engine = Engine_SCUMM_create(detector, syst);
} }
#endif #endif
#ifndef DISABLE_SIMON #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 // Simon the Sorcerer
engine = Engine_SIMON_create(detector, syst); engine = Engine_SIMON_create(detector, syst);
} }
#endif #endif
#ifndef DISABLE_SKY #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 // Beneath a Steel Sky
engine = Engine_SKY_create(detector, syst); engine = Engine_SKY_create(detector, syst);
} }

View file

@ -148,7 +148,6 @@ static int countVersions(const VersionSettings *v) {
GameDetector::GameDetector() { GameDetector::GameDetector() {
_fullScreen = false; _fullScreen = false;
_gameId = 0;
_use_adlib = false; _use_adlib = false;
@ -168,7 +167,8 @@ GameDetector::GameDetector() {
_gameDataPath = 0; _gameDataPath = 0;
_gameTempo = 0; _gameTempo = 0;
_midi_driver = MD_AUTO; _midi_driver = MD_AUTO;
_features = 0; _game.id = 0;
_game.features = 0;
_multi_midi = false; _multi_midi = false;
_native_mt32 = false; _native_mt32 = false;
@ -289,26 +289,14 @@ void GameDetector::updateconfig() {
void GameDetector::list_games() { void GameDetector::list_games() {
const VersionSettings *v = version_settings; const VersionSettings *v = version_settings;
char config[4] = ""; const char *config;
printf("Game SCUMM ver Full Title Config\n" printf("Game SCUMM ver Full Title Config\n"
"------------- --------- ---------------------------------------------- -------\n"); "------------- --------- ---------------------------------------------- -------\n");
while (v->filename && v->gamename) { while (v->filename && v->gamename) {
if (g_config->has_domain(v->filename)) { config = (g_config->has_domain(v->filename)) ? "Yes" : "";
strcpy(config, "Yes"); printf("%-14s%-7s\t%-47s%s\n", v->filename, "n/a", v->gamename, config);
}
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);
v++; v++;
} }
@ -578,26 +566,22 @@ bool GameDetector::parseMusicDriver(const char *s) {
bool GameDetector::detectGame() { bool GameDetector::detectGame() {
const VersionSettings *gnl = version_settings; const VersionSettings *gnl = version_settings;
const char *realGame, *basename; const char *realGame, *basename;
_gameId = 0; _game.id = 0;
_gameText.clear(); _gameText.clear();
if (!(realGame = g_config->get("gameid"))) realGame = g_config->get("gameid");
if (!realGame)
realGame = _gameFileName.c_str(); realGame = _gameFileName.c_str();
printf("Looking for %s\n", realGame); printf("Looking for %s\n", realGame);
do { do {
if (!scumm_stricmp(realGame, gnl->filename)) { if (!scumm_stricmp(realGame, gnl->filename)) {
_gameId = gnl->id; _game = *gnl;
if ((basename = g_config->get("basename"))) if ((basename = g_config->get("basename"))) {
_gameRealName = basename; // FIXME: What is this good for?
else _game.filename = basename;
_gameRealName = gnl->filename; }
_features = gnl->features;
_gameText = gnl->gamename; _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; return true;
} }
@ -633,7 +617,7 @@ int GameDetector::detectMain() {
* default, OR if the game is an older game that doesn't * default, OR if the game is an older game that doesn't
* support anything else anyway. */ * support anything else anyway. */
#ifndef __PALM_OS__ // currently adlib is not supported, is this really needed ? #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; _midi_driver = MD_ADLIB;
_use_adlib = true; _use_adlib = true;
} }
@ -668,7 +652,7 @@ OSystem *GameDetector::createSystem() {
#elif defined(X11_BACKEND) #elif defined(X11_BACKEND)
return OSystem_X11_create(); return OSystem_X11_create();
#elif defined(__MORPHOS__) #elif defined(__MORPHOS__)
return OSystem_MorphOS_create(_gameId, _gfx_mode, _fullScreen); return OSystem_MorphOS_create(_game.id, _gfx_mode, _fullScreen);
#elif defined(_WIN32_WCE) #elif defined(_WIN32_WCE)
return OSystem_WINCE3_create(); return OSystem_WINCE3_create();
#elif defined(MACOS_CARBON) #elif defined(MACOS_CARBON)

View file

@ -100,7 +100,7 @@ enum GameFeatures {
struct VersionSettings { struct VersionSettings {
const char *filename; const char *filename;
const char *gamename; const char *gamename;
byte id, major, middle, minor; byte id, version;
uint32 features; uint32 features;
char *detectname; char *detectname;
}; };
@ -142,7 +142,6 @@ public:
const String& getGameName(void); const String& getGameName(void);
bool _fullScreen; bool _fullScreen;
byte _gameId;
bool _use_adlib; bool _use_adlib;
@ -162,10 +161,9 @@ public:
char *_gameDataPath; char *_gameDataPath;
int _gameTempo; int _gameTempo;
int _midi_driver; int _midi_driver;
String _gameFileName; String _gameFileName;
String _gameText; VersionSettings _game;
String _gameRealName;
uint32 _features;
int _gfx_mode; int _gfx_mode;
bool _default_gfx_mode; bool _default_gfx_mode;
@ -187,6 +185,8 @@ public:
void updateconfig(); void updateconfig();
protected: protected:
String _gameText;
bool detectGame(void); bool detectGame(void);
bool parseMusicDriver(const char *s); bool parseMusicDriver(const char *s);
int parseLanguage(const char *s); int parseLanguage(const char *s);

View file

@ -213,7 +213,7 @@ int main(int argc, char *argv[]) {
// See if the game should default to 1x scaler // See if the game should default to 1x scaler
if ((detector._default_gfx_mode) && 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; prop.gfx_mode = GFX_NORMAL;
system->property(OSystem::PROP_SET_GFX_MODE, &prop); system->property(OSystem::PROP_SET_GFX_MODE, &prop);
} }

View file

@ -446,7 +446,10 @@ protected:
uint16 _mouseButStat; uint16 _mouseButStat;
byte _leftBtnPressed, _rightBtnPressed; 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 // Various options useful for debugging
bool _dumpScripts; bool _dumpScripts;

View file

@ -87,96 +87,96 @@ static const VersionSettings scumm_settings[] = {
/* Scumm Version 1 */ /* Scumm Version 1 */
/* Scumm Version 2 */ /* 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"}, 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"}, 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 */ /* 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"}, 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"}, 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"}, 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"}, 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 */ /* 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"}, 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"}, GF_AFTER_V4 | GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR | GF_ADLIB_DEFAULT, "000.LFL"},
/* Scumm version 5 */ /* 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"}, 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"}, 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}, 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}, 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}, 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}, 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}, 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}, 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}, 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}, GF_AFTER_V5 | GF_USE_KEY | GF_ADLIB_DEFAULT, 0},
/* Scumm Version 6 */ /* 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}, 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}, 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}, 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}, 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}, 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}, 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}, 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}, 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}, 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}, 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}, 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}, 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}, 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}, 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 */ /* 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}, GF_NEW_OPCODES | GF_AFTER_V6 | GF_AFTER_HEV7 | GF_USE_KEY | GF_HUMONGOUS | GF_NEW_COSTUMES, 0},
/* Scumm Version 7 */ /* 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}, 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}, GF_NEW_OPCODES | GF_AFTER_V6 | GF_AFTER_V7 | GF_NEW_COSTUMES, 0},
/* Scumm Version 8 */ /* 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}, 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() { const VersionSettings *Engine_SCUMM_targetList() {
@ -187,24 +187,34 @@ Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) {
Engine *engine; Engine *engine;
if (detector->_amiga) if (detector->_amiga)
detector->_features |= GF_AMIGA; detector->_game.features |= GF_AMIGA;
if (detector->_features & GF_AFTER_V8) switch (detector->_game.version) {
engine = new Scumm_v8(detector, syst); case 1:
else if (detector->_features & GF_AFTER_V7) case 2:
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)
engine = new Scumm_v2(detector, syst); 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"); error("Engine_SCUMM_create(): Unknown version of game engine");
}
return engine; return engine;
} }
@ -546,10 +556,17 @@ Scumm::Scumm (GameDetector *detector, OSystem *syst)
_debugLevel = detector->_debugLevel; _debugLevel = detector->_debugLevel;
_dumpScripts = detector->_dumpScripts; _dumpScripts = detector->_dumpScripts;
_bootParam = detector->_bootParam; _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 _exe_name = strdup(detector->_gameRealName.c_str()); // FIXME: probably should use String class here
_game_name = strdup(detector->_gameFileName.c_str()); _game_name = strdup(detector->_gameFileName.c_str());
_gameId = detector->_gameId; _gameId = detector->_gameId;
setFeatures (detector->_features); setFeatures (detector->_features);
#endif
_noSubtitles = detector->_noSubtitles; _noSubtitles = detector->_noSubtitles;
_defaultTalkDelay = detector->_talkSpeed; _defaultTalkDelay = detector->_talkSpeed;
_use_adlib = detector->_use_adlib; _use_adlib = detector->_use_adlib;

View file

@ -38,18 +38,18 @@ extern bool draw_keyboard;
static const VersionSettings simon_settings[] = { static const VersionSettings simon_settings[] = {
// Simon the Sorcerer 1 & 2 (not SCUMM games) // Simon the Sorcerer 1 & 2 (not SCUMM games)
{"simon1dos", "Simon the Sorcerer 1 (DOS)", GID_SIMON_FIRST, 99, 99, 99, GAME_SIMON1DOS, "GAMEPC"}, {"simon1dos", "Simon the Sorcerer 1 (DOS)", GID_SIMON_FIRST, 99, GAME_SIMON1DOS, "GAMEPC"},
{"simon1amiga", "Simon the Sorcerer 1 (Amiga)", GID_SIMON_FIRST, 99, 99, 99, GAME_SIMON1AMIGA, "gameamiga"}, {"simon1amiga", "Simon the Sorcerer 1 (Amiga)", GID_SIMON_FIRST, 99, GAME_SIMON1AMIGA, "gameamiga"},
{"simon2dos", "Simon the Sorcerer 2 (DOS)", GID_SIMON_FIRST, 99, 99, 99, GAME_SIMON2DOS, "GAME32"}, {"simon2dos", "Simon the Sorcerer 2 (DOS)", GID_SIMON_FIRST, 99, GAME_SIMON2DOS, "GAME32"},
{"simon1talkie", "Simon the Sorcerer 1 Talkie (DOS)", GID_SIMON_FIRST, 99, 99, 99, GAME_SIMON1TALKIE, "SIMON.GME"}, {"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, 99, 99, GAME_SIMON2TALKIE, "GSPTR30"}, {"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, 99, 99, GAME_SIMON1WIN, "SIMON.GME"}, {"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, 99, 99, GAME_SIMON1CD32, "gameamiga"}, {"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, 99, 99, GAME_SIMON2WIN, "GSPTR30"}, {"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, 99, 99, GAME_SIMON2MAC, "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, 99, 99, GAME_SIMON1DEMO, "GDEMO"}, {"simon1demo", "Simon the Sorcerer 1 (DOS Demo)", GID_SIMON_FIRST, 99, GAME_SIMON1DEMO, "GDEMO"},
{NULL, NULL, 0, 0, 0, 0, 0, NULL} {NULL, NULL, 0, 0, 0, NULL}
}; };
const VersionSettings *Engine_SIMON_targetList() { const VersionSettings *Engine_SIMON_targetList() {
@ -418,7 +418,7 @@ SimonEngine::SimonEngine(GameDetector *detector, OSystem *syst)
if (ret) if (ret)
warning ("MIDI Player init failed: \"%s\"", midi.getErrorName (ret)); warning ("MIDI Player init failed: \"%s\"", midi.getErrorName (ret));
_game = (byte)detector->_features; _game = (byte)detector->_game.features;
// Setup mixer // Setup mixer
if (!_mixer->bindToSystem(syst)) if (!_mixer->bindToSystem(syst))

View file

@ -40,8 +40,8 @@ extern bool draw_keyboard;
static const VersionSettings sky_settings[] = { static const VersionSettings sky_settings[] = {
/* Beneath a Steel Sky */ /* Beneath a Steel Sky */
{"sky", "Beneath a Steel Sky", GID_SKY_FIRST, 99, 99, 99, 0, "sky.dsk" }, {"sky", "Beneath a Steel Sky", GID_SKY_FIRST, 99, 0, "sky.dsk" },
{NULL, NULL, 0, 0, 0, 0, 0, NULL} {NULL, NULL, 0, 0, 0, NULL}
}; };
const VersionSettings *Engine_SKY_targetList() { const VersionSettings *Engine_SKY_targetList() {
@ -59,7 +59,7 @@ SystemVars SkyState::_systemVars = {0, 0, 0, 0, 4316};
SkyState::SkyState(GameDetector *detector, OSystem *syst) SkyState::SkyState(GameDetector *detector, OSystem *syst)
: Engine(detector, syst) { : Engine(detector, syst) {
_game = detector->_gameId; _game = detector->_game.id;
if (!_mixer->bindToSystem(syst)) if (!_mixer->bindToSystem(syst))
warning("Sound initialisation failed."); warning("Sound initialisation failed.");