summaryrefslogtreecommitdiff
path: root/src/map/path.c
diff options
context:
space:
mode:
authorglighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-10-29 06:33:43 +0000
committerglighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-10-29 06:33:43 +0000
commit07ff4adffb312e138502a83316dff13287a8d153 (patch)
tree4e4a9d6f582d20ea6ba1490fc31b2085453b9e1f /src/map/path.c
parent08080a5fc10eb6a9fdc2f1285ba32fda57684d29 (diff)
downloadhercules-07ff4adffb312e138502a83316dff13287a8d153.tar.gz
hercules-07ff4adffb312e138502a83316dff13287a8d153.tar.bz2
hercules-07ff4adffb312e138502a83316dff13287a8d153.tar.xz
hercules-07ff4adffb312e138502a83316dff13287a8d153.zip
-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
Diffstat (limited to 'src/map/path.c')
-rw-r--r--src/map/path.c15
1 files changed, 7 insertions, 8 deletions
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);