aboutsummaryrefslogtreecommitdiff
path: root/scumm/costume.cpp
diff options
context:
space:
mode:
authorMax Horn2002-11-19 01:45:08 +0000
committerMax Horn2002-11-19 01:45:08 +0000
commit24a1a2a369a1c74e143e3c2ee500d645d6fa6457 (patch)
tree94e368c8839ac1e5f4f3487a17ee1b0b5b627b92 /scumm/costume.cpp
parentce3cde15a027fd092d0d27fa165f0166d4ecb927 (diff)
downloadscummvm-rg350-24a1a2a369a1c74e143e3c2ee500d645d6fa6457.tar.gz
scummvm-rg350-24a1a2a369a1c74e143e3c2ee500d645d6fa6457.tar.bz2
scummvm-rg350-24a1a2a369a1c74e143e3c2ee500d645d6fa6457.zip
Patch #639699: SAM: Fix for graphics glitch
svn-id: r5601
Diffstat (limited to 'scumm/costume.cpp')
-rw-r--r--scumm/costume.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/scumm/costume.cpp b/scumm/costume.cpp
index 245d6a6ec5..256725a7fa 100644
--- a/scumm/costume.cpp
+++ b/scumm/costume.cpp
@@ -584,7 +584,7 @@ void CostumeRenderer::proc3()
_scaleIndexX = t + _scaleIndexXStep;
if (cost_scaleTable[t] < _scaleX) {
_xpos += _scaleIndexXStep;
- if (_xpos >= _vm->_realWidth)
+ if (_xpos < 0 || _xpos >= _vm->_realWidth)
return;
maskbit = revBitMask[_xpos & 7];
_backbuff_ptr += _scaleIndexXStep;
@@ -646,7 +646,7 @@ void CostumeRenderer::proc2()
_scaleIndexX = t + _scaleIndexXStep;
if (cost_scaleTable[t] < _scaleX) {
_xpos += _scaleIndexXStep;
- if (_xpos >= _vm->_realWidth)
+ if (_xpos < 0 || _xpos >= _vm->_realWidth)
return;
maskbit = revBitMask[_xpos & 7];
_backbuff_ptr += _scaleIndexXStep;
@@ -707,7 +707,7 @@ void CostumeRenderer::proc1()
_scaleIndexX = t + _scaleIndexXStep;
if (cost_scaleTable[t] < _scaleX) {
_xpos += _scaleIndexXStep;
- if (_xpos >= _vm->_realWidth)
+ if (_xpos < 0 || _xpos >= _vm->_realWidth)
return;
_backbuff_ptr += _scaleIndexXStep;
}
@@ -1180,7 +1180,7 @@ void CostumeRenderer::proc_special(Actor *a, byte mask2)
_scaleIndexX = t + _scaleIndexXStep;
if (cost_scaleTable[t] < _scaleX) {
_xpos += _scaleIndexXStep;
- if (_xpos >= _vm->_realWidth)
+ if (_xpos < 0 || _xpos >= _vm->_realWidth)
return;
maskbit = revBitMask[_xpos & 7];
_backbuff_ptr += _scaleIndexXStep;