aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/features.cpp8
-rw-r--r--engines/sci/engine/features.h2
-rw-r--r--engines/sci/graphics/plane32.cpp6
3 files changed, 13 insertions, 3 deletions
diff --git a/engines/sci/engine/features.cpp b/engines/sci/engine/features.cpp
index 06fa046228..df57655d8a 100644
--- a/engines/sci/engine/features.cpp
+++ b/engines/sci/engine/features.cpp
@@ -628,6 +628,14 @@ MessageTypeSyncStrategy GameFeatures::getMessageTypeSyncStrategy() const {
return kMessageTypeSyncStrategyNone;
}
+int GameFeatures::detectPlaneIdBase() {
+ if (getSciVersion() == SCI_VERSION_2 &&
+ g_sci->getGameId() != GID_PQ4)
+ return 0;
+ else
+ return 20000;
+}
+
bool GameFeatures::autoDetectMoveCountType() {
// Look up the script address
reg_t addr = getDetectionAddr("Motion", SELECTOR(doit));
diff --git a/engines/sci/engine/features.h b/engines/sci/engine/features.h
index 7a1c6f59aa..d776495c2f 100644
--- a/engines/sci/engine/features.h
+++ b/engines/sci/engine/features.h
@@ -228,6 +228,8 @@ public:
*/
MoveCountType detectMoveCountType();
+ int detectPlaneIdBase();
+
bool handleMoveCount() { return detectMoveCountType() == kIncrementMoveCount; }
bool usesCdTrack() { return _usesCdTrack; }
diff --git a/engines/sci/graphics/plane32.cpp b/engines/sci/graphics/plane32.cpp
index 46a8aedbb0..c85965e755 100644
--- a/engines/sci/graphics/plane32.cpp
+++ b/engines/sci/graphics/plane32.cpp
@@ -44,8 +44,8 @@ void DrawList::add(ScreenItem *screenItem, const Common::Rect &rect) {
#pragma mark -
#pragma mark Plane
-uint16 Plane::_nextObjectId = 20000;
-uint32 Plane::_nextCreationId = 0;
+uint16 Plane::_nextObjectId; // Will be initialized in Plane::init()
+uint32 Plane::_nextCreationId; // ditto
Plane::Plane(const Common::Rect &gameRect, PlanePictureCodes pictureId) :
_creationId(_nextCreationId++),
@@ -132,7 +132,7 @@ void Plane::operator=(const Plane &other) {
}
void Plane::init() {
- _nextObjectId = 20000;
+ _nextObjectId = g_sci->_features->detectPlaneIdBase();
_nextCreationId = 0;
}