diff options
author | Filippos Karapetis | 2017-11-03 09:59:49 +0200 |
---|---|---|
committer | Filippos Karapetis | 2017-11-11 17:14:38 +0200 |
commit | 1f1d860797029dbe58ea4cc282ff3489768965d5 (patch) | |
tree | a29db1ca412552c0a86fa28a7c3ef0a07db93ecc /engines/drascula/rooms.cpp | |
parent | 1e1b6f7ca45eaa7911359337fd0e12fb19249e03 (diff) | |
download | scummvm-rg350-1f1d860797029dbe58ea4cc282ff3489768965d5.tar.gz scummvm-rg350-1f1d860797029dbe58ea4cc282ff3489768965d5.tar.bz2 scummvm-rg350-1f1d860797029dbe58ea4cc282ff3489768965d5.zip |
DRASCULA: Merge the floor coordinates into _walkRect
Diffstat (limited to 'engines/drascula/rooms.cpp')
-rw-r--r-- | engines/drascula/rooms.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index c6632f52d6..b8dc51e6b5 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -1732,10 +1732,11 @@ void DrasculaEngine::enterRoom(int roomIndex) { } } - p.parseInt(floorX1); - p.parseInt(floorY1); - p.parseInt(floorX2); - p.parseInt(floorY2); + p.parseInt(x1); + p.parseInt(y1); + p.parseInt(x2); + p.parseInt(y2); + _walkRect = Common::Rect(x1, y1, x2, y2); if (currentChapter != 2) { p.parseInt(upperLimit); @@ -1797,27 +1798,27 @@ void DrasculaEngine::enterRoom(int roomIndex) { color_abc(kColorLightGreen); if (currentChapter != 2) { - for (l = 0; l <= floorY1; l++) + for (l = 0; l <= _walkRect.top; l++) factor_red[l] = upperLimit; - for (l = floorY1; l <= 201; l++) + for (l = _walkRect.top; l <= 201; l++) factor_red[l] = lowerLimit; - chiquez = (float)(lowerLimit - upperLimit) / (float)(floorY2 - floorY1); - for (l = floorY1; l <= floorY2; l++) { + chiquez = (float)(lowerLimit - upperLimit) / (float)(_walkRect.bottom - _walkRect.top); + for (l = _walkRect.top; l <= _walkRect.bottom; l++) { factor_red[l] = (int)(upperLimit + pequegnez); pequegnez = pequegnez + chiquez; } } if (_roomNumber == 24) { - for (l = floorY1 - 1; l > 74; l--) { + for (l = _walkRect.top - 1; l > 74; l--) { factor_red[l] = (int)(upperLimit - pequegnez); pequegnez = pequegnez + chiquez; } } if (currentChapter == 5 && _roomNumber == 54) { - for (l = floorY1 - 1; l > 84; l--) { + for (l = _walkRect.top - 1; l > 84; l--) { factor_red[l] = (int)(upperLimit - pequegnez); pequegnez = pequegnez + chiquez; } |