mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
DRASCULA: Merge the floor coordinates into _walkRect
This commit is contained in:
@@ -94,10 +94,6 @@ DrasculaEngine::DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gam
|
||||
_talkSequencesSize = 0;
|
||||
_numLangs = 0;
|
||||
feetHeight = 0;
|
||||
floorX1 = 0;
|
||||
floorY1 = 0;
|
||||
floorX2 = 0;
|
||||
floorY2 = 0;
|
||||
lowerLimit = 0;
|
||||
upperLimit = 0;
|
||||
trackFinal = 0;
|
||||
@@ -768,8 +764,8 @@ bool DrasculaEngine::verify1() {
|
||||
}
|
||||
|
||||
if (doBreak == 0) {
|
||||
roomX = CLIP(_mouseX, floorX1, floorX2);
|
||||
roomY = CLIP(_mouseY, floorY1 + feetHeight, floorY2);
|
||||
roomX = CLIP<int16>(_mouseX, _walkRect.left, _walkRect.right);
|
||||
roomY = CLIP<int16>(_mouseY, _walkRect.top + feetHeight, _walkRect.bottom);
|
||||
startWalking();
|
||||
}
|
||||
doBreak = 0;
|
||||
|
||||
@@ -443,7 +443,7 @@ public:
|
||||
int doBreak;
|
||||
int stepX, stepY;
|
||||
int curHeight, curWidth, feetHeight;
|
||||
int floorX1, floorY1, floorX2, floorY2;
|
||||
Common::Rect _walkRect;
|
||||
int lowerLimit, upperLimit;
|
||||
int trackFinal;
|
||||
bool _walkToObject;
|
||||
|
||||
+11
-10
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user