aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/detection.cpp54
-rw-r--r--engines/sci/engine/game.cpp9
-rw-r--r--engines/sci/engine/kernel.cpp2
-rw-r--r--engines/sci/engine/state.cpp1
-rw-r--r--engines/sci/engine/state.h1
-rw-r--r--engines/sci/sci.h5
6 files changed, 34 insertions, 38 deletions
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index 9633046fa2..04cd9e914a 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -121,7 +121,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "f3d1be7752d30ba60614533d531e2e98", 474},
{"resource.001", 0, "6fd05926c2199af0af6f72f90d0d7260", 126895},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
- GF_SCI0_OLDGFXFUNCS, // version is older than 0.000.502
+ GF_SCI0_BEFORE_502,
SCI_VERSION_AUTODETECT,
SCI_VERSION(0, 000, 453)
},
@@ -196,7 +196,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "39485580d34a72997f3d5b3aba4d24f1", 426},
{"resource.001", 0, "11391434f41c834090d7a1e9488ce936", 129739},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
- GF_SCI0_OLD | GF_SCI0_OLDGFXFUNCS, // version is older than 0.000.395 and 0.000.502
+ GF_SCI0_BEFORE_395,
SCI_VERSION_AUTODETECT,
SCI_VERSION(0, 0, 294)
},
@@ -603,7 +603,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "7ee6859ef74314f6d91938c3595348a9", 282},
{"resource.001", 0, "f1e680095424e31f7fae1255d36bacba", 40692},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
- 0,
+ GF_SCI0_BEFORE_629,
SCI_VERSION_AUTODETECT,
SCI_VERSION(0, 0, 506)
},
@@ -710,7 +710,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "e0dd44069a62a463fd124974b915f10d", 342309},
{"resource.003", 0, "e0dd44069a62a463fd124974b915f10d", 328912},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
- 0,
+ GF_SCI0_BEFORE_629,
SCI_VERSION_AUTODETECT,
SCI_VERSION(0, 000, 530)
},
@@ -720,7 +720,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "1034a218943d12f1f36e753fa10c95b8", 4386},
{"resource.001", 0, "e0dd44069a62a463fd124974b915f10d", 518308},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
- 0,
+ GF_SCI0_BEFORE_629,
SCI_VERSION_AUTODETECT,
SCI_VERSION(0, 000, 530)
},
@@ -732,7 +732,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.001", 0, "e0dd44069a62a463fd124974b915f10d", 218755},
{"resource.002", 0, "e0dd44069a62a463fd124974b915f10d", 439502},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0},
- 0,
+ GF_SCI0_BEFORE_629,
SCI_VERSION_AUTODETECT,
SCI_VERSION(0, 000, 519) // FIXME: some have 0.000.530, others x.yyy.zzz
},
@@ -744,7 +744,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.001", 0, "8f2dd70abe01112eca464cda818b5eb6", 98138},
{"resource.002", 0, "8f2dd70abe01112eca464cda818b5eb6", 196631},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
- 0,
+ GF_SCI0_BEFORE_629,
SCI_VERSION_AUTODETECT,
SCI_VERSION(0, 000, 572)
},
@@ -860,7 +860,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "77615c595388acf3d1df8e107bfb6b52", 707591},
{"resource.004", 0, "77615c595388acf3d1df8e107bfb6b52", 479562},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
- 0,
+ GF_SCI0_BEFORE_629,
SCI_VERSION_AUTODETECT,
SCI_VERSION(0, 000, 502)
},
@@ -876,7 +876,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "851a62d00972dc4002f472cc0d84e71d", 333777},
{"resource.007", 0, "851a62d00972dc4002f472cc0d84e71d", 341038},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
- GF_SCI0_OLD | GF_SCI0_OLDGFXFUNCS, // version is older than 0.000.395 and 0.000.502
+ GF_SCI0_BEFORE_395,
SCI_VERSION_AUTODETECT,
SCI_VERSION(0, 000, 274)
},
@@ -892,7 +892,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "0c8566848a76eea19a6d6220914030a7", 337288},
{"resource.007", 0, "0c8566848a76eea19a6d6220914030a7", 343882},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
- GF_SCI0_OLD | GF_SCI0_OLDGFXFUNCS, // version is older than 0.000.395 and 0.000.502
+ GF_SCI0_BEFORE_395,
SCI_VERSION_AUTODETECT,
SCI_VERSION(0, 000, 253)
},
@@ -1285,7 +1285,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "24c958bc922b07f91e25e8c93aa01fcf", 491230},
{"resource.003", 0, "685cd6c1e05a695ab1e0db826337ee2a", 553279},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
- 0,
+ GF_SCI0_BEFORE_629,
SCI_VERSION_AUTODETECT,
SCI_VERSION(0, 000, 510) // FIXME: some versions are v. 0.000.577
},
@@ -1364,7 +1364,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "a0d4a625311d307257da7fc43d00459d", 570356},
{"resource.004", 0, "a0d4a625311d307257da7fc43d00459d", 717844},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0},
- 0,
+ GF_SCI0_BEFORE_629,
SCI_VERSION_AUTODETECT,
SCI_VERSION(0, 000, 572)
},
@@ -1374,7 +1374,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "03dba704bb77da55a91ad27b5a3cac09", 528},
{"resource.001", 0, "9f5520f0297206928df0b0b36493cd33", 127532},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO},
- GF_SCI0_OLDGFXFUNCS, // version is older than 0.000.502
+ GF_SCI0_BEFORE_502,
SCI_VERSION_AUTODETECT,
SCI_VERSION(0, 000, 409) // FIXME: no version number in executable (x.yyy.zzz)
},
@@ -1389,7 +1389,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.005", 0, "4a24443a25e2b1492462a52809605dc2", 277732},
{"resource.006", 0, "4a24443a25e2b1492462a52809605dc2", 345683},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
- GF_SCI0_OLDGFXFUNCS, // version is older than 0.000.502
+ GF_SCI0_BEFORE_502,
SCI_VERSION_AUTODETECT,
SCI_VERSION(0, 000, 409)
},
@@ -1404,7 +1404,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.005", 0, "96033f57accfca903750413fd09193c8", 274953},
{"resource.006", 0, "96033f57accfca903750413fd09193c8", 345818},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
- GF_SCI0_OLD | GF_SCI0_OLDGFXFUNCS, // version is older than 0.000.395 and 0.000.502
+ GF_SCI0_BEFORE_395,
SCI_VERSION_AUTODETECT,
SCI_VERSION(0, 000, 343)
},
@@ -1433,7 +1433,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "f18441027154292836b973c655fa3175", 506807},
{"resource.004", 0, "f18441027154292836b973c655fa3175", 513651},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
- 0,
+ GF_SCI0_BEFORE_629,
SCI_VERSION_AUTODETECT,
SCI_VERSION(0, 000, 572)
},
@@ -1449,7 +1449,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "f18441027154292836b973c655fa3175", 282465},
{"resource.007", 0, "f18441027154292836b973c655fa3175", 257174},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
- 0,
+ GF_SCI0_BEFORE_629,
SCI_VERSION_AUTODETECT,
SCI_VERSION(0, 000, 572)
},
@@ -1461,7 +1461,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.001", 0, "f773d79b93dfd4052ec8c1cc64c1e6ab", 76525},
{"resource.002", 0, "f773d79b93dfd4052ec8c1cc64c1e6ab", 268299},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO},
- 0,
+ GF_SCI0_BEFORE_629,
SCI_VERSION_AUTODETECT,
SCI_VERSION(0, 0, 530)
},
@@ -1476,7 +1476,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "3827a9b17b926e12dcc336860f50612a", 587036},
{"resource.004", 0, "3827a9b17b926e12dcc336860f50612a", 691932},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0},
- 0,
+ GF_SCI0_BEFORE_629,
SCI_VERSION_AUTODETECT,
SCI_VERSION(0, 000, 572)
},
@@ -1490,7 +1490,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "65f1bdaa20f6d0470e9d969f22473873", 586921},
{"resource.004", 0, "65f1bdaa20f6d0470e9d969f22473873", 690826},
{NULL, 0, NULL, 0}}, Common::FR_FRA, Common::kPlatformPC, 0},
- 0,
+ GF_SCI0_BEFORE_629,
SCI_VERSION_AUTODETECT,
SCI_VERSION(0, 000, 572)
},
@@ -1986,7 +1986,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.005", 0, "77f02def3094af804fd2371db25b7100", 349899},
{"resource.006", 0, "77f02def3094af804fd2371db25b7100", 354991},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
- 0,
+ GF_SCI0_BEFORE_502,
SCI_VERSION_AUTODETECT,
SCI_VERSION(0, 000, 395)
},
@@ -1999,7 +1999,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "77f02def3094af804fd2371db25b7100", 546000},
{"resource.003", 0, "77f02def3094af804fd2371db25b7100", 591851},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
- 0,
+ GF_SCI0_BEFORE_502,
SCI_VERSION_AUTODETECT,
SCI_VERSION(0, 000, 490)
},
@@ -2011,7 +2011,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "77f02def3094af804fd2371db25b7100", 542897},
{"resource.003", 0, "77f02def3094af804fd2371db25b7100", 586857},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
- 0,
+ GF_SCI0_BEFORE_502,
SCI_VERSION_AUTODETECT,
SCI_VERSION(0, 000, 395)
},
@@ -2170,7 +2170,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "7ab2bf8e224b57f75e0cd6e4ba790761", 642203},
{"resource.004", 0, "7ab2bf8e224b57f75e0cd6e4ba790761", 641688},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
- 0,
+ GF_SCI0_BEFORE_629,
SCI_VERSION_AUTODETECT,
SCI_VERSION(0, 000, 566)
},
@@ -2188,7 +2188,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "69366c2a2f99917199fe1b60a4fee19d", 267852},
{"resource.007", 0, "7ab2bf8e224b57f75e0cd6e4ba790761", 272747},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
- 0,
+ GF_SCI0_BEFORE_629,
SCI_VERSION_AUTODETECT,
SCI_VERSION(0, 000, 566)
},
@@ -2554,7 +2554,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "ec66ac2b1ce58b2575ba00b65058de1a", 612},
{"resource.001", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 180245},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO},
- GF_SCI0_OLD, // version is older than 0.000.395
+ GF_SCI0_BEFORE_502,
SCI_VERSION_AUTODETECT,
SCI_VERSION(0, 000, 453)
},
@@ -2566,7 +2566,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 720244},
{"resource.003", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 688367},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
- GF_SCI0_OLD, // version is older than 0.000.395
+ GF_SCI0_BEFORE_502,
SCI_VERSION_AUTODETECT,
SCI_VERSION(0, 000, 453)
},
diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp
index c7909b76c1..ca88ff1731 100644
--- a/engines/sci/engine/game.cpp
+++ b/engines/sci/engine/game.cpp
@@ -386,15 +386,8 @@ static int create_class_table_sci0(EngineState *s) {
int script_init_engine(EngineState *s, sci_version_t version) {
int result;
- s->version = 0;
s->kernel_opt_flags = 0;
-
- if (!version) {
- s->version_lock_flag = 0;
- } else {
- s->version = version;
- s->version_lock_flag = 1; // Lock version
- }
+ s->version = version;
if (s->version >= SCI_VERSION(1, 001, 000))
result = create_class_table_sci11(s);
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index 8c4fc596ce..d22e04ea05 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -359,7 +359,7 @@ reg_t kGetTime(EngineState *s, int funct_nr, int argc, reg_t *argv) {
g_system->getTimeAndDate(loc_time);
start_time = g_system->getMillis() - s->game_start_time;
- if (argc && s->version < SCI_VERSION_FTU_NEW_GETTIME) { // Use old semantics
+ if (argc && s->flags & GF_SCI0_OLDGETTIME) { // Use old semantics
retval = loc_time.tm_sec + loc_time.tm_min * 60 + (loc_time.tm_hour % 12) * 3600;
debugC(2, kDebugLevelTime, "GetTime(timeofday) returns %d", retval);
return make_reg(0, retval);
diff --git a/engines/sci/engine/state.cpp b/engines/sci/engine/state.cpp
index 948e10ff71..a1f6c4096f 100644
--- a/engines/sci/engine/state.cpp
+++ b/engines/sci/engine/state.cpp
@@ -98,7 +98,6 @@ EngineState::EngineState() : _dirseeker(this) {
last_wait_time = 0;
- version_lock_flag = 0;
version = 0;
_fileHandles.resize(5);
diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h
index 8e7b92f5a1..1a98cc4349 100644
--- a/engines/sci/engine/state.h
+++ b/engines/sci/engine/state.h
@@ -194,7 +194,6 @@ public:
uint32 game_start_time; /**< The time at which the interpreter was started */
uint32 last_wait_time; /**< The last time the game invoked Wait() */
- byte version_lock_flag; /**< Set to 1 to disable any autodetection mechanisms */
sci_version_t version; /**< The approximated patchlevel of the version to emulate */
uint32 flags; /* Specific game flags */
diff --git a/engines/sci/sci.h b/engines/sci/sci.h
index 35d2f8d8f1..5228e2adc8 100644
--- a/engines/sci/sci.h
+++ b/engines/sci/sci.h
@@ -121,6 +121,11 @@ enum SciGameFlags {
GF_NEWDOSOUND = (1 << 4)
};
+// The 4 SCI0 engine generations (pre-395, pre-502, pre-629 and post-629)
+#define GF_SCI0_BEFORE_395 (GF_SCI0_OLD | GF_SCI0_OLDGFXFUNCS | GF_SCI0_OLDGETTIME)
+#define GF_SCI0_BEFORE_502 (GF_SCI0_OLDGFXFUNCS | GF_SCI0_OLDGETTIME)
+#define GF_SCI0_BEFORE_629 GF_SCI0_OLDGETTIME
+
class SciEngine : public Engine {
public:
SciEngine(OSystem *syst, const SciGameDescription *desc);