OSDN Git Service

#37287 #37353 (2.2.0.89) 型の置換を継続中。 / Ongoing type replacement.
[hengband/hengband.git] / src / variable.c
index 99bf896..dcf3724 100644 (file)
@@ -103,7 +103,7 @@ DIRECTION command_dir;              /* Gives direction of current command */
 s16b command_see;              /* See "object1.c" */
 s16b command_wrk;              /* See "object1.c" */
 
-s16b command_gap = 999;         /* See "object1.c" */
+TERM_POSITION command_gap = 999;         /* See "object1.c" */
 
 s16b command_new;              /* Command chaining from inven/equip view */
 
@@ -140,7 +140,7 @@ bool inkey_scan;            /* See the "inkey()" function */
 bool inkey_flag;               /* See the "inkey()" function */
 bool get_com_no_macros = FALSE;        /* Expand macros in "get_com" or not */
 
-s16b coin_type;                        /* Hack -- force coin type */
+OBJECT_SUBTYPE_VALUE coin_type;        /* Hack -- force coin type */
 
 bool opening_chest;            /* Hack -- prevent chest generation */
 
@@ -160,11 +160,11 @@ s16b equip_cnt;                   /* Number of items in equipment */
 s16b o_max = 1;                        /* Number of allocated objects */
 s16b o_cnt = 0;                        /* Number of live objects */
 
-s16b m_max = 1;                        /* Number of allocated monsters */
-s16b m_cnt = 0;                        /* Number of live monsters */
+MONSTER_IDX m_max = 1;                 /* Number of allocated monsters */
+MONSTER_IDX m_cnt = 0;                 /* Number of live monsters */
 
-s16b hack_m_idx = 0;   /* Hack -- see "process_monsters()" */
-s16b hack_m_idx_ii = 0;
+MONSTER_IDX hack_m_idx = 0;    /* Hack -- see "process_monsters()" */
+MONSTER_IDX hack_m_idx_ii = 0;
 bool multi_rew = FALSE;
 char summon_kin_type;   /* Hack, by Julian Lighton: summon 'relatives' */
 
@@ -992,7 +992,7 @@ bool item_tester_no_ryoute = FALSE;
  * Here is a "pseudo-hook" used during calls to "get_item()" and
  * "show_inven()" and "show_equip()", and the choice window routines.
  */
-byte item_tester_tval;
+OBJECT_TYPE_VALUE item_tester_tval;
 
 
 /*
@@ -1026,7 +1026,7 @@ monster_hook_type get_mon_num2_hook;
 /*
  * Hack -- function hook to restrict "get_obj_num_prep()" function
  */
-bool (*get_obj_num_hook)(int k_idx);
+bool (*get_obj_num_hook)(KIND_OBJECT_IDX k_idx);
 
 
 /* Hack, monk armour */
@@ -1049,17 +1049,17 @@ building_type building[MAX_BLDG];
 /*
  * Maximum number of quests
  */
-IDX max_quests;
+QUEST_IDX max_quests;
 
 /*
  * Maximum number of monsters in r_info.txt
  */
-IDX max_r_idx;
+MONRACE_IDX max_r_idx;
 
 /*
  * Maximum number of items in k_info.txt
  */
-IDX max_k_idx;
+KIND_OBJECT_IDX max_k_idx;
 
 /*
  * Maximum number of vaults in v_info.txt
@@ -1084,17 +1084,17 @@ IDX max_e_idx;
 /*
  * Maximum number of dungeon in e_info.txt
  */
-IDX max_d_idx;
+DUNGEON_IDX max_d_idx;
 
 /*
  * Maximum number of objects in the level
  */
-IDX max_o_idx;
+OBJECT_IDX max_o_idx;
 
 /*
  * Maximum number of monsters in the level
  */
-IDX max_m_idx;
+MONSTER_IDX max_m_idx;
 
 /*
  * Maximum size of the wilderness
@@ -1142,21 +1142,21 @@ bool world_player;
 
 int cap_mon;
 int cap_mspeed;
-int cap_hp;
-int cap_maxhp;
-u16b cap_nickname;
+HIT_POINT cap_hp;
+HIT_POINT cap_maxhp;
+STR_OFFSET cap_nickname;
 
-IDX battle_mon[4];
+MONRACE_IDX battle_mon[4];
 int sel_monster;
 int battle_odds;
-int kakekin;
+PRICE kakekin;
 u32b mon_odds[4];
 
-int pet_t_m_idx;
-int riding_t_m_idx;
+MONSTER_IDX pet_t_m_idx;
+MONSTER_IDX riding_t_m_idx;
 
-IDX kubi_r_idx[MAX_KUBI];
-IDX today_mon;
+MONSTER_IDX kubi_r_idx[MAX_KUBI];
+MONSTER_IDX today_mon;
 
 bool write_level;
 
@@ -1178,91 +1178,91 @@ cptr screen_dump = NULL;
 /*** Terrain feature variables ***/
 
 /* Nothing */
-s16b feat_none;
+FEAT_IDX feat_none;
 
 /* Floor */
-s16b feat_floor;
+FEAT_IDX feat_floor;
 
 /* Objects */
-s16b feat_glyph;
-s16b feat_explosive_rune;
-s16b feat_mirror;
+FEAT_IDX feat_glyph;
+FEAT_IDX feat_explosive_rune;
+FEAT_IDX feat_mirror;
 
 /* Doors */
 door_type feat_door[MAX_DOOR_TYPES];
 
 /* Stairs */
-s16b feat_up_stair;
-s16b feat_down_stair;
-s16b feat_entrance;
+FEAT_IDX feat_up_stair;
+FEAT_IDX feat_down_stair;
+FEAT_IDX feat_entrance;
 
 /* Special traps */
-s16b feat_trap_open;
-s16b feat_trap_armageddon;
-s16b feat_trap_piranha;
+FEAT_IDX feat_trap_open;
+FEAT_IDX feat_trap_armageddon;
+FEAT_IDX feat_trap_piranha;
 
 /* Rubble */
-s16b feat_rubble;
+FEAT_IDX feat_rubble;
 
 /* Seams */
-s16b feat_magma_vein;
-s16b feat_quartz_vein;
+FEAT_IDX feat_magma_vein;
+FEAT_IDX feat_quartz_vein;
 
 /* Walls */
-s16b feat_granite;
-s16b feat_permanent;
+FEAT_IDX feat_granite;
+FEAT_IDX feat_permanent;
 
 /* Glass floor */
-s16b feat_glass_floor;
+FEAT_IDX feat_glass_floor;
 
 /* Glass walls */
-s16b feat_glass_wall;
-s16b feat_permanent_glass_wall;
+FEAT_IDX feat_glass_wall;
+FEAT_IDX feat_permanent_glass_wall;
 
 /* Pattern */
-s16b feat_pattern_start;
-s16b feat_pattern_1;
-s16b feat_pattern_2;
-s16b feat_pattern_3;
-s16b feat_pattern_4;
-s16b feat_pattern_end;
-s16b feat_pattern_old;
-s16b feat_pattern_exit;
-s16b feat_pattern_corrupted;
+FEAT_IDX feat_pattern_start;
+FEAT_IDX feat_pattern_1;
+FEAT_IDX feat_pattern_2;
+FEAT_IDX feat_pattern_3;
+FEAT_IDX feat_pattern_4;
+FEAT_IDX feat_pattern_end;
+FEAT_IDX feat_pattern_old;
+FEAT_IDX feat_pattern_exit;
+FEAT_IDX feat_pattern_corrupted;
 
 /* Various */
-s16b feat_black_market;
-s16b feat_town;
+FEAT_IDX feat_black_market;
+FEAT_IDX feat_town;
 
 /* Terrains */
-s16b feat_deep_water;
-s16b feat_shallow_water;
-s16b feat_deep_lava;
-s16b feat_shallow_lava;
-s16b feat_dirt;
-s16b feat_grass;
-s16b feat_flower;
-s16b feat_brake;
-s16b feat_tree;
-s16b feat_mountain;
-s16b feat_swamp;
+FEAT_IDX feat_deep_water;
+FEAT_IDX feat_shallow_water;
+FEAT_IDX feat_deep_lava;
+FEAT_IDX feat_shallow_lava;
+FEAT_IDX feat_dirt;
+FEAT_IDX feat_grass;
+FEAT_IDX feat_flower;
+FEAT_IDX feat_brake;
+FEAT_IDX feat_tree;
+FEAT_IDX feat_mountain;
+FEAT_IDX feat_swamp;
 
 /* Unknown grid (not detected) */
-s16b feat_undetected;
+FEAT_IDX feat_undetected;
 
 /*
  * Which dungeon ?
  */
-byte dungeon_type;
+DUNGEON_IDX dungeon_type;
 DEPTH *max_dlv;
 
-s16b feat_wall_outer;
-s16b feat_wall_inner;
-s16b feat_wall_solid;
-s16b floor_type[100], fill_type[100];
+FEAT_IDX feat_wall_outer;
+FEAT_IDX feat_wall_inner;
+FEAT_IDX feat_wall_solid;
+FEAT_IDX floor_type[100], fill_type[100];
 
 bool now_damaged;
-s16b now_message;
+COMMAND_CODE now_message;
 bool use_menu;
 
 #ifdef CHUUKEI