aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/controls32.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/graphics/controls32.cpp')
-rw-r--r--engines/sci/graphics/controls32.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/engines/sci/graphics/controls32.cpp b/engines/sci/graphics/controls32.cpp
index 7689655d1d..0cd924b38d 100644
--- a/engines/sci/graphics/controls32.cpp
+++ b/engines/sci/graphics/controls32.cpp
@@ -160,7 +160,6 @@ reg_t GfxControls32::kernelEditText(const reg_t controlObject) {
// Original engine did not have a QUIT event but we have to handle it
if (event.type == SCI_EVENT_QUIT) {
focused = false;
- break;
} else if (event.type == SCI_EVENT_MOUSE_PRESS && !editorPlaneRect.contains(event.mousePosSci)) {
focused = false;
} else if (event.type == SCI_EVENT_KEYBOARD) {
@@ -313,8 +312,8 @@ reg_t GfxControls32::kernelEditText(const reg_t controlObject) {
if (textChanged) {
editor.text.trim();
- SciString *string = _segMan->lookupString(textObject);
- string->fromString(editor.text);
+ SciArray &string = *_segMan->lookupArray(textObject);
+ string.fromString(editor.text);
}
return make_reg(0, textChanged);
@@ -400,7 +399,7 @@ ScrollWindow::ScrollWindow(SegManager *segMan, const Common::Rect &gameRect, con
const uint16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight;
Common::Rect bitmapRect(gameRect);
- mulinc(bitmapRect, Ratio(_gfxText32._scaledWidth, scriptWidth), Ratio(_gfxText32._scaledHeight, scriptHeight));
+ mulinc(bitmapRect, Ratio(_gfxText32._xResolution, scriptWidth), Ratio(_gfxText32._yResolution, scriptHeight));
_textRect.left = 2;
_textRect.top = 2;
@@ -441,6 +440,11 @@ void ScrollWindow::show() {
}
Plane *plane = g_sci->_gfxFrameout->getPlanes().findByObject(_plane);
+
+ if (plane == nullptr) {
+ error("[ScrollWindow::show]: Plane %04x:%04x not found", PRINT_REG(_plane));
+ }
+
plane->_screenItemList.add(_screenItem);
_visible = true;