#include "store.h"
#include "artifact.h"
#include "avatar.h"
+#include "object-hook.h"
/*
return (-1);
}
- q_idx = quest_number(dun_level);
+ q_idx = quest_number(current_floor_ptr->dun_level);
if (write_level)
{
if (p_ptr->inside_arena)
note_level = _("アリーナ:", "Arane:");
- else if (!dun_level)
+ else if (!current_floor_ptr->dun_level)
note_level = _("地上:", "Surface:");
else if (q_idx && (is_fixed_quest_idx(q_idx)
&& !((q_idx == QUEST_OBERON) || (q_idx == QUEST_SERPENT))))
else
{
#ifdef JP
- sprintf(note_level_buf, "%d階(%s):", (int)dun_level, d_name+d_info[p_ptr->dungeon_idx].name);
+ sprintf(note_level_buf, "%d階(%s):", (int)current_floor_ptr->dun_level, d_name+d_info[p_ptr->dungeon_idx].name);
#else
- sprintf(note_level_buf, "%s L%d:", d_name+d_info[p_ptr->dungeon_idx].name, (int)dun_level);
+ sprintf(note_level_buf, "%s L%d:", d_name+d_info[p_ptr->dungeon_idx].name, (int)current_floor_ptr->dun_level);
#endif
note_level = note_level_buf;
}
}
else
{
- if (!(dun_level+num)) to = _("地上", "the surface");
- else to = format(_("%d階", "level %d"), dun_level+num);
+ if (!(current_floor_ptr->dun_level+num)) to = _("地上", "the surface");
+ else to = format(_("%d階", "level %d"), current_floor_ptr->dun_level+num);
}
fprintf(fff, _(" %2d:%02d %20s %sへ%s。\n", " %2d:%02d %20s %s %s.\n"), hour, min, note_level, _(to, note), _(note, to));
break;
case NIKKI_WIZ_TELE:
{
concptr to;
- if (!dun_level)
+ if (!current_floor_ptr->dun_level)
to = _("地上", "the surface");
else
- to = format(_("%d階(%s)", "level %d of %s"), dun_level, d_name+d_info[p_ptr->dungeon_idx].name);
+ to = format(_("%d階(%s)", "level %d of %s"), current_floor_ptr->dun_level, d_name+d_info[p_ptr->dungeon_idx].name);
fprintf(fff, _(" %2d:%02d %20s %sへとウィザード・テレポートで移動した。\n",
" %2d:%02d %20s wizard-teleport to %s.\n"), hour, min, note_level, to);
case NIKKI_PAT_TELE:
{
concptr to;
- if (!dun_level)
+ if (!current_floor_ptr->dun_level)
to = _("地上", "the surface");
else
- to = format(_("%d階(%s)", "level %d of %s"), dun_level, d_name+d_info[p_ptr->dungeon_idx].name);
+ to = format(_("%d階(%s)", "level %d of %s"), current_floor_ptr->dun_level, d_name+d_info[p_ptr->dungeon_idx].name);
fprintf(fff, _(" %2d:%02d %20s %sへとパターンの力で移動した。\n",
" %2d:%02d %20s used Pattern to teleport to %s.\n"), hour, min, note_level, to);
if (p_ptr->wild_mode) return;
/* No useful feeling in quests */
- if (p_ptr->inside_quest && !random_quest_number(dun_level))
+ if (p_ptr->inside_quest && !random_quest_number(current_floor_ptr->dun_level))
{
msg_print(_("典型的なクエストのダンジョンのようだ。", "Looks like a typical quest level."));
return;
}
/* No useful feeling in town */
- else if (p_ptr->town_num && !dun_level)
+ else if (p_ptr->town_num && !current_floor_ptr->dun_level)
{
if (!strcmp(town_info[p_ptr->town_num].name, _("荒野", "wilderness")))
{
}
/* No useful feeling in the wilderness */
- else if (!dun_level)
+ else if (!current_floor_ptr->dun_level)
{
msg_print(_("典型的な荒野のようだ。", "Looks like a typical wilderness."));
return;
}
/* Check the dungeon */
- for (y = 0; y < cur_hgt; y++)
+ for (y = 0; y < current_floor_ptr->height; y++)
{
- for (x = 0; x < cur_wid; x++)
+ for (x = 0; x < current_floor_ptr->width; x++)
{
- grid_type *c_ptr = &cave[y][x];
+ grid_type *g_ptr = ¤t_floor_ptr->grid_array[y][x];
OBJECT_IDX this_o_idx, next_o_idx = 0;
/* Scan all objects in the grid */
- for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
+ for (this_o_idx = g_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
{
object_type *o_ptr;
- o_ptr = &o_list[this_o_idx];
+ o_ptr = ¤t_floor_ptr->o_list[this_o_idx];
/* Acquire next object */
next_o_idx = o_ptr->next_o_idx;
int old_grp = grp;
/* Move up or down */
- grp += ddy[d];
+ grp += (IDX)ddy[d];
/* Verify */
if (grp >= grp_cnt) grp = grp_cnt - 1;
else
{
/* Move up or down */
- list += ddy[d];
+ list += (IDX)ddy[d];
/* Verify */
if (list >= list_cnt) list = list_cnt - 1;
if ((a == 0x7f) && (ddy[d] > 0)) d = 0;
if ((c == 0xff) && (ddx[d] > 0)) d = 0;
- a += ddy[d];
- c += ddx[d];
+ a += (TERM_COLOR)ddy[d];
+ c += (SYMBOL_CODE)ddx[d];
/* Force correct code for both ASCII character and tile */
if (c & 0x80) a |= 0x80;