aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2009-05-14 11:11:56 +0000
committerFilippos Karapetis2009-05-14 11:11:56 +0000
commit4ec6c4127fec21a4c24e1d98bb93459a5dd182f5 (patch)
treeb1e491a35d910fb6c4d2ad9add10281ec08f7a98 /engines
parent891a8fae05d81f7cbc8da1e191e2da84107e0737 (diff)
downloadscummvm-rg350-4ec6c4127fec21a4c24e1d98bb93459a5dd182f5.tar.gz
scummvm-rg350-4ec6c4127fec21a4c24e1d98bb93459a5dd182f5.tar.bz2
scummvm-rg350-4ec6c4127fec21a4c24e1d98bb93459a5dd182f5.zip
Added a feature flag for the SCI1.1 behavior of kSetCursor() in Eco 1 and KQ5 CD. Some cleanup
svn-id: r40554
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/detection.cpp10
-rw-r--r--engines/sci/engine/kgraphics.cpp5
-rw-r--r--engines/sci/engine/ksound.cpp4
-rw-r--r--engines/sci/sci.h16
-rw-r--r--engines/sci/scicore/versions.h5
5 files changed, 19 insertions, 21 deletions
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index 04cd9e914a..3852feadc5 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -452,7 +452,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "28fe9b4f0567e71feb198bc9f3a2c605", 1241816},
{"resource.003", 0, "f3146df0ad4297f5ce35aa8c4753bf6c", 586832},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
- 0,
+ GF_SCI1_NEWSETCURSOR,
SCI_VERSION_AUTODETECT,
SCI_VERSION(1, 0, 510)
},
@@ -465,7 +465,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "323b3b12f43d53f27d259beb225f0aa7", 1129316},
{"resource.003", 0, "83ac03e4bddb2c1ac2d36d2a587d0536", 1145616},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
- 0,
+ GF_SCI1_NEWSETCURSOR,
SCI_VERSION_AUTODETECT,
SCI_VERSION(1, 0, 510)
},
@@ -478,7 +478,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "02d7d0411f7903aacb3bc8b0f8ca8a9a", 1202581},
{"resource.003", 0, "84dd11b6825255671c703aee5ceff620", 1175835},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0},
- 0,
+ GF_SCI1_NEWSETCURSOR,
SCI_VERSION_AUTODETECT,
SCI_VERSION(1, 0, 510)
},
@@ -492,7 +492,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "2d21a1d2dcbffa551552e3e0725d2284", 1186033},
{"resource.003", 0, "84dd11b6825255671c703aee5ceff620", 1174993},
{NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0},
- 0,
+ GF_SCI1_NEWSETCURSOR,
SCI_VERSION_AUTODETECT,
SCI_VERSION(1, 0, 510)
},
@@ -958,7 +958,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "449471bfd77be52f18a3773c7f7d843d", 571368},
{"resource.001", 0, "b45a581ff8751e052c7e364f58d3617f", 16800210},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
- 0,
+ GF_SCI1_NEWSETCURSOR,
SCI_VERSION_AUTODETECT,
SCI_VERSION(1, 000, 784)
},
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index c7e0102d18..e6ec13b0e2 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -309,10 +309,7 @@ reg_t kSetCursor(EngineState *s, int funct_nr, int argc, reg_t *argv) {
}
case 2 :
case 4 :
- if (s->version >= SCI_VERSION(1, 1, 0) ||
- s->_gameName.equalsIgnoreCase("eco") ||
- (s->_gameName.equalsIgnoreCase("KQ5") && s->version == SCI_VERSION(1, 000, 784)) // KQ5 CD
- ) {
+ if (s->version >= SCI_VERSION(1, 1, 0) || (s->flags & GF_SCI1_NEWSETCURSOR)) {
GFX_ASSERT(gfxop_set_pointer_position(s->gfx_state, Common::Point(UKPV(0), UKPV(1))));
} else {
if (SKPV_OR_ALT(1, 1)) {
diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp
index e6b2a688cb..db7c0651a7 100644
--- a/engines/sci/engine/ksound.cpp
+++ b/engines/sci/engine/ksound.cpp
@@ -136,7 +136,7 @@ void process_sound_events(EngineState *s) { /* Get all sound events, apply their
song_handle_t handle;
int cue;
- if (s->version >= SCI_VERSION_FTU_DOSOUND_VARIANT_1)
+ if (s->version >= SCI_VERSION(1,000,000))
return;
/* SCI01 and later explicitly poll for everything */
@@ -984,7 +984,7 @@ reg_t kDoSound_SCI1(EngineState *s, int funct_nr, int argc, reg_t *argv) {
reg_t kDoSound(EngineState *s, int funct_nr, int argc, reg_t *argv) {
if (s->version >= SCI_VERSION_FTU_DOSOUND_VARIANT_2)
return kDoSound_SCI1(s, funct_nr, argc, argv);
- else if (s->version >= SCI_VERSION_FTU_DOSOUND_VARIANT_1)
+ else if (s->version >= SCI_VERSION(1,000,000))
return kDoSound_SCI01(s, funct_nr, argc, argv);
else
return kDoSound_SCI0(s, funct_nr, argc, argv);
diff --git a/engines/sci/sci.h b/engines/sci/sci.h
index 5228e2adc8..79246af479 100644
--- a/engines/sci/sci.h
+++ b/engines/sci/sci.h
@@ -88,7 +88,7 @@ enum SciGameFlags {
** Also, old SCI versions assign 120 degrees to left & right, and 60 to up
** and down. Later versions use an even 90 degree distribution.
*/
- GF_SCI0_OLD = (1 << 0),
+ GF_SCI0_OLD = (1 << 0),
/* Applies to all versions before 0.000.502
** Old SCI versions used to interpret the third DrawPic() parameter inversely,
@@ -96,12 +96,12 @@ enum SciGameFlags {
** Also, they used 15 priority zones from 42 to 200 instead of 14 priority
** zones from 42 to 190.
*/
- GF_SCI0_OLDGFXFUNCS = (1 << 1),
+ GF_SCI0_OLDGFXFUNCS = (1 << 1),
/* Applies to all versions before 0.000.629
** Older SCI versions had simpler code for GetTime()
*/
- GF_SCI0_OLDGETTIME = (1 << 2),
+ GF_SCI0_OLDGETTIME = (1 << 2),
// ----------------------------------------------------------------------------
@@ -113,12 +113,18 @@ enum SciGameFlags {
** In later SCI1 versions, the argument of lofs[as]
** instructions is absolute rather than relative.
*/
- GF_LOFSABSOLUTE = (1 << 3),
+ GF_LOFSABSOLUTE = (1 << 3),
/* Applies to all versions from 1.000.510 onwards
** kDoSound() is different than in earlier SCI1 versions.
*/
- GF_NEWDOSOUND = (1 << 4)
+ GF_NEWDOSOUND = (1 << 4),
+
+ /*
+ ** Newer SCI1 games (like KQ5 CD and EcoQuest 1) use
+ ** different semantics in kSetCursor(), like SCI1.1 games
+ */
+ GF_SCI1_NEWSETCURSOR = (1 << 5)
};
// The 4 SCI0 engine generations (pre-395, pre-502, pre-629 and post-629)
diff --git a/engines/sci/scicore/versions.h b/engines/sci/scicore/versions.h
index 4739b7a3fb..b1eed18748 100644
--- a/engines/sci/scicore/versions.h
+++ b/engines/sci/scicore/versions.h
@@ -46,11 +46,6 @@ namespace Sci {
** - "FTU" means "First To Use"
*/
-#define SCI_VERSION_FTU_NEW_GETTIME SCI_VERSION(0,000,629)
-/* These versions of SCI has a different set of subfunctions in GetTime() */
-
-#define SCI_VERSION_FTU_DOSOUND_VARIANT_1 SCI_VERSION(1,000,000)
-
#define SCI_VERSION_FTU_LOFS_ABSOLUTE SCI_VERSION(1,000,200)
/* First version known to do this: ?
In later versions (SCI1 and beyond), the argument of lofs[as]