diff options
author | Max Horn | 2003-03-05 19:04:34 +0000 |
---|---|---|
committer | Max Horn | 2003-03-05 19:04:34 +0000 |
commit | 5ffeedb1cbea471b3d902da96767ffad168023c5 (patch) | |
tree | 5ba28837ca5499b4ae6edcab35d5522c63612a1b /common | |
parent | f02506f9931c3b4d7eb97887e16228623461011b (diff) | |
download | scummvm-rg350-5ffeedb1cbea471b3d902da96767ffad168023c5.tar.gz scummvm-rg350-5ffeedb1cbea471b3d902da96767ffad168023c5.tar.bz2 scummvm-rg350-5ffeedb1cbea471b3d902da96767ffad168023c5.zip |
Patch #697312: Beneath a Steel Sky interim/initial support patch
svn-id: r6691
Diffstat (limited to 'common')
-rw-r--r-- | common/engine.cpp | 3 | ||||
-rw-r--r-- | common/engine.h | 2 | ||||
-rw-r--r-- | common/gameDetector.cpp | 6 | ||||
-rw-r--r-- | common/gameDetector.h | 6 |
4 files changed, 15 insertions, 2 deletions
diff --git a/common/engine.cpp b/common/engine.cpp index 69074d42d5..9602d24a59 100644 --- a/common/engine.cpp +++ b/common/engine.cpp @@ -87,6 +87,9 @@ Engine *Engine::createFromDetector(GameDetector *detector, OSystem *syst) } else if (detector->_gameId >= GID_SCUMM_FIRST && detector->_gameId <= GID_SCUMM_LAST) { // Some kind of Scumm game engine = Engine_SCUMM_create(detector, syst); + } else if (detector->_gameId >= GID_SKY_FIRST && detector->_gameId <= GID_SKY_LAST) { + // Beneath a Steel Sky + engine = Engine_SKY_create(detector, syst); } else { // Unknown game } diff --git a/common/engine.h b/common/engine.h index b71e42ac76..57306e5833 100644 --- a/common/engine.h +++ b/common/engine.h @@ -78,9 +78,11 @@ void checkHeap(); // 2) Faster (compiler doesn't have to parse lengthy header files) extern Engine *Engine_SIMON_create(GameDetector *detector, OSystem *syst); extern Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst); +extern Engine *Engine_SKY_create(GameDetector *detector, OSystem *syst); extern const VersionSettings *Engine_SIMON_targetList(); extern const VersionSettings *Engine_SCUMM_targetList(); +extern const VersionSettings *Engine_SKY_targetList(); #endif diff --git a/common/gameDetector.cpp b/common/gameDetector.cpp index c9d1e37608..9feaf9dca0 100644 --- a/common/gameDetector.cpp +++ b/common/gameDetector.cpp @@ -191,12 +191,16 @@ GameDetector::GameDetector() // Gather & combine the target lists from the modules const VersionSettings *scummVersions = Engine_SCUMM_targetList(); const VersionSettings *simonVersions = Engine_SIMON_targetList(); + const VersionSettings *skyVersions = Engine_SKY_targetList(); + int scummCount = countVersions(scummVersions); int simonCount = countVersions(simonVersions); + int skyCount = countVersions(skyVersions); - VersionSettings *v = (VersionSettings *)calloc(scummCount + simonCount + 1, sizeof(VersionSettings)); + VersionSettings *v = (VersionSettings *)calloc(scummCount + simonCount + skyCount + 1, sizeof(VersionSettings)); memcpy(v, scummVersions, scummCount * sizeof(VersionSettings)); memcpy(v+scummCount, simonVersions, simonCount * sizeof(VersionSettings)); + memcpy(v+skyCount, skyVersions, skyCount * sizeof(VersionSettings)); version_settings = v; } } diff --git a/common/gameDetector.h b/common/gameDetector.h index 472d00ef33..fa27c75835 100644 --- a/common/gameDetector.h +++ b/common/gameDetector.h @@ -40,7 +40,11 @@ enum GameId { // Simon the Sorcerer GID_SIMON_FIRST, - GID_SIMON_LAST = GID_SIMON_FIRST + 99 + GID_SIMON_LAST = GID_SIMON_FIRST + 99, + + // Beneath a Steel Sky + GID_SKY_FIRST, + GID_SKY_LAST = GID_SKY_FIRST + 99 }; // TODO: the GameFeatures really should be moved to scumm/scumm.h, too |