OSDN Git Service

バージョン2.2.1付けへ。 / Version to 2.2.1.
[hengband/hengband.git] / src / grid.h
index cc9e36e..25e067f 100644 (file)
@@ -1,18 +1,17 @@
-/*
- * File: grid.h
+/*!
+ * @file grid.h
+ * @brief ダンジョンの生成処理の基幹部分ヘッダーファイル
+ * @date 2014/08/15
+ * @details
  * Purpose: header file for grid.c, used only in dungeon generation
  * files (generate.c, rooms.c)
- */
-
-/*
+ * @author
  * Copyright (c) 1989 James E. Wilson, Robert A. Koeneke
- *
  * This software may be copied and distributed for educational, research, and
  * not for profit purposes provided that this copyright and statement are
  * included in all such copies.
  */
 
-
 /* Macros */
 
 #define set_cave_feat(Y,X,F)    (cave[(Y)][(X)].feat = (F))
 /* This should not be used */
 /*#define set_cave_info(Y,X,I)    (cave[(Y)][(X)].info = (I)) */
 
+/*!
+ * @brief 指定座標が瓦礫かどうかを返す
+ * @param Y 指定Y座標
+ * @param X 指定X座標
+ * @return 瓦礫ならばTRUE
+ */
 #define place_rubble(Y,X)       set_cave_feat(Y,X,feat_rubble)
+
+/*!
+ * @brief 指定座標が上り階段かどうかを返す
+ * @param Y 指定Y座標
+ * @param X 指定X座標
+ * @return 上り階段ならばTRUE
+ */
 #define place_up_stairs(Y,X)    set_cave_feat(Y,X,feat_up_stair)
+
+/*!
+ * @brief 指定座標が下り階段かどうかを返す
+ * @param Y 指定Y座標
+ * @param X 指定X座標
+ * @return 下り階段ならばTRUE
+ */
 #define place_down_stairs(Y,X)  set_cave_feat(Y,X,feat_down_stair)
 
+/*!
+ * @brief 指定座標がFLOOR属性を持ったマスかどうかを返す
+ * @param Y 指定Y座標
+ * @param X 指定X座標
+ * @return FLOOR属性を持っているならばTRUE
+ */
 #define is_floor_bold(Y,X) (cave[Y][X].info & CAVE_FLOOR)
 #define is_extra_bold(Y,X) (cave[Y][X].info & CAVE_EXTRA)
+
 #define is_inner_bold(Y,X) (cave[Y][X].info & CAVE_INNER)
 #define is_outer_bold(Y,X) (cave[Y][X].info & CAVE_OUTER)
 #define is_solid_bold(Y,X) (cave[Y][X].info & CAVE_SOLID)
 #define place_outer_noperm_bold(Y, X) \
 { \
        feature_type *_f_ptr = &f_info[feat_wall_outer]; \
-       if (permanent_wall(_f_ptr)) set_cave_feat(Y, X, feat_state(feat_wall_outer, FF_UNPERM)); \
+       if (permanent_wall(_f_ptr)) set_cave_feat(Y, X, (s16b)feat_state(feat_wall_outer, FF_UNPERM)); \
        else set_cave_feat(Y,X,feat_wall_outer); \
        cave[Y][X].info &= ~(CAVE_MASK); \
        add_cave_info(Y,X,(CAVE_OUTER | CAVE_VAULT)); \
 #define place_outer_noperm_grid(C) \
 { \
        feature_type *_f_ptr = &f_info[feat_wall_outer]; \
-       if (permanent_wall(_f_ptr)) (C)->feat = feat_state(feat_wall_outer, FF_UNPERM); \
+       if (permanent_wall(_f_ptr)) (C)->feat = (s16b)feat_state(feat_wall_outer, FF_UNPERM); \
        else (C)->feat = feat_wall_outer; \
        (C)->info &= ~(CAVE_MASK); \
        (C)->info |= (CAVE_OUTER | CAVE_VAULT); \
@@ -241,7 +267,7 @@ extern bool new_player_spot(void);
 
 extern void place_random_stairs(int y, int x);
 extern void place_random_door(int y, int x, bool room);
-extern void place_closed_door(int y, int x);
+extern void place_closed_door(int y, int x, int type);
 extern void place_floor(int x1, int x2, int y1, int y2, bool light);
 extern void place_room(int x1, int x2, int y1, int y2, bool light);
 extern void vault_monsters(int y1, int x1, int num);
@@ -256,5 +282,5 @@ extern void rand_dir(int *rdir, int *cdir);
 extern bool get_is_floor(int x, int y);
 extern void set_floor(int x, int y);
 
-extern void build_tunnel(int row1, int col1, int row2, int col2);
+extern bool build_tunnel(int row1, int col1, int row2, int col2);
 extern bool build_tunnel2(int x1, int y1, int x2, int y2, int type, int cutoff);