extern int show_equip(int target_item);
extern void toggle_inven_equip(void);
extern bool can_get_item(void);
-extern bool get_item(int *cp, cptr pmt, cptr str, int mode);
+extern bool get_item(COMMAND_CODE *cp, cptr pmt, cptr str, int mode);
/* object2.c */
extern void excise_object_idx(int o_idx);
typedef s32b SPELL_IDX; /*!< 各魔法領域/職業能力ごとの呪文ID型定義 */
typedef s16b PROB; /*!< 確率の重みの型定義 */
+typedef byte FEAT_POWER; /*!< 地形強度の型定義 */
/*** Pointers to all the basic types defined above ***/
}
if (!get_com(out_val, &choice, TRUE)) break;
- if (isupper(choice)) choice = tolower(choice);
+ if (isupper(choice)) choice = (char)tolower(choice);
if (choice == 'l') /* All */
{
ask = (isupper(choice));
/* Lowercase */
- if (ask) choice = tolower(choice);
+ if (ask) choice = (char)tolower(choice);
/* Extract request */
i = (islower(choice) ? A2I(choice) : -1);
/* Save the values */
v_ptr->typ = typ;
v_ptr->rat = rat;
- v_ptr->hgt = hgt;
- v_ptr->wid = wid;
+ v_ptr->hgt = (POSITION)hgt;
+ v_ptr->wid = (POSITION)wid;
}
/* Oops */
if (4 != sscanf(buf+2, "%d:%d:%d:%d",
&th, &td, &ta, &pval)) return (1);
- e_ptr->max_to_h = th;
- e_ptr->max_to_d = td;
- e_ptr->max_to_a = ta;
+ e_ptr->max_to_h = (HIT_PROB)th;
+ e_ptr->max_to_d = (HIT_POINT)td;
+ e_ptr->max_to_a = (ARMOUR_CLASS)ta;
e_ptr->max_pval = (PARAMETER_VALUE)pval;
}
ask = isupper(choice);
/* Lowercase */
- if (ask) choice = tolower(choice);
+ if (ask) choice = (char)tolower(choice);
/* Extract request */
i = (islower(choice) ? A2I(choice) : -1);
/* Extract "query" setting */
ver = isupper(which);
- which = tolower(which);
+ which = (char)tolower(which);
/* Convert letter to inventory index */
if (command_wrk == (USE_INVEN))
feature_state state[MAX_FEAT_STATES]; /*!< feature_state テーブル */
byte subtype; /*!< 副特性値 */
- byte power; /*!< 地形強度 */
+ FEAT_POWER power; /*!< 地形強度 */
SYMBOL_COLOR d_attr[F_LIT_MAX]; /*!< デフォルトの地形シンボルカラー / Default feature attribute */
SYMBOL_CODE d_char[F_LIT_MAX]; /*!< デフォルトの地形シンボルアルファベット / Default feature character */
{
byte method;
byte effect;
- byte d_dice;
- byte d_side;
+ DICE_NUMBER d_dice;
+ DICE_SID d_side;
};
int town;
int road;
u32b seed;
- s16b level;
+ DEPTH level;
byte entrance;
};
feat_prob floor[DUNGEON_FEAT_PROB_NUM]; /* Floor probability */
feat_prob fill[DUNGEON_FEAT_PROB_NUM]; /* Cave wall probability */
- s16b outer_wall; /* Outer wall tile */
- s16b inner_wall; /* Inner wall tile */
- s16b stream1; /* stream tile */
- s16b stream2; /* stream tile */
+ FEAT_IDX outer_wall; /* Outer wall tile */
+ FEAT_IDX inner_wall; /* Inner wall tile */
+ FEAT_IDX stream1; /* stream tile */
+ FEAT_IDX stream2; /* stream tile */
- s16b mindepth; /* Minimal depth */
- s16b maxdepth; /* Maximal depth */
+ DEPTH mindepth; /* Minimal depth */
+ DEPTH maxdepth; /* Maximal depth */
byte min_plev; /* Minimal plev needed to enter -- it's an anti-cheating mesure */
s16b pit;
s16b nest;
if (!res) return 0;
/* Extract a number */
- amt = atoi(buf);
+ amt = (COMMAND_CODE)atoi(buf);
/* A letter means "all" */
if (isalpha(buf[0])) amt = max;
static int repeat__idx = 0;
/* Saved "stuff" */
-static int repeat__key[REPEAT_MAX];
+static COMMAND_CODE repeat__key[REPEAT_MAX];
void repeat_push(COMMAND_CODE what)