diff options
author | Travis Howell | 2007-05-13 04:11:19 +0000 |
---|---|---|
committer | Travis Howell | 2007-05-13 04:11:19 +0000 |
commit | 1ef7c3dbad85da2896c8ffcf6fd6915f6867bff8 (patch) | |
tree | 258621cc50b09f85347b7426b0320b82ae42f613 /engines | |
parent | 1eef4cc7790191302f1e37756ac0288f5150de1e (diff) | |
download | scummvm-rg350-1ef7c3dbad85da2896c8ffcf6fd6915f6867bff8.tar.gz scummvm-rg350-1ef7c3dbad85da2896c8ffcf6fd6915f6867bff8.tar.bz2 scummvm-rg350-1ef7c3dbad85da2896c8ffcf6fd6915f6867bff8.zip |
Fix bug in original Simon the Sorcerer 2, the x position in invertBox() needs to be adjusted for scrolling locations.
svn-id: r26823
Diffstat (limited to 'engines')
-rw-r--r-- | engines/agos/verb.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/engines/agos/verb.cpp b/engines/agos/verb.cpp index 4142580184..9acd1b0113 100644 --- a/engines/agos/verb.cpp +++ b/engines/agos/verb.cpp @@ -842,22 +842,13 @@ void AGOSEngine::invertBox(HitArea * ha, byte a, byte b, byte c, byte d) { int w, h, i; _lockWord |= 0x8000; - src = getFrontBuf() + ha->y * _dxSurfacePitch + ha->x; + src = getFrontBuf() + ha->y * _dxSurfacePitch + (ha->x - _scrollX * 8); _litBoxFlag = true; w = ha->width; h = ha->height; - // Works around bug in original Simon the Sorcerer 2 - // Animations continue in background when load/save dialog is open - // often causing the savegame name highlighter to be cut short - if (!(h > 0 && w > 0 && ha->x + w <= _screenWidth && ha->y + h <= _screenHeight)) { - debug(1,"Invalid coordinates in invertBox (%d,%d,%d,%d)", ha->x, ha->y, ha->width, ha->height); - _lockWord &= ~0x8000; - return; - } - do { for (i = 0; i != w; ++i) { color = src[i]; |