/* Clean up */
clear_from(10);
- return (picks[k]);
+ return (byte_hack)(picks[k]);
}
for (i = 0; i < 2; i++)
{
s32b tmp = randint0(60*60*60);
- int val;
+ BASE_STATUS val;
/* Extract 5 + 1d3 + 1d4 + 1d5 */
val = 5 + 3;
val = 5 + 3;
val += tmp % 3; tmp /= 3;
val += tmp % 4; tmp /= 4;
- val += tmp;
+ val += (BASE_STATUS)tmp;
/* Save that value */
sum += val;
/* Acquire the stats */
for (i = 0; i < 6; i++)
{
- j = 18 + 60 + dice[i]*10;
+ BASE_STATUS max_max = 18 + 60 + dice[i]*10;
/* Save that value */
- p_ptr->stat_max_max[i] = j;
- if (p_ptr->stat_max[i] > j)
- p_ptr->stat_max[i] = j;
- if (p_ptr->stat_cur[i] > j)
- p_ptr->stat_cur[i] = j;
+ p_ptr->stat_max_max[i] = max_max;
+ if (p_ptr->stat_max[i] > max_max)
+ p_ptr->stat_max[i] = max_max;
+ if (p_ptr->stat_cur[i] > max_max)
+ p_ptr->stat_cur[i] = max_max;
}
p_ptr->knowledge &= ~(KNOW_STAT);
else if (social_class < 1) social_class = 1;
/* Save the social class */
- p_ptr->sc = social_class;
+ p_ptr->sc = (s16b)social_class;
/* Skip leading spaces */
cheat_know = FALSE;
cheat_live = FALSE;
cheat_save = FALSE;
+ cheat_diary_output = FALSE;
+ cheat_turn = FALSE;
/* Assume no winning game */
p_ptr->total_winner = FALSE;
* @param r_idx モンスターID
* @return 討伐対象にできるならTRUEを返す。
*/
-static bool mon_hook_quest(int r_idx)
+static bool mon_hook_quest(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
*/
void determine_random_questor(quest_type *q_ptr)
{
- int r_idx;
+ MONRACE_IDX r_idx;
monster_race *r_ptr;
/* Prepare allocation table */
if (r_ptr->level > (q_ptr->level + (q_ptr->level / 20))) break;
}
- q_ptr->r_idx = r_idx;
+ q_ptr->r_idx = (s16b)r_idx;
}
/*!
* @param r_idx モンスターID
* @return 死体を食べられるならTRUEを返す。
*/
-static bool monster_hook_human(int r_idx)
+static bool monster_hook_human(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
*/
void player_outfit(void)
{
- int i, tv, sv;
+ int i;
+ OBJECT_TYPE_VALUE tv;
+ OBJECT_SUBTYPE_VALUE sv;
object_type forge;
object_type *q_ptr;
}
else if (p_ptr->pclass == CLASS_SORCERER)
{
- for (i = TV_LIFE_BOOK; i <= TV_LIFE_BOOK+MAX_MAGIC-1; i++)
+ OBJECT_TYPE_VALUE book_tval;
+ for (book_tval = TV_LIFE_BOOK; book_tval <= TV_LIFE_BOOK+MAX_MAGIC-1; book_tval++)
{
/* Hack -- Give the player some arrows */
- object_prep(q_ptr, lookup_kind(i, 0));
+ object_prep(q_ptr, lookup_kind(book_tval, 0));
q_ptr->number = 1;
add_outfit(q_ptr);
}
/* Set race */
- p_ptr->prace = k;
+ p_ptr->prace = (byte_hack)k;
rp_ptr = &race_info[p_ptr->prace];
}
/* Set class */
- p_ptr->pclass = k;
+ p_ptr->pclass = (byte_hack)k;
cp_ptr = &class_info[p_ptr->pclass];
mp_ptr = &m_info[p_ptr->pclass];
}
/* Set seikaku */
- p_ptr->pseikaku = k;
+ p_ptr->pseikaku = (byte_hack)k;
ap_ptr = &seikaku_info[p_ptr->pseikaku];
#ifdef JP
strcpy(tmp, ap_ptr->title);
for (i = 0; i < 6; i++)
{
/* Save the minimum stat */
- stat_limit[i] = cval[i];
+ stat_limit[i] = (s16b)cval[i];
}
return TRUE;
}
/* Input the minimum stats */
- chara_limit.agemin = cval[0];
- chara_limit.agemax = cval[1];
- chara_limit.htmin = cval[2];
- chara_limit.htmax = cval[3];
- chara_limit.wtmin = cval[4];
- chara_limit.wtmax = cval[5];
- chara_limit.scmin = cval[6];
- chara_limit.scmax = cval[7];
+ chara_limit.agemin = (s16b)cval[0];
+ chara_limit.agemax = (s16b)cval[1];
+ chara_limit.htmin = (s16b)cval[2];
+ chara_limit.htmax = (s16b)cval[3];
+ chara_limit.wtmin = (s16b)cval[4];
+ chara_limit.wtmax = (s16b)cval[5];
+ chara_limit.scmin = (s16b)cval[6];
+ chara_limit.scmax = (s16b)cval[7];
return TRUE;
}
}
/* Set sex */
- p_ptr->psex = k;
+ p_ptr->psex = (byte_hack)k;
sp_ptr = &sex_info[p_ptr->psex];
/* Display */