aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r--engines/sci/graphics/palette32.cpp3
-rw-r--r--engines/sci/graphics/plane32.cpp10
-rw-r--r--engines/sci/graphics/remap32.cpp3
3 files changed, 9 insertions, 7 deletions
diff --git a/engines/sci/graphics/palette32.cpp b/engines/sci/graphics/palette32.cpp
index ec3d912365..56e1940224 100644
--- a/engines/sci/graphics/palette32.cpp
+++ b/engines/sci/graphics/palette32.cpp
@@ -28,6 +28,7 @@
#include "sci/event.h"
#include "sci/resource.h"
#include "sci/util.h"
+#include "sci/engine/features.h"
#include "sci/graphics/palette32.h"
#include "sci/graphics/remap32.h"
#include "sci/graphics/screen.h"
@@ -557,7 +558,7 @@ void GfxPalette32::setCycle(const uint8 fromColor, const uint8 toColor, const in
}
uint16 numColorsToCycle = toColor - fromColor;
- if (getSciVersion() >= SCI_VERSION_2_1_MIDDLE || g_sci->getGameId() == GID_KQ7) {
+ if (g_sci->_features->hasNewPaletteCode()) {
numColorsToCycle += 1;
}
cycler->fromColor = fromColor;
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;
diff --git a/engines/sci/graphics/remap32.cpp b/engines/sci/graphics/remap32.cpp
index d5a2362f14..768594f974 100644
--- a/engines/sci/graphics/remap32.cpp
+++ b/engines/sci/graphics/remap32.cpp
@@ -21,6 +21,7 @@
*/
#include "sci/sci.h"
+#include "sci/engine/features.h"
#include "sci/graphics/palette32.h"
#include "sci/graphics/remap32.h"
@@ -300,7 +301,7 @@ GfxRemap32::GfxRemap32() :
// match the highest possible value of `_remapStartColor`
assert(_remapStartColor == 236);
- if (getSciVersion() >= SCI_VERSION_2_1_MIDDLE || g_sci->getGameId() == GID_KQ7) {
+ if (g_sci->_features->hasNewPaletteCode()) {
_remaps.resize(9);
} else {
_remaps.resize(19);