dsekai
World engine for retrocomputers.
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
pathfind.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  PATHFIND_NODE
 

Macros

#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)   (((a)->coords.x == (b)->coords.x) && (((a)->coords.y == (b)->coords.y)))
 
#define pathfind_test_dir(x, y, dir_move, state, t)   (TILEMAP_ERROR_BLOCKED != tilemap_collide( x, y, dir_move, t ) && (NULL == mobile_get_facing( x, y, dir_move, state )) ? 1 : MOBILE_ERROR_BLOCKED)
 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)