From d035bcae826e4212ddda531633d3cf0666d57109 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Wed, 20 Jul 2011 23:05:24 +0100 Subject: 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. --- engines/toon/path.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'engines/toon/path.h') 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 { -- cgit v1.2.3