From 0d99a362e9323da21081da4719359ead62ce45d4 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Mon, 9 Apr 2007 14:00:23 +0000 Subject: Some fixes for the Gob3 demos svn-id: r26435 --- engines/gob/inter_v2.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'engines/gob/inter_v2.cpp') diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp index 819ba6df11..222ce8ee2b 100644 --- a/engines/gob/inter_v2.cpp +++ b/engines/gob/inter_v2.cpp @@ -1409,10 +1409,14 @@ void Inter_v2::o2_scroll() { int16 curX; int16 curY; - startX = _vm->_parse->parseValExpr(); - startY = _vm->_parse->parseValExpr(); - endX = _vm->_parse->parseValExpr(); - endY = _vm->_parse->parseValExpr(); + startX = CLIP((int) _vm->_parse->parseValExpr(), 0, + _vm->_video->_surfWidth - 320); + startY = CLIP((int) _vm->_parse->parseValExpr(), 0, + _vm->_video->_surfHeight - 200); + endX = CLIP((int) _vm->_parse->parseValExpr(), 0, + _vm->_video->_surfWidth - 320); + endY = CLIP((int) _vm->_parse->parseValExpr(), 0, + _vm->_video->_surfHeight - 200); stepX = _vm->_parse->parseValExpr(); stepY = _vm->_parse->parseValExpr(); -- cgit v1.2.3