* @param x 対象となるマスのX座標
* @return なし
*/
-static void discover_hidden_things(int y, int x)
+static void discover_hidden_things(POSITION y, POSITION x)
{
- s16b this_o_idx, next_o_idx = 0;
-
+ OBJECT_IDX this_o_idx, next_o_idx = 0;
cave_type *c_ptr;
/* Access the grid */
*/
void search(void)
{
- int i, chance;
+ DIRECTION i;
+ PERCENTAGE chance;
/* Start with base search ability */
chance = p_ptr->skill_srh;
*/
void flavor_init(void)
{
- int i;
+ KIND_OBJECT_IDX i;
u32b state_backup[4];
/* Hack -- Backup the RNG state */
/* None found */
if (i == MAX_SAVED_FLOORS)
{
- int oldest = 0;
+ s16b oldest = 0;
u32b oldest_visit = 0xffffffffL;
/* Search for oldest */
OBJECT_IDX object; /* Object */
EGO_IDX ego; /* Ego-Item */
ARTIFACT_IDX artifact; /* Artifact */
- IDX trap; /* Trap */
- int cave_info; /* Flags for CAVE_MARK, CAVE_GLOW, CAVE_ICKY, CAVE_ROOM */
+ IDX trap; /* Trap */
+ BIT_FLAGS cave_info; /* Flags for CAVE_MARK, CAVE_GLOW, CAVE_ICKY, CAVE_ROOM */
s16b special; /* Reserved for special terrain info */
int random; /* Number of the random effect */
};
/*** The saved floor ***/
wr_s16b(sf_ptr->floor_id);
- wr_byte(sf_ptr->savefile_id);
+ wr_byte((byte_hack)sf_ptr->savefile_id);
wr_s16b((s16b)sf_ptr->dun_level);
wr_s32b(sf_ptr->last_visit);
wr_u32b(sf_ptr->visit_mark);
saved_floor_type *sf_ptr = &saved_floors[i];
wr_s16b(sf_ptr->floor_id);
- wr_byte(sf_ptr->savefile_id);
+ wr_byte((byte_hack)sf_ptr->savefile_id);
wr_s16b((s16b)sf_ptr->dun_level);
wr_s32b(sf_ptr->last_visit);
wr_u32b(sf_ptr->visit_mark);
SYMBOL_COLOR x_attr; /*!< 設定変更後のアイテムシンボルカラー / Desired object attribute */
SYMBOL_CODE x_char; /*!< 設定変更後のアイテムシンボルアルファベット / Desired object character */
- s16b flavor; /*!< 調査中(TODO) / Special object flavor (or zero) */
+ IDX flavor; /*!< 調査中(TODO) / Special object flavor (or zero) */
bool easy_know; /*!< ベースアイテムが初期からベース名を判断可能かどうか / This object is always known (if aware) */
struct cave_type
{
- u16b info; /* Hack -- cave flags */
+ BIT_FLAGS info; /* Hack -- cave flags */
FEAT_IDX feat; /* Hack -- feature type */
OBJECT_IDX o_idx; /* Object in this grid */
ACTION_SKILL_POWER skill_dev; /*!< 行動技能値:魔道具使用 / Skill: Magic Devices */
ACTION_SKILL_POWER skill_sav; /*!< 行動技能値:魔法防御 / Skill: Saving throw */
ACTION_SKILL_POWER skill_stl; /*!< 行動技能値:隠密 / Skill: Stealth factor */
- ACTION_SKILL_POWER skill_srh; /*!< 行動技能値:知覚 / Skill: Searching ability */
+
+ /*!
+ * 行動技能値:知覚 / Skill: Searching ability
+ * この値はトラップの判定処理などで混乱、盲目、幻覚、無光源などの
+ * 状態異常がない限り、難易度修正などがないままそのままパーセンテージ値として使われる。
+ * 100以上ならば必ず全てのトラップを見つけることが出来る。
+ */
+ ACTION_SKILL_POWER skill_srh;
+
+
ACTION_SKILL_POWER skill_fos; /*!< 行動技能値:探索 / Skill: Searching frequency */
ACTION_SKILL_POWER skill_thn; /*!< 行動技能値:打撃命中能力 / Skill: To hit (normal) */
ACTION_SKILL_POWER skill_thb; /*!< 行動技能値:射撃命中能力 / Skill: To hit (shooting) */
*/
typedef struct
{
- u16b info;
+ BIT_FLAGS info;
s16b feat;
s16b mimic;
s16b special;
s16b command_cmd; /* Current "Angband Command" */
-COMMAND_ARG command_arg; /* Gives argument of current command */
-s16b command_rep; /* Gives repetition of current command */
-DIRECTION command_dir; /* Gives direction of current command */
+COMMAND_ARG command_arg; /*!< 各種コマンドの汎用的な引数として扱う / Gives argument of current command */
+
+s16b command_rep; /*!< 各種コマンドの汎用的なリピート数として扱う / Gives repetition of current command */
+
+DIRECTION command_dir; /*!< 各種コマンドの汎用的な方向値処理として扱う/ Gives direction of current command */
s16b command_see; /* See "object1.c" */
s16b command_wrk; /* See "object1.c" */
if (c_ptr->mimic) sprintf(f_idx_str, "%d/%d", c_ptr->feat, c_ptr->mimic);
else sprintf(f_idx_str, "%d", c_ptr->feat);
#ifdef JP
- sprintf(out_val, "%s%s%s%s[%s] %x %s %d %d %d (%d,%d) %d", s1, name, s2, s3, info, c_ptr->info, f_idx_str, c_ptr->dist, c_ptr->cost, c_ptr->when, (int)y, (int)x, travel.cost[y][x]);
+ sprintf(out_val, "%s%s%s%s[%s] %x %s %d %d %d (%d,%d) %d", s1, name, s2, s3, info, (unsigned int)c_ptr->info, f_idx_str, c_ptr->dist, c_ptr->cost, c_ptr->when, (int)y, (int)x, travel.cost[y][x]);
#else
sprintf(out_val, "%s%s%s%s [%s] %x %s %d %d %d (%d,%d)", s1, s2, s3, name, info, c_ptr->info, f_idx_str, c_ptr->dist, c_ptr->cost, c_ptr->when, (int)y, (int)x);
#endif