From 07ff4adffb312e138502a83316dff13287a8d153 Mon Sep 17 00:00:00 2001 From: glighta Date: Mon, 29 Oct 2012 06:33:43 +0000 Subject: -Add some src basic documentation. -Change some remaining -1 for status ending timer. -Move some hardcoded msg in msg_athena -Small optimisation on battle_attr_fix git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16835 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/path.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/map/path.c') diff --git a/src/map/path.c b/src/map/path.c index b2d34a26b..fad68bada 100644 --- a/src/map/path.c +++ b/src/map/path.c @@ -45,7 +45,7 @@ static void push_heap_path(int *heap,struct tmp_path *tp,int index) /*========================================== * heap update (helper function) - * costが減ったので根の方へ移動 + * move toward the root Because cost has decreased *------------------------------------------*/ static void update_heap_path(int *heap,struct tmp_path *tp,int index) { @@ -147,8 +147,7 @@ static int add_path(int *heap,struct tmp_path *tp,int x,int y,int dist,int befor /*========================================== * Find the closest reachable cell, 'count' cells away from (x0,y0) in direction (dx,dy). - * - * 吹き飛ばしたあとの座標を所得 + * Income after the coordinates of the blow *------------------------------------------*/ int path_blownpos(int m,int x0,int y0,int dx,int dy,int count) { @@ -343,7 +342,7 @@ bool path_search(struct walkpath_data *wpd,int m,int x0,int y0,int x1,int y1,int tp[i].flag=0; heap[0]=0; push_heap_path(heap,tp,calc_index(x0,y0)); - xs = md->xs-1; // あらかじめ1減算しておく + xs = md->xs - 1; // Place by subtracting a pre- ys = md->ys-1; for(;;) @@ -361,10 +360,10 @@ bool path_search(struct walkpath_data *wpd,int m,int x0,int y0,int x1,int y1,int if(x==x1 && y==y1) break; - // dc[0] : y++ の時のコスト増分 - // dc[1] : x-- の時のコスト増分 - // dc[2] : y-- の時のコスト増分 - // dc[3] : x++ の時のコスト増分 + // dc[0] : y++ Incremental cost at the time + // dc[1] : x-- + // dc[2] : y-- + // dc[3] : x++ if(y < ys && !map_getcellp(md,x ,y+1,cell)) { f |= 1; dc[0] = (y >= y1 ? 20 : 0); -- cgit v1.2.3-60-g2f50