diff options
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); |