*/
#include "angband.h"
+#include "sort.h"
#ifdef ALLOW_SPOILERS
* @param r_ptr モンスター種族の構造体ポインタ
* @return シンボル職の記述名
*/
-static cptr attr_to_text(monster_race *r_ptr)
+static concptr attr_to_text(monster_race *r_ptr)
{
#ifdef JP000
if (r_ptr->flags1 & RF1_ATTR_CLEAR) return "透明な";
typedef struct
{
OBJECT_TYPE_VALUE tval;
- cptr name;
+ concptr name;
} grouper;
q_ptr->to_h = 0;
q_ptr->to_d = 0;
-
- /* Level */
(*lev) = k_info[q_ptr->k_idx].level;
-
- /* Value */
(*val) = object_value(q_ptr);
-
/* Hack */
if (!buf || !dam || !chance || !wgt) return;
-
/* Description (too brief) */
object_desc(buf, q_ptr, (OD_NAME_ONLY | OD_STORE));
-
/* Misc info */
strcpy(dam, "");
* @param fname ファイル名
* @return なし
*/
-static void spoil_obj_desc(cptr fname)
+static void spoil_obj_desc(concptr fname)
{
int i, k, s, t, n = 0, group_start = 0;
struct flag_desc
{
const int flag;
- const char *const desc;
+ concptr const desc;
};
*
* This list includes extra attacks, for simplicity.
*/
- cptr pval_affects[N_ELEMENTS(stat_flags_desc) - 1 +
+ concptr pval_affects[N_ELEMENTS(stat_flags_desc) - 1 +
N_ELEMENTS(pval_flags1_desc) + 1];
} pval_info_type;
pval_info_type pval_info;
/* A list of an object's slaying preferences */
- cptr slays[N_ELEMENTS(slay_flags_desc) + 1];
+ concptr slays[N_ELEMENTS(slay_flags_desc) + 1];
/* A list if an object's elemental brands */
- cptr brands[N_ELEMENTS(brand_flags_desc) + 1];
+ concptr brands[N_ELEMENTS(brand_flags_desc) + 1];
/* A list of immunities granted by an object */
- cptr immunities[N_ELEMENTS(immune_flags_desc) + 1];
+ concptr immunities[N_ELEMENTS(immune_flags_desc) + 1];
/* A list of resistances granted by an object */
- cptr resistances[N_ELEMENTS(resist_flags_desc) + 1];
+ concptr resistances[N_ELEMENTS(resist_flags_desc) + 1];
/* A list of stats sustained by an object */
- cptr sustains[N_ELEMENTS(sustain_flags_desc) - 1 + 1];
+ concptr sustains[N_ELEMENTS(sustain_flags_desc) - 1 + 1];
/* A list of various magical qualities an object may have */
- cptr misc_magic[N_ELEMENTS(misc_flags2_desc) + N_ELEMENTS(misc_flags3_desc)
+ concptr misc_magic[N_ELEMENTS(misc_flags2_desc) + N_ELEMENTS(misc_flags3_desc)
+ 1 /* Permanent Light */
+ 1 /* TY curse */
+ 1 /* type of curse */
char addition[80];
/* A string describing an artifact's activation */
- cptr activation;
+ concptr activation;
/* "Level 20, Rarity 30, 3.0 lbs, 20000 Gold" */
char misc_desc[80];
* @param str 出力したい文字列
* @return なし
*/
-static void spoiler_underline(cptr str)
+static void spoiler_underline(concptr str)
{
fprintf(fff, "%s\n", str);
spoiler_out_n_chars(strlen(str), '-');
* The possibly updated description pointer is returned.
* </pre>
*/
-static cptr *spoiler_flag_aux(const BIT_FLAGS art_flags[TR_FLAG_SIZE],
+static concptr *spoiler_flag_aux(const BIT_FLAGS art_flags[TR_FLAG_SIZE],
const flag_desc *flag_ptr,
- cptr *desc_ptr, const int n_elmnts)
+ concptr *desc_ptr, const int n_elmnts)
{
int i;
{
BIT_FLAGS flgs[TR_FLAG_SIZE];
- cptr *affects_list;
+ concptr *affects_list;
/* If pval == 0, there is nothing to do. */
if (!o_ptr->pval)
pi_ptr->pval_desc[0] = '\0';
return;
}
-
- /* Extract the flags */
object_flags(o_ptr, flgs);
affects_list = pi_ptr->pval_affects;
* @param slay_list 種族スレイ構造体の参照ポインタ
* @return なし
*/
-static void analyze_slay(object_type *o_ptr, cptr *slay_list)
+static void analyze_slay(object_type *o_ptr, concptr *slay_list)
{
BIT_FLAGS flgs[TR_FLAG_SIZE];
* @param brand_list 属性ブランド構造体の参照ポインタ
* @return なし
*/
-static void analyze_brand(object_type *o_ptr, cptr *brand_list)
+static void analyze_brand(object_type *o_ptr, concptr *brand_list)
{
BIT_FLAGS flgs[TR_FLAG_SIZE];
* @param resist_list 通常耐性構造体の参照ポインタ
* @return なし
*/
-static void analyze_resist(object_type *o_ptr, cptr *resist_list)
+static void analyze_resist(object_type *o_ptr, concptr *resist_list)
{
BIT_FLAGS flgs[TR_FLAG_SIZE];
* @param immune_list 免疫構造体の参照ポインタ
* @return なし
*/
-static void analyze_immune(object_type *o_ptr, cptr *immune_list)
+static void analyze_immune(object_type *o_ptr, concptr *immune_list)
{
BIT_FLAGS flgs[TR_FLAG_SIZE];
* @param sustain_list 維持特性構造体の参照ポインタ
* @return なし
*/
-static void analyze_sustains(object_type *o_ptr, cptr *sustain_list)
+static void analyze_sustains(object_type *o_ptr, concptr *sustain_list)
{
BIT_FLAGS flgs[TR_FLAG_SIZE];
* @param misc_list その他の特性構造体の参照ポインタ
* @return なし
*/
-static void analyze_misc_magic(object_type *o_ptr, cptr *misc_list)
+static void analyze_misc_magic(object_type *o_ptr, concptr *misc_list)
{
BIT_FLAGS flgs[TR_FLAG_SIZE];
POSITION rad;
/* Init */
strcpy(addition, "");
-#ifdef JP
- if ((a_ptr->gen_flags & TRG_XTRA_POWER) && (a_ptr->gen_flags & TRG_XTRA_H_RES)) strcat(addition, "能力and耐性");
- else if (a_ptr->gen_flags & TRG_XTRA_POWER)
- {
- strcat(addition, "能力");
- if (a_ptr->gen_flags & TRG_XTRA_RES_OR_POWER) strcat(addition, "(1/2でand耐性)");
- }
- else if (a_ptr->gen_flags & TRG_XTRA_H_RES)
- {
- strcat(addition, "耐性");
- if (a_ptr->gen_flags & TRG_XTRA_RES_OR_POWER) strcat(addition, "(1/2でand能力)");
- }
- else if (a_ptr->gen_flags & TRG_XTRA_RES_OR_POWER) strcat(addition, "能力or耐性");
-#else
- if ((a_ptr->gen_flags & TRG_XTRA_POWER) && (a_ptr->gen_flags & TRG_XTRA_H_RES)) strcat(addition, "Ability and Resistance");
+ if ((a_ptr->gen_flags & TRG_XTRA_POWER) && (a_ptr->gen_flags & TRG_XTRA_H_RES)) strcat(addition, _("能力and耐性", "Ability and Resistance"));
else if (a_ptr->gen_flags & TRG_XTRA_POWER)
{
- strcat(addition, "Ability");
- if (a_ptr->gen_flags & TRG_XTRA_RES_OR_POWER) strcat(addition, "(plus Resistance about 1/2)");
+ strcat(addition, _("能力", "Ability"));
+ if (a_ptr->gen_flags & TRG_XTRA_RES_OR_POWER) strcat(addition, _("(1/2でand耐性)", "(plus Resistance about 1/2)"));
}
else if (a_ptr->gen_flags & TRG_XTRA_H_RES)
{
- strcat(addition, "Resistance");
- if (a_ptr->gen_flags & TRG_XTRA_RES_OR_POWER) strcat(addition, "(plus Ability about 1/2)");
+ strcat(addition, _("耐性", "Resistance"));
+ if (a_ptr->gen_flags & TRG_XTRA_RES_OR_POWER) strcat(addition, _("(1/2でand能力)", "(plus Ability about 1/2)"));
}
- else if (a_ptr->gen_flags & TRG_XTRA_RES_OR_POWER) strcat(addition, "Ability or Resistance");
-#endif
+ else if (a_ptr->gen_flags & TRG_XTRA_RES_OR_POWER) strcat(addition, _("能力or耐性", "Ability or Resistance"));
}
* @param separator フラグ表示の区切り記号
* @return なし
*/
-static void spoiler_outlist(cptr header, cptr *list, char separator)
+static void spoiler_outlist(concptr header, concptr *list, char separator)
{
int line_len, buf_len;
char line[MAX_LINE_LEN+1], buf[80];
*/
static bool make_fake_artifact(object_type *o_ptr, IDX name1)
{
- IDX i;
+ OBJECT_IDX i;
artifact_type *a_ptr = &a_info[name1];
/* Ignore "empty" artifacts */
* @param fname 生成ファイル名
* @return なし
*/
-static void spoil_artifact(cptr fname)
+static void spoil_artifact(concptr fname)
{
int i;
IDX j;
* @param fname 生成ファイル名
* @return なし
*/
-static void spoil_mon_desc(cptr fname)
+static void spoil_mon_desc(concptr fname)
{
int i, n = 0;
u16b why = 2;
- s16b *who;
+ MONRACE_IDX *who;
char buf[1024];
}
/* Allocate the "who" array */
- C_MAKE(who, max_r_idx, s16b);
+ C_MAKE(who, max_r_idx, MONRACE_IDX);
/* Dump the header */
fprintf(fff, "Monster Spoilers for Hengband Version %d.%d.%d\n",
{
monster_race *r_ptr = &r_info[who[i]];
- cptr name = (r_name + r_ptr->name);
+ concptr name = (r_name + r_ptr->name);
if (r_ptr->flags7 & (RF7_KAGE)) continue;
/* Get the "name" */
* @param str 文字列参照ポインタ
* @return なし
*/
-static void spoil_out(cptr str)
+static void spoil_out(concptr str)
{
- cptr r;
+ concptr r;
/* Line buffer */
static char roff_buf[256];
#ifdef JP
bool k_flag_local;
bool iskanji_flag_local = FALSE;
- cptr tail = str + (k_flag ? 2 : 1);
+ concptr tail = str + (k_flag ? 2 : 1);
#else
- cptr tail = str + 1;
+ concptr tail = str + 1;
#endif
for (; *tail; tail++)
* @param str 文字列参照ポインタ
* @return なし
*/
-static void roff_func(byte attr, cptr str)
+static void roff_func(TERM_COLOR attr, concptr str)
{
/* Unused */
(void)attr;
* @param fname ファイル名
* @return なし
*/
-static void spoil_mon_info(cptr fname)
+static void spoil_mon_info(concptr fname)
{
char buf[1024];
int i, l, n = 0;
BIT_FLAGS flags1;
u16b why = 2;
- s16b *who;
+ MONRACE_IDX *who;
/* Build the filename */
path_build(buf, sizeof(buf), ANGBAND_DIR_USER, fname);
spoil_out("------------------------------------------\n\n");
/* 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++)
for (l = 0; l < n; l++)
{
monster_race *r_ptr = &r_info[who[l]];
-
- /* Extract the flags */
flags1 = r_ptr->flags1;
/* Prefix */
* @param fname 出力ファイル名
* @return なし
*/
-static void spoil_mon_evol(cptr fname)
+static void spoil_mon_evol(concptr fname)
{
char buf[1024];
monster_race *r_ptr;
*/
void do_cmd_spoilers(void)
{
- /* Save the screen */
screen_save();
/* Interact */
while (1)
{
- /* Clear screen */
Term_clear();
/* Info */
{
/* Escape */
case ESCAPE:
- /* Restore the screen */
screen_load();
return;
break;
}
- /* Flush messages */
- msg_print(NULL);
+ msg_erase();
}
}
/* Now deal with the description lists */
-#ifdef JP
- spoiler_outlist("対:", art_ptr->slays, ITEM_SEP);
- spoiler_outlist("武器属性:", art_ptr->brands, LIST_SEP);
- spoiler_outlist("免疫:", art_ptr->immunities, ITEM_SEP);
- spoiler_outlist("耐性:", art_ptr->resistances, ITEM_SEP);
- spoiler_outlist("維持:", art_ptr->sustains, ITEM_SEP);
-#else
- spoiler_outlist("Slay", art_ptr->slays, ITEM_SEP);
- spoiler_outlist("", art_ptr->brands, LIST_SEP);
- spoiler_outlist("Immunity to", art_ptr->immunities, ITEM_SEP);
- spoiler_outlist("Resist", art_ptr->resistances, ITEM_SEP);
- spoiler_outlist("Sustain", art_ptr->sustains, ITEM_SEP);
-#endif
+ spoiler_outlist(_("対:", "Slay"), art_ptr->slays, ITEM_SEP);
+ spoiler_outlist(_("武器属性:", ""), art_ptr->brands, LIST_SEP);
+ spoiler_outlist(_("免疫:", "Immunity to"), art_ptr->immunities, ITEM_SEP);
+ spoiler_outlist(_("耐性:", "Resist"), art_ptr->resistances, ITEM_SEP);
+ spoiler_outlist(_("維持:", "Sustain"), art_ptr->sustains, ITEM_SEP);
spoiler_outlist("", art_ptr->misc_magic, LIST_SEP);
/* Write out the possible activation at the primary indention level */
* @param fname 出力ファイル名
* @return なし
*/
-void spoil_random_artifact(cptr fname)
+void spoil_random_artifact(concptr fname)
{
int i,j;
char buf[1024];
-
/* Build the filename */
path_build(buf, sizeof(buf), ANGBAND_DIR_USER, fname);