![]() |
dsekai
World engine for retrocomputers.
|
Files | |
| file | pathfind.h |
Data Structures | |
| struct | PATHFIND_NODE |
Macros | |
| #define | PATHFIND_LIST_MAX 20 |
| Maximum number of nodes in the pathfinding lists. | |
| #define | PATHFIND_ERROR_FARTHER -2 |
| #define | PATHFIND_ERROR_CLOSED -3 |
| #define | PATHFIND_FLAGS_TGT_OCCUPIED 0x01 |
| Flag for pathfind_start() indicating the target tile is occupied (e.g. we're following another mobile), so don't try to land on it. | |
| #define | pathfind_trace_printf(...) |
| Alias for debug_printf() enabled when PATHFIND_TRACE is defined. | |
| #define | pathfind_cmp_eq(a, b) |
| #define | pathfind_test_dir(x, y, dir_move, state, t) |
| Check for blocking terrain or other MOBILE objects preventing movement in dir_move. | |
Functions | |
| int8_t | pathfind_start (struct MOBILE *mover, uint8_t tgt_x, uint8_t tgt_y, uint8_t steps, uint8_t flags, struct DSEKAI_STATE *state) |
| #define pathfind_cmp_eq | ( | a, | |
| b ) |
| #define PATHFIND_LIST_MAX 20 |
Maximum number of nodes in the pathfinding lists.
| #define pathfind_test_dir | ( | x, | |
| y, | |||
| dir_move, | |||
| state, | |||
| t ) |
Check for blocking terrain or other MOBILE objects preventing movement in dir_move.
| mover | Locked MEMORY_PTR to MOBILE performing the movement. |
| dir_move | Cardinal Directions to attempt to move in. |
| state | Locked MEMORY_PTR for current DSEKAI_STATE. |
| force | 0 if movement should not be attempted if input is blocked globally, or 1 if it should. |
| t | Locked MEMORY_PTR for DSEKAI_STATE::map_handle. |
| #define pathfind_trace_printf | ( | ... | ) |
Alias for debug_printf() enabled when PATHFIND_TRACE is defined.
This was made its own alias since pathfinding can get rather chatty when it's enabled!