}
/* Get a "repeated" direction */
- if (get_rep_dir(&dir,FALSE))
+ if (get_rep_dir(&dir, FALSE))
{
/* Take a turn */
p_ptr->energy_use = 100;
extern void target_set_prepare_look(void);
extern bool get_aim_dir(DIRECTION *dp);
extern bool get_hack_dir(int *dp);
-extern bool get_rep_dir(int *dp, bool under);
+extern bool get_rep_dir(DIRECTION *dp, bool under);
extern bool get_rep_dir2(int *dp);
extern void gain_level_reward(int chosen_reward);
extern bool tgt_pt(POSITION *x, POSITION *y);
if (*t == 'd') *t++ = '\0';
/* Save the method */
- r_ptr->blow[i].method = n1;
+ r_ptr->blow[i].method = (BLOW_METHOD)n1;
/* Save the effect */
- r_ptr->blow[i].effect = n2;
+ r_ptr->blow[i].effect = (BLOW_EFFECT)n2;
/* Extract the damage dice and sides */
r_ptr->blow[i].d_dice = atoi(s);
if (num < 9) return (PARSE_ERROR_TOO_FEW_ARGUMENTS);
q_ptr->type = atoi(zz[2]);
- q_ptr->num_mon = atoi(zz[3]);
- q_ptr->cur_num = atoi(zz[4]);
- q_ptr->max_num = atoi(zz[5]);
- q_ptr->level = atoi(zz[6]);
+ q_ptr->num_mon = (MONSTER_NUMBER)atoi(zz[3]);
+ q_ptr->cur_num = (MONSTER_NUMBER)atoi(zz[4]);
+ q_ptr->max_num = (MONSTER_NUMBER)atoi(zz[5]);
+ q_ptr->level = (DEPTH)atoi(zz[6]);
q_ptr->r_idx = (IDX)atoi(zz[7]);
q_ptr->k_idx = (IDX)atoi(zz[8]);
- q_ptr->dungeon = atoi(zz[9]);
+ q_ptr->dungeon = (DUNGEON_IDX)atoi(zz[9]);
if (num > 10)
q_ptr->flags = atoi(zz[10]);
z = y + aux[x];
/* Load the entry */
- table[z].index = i;
+ table[z].index = (KIND_OBJECT_IDX)i;
table[z].level = (DEPTH)x;
table[z].prob1 = (PROB)p;
table[z].prob2 = (PROB)p;
p = (100 / r_ptr->rarity);
/* Load the entry */
- alloc_race_table[i].index = elements[i].index;
+ alloc_race_table[i].index = (KIND_OBJECT_IDX)elements[i].index;
alloc_race_table[i].level = (DEPTH)x;
alloc_race_table[i].prob1 = (PROB)p;
alloc_race_table[i].prob2 = (PROB)p;
}
else
{
- rd_byte(&q_ptr->complev);
+ rd_byte(&tmp8u);
+ q_ptr->complev = tmp8u;
}
if(h_older_than(2, 1, 2, 2))
{
if (q_ptr->k_idx)
a_info[q_ptr->k_idx].gen_flags |= TRG_QUESTITEM;
- rd_byte(&q_ptr->flags);
+ rd_byte(&tmp8u);
+ q_ptr->flags = tmp8u;
if (z_older_than(10, 3, 11))
{
}
else
{
- rd_byte(&q_ptr->dungeon);
+ rd_byte(&tmp8u);
+ q_ptr->dungeon = tmp8u;
}
/* Mark uniques */
if (q_ptr->status == QUEST_STATUS_TAKEN || q_ptr->status == QUEST_STATUS_UNTAKEN)
*/
COMMAND_CODE show_floor(int target_item, POSITION y, POSITION x, TERM_POSITION *min_width)
{
- COMMAND_CODE i;
- int j, k, l, m;
+ COMMAND_CODE i, m;
+ int j, k, l;
int col, len;
object_type *o_ptr;
struct alloc_entry
{
- IDX index; /* The actual index */
+ KIND_OBJECT_IDX index; /* The actual index */
DEPTH level; /* Base dungeon level */
PROB prob1; /* Probability, pass 1 */
* This function returns the k_idx of an object type, or zero if failed
* List up to 50 choices in three columns
*/
-static IDX wiz_create_itemtype(void)
+static KIND_OBJECT_IDX wiz_create_itemtype(void)
{
- int i, num, max_num;
- int col, row;
+ KIND_OBJECT_IDX i;
+ int num, max_num;
+ TERM_POSITION col, row;
OBJECT_TYPE_VALUE tval;
cptr tval_desc;
char ch;
- int choice[80];
+ KIND_OBJECT_IDX choice[80];
char buf[160];
* This function tracks and uses the "global direction", and uses
* that as the "desired direction", to which "confusion" is applied.
*/
-bool get_rep_dir(int *dp, bool under)
+bool get_rep_dir(DIRECTION *dp, bool under)
{
- int dir;
+ DIRECTION dir;
cptr prompt;
/* Initialize */