From ebf1cd085c9f4061318f99f9ab19b63148d19819 Mon Sep 17 00:00:00 2001 From: ultramage Date: Sat, 22 Dec 2007 13:00:48 +0000 Subject: Path code cleaning... * Added map/path.h, moved path-related function headers to path.h. * Removed the macroed _real() path functions. * Modified some functions to use boolean return values instead of 1/0 or 0/-1. * Modified path_search_long() to allow a NULL output pointer (in which case a temporary local buffer will be used instead). * Removed an unused ->path_half member variable from struct walkpath_data. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11958 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/map.h | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'src/map/map.h') diff --git a/src/map/map.h b/src/map/map.h index 7aa99d219..6d06bc599 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -236,7 +236,7 @@ struct block_list { }; struct walkpath_data { - unsigned char path_len,path_pos,path_half; + unsigned char path_len,path_pos; unsigned char path[MAX_WALKPATH]; }; struct shootpath_data { @@ -1344,16 +1344,6 @@ int map_check_dir(int s_dir,int t_dir); unsigned char map_calc_dir( struct block_list *src,int x,int y); int map_random_dir(struct block_list *bl, short *x, short *y); // [Skotlex] -// path.c‚æ‚è -int path_search_real(struct walkpath_data *wpd,int m,int x0,int y0,int x1,int y1,int flag,cell_t flag2); -#define path_search(wpd,m,x0,y0,x1,y1,flag) path_search_real(wpd,m,x0,y0,x1,y1,flag,CELL_CHKNOPASS) -#define path_search2(wpd,m,x0,y0,x1,y1,flag) path_search_real(wpd,m,x0,y0,x1,y1,flag,CELL_CHKWALL) - -bool path_search_long_real(struct shootpath_data *spd,int m,int x0,int y0,int x1,int y1,cell_t flag); -#define path_search_long(spd,m,x0,y0,x1,y1) path_search_long_real(spd,m,x0,y0,x1,y1,CELL_CHKWALL) - -int path_blownpos(int m,int x0,int y0,int dx,int dy,int count); - // distance related functions [Skotlex] #define check_distance_bl(bl1, bl2, distance) check_distance((bl1)->x - (bl2)->x, (bl1)->y - (bl2)->y, distance) #define check_distance_blxy(bl, x1, y1, distance) check_distance((bl)->x-(x1), (bl)->y-(y1), distance) -- cgit v1.2.3-60-g2f50