aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/sprites_eob.cpp
diff options
context:
space:
mode:
authorathrxx2011-09-29 22:51:36 +0200
committerJohannes Schickel2011-12-26 16:18:15 +0100
commit1cbd56693086afa8ce93092c3638e1052e31a5d9 (patch)
tree688d790cc5372ca9d2718ebc46c7a852bd6ac673 /engines/kyra/sprites_eob.cpp
parentac1aa43ca8b2ad9f2743006a5e40a7967a40fec5 (diff)
downloadscummvm-rg350-1cbd56693086afa8ce93092c3638e1052e31a5d9.tar.gz
scummvm-rg350-1cbd56693086afa8ce93092c3638e1052e31a5d9.tar.bz2
scummvm-rg350-1cbd56693086afa8ce93092c3638e1052e31a5d9.zip
KYRA: (EOB) - fix invalid string access
(also fix several cpp-check warnings)
Diffstat (limited to 'engines/kyra/sprites_eob.cpp')
-rw-r--r--engines/kyra/sprites_eob.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/kyra/sprites_eob.cpp b/engines/kyra/sprites_eob.cpp
index 2dc9405f72..6d8776f3b0 100644
--- a/engines/kyra/sprites_eob.cpp
+++ b/engines/kyra/sprites_eob.cpp
@@ -657,13 +657,13 @@ void EobCoreEngine::drawFlyingObjects(int index) {
flipped = fo->direction == ((_currentDirection + 1) & 3) ? 1 : 0;
} else {
shp = (_flightObjShpMap[shpIx] + dirOffs) < _numThrownItemShapes ? _thrownItemShapes[_flightObjShpMap[shpIx] + dirOffs] : _spellShapes[_flightObjShpMap[shpIx - _numThrownItemShapes] + dirOffs];
- flipped = _flightObjFlipIndex[(fo->direction << 2) + fo->curPos];
+ flipped = _flightObjFlipIndex[(fo->direction << 2) + (fo->curPos & 3)];
}
} else {
rstFade = true;
shp = (fo->objectType < _numThrownItemShapes) ? _thrownItemShapes[fo->objectType] : _spellShapes[fo->objectType - _numThrownItemShapes];
- flipped = _flightObjFlipIndex[(fo->direction << 2) + fo->curPos];
+ flipped = _flightObjFlipIndex[(fo->direction << 2) + (fo->curPos & 3)];
if (fo->flags & 0x40) {
x = _dscShapeCoords[(index * 5 + 4) << 1] + 88;