summaryrefslogtreecommitdiff
path: root/src/map/path.c
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2011-03-02 13:52:33 -0800
committerBen Longbons <b.r.longbons@gmail.com>2011-03-02 14:06:46 -0800
commita1a2711abfc594f2be1da51df95ddcd7071ddebd (patch)
tree9128237fc4794b917394a1c39221d08cc78c1b54 /src/map/path.c
parent877018d1296c984afe72b79f076265d6d27c3a7c (diff)
downloadtmwa-a1a2711abfc594f2be1da51df95ddcd7071ddebd.tar.gz
tmwa-a1a2711abfc594f2be1da51df95ddcd7071ddebd.tar.bz2
tmwa-a1a2711abfc594f2be1da51df95ddcd7071ddebd.tar.xz
tmwa-a1a2711abfc594f2be1da51df95ddcd7071ddebd.zip
Recode from SHIFT-JIS to unicode, then undo the conversion of backslashs and tildes.
Diffstat (limited to 'src/map/path.c')
-rw-r--r--src/map/path.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/map/path.c b/src/map/path.c
index a6e7535..93ce960 100644
--- a/src/map/path.c
+++ b/src/map/path.c
@@ -22,7 +22,7 @@ struct tmp_path
#define calc_index(x,y) (((x)+(y)*MAX_WALKPATH) & (MAX_WALKPATH*MAX_WALKPATH-1))
/*==========================================
- * oHT⏕heap push
+ * 経路探索補助heap push
*------------------------------------------
*/
static void push_heap_path (int *heap, struct tmp_path *tp, int index)
@@ -44,8 +44,8 @@ static void push_heap_path (int *heap, struct tmp_path *tp, int index)
}
/*==========================================
- * oHT⏕heap update
- * cost̂ō̕ֈړ
+ * 経路探索補助heap update
+ * costが減ったので根の方へ移動
*------------------------------------------
*/
static void update_heap_path (int *heap, struct tmp_path *tp, int index)
@@ -70,7 +70,7 @@ static void update_heap_path (int *heap, struct tmp_path *tp, int index)
}
/*==========================================
- * oHT⏕heap pop
+ * 経路探索補助heap pop
*------------------------------------------
*/
static int pop_heap_path (int *heap, struct tmp_path *tp)
@@ -105,7 +105,7 @@ static int pop_heap_path (int *heap, struct tmp_path *tp)
}
/*==========================================
- * ݂̓_costvZ
+ * 現在の点のcost計算
*------------------------------------------
*/
static int calc_cost (struct tmp_path *p, int x1, int y1)
@@ -124,7 +124,7 @@ static int calc_cost (struct tmp_path *p, int x1, int y1)
}
/*==========================================
- * KvȂpathlj/C
+ * 必要ならpathを追加/修正する
*------------------------------------------
*/
static int add_path (int *heap, struct tmp_path *tp, int x, int y, int dist,
@@ -170,8 +170,8 @@ static int add_path (int *heap, struct tmp_path *tp, int x, int y, int dist,
}
/*==========================================
- * (x,y)ړs”\nтǂ
- * flag 0x10000 U
+ * (x,y)が移動不可能地帯かどうか
+ * flag 0x10000 遠距離攻撃判定
*------------------------------------------
*/
static int can_place (struct map_data *m, int x, int y, int flag)
@@ -190,7 +190,7 @@ static int can_place (struct map_data *m, int x, int y, int flag)
}
/*==========================================
- * (x0,y0)(x1,y1)1ňړ”\vZ
+ * (x0,y0)から(x1,y1)へ1歩で移動可能か計算
*------------------------------------------
*/
static int can_move (struct map_data *m, int x0, int y0, int x1, int y1,
@@ -214,8 +214,8 @@ static int can_move (struct map_data *m, int x0, int y0, int x1, int y1,
}
/*==========================================
- * (x0,y0)(dx,dy)countZ
- * ΂Ƃ̍W
+ * (x0,y0)から(dx,dy)方向へcountセル分
+ * 吹き飛ばしたあとの座標を所得
*------------------------------------------
*/
int path_blownpos (int m, int x0, int y0, int dx, int dy, int count)
@@ -227,7 +227,7 @@ int path_blownpos (int m, int x0, int y0, int dx, int dy, int count)
md = &map[m];
if (count > 15)
- { // ő10}Xɐ
+ { // 最大10マスに制限
if (battle_config.error_log)
printf ("path_blownpos: count too many %d !\n", count);
count = 15;
@@ -265,7 +265,7 @@ int path_blownpos (int m, int x0, int y0, int dx, int dy, int count)
}
/*==========================================
- * pathT (x0,y0)->(x1,y1)
+ * path探索 (x0,y0)->(x1,y1)
*------------------------------------------
*/
int path_search (struct walkpath_data *wpd, int m, int x0, int y0, int x1,
@@ -408,7 +408,7 @@ char gat[64][64] = {
struct map_data map[1];
/*==========================================
- * oHT[`P̃eXgpmain֐
+ * 経路探索ルーチン単体テスト用main関数
*------------------------------------------
*/
void main (int argc, char *argv[])