diff options
| author | Lars Skovlund | 2018-12-27 08:06:16 +0100 | 
|---|---|---|
| committer | Filippos Karapetis | 2018-12-28 11:55:32 +0200 | 
| commit | 4b6e0e0e7de7589f7e4ce09b7f4c77da45e4477a (patch) | |
| tree | bbbb0aaea918c665d2f687a8d85d0621c3a9045e /engines/sci/graphics | |
| parent | 45d852cbaf5e46982bb98fb6425c34cd68537be1 (diff) | |
| download | scummvm-rg350-4b6e0e0e7de7589f7e4ce09b7f4c77da45e4477a.tar.gz scummvm-rg350-4b6e0e0e7de7589f7e4ce09b7f4c77da45e4477a.tar.bz2 scummvm-rg350-4b6e0e0e7de7589f7e4ce09b7f4c77da45e4477a.zip  | |
SCI32: Add feature detection for plane id base
This provides a generic fix for AddScreenItem crashes in early SCI32
floppy games that have previously required individual script patches.
Diffstat (limited to 'engines/sci/graphics')
| -rw-r--r-- | engines/sci/graphics/plane32.cpp | 6 | 
1 files changed, 3 insertions, 3 deletions
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;  }  | 
