Overhaul pathfinding algorithm

This commit is contained in:
2023-11-24 20:25:21 +01:00
parent 6e977b7433
commit b77e939c52
8 changed files with 127 additions and 68 deletions

View File

@@ -12,6 +12,7 @@ bool _bzHeapIsEmpty(void *heap);
i32 _bzHeapPop(void *heap);
void _bzHeapPush(void *heap);
i32 _bzHeapPushIdx(void *heap);
void _bzHeapUpdate(void *heap, i32 idx);
#define bzHeapCreate(T, n) (T *) ((T *)_bzHeapCreate((n), sizeof(T), offsetof(T, weight)))
#define bzHeapDestroy(heap) _bzHeapDestroy((void *) (heap))
@@ -25,6 +26,7 @@ i32 _bzHeapPushIdx(void *heap);
(heap)[_bzHeapPushIdx(h)] = (__VA_ARGS__); \
_bzHeapPush(h); \
} while(0)
#define bzHeapUpdate(heap, idx) _bzHeapUpdate((void *) heap, idx)
#endif //BREEZE_HEAP_H