}
}
- /* Nope */
return (FALSE);
}
* @return なし
* @details 巻物、各種魔道具などに利用される。
*/
-static void shuffle_flavors(byte tval)
+static void shuffle_flavors(OBJECT_TYPE_VALUE tval)
{
- s16b *k_idx_list;
- int k_idx_list_num = 0;
- int i;
+ IDX *k_idx_list;
+ IDX k_idx_list_num = 0;
+ IDX i;
/* Allocate an array for a list of k_idx */
C_MAKE(k_idx_list, max_k_idx, s16b);
*/
void flavor_init(void)
{
- int i;
+ KIND_OBJECT_IDX i;
u32b state_backup[4];
/* Hack -- Backup the RNG state */
* sprintf(t, "%+d", n), and return a pointer to the terminator.
* Note that we always print a sign, either "+" or "-".
*/
-static char *inscribe_flags_aux(flag_insc_table *fi_ptr, u32b flgs[TR_FLAG_SIZE], bool kanji, char *ptr)
+static char *inscribe_flags_aux(flag_insc_table *fi_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE], bool kanji, char *ptr)
{
#ifndef JP
(void)kanji;
* @param flgs 対応するオブジェクトのフラグ文字列
* @return 1つでも該当の特性があったらTRUEを返す。
*/
-static bool have_flag_of(flag_insc_table *fi_ptr, u32b flgs[TR_FLAG_SIZE])
+static bool have_flag_of(flag_insc_table *fi_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE])
{
while (fi_ptr->english)
{
static char *get_ability_abbreviation(char *ptr, object_type *o_ptr, bool kanji, bool all)
{
char *prev_ptr = ptr;
- u32b flgs[TR_FLAG_SIZE];
+ BIT_FLAGS flgs[TR_FLAG_SIZE];
/* Extract the flags */
object_flags(o_ptr, flgs);
{
if (p_ptr->inside_quest)
{
- int a_idx = quest[p_ptr->inside_quest].k_idx;
+ ARTIFACT_IDX a_idx = quest[p_ptr->inside_quest].k_idx;
if (a_idx)
{
artifact_type *a_ptr = &a_info[a_idx];
* OD_NO_FLAVOR : Allow to hidden flavor\n
* OD_FORCE_FLAVOR : Get un-shuffled flavor name\n
*/
-void object_desc(char *buf, object_type *o_ptr, u32b mode)
+void object_desc(char *buf, object_type *o_ptr, BIT_FLAGS mode)
{
/* Extract object kind name */
cptr kindname = k_name + k_info[o_ptr->k_idx].name;
/* Assume no "modifier" string */
cptr modstr = "";
- int power;
- int fire_rate;
+ int power;
+ int fire_rate;
bool aware = FALSE;
bool known = FALSE;
char tmp_val2[MAX_NLEN+10];
char fake_insc_buf[30];
- u32b flgs[TR_FLAG_SIZE];
+ BIT_FLAGS flgs[TR_FLAG_SIZE];
object_type *bow_ptr;
#ifdef JP
if (object_is_smith(o_ptr))
{
- t = object_desc_str(t, format("鍛冶師%sの", player_name));
+ t = object_desc_str(t, format("鍛冶師%sの", p_ptr->name));
}
/* 伝説のアイテム、名のあるアイテムの名前を付加する */
{
char k = t[-1];
- /* XXX XXX XXX Mega-Hack */
+ /* Mega-Hack */
/* Hack -- "Cutlass-es" and "Torch-es" */
if ((k == 's') || (k == 'h')) *t++ = 'e';
if (*str)
{
/* Find the '#' */
- cptr str = my_strchr(quark_str(o_ptr->inscription), '#');
+ cptr str_aux = my_strchr(quark_str(o_ptr->inscription), '#');
/* Add the false name */
t = object_desc_str(t,"『");
- t = object_desc_str(t, &str[1]);
+ t = object_desc_str(t, &str_aux[1]);
t = object_desc_str(t,"』");
}
}
#else
if (object_is_smith(o_ptr))
{
- t = object_desc_str(t,format(" of %s the Smith",player_name));
+ t = object_desc_str(t,format(" of %s the Smith",p_ptr->name));
}
/* Hack -- Append "Artifact" or "Special" names */
{
int avgdam = o_ptr->dd * (o_ptr->ds + 1) * 10 / 2;
int tmul = bow_tmul(bow_ptr->sval);
- s16b energy_fire = bow_energy(bow_ptr->sval);
+ ENERGY energy_fire = bow_energy(bow_ptr->sval);
/* See if the bow is "known" - then set damage bonus */
if (object_is_known(bow_ptr)) avgdam += (bow_ptr->to_d * 10);
if(show_ammo_crit_ratio)
{
- int percent = calc_crit_ratio_shot(o_ptr->weight,
- known ? o_ptr->to_h : 0,
- object_is_known(bow_ptr) ? bow_ptr->to_h : 0, avgdam);
+ int percent = calc_crit_ratio_shot(known ? o_ptr->to_h : 0, known ? bow_ptr->to_h : 0);
t = object_desc_chr(t, '/');
t = object_desc_num(t, percent / 100);