/*
* Describe fake object
*/
-static void desc_obj_fake(int k_idx)
+static void desc_obj_fake(IDX k_idx)
{
object_type *o_ptr;
object_type object_type_body;
artifact_type *a_ptr = &a_info[quest[i].k_idx];
object_type forge;
object_type *q_ptr = &forge;
- int k_idx = lookup_kind(a_ptr->tval, a_ptr->sval);
+ IDX k_idx = lookup_kind(a_ptr->tval, a_ptr->sval);
object_prep(q_ptr, k_idx);
q_ptr->name1 = quest[i].k_idx;
q_ptr->ident = IDENT_STORE;
!((q_idx == QUEST_OBERON) || (q_idx == QUEST_SERPENT))))
strcpy(buf,_("クエスト", "in a quest"));
else
- sprintf(buf,_("%d階", "level %d"), (DEPTH)dun_level);
+ sprintf(buf,_("%d階", "level %d"), (int)dun_level);
sprintf(tmp, _("%sで%sに殺された。", "killed by %s %s."), buf, p_ptr->died_from);
do_cmd_write_nikki(NIKKI_BUNSHOU, 0, tmp);
extern void update_monsters(bool full);
extern bool place_monster_aux(int who, int y, int x, int r_idx, u32b mode);
extern bool place_monster(int y, int x, u32b mode);
-extern bool alloc_horde(int y, int x);
+extern bool alloc_horde(POSITION y, POSITION x);
extern bool alloc_guardian(bool def_val);
extern bool alloc_monster(int dis, u32b mode);
extern bool summon_specific(int who, int y1, int x1, int lev, int type, u32b mode);
extern int object_similar_part(object_type *o_ptr, object_type *j_ptr);
extern bool object_similar(object_type *o_ptr, object_type *j_ptr);
extern void object_absorb(object_type *o_ptr, object_type *j_ptr);
-extern s16b lookup_kind(int tval, int sval);
+extern IDX lookup_kind(OBJECT_TYPE_VALUE tval, OBJECT_SUBTYPE_VALUE sval);
extern void object_wipe(object_type *o_ptr);
extern void object_prep(object_type *o_ptr, IDX k_idx);
extern void object_copy(object_type *o_ptr, object_type *j_ptr);
int idx = s[0];
- int object_index = letter[idx].object;
- int monster_index = letter[idx].monster;
+ IDX object_index = letter[idx].object;
+ IDX monster_index = letter[idx].monster;
int random = letter[idx].random;
- int artifact_index = letter[idx].artifact;
+ IDX artifact_index = letter[idx].artifact;
/* Lay down a floor */
c_ptr->feat = conv_dungeon_feat(letter[idx].feature);
/* Read the dungeon items */
for (i = 1; i < limit; i++)
{
- int o_idx;
+ IDX o_idx;
object_type *o_ptr;
static errr rd_dungeon(void)
{
errr err = 0;
+ s16b tmp16s;
byte num;
int i;
rd_s16b(&sf_ptr->floor_id);
rd_byte(&sf_ptr->savefile_id);
- rd_s16b(&sf_ptr->dun_level);
+
+ rd_s16b(&tmp16s);
+ sf_ptr->dun_level = (DEPTH)tmp16s;
+
rd_s32b(&sf_ptr->last_visit);
rd_u32b(&sf_ptr->visit_mark);
rd_s16b(&sf_ptr->upper_floor_id);
* @param x 生成地点x座標
* @return 生成に成功したらtrue
*/
-bool alloc_horde(int y, int x)
+bool alloc_horde(POSITION y, POSITION x)
{
monster_race *r_ptr = NULL;
int r_idx = 0;
* @param sval 検索したいベースアイテムのsval
* @return なし
*/
-s16b lookup_kind(int tval, int sval)
+IDX lookup_kind(OBJECT_TYPE_VALUE tval, OBJECT_SUBTYPE_VALUE sval)
{
int k;
int num = 0;
typedef struct
{
- int tval;
- int sval;
+ OBJECT_TYPE_VALUE tval;
+ OBJECT_SUBTYPE_VALUE sval;
int prob;
byte flag;
} amuse_type;
sprintf(the_score.p_a, "%2d", p_ptr->pseikaku);
/* Save the level and such */
- sprintf(the_score.cur_lev, "%3d", p_ptr->lev);
- sprintf(the_score.cur_dun, "%3d", dun_level);
+ sprintf(the_score.cur_lev, "%3d", (int)p_ptr->lev);
+ sprintf(the_score.cur_dun, "%3d", (int)dun_level);
sprintf(the_score.max_lev, "%3d", p_ptr->max_plv);
sprintf(the_score.max_dun, "%3d", max_dlv[dungeon_type]);
* @param y テレポート先のY座標
* @return 目標に指定通りテレポートできたならばTRUEを返す
*/
-static bool dimension_door_aux(int x, int y)
+static bool dimension_door_aux(DEPTH x, DEPTH y)
{
- int plev = p_ptr->lev;
+ PLAYER_LEVEL plev = p_ptr->lev;
p_ptr->energy_need += (s16b)((s32b)(60 - plev) * ENERGY_NEED() / 100L);
*/
bool dimension_door(void)
{
- int x = 0, y = 0;
+ DEPTH x = 0, y = 0;
/* Rerutn FALSE if cancelled */
if (!tgt_pt(&x, &y)) return FALSE;
*/
static void do_cmd_summon_horde(void)
{
- int wy = p_ptr->y, wx = p_ptr->x;
+ POSITION wy = p_ptr->y, wx = p_ptr->x;
int attempts = 1000;
while (--attempts)
object_type forge;
object_type *q_ptr;
- int k_idx;
-
+ IDX k_idx;
/* Save the screen */
screen_save();
/* Restore the screen */
screen_load();
-
/* Return if failed */
if (!k_idx) return;