case EC_HELP:
/* Peruse the main help file */
- (void)show_file(TRUE, _("jeditor.txt", "editor.txt"), NULL, 0, 0);
+ (void)show_file(player_ptr, TRUE, _("jeditor.txt", "editor.txt"), NULL, 0, 0);
/* Redraw all */
tb->dirty_flags |= DIRTY_SCREEN;
/*!
* @brief 指定されたヘルプファイルを表示する / Show specific help file
+ * @param creature_ptr プレーヤーへの参照ポインタ
* @param helpfile ファイル名
* @return なし
*/
-static void show_help(concptr helpfile)
+static void show_help(player_type *creature_ptr, concptr helpfile)
{
screen_save();
- (void)show_file(TRUE, helpfile, NULL, 0, 0);
+ (void)show_file(creature_ptr, TRUE, helpfile, NULL, 0, 0);
screen_load();
}
else k = -1;
if (c == '?')
{
- show_help(_("jmagic.txt#MagicRealms", "magic.txt#MagicRealms"));
+ show_help(creature_ptr, _("jmagic.txt#MagicRealms", "magic.txt#MagicRealms"));
}
else if (c == '=')
{
if (c == '?')
{
#ifdef JP
- show_help("jraceclas.txt#TheRaces");
+ show_help(creature_ptr, "jraceclas.txt#TheRaces");
#else
- show_help("raceclas.txt#TheRaces");
+ show_help(creature_ptr, "raceclas.txt#TheRaces");
#endif
}
else if (c == '=')
if (c == '?')
{
#ifdef JP
- show_help("jraceclas.txt#TheClasses");
+ show_help(creature_ptr, "jraceclas.txt#TheClasses");
#else
- show_help("raceclas.txt#TheClasses");
+ show_help(creature_ptr, "raceclas.txt#TheClasses");
#endif
}
else if (c == '=')
if (c == '?')
{
#ifdef JP
- show_help("jraceclas.txt#ThePersonalities");
+ show_help(creature_ptr, "jraceclas.txt#ThePersonalities");
#else
- show_help("raceclas.txt#ThePersonalities");
+ show_help(creature_ptr, "raceclas.txt#ThePersonalities");
#endif
}
else if (c == '=')
#ifdef ALLOW_AUTOROLLER
/*!
* @brief オートローラで得たい能力値の基準を決める。
+ * @param creature_ptr プレーヤーへの参照ポインタ
* @return なし
*/
-static bool get_stat_limits(void)
+static bool get_stat_limits(player_type *creature_ptr)
{
int i, j, m, cs, os;
int cval[6];
break;
case '?':
#ifdef JP
- show_help("jbirth.txt#AutoRoller");
+ show_help(creature_ptr, "jbirth.txt#AutoRoller");
#else
- show_help("birth.txt#AutoRoller");
+ show_help(creature_ptr, "birth.txt#AutoRoller");
#endif
break;
case '=':
break;
case '?':
#ifdef JP
- show_help("jbirth.txt#AutoRoller");
+ show_help(creature_ptr, "jbirth.txt#AutoRoller");
#else
- show_help("birth.txt#AutoRoller");
+ show_help(creature_ptr, "birth.txt#AutoRoller");
#endif
break;
case '=':
continue;
}
else k = -1;
- if (c == '?') do_cmd_help();
+ if (c == '?') do_cmd_help(creature_ptr);
else if (c == '=')
{
screen_save();
if (autoroller)
{
- if (!get_stat_limits()) return FALSE;
+ if (!get_stat_limits(creature_ptr)) return FALSE;
}
if (autochara)
if (c == '?')
{
#ifdef JP
- show_help("jbirth.txt#AutoRoller");
+ show_help(creature_ptr, "jbirth.txt#AutoRoller");
#else
- show_help("birth.txt#AutoRoller");
+ show_help(creature_ptr, "birth.txt#AutoRoller");
#endif
continue;
}
else if (c == '?')
{
#ifdef JP
- show_help("jbirth.txt#QuickStart");
+ show_help(creature_ptr, "jbirth.txt#QuickStart");
#else
- show_help("birth.txt#QuickStart");
+ show_help(creature_ptr, "birth.txt#QuickStart");
#endif
}
else if ((c == 'y') || (c == 'Y'))
screen_save();
/* Peruse the arena help file */
- (void)show_file(TRUE, _("arena_j.txt", "arena.txt"), NULL, 0, 0);
+ (void)show_file(player_ptr, TRUE, _("arena_j.txt", "arena.txt"), NULL, 0, 0);
screen_load();
break;
}
if (cmd == BACT_GAMBLE_RULES)
{
/* Peruse the gambling help file */
- (void)show_file(TRUE, _("jgambling.txt", "gambling.txt"), NULL, 0, 0);
+ (void)show_file(player_ptr, TRUE, _("jgambling.txt", "gambling.txt"), NULL, 0, 0);
screen_load();
return TRUE;
}
/*!
* @brief 町に関するヘルプを表示する / Display town history
+ * @param player_ptr プレーヤーへの参照ポインタ
* @return なし
*/
-static void town_history(void)
+static void town_history(player_type *player_ptr)
{
screen_save();
- (void)show_file(TRUE, _("jbldg.txt", "bldg.txt"), NULL, 0, 0);
+ (void)show_file(player_ptr, TRUE, _("jbldg.txt", "bldg.txt"), NULL, 0, 0);
screen_load();
}
paid = identify_fully(player_ptr, FALSE);
break;
case BACT_TOWN_HISTORY:
- town_history();
+ town_history(player_ptr);
break;
case BACT_RACE_LEGENDS:
race_legends(player_ptr);
#endif
/* Display the file contents */
- show_file(FALSE, buf, diary_title, -1, 0);
+ show_file(creature_ptr, FALSE, buf, diary_title, -1, 0);
}
my_fclose(fff);
/* Display the file contents */
- show_file(TRUE, file_name, _("*鑑定*済み武器/防具の耐性リスト", "Resistances of *identified* equipment"), 0, 0);
+ show_file(creature_ptr, TRUE, file_name, _("*鑑定*済み武器/防具の耐性リスト", "Resistances of *identified* equipment"), 0, 0);
fd_kill(file_name);
}
my_fclose(fff);
/* Display the file contents */
- show_file(TRUE, file_name, _("既知の伝説のアイテム", "Artifacts Seen"), 0, 0);
+ show_file(player_ptr, TRUE, file_name, _("既知の伝説のアイテム", "Artifacts Seen"), 0, 0);
fd_kill(file_name);
}
* Display known uniques
* With "XTRA HACK UNIQHIST" (Originally from XAngband)
*/
-static void do_cmd_knowledge_uniques(void)
+static void do_cmd_knowledge_uniques(player_type *creature_ptr)
{
u16b why = 2;
IDX *who;
my_fclose(fff);
/* Display the file contents */
- show_file(TRUE, file_name, _("まだ生きているユニーク・モンスター", "Alive Uniques"), 0, 0);
+ show_file(creature_ptr, TRUE, file_name, _("まだ生きているユニーク・モンスター", "Alive Uniques"), 0, 0);
fd_kill(file_name);
}
my_fclose(fff);
/* Display the file contents */
- show_file(TRUE, file_name, _("武器の経験値", "Weapon Proficiency"), 0, 0);
+ show_file(creature_ptr, TRUE, file_name, _("武器の経験値", "Weapon Proficiency"), 0, 0);
fd_kill(file_name);
}
my_fclose(fff);
/* Display the file contents */
- show_file(TRUE, file_name, _("魔法の経験値", "Spell Proficiency"), 0, 0);
+ show_file(creature_ptr, TRUE, file_name, _("魔法の経験値", "Spell Proficiency"), 0, 0);
fd_kill(file_name);
}
my_fclose(fff);
/* Display the file contents */
- show_file(TRUE, file_name, _("技能の経験値", "Miscellaneous Proficiency"), 0, 0);
+ show_file(creature_ptr, TRUE, file_name, _("技能の経験値", "Miscellaneous Proficiency"), 0, 0);
fd_kill(file_name);
}
my_fclose(fff);
/* Display the file contents */
- show_file(TRUE, file_name, _("現在のペット", "Current Pets"), 0, 0);
+ show_file(creature_ptr, TRUE, file_name, _("現在のペット", "Current Pets"), 0, 0);
fd_kill(file_name);
}
/*!
* @brief 現在のペットを表示するコマンドのメインルーチン /
+ * @param creature_ptr プレーヤーへの参照ポインタ
* Total kill count
* @return なし
* @note the player ghosts are ignored.
*/
-static void do_cmd_knowledge_kill_count(void)
+static void do_cmd_knowledge_kill_count(player_type *creature_ptr)
{
/* Open a new file */
FILE *fff;
my_fclose(fff);
/* Display the file contents */
- show_file(TRUE, file_name, _("倒した敵の数", "Kill Count"), 0, 0);
+ show_file(creature_ptr, TRUE, file_name, _("倒した敵の数", "Kill Count"), 0, 0);
fd_kill(file_name);
}
my_fclose(fff);
/* Display the file contents */
- show_file(TRUE, file_name, _("賞金首の一覧", "Wanted monsters"), 0, 0);
+ show_file(creature_ptr, TRUE, file_name, _("賞金首の一覧", "Wanted monsters"), 0, 0);
fd_kill(file_name);
}
my_fclose(fff);
/* Display the file contents */
- show_file(TRUE, file_name, _("八つの徳", "Virtues"), 0, 0);
+ show_file(creature_ptr, TRUE, file_name, _("八つの徳", "Virtues"), 0, 0);
fd_kill(file_name);
}
/*
* Dungeon
*/
-static void do_cmd_knowledge_dungeon(void)
+static void do_cmd_knowledge_dungeon(player_type *creature_ptr)
{
/* Open a new file */
FILE *fff;
my_fclose(fff);
/* Display the file contents */
- show_file(TRUE, file_name, _("今までに入ったダンジョン", "Dungeon"), 0, 0);
+ show_file(creature_ptr, TRUE, file_name, _("今までに入ったダンジョン", "Dungeon"), 0, 0);
fd_kill(file_name);
}
my_fclose(fff);
/* Display the file contents */
- show_file(TRUE, file_name, _("自分に関する情報", "HP-rate & Max stat"), 0, 0);
+ show_file(creature_ptr, TRUE, file_name, _("自分に関する情報", "HP-rate & Max stat"), 0, 0);
fd_kill(file_name);
}
my_fclose(fff);
/* Display the file contents */
- show_file(TRUE, file_name, _("クエスト達成状況", "Quest status"), 0, 0);
+ show_file(creature_ptr, TRUE, file_name, _("クエスト達成状況", "Quest status"), 0, 0);
fd_kill(file_name);
/* Free Memory */
my_fclose(fff);
/* Display the file contents */
- show_file(TRUE, file_name, _("我が家のアイテム", "Home Inventory"), 0, 0);
+ show_file(player_ptr, TRUE, file_name, _("我が家のアイテム", "Home Inventory"), 0, 0);
fd_kill(file_name);
}
/*
* Check the status of "autopick"
*/
-static void do_cmd_knowledge_autopick(void)
+static void do_cmd_knowledge_autopick(player_type *creature_ptr)
{
/* Open a new file */
FILE *fff;
my_fclose(fff);
/* Display the file contents */
- show_file(TRUE, file_name, _("自動拾い/破壊 設定リスト", "Auto-picker/Destroyer"), 0, 0);
+ show_file(creature_ptr, TRUE, file_name, _("自動拾い/破壊 設定リスト", "Auto-picker/Destroyer"), 0, 0);
fd_kill(file_name);
}
do_cmd_knowledge_objects(creature_ptr, &need_redraw, FALSE, -1);
break;
case '3': /* Uniques */
- do_cmd_knowledge_uniques();
+ do_cmd_knowledge_uniques(creature_ptr);
break;
case '4': /* Monsters */
do_cmd_knowledge_monsters(creature_ptr, &need_redraw, FALSE, -1);
break;
case '5': /* Kill count */
- do_cmd_knowledge_kill_count();
+ do_cmd_knowledge_kill_count(creature_ptr);
break;
case '6': /* wanted */
if (!vanilla_town) do_cmd_knowledge_bounty(creature_ptr);
do_cmd_knowledge_virtues(creature_ptr);
break;
case 'g': /* Dungeon */
- do_cmd_knowledge_dungeon();
+ do_cmd_knowledge_dungeon(creature_ptr);
break;
case 'h': /* Quests */
do_cmd_knowledge_quests(creature_ptr);
break;
case 'i': /* Autopick */
- do_cmd_knowledge_autopick();
+ do_cmd_knowledge_autopick(creature_ptr);
break;
default: /* Unknown option */
bell();
case '?':
{
- (void)show_file(TRUE, _("joption.txt#Autosave", "option.txt#Autosave"), NULL, 0, 0);
+ (void)show_file(p_ptr, TRUE, _("joption.txt#Autosave", "option.txt#Autosave"), NULL, 0, 0);
Term_clear();
break;
}
case '?':
{
- (void)show_file(TRUE, _("joption.txt#Window", "option.txt#Window"), NULL, 0, 0);
+ (void)show_file(p_ptr, TRUE, _("joption.txt#Window", "option.txt#Window"), NULL, 0, 0);
Term_clear();
break;
{
strnfmt(buf, sizeof(buf), _("joption.txt#%s", "option.txt#%s"), cheat_info[k].o_text);
/* Peruse the help file */
- (void)show_file(TRUE, buf, NULL, 0, 0);
+ (void)show_file(p_ptr, TRUE, buf, NULL, 0, 0);
Term_clear();
break;
if (k == ESCAPE) break;
else if (k == '?')
{
- (void)show_file(TRUE, _("joption.txt#BaseDelay", "option.txt#BaseDelay"), NULL, 0, 0);
+ (void)show_file(p_ptr, TRUE, _("joption.txt#BaseDelay", "option.txt#BaseDelay"), NULL, 0, 0);
Term_clear();
}
else if (isdigit(k)) delay_factor = D2I(k);
if (k == ESCAPE) break;
else if (k == '?')
{
- (void)show_file(TRUE, _("joption.txt#Hitpoint", "option.txt#Hitpoint"), NULL, 0, 0);
+ (void)show_file(p_ptr, TRUE, _("joption.txt#Hitpoint", "option.txt#Hitpoint"), NULL, 0, 0);
Term_clear();
}
else if (isdigit(k)) hitpoint_warn = D2I(k);
if (k == ESCAPE) break;
else if (k == '?')
{
- (void)show_file(TRUE, _("joption.txt#Manapoint", "option.txt#Manapoint"), NULL, 0, 0);
+ (void)show_file(p_ptr, TRUE, _("joption.txt#Manapoint", "option.txt#Manapoint"), NULL, 0, 0);
Term_clear();
}
else if (isdigit(k)) mana_warn = D2I(k);
}
case '?':
- (void)show_file(TRUE, _("joption.txt", "option.txt"), NULL, 0, 0);
+ (void)show_file(p_ptr, TRUE, _("joption.txt", "option.txt"), NULL, 0, 0);
Term_clear();
break;
{
strnfmt(buf, sizeof(buf), _("joption.txt#%s", "option.txt#%s"), option_info[opt[k]].o_text);
/* Peruse the help file */
- (void)show_file(TRUE, buf, NULL, 0, 0);
+ (void)show_file(p_ptr, TRUE, buf, NULL, 0, 0);
Term_clear();
break;
path_build(buf, sizeof(buf), ANGBAND_DIR_FILE, q);
/* Peruse the help file */
- (void)show_file(TRUE, buf, o_name, 0, 0);
+ (void)show_file(creature_ptr, TRUE, buf, o_name, 0, 0);
screen_load();
used_up=FALSE;
/* Help */
case '?':
{
- do_cmd_help();
+ do_cmd_help(creature_ptr);
break;
}
/*!
* @brief ファイル内容をコンソールに出力する
* Recursive file perusal.
+ * @param creature_ptr プレーヤーへの参照ポインタ
* @param show_version TRUEならばコンソール上にゲームのバージョンを表示する
* @param name ファイル名の文字列
* @param what 内容キャプションの文字列
* Return FALSE on 'q' to exit from a deep, otherwise TRUE.
* </pre>
*/
-bool show_file(bool show_version, concptr name, concptr what, int line, BIT_FLAGS mode)
+bool show_file(player_type *creature_ptr, bool show_version, concptr name, concptr what, int line, BIT_FLAGS mode)
{
int i, n, skey;
case '?':
/* Hack - prevent silly recursion */
if (strcmp(name, _("jhelpinfo.txt", "helpinfo.txt")) != 0)
- show_file(TRUE, _("jhelpinfo.txt", "helpinfo.txt"), NULL, 0, mode);
+ show_file(creature_ptr, TRUE, _("jhelpinfo.txt", "helpinfo.txt"), NULL, 0, mode);
break;
/* Hack -- try showing */
if (askfor(tmp, 80))
{
- if (!show_file(TRUE, tmp, NULL, 0, mode)) skey = 'q';
+ if (!show_file(creature_ptr, TRUE, tmp, NULL, 0, mode)) skey = 'q';
}
}
break;
if ((key > -1) && hook[key][0])
{
/* Recurse on that file */
- if (!show_file(TRUE, hook[key], NULL, 0, mode))
+ if (!show_file(creature_ptr, TRUE, hook[key], NULL, 0, mode))
skey = 'q';
}
}
/*!
* @brief ヘルプを表示するコマンドのメインルーチン
* Peruse the On-Line-Help
+ * @param creature_ptr プレーヤーへの参照ポインタ
* @return なし
* @details
*/
-void do_cmd_help(void)
+void do_cmd_help(player_type *creature_ptr)
{
screen_save();
/* Peruse the main help file */
- (void)show_file(TRUE, _("jhelp.hlp", "help.hlp"), NULL, 0, 0);
+ (void)show_file(creature_ptr, TRUE, _("jhelp.hlp", "help.hlp"), NULL, 0, 0);
screen_load();
}
extern errr check_load_init(void);
extern errr check_time(void);
extern errr check_load(void);
-extern bool show_file(bool show_version, concptr name, concptr what, int line, BIT_FLAGS mode);
-extern void do_cmd_help(void);
+extern bool show_file(player_type *player_ptr, bool show_version, concptr name, concptr what, int line, BIT_FLAGS mode);
+extern void do_cmd_help(player_type *creature_ptr);
extern void process_player_name(player_type *creature_ptr, bool sf);
extern void get_name(player_type *creature_ptr);
extern void do_cmd_save_game(player_type *creature_ptr, int is_autosave);
if (fff) dump_mutations(creature_ptr, fff);
my_fclose(fff);
- show_file(TRUE, file_name, _("突然変異", "Mutations"), 0, 0);
+ show_file(creature_ptr, TRUE, file_name, _("突然変異", "Mutations"), 0, 0);
fd_kill(file_name);
}
/* Help */
case '?':
{
- do_cmd_help();
+ do_cmd_help(client_ptr);
break;
}
/* Hack -- Help */
case '?':
- do_cmd_help();
+ do_cmd_help(creature_ptr);
break;
/* Cure all maladies */