aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics
diff options
context:
space:
mode:
authorColin Snover2016-08-19 15:18:02 -0500
committerColin Snover2016-08-19 15:23:10 -0500
commit7f23c91de9a784ebbd92a566f9c20cfc2f8a7534 (patch)
tree8cc2cc3a638e855947e5dbdad43e96efe5131231 /engines/sci/graphics
parentda62a99a00c625886b1a3297387f1c164ce23861 (diff)
downloadscummvm-rg350-7f23c91de9a784ebbd92a566f9c20cfc2f8a7534.tar.gz
scummvm-rg350-7f23c91de9a784ebbd92a566f9c20cfc2f8a7534.tar.bz2
scummvm-rg350-7f23c91de9a784ebbd92a566f9c20cfc2f8a7534.zip
SCI32: Fix limited data range comparison warning
On at least DC platform, the ShowStyleType enum is fit to a 4-bit data size, so the 16-bit input value needs to be checked for validity *before* it is cast to a 4-bit ShowStyleType.
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r--engines/sci/graphics/transitions32.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/engines/sci/graphics/transitions32.cpp b/engines/sci/graphics/transitions32.cpp
index bceb0fa84d..37f608da85 100644
--- a/engines/sci/graphics/transitions32.cpp
+++ b/engines/sci/graphics/transitions32.cpp
@@ -203,10 +203,6 @@ void GfxTransitions32::kernelSetShowStyle(const uint16 argc, const reg_t planeOb
color = 0;
}
- if ((getSciVersion() < SCI_VERSION_2_1_MIDDLE && g_sci->getGameId() != GID_KQ7 && type == 15) || type > 15) {
- error("Illegal show style %d for plane %04x:%04x", type, PRINT_REG(planeObj));
- }
-
Plane *plane = g_sci->_gfxFrameout->getPlanes().findByObject(planeObj);
if (plane == nullptr) {
error("Plane %04x:%04x is not present in active planes list", PRINT_REG(planeObj));