{
int i;
- for (i = max_quests - 1; i > 0; i--)
+ for (i = max_q_idx - 1; i > 0; i--)
{
quest_type* const q_ptr = &quest[i];
{
int i;
/* Check if completed a quest */
- for (i = 0; i < max_quests; i++)
+ for (i = 0; i < max_q_idx; i++)
{
if ((quest[i].type == QUEST_TYPE_FIND_ARTIFACT) &&
(quest[i].status == QUEST_STATUS_TAKEN) &&
/*
* Hack -- help "select" a location (see below)
*/
-static s16b target_pick(POSITION y1, POSITION x1, POSITION dy, POSITION dx)
+static POSITION_IDX target_pick(POSITION y1, POSITION x1, POSITION dy, POSITION dx)
{
- int i, v;
-
- int x2, y2, x3, y3, x4, y4;
-
- int b_i = -1, b_v = 9999;
+ POSITION_IDX i, v;
+ POSITION x2, y2, x3, y3, x4, y4;
+ POSITION_IDX b_i = -1, b_v = 9999;
/* Scan the locations */
*
* This function must handle blindness/hallucination.
*/
-static int target_set_aux(int y, int x, BIT_FLAGS mode, cptr info)
+static char target_set_aux(POSITION y, POSITION x, BIT_FLAGS mode, cptr info)
{
cave_type *c_ptr = &cave[y][x];
s16b this_o_idx, next_o_idx = 0;
bool boring = TRUE;
s16b feat;
feature_type *f_ptr;
- int query = '\001';
+ char query = '\001';
char out_val[MAX_NLEN+80];
#ifdef ALLOW_EASY_FLOOR
if (c_ptr->mimic) sprintf(f_idx_str, "%d/%d", c_ptr->feat, c_ptr->mimic);
else sprintf(f_idx_str, "%d", c_ptr->feat);
#ifdef JP
- sprintf(out_val, "%s%s%s%s[%s] %x %s %d %d %d (%d,%d) %d", s1, name, s2, s3, info, c_ptr->info, f_idx_str, c_ptr->dist, c_ptr->cost, c_ptr->when, y, x, travel.cost[y][x]);
+ sprintf(out_val, "%s%s%s%s[%s] %x %s %d %d %d (%d,%d) %d", s1, name, s2, s3, info, (unsigned int)c_ptr->info, f_idx_str, c_ptr->dist, c_ptr->cost, c_ptr->when, (int)y, (int)x, travel.cost[y][x]);
#else
- sprintf(out_val, "%s%s%s%s [%s] %x %s %d %d %d (%d,%d)", s1, s2, s3, name, info, c_ptr->info, f_idx_str, c_ptr->dist, c_ptr->cost, c_ptr->when, y, x);
+ sprintf(out_val, "%s%s%s%s [%s] %x %s %d %d %d (%d,%d)", s1, s2, s3, name, info, c_ptr->info, f_idx_str, c_ptr->dist, c_ptr->cost, c_ptr->when, (int)y, (int)x);
#endif
}
else
DIRECTION dir;
char command;
cptr p;
+ COMMAND_CODE code;
/* Initialize */
(*dp) = 0;
#ifdef ALLOW_REPEAT /* TNB */
- if (repeat_pull(dp))
+ if (repeat_pull(&code))
{
/* Confusion? */
/* Verify */
- if (!(*dp == 5 && !target_okay()))
+ if (!(code == 5 && !target_okay()))
{
/* return (TRUE); */
- dir = *dp;
+ dir = (DIRECTION)code;
}
}
+ *dp = (DIRECTION)code;
#endif /* ALLOW_REPEAT -- TNB */
#ifdef ALLOW_REPEAT /* TNB */
/* repeat_push(dir); */
- repeat_push(command_dir);
+ repeat_push((COMMAND_CODE)command_dir);
#endif /* ALLOW_REPEAT -- TNB */
{
DIRECTION dir;
cptr prompt;
+ COMMAND_CODE code;
/* Initialize */
(*dp) = 0;
#ifdef ALLOW_REPEAT /* TNB */
- if (repeat_pull(dp))
+ if (repeat_pull(&code))
{
- dir = *dp;
+ dir = (DIRECTION)code;
/* return (TRUE); */
}
+ *dp = (DIRECTION)code;
#endif /* ALLOW_REPEAT -- TNB */
#ifdef ALLOW_REPEAT /* TNB */
/* repeat_push(dir); */
- repeat_push(command_dir);
+ repeat_push((COMMAND_CODE)command_dir);
#endif /* ALLOW_REPEAT -- TNB */
bool get_rep_dir2(DIRECTION *dp)
{
DIRECTION dir;
+ COMMAND_CODE code;
/* Initialize */
(*dp) = 0;
#ifdef ALLOW_REPEAT /* TNB */
- if (repeat_pull(dp))
+ if (repeat_pull(&code))
{
- dir = *dp;
+ dir = (DIRECTION)code;
/* return (TRUE); */
}
+ *dp = (DIRECTION)code;
#endif /* ALLOW_REPEAT -- TNB */
#ifdef ALLOW_REPEAT /* TNB */
/* repeat_push(dir); */
- repeat_push(command_dir);
+ repeat_push((COMMAND_CODE)command_dir);
#endif /* ALLOW_REPEAT -- TNB */