diff options
-rw-r--r-- | engines/toon/path.cpp | 2 | ||||
-rw-r--r-- | engines/toon/path.h | 17 | ||||
-rw-r--r-- | engines/toon/toon.cpp | 2 |
3 files changed, 10 insertions, 11 deletions
diff --git a/engines/toon/path.cpp b/engines/toon/path.cpp index 101778d4b4..527be13c24 100644 --- a/engines/toon/path.cpp +++ b/engines/toon/path.cpp @@ -146,7 +146,7 @@ void PathFindingHeap::pop(int16 *x, int16 *y, int32 *weight) { } } -PathFinding::PathFinding(ToonEngine *vm) : _vm(vm) { +PathFinding::PathFinding() { _width = 0; _height = 0; _heap = new PathFindingHeap(); diff --git a/engines/toon/path.h b/engines/toon/path.h index 7709dfe2a0..30a7a53e9d 100644 --- a/engines/toon/path.h +++ b/engines/toon/path.h @@ -28,11 +28,6 @@ namespace Toon { // binary heap system for fast A* -struct HeapDataGrid { - int16 _x, _y; - int16 _weight; -}; - class PathFindingHeap { public: PathFindingHeap(); @@ -46,6 +41,11 @@ public: int32 getCount() { return _count; } private: + struct HeapDataGrid { + int16 _x, _y; + int16 _weight; + }; + HeapDataGrid *_data; int32 _size; @@ -54,7 +54,7 @@ private: class PathFinding { public: - PathFinding(ToonEngine *vm); + PathFinding(); ~PathFinding(); void init(Picture *mask); @@ -73,7 +73,8 @@ public: int32 getPathNodeCount() const; int32 getPathNodeX(int32 nodeId) const; int32 getPathNodeY(int32 nodeId) const; -protected: + +private: Picture *_currentMask; PathFindingHeap *_heap; @@ -88,8 +89,6 @@ protected: int32 _numBlockingRects; int32 _allocatedGridPathCount; int32 _gridPathCount; - - ToonEngine *_vm; }; } // End of namespace Toon diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp index 9e7aa65265..0b39432b53 100644 --- a/engines/toon/toon.cpp +++ b/engines/toon/toon.cpp @@ -100,7 +100,7 @@ void ToonEngine::init() { syncSoundSettings(); - _pathFinding = new PathFinding(this); + _pathFinding = new PathFinding(); resources()->openPackage("LOCAL.PAK"); resources()->openPackage("ONETIME.PAK"); |