diff options
author | Colin Snover | 2016-10-19 12:57:08 -0500 |
---|---|---|
committer | Colin Snover | 2016-10-20 11:33:29 -0500 |
commit | 34bd1bcaa9246d6599819ff3ed1ab4c35812136d (patch) | |
tree | 9543804205b0bce0fdb4bfb4b0e1fbfe807ec79e /engines/sci/graphics/plane32.cpp | |
parent | 55222ec06c030a03d288b7ad476c5dbf1444a48b (diff) | |
download | scummvm-rg350-34bd1bcaa9246d6599819ff3ed1ab4c35812136d.tar.gz scummvm-rg350-34bd1bcaa9246d6599819ff3ed1ab4c35812136d.tar.bz2 scummvm-rg350-34bd1bcaa9246d6599819ff3ed1ab4c35812136d.zip |
SCI32: Split out detection of features that cross SSCI versions
Diffstat (limited to 'engines/sci/graphics/plane32.cpp')
-rw-r--r-- | engines/sci/graphics/plane32.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/sci/graphics/plane32.cpp b/engines/sci/graphics/plane32.cpp index 7dfaed4243..086a4a749b 100644 --- a/engines/sci/graphics/plane32.cpp +++ b/engines/sci/graphics/plane32.cpp @@ -21,6 +21,7 @@ */ #include "sci/console.h" +#include "sci/engine/features.h" #include "sci/engine/kernel.h" #include "sci/engine/selector.h" #include "sci/engine/state.h" @@ -191,7 +192,7 @@ void Plane::addPicInternal(const GuiResourceId pictureId, const Common::Point *p delete screenItem->_celObj; screenItem->_celObj = celObj; } - _type = (getSciVersion() == SCI_VERSION_3 && transparent) ? kPlaneTypeTransparentPicture : kPlaneTypePicture; + _type = (g_sci->_features->hasTransparentPicturePlanes() && transparent) ? kPlaneTypeTransparentPicture : kPlaneTypePicture; } GuiResourceId Plane::addPic(const GuiResourceId pictureId, const Common::Point &position, const bool mirrorX, const bool deleteDuplicate) { @@ -751,14 +752,13 @@ void Plane::setType() { _type = kPlaneTypeOpaque; break; case kPlanePicTransparentPicture: - if (getSciVersion() == SCI_VERSION_3) { - warning("TODO: Using transparent picture plane. Rendering may be incomplete"); + if (g_sci->_features->hasTransparentPicturePlanes()) { _type = kPlaneTypeTransparentPicture; break; } - // fall through for sci2/2.1 + // fall through for games without transparent picture planes default: - if (_type != kPlaneTypeTransparentPicture) { + if (!g_sci->_features->hasTransparentPicturePlanes() || _type != kPlaneTypeTransparentPicture) { _type = kPlaneTypePicture; } break; |