int ob = option_info[i].o_bit;
if ((p_ptr->playing || current_world_ptr->character_xtra) &&
- (OPT_PAGE_BIRTH == option_info[i].o_page) && !p_ptr->wizard)
+ (OPT_PAGE_BIRTH == option_info[i].o_page) && !current_world_ptr->wizard)
{
msg_format(_("初期オプションは変更できません! '%s'", "Birth options can not changed! '%s'"), buf);
msg_print(NULL);
bool bypass = FALSE;
-
- /* Open the file */
fp = my_fopen(name, "r");
/* No such file */
char buf[1024];
path_build(buf, sizeof(buf), ANGBAND_DIR_FILE, "time.txt");
-
- /* Open the file */
fp = my_fopen(buf, "r");
/* No file, no restrictions */
* Mode 4 = mutations
* </pre>
*/
-void display_player(int mode)
+void display_player(player_type *creature_ptr, int mode)
{
int i;
char buf[80];
char tmp[64];
- if ((p_ptr->muta1 || p_ptr->muta2 || p_ptr->muta3) && display_mutations)
+ if ((creature_ptr->muta1 || creature_ptr->muta2 || creature_ptr->muta3) && display_mutations)
mode = (mode % 5);
else
mode = (mode % 4);
{
/* Name, Sex, Race, Class */
#ifdef JP
- sprintf(tmp, "%s%s%s", ap_ptr->title, ap_ptr->no == 1 ? "の":"", p_ptr->name);
+ sprintf(tmp, "%s%s%s", ap_ptr->title, ap_ptr->no == 1 ? "の":"", creature_ptr->name);
#else
- sprintf(tmp, "%s %s", ap_ptr->title, p_ptr->name);
+ sprintf(tmp, "%s %s", ap_ptr->title, creature_ptr->name);
#endif
display_player_one_line(ENTRY_NAME, tmp, TERM_L_BLUE);
display_player_one_line(ENTRY_SEX, sp_ptr->title, TERM_L_BLUE);
- display_player_one_line(ENTRY_RACE, (p_ptr->mimic_form ? mimic_info[p_ptr->mimic_form].title : rp_ptr->title), TERM_L_BLUE);
+ display_player_one_line(ENTRY_RACE, (creature_ptr->mimic_form ? mimic_info[creature_ptr->mimic_form].title : rp_ptr->title), TERM_L_BLUE);
display_player_one_line(ENTRY_CLASS, cp_ptr->title, TERM_L_BLUE);
- if (p_ptr->realm1)
+ if (creature_ptr->realm1)
{
- if (p_ptr->realm2)
- sprintf(tmp, "%s, %s", realm_names[p_ptr->realm1], realm_names[p_ptr->realm2]);
+ if (creature_ptr->realm2)
+ sprintf(tmp, "%s, %s", realm_names[creature_ptr->realm1], realm_names[creature_ptr->realm2]);
else
- strcpy(tmp, realm_names[p_ptr->realm1]);
+ strcpy(tmp, realm_names[creature_ptr->realm1]);
display_player_one_line(ENTRY_REALM, tmp, TERM_L_BLUE);
}
- if ((p_ptr->pclass == CLASS_CHAOS_WARRIOR) || (p_ptr->muta2 & MUT2_CHAOS_GIFT))
- display_player_one_line(ENTRY_PATRON, chaos_patrons[p_ptr->chaos_patron], TERM_L_BLUE);
+ if ((creature_ptr->pclass == CLASS_CHAOS_WARRIOR) || (creature_ptr->muta2 & MUT2_CHAOS_GIFT))
+ display_player_one_line(ENTRY_PATRON, chaos_patrons[creature_ptr->chaos_patron], TERM_L_BLUE);
/* Age, Height, Weight, Social */
/* 身長はセンチメートルに、体重はキログラムに変更してあります */
#ifdef JP
- display_player_one_line(ENTRY_AGE, format("%d才" ,(int)p_ptr->age), TERM_L_BLUE);
- display_player_one_line(ENTRY_HEIGHT, format("%dcm" ,(int)((p_ptr->ht*254)/100)), TERM_L_BLUE);
- display_player_one_line(ENTRY_WEIGHT, format("%dkg" ,(int)((p_ptr->wt*4536)/10000)), TERM_L_BLUE);
- display_player_one_line(ENTRY_SOCIAL, format("%d " ,(int)p_ptr->sc), TERM_L_BLUE);
+ display_player_one_line(ENTRY_AGE, format("%d才" ,(int)creature_ptr->age), TERM_L_BLUE);
+ display_player_one_line(ENTRY_HEIGHT, format("%dcm" ,(int)((creature_ptr->ht*254)/100)), TERM_L_BLUE);
+ display_player_one_line(ENTRY_WEIGHT, format("%dkg" ,(int)((creature_ptr->wt*4536)/10000)), TERM_L_BLUE);
+ display_player_one_line(ENTRY_SOCIAL, format("%d " ,(int)creature_ptr->sc), TERM_L_BLUE);
#else
- display_player_one_line(ENTRY_AGE, format("%d" ,(int)p_ptr->age), TERM_L_BLUE);
- display_player_one_line(ENTRY_HEIGHT, format("%d" ,(int)p_ptr->ht), TERM_L_BLUE);
- display_player_one_line(ENTRY_WEIGHT, format("%d" ,(int)p_ptr->wt), TERM_L_BLUE);
- display_player_one_line(ENTRY_SOCIAL, format("%d" ,(int)p_ptr->sc), TERM_L_BLUE);
+ display_player_one_line(ENTRY_AGE, format("%d" ,(int)creature_ptr->age), TERM_L_BLUE);
+ display_player_one_line(ENTRY_HEIGHT, format("%d" ,(int)creature_ptr->ht), TERM_L_BLUE);
+ display_player_one_line(ENTRY_WEIGHT, format("%d" ,(int)creature_ptr->wt), TERM_L_BLUE);
+ display_player_one_line(ENTRY_SOCIAL, format("%d" ,(int)creature_ptr->sc), TERM_L_BLUE);
#endif
- display_player_one_line(ENTRY_ALIGN, format("%s" ,your_alignment(p_ptr)), TERM_L_BLUE);
+ display_player_one_line(ENTRY_ALIGN, format("%s" ,your_alignment(creature_ptr)), TERM_L_BLUE);
/* Display the stats */
for (i = 0; i < A_MAX; i++)
{
/* Special treatment of "injured" stats */
- if (p_ptr->stat_cur[i] < p_ptr->stat_max[i])
+ if (creature_ptr->stat_cur[i] < creature_ptr->stat_max[i])
{
int value;
put_str(stat_names_reduced[i], 3 + i, 53);
/* Get the current stat */
- value = p_ptr->stat_use[i];
+ value = creature_ptr->stat_use[i];
/* Obtain the current stat (modified) */
cnv_stat(value, buf);
c_put_str(TERM_YELLOW, buf, 3 + i, 60);
/* Acquire the max stat */
- value = p_ptr->stat_top[i];
+ value = creature_ptr->stat_top[i];
/* Obtain the maximum stat (modified) */
cnv_stat(value, buf);
put_str(stat_names[i], 3 + i, 53);
/* Obtain the current stat (modified) */
- cnv_stat(p_ptr->stat_use[i], buf);
+ cnv_stat(creature_ptr->stat_use[i], buf);
/* Display the current stat (modified) */
c_put_str(TERM_L_GREEN, buf, 3 + i, 60);
}
- if (p_ptr->stat_max[i] == p_ptr->stat_max_max[i])
+ if (creature_ptr->stat_max[i] == creature_ptr->stat_max_max[i])
{
c_put_str(TERM_WHITE, "!", 3 + i, _(58, 58-2));
}
for (i = 0; i < 4; i++)
{
- put_str(p_ptr->history[i], i + 12, 10);
+ put_str(creature_ptr->history[i], i + 12, 10);
}
*statmsg = '\0';
- if (p_ptr->is_dead)
+ if (creature_ptr->is_dead)
{
- if (p_ptr->total_winner)
+ if (creature_ptr->total_winner)
{
#ifdef JP
- sprintf(statmsg, "…あなたは勝利の後%sした。", streq(p_ptr->died_from, "Seppuku") ? "切腹" : "引退");
+ sprintf(statmsg, "…あなたは勝利の後%sした。", streq(creature_ptr->died_from, "Seppuku") ? "切腹" : "引退");
#else
- sprintf(statmsg, "...You %s after the winning.", streq(p_ptr->died_from, "Seppuku") ? "did Seppuku" : "retired from the adventure");
+ sprintf(statmsg, "...You %s after the winning.", streq(creature_ptr->died_from, "Seppuku") ? "did Seppuku" : "retired from the adventure");
#endif
}
else if (!current_floor_ptr->dun_level)
{
#ifdef JP
- sprintf(statmsg, "…あなたは%sで%sに殺された。", map_name(), p_ptr->died_from);
+ sprintf(statmsg, "…あなたは%sで%sに殺された。", map_name(), creature_ptr->died_from);
#else
- sprintf(statmsg, "...You were killed by %s in %s.", p_ptr->died_from, map_name());
+ sprintf(statmsg, "...You were killed by %s in %s.", creature_ptr->died_from, map_name());
#endif
}
- else if (p_ptr->inside_quest && is_fixed_quest_idx(p_ptr->inside_quest))
+ else if (creature_ptr->inside_quest && is_fixed_quest_idx(creature_ptr->inside_quest))
{
/* Get the quest text */
/* Bewere that INIT_ASSIGN resets the cur_num. */
process_dungeon_file("q_info.txt", 0, 0, 0, 0);
#ifdef JP
- sprintf(statmsg, "…あなたは、クエスト「%s」で%sに殺された。", quest[p_ptr->inside_quest].name, p_ptr->died_from);
+ sprintf(statmsg, "…あなたは、クエスト「%s」で%sに殺された。", quest[creature_ptr->inside_quest].name, creature_ptr->died_from);
#else
- sprintf(statmsg, "...You were killed by %s in the quest '%s'.", p_ptr->died_from, quest[p_ptr->inside_quest].name);
+ sprintf(statmsg, "...You were killed by %s in the quest '%s'.", creature_ptr->died_from, quest[creature_ptr->inside_quest].name);
#endif
}
else
{
#ifdef JP
- sprintf(statmsg, "…あなたは、%sの%d階で%sに殺された。", map_name(), (int)current_floor_ptr->dun_level, p_ptr->died_from);
+ sprintf(statmsg, "…あなたは、%sの%d階で%sに殺された。", map_name(), (int)current_floor_ptr->dun_level, creature_ptr->died_from);
#else
- sprintf(statmsg, "...You were killed by %s on level %d of %s.", p_ptr->died_from, current_floor_ptr->dun_level, map_name());
+ sprintf(statmsg, "...You were killed by %s on level %d of %s.", creature_ptr->died_from, current_floor_ptr->dun_level, map_name());
#endif
}
}
{
sprintf(statmsg, _("…あなたは現在、 %s にいる。", "...Now, you are in %s."), map_name());
}
- else if (p_ptr->inside_quest && is_fixed_quest_idx(p_ptr->inside_quest))
+ else if (creature_ptr->inside_quest && is_fixed_quest_idx(creature_ptr->inside_quest))
{
/* Clear the text */
/* Must be done before doing INIT_SHOW_TEXT */
process_dungeon_file("q_info.txt", 0, 0, 0, 0);
- sprintf(statmsg, _("…あなたは現在、 クエスト「%s」を遂行中だ。", "...Now, you are in the quest '%s'."), quest[p_ptr->inside_quest].name);
+ sprintf(statmsg, _("…あなたは現在、 クエスト「%s」を遂行中だ。", "...Now, you are in the quest '%s'."), quest[creature_ptr->inside_quest].name);
}
else
{
else if (mode == 4)
{
- do_cmd_knowledge_mutations(p_ptr);
+ do_cmd_knowledge_mutations(creature_ptr);
}
}
char c;
char buf[1024];
- display_player(0);
+ display_player(p_ptr, 0);
/* Dump part of the screen */
for (y = 1; y < 22; y++)
}
/* Display history */
- display_player(1);
+ display_player(p_ptr, 1);
/* Dump part of the screen */
for (y = 10; y < 19; y++)
fprintf(fff, "\n");
/* Display flags (part 1) */
- display_player(2);
+ display_player(p_ptr, 2);
/* Dump part of the screen */
for (y = 2; y < 22; y++)
fprintf(fff, "\n");
/* Display flags (part 2) */
- display_player(3);
+ display_player(p_ptr, 3);
/* Dump part of the screen */
for (y = 1; y < 22; y++)
if (what)
{
- /* Caption */
strcpy(caption, what);
-
- /* Access the "file" */
strcpy(path, name);
-
- /* Open */
fff = my_fopen(path, "r");
}
/* Look in "help" */
if (!fff)
{
- /* Caption */
sprintf(caption, _("ヘルプ・ファイル'%s'", "Help file '%s'"), name);
path_build(path, sizeof(path), ANGBAND_DIR_HELP, name);
-
- /* Open the file */
fff = my_fopen(path, "r");
}
/* Look in "info" */
if (!fff)
{
- /* Caption */
sprintf(caption, _("スポイラー・ファイル'%s'", "Info file '%s'"), name);
path_build(path, sizeof(path), ANGBAND_DIR_INFO, name);
-
- /* Open the file */
fff = my_fopen(path, "r");
}
if ('\\' == path[i])
path[i] = PATH_SEP[0];
- /* Caption */
sprintf(caption, _("スポイラー・ファイル'%s'", "Info file '%s'"), name);
-
- /* Open the file */
fff = my_fopen(path, "r");
}
* @return なし
* @details
* <pre>
- * Assumes that "display_player(0)" has just been called
+ * Assumes that "display_player(p_ptr, 0)" has just been called
* Perhaps we should NOT ask for a name (at "birth()") on
* Unix machines? XXX XXX
* What a horrible name for a global function.
}
else
{
- disturb(TRUE, TRUE);
+ disturb(p_ptr, TRUE, TRUE);
}
/* Clear messages */
{
p_ptr->playing = FALSE;
p_ptr->leaving = TRUE;
- do_cmd_write_nikki(NIKKI_GAMESTART, 0, _("----ゲーム中断----", "---- Save and Exit Game ----"));
+ exe_write_diary(p_ptr, NIKKI_GAMESTART, 0, _("----ゲーム中断----", "---- Save and Exit Game ----"));
}
}
update_playtime();
- display_player(0);
+ display_player(p_ptr, 0);
/* Prompt for p_ptr->inventory_list */
prt(_("何かキーを押すとさらに情報が続きます (ESCで中断): ", "Hit any key to see more information (ESC to abort): "), 23, 0);
c_put_str(tval_to_attr[o_ptr->tval], o_name, j+2, 7);
}
- /* Caption */
prt(format(_("我が家に置いてあったアイテム ( %d ページ): -続く-", "Your home contains (page %d): -more-"), k+1), 0, 0);
/* Wait for it */
prt("", 0, 0);
/* Hack -- current_world_ptr->game_turn off some things */
- disturb(TRUE, TRUE);
+ disturb(p_ptr, TRUE, TRUE);
/* Mega-Hack -- Delay death */
if (p_ptr->chp < 0) p_ptr->is_dead = FALSE;
int line_num = 0;
path_build(buf, sizeof(buf), ANGBAND_DIR_FILE, file_name);
-
- /* Open the file */
fp = my_fopen(buf, "r");
/* Failed */
forget_lite();
forget_view();
- clear_mon_lite();
+ clear_mon_lite(current_floor_ptr);
/* Close stuff */
close_game();
forget_lite();
forget_view();
- clear_mon_lite();
+ clear_mon_lite(current_floor_ptr);
/* Stop playing */
p_ptr->playing = FALSE;
forget_lite();
forget_view();
- clear_mon_lite();
+ clear_mon_lite(current_floor_ptr);
/* Clear the bottom line */
Term_erase(0, hgt - 1, 255);
Term_putstr(45, hgt - 1, -1, TERM_RED, _("緊急セーブ...", "Panic save..."));
- do_cmd_write_nikki(NIKKI_GAMESTART, 0, _("----ゲーム異常終了----", "---- Panic Save and Abort Game ----"));
+ exe_write_diary(p_ptr, NIKKI_GAMESTART, 0, _("----ゲーム異常終了----", "---- Panic Save and Abort Game ----"));
/* Flush output */
Term_fresh();