diff options
author | Peter Kohaut | 2016-10-04 02:21:08 +0200 |
---|---|---|
committer | Peter Kohaut | 2016-10-04 18:15:57 +0200 |
commit | 6547c35e15252fd24f260ebd6b8f01d9edd01aa2 (patch) | |
tree | 89fec132f3325fed022c4f7bd7fd003942604352 /engines/bladerunner/actor.h | |
parent | 281c19ab036f387a99192594aa645e696009f40b (diff) | |
download | scummvm-rg350-6547c35e15252fd24f260ebd6b8f01d9edd01aa2.tar.gz scummvm-rg350-6547c35e15252fd24f260ebd6b8f01d9edd01aa2.tar.bz2 scummvm-rg350-6547c35e15252fd24f260ebd6b8f01d9edd01aa2.zip |
BLADERUNNER: trying to figure out walking, added structures for obstacles used for pathfinding, fixed bug in searching for walkboxes
Diffstat (limited to 'engines/bladerunner/actor.h')
-rw-r--r-- | engines/bladerunner/actor.h | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/engines/bladerunner/actor.h b/engines/bladerunner/actor.h index 1edbea49b4..b2b52c623d 100644 --- a/engines/bladerunner/actor.h +++ b/engines/bladerunner/actor.h @@ -72,6 +72,7 @@ private: bool _isTargetable; bool _isInvisible; bool _isImmuneToObstacles; + bool _inWalkLoop; bool _isRetired; bool _inCombat; bool _isMoving; @@ -106,7 +107,7 @@ public: void setup(int actorId); - void setAtXYZ(Vector3 pos, int facing, bool setFacing = true, bool moving = false, bool retired = false); + void setAtXYZ(const Vector3 &pos, int facing, bool setFacing = true, bool moving = false, bool retired = false); void setAtWaypoint(int waypointId, int angle, int unknown, bool retired); float getX(); @@ -123,9 +124,11 @@ public: void processMovement(); - void loopWalkToXYZ(Vector3 destination); - void loopWalkToXYZ(float x, float y, float z, int a4, int a5, int a6, int a7); - void loopWalkToSceneObject(const char *objectName, int destinationOffset = 0); + bool loopWalkToActor(int otherActorId, int destinationOffset, int a3, bool run, bool a5, bool *isRunning); + bool loopWalkToItem(int itemId, int destinationOffset, int a3, bool run, bool a5, bool *isRunning); + bool loopWalkToSceneObject(const char *objectName, int destinationOffset, bool a3, bool run, bool a5, bool *isRunning); + bool loopWalkToWaypoint(int waypointId, int destinationOffset, int a3, bool run, bool a5, bool *isRunning); + bool loopWalkToXYZ(const Vector3 &destination, int destinationOffset, bool a3, bool run, bool a5, bool *isRunning); bool tick(bool forceUpdate); void draw(); @@ -141,8 +144,9 @@ public: Common::Rect *getScreenRectangle() { return &_screenRectangle; } int getWalkbox() { return _walkboxId; } bool isRetired() { return _isRetired; } - bool isTargetable() { return _isTargetable; } + bool isTargetable() { return _isTargetable; } void setTargetable(bool targetable); + bool isImmuneToObstacles() { return _isImmuneToObstacles; } bool inCombat() { return _inCombat; } bool isMoving() { return _isMoving; } void setMoving(bool value) { _isMoving = value; } @@ -198,8 +202,16 @@ public: int soundBalance(); private: void setFacing(int facing, bool halfOrSet = true); - void setBoundingBox(Vector3 position, bool retired); + void setBoundingBox(const Vector3 &position, bool retired); float distanceFromView(View* view); + + bool loopWalk(const Vector3 &destination, int destinationOffset, bool a3, bool run, const Vector3 &start, float a6, float a7, bool a8, bool *isRunning, bool async); + bool walkTo(bool run, const Vector3 &destination, bool a3); + + bool walkFindU1(const Vector3 &startPosition, const Vector3 &targetPosition, float a3, Vector3 *newDestination); + bool walkFindU2(Vector3 *newDestination, float targetWidth, int destinationOffset, float targetSize, const Vector3 &startPosition, const Vector3 &targetPosition); + bool walkToU(const Vector3 &destination, float distance); + //bool walkFindU3(int actorId, Vector3 from, int distance, Vector3 *out); }; } // End of namespace BladeRunner |