#include "cmd-pet.h"
#include "world.h"
#include "player-status.h"
+#include "sort.h"
/*
* Variables for auto dump
*/
static FILE *auto_dump_stream;
-static cptr auto_dump_mark;
+static concptr auto_dump_mark;
static int auto_dump_line_num;
* Remove old lines automatically generated before.
* @param orig_file 消去を行うファイル名
*/
-static void remove_auto_dump(cptr orig_file)
+static void remove_auto_dump(concptr orig_file)
{
FILE *tmp_fff, *orig_fff;
* Dump a formatted line, using "vstrnfmt()".
* @param fmt 出力内容
*/
-static void auto_dump_printf(cptr fmt, ...)
+static void auto_dump_printf(concptr fmt, ...)
{
- cptr p;
+ concptr p;
va_list vp;
char buf[1024];
* @param mark 出力するヘッダマーク
* @return ファイルポインタを取得できたらTRUEを返す
*/
-static bool open_auto_dump(cptr buf, cptr mark)
+static bool open_auto_dump(concptr buf, concptr mark)
{
char header_mark_str[80];
* @param num number
* @return pointer of suffix string.
*/
-cptr get_ordinal_number_suffix(int num)
+concptr get_ordinal_number_suffix(int num)
{
num = ABS(num) % 100;
switch (num % 10)
* @param note 日記内容のIDに応じた文字列参照ポインタ
* @return エラーID
*/
-errr do_cmd_write_nikki(int type, int num, cptr note)
+errr do_cmd_write_nikki(int type, int num, concptr note)
{
int day, hour, min;
FILE *fff = NULL;
GAME_TEXT file_name[MAX_NLEN];
char buf[1024];
- cptr note_level = "";
+ concptr note_level = "";
bool do_level = TRUE;
char note_level_buf[40];
QUEST_IDX q_idx;
}
case NIKKI_STAIR:
{
- cptr to;
+ concptr to;
if (q_idx && (is_fixed_quest_idx(q_idx)
&& !((q_idx == QUEST_OBERON) || (q_idx == QUEST_SERPENT))))
{
}
case NIKKI_WIZ_TELE:
{
- cptr to;
+ concptr to;
if (!dun_level)
to = _("地上", "the surface");
else
}
case NIKKI_PAT_TELE:
{
- cptr to;
+ concptr to;
if (!dun_level)
to = _("地上", "the surface");
else
else strcpy(tmp,subtitle[randint0(MAX_SUBTITLE-2)+1]);
#ifdef JP
- sprintf(nikki_title, "「%s%s%sの伝説 -%s-」",
- ap_ptr->title, ap_ptr->no ? "の" : "", p_ptr->name, tmp);
+ sprintf(nikki_title, "「%s%s%sの伝説 -%s-」", ap_ptr->title, ap_ptr->no ? "の" : "", p_ptr->name, tmp);
#else
- sprintf(nikki_title, "Legend of %s %s '%s'",
- ap_ptr->title, p_ptr->name, tmp);
+ sprintf(nikki_title, "Legend of %s %s '%s'", ap_ptr->title, p_ptr->name, tmp);
#endif
/* Display the file contents */
void do_cmd_redraw(void)
{
int j;
-
term *old = Term;
/* Hack -- react to changes */
Term_xtra(TERM_XTRA_REACT, 0);
-
/* Combine and Reorder the pack (later) */
- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
-
-
+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
p_ptr->update |= (PU_TORCH);
p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE);
char shower_str[81];
char finder_str[81];
char back_str[81];
- cptr shower = NULL;
+ concptr shower = NULL;
int wid, hgt;
int num_lines;
/* Dump up to 20 lines of messages */
for (j = 0; (j < num_lines) && (i + j < n); j++)
{
- cptr msg = message_str(i+j);
+ concptr msg = message_str(i+j);
/* Dump the messages, bottom to top */
c_prt((i + j < num_now ? TERM_WHITE : TERM_SLATE), msg, num_lines + 1 - j, 0);
/* Hilite "shower" */
if (shower && shower[0])
{
- cptr str = msg;
+ concptr str = msg;
/* Display matches */
while ((str = my_strstr(str, shower)) != NULL)
/* Scan messages */
for (z = i + 1; z < n; z++)
{
- cptr msg = message_str(z);
+ concptr msg = message_str(z);
/* Search for it */
if (my_strstr(msg, finder_str))
* @param info 表示メッセージ
* @return なし
*/
-static void do_cmd_options_cheat(cptr info)
+static void do_cmd_options_cheat(concptr info)
{
char ch;
int i, k = 0, n = CHEAT_MAX;
* @param info 表示メッセージ
* @return なし
*/
-static void do_cmd_options_autosave(cptr info)
+static void do_cmd_options_autosave(concptr info)
{
char ch;
int i, k = 0, n = 2;
* @param info 表示メッセージ
* @return なし
*/
-void do_cmd_options_aux(int page, cptr info)
+void do_cmd_options_aux(int page, concptr info)
{
char ch;
int i, k = 0, n = 0, l;
{
byte a = TERM_WHITE;
- cptr s = angband_term_name[j];
+ concptr s = angband_term_name[j];
/* Use color */
if (j == x) a = TERM_L_BLUE;
{
byte a = TERM_WHITE;
- cptr str = window_flag_desc[i];
+ concptr str = window_flag_desc[i];
/* Use color */
if (i == y) a = TERM_L_BLUE;
static struct opts
{
char key;
- cptr name;
+ concptr name;
int row;
}
option_fields[OPT_NUM] =
* @param fname ファイル名
* @return なし
*/
-static errr macro_dump(cptr fname)
+static errr macro_dump(concptr fname)
{
- static cptr mark = "Macro Dump";
+ static concptr mark = "Macro Dump";
int i;
* @return エラーコード
* @details
*/
-static errr keymap_dump(cptr fname)
+static errr keymap_dump(concptr fname)
{
- static cptr mark = "Keymap Dump";
+ static concptr mark = "Keymap Dump";
int i;
char key[1024];
/* Dump them */
for (i = 0; i < 256; i++)
{
- cptr act;
+ concptr act;
/* Loop up the keymap */
act = keymap_act[mode][i];
/* Query a keymap */
else if (i == '7')
{
- cptr act;
+ concptr act;
/* Prompt */
prt(_("コマンド: キー配置の確認", "Command: Query a keymap"), 16, 0);
/*!
* @brief キャラクタ色の明暗表現
*/
-static cptr lighting_level_str[F_LIT_MAX] =
+static concptr lighting_level_str[F_LIT_MAX] =
{
#ifdef JP
"標準色",
* @param choice_msg 選択メッセージ
* @return なし
*/
-static void print_visuals_menu(cptr choice_msg)
+static void print_visuals_menu(concptr choice_msg)
{
prt(_("[ 画面表示の設定 ]", "Interact with Visuals"), 1, 0);
char tmp[160];
char buf[1024];
bool need_redraw = FALSE;
- cptr empty_symbol = "<< ? >>";
+ concptr empty_symbol = "<< ? >>";
if (use_bigtile) empty_symbol = "<< ?? >>";
/* Dump monster attr/chars */
case '1':
{
- static cptr mark = "Monster attr/chars";
+ static concptr mark = "Monster attr/chars";
/* Prompt */
prt(_("コマンド: モンスターの[色/文字]をファイルに書き出します", "Command: Dump monster attr/chars"), 15, 0);
/* Dump object attr/chars */
case '2':
{
- static cptr mark = "Object attr/chars";
+ static concptr mark = "Object attr/chars";
KIND_OBJECT_IDX k_idx;
/* Prompt */
/* Dump feature attr/chars */
case '3':
{
- static cptr mark = "Feature attr/chars";
+ static concptr mark = "Feature attr/chars";
/* Prompt */
prt(_("コマンド: 地形の[色/文字]をファイルに書き出します", "Command: Dump feature attr/chars"), 15, 0);
/* Modify monster attr/chars (numeric operation) */
case '4':
{
- static cptr choice_msg = _("モンスターの[色/文字]を変更します", "Change monster attr/chars");
+ static concptr choice_msg = _("モンスターの[色/文字]を変更します", "Change monster attr/chars");
static IDX r = 0;
prt(format(_("コマンド: %s", "Command: %s"), choice_msg), 15, 0);
/* Modify object attr/chars (numeric operation) */
case '5':
{
- static cptr choice_msg = _("アイテムの[色/文字]を変更します", "Change object attr/chars");
+ static concptr choice_msg = _("アイテムの[色/文字]を変更します", "Change object attr/chars");
static IDX k = 0;
prt(format(_("コマンド: %s", "Command: %s"), choice_msg), 15, 0);
/* Modify feature attr/chars (numeric operation) */
case '6':
{
- static cptr choice_msg = _("地形の[色/文字]を変更します", "Change feature attr/chars");
+ static concptr choice_msg = _("地形の[色/文字]を変更します", "Change feature attr/chars");
static IDX f = 0;
static IDX lighting_level = F_LIT_STANDARD;
prt(format(_("コマンド: %s", "Command: %s"), choice_msg), 15, 0);
/* Dump colors */
else if (i == '2')
{
- static cptr mark = "Colors";
+ static concptr mark = "Colors";
/* Prompt */
prt(_("コマンド: カラーの設定をファイルに書き出します", "Command: Dump colors"), 8, 0);
int gv = angband_color_table[i][2];
int bv = angband_color_table[i][3];
- cptr name = _("未知", "unknown");
+ concptr name = _("未知", "unknown");
/* Skip non-entries */
if (!kv && !rv && !gv && !bv) continue;
/* Hack -- query until done */
while (1)
{
- cptr name;
+ concptr name;
byte j;
/* Clear */
*/
void do_cmd_version(void)
{
- /* Silly message */
-
#if FAKE_VER_EXTRA > 0
msg_format(_("変愚蛮怒(Hengband) %d.%d.%d.%d", "You are playing Hengband %d.%d.%d.%d."),
FAKE_VER_MAJOR-10, FAKE_VER_MINOR, FAKE_VER_PATCH, FAKE_VER_EXTRA);
/*
* Array of feeling strings
*/
-static cptr do_cmd_feeling_text[11] =
+static concptr do_cmd_feeling_text[11] =
{
_("この階の雰囲気を感じとれなかった...", "Looks like any other level."),
_("この階には何か特別なものがあるような気がする。", "You feel there is something special about this level."),
_("なんて退屈なところだ...", "What a boring place...")
};
-static cptr do_cmd_feeling_text_combat[11] =
+static concptr do_cmd_feeling_text_combat[11] =
{
_("この階の雰囲気を感じとれなかった...", "Looks like any other level."),
_("この階には何か特別なものがあるような気がする。", "You feel there is something special about this level."),
_("なんて退屈なところだ...", "What a boring place...")
};
-static cptr do_cmd_feeling_text_lucky[11] =
+static concptr do_cmd_feeling_text_lucky[11] =
{
_("この階の雰囲気を感じとれなかった...", "Looks like any other level."),
_("この階には何か特別なものがあるような気がする。", "You feel there is something special about this level."),
*/
void do_cmd_feeling(void)
{
+ if (p_ptr->wild_mode) return;
+
/* No useful feeling in quests */
if (p_ptr->inside_quest && !random_quest_number(dun_level))
{
/*
* Description of each monster group.
*/
-static cptr monster_group_text[] =
+static concptr monster_group_text[] =
{
#ifdef JP
"ユニーク", /* "Uniques" */
* Symbols of monsters in each group. Note the "Uniques" group
* is handled differently.
*/
-static cptr monster_group_char[] =
+static concptr monster_group_char[] =
{
(char *) -1L,
(char *) -2L,
int dummy_why;
/* Get a list of x_char in this group */
- cptr group_char = monster_group_char[grp_cur];
+ concptr group_char = monster_group_char[grp_cur];
/* XXX Hack -- Check if this is the "Uniques" group */
bool grp_unique = (monster_group_char[grp_cur] == (char *) -1L);
/*
* Description of each monster group.
*/
-static cptr object_group_text[] =
+static concptr object_group_text[] =
{
#ifdef JP
"キノコ", /* "Mushrooms" */
/*
* Description of each feature group.
*/
-static cptr feature_group_text[] =
+static concptr feature_group_text[] =
{
"terrains",
NULL
*/
void do_cmd_load_screen(void)
{
- int i, y, x;
-
+ int i;
+ TERM_LEN y, x;
TERM_COLOR a = 0;
- char c = ' ';
-
+ SYMBOL_CODE c = ' ';
bool okay = TRUE;
-
FILE *fff;
-
char buf[1024];
-
- int wid, hgt;
+ TERM_LEN wid, hgt;
Term_get_size(&wid, &hgt);
}
}
-
/* Close it */
my_fclose(fff);
-
prt(_("ファイルに書き出された画面(記念撮影)をロードしました。", "Screen dump loaded."), 0, 0);
flush();
-cptr inven_res_label = _(" 酸電火冷毒光闇破轟獄因沌劣 盲怖乱痺透命感消復浮",
+concptr inven_res_label = _(" 酸電火冷毒光闇破轟獄因沌劣 盲怖乱痺透命感消復浮",
" AcElFiCoPoLiDkShSoNtNxCaDi BlFeCfFaSeHlEpSdRgLv");
static void do_cmd_knowledge_inven(void)
{
FILE *fff;
-
GAME_TEXT file_name[1024];
-
store_type *st_ptr;
-
OBJECT_TYPE_VALUE tval;
int i = 0;
int j = 0;
- char where[32];
+ char where[32];
/* Open a new file */
fff = my_fopen_temp(file_name, 1024);
void do_cmd_save_screen_html_aux(char *filename, int message)
{
- int y, x, i;
+ TERM_LEN y, x;
+ int i;
TERM_COLOR a = 0, old_a = 0;
char c = ' ';
char buf[2048];
int yomikomu = 0;
- cptr tags[4] = {
+ concptr tags[4] = {
"HEADER_START:",
"HEADER_END:",
"FOOTER_START:",
"FOOTER_END:",
};
- cptr html_head[] = {
+ concptr html_head[] = {
"<html>\n<body text=\"#ffffff\" bgcolor=\"#000000\">\n",
"<pre>",
0,
};
- cptr html_foot[] = {
+ concptr html_foot[] = {
"</pre>\n",
"</body>\n</html>\n",
0,
};
- int wid, hgt;
+ TERM_LEN wid, hgt;
Term_get_size(&wid, &hgt);
for (x = 0; x < wid - 1; x++)
{
int rv, gv, bv;
- cptr cc = NULL;
+ concptr cc = NULL;
/* Get the attr/char */
(void)(Term_what(x, y, &a, &c));
}
else /* Dump the screen as text */
{
- int y, x;
-
+ TERM_LEN y, x;
TERM_COLOR a = 0;
- char c = ' ';
-
+ SYMBOL_CODE c = ' ';
FILE *fff;
-
char buf[1024];
/* Build the filename */
}
/* Allocate the "who" array */
- C_MAKE(who, max_r_idx, s16b);
+ C_MAKE(who, max_r_idx, MONRACE_IDX);
/* Scan the monsters */
for (i = 1; i < max_r_idx; i++)
FILE *fff;
- GAME_TEXT file_name[1024];
- GAME_TEXT skill_name[3][20]={_("マーシャルアーツ", "Martial Arts "),
- _("二刀流 ", "Dual Wielding "),
- _("乗馬 ", "Riding ")};
+ char file_name[1024];
+ char skill_name[GINOU_TEMPMAX][20] =
+ {
+ _("マーシャルアーツ", "Martial Arts "),
+ _("二刀流 ", "Dual Wielding "),
+ _("乗馬 ", "Riding "),
+ _("盾 ", "Shield ")
+ };
/* Open a new file */
fff = my_fopen_temp(file_name, 1024);
return;
}
- for (i = 0; i < 3; i++)
+ for (i = 0; i < GINOU_TEMPMAX; i++)
{
skill_exp = p_ptr->skill_exp[i];
fprintf(fff, "%-20s ", skill_name[i]);
}
else if (my_strstr(Name, " of "))
{
- cptr aider = my_strstr(Name, " of ");
+ concptr aider = my_strstr(Name, " of ");
char dummy[80];
int i = 0;
- cptr ctr = Name;
+ concptr ctr = Name;
while (ctr < aider)
{
* @param grp_top 現在の選択リスト最上部ID
* @return なし
*/
-static void display_group_list(int col, int row, int wid, int per_page, IDX grp_idx[], cptr group_text[], int grp_cur, int grp_top)
+static void display_group_list(int col, int row, int wid, int per_page, IDX grp_idx[], concptr group_text[], int grp_cur, int grp_top)
{
int i;
browser_rows = hgt - 8;
/* Allocate the "mon_idx" array */
- C_MAKE(mon_idx, max_r_idx, s16b);
+ C_MAKE(mon_idx, max_r_idx, MONRACE_IDX);
max = 0;
grp_cnt = 0;
browser_rows = hgt - 8;
/* Allocate the "object_idx" array */
- C_MAKE(object_idx, max_k_idx, IDX);
+ C_MAKE(object_idx, max_k_idx, KIND_OBJECT_IDX);
max = 0;
grp_cnt = 0;
else fprintf(fff, "Your current Life Rating is ???.\n\n");
fprintf(fff, "Limits of maximum stats\n\n");
#endif
- for (v_nr = 0; v_nr < 6; v_nr++)
+ for (v_nr = 0; v_nr < A_MAX; v_nr++)
{
if ((p_ptr->knowledge & KNOW_STAT) || p_ptr->stat_max[v_nr] == p_ptr->stat_max_max[v_nr]) fprintf(fff, "%s 18/%d\n", stat_names[v_nr], p_ptr->stat_max_max[v_nr]-18);
else fprintf(fff, "%s ???\n", stat_names[v_nr]);
/*
* Print all finished quests
*/
-void do_cmd_knowledge_quests_completed(FILE *fff, IDX quest_num[])
+void do_cmd_knowledge_quests_completed(FILE *fff, QUEST_IDX quest_num[])
{
- int i;
- int total = 0;
+ QUEST_IDX i;
+ QUEST_IDX total = 0;
fprintf(fff, _("《達成したクエスト》\n", "< Completed Quest >\n"));
for (i = 1; i < max_q_idx; i++)
{
- IDX q_idx = quest_num[i];
+ QUEST_IDX q_idx = quest_num[i];
quest_type* const q_ptr = &quest[q_idx];
- if (q_ptr->status == QUEST_STATUS_FINISHED &&
- do_cmd_knowledge_quests_aux(fff, q_idx))
+ if (q_ptr->status == QUEST_STATUS_FINISHED && do_cmd_knowledge_quests_aux(fff, q_idx))
{
- ++ total;
+ ++total;
}
}
if (!total) fprintf(fff, _(" なし\n", " Nothing.\n"));
/*
* Print all failed quests
*/
-void do_cmd_knowledge_quests_failed(FILE *fff, IDX quest_num[])
+void do_cmd_knowledge_quests_failed(FILE *fff, QUEST_IDX quest_num[])
{
- IDX i;
- int total = 0;
+ QUEST_IDX i;
+ QUEST_IDX total = 0;
fprintf(fff, _("《失敗したクエスト》\n", "< Failed Quest >\n"));
for (i = 1; i < max_q_idx; i++)
{
- IDX q_idx = quest_num[i];
+ QUEST_IDX q_idx = quest_num[i];
quest_type* const q_ptr = &quest[q_idx];
if (((q_ptr->status == QUEST_STATUS_FAILED_DONE) || (q_ptr->status == QUEST_STATUS_FAILED)) &&
do_cmd_knowledge_quests_aux(fff, q_idx))
{
- ++ total;
+ ++total;
}
}
if (!total) fprintf(fff, _(" なし\n", " Nothing.\n"));
*/
static void do_cmd_knowledge_quests_wiz_random(FILE *fff)
{
- char tmp_str[120];
- int i;
- int total = 0;
+ GAME_TEXT tmp_str[120];
+ QUEST_IDX i;
+ QUEST_IDX total = 0;
fprintf(fff, _("《残りのランダムクエスト》\n", "< Remaining Random Quest >\n"));
for (i = 1; i < max_q_idx; i++)
}
/* Allocate Memory */
- C_MAKE(quest_num, max_q_idx, IDX);
+ C_MAKE(quest_num, max_q_idx, QUEST_IDX);
/* Sort by compete level */
for (i = 1; i < max_q_idx; i++) quest_num[i] = i;
GAME_TEXT file_name[1024];
store_type *st_ptr;
GAME_TEXT o_name[MAX_NLEN];
- cptr paren = ")";
+ concptr paren = ")";
process_dungeon_file("w_info.txt", 0, 0, max_wild_y, max_wild_x);
for (k = 0; k < max_autopick; k++)
{
- cptr tmp;
+ concptr tmp;
byte act = autopick_list[k].action;
if (act & DONT_AUTOPICK)
{