aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/inter_v2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/gob/inter_v2.cpp')
-rw-r--r--engines/gob/inter_v2.cpp63
1 files changed, 51 insertions, 12 deletions
diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp
index c1efc42bb8..62b2f26c7b 100644
--- a/engines/gob/inter_v2.cpp
+++ b/engines/gob/inter_v2.cpp
@@ -1388,17 +1388,21 @@ void Inter_v2::o2_initScreen() {
width = _vm->_parse->parseValExpr();
height = _vm->_parse->parseValExpr();
+ _vm->_video->clearScreen();
+
// Lost in Time switches to 640x400x16 when showing the title screen
if (_vm->getGameType() == kGameTypeLostInTime) {
+
if (videoMode == 0x10) {
+
width = _vm->_width = 640;
height = _vm->_height = 400;
_vm->_global->_colorCount = 16;
- _vm->_system->beginGFXTransaction();
- _vm->_system->initSize(_vm->_width, _vm->_height);
- _vm->initCommonGFX(true);
- _vm->_system->endGFXTransaction();
+
+ _vm->_video->setSize(true);
+
} else if (_vm->_global->_videoMode == 0x10) {
+
if (width == -1)
width = 320;
if (height == -1)
@@ -1407,10 +1411,9 @@ void Inter_v2::o2_initScreen() {
_vm->_width = 320;
_vm->_height = 200;
_vm->_global->_colorCount = 256;
- _vm->_system->beginGFXTransaction();
- _vm->_system->initSize(_vm->_width, _vm->_height);
- _vm->initCommonGFX(false);
- _vm->_system->endGFXTransaction();
+
+ _vm->_video->setSize(false);
+
}
}
@@ -1428,10 +1431,46 @@ void Inter_v2::o2_initScreen() {
if (height > 0)
_vm->_video->_surfHeight = height;
- _vm->_video->_splitHeight1 =
- MIN<int16>(_vm->_height, _vm->_video->_surfHeight - offY);
- _vm->_video->_splitHeight2 = offY;
- _vm->_video->_splitStart = _vm->_video->_surfHeight - offY;
+ if (videoMode == 0x18) {
+
+ if (_vm->_video->_surfWidth < _vm->_width)
+ _vm->_video->_screenDeltaX = (_vm->_width - _vm->_video->_surfWidth) / 2;
+ else
+ _vm->_video->_screenDeltaX = 0;
+
+ _vm->_global->_mouseMinX = _vm->_video->_screenDeltaX;
+ _vm->_global->_mouseMaxX = _vm->_video->_screenDeltaX + _vm->_video->_surfWidth - 1;
+
+
+ int16 screenHeight = _vm->_video->_surfHeight;
+
+ _vm->_video->_surfHeight += offY;
+
+ _vm->_video->_splitHeight1 = MIN<int16>(_vm->_height, screenHeight - offY);
+ _vm->_video->_splitHeight2 = offY;
+ _vm->_video->_splitStart = screenHeight;
+
+ if ((_vm->_video->_surfHeight + offY) < _vm->_height)
+ _vm->_video->_screenDeltaY = (_vm->_height - (screenHeight + offY)) / 2;
+ else
+ _vm->_video->_screenDeltaY = 0;
+
+ _vm->_global->_mouseMaxY = (screenHeight + _vm->_video->_screenDeltaY) - offY - 1;
+ _vm->_global->_mouseMinY = _vm->_video->_screenDeltaY;
+
+ } else {
+ _vm->_video->_splitHeight1 = MIN<int16>(_vm->_height, _vm->_video->_surfHeight - offY);
+ _vm->_video->_splitHeight2 = offY;
+ _vm->_video->_splitStart = _vm->_video->_surfHeight - offY;
+
+ _vm->_video->_screenDeltaX = 0;
+ _vm->_video->_screenDeltaY = 0;
+
+ _vm->_global->_mouseMinX = 0;
+ _vm->_global->_mouseMinY = 0;
+ _vm->_global->_mouseMaxX = _vm->_width;
+ _vm->_global->_mouseMaxY = _vm->_height - _vm->_video->_splitHeight2 - 1;
+ }
_vm->_draw->closeScreen();
_vm->_util->clearPalette();