#include "player-status.h"
#include "sort.h"
#include "mutation.h"
+#include "quest.h"
+#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[dungeon_type].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[dungeon_type].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;
}
{
fprintf(fff, _(" %2d:%02d %20s %sの最深階%d階に到達した。\n",
" %2d:%02d %20s reached level %d of %s for the first time.\n"), hour, min, note_level,
- _(d_name+d_info[dungeon_type].name, num),
- _(num, d_name+d_info[dungeon_type].name));
+ _(d_name+d_info[p_ptr->dungeon_idx].name, num),
+ _(num, d_name+d_info[p_ptr->dungeon_idx].name));
break;
}
case NIKKI_TRUMP:
}
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;
{
if (!num)
fprintf(fff, _(" %2d:%02d %20s 帰還を使って%sの%d階へ下りた。\n", " %2d:%02d %20s recalled to dungeon level %d of %s.\n"),
- hour, min, note_level, _(d_name+d_info[dungeon_type].name, (int)max_dlv[dungeon_type]),
- _((int)max_dlv[dungeon_type], d_name+d_info[dungeon_type].name));
+ hour, min, note_level, _(d_name+d_info[p_ptr->dungeon_idx].name, (int)max_dlv[p_ptr->dungeon_idx]),
+ _((int)max_dlv[p_ptr->dungeon_idx], d_name+d_info[p_ptr->dungeon_idx].name));
else
fprintf(fff, _(" %2d:%02d %20s 帰還を使って地上へと戻った。\n", " %2d:%02d %20s recalled from dungeon to surface.\n"), hour, min, note_level);
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[dungeon_type].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[dungeon_type].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);
sprintf(buf,_("%sの入手を記録します。", "Do you really want to record getting %s? "),record_o_name);
if (!get_check(buf)) return;
- turn_tmp = turn;
- turn = record_turn;
+ turn_tmp = current_world_ptr->game_turn;
+ current_world_ptr->game_turn = record_turn;
sprintf(buf,_("%sを手に入れた。", "descover %s."), record_o_name);
do_cmd_write_nikki(NIKKI_BUNSHOU, 0, buf);
- turn = turn_tmp;
+ current_world_ptr->game_turn = turn_tmp;
}
/*!
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[p_ptr->town_num].name, _("荒野", "wilderness")))
+ if (!strcmp(town_info[p_ptr->town_num].name, _("荒野", "wilderness")))
{
msg_print(_("何かありそうな荒野のようだ。", "Looks like a strange wilderness."));
return;
}
/* 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;
int j;
for (j = 0; j < MAX_KUBI; j++)
{
- if (kubi_r_idx[j] == i || kubi_r_idx[j] - 10000 == i ||
+ if (current_world_ptr->bounty_r_idx[j] == i || current_world_ptr->bounty_r_idx[j] - 10000 == i ||
(p_ptr->today_mon && p_ptr->today_mon == i))
{
wanted = TRUE;
do_cmd_knowledge_inven_aux(fff, &inventory[i], &j, tval, where);
}
- st_ptr = &town[1].store[STORE_HOME];
+ st_ptr = &town_info[1].store[STORE_HOME];
strcpy(where, _("家", "H "));
for (i = 0; i < st_ptr->stock_num; i++)
{
}
/* 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++)
{
- cave_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];
-
- /* Acquire next object */
+ o_ptr = ¤t_floor_ptr->o_list[this_o_idx];
next_o_idx = o_ptr->next_o_idx;
/* Ignore non-artifacts */
for (i = m_max - 1; i >= 1; i--)
{
/* Access the monster */
- m_ptr = &m_list[i];
+ m_ptr = ¤t_floor_ptr->m_list[i];
/* Ignore "dead" monsters */
if (!m_ptr->r_idx) continue;
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;
/* Display columns until done */
for (j = 0; j < width; j++)
{
- byte a;
- char c;
+ TERM_COLOR a, ia;
+ SYMBOL_CODE c, ic;
TERM_LEN x = col + j;
TERM_LEN y = row + i;
- int ia, ic;
/* Bigtile mode uses double width */
if (use_bigtile) x += j;
(!use_graphics && ic > 0x7f))
continue;
- a = (byte)ia;
- c = (char)ic;
+ a = ia;
+ c = ic;
/* Force correct code for both ASCII character and tile */
if (c & 0x80) a |= 0x80;
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;
for (i = 0; i < MAX_KUBI; i++)
{
- if (kubi_r_idx[i] <= 10000)
+ if (current_world_ptr->bounty_r_idx[i] <= 10000)
{
- fprintf(fff,"%s\n", r_name + r_info[kubi_r_idx[i]].name);
+ fprintf(fff,"%s\n", r_name + r_info[current_world_ptr->bounty_r_idx[i]].name);
listed = TRUE;
}
GAME_TEXT o_name[MAX_NLEN];
concptr paren = ")";
- process_dungeon_file("w_info.txt", 0, 0, max_wild_y, max_wild_x);
+ process_dungeon_file("w_info.txt", 0, 0, current_world_ptr->max_wild_y, current_world_ptr->max_wild_x);
/* Open a new file */
fff = my_fopen_temp(file_name, 1024);
if (fff)
{
/* Print all homes in the different towns */
- st_ptr = &town[1].store[STORE_HOME];
+ st_ptr = &town_info[1].store[STORE_HOME];
/* Home -- if anything there */
if (st_ptr->stock_num)