aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/he/script_v70he.cpp
diff options
context:
space:
mode:
authorTravis Howell2006-06-16 13:14:55 +0000
committerTravis Howell2006-06-16 13:14:55 +0000
commit40bfc71de8102c0391f08ddb5de6009d924f07f7 (patch)
tree0177ee3a2863dd1e9402933dc2899baa152bc852 /engines/scumm/he/script_v70he.cpp
parentf4d7226334bb09683e932df58ae80eddc1c11528 (diff)
downloadscummvm-rg350-40bfc71de8102c0391f08ddb5de6009d924f07f7.tar.gz
scummvm-rg350-40bfc71de8102c0391f08ddb5de6009d924f07f7.tar.bz2
scummvm-rg350-40bfc71de8102c0391f08ddb5de6009d924f07f7.zip
Fix rects in HE games, when positions are set by scripts
svn-id: r23146
Diffstat (limited to 'engines/scumm/he/script_v70he.cpp')
-rw-r--r--engines/scumm/he/script_v70he.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/scumm/he/script_v70he.cpp b/engines/scumm/he/script_v70he.cpp
index bbbc218fde..71a43c1a42 100644
--- a/engines/scumm/he/script_v70he.cpp
+++ b/engines/scumm/he/script_v70he.cpp
@@ -425,6 +425,15 @@ void ScummEngine_v70he::appendSubstring(int dst, int src, int srcOffs, int len)
writeArray(0, 0, dstOffs + i, 0);
}
+void ScummEngine_v70he::adjustRect(Common::Rect &rect) {
+ // Scripts can set all rect positions to -1
+ if (rect.right != -1)
+ rect.right += 1;
+
+ if (rect.bottom != -1)
+ rect.bottom += 1;
+}
+
void ScummEngine_v70he::o70_startSound() {
int var, value;
@@ -803,6 +812,7 @@ void ScummEngine_v70he::o70_kernelSetFunctions() {
_wiz->_rectOverride.top = args[2];
_wiz->_rectOverride.right = args[3];
_wiz->_rectOverride.bottom = args[4];
+ adjustRect(_wiz->_rectOverride);
break;
case 43:
_wiz->_rectOverrideEnabled = false;