* @param r_idx 判定対象となるモンスターのID
* @return 悪夢の元凶となり得るか否か。
*/
-bool get_nightmare(int r_idx)
+bool get_nightmare(IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
* @return ダメージ期待値
* @note 基本ダメージ量と重量はこの部位では計算に加わらない。
*/
-s16b calc_crit_ratio_shot(int plus_ammo, int plus_bow)
+HIT_POINT calc_crit_ratio_shot(HIT_POINT plus_ammo, HIT_POINT plus_bow)
{
- int i;
+ HIT_POINT i;
object_type *j_ptr = &inventory[INVEN_BOW];
/* Extract "shot" power */
}
/* Free the "feat_idx" array */
- C_KILL(feat_idx, max_f_idx, int);
+ C_KILL(feat_idx, max_f_idx, IDX);
}
if (is_fixed_quest_idx(q_idx))
{
/* Set the quest number temporary */
- int old_quest = p_ptr->inside_quest;
+ IDX old_quest = p_ptr->inside_quest;
p_ptr->inside_quest = q_idx;
total++;
/* Print the quest info */
-#ifdef JP
- sprintf(tmp_str, " %s (%d階, %s)\n",
- quest[i].name, quest[i].level, r_name+r_info[quest[i].r_idx].name);
-#else
- sprintf(tmp_str, " %s (%d, %s)\n",
- quest[i].name, quest[i].level, r_name+r_info[quest[i].r_idx].name);
-#endif
+ sprintf(tmp_str, _(" %s (%d階, %s)\n", " %s (%d, %s)\n"),
+ quest[i].name, (int)quest[i].level, r_name+r_info[quest[i].r_idx].name);
fputs(tmp_str, fff);
}
}
}
/* Allocate Memory */
- C_MAKE(quest_num, max_quests, int);
+ C_MAKE(quest_num, max_quests, IDX);
/* Sort by compete level */
for (i = 1; i < max_quests; i++) quest_num[i] = i;
fd_kill(file_name);
/* Free Memory */
- C_KILL(quest_num, max_quests, int);
+ C_KILL(quest_num, max_quests, IDX);
}
extern void move_to_black_market(object_type * o_ptr);
/* bldg.c */
-extern bool get_nightmare(int r_idx);
+extern bool get_nightmare(IDX r_idx);
extern void battle_monsters(void);
extern void do_cmd_bldg(void);
extern void do_cmd_quest(void);
extern IDX quest_number(DEPTH level);
extern IDX random_quest_number(DEPTH level);
extern bool tele_town(void);
-extern s16b calc_crit_ratio_shot(int plus_ammo,int plus_bow);
+extern HIT_POINT calc_crit_ratio_shot(HIT_POINT plus_ammo, HIT_POINT plus_bow);
extern s16b calc_expect_crit_shot(int weight, int plus_ammo,int plus_bow, int dam);
extern s16b calc_expect_crit(int weight, int plus, int dam, s16b meichuu, bool dokubari);
static void dump_aux_quest(FILE *fff)
{
int i;
- int *quest_num;
+ IDX *quest_num;
int dummy;
fprintf(fff, _("\n\n [クエスト情報]\n", "\n\n [Quest Information]\n"));
/* Allocate Memory */
- C_MAKE(quest_num, max_quests, int);
+ C_MAKE(quest_num, max_quests, IDX);
/* Sort by compete level */
for (i = 1; i < max_quests; i++) quest_num[i] = i;
fputc('\n', fff);
/* Free Memory */
- C_KILL(quest_num, max_quests, int);
+ C_KILL(quest_num, max_quests, IDX);
}
*/
static void shuffle_flavors(byte tval)
{
- s16b *k_idx_list;
- int k_idx_list_num = 0;
+ IDX *k_idx_list;
+ IDX k_idx_list_num = 0;
int i;
/* Allocate an array for a list of k_idx */
}
/* Default "mimic" */
- f_ptr->mimic = i;
+ f_ptr->mimic = (IDX)i;
/* Default "destroyed state" -- if not specified */
- f_ptr->destroyed = i;
+ f_ptr->destroyed = (IDX)i;
/* Default "states" */
for (i = 0; i < MAX_FEAT_STATES; i++) f_ptr->state[i].action = FF_FLAG_MAX;
struct power_desc_type
{
char name[40];
- int level;
+ PLAYER_LEVEL level;
int cost;
int stat;
int fail;
*/
static int racial_chance(power_desc_type *pd_ptr)
{
- s16b min_level = pd_ptr->level;
+ PLAYER_LEVEL min_level = pd_ptr->level;
int difficulty = pd_ptr->fail;
int i;
* @details
* Note that this function is one of the more "dangerous" ones...
*/
-static s16b poly_r_idx(int r_idx)
+static IDX poly_r_idx(IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
- int i, r, lev1, lev2;
+ int i, r;
+ DEPTH lev1, lev2;
/* Hack -- Uniques/Questors never polymorph */
if ((r_ptr->flags1 & RF1_UNIQUE) ||