aboutsummaryrefslogtreecommitdiff
path: root/engines/toon/path.h
diff options
context:
space:
mode:
authorD G Turner2011-07-20 23:05:24 +0100
committerD G Turner2011-07-20 23:05:24 +0100
commitd035bcae826e4212ddda531633d3cf0666d57109 (patch)
treeca5b225030317abf94c95515b13597127d7966fd /engines/toon/path.h
parent6a6594c7a9a60c0d3546cb2f67c89a9b57cbacea (diff)
downloadscummvm-rg350-d035bcae826e4212ddda531633d3cf0666d57109.tar.gz
scummvm-rg350-d035bcae826e4212ddda531633d3cf0666d57109.tar.bz2
scummvm-rg350-d035bcae826e4212ddda531633d3cf0666d57109.zip
TOON: Cleanup and Memory Usage Reduction fixes in PathFinding Heap.
This halves the size of the pathifnding heap, but adds warnings if push() is attempted on a full heap.
Diffstat (limited to 'engines/toon/path.h')
-rw-r--r--engines/toon/path.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/engines/toon/path.h b/engines/toon/path.h
index 329127c9ce..2de58064f0 100644
--- a/engines/toon/path.h
+++ b/engines/toon/path.h
@@ -38,17 +38,18 @@ public:
PathFindingHeap();
~PathFindingHeap();
- int32 _alloc;
- int32 _count;
-
- int32 push(int32 x, int32 y, int32 weight);
- int32 pop(int32 *x, int32 *y, int32 *weight);
- int32 init(int32 size);
- int32 clear();
- int32 unload();
+ void push(int32 x, int32 y, int32 weight);
+ void pop(int32 *x, int32 *y, int32 *weight);
+ void init(int32 size);
+ void clear();
+ void unload();
+ int32 getCount() { return _count; }
private:
HeapDataGrid *_data;
+
+ int32 _size;
+ int32 _count;
};
class PathFinding {