* Special display, part 1
* @return なし
*/
-static void display_player_flag_info(void)
+static void display_player_flag_info(player_type *creature_ptr)
{
TERM_LEN row;
TERM_LEN col;
all_player_flags f;
/* Extract flags and store */
- player_flags(p_ptr, f.player_flags);
- tim_player_flags(p_ptr, f.tim_player_flags);
- player_immunity(p_ptr, f.player_imm);
- tim_player_immunity(p_ptr, f.tim_player_imm);
- known_obj_immunity(p_ptr, f.known_obj_imm);
- player_vuln_flags(p_ptr, f.player_vuln);
+ player_flags(creature_ptr, f.player_flags);
+ tim_player_flags(creature_ptr, f.tim_player_flags);
+ player_immunity(creature_ptr, f.player_imm);
+ tim_player_immunity(creature_ptr, f.tim_player_imm);
+ known_obj_immunity(creature_ptr, f.known_obj_imm);
+ player_vuln_flags(creature_ptr, f.player_vuln);
/*** Set 1 ***/
* Special display, part 2a
* @return なし
*/
-static void display_player_misc_info(void)
+static void display_player_misc_info(player_type *creature_ptr)
{
char buf[80];
char tmp[80];
#else
strcat(tmp," ");
#endif
- strcat(tmp,p_ptr->name);
+ strcat(tmp,creature_ptr->name);
c_put_str(TERM_L_BLUE, tmp, 1, 34);
c_put_str(TERM_L_BLUE, sp_ptr->title, 3, 9);
- c_put_str(TERM_L_BLUE, (p_ptr->mimic_form ? mimic_info[p_ptr->mimic_form].title : rp_ptr->title), 4, 9);
+ c_put_str(TERM_L_BLUE, (creature_ptr->mimic_form ? mimic_info[creature_ptr->mimic_form].title : rp_ptr->title), 4, 9);
c_put_str(TERM_L_BLUE, cp_ptr->title, 5, 9);
/* Display extras */
#endif
- (void)sprintf(buf, "%d", (int)p_ptr->lev);
+ (void)sprintf(buf, "%d", (int)creature_ptr->lev);
c_put_str(TERM_L_BLUE, buf, 6, 9);
- (void)sprintf(buf, "%d/%d", (int)p_ptr->chp, (int)p_ptr->mhp);
+ (void)sprintf(buf, "%d/%d", (int)creature_ptr->chp, (int)creature_ptr->mhp);
c_put_str(TERM_L_BLUE, buf, 7, 9);
- (void)sprintf(buf, "%d/%d", (int)p_ptr->csp, (int)p_ptr->msp);
+ (void)sprintf(buf, "%d/%d", (int)creature_ptr->csp, (int)creature_ptr->msp);
c_put_str(TERM_L_BLUE, buf, 8, 9);
}
/* Bewere that INIT_ASSIGN resets the cur_num. */
init_flags = INIT_NAME_ONLY;
- process_dungeon_file("q_info.txt", 0, 0, 0, 0);
+ process_dungeon_file(creature_ptr, "q_info.txt", 0, 0, 0, 0);
#ifdef JP
sprintf(statmsg, "…あなたは、クエスト「%s」で%sに殺された。", quest[creature_ptr->current_floor_ptr->inside_quest].name, creature_ptr->died_from);
/* Get the quest text */
init_flags = INIT_NAME_ONLY;
- process_dungeon_file("q_info.txt", 0, 0, 0, 0);
+ process_dungeon_file(creature_ptr, "q_info.txt", 0, 0, 0, 0);
sprintf(statmsg, _("…あなたは現在、 クエスト「%s」を遂行中だ。", "...Now, you are in the quest '%s'."), quest[creature_ptr->current_floor_ptr->inside_quest].name);
}
/* See "http://www.cs.berkeley.edu/~davidb/angband.html" */
/* Dump the info */
- display_player_misc_info();
+ display_player_misc_info(creature_ptr);
display_player_stat_info(creature_ptr);
- display_player_flag_info();
+ display_player_flag_info(creature_ptr);
}
/* Special */
msg_format(_("'%s'をオープンできません。", "Cannot open '%s'."), name);
msg_print(NULL);
- return (TRUE);
+ return TRUE;
}
/* Hack -- Re-Open the file */
fff = my_fopen(path, "r");
- if (!fff) return (FALSE);
+ if (!fff) return FALSE;
/* File has been restarted */
next = 0;
my_fclose(fff);
/* Escape */
- if (skey == 'q') return (FALSE);
+ if (skey == 'q') return FALSE;
/* Normal return */
- return (TRUE);
+ return TRUE;
}
/*!
* @brief プレイヤーの名前をチェックして修正する
* Process the player name.
+ * @param player_ptr プレーヤーへの参照ポインタ
* @param sf セーブファイル名に合わせた修正を行うならばTRUE
* @return なし
* @details
* Extract a clean "base name".
* Build the savefile name if needed.
*/
-void process_player_name(bool sf)
+void process_player_name(player_type *creature_ptr, bool sf)
{
int i, k = 0;
char old_player_base[32] = "";
{
concptr s;
s = savefile;
- while (1)
+ while (TRUE)
{
concptr t;
t = my_strstr(s, PATH_SEP);
/* Load an autopick preference file */
if (current_world_ptr->character_generated)
{
- if (!streq(old_player_base, p_ptr->base_name)) autopick_load_pref(FALSE);
+ if (!streq(old_player_base, p_ptr->base_name)) autopick_load_pref(creature_ptr, FALSE);
}
}
/* Clear messages */
msg_print(NULL);
- handle_stuff();
+ handle_stuff(creature_ptr);
prt(_("ゲームをセーブしています...", "Saving game..."), 0, 0);
* Display a "tomb-stone"
* @return なし
*/
-void print_tomb(void)
+void print_tomb(player_type *dead_ptr)
{
bool done = FALSE;
}
/* King or Queen */
- if (current_world_ptr->total_winner || (p_ptr->lev > PY_MAX_LEVEL))
+ if (current_world_ptr->total_winner || (dead_ptr->lev > PY_MAX_LEVEL))
{
#ifdef JP
/* 英日切り替え */
/* Normal */
else
{
- p = player_title[p_ptr->pclass][(p_ptr->lev - 1) / 5];
+ p = player_title[dead_ptr->pclass][(dead_ptr->lev - 1) / 5];
}
- center_string(buf, p_ptr->name);
+ center_string(buf, dead_ptr->name);
put_str(buf, 6, 11);
#ifndef JP
center_string(buf, cp_ptr->title);
put_str(buf, 10, 11);
- (void)sprintf(tmp, _("レベル: %d", "Level: %d"), (int)p_ptr->lev);
+ (void)sprintf(tmp, _("レベル: %d", "Level: %d"), (int)dead_ptr->lev);
center_string(buf, tmp);
put_str(buf, 11, 11);
- (void)sprintf(tmp, _("経験値: %ld", "Exp: %ld"), (long)p_ptr->exp);
+ (void)sprintf(tmp, _("経験値: %ld", "Exp: %ld"), (long)dead_ptr->exp);
center_string(buf, tmp);
put_str(buf, 12, 11);
- (void)sprintf(tmp, _("所持金: %ld", "AU: %ld"), (long)p_ptr->au);
+ (void)sprintf(tmp, _("所持金: %ld", "AU: %ld"), (long)dead_ptr->au);
center_string(buf, tmp);
put_str(buf, 13, 11);
#ifdef JP
/* 墓に刻む言葉をオリジナルより細かく表示 */
- if (streq(p_ptr->died_from, "途中終了"))
+ if (streq(dead_ptr->died_from, "途中終了"))
{
strcpy(tmp, "<自殺>");
}
- else if (streq(p_ptr->died_from, "ripe"))
+ else if (streq(dead_ptr->died_from, "ripe"))
{
strcpy(tmp, "引退後に天寿を全う");
}
- else if (streq(p_ptr->died_from, "Seppuku"))
+ else if (streq(dead_ptr->died_from, "Seppuku"))
{
strcpy(tmp, "勝利の後、切腹");
}
else
{
- roff_to_buf(p_ptr->died_from, GRAVE_LINE_WIDTH + 1, tmp, sizeof tmp);
+ roff_to_buf(dead_ptr->died_from, GRAVE_LINE_WIDTH + 1, tmp, sizeof tmp);
t = tmp + strlen(tmp) + 1;
if (*t)
{
center_string(buf, tmp);
put_str(buf, 14, 11);
- if (!streq(p_ptr->died_from, "ripe") && !streq(p_ptr->died_from, "Seppuku"))
+ if (!streq(dead_ptr->died_from, "ripe") && !streq(dead_ptr->died_from, "Seppuku"))
{
- if (p_ptr->current_floor_ptr->dun_level == 0)
+ if (dead_ptr->current_floor_ptr->dun_level == 0)
{
- concptr field_name = p_ptr->town_num ? "街" : "荒野";
- if (streq(p_ptr->died_from, "途中終了"))
+ concptr field_name = dead_ptr->town_num ? "街" : "荒野";
+ if (streq(dead_ptr->died_from, "途中終了"))
{
sprintf(tmp, "%sで死んだ", field_name);
}
}
else
{
- if (streq(p_ptr->died_from, "途中終了"))
+ if (streq(dead_ptr->died_from, "途中終了"))
{
- sprintf(tmp, "地下 %d 階で死んだ", (int)p_ptr->current_floor_ptr->dun_level);
+ sprintf(tmp, "地下 %d 階で死んだ", (int)dead_ptr->current_floor_ptr->dun_level);
}
else
{
- sprintf(tmp, "に地下 %d 階で殺された", (int)p_ptr->current_floor_ptr->dun_level);
+ sprintf(tmp, "に地下 %d 階で殺された", (int)dead_ptr->current_floor_ptr->dun_level);
}
}
center_string(buf, tmp);
put_str(buf, 15 + extra_line, 11);
}
#else
- (void)sprintf(tmp, "Killed on Level %d", p_ptr->current_floor_ptr->dun_level);
+ (void)sprintf(tmp, "Killed on Level %d", dead_ptr->current_floor_ptr->dun_level);
center_string(buf, tmp);
put_str(buf, 14, 11);
- roff_to_buf(format("by %s.", p_ptr->died_from), GRAVE_LINE_WIDTH + 1, tmp, sizeof tmp);
+ roff_to_buf(format("by %s.", dead_ptr->died_from), GRAVE_LINE_WIDTH + 1, tmp, sizeof tmp);
center_string(buf, tmp);
put_str(buf, 15, 11);
t = tmp + strlen(tmp) + 1;
(void)sprintf(tmp, "%-.24s", ctime(&ct));
center_string(buf, tmp);
put_str(buf, 17, 11);
- msg_format(_("さようなら、%s!", "Goodbye, %s!"), p_ptr->name);
+ msg_format(_("さようなら、%s!", "Goodbye, %s!"), dead_ptr->name);
}
}
if (!o_ptr->k_idx) continue;
/* Aware and Known */
- object_aware(o_ptr);
+ object_aware(creature_ptr, o_ptr);
object_known(o_ptr);
}
if (!o_ptr->k_idx) continue;
/* Aware and Known */
- object_aware(o_ptr);
+ object_aware(creature_ptr, o_ptr);
object_known(o_ptr);
}
}
/* Hack -- Recalculate bonuses */
creature_ptr->update |= (PU_BONUS);
- handle_stuff();
+ handle_stuff(creature_ptr);
/* Flush all input keys */
flush();
temp1[i] ^= (i+1) * 63;
seekpoint = 0;
- while (1)
+ while (TRUE)
{
if (fd_seek(fd, seekpoint + 3 * sizeof(u32b)))
return 1;