diff options
author | Johannes Schickel | 2010-10-15 14:14:10 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-10-15 14:14:10 +0000 |
commit | 36d7ec96b926d25942d8e1d768d6b63237e38e86 (patch) | |
tree | bf5da96a30c5895263db44e1b603734a402b194d /engines/kyra | |
parent | ccb35067199abdc0291d3ebbb55c85a9cea3fa8c (diff) | |
download | scummvm-rg350-36d7ec96b926d25942d8e1d768d6b63237e38e86.tar.gz scummvm-rg350-36d7ec96b926d25942d8e1d768d6b63237e38e86.tar.bz2 scummvm-rg350-36d7ec96b926d25942d8e1d768d6b63237e38e86.zip |
KYRA: Fix valid warnings of bug #3087837 "KYRA: Code analysis warnings".
svn-id: r53494
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/items_lok.cpp | 5 | ||||
-rw-r--r-- | engines/kyra/script_tim.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/sequences_lol.cpp | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/engines/kyra/items_lok.cpp b/engines/kyra/items_lok.cpp index df46dfa4cd..daa8043bb2 100644 --- a/engines/kyra/items_lok.cpp +++ b/engines/kyra/items_lok.cpp @@ -304,10 +304,11 @@ int KyraEngine_LoK::processItemDrop(uint16 sceneId, uint8 item, int x, int y, in int itemHeight = _itemTable[item].height; _lastProcessedItemHeight = itemHeight; - if (x == -1 && x == -1) { + if (x == -1) x = _rnd.getRandomNumberRng(16, 304); + + if (y == -1) y = _rnd.getRandomNumberRng(_northExitHeight & 0xFF, 135); - } int xpos = x; int ypos = y; diff --git a/engines/kyra/script_tim.cpp b/engines/kyra/script_tim.cpp index 61916b92c0..30291c67db 100644 --- a/engines/kyra/script_tim.cpp +++ b/engines/kyra/script_tim.cpp @@ -946,7 +946,7 @@ int TIMInterpreter_LoL::initAnimStruct(int index, const char *filename, int x, i } } - if (wsaFlags & 7) + if (wsa && (wsaFlags & 7)) wsa->displayFrame(0, 0, x, y, 0, 0, 0); if (wsaFlags & 3) { diff --git a/engines/kyra/sequences_lol.cpp b/engines/kyra/sequences_lol.cpp index ac9148e607..e8ea7a9dcb 100644 --- a/engines/kyra/sequences_lol.cpp +++ b/engines/kyra/sequences_lol.cpp @@ -1435,7 +1435,7 @@ void LoLEngine::processCredits(char *t, int dimState, int page, int delayTime) { if (monsterAnimFrame >= 8) _screen->drawShape(page, doorShape, doorX, doorY, doorSD, (doorSD == 22) ? 0 : 1); - _screen->drawShape(page, monsterShape, monsterX, monsterY, 0, 0x104 | ((!isRightMonster | (monsterAnimFrame < 20)) ? 0 : 1), _outroShapeTable, 1, _outroMonsterScaleTableX[monsterAnimFrame], _outroMonsterScaleTableY[monsterAnimFrame]); + _screen->drawShape(page, monsterShape, monsterX, monsterY, 0, 0x104 | ((!isRightMonster || monsterAnimFrame < 20) ? 0 : 1), _outroShapeTable, 1, _outroMonsterScaleTableX[monsterAnimFrame], _outroMonsterScaleTableY[monsterAnimFrame]); if (monsterAnimFrame < 8) _screen->drawShape(page, doorShape, doorX, doorY, doorSD, (doorSD == 22) ? 0 : 1); |