aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/graphics/frameout.cpp11
-rw-r--r--engines/sci/graphics/view.cpp2
2 files changed, 10 insertions, 3 deletions
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index b0d1315d2e..2c00f23066 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -63,8 +63,15 @@ void GfxFrameout::kernelAddPlane(reg_t object) {
if (_planes.empty()) {
// There has to be another way for sierra sci to do this or maybe script resolution is compiled into
// interpreter (TODO)
- scriptsRunningHeight = readSelectorValue(_segMan, object, SELECTOR(resY));
- scriptsRunningWidth = readSelectorValue(_segMan, object, SELECTOR(resX));
+ uint16 tmpRunningWidth = readSelectorValue(_segMan, object, SELECTOR(resX));
+ uint16 tmpRunningHeight = readSelectorValue(_segMan, object, SELECTOR(resY));
+
+ // The above can be 0 in SCI3 (e.g. Phantasmagoria 2)
+ if (tmpRunningWidth > 0 && tmpRunningHeight > 0) {
+ scriptsRunningWidth = tmpRunningWidth;
+ scriptsRunningHeight = tmpRunningHeight;
+ }
+
_coordAdjuster->setScriptsResolution(scriptsRunningWidth, scriptsRunningHeight);
}
diff --git a/engines/sci/graphics/view.cpp b/engines/sci/graphics/view.cpp
index 36d48fe3c9..9513b11811 100644
--- a/engines/sci/graphics/view.cpp
+++ b/engines/sci/graphics/view.cpp
@@ -217,7 +217,7 @@ void GfxView::initData(GuiResourceId resourceId) {
case 0:
break; // don't do anything, we already have _isScaleable set
default:
- error("unsupported flags byte inside sci1.1 view");
+ error("unsupported flags byte (%d) inside sci1.1 view", _resourceData[3]);
break;
}