extern bool get_check(cptr prompt);
extern bool get_check_strict(cptr prompt, int mode);
extern bool get_com(cptr prompt, char *command, bool z_escape);
-extern s16b get_quantity(cptr prompt, int max);
+extern s16b get_quantity(cptr prompt, COMMAND_CODE max);
extern void pause_line(int row);
extern void request_command(int shopping);
extern bool is_a_vowel(int ch);
&tval, &sval, &pval)) return (1);
/* Save the values */
- a_ptr->tval = tval;
- a_ptr->sval = sval;
- a_ptr->pval = pval;
+ a_ptr->tval = (OBJECT_TYPE_VALUE)tval;
+ a_ptr->sval = (OBJECT_SUBTYPE_VALUE)sval;
+ a_ptr->pval = (PARAMETER_VALUE)pval;
}
/* Process 'W' for "More Info" (one line only) */
&level, &rarity, &wgt, &cost)) return (1);
/* Save the values */
- a_ptr->level = level;
- a_ptr->rarity = rarity;
- a_ptr->weight = wgt;
- a_ptr->cost = cost;
+ a_ptr->level = (DEPTH)level;
+ a_ptr->rarity = (RARITY)rarity;
+ a_ptr->weight = (WEIGHT)wgt;
+ a_ptr->cost = (PRICE)cost;
}
/* Hack -- Process 'P' for "power" and such */
d_ptr->floor[i].feat = f_tag_to_index(zz[i * 2]);
if (d_ptr->floor[i].feat < 0) return PARSE_ERROR_UNDEFINED_TERRAIN_TAG;
- d_ptr->floor[i].percent = atoi(zz[i * 2 + 1]);
+ d_ptr->floor[i].percent = (PERCENTAGE)atoi(zz[i * 2 + 1]);
}
d_ptr->tunnel_percent = atoi(zz[DUNGEON_FEAT_PROB_NUM * 2]);
}
d_ptr->fill[i].feat = f_tag_to_index(zz[i * 2]);
if (d_ptr->fill[i].feat < 0) return PARSE_ERROR_UNDEFINED_TERRAIN_TAG;
- d_ptr->fill[i].percent = atoi(zz[i * 2 + 1]);
+ d_ptr->fill[i].percent = (PERCENTAGE)atoi(zz[i * 2 + 1]);
}
d_ptr->outer_wall = f_tag_to_index(zz[DUNGEON_FEAT_PROB_NUM * 2]);
*/
static errr init_feat_variables(void)
{
- int i;
+ FEAT_IDX i;
/* Nothing */
feat_none = f_tag_to_index_in_init("NONE");
*/
bool do_cmd_cast_learned(void)
{
- int n = 0;
+ SPELL_IDX n = 0;
int chance;
int minfail = 0;
int plev = p_ptr->lev;
/* Repeat until done */
while (!done)
{
- int get_item_label = 0;
+ COMMAND_CODE get_item_label = 0;
/* Show choices */
int ni = 0;
DEPTH level; /* Minimum level */
RARITY rarity; /* Object rarity */
- byte max_to_h; /* Maximum to-hit bonus */
- byte max_to_d; /* Maximum to-dam bonus */
- byte max_to_a; /* Maximum to-ac bonus */
+ HIT_PROB max_to_h; /* Maximum to-hit bonus */
+ HIT_POINT max_to_d; /* Maximum to-dam bonus */
+ ARMOUR_CLASS max_to_a; /* Maximum to-ac bonus */
PARAMETER_VALUE max_pval; /* Maximum pval */
- s32b cost; /* Ego-item "cost" */
+ PRICE cost; /* Ego-item "cost" */
- u32b flags[TR_FLAG_SIZE]; /* Ego-Item Flags */
-
- u32b gen_flags; /* flags for generate */
+ BIT_FLAGS flags[TR_FLAG_SIZE]; /* Ego-Item Flags */
+ BIT_FLAGS gen_flags; /* flags for generate */
IDX act_idx; /* Activative ability index */
};
typedef struct
{
- s16b feat; /* Feature tile */
- byte percent; /* Chance of type */
+ FEAT_IDX feat; /* Feature tile */
+ PERCENTAGE percent; /* Chance of type */
}
feat_prob;
STR_OFFSET name; /* Name */
STR_OFFSET text; /* Description */
- byte dy;
- byte dx;
+ POSITION dy;
+ POSITION dx;
feat_prob floor[DUNGEON_FEAT_PROB_NUM]; /* Floor probability */
feat_prob fill[DUNGEON_FEAT_PROB_NUM]; /* Cave wall probability */
*
* Hack -- allow "command_arg" to specify a quantity
*/
-s16b get_quantity(cptr prompt, int max)
+s16b get_quantity(cptr prompt, COMMAND_CODE max)
{
bool res;
COMMAND_CODE amt;