diff options
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/actor.cpp | 2 | ||||
-rw-r--r-- | scumm/actor.h | 2 | ||||
-rw-r--r-- | scumm/boxes.cpp | 10 |
3 files changed, 7 insertions, 7 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp index 416e4e3a5b..3e38cab8f4 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -1383,7 +1383,7 @@ void Actor::walkActor() { walkdata.curbox = next_box; - if (findPathTowards(walkbox, next_box, walkdata.destbox, foundPath.x, foundPath.y)) + if (findPathTowards(walkbox, next_box, walkdata.destbox, foundPath)) break; if (calcMovementFactor(foundPath)) diff --git a/scumm/actor.h b/scumm/actor.h index 56420b8dd1..85854b66d8 100644 --- a/scumm/actor.h +++ b/scumm/actor.h @@ -203,7 +203,7 @@ protected: bool isPlayer(); - bool findPathTowards(byte box, byte box2, byte box3, int16 &foundPathX, int16 &foundPathY); + bool findPathTowards(byte box, byte box2, byte box3, ScummVM::Point &foundPath); void findPathTowardsOld(byte box, byte box2, byte box3, ScummVM::Point &p2, ScummVM::Point &p3); }; diff --git a/scumm/boxes.cpp b/scumm/boxes.cpp index 070c251429..17f79f5257 100644 --- a/scumm/boxes.cpp +++ b/scumm/boxes.cpp @@ -769,7 +769,7 @@ int Scumm::getPathToDestBox(byte from, byte to) { * Computes the next point actor a has to walk towards in a straight * line in order to get from box1 to box3 via box2. */ -bool Actor::findPathTowards(byte box1nr, byte box2nr, byte box3nr, int16 &foundPathX, int16 &foundPathY) { +bool Actor::findPathTowards(byte box1nr, byte box2nr, byte box3nr, ScummVM::Point &foundPath) { BoxCoords box1; BoxCoords box2; ScummVM::Point tmp; @@ -831,8 +831,8 @@ bool Actor::findPathTowards(byte box1nr, byte box2nr, byte box3nr, int16 &foundP q = box1.ur.y; if (q == pos && box2nr == box3nr) return true; - foundPathY = q; - foundPathX = box1.ul.x; + foundPath.y = q; + foundPath.x = box1.ul.x; return false; } } @@ -882,8 +882,8 @@ bool Actor::findPathTowards(byte box1nr, byte box2nr, byte box3nr, int16 &foundP q = box1.ur.x; if (q == pos && box2nr == box3nr) return true; - foundPathX = q; - foundPathY = box1.ul.y; + foundPath.x = q; + foundPath.y = box1.ul.y; return false; } } |