aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/inter_v2.cpp
diff options
context:
space:
mode:
authorSven Hesse2007-04-09 14:00:23 +0000
committerSven Hesse2007-04-09 14:00:23 +0000
commit0d99a362e9323da21081da4719359ead62ce45d4 (patch)
tree37c8d26115eb3415fbec8624841dc517ceaaf09d /engines/gob/inter_v2.cpp
parent871e83d0705fc3a18a3cb4e7db1e77ee6481422f (diff)
downloadscummvm-rg350-0d99a362e9323da21081da4719359ead62ce45d4.tar.gz
scummvm-rg350-0d99a362e9323da21081da4719359ead62ce45d4.tar.bz2
scummvm-rg350-0d99a362e9323da21081da4719359ead62ce45d4.zip
Some fixes for the Gob3 demos
svn-id: r26435
Diffstat (limited to 'engines/gob/inter_v2.cpp')
-rw-r--r--engines/gob/inter_v2.cpp12
1 files changed, 8 insertions, 4 deletions
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();