#include "world.h"
#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"
/*
type == NIKKI_RAND_QUEST_F ||
type == NIKKI_TO_QUEST)
{
- IDX old_quest;
+ QUEST_IDX old_quest;
old_quest = p_ptr->inside_quest;
p_ptr->inside_quest = (quest[num].type == QUEST_TYPE_RANDOM) ? 0 : num;
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);
case '4':
{
static concptr choice_msg = _("モンスターの[色/文字]を変更します", "Change monster attr/chars");
- static IDX r = 0;
+ static MONRACE_IDX r = 0;
prt(format(_("コマンド: %s", "Command: %s"), choice_msg), 15, 0);
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;
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];
+ 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;
/* 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;
}
/*
-* Dungeon
-*
-*/
+ * Dungeon
+ */
static void do_cmd_knowledge_dungeon(void)
{
FILE *fff;
char rand_tmp_str[120] = "\0";
GAME_TEXT name[MAX_NLEN];
monster_race *r_ptr;
- IDX i;
+ QUEST_IDX i;
int rand_level = 100;
int total = 0;
(quest[i].status == QUEST_STATUS_COMPLETED))
{
/* Set the quest number temporary */
- IDX old_quest = p_ptr->inside_quest;
+ QUEST_IDX old_quest = p_ptr->inside_quest;
int j;
/* Clear the text */
fd_kill(file_name);
/* Free Memory */
- C_KILL(quest_num, max_q_idx, IDX);
+ C_KILL(quest_num, max_q_idx, QUEST_IDX);
}
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)