-/*!
+/*!
* @file wizard1.c
- * @brief ¥¦¥£¥¶¡¼¥É¥â¡¼¥É¤Î½èÍý(¥¹¥Ý¥¤¥é¡¼½ÐÎÏÃæ¿´) / Spoiler generation -BEN-
+ * @brief ウィザードモードの処理(スポイラー出力中心) / Spoiler generation -BEN-
* @date 2014/02/17
* @author
* Copyright (c) 1997 Ben Harrison, and others
*/
#include "angband.h"
+#include "util.h"
+#include "term.h"
+
+#include "core.h"
+#include "artifact.h"
+#include "sort.h"
+#include "store.h"
+#include "monster.h"
+#include "object-flavor.h"
+#include "object-hook.h"
+#include "object-ego.h"
+#include "objectkind.h"
+#include "floor-town.h"
+#include "files.h"
#ifdef ALLOW_SPOILERS
-/*
- * The spoiler file being created
- */
+ /*
+ * The spoiler file being created
+ */
static FILE *fff = NULL;
/*!
- * @brief ¥·¥ó¥Ü¥ë¿¦¤Îµ½Ò̾¤òÊÖ¤¹ /
+ * @brief シンボル職の記述名を返す /
* Extract a textual representation of an attribute
- * @param r_ptr ¥â¥ó¥¹¥¿¡¼¼ï²¤Î¹½Â¤ÂΥݥ¤¥ó¥¿
- * @return ¥·¥ó¥Ü¥ë¿¦¤Îµ½Ò̾
+ * @param r_ptr ã\83¢ã\83³ã\82¹ã\82¿ã\83¼ç¨®æ\97\8fã\81®æ§\8bé\80 ä½\93ã\83\9dã\82¤ã\83³ã\82¿
+ * @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 "Æ©ÌÀ¤Ê";
- if (r_ptr->flags1 & RF1_ATTR_MULTI) return "Ëü¿§¤Î";
- if (r_ptr->flags1 & RF1_ATTR_SEMIRAND) return "½à¥é¥ó¥À¥à¤Ê";
+ if (r_ptr->flags1 & RF1_ATTR_CLEAR) return "透明な";
+ if (r_ptr->flags1 & RF1_ATTR_MULTI) return "万色の";
+ if (r_ptr->flags1 & RF1_ATTR_SEMIRAND) return "準ランダムな";
#else
if (r_ptr->flags1 & RF1_ATTR_CLEAR) return "Clear";
if (r_ptr->flags1 & RF1_ATTR_MULTI) return "Multi";
switch (r_ptr->d_attr)
{
#ifdef JP000
- case TERM_DARK: return "XXX¤¤";
- case TERM_WHITE: return "Çò¤¤";
- case TERM_SLATE: return "Àij¥¿§¤Î";
- case TERM_ORANGE: return "¥ª¥ì¥ó¥¸¤Î";
- case TERM_RED: return "ÀÖ¤¤";
- case TERM_GREEN: return "ÎФÎ";
- case TERM_BLUE: return "ÀĤ¤";
- case TERM_UMBER: return "àèàῧ¤Î";
- case TERM_L_DARK: return "³¥¿§¤Î";
- case TERM_L_WHITE: return "ÌÀÀij¥¿§¤Î";
- case TERM_VIOLET: return "»ç¤Î";
- case TERM_YELLOW: return "²«¿§¤¤";
- case TERM_L_RED: return "ÌÀ¤¤ÀÖ¤Î";
- case TERM_L_GREEN: return "ÌÀ¤¤ÎФÎ";
- case TERM_L_BLUE: return "ÌÀ¤¤ÀĤÎ";
- case TERM_L_UMBER: return "ÌÀ¤¤àèàῧ¤Î";
+ case TERM_DARK: return "XXXい";
+ case TERM_WHITE: return "白い";
+ case TERM_SLATE: return "青灰色の";
+ case TERM_ORANGE: return "オレンジの";
+ case TERM_RED: return "赤い";
+ case TERM_GREEN: return "緑の";
+ case TERM_BLUE: return "青い";
+ case TERM_UMBER: return "琥珀色の";
+ case TERM_L_DARK: return "灰色の";
+ case TERM_L_WHITE: return "明青灰色の";
+ case TERM_VIOLET: return "紫の";
+ case TERM_YELLOW: return "黄色い";
+ case TERM_L_RED: return "明い赤の";
+ case TERM_L_GREEN: return "明い緑の";
+ case TERM_L_BLUE: return "明い青の";
+ case TERM_L_UMBER: return "明い琥珀色の";
#else
case TERM_DARK: return "xxx";
case TERM_WHITE: return "White";
#endif
}
- /* Oops */
#ifdef JP000
- return "ÊѤÊ";
+ return "変な";
#else
return "Icky";
#endif
*/
typedef struct
{
- byte tval;
- cptr name;
+ OBJECT_TYPE_VALUE tval;
+ concptr name;
} grouper;
*/
-/*
- * The basic items categorized by type
- */
+ /*
+ * The basic items categorized by type
+ */
static grouper group_item[] =
{
-#ifdef JP
- { TV_SHOT, "¼Í·âʪ" },
-#else
- { TV_SHOT, "Ammo" },
-#endif
-
+ { TV_SHOT, _("射撃物", "Ammo") },
{ TV_ARROW, NULL },
{ TV_BOLT, NULL },
-
-#ifdef JP
- { TV_BOW, "µÝ" },
-#else
- { TV_BOW, "Bows" },
-#endif
-
-#ifdef JP
- { TV_DIGGING, "Éð´ï" },
-#else
- { TV_DIGGING, "Weapons" },
-#endif
-
+ { TV_BOW, _("弓", "Bows") },
+ { TV_DIGGING, _("武器", "Weapons") },
{ TV_POLEARM, NULL },
{ TV_HAFTED, NULL },
{ TV_SWORD, NULL },
-
-#ifdef JP
- { TV_SOFT_ARMOR, "Ëɶñ (ÂÎ)" },
-#else
- { TV_SOFT_ARMOR, "Armour (Body)" },
-#endif
-
+ { TV_SOFT_ARMOR, _("防具 (体)", "Armour (Body)") },
{ TV_HARD_ARMOR, NULL },
{ TV_DRAG_ARMOR, NULL },
-
-#ifdef JP
- { TV_BOOTS, "Ëɶñ (¤½¤Î¾)" },
-#else
- { TV_BOOTS, "Armour (Misc)" },
-#endif
-
+ { TV_BOOTS, _("防具 (その他)", "Armour (Misc)") },
{ TV_GLOVES, NULL },
{ TV_HELM, NULL },
{ TV_CROWN, NULL },
{ TV_SHIELD, NULL },
{ TV_CLOAK, NULL },
-#ifdef JP
- { TV_LITE, "¸÷¸»" },
- { TV_AMULET, "¥¢¥ß¥å¥ì¥Ã¥È" },
- { TV_RING, "»ØÎØ" },
-#else
- { TV_LITE, "Light Sources" },
- { TV_AMULET, "Amulets" },
- { TV_RING, "Rings" },
-#endif
-
-#ifdef JP
- { TV_STAFF, "¾ó" },
- { TV_WAND, "ËâË¡ËÀ" },
- { TV_ROD, "¥í¥Ã¥É" },
-#else
- { TV_STAFF, "Staffs" },
- { TV_WAND, "Wands" },
- { TV_ROD, "Rods" },
-#endif
-
-#ifdef JP
- { TV_SCROLL, "´¬Êª" },
- { TV_POTION, "Ìô" },
- { TV_FOOD, "¿©ÎÁ" },
-#else
- { TV_SCROLL, "Scrolls" },
- { TV_POTION, "Potions" },
- { TV_FOOD, "Food" },
-#endif
-
-#ifdef JP
- { TV_LIFE_BOOK, "ËâË¡½ñ (À¸Ì¿)" },
- { TV_SORCERY_BOOK, "ËâË¡½ñ (Àç½Ñ)" },
- { TV_NATURE_BOOK, "ËâË¡½ñ (¼«Á³)" },
- { TV_CHAOS_BOOK, "ËâË¡½ñ (¥«¥ª¥¹)" },
- { TV_DEATH_BOOK, "ËâË¡½ñ (°Å¹õ)" },
- { TV_TRUMP_BOOK, "ËâË¡½ñ (¥È¥é¥ó¥×)" },
- { TV_ARCANE_BOOK, "ËâË¡½ñ (Èë½Ñ)" },
- { TV_CRAFT_BOOK, "ËâË¡½ñ (¾¢)" },
- { TV_DAEMON_BOOK, "ËâË¡½ñ (°Ëâ)" },
- { TV_CRUSADE_BOOK, "ËâË¡½ñ (Ç˼Ù)" },
- { TV_MUSIC_BOOK, "²Î½¸" },
- { TV_HISSATSU_BOOK, "Éð·Ý¤Î½ñ" },
- { TV_HEX_BOOK, "ËâË¡½ñ (¼ö½Ñ)" },
-#else
- { TV_LIFE_BOOK, "Books (Life)" },
- { TV_SORCERY_BOOK, "Books (Sorcery)" },
- { TV_NATURE_BOOK, "Books (Nature)" },
- { TV_CHAOS_BOOK, "Books (Chaos)" },
- { TV_DEATH_BOOK, "Books (Death)" },
- { TV_TRUMP_BOOK, "Books (Trump)" },
- { TV_ARCANE_BOOK, "Books (Arcane)" },
- { TV_CRAFT_BOOK, "Books (Craft)" },
- { TV_DAEMON_BOOK, "Books (Daemon)" },
- { TV_CRUSADE_BOOK, "Books (Crusade)" },
- { TV_MUSIC_BOOK, "Song Books" },
- { TV_HISSATSU_BOOK, "Books (Kendo)" },
- { TV_HEX_BOOK, "Books (Hex)" },
-#endif
-
-#ifdef JP
- { TV_WHISTLE, "ū" },
- { TV_CAPTURE, "¥¥ã¥×¥Á¥ã¡¼¡¦¥Ü¡¼¥ë" },
- { TV_CARD, "¥¨¥¯¥¹¥×¥ì¥¹¥«¡¼¥É" },
-#else
- { TV_WHISTLE, "Whistle" },
- { TV_CAPTURE, "Capture Ball" },
- { TV_CARD, "Express Card" },
-#endif
-
-#ifdef JP
- { TV_CHEST, "Ȣ" },
-#else
- { TV_CHEST, "Chests" },
-#endif
-
-#ifdef JP
- { TV_FIGURINE, "¿Í·Á" },
- { TV_STATUE, "Áü" },
- { TV_CORPSE, "»àÂÎ" },
-#else
- { TV_FIGURINE, "Magical Figurines" },
- { TV_STATUE, "Statues" },
- { TV_CORPSE, "Corpses" },
-#endif
-
-#ifdef JP
- { TV_SKELETON, "¤½¤Î¾" },
-#else
- { TV_SKELETON, "Misc" },
-#endif
-
+ { TV_LITE, _("光源", "Light Sources") },
+ { TV_AMULET, _("アミュレット", "Amulets")},
+ { TV_RING, _("指輪", "Rings") },
+ { TV_STAFF, _("杖", "Staffs") },
+ { TV_WAND, _("魔法棒", "Wands") },
+ { TV_ROD, _("ロッド", "Rods") },
+ { TV_SCROLL, _("巻物", "Scrolls") },
+ { TV_POTION, _("薬", "Potions") },
+ { TV_FOOD, _("食料", "Food") },
+
+ { TV_LIFE_BOOK, _("魔法書 (生命)", "Books (Life)") },
+ { TV_SORCERY_BOOK, _("魔法書 (仙術)", "Books (Sorcery)") },
+ { TV_NATURE_BOOK, _("魔法書 (自然)", "Books (Nature)") },
+ { TV_CHAOS_BOOK, _("魔法書 (カオス)", "Books (Chaos)") },
+ { TV_DEATH_BOOK, _("魔法書 (暗黒)", "Books (Death)") },
+ { TV_TRUMP_BOOK, _("魔法書 (トランプ)", "Books (Trump)") },
+ { TV_ARCANE_BOOK, _("魔法書 (秘術)", "Books (Arcane)") },
+ { TV_CRAFT_BOOK, _("魔法書 (匠)", "Books (Craft)") },
+ { TV_DAEMON_BOOK, _("魔法書 (悪魔)", "Books (Daemon)") },
+ { TV_CRUSADE_BOOK, _("魔法書 (破邪)", "Books (Crusade)") },
+ { TV_MUSIC_BOOK, _("歌集", "Song Books") },
+ { TV_HISSATSU_BOOK, _("武芸の書", "Books (Kendo)") },
+ { TV_HEX_BOOK, _("魔法書 (呪術)", "Books (Hex)") },
+
+ { TV_WHISTLE, _("笛", "Whistle") },
+ { TV_CAPTURE, _("キャプチャー・ボール", "Capture Ball") },
+ { TV_CARD, _("エクスプレスカード", "Express Card") },
+
+ { TV_CHEST, _("箱", "Chests") },
+
+ { TV_FIGURINE, _("人形", "Magical Figurines") },
+ { TV_STATUE, _("像", "Statues") },
+ { TV_CORPSE, _("死体", "Corpses") },
+
+ { TV_SKELETON, _("その他", "Misc") },
{ TV_BOTTLE, NULL },
{ TV_JUNK, NULL },
{ TV_SPIKE, NULL },
/*!
- * @brief ¥Ù¡¼¥¹¥¢¥¤¥Æ¥à¤Î³Æ¾ðÊó¤òʸ»úÎ󲽤¹¤ë /
+ * @brief ベースアイテムの各情報を文字列化する /
* Describe the kind
- * @param buf ̾¾Î¤òÊÖ¤¹¥Ð¥Ã¥Õ¥¡»²¾È¥Ý¥¤¥ó¥¿
- * @param dam ¥À¥á¡¼¥¸¥À¥¤¥¹µ½Ò¤òÊÖ¤¹¥Ð¥Ã¥Õ¥¡»²¾È¥Ý¥¤¥ó¥¿
- * @param wgt ½ÅÎ̵½Ò¤òÊÖ¤¹¥Ð¥Ã¥Õ¥¡»²¾È¥Ý¥¤¥ó¥¿
- * @param lev À¸À®³¬µ½Ò¤òÊÖ¤¹¥Ð¥Ã¥Õ¥¡»²¾È¥Ý¥¤¥ó¥¿
- * @param val ²ÁÃͤòÊÖ¤¹¥Ð¥Ã¥Õ¥¡»²¾È¥Ý¥¤¥ó¥¿
- * @param k ¥Ù¡¼¥¹¥¢¥¤¥Æ¥àID
- * @return ¤Ê¤·
+ * @param buf 名称を返すバッファ参照ポインタ
+ * @param dam ダメージダイス記述を返すバッファ参照ポインタ
+ * @param wgt 重量記述を返すバッファ参照ポインタ
+ * @param lev 生成階記述を返すバッファ参照ポインタ
+ * @param chance 生成機会を返すバッファ参照ポインタ
+ * @param val 価値を返すバッファ参照ポインタ
+ * @param k ベースアイテムID
+ * @return なし
*/
-static void kind_info(char *buf, char *dam, char *wgt, int *lev, s32b *val, int k)
+static void kind_info(char *buf, char *dam, char *wgt, char *chance, DEPTH *lev, PRICE *val, OBJECT_IDX k)
{
object_type forge;
object_type *q_ptr;
-
-
- /* Get local object */
+ int i;
q_ptr = &forge;
/* Prepare a fake item */
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 || !wgt) return;
-
+ if (!buf || !dam || !chance || !wgt) return;
/* Description (too brief) */
object_desc(buf, q_ptr, (OD_NAME_ONLY | OD_STORE));
-
/* Misc info */
strcpy(dam, "");
switch (q_ptr->tval)
{
/* Bows */
- case TV_BOW:
- {
- break;
- }
+ case TV_BOW:
+ {
+ break;
+ }
- /* Ammo */
- case TV_SHOT:
- case TV_BOLT:
- case TV_ARROW:
- {
- sprintf(dam, "%dd%d", q_ptr->dd, q_ptr->ds);
- break;
- }
+ /* Ammo */
+ case TV_SHOT:
+ case TV_BOLT:
+ case TV_ARROW:
+ {
+ sprintf(dam, "%dd%d", q_ptr->dd, q_ptr->ds);
+ break;
+ }
- /* Weapons */
- case TV_HAFTED:
- case TV_POLEARM:
- case TV_SWORD:
- case TV_DIGGING:
- {
- sprintf(dam, "%dd%d", q_ptr->dd, q_ptr->ds);
- break;
- }
+ /* Weapons */
+ case TV_HAFTED:
+ case TV_POLEARM:
+ case TV_SWORD:
+ case TV_DIGGING:
+ {
+ sprintf(dam, "%dd%d", q_ptr->dd, q_ptr->ds);
+ break;
+ }
+
+ /* Armour */
+ case TV_BOOTS:
+ case TV_GLOVES:
+ case TV_CLOAK:
+ case TV_CROWN:
+ case TV_HELM:
+ case TV_SHIELD:
+ case TV_SOFT_ARMOR:
+ case TV_HARD_ARMOR:
+ case TV_DRAG_ARMOR:
+ {
+ sprintf(dam, "%d", q_ptr->ac);
+ break;
+ }
+ }
- /* Armour */
- case TV_BOOTS:
- case TV_GLOVES:
- case TV_CLOAK:
- case TV_CROWN:
- case TV_HELM:
- case TV_SHIELD:
- case TV_SOFT_ARMOR:
- case TV_HARD_ARMOR:
- case TV_DRAG_ARMOR:
+ /* Chance */
+ strcpy(chance, "");
+ for (i = 0; i < 4; i++)
+ {
+ char chance_aux[20] = "";
+ if (k_info[q_ptr->k_idx].chance[i] > 0)
{
- sprintf(dam, "%d", q_ptr->ac);
- break;
+ sprintf(chance_aux, "%s%3dF:%+4d", (i != 0 ? "/" : ""),
+ (int)k_info[q_ptr->k_idx].locale[i], 100 / k_info[q_ptr->k_idx].chance[i]);
+ strcat(chance, chance_aux);
}
}
/* Weight */
- sprintf(wgt, "%3d.%d", q_ptr->weight / 10, q_ptr->weight % 10);
+ sprintf(wgt, "%3d.%d", (int)(q_ptr->weight / 10), (int)(q_ptr->weight % 10));
}
/*!
- * @brief ³Æ¥Ù¡¼¥¹¥¢¥¤¥Æ¥à¤Î¾ðÊó¤ò°ì¹ÔËè¤Ëµ½Ò¤¹¤ë /
+ * @brief 各ベースアイテムの情報を一行毎に記述する /
* Create a spoiler file for items
- * @param fname ¥Õ¥¡¥¤¥ë̾
- * @return ¤Ê¤·
+ * @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;
- u16b who[200];
+ OBJECT_IDX who[200];
char buf[1024];
char wgt[80];
+ char chance[80];
char dam[80];
-
- /* Build the filename */
path_build(buf, sizeof(buf), ANGBAND_DIR_USER, fname);
/* File type is "TEXT" */
FILE_TYPE(FILE_TYPE_TEXT);
-
- /* Open the file */
fff = my_fopen(buf, "w");
- /* Oops */
if (!fff)
{
msg_print("Cannot create spoiler file.");
/* Header */
- fprintf(fff, "Spoiler File -- Basic Items (Hengband %d.%d.%d)\n\n\n",
- FAKE_VER_MAJOR-10, FAKE_VER_MINOR, FAKE_VER_PATCH);
+ fprintf(fff, "Spoiler File -- Basic Items (Hengband %d.%d.%d.%d)\n\n\n",
+ FAKE_VER_MAJOR - 10, FAKE_VER_MINOR, FAKE_VER_PATCH, FAKE_VER_EXTRA);
/* More Header */
- fprintf(fff, "%-45s %8s%7s%5s%9s\n",
- "Description", "Dam/AC", "Wgt", "Lev", "Cost");
- fprintf(fff, "%-45s %8s%7s%5s%9s\n",
- "----------------------------------------",
- "------", "---", "---", "----");
+ fprintf(fff, "%-37s%8s%7s%5s %40s%9s\n",
+ "Description", "Dam/AC", "Wgt", "Lev", "Chance", "Cost");
+ fprintf(fff, "%-37s%8s%7s%5s %40s%9s\n",
+ "-------------------------------------", "------", "---", "---", "----------------", "----");
/* List the groups */
for (i = 0; TRUE; i++)
int i1 = t;
int i2 = t + 1;
- int e1;
- int e2;
+ DEPTH e1;
+ DEPTH e2;
- s32b t1;
- s32b t2;
+ PRICE t1;
+ PRICE t2;
- kind_info(NULL, NULL, NULL, &e1, &t1, who[i1]);
- kind_info(NULL, NULL, NULL, &e2, &t2, who[i2]);
+ kind_info(NULL, NULL, NULL, NULL, &e1, &t1, who[i1]);
+ kind_info(NULL, NULL, NULL, NULL, &e2, &t2, who[i2]);
if ((t1 > t2) || ((t1 == t2) && (e1 > e2)))
{
- int tmp = who[i1];
+ u16b tmp = who[i1];
who[i1] = who[i2];
who[i2] = tmp;
}
/* Spoil each item */
for (s = 0; s < n; s++)
{
- int e;
- s32b v;
+ DEPTH e;
+ PRICE v;
/* Describe the kind */
- kind_info(buf, dam, wgt, &e, &v, who[s]);
+ kind_info(buf, dam, wgt, chance, &e, &v, who[s]);
/* Dump it */
- fprintf(fff, " %-45s%8s%7s%5d%9ld\n",
- buf, dam, wgt, e, (long)(v));
+ fprintf(fff, " %-35s%8s%7s%5d %-40s%9ld\n",
+ buf, dam, wgt, (int)e, chance, (long)(v));
}
/* Start a new set */
if (k_ptr->gen_flags & (TRG_INSTA_ART)) continue;
/* Save the index */
- who[n++] = k;
+ who[n++] = (u16b)k;
}
}
return;
}
- /* Message */
msg_print("Successfully created a spoiler file.");
}
*/
-/*
- * Returns a "+" string if a number is non-negative and an empty
- * string if negative
- */
+ /*
+ * Returns a "+" string if a number is non-negative and an empty
+ * string if negative
+ */
#define POSITIZE(v) (((v) >= 0) ? "+" : "")
-/*
- * These are used to format the artifact spoiler file. INDENT1 is used
- * to indent all but the first line of an artifact spoiler. INDENT2 is
- * used when a line "wraps". (Bladeturner's resistances cause this.)
- */
+ /*
+ * These are used to format the artifact spoiler file. INDENT1 is used
+ * to indent all but the first line of an artifact spoiler. INDENT2 is
+ * used when a line "wraps". (Bladeturner's resistances cause this.)
+ */
#define INDENT1 " "
#define INDENT2 " "
-/*
- * MAX_LINE_LEN specifies when a line should wrap.
- */
+ /*
+ * MAX_LINE_LEN specifies when a line should wrap.
+ */
#define MAX_LINE_LEN 75
-/*
- * Given an array, determine how many elements are in the array
- */
+ /*
+ * Given an array, determine how many elements are in the array
+ */
#define N_ELEMENTS(a) (sizeof (a) / sizeof ((a)[0]))
-/*
- * The artifacts categorized by type
- */
+ /*
+ * The artifacts categorized by type
+ */
static grouper group_artifact[] =
{
#ifdef JP
- { TV_SWORD, "Åá·õ" },
- { TV_POLEARM, "Áä/Éà" },
- { TV_HAFTED, "Æß´ï" },
- { TV_DIGGING, "¥·¥ã¥Ù¥ë/¤Ä¤ë¤Ï¤·" },
- { TV_BOW, "Èô¤ÓÆ»¶ñ" },
- { TV_ARROW, "Ìð" },
+ { TV_SWORD, "刀剣" },
+ { TV_POLEARM, "槍/斧" },
+ { TV_HAFTED, "鈍器" },
+ { TV_DIGGING, "シャベル/つるはし" },
+ { TV_BOW, "飛び道具" },
+ { TV_ARROW, "矢" },
{ TV_BOLT, NULL },
- { TV_SOFT_ARMOR, "³»" },
+ { TV_SOFT_ARMOR, "鎧" },
{ TV_HARD_ARMOR, NULL },
{ TV_DRAG_ARMOR, NULL },
- { TV_CLOAK, "¥¯¥í¡¼¥¯" },
- { TV_SHIELD, "½â" },
+ { TV_CLOAK, "ã\82¯ã\83ã\83¼ã\82¯" },
+ { TV_SHIELD, "盾" },
{ TV_CARD, NULL },
- { TV_HELM, "³õ/´§" },
+ { TV_HELM, "兜/冠" },
{ TV_CROWN, NULL },
- { TV_GLOVES, "äƼê" },
- { TV_BOOTS, "·¤" },
+ { TV_GLOVES, "籠手" },
+ { TV_BOOTS, "靴" },
- { TV_LITE, "¸÷¸»" },
- { TV_AMULET, "¥¢¥ß¥å¥ì¥Ã¥È" },
- { TV_RING, "»ØÎØ" },
+ { TV_LITE, "光源" },
+ { TV_AMULET, "アミュレット" },
+ { TV_RING, "指輪" },
#else
{ TV_SWORD, "Edged Weapons" },
{ TV_POLEARM, "Polearms" },
struct flag_desc
{
const int flag;
- const char *const desc;
+ concptr const desc;
};
static flag_desc stat_flags_desc[] =
{
#ifdef JP
- { TR_STR, "ÏÓÎÏ" },
- { TR_INT, "ÃÎǽ" },
- { TR_WIS, "¸¤µ" },
- { TR_DEX, "´ïÍѤµ" },
- { TR_CON, "Âѵ×ÎÏ" },
- { TR_CHR, "Ì¥ÎÏ" }
+ { TR_STR, "腕力" },
+ { TR_INT, "ç\9f¥è\83½" },
+ { TR_WIS, "賢さ" },
+ { TR_DEX, "器用さ" },
+ { TR_CON, "耐久力" },
+ { TR_CHR, "魅力" }
#else
{ TR_STR, "STR" },
{ TR_INT, "INT" },
static flag_desc pval_flags1_desc[] =
{
#ifdef JP
- { TR_MAGIC_MASTERY, "ËâË¡Æ»¶ñ»ÈÍÑǽÎÏ" },
- { TR_STEALTH, "±£Ì©" },
- { TR_SEARCH, "õº÷" },
- { TR_INFRA, "ÀÖ³°Àþ»ëÎÏ" },
- { TR_TUNNEL, "ºÎ·¡" },
- { TR_BLOWS, "¹¶·â²ó¿ô" },
- { TR_SPEED, "¥¹¥Ô¡¼¥É" }
+ { TR_MAGIC_MASTERY, "魔法道具使用能力" },
+ { TR_STEALTH, "隠密" },
+ { TR_SEARCH, "探索" },
+ { TR_INFRA, "赤外線視力" },
+ { TR_TUNNEL, "採掘" },
+ { TR_BLOWS, "攻撃回数" },
+ { TR_SPEED, "スピード" }
#else
{ TR_STEALTH, "Stealth" },
{ TR_SEARCH, "Searching" },
static flag_desc slay_flags_desc[] =
{
#ifdef JP
- { TR_SLAY_ANIMAL, "ưʪ" },
- { TR_KILL_ANIMAL, "*ưʪ*" },
- { TR_SLAY_EVIL, "¼Ù°" },
- { TR_KILL_EVIL, "*¼Ù°*" },
- { TR_SLAY_HUMAN, "¿Í´Ö" },
- { TR_KILL_HUMAN, "*¿Í´Ö*" },
- { TR_SLAY_UNDEAD, "¥¢¥ó¥Ç¥Ã¥É" },
- { TR_KILL_UNDEAD, "*¥¢¥ó¥Ç¥Ã¥É*" },
- { TR_SLAY_DEMON, "°Ëâ" },
- { TR_KILL_DEMON, "*°Ëâ*" },
- { TR_SLAY_ORC, "¥ª¡¼¥¯" },
- { TR_KILL_ORC, "*¥ª¡¼¥¯*" },
- { TR_SLAY_TROLL, "¥È¥í¥ë" },
- { TR_KILL_TROLL, "*¥È¥í¥ë*" },
- { TR_SLAY_GIANT, "µð¿Í" },
- { TR_KILL_GIANT, "*µð¿Í*" },
- { TR_SLAY_DRAGON, "¥É¥é¥´¥ó" },
- { TR_KILL_DRAGON, "*¥É¥é¥´¥ó*" },
+ { TR_SLAY_ANIMAL, "動物" },
+ { TR_KILL_ANIMAL, "*動物*" },
+ { TR_SLAY_EVIL, "邪悪" },
+ { TR_KILL_EVIL, "*邪悪*" },
+ { TR_SLAY_HUMAN, "人間" },
+ { TR_KILL_HUMAN, "*人間*" },
+ { TR_SLAY_UNDEAD, "アンデッド" },
+ { TR_KILL_UNDEAD, "*アンデッド*" },
+ { TR_SLAY_DEMON, "悪魔" },
+ { TR_KILL_DEMON, "*悪魔*" },
+ { TR_SLAY_ORC, "ã\82ªã\83¼ã\82¯" },
+ { TR_KILL_ORC, "*ã\82ªã\83¼ã\82¯*" },
+ { TR_SLAY_TROLL, "トロル" },
+ { TR_KILL_TROLL, "*トロル*" },
+ { TR_SLAY_GIANT, "巨人" },
+ { TR_KILL_GIANT, "*巨人*" },
+ { TR_SLAY_DRAGON, "ドラゴン" },
+ { TR_KILL_DRAGON, "*ドラゴン*" },
#else
{ TR_SLAY_ANIMAL, "Animal" },
{ TR_KILL_ANIMAL, "XAnimal" },
static flag_desc brand_flags_desc[] =
{
#ifdef JP
- { TR_BRAND_ACID, "Íϲò" },
- { TR_BRAND_ELEC, "ÅÅ·â" },
- { TR_BRAND_FIRE, "¾Æ´þ" },
- { TR_BRAND_COLD, "Åà·ë" },
- { TR_BRAND_POIS, "ÆÇ»¦" },
-
- { TR_FORCE_WEAPON, "ÍýÎÏ" },
- { TR_CHAOTIC, "º®ÆÙ" },
- { TR_VAMPIRIC, "µÛ·ì" },
- { TR_IMPACT, "ÃÏ¿Ì" },
- { TR_VORPAL, "ÀÚ¤ìÌ£" },
+ { TR_BRAND_ACID, "溶解" },
+ { TR_BRAND_ELEC, "電撃" },
+ { TR_BRAND_FIRE, "焼棄" },
+ { TR_BRAND_COLD, "凍結" },
+ { TR_BRAND_POIS, "毒殺" },
+
+ { TR_FORCE_WEAPON, "理力" },
+ { TR_CHAOTIC, "混沌" },
+ { TR_VAMPIRIC, "吸血" },
+ { TR_IMPACT, "地震" },
+ { TR_VORPAL, "切れ味" },
#else
{ TR_BRAND_ACID, "Acid Brand" },
{ TR_BRAND_ELEC, "Lightning Brand" },
static const flag_desc resist_flags_desc[] =
{
#ifdef JP
- { TR_RES_ACID, "»À" },
- { TR_RES_ELEC, "ÅÅ·â" },
- { TR_RES_FIRE, "²Ð±ê" },
- { TR_RES_COLD, "Î䵤" },
- { TR_RES_POIS, "ÆÇ" },
- { TR_RES_FEAR, "¶²ÉÝ"},
- { TR_RES_LITE, "Á®¸÷" },
- { TR_RES_DARK, "°Å¹õ" },
- { TR_RES_BLIND, "ÌÕÌÜ" },
- { TR_RES_CONF, "º®Íð" },
- { TR_RES_SOUND, "¹ì²»" },
- { TR_RES_SHARDS, "ÇËÊÒ" },
- { TR_RES_NETHER, "ÃϹö" },
- { TR_RES_NEXUS, "°ø²Ìº®Íð" },
- { TR_RES_CHAOS, "¥«¥ª¥¹" },
- { TR_RES_DISEN, "Îô²½" },
+ { TR_RES_ACID, "酸" },
+ { TR_RES_ELEC, "電撃" },
+ { TR_RES_FIRE, "火炎" },
+ { TR_RES_COLD, "冷気" },
+ { TR_RES_POIS, "毒" },
+ { TR_RES_FEAR, "恐怖"},
+ { TR_RES_LITE, "閃光" },
+ { TR_RES_DARK, "暗黒" },
+ { TR_RES_BLIND, "盲目" },
+ { TR_RES_CONF, "混乱" },
+ { TR_RES_SOUND, "轟音" },
+ { TR_RES_SHARDS, "破片" },
+ { TR_RES_NETHER, "地獄" },
+ { TR_RES_NEXUS, "因果混乱" },
+ { TR_RES_CHAOS, "ã\82«ã\82ªã\82¹" },
+ { TR_RES_DISEN, "劣化" },
#else
{ TR_RES_ACID, "Acid" },
{ TR_RES_ELEC, "Lightning" },
static const flag_desc immune_flags_desc[] =
{
#ifdef JP
- { TR_IM_ACID, "»À" },
- { TR_IM_ELEC, "ÅÅ·â" },
- { TR_IM_FIRE, "²Ð±ê" },
- { TR_IM_COLD, "Î䵤" },
+ { TR_IM_ACID, "酸" },
+ { TR_IM_ELEC, "電撃" },
+ { TR_IM_FIRE, "火炎" },
+ { TR_IM_COLD, "冷気" },
#else
{ TR_IM_ACID, "Acid" },
{ TR_IM_ELEC, "Lightning" },
static const flag_desc sustain_flags_desc[] =
{
#ifdef JP
- { TR_SUST_STR, "ÏÓÎÏ" },
- { TR_SUST_INT, "ÃÎǽ" },
- { TR_SUST_WIS, "¸¤µ" },
- { TR_SUST_DEX, "´ïÍѤµ" },
- { TR_SUST_CON, "Âѵ×ÎÏ" },
- { TR_SUST_CHR, "Ì¥ÎÏ" },
+ { TR_SUST_STR, "腕力" },
+ { TR_SUST_INT, "ç\9f¥è\83½" },
+ { TR_SUST_WIS, "賢さ" },
+ { TR_SUST_DEX, "器用さ" },
+ { TR_SUST_CON, "耐久力" },
+ { TR_SUST_CHR, "魅力" },
#else
{ TR_SUST_STR, "STR" },
{ TR_SUST_INT, "INT" },
static const flag_desc misc_flags2_desc[] =
{
#ifdef JP
- { TR_THROW, "ÅêÚ³" },
- { TR_REFLECT, "È¿¼Í" },
- { TR_FREE_ACT, "ËãáãÃΤ餺" },
- { TR_HOLD_EXP, "·Ð¸³ÃÍ°Ý»ý" },
+ { TR_THROW, "投擲" },
+ { TR_REFLECT, "反射" },
+ { TR_FREE_ACT, "麻痺知らず" },
+ { TR_HOLD_EXP, "経験値維持" },
#else
{ TR_THROW, "Throwing" },
{ TR_REFLECT, "Reflection" },
static const flag_desc misc_flags3_desc[] =
{
#ifdef JP
- { TR_SH_FIRE, "²Ð±ê¥ª¡¼¥é" },
- { TR_SH_ELEC, "Åŷ⥪¡¼¥é" },
- { TR_SH_COLD, "Î䵤¥ª¡¼¥é" },
- { TR_NO_TELE, "È¿¥Æ¥ì¥Ý¡¼¥È" },
- { TR_NO_MAGIC, "È¿ËâË¡" },
- { TR_LEVITATION, "ÉâÍ·" },
- { TR_SEE_INVIS, "²Ä»ëÆ©ÌÀ" },
- { TR_TELEPATHY, "¥Æ¥ì¥Ñ¥·¡¼" },
- { TR_ESP_ANIMAL, "ưʪ´¶ÃÎ" },
- { TR_ESP_UNDEAD, "ÉԻശÃÎ" },
- { TR_ESP_DEMON, "°Ëâ´¶ÃÎ" },
- { TR_ESP_ORC, "¥ª¡¼¥¯´¶ÃÎ" },
- { TR_ESP_TROLL, "¥È¥í¥ë´¶ÃÎ" },
- { TR_ESP_GIANT, "µð¿Í´¶ÃÎ" },
- { TR_ESP_DRAGON, "¥É¥é¥´¥ó´¶ÃÎ" },
- { TR_ESP_HUMAN, "¿Í´Ö´¶ÃÎ" },
- { TR_ESP_EVIL, "¼Ù°´¶ÃÎ" },
- { TR_ESP_GOOD, "Á±ÎÉ´¶ÃÎ" },
- { TR_ESP_NONLIVING, "̵À¸Êª´¶ÃÎ" },
- { TR_ESP_UNIQUE, "¥æ¥Ë¡¼¥¯´¶ÃÎ" },
- { TR_SLOW_DIGEST, "Ãپò½" },
- { TR_REGEN, "µÞ®²óÉü" },
- { TR_WARNING, "·Ù¹ð" },
-/* { TR_XTRA_MIGHT, "¶¯Îϼͷâ" }, */
- { TR_XTRA_SHOTS, "Äɲüͷâ" }, /* always +1? */
- { TR_DRAIN_EXP, "·Ð¸³Ã͵ۼý" },
- { TR_AGGRAVATE, "È¿´¶" },
- { TR_BLESSED, "½ËÊ¡" },
- { TR_DEC_MANA, "¾ÃÈñËâÎϸº¾¯" },
-#else
- { TR_SH_FIRE, "Fiery Aura" },
- { TR_SH_ELEC, "Electric Aura" },
- { TR_SH_COLD, "Coldly Aura" },
- { TR_NO_TELE, "Prevent Teleportation" },
- { TR_NO_MAGIC, "Anti-Magic" },
- { TR_LEVITATION, "Levitation" },
- { TR_SEE_INVIS, "See Invisible" },
- { TR_TELEPATHY, "ESP" },
- { TR_ESP_ANIMAL, "Sense Animal" },
- { TR_ESP_UNDEAD, "Sense Undead" },
- { TR_ESP_DEMON, "Sense Demon" },
- { TR_ESP_ORC, "Sense Orc" },
- { TR_ESP_TROLL, "Sense Troll" },
- { TR_ESP_GIANT, "Sense Giant" },
- { TR_ESP_DRAGON, "Sense Dragon" },
- { TR_ESP_HUMAN, "Sense Human" },
- { TR_ESP_EVIL, "Sense Evil" },
- { TR_ESP_GOOD, "Sense Good" },
- { TR_ESP_NONLIVING, "Sense Nonliving" },
- { TR_ESP_UNIQUE, "Sense Unique" },
- { TR_SLOW_DIGEST, "Slow Digestion" },
- { TR_REGEN, "Regeneration" },
- { TR_WARNING, "Warning" },
-/* { TR_XTRA_MIGHT, "Extra Might" }, */
- { TR_XTRA_SHOTS, "+1 Extra Shot" }, /* always +1? */
- { TR_DRAIN_EXP, "Drains Experience" },
- { TR_AGGRAVATE, "Aggravates" },
- { TR_BLESSED, "Blessed Blade" },
- { TR_DEC_MANA, "Decrease Mana Consumption Rate" },
-#endif
+ { TR_SH_FIRE, "火炎オーラ" },
+ { TR_SH_ELEC, "電撃オーラ" },
+ { TR_SH_COLD, "冷気オーラ" },
+ { TR_NO_TELE, "反テレポート" },
+ { TR_NO_MAGIC, "反魔法" },
+ { TR_LEVITATION, "浮遊" },
+ { TR_SEE_INVIS, "可視透明" },
+ { TR_TELEPATHY, "ã\83\86ã\83¬ã\83\91ã\82·ã\83¼" },
+ { TR_ESP_ANIMAL, "動物感知" },
+ { TR_ESP_UNDEAD, "不死感知" },
+ { TR_ESP_DEMON, "悪魔感知" },
+ { TR_ESP_ORC, "オーク感知" },
+ { TR_ESP_TROLL, "トロル感知" },
+ { TR_ESP_GIANT, "巨人感知" },
+ { TR_ESP_DRAGON, "ドラゴン感知" },
+ { TR_ESP_HUMAN, "人間感知" },
+ { TR_ESP_EVIL, "邪悪感知" },
+ { TR_ESP_GOOD, "善良感知" },
+ { TR_ESP_NONLIVING, "無生物感知" },
+ { TR_ESP_UNIQUE, "ユニーク感知" },
+ { TR_SLOW_DIGEST, "遅消化" },
+ { TR_REGEN, "急速回復" },
+ { TR_WARNING, "警告" },
+ /* { TR_XTRA_MIGHT, "強力射撃" }, */
+ { TR_XTRA_SHOTS, "追加射撃" }, /* always +1? */
+ { TR_DRAIN_EXP, "経験値吸収" },
+ { TR_AGGRAVATE, "反感" },
+ { TR_BLESSED, "祝福" },
+ { TR_DEC_MANA, "消費魔力減少" },
+ #else
+ { TR_SH_FIRE, "Fiery Aura" },
+ { TR_SH_ELEC, "Electric Aura" },
+ { TR_SH_COLD, "Coldly Aura" },
+ { TR_NO_TELE, "Prevent Teleportation" },
+ { TR_NO_MAGIC, "Anti-Magic" },
+ { TR_LEVITATION, "Levitation" },
+ { TR_SEE_INVIS, "See Invisible" },
+ { TR_TELEPATHY, "ESP" },
+ { TR_ESP_ANIMAL, "Sense Animal" },
+ { TR_ESP_UNDEAD, "Sense Undead" },
+ { TR_ESP_DEMON, "Sense Demon" },
+ { TR_ESP_ORC, "Sense Orc" },
+ { TR_ESP_TROLL, "Sense Troll" },
+ { TR_ESP_GIANT, "Sense Giant" },
+ { TR_ESP_DRAGON, "Sense Dragon" },
+ { TR_ESP_HUMAN, "Sense Human" },
+ { TR_ESP_EVIL, "Sense Evil" },
+ { TR_ESP_GOOD, "Sense Good" },
+ { TR_ESP_NONLIVING, "Sense Nonliving" },
+ { TR_ESP_UNIQUE, "Sense Unique" },
+ { TR_SLOW_DIGEST, "Slow Digestion" },
+ { TR_REGEN, "Regeneration" },
+ { TR_WARNING, "Warning" },
+ /* { TR_XTRA_MIGHT, "Extra Might" }, */
+ { TR_XTRA_SHOTS, "+1 Extra Shot" }, /* always +1? */
+ { TR_DRAIN_EXP, "Drains Experience" },
+ { TR_AGGRAVATE, "Aggravates" },
+ { TR_BLESSED, "Blessed Blade" },
+ { TR_DEC_MANA, "Decrease Mana Consumption Rate" },
+ #endif
};
*
* This list includes extra attacks, for simplicity.
*/
- cptr pval_affects[N_ELEMENTS(stat_flags_desc) - 1 +
- N_ELEMENTS(pval_flags1_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)
- + 1 /* Permanent Light */
- + 1 /* TY curse */
- + 1 /* type of curse */
- + 1]; /* sentinel NULL */
+ concptr misc_magic[N_ELEMENTS(misc_flags2_desc) + N_ELEMENTS(misc_flags3_desc)
+ + 1 /* Permanent Light */
+ + 1 /* TY curse */
+ + 1 /* type of curse */
+ + 1]; /* sentinel NULL */
- /* Additional ability or resistance */
+/* Additional ability or resistance */
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];
/*!
- * @brief ¥Õ¥¡¥¤¥ë¥Ý¥¤¥ó¥¿Àè¤ËƱ¤¸Ê¸»ú¤òÊ£¿ô½ÐÎϤ¹¤ë /
+ * @brief ファイルポインタ先に同じ文字を複数出力する /
* Write out `n' of the character `c' to the spoiler file
- * @param n ½ÐÎϤ¹¤ë¿ô
- * @param c ½ÐÎϤ¹¤ë¥¥ã¥é¥¯¥¿
- * @return ¤Ê¤·
+ * @param n 出力する数
+ * @param c å\87ºå\8a\9bã\81\99ã\82\8bã\82ã\83£ã\83©ã\82¯ã\82¿
+ * @return なし
*/
static void spoiler_out_n_chars(int n, char c)
{
/*!
- * @brief ¥Õ¥¡¥¤¥ë¥Ý¥¤¥ó¥¿Àè¤Ë²þ¹Ô¤òÊ£¿ô½ÐÎϤ¹¤ë /
+ * @brief ファイルポインタ先に改行を複数出力する /
* Write out `n' blank lines to the spoiler file
- * @param n ²þ¹Ô¤ò½ÐÎϤ¹¤ë¿ô
- * @return ¤Ê¤·
+ * @param n 改行を出力する数
+ * @return なし
*/
static void spoiler_blanklines(int n)
{
/*!
- * @brief ¥Õ¥¡¥¤¥ë¥Ý¥¤¥ó¥¿Àè¤ËÊ£¿ô¤Î¥Ï¥¤¥Õ¥ó¤ÇÁõ¾þ¤·¤¿Ê¸»úÎó¤ò½ÐÎϤ¹¤ë /
+ * @brief ファイルポインタ先に複数のハイフンで装飾した文字列を出力する /
* Write a line to the spoiler file and then "underline" it with hypens
- * @param str ½ÐÎϤ·¤¿¤¤Ê¸»úÎó
- * @return ¤Ê¤·
+ * @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), '-');
/*!
- * @brief ¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¤ÎÆÃÀ°ìÍ÷¤ò½ÐÎϤ¹¤ë /
+ * @brief アーティファクトの特性一覧を出力する /
* Write a line to the spoiler file and then "underline" it with hypens
- * @param art_flags ¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¤Î¥Õ¥é¥°·²
- * @param flag_ptr ¥Õ¥é¥°µ½Ò¾ðÊó¤Î»²¾È¥Ý¥¤¥ó¥¿
- * @param desc_ptr µ½ÒÆâÍƤòÊÖ¤¹¤¿¤á¤Îʸ»úÎ󻲾ȥݥ¤¥ó¥¿
- * @param n_elmnts ¥Õ¥é¥°¤ÎÍ×ÁÇ¿ô
- * @return desc_ptr¤ÈƱ¤¸¥¢¥É¥ì¥¹
+ * @param art_flags アーティファクトのフラグ群
+ * @param flag_ptr ã\83\95ã\83©ã\82°è¨\98è¿°æ\83\85å ±ã\81®å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @param desc_ptr è¨\98è¿°å\86\85容ã\82\92è¿\94ã\81\99ã\81\9fã\82\81ã\81®æ\96\87å\97å\88\97å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @param n_elmnts フラグの要素数
+ * @return desc_ptrã\81¨å\90\8cã\81\98ã\82¢ã\83\89ã\83¬ã\82¹
* @details
* <pre>
* This function does most of the actual "analysis". Given a set of bit flags
* The possibly updated description pointer is returned.
* </pre>
*/
-static cptr *spoiler_flag_aux(const u32b art_flags[TR_FLAG_SIZE],
- const flag_desc *flag_ptr,
- cptr *desc_ptr, const int n_elmnts)
+static concptr *spoiler_flag_aux(const BIT_FLAGS art_flags[TR_FLAG_SIZE],
+ const flag_desc *flag_ptr,
+ concptr *desc_ptr, const int n_elmnts)
{
int i;
/*!
- * @brief ¥¢¥¤¥Æ¥à¤ÎÆÃÄêµ½ÒÆâÍƤòÊÖ¤¹ /
+ * @brief アイテムの特定記述内容を返す /
* Acquire a "basic" description "The Cloak of Death [1,+10]"
- * @param o_ptr µ½Ò¤òÆÀ¤¿¤¤¥ª¥Ö¥¸¥§¥¯¥È¤Î»²¾È¥Ý¥¤¥ó¥¿
- * @param desc_ptr µ½ÒÆâÍƤòÊÖ¤¹¤¿¤á¤Îʸ»úÎ󻲾ȥݥ¤¥ó¥¿
- * @return ¤Ê¤·
+ * @param o_ptr è¨\98è¿°ã\82\92å¾\97ã\81\9fã\81\84ã\82ªã\83\96ã\82¸ã\82§ã\82¯ã\83\88ã\81®å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @param desc_ptr è¨\98è¿°å\86\85容ã\82\92è¿\94ã\81\99ã\81\9fã\82\81ã\81®æ\96\87å\97å\88\97å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @return なし
*/
static void analyze_general(object_type *o_ptr, char *desc_ptr)
{
/*!
- * @brief ¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¤¬¥×¥ì¥¤¥ä¡¼¤ËÍ¿¤¨¤ëpval½¤Àµ¤ò¹½Â¤ÂΤ˼ý¤á¤ë /
+ * @brief アーティファクトがプレイヤーに与えるpval修正を構造体に収める /
* List "player traits" altered by an artifact's pval. These include stats,
* speed, infravision, tunneling, stealth, searching, and extra attacks.
- * @param o_ptr ¥ª¥Ö¥¸¥§¥¯¥È¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
- * @param p_ptr pval½¤Àµ¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
- * @return ¤Ê¤·
+ * @param o_ptr ã\82ªã\83\96ã\82¸ã\82§ã\82¯ã\83\88æ§\8bé\80 ä½\93ã\81®å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @param pi_ptr pvalä¿®æ£æ§\8bé\80 ä½\93ã\81®å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @return なし
*/
-static void analyze_pval(object_type *o_ptr, pval_info_type *p_ptr)
+static void analyze_pval(object_type *o_ptr, pval_info_type *pi_ptr)
{
- u32b flgs[TR_FLAG_SIZE];
+ BIT_FLAGS flgs[TR_FLAG_SIZE];
- cptr *affects_list;
+ concptr *affects_list;
/* If pval == 0, there is nothing to do. */
if (!o_ptr->pval)
{
/* An "empty" pval description indicates that pval == 0 */
- p_ptr->pval_desc[0] = '\0';
+ pi_ptr->pval_desc[0] = '\0';
return;
}
-
- /* Extract the flags */
object_flags(o_ptr, flgs);
- affects_list = p_ptr->pval_affects;
+ affects_list = pi_ptr->pval_affects;
/* Create the "+N" string */
- sprintf(p_ptr->pval_desc, "%s%d", POSITIZE(o_ptr->pval), o_ptr->pval);
+ sprintf(pi_ptr->pval_desc, "%s%d", POSITIZE(o_ptr->pval), o_ptr->pval);
/* First, check to see if the pval affects all stats */
if (have_flag(flgs, TR_STR) && have_flag(flgs, TR_INT) &&
- have_flag(flgs, TR_WIS) && have_flag(flgs, TR_DEX) &&
- have_flag(flgs, TR_CON) && have_flag(flgs, TR_CHR))
+ have_flag(flgs, TR_WIS) && have_flag(flgs, TR_DEX) &&
+ have_flag(flgs, TR_CON) && have_flag(flgs, TR_CHR))
{
-#ifdef JP
- *affects_list++ = "Á´Ç½ÎÏ";
-#else
- *affects_list++ = "All stats";
-#endif
+ *affects_list++ = _("全能力", "All stats");
}
/* Are any stats affected? */
else if (have_flag(flgs, TR_STR) || have_flag(flgs, TR_INT) ||
- have_flag(flgs, TR_WIS) || have_flag(flgs, TR_DEX) ||
- have_flag(flgs, TR_CON) || have_flag(flgs, TR_CHR))
+ have_flag(flgs, TR_WIS) || have_flag(flgs, TR_DEX) ||
+ have_flag(flgs, TR_CON) || have_flag(flgs, TR_CHR))
{
affects_list = spoiler_flag_aux(flgs, stat_flags_desc,
- affects_list,
- N_ELEMENTS(stat_flags_desc));
+ affects_list,
+ N_ELEMENTS(stat_flags_desc));
}
/* And now the "rest" */
affects_list = spoiler_flag_aux(flgs, pval_flags1_desc,
- affects_list,
- N_ELEMENTS(pval_flags1_desc));
+ affects_list,
+ N_ELEMENTS(pval_flags1_desc));
/* Terminate the description list */
*affects_list = NULL;
}
/*!
- * @brief ¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¤Î¼ï²¥¹¥ì¥¤ÆÃÀ¤ò¹½Â¤ÂΤ˼ý¤á¤ë /
+ * @brief アーティファクトの種族スレイ特性を構造体に収める /
* Note the slaying specialties of a weapon
- * @param o_ptr ¥ª¥Ö¥¸¥§¥¯¥È¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
- * @param slay_list ¼ï²¥¹¥ì¥¤¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
- * @return ¤Ê¤·
+ * @param o_ptr ã\82ªã\83\96ã\82¸ã\82§ã\82¯ã\83\88æ§\8bé\80 ä½\93ã\81®å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @param slay_list 種æ\97\8fã\82¹ã\83¬ã\82¤æ§\8bé\80 ä½\93ã\81®å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @return なし
*/
-static void analyze_slay(object_type *o_ptr, cptr *slay_list)
+static void analyze_slay(object_type *o_ptr, concptr *slay_list)
{
- u32b flgs[TR_FLAG_SIZE];
+ BIT_FLAGS flgs[TR_FLAG_SIZE];
object_flags(o_ptr, flgs);
slay_list = spoiler_flag_aux(flgs, slay_flags_desc, slay_list,
- N_ELEMENTS(slay_flags_desc));
+ N_ELEMENTS(slay_flags_desc));
/* Terminate the description list */
*slay_list = NULL;
/*!
- * @brief ¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¤Î°À¥Ö¥é¥ó¥ÉÆÃÀ¤ò¹½Â¤ÂΤ˼ý¤á¤ë /
+ * @brief アーティファクトの属性ブランド特性を構造体に収める /
* Note an object's elemental brands
- * @param o_ptr ¥ª¥Ö¥¸¥§¥¯¥È¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
- * @param brand_list °À¥Ö¥é¥ó¥É¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
- * @return ¤Ê¤·
+ * @param o_ptr ã\82ªã\83\96ã\82¸ã\82§ã\82¯ã\83\88æ§\8bé\80 ä½\93ã\81®å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @param brand_list å±\9eæ\80§ã\83\96ã\83©ã\83³ã\83\89æ§\8bé\80 ä½\93ã\81®å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @return なし
*/
-static void analyze_brand(object_type *o_ptr, cptr *brand_list)
+static void analyze_brand(object_type *o_ptr, concptr *brand_list)
{
- u32b flgs[TR_FLAG_SIZE];
+ BIT_FLAGS flgs[TR_FLAG_SIZE];
object_flags(o_ptr, flgs);
brand_list = spoiler_flag_aux(flgs, brand_flags_desc, brand_list,
- N_ELEMENTS(brand_flags_desc));
+ N_ELEMENTS(brand_flags_desc));
/* Terminate the description list */
*brand_list = NULL;
/*!
- * @brief ¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¤ÎÄ̾ïÂÑÀ¤ò¹½Â¤ÂΤ˼ý¤á¤ë /
+ * @brief アーティファクトの通常耐性を構造体に収める /
* Note an object's elemental brands
- * @param o_ptr ¥ª¥Ö¥¸¥§¥¯¥È¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
- * @param resist_list Ä̾ïÂÑÀ¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
- * @return ¤Ê¤·
+ * @param o_ptr ã\82ªã\83\96ã\82¸ã\82§ã\82¯ã\83\88æ§\8bé\80 ä½\93ã\81®å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @param resist_list é\80\9a常è\80\90æ\80§æ§\8bé\80 ä½\93ã\81®å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @return なし
*/
-static void analyze_resist(object_type *o_ptr, cptr *resist_list)
+static void analyze_resist(object_type *o_ptr, concptr *resist_list)
{
- u32b flgs[TR_FLAG_SIZE];
+ BIT_FLAGS flgs[TR_FLAG_SIZE];
object_flags(o_ptr, flgs);
resist_list = spoiler_flag_aux(flgs, resist_flags_desc,
- resist_list, N_ELEMENTS(resist_flags_desc));
+ resist_list, N_ELEMENTS(resist_flags_desc));
/* Terminate the description list */
*resist_list = NULL;
/*!
- * @brief ¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¤ÎÌȱÖÆÃÀ¤ò¹½Â¤ÂΤ˼ý¤á¤ë /
+ * @brief アーティファクトの免疫特性を構造体に収める /
* Note the immunities granted by an object
- * @param o_ptr ¥ª¥Ö¥¸¥§¥¯¥È¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
- * @param immune_list Ìȱֹ½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
- * @return ¤Ê¤·
+ * @param o_ptr ã\82ªã\83\96ã\82¸ã\82§ã\82¯ã\83\88æ§\8bé\80 ä½\93ã\81®å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @param immune_list å\85\8dç\96«æ§\8bé\80 ä½\93ã\81®å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @return なし
*/
-static void analyze_immune(object_type *o_ptr, cptr *immune_list)
+static void analyze_immune(object_type *o_ptr, concptr *immune_list)
{
- u32b flgs[TR_FLAG_SIZE];
+ BIT_FLAGS flgs[TR_FLAG_SIZE];
object_flags(o_ptr, flgs);
immune_list = spoiler_flag_aux(flgs, immune_flags_desc,
- immune_list, N_ELEMENTS(immune_flags_desc));
+ immune_list, N_ELEMENTS(immune_flags_desc));
/* Terminate the description list */
*immune_list = NULL;
/*!
- * @brief ¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¤Î°Ý»ýÆÃÀ¤ò¹½Â¤ÂΤ˼ý¤á¤ë /
+ * @brief アーティファクトの維持特性を構造体に収める /
* Note which stats an object sustains
- * @param o_ptr ¥ª¥Ö¥¸¥§¥¯¥È¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
- * @param sustain_list °Ý»ýÆÃÀ¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
- * @return ¤Ê¤·
+ * @param o_ptr ã\82ªã\83\96ã\82¸ã\82§ã\82¯ã\83\88æ§\8bé\80 ä½\93ã\81®å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @param sustain_list ç¶æ\8c\81ç\89¹æ\80§æ§\8bé\80 ä½\93ã\81®å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @return なし
*/
-static void analyze_sustains(object_type *o_ptr, cptr *sustain_list)
+static void analyze_sustains(object_type *o_ptr, concptr *sustain_list)
{
- u32b flgs[TR_FLAG_SIZE];
+ BIT_FLAGS flgs[TR_FLAG_SIZE];
object_flags(o_ptr, flgs);
/* Simplify things if an item sustains all stats */
if (have_flag(flgs, TR_SUST_STR) && have_flag(flgs, TR_SUST_INT) &&
- have_flag(flgs, TR_SUST_WIS) && have_flag(flgs, TR_SUST_DEX) &&
- have_flag(flgs, TR_SUST_CON) && have_flag(flgs, TR_SUST_CHR))
+ have_flag(flgs, TR_SUST_WIS) && have_flag(flgs, TR_SUST_DEX) &&
+ have_flag(flgs, TR_SUST_CON) && have_flag(flgs, TR_SUST_CHR))
{
-#ifdef JP
- *sustain_list++ = "Á´Ç½ÎÏ";
-#else
- *sustain_list++ = "All stats";
-#endif
+ *sustain_list++ = _("全能力", "All stats");
}
/* Should we bother? */
else if (have_flag(flgs, TR_SUST_STR) || have_flag(flgs, TR_SUST_INT) ||
- have_flag(flgs, TR_SUST_WIS) || have_flag(flgs, TR_SUST_DEX) ||
- have_flag(flgs, TR_SUST_CON) || have_flag(flgs, TR_SUST_CHR))
+ have_flag(flgs, TR_SUST_WIS) || have_flag(flgs, TR_SUST_DEX) ||
+ have_flag(flgs, TR_SUST_CON) || have_flag(flgs, TR_SUST_CHR))
{
sustain_list = spoiler_flag_aux(flgs, sustain_flags_desc,
- sustain_list,
- N_ELEMENTS(sustain_flags_desc));
+ sustain_list,
+ N_ELEMENTS(sustain_flags_desc));
}
/* Terminate the description list */
/*!
- * @brief ¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¤Î¤½¤Î¾¤ÎÆÃÀ¤ò¹½Â¤ÂΤ˼ý¤á¤ë /
+ * @brief アーティファクトのその他の特性を構造体に収める /
* Note miscellaneous powers bestowed by an artifact such as see invisible,
* free action, permanent light, etc.
- * @param o_ptr ¥ª¥Ö¥¸¥§¥¯¥È¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
- * @param misc_list ¤½¤Î¾¤ÎÆÃÀ¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
- * @return ¤Ê¤·
+ * @param o_ptr ã\82ªã\83\96ã\82¸ã\82§ã\82¯ã\83\88æ§\8bé\80 ä½\93ã\81®å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @param misc_list ã\81\9dã\81®ä»\96ã\81®ç\89¹æ\80§æ§\8bé\80 ä½\93ã\81®å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @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)
{
- u32b flgs[TR_FLAG_SIZE];
- int rad;
+ BIT_FLAGS flgs[TR_FLAG_SIZE];
+ POSITION rad;
char desc[256];
object_flags(o_ptr, flgs);
misc_list = spoiler_flag_aux(flgs, misc_flags2_desc, misc_list,
- N_ELEMENTS(misc_flags2_desc));
+ N_ELEMENTS(misc_flags2_desc));
- misc_list = spoiler_flag_aux(flgs, misc_flags3_desc, misc_list,
- N_ELEMENTS(misc_flags3_desc));
+ misc_list = spoiler_flag_aux(flgs, misc_flags3_desc, misc_list, N_ELEMENTS(misc_flags3_desc));
/*
* Glowing artifacts -- small radius light.
- */
+ */
rad = 0;
if (have_flag(flgs, TR_LITE_1)) rad += 1;
if (have_flag(flgs, TR_LITE_2)) rad += 2;
if (have_flag(flgs, TR_LITE_M1)) rad -= 1;
if (have_flag(flgs, TR_LITE_M2)) rad -= 2;
if (have_flag(flgs, TR_LITE_M3)) rad -= 3;
-
- if(o_ptr->name2 == EGO_LITE_SHINE) rad++;
+
+ if (o_ptr->name2 == EGO_LITE_SHINE) rad++;
if (have_flag(flgs, TR_LITE_FUEL))
{
- if(rad > 0) sprintf(desc, _("¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â %d)¤ò¼ø¤±¤ë¡£", "It provides light (radius %d) when fueled."), rad);
+ if (rad > 0) sprintf(desc, _("それは燃料補給によって明かり(半径 %d)を授ける。", "It provides light (radius %d) when fueled."), (int)rad);
}
else
{
- if(rad > 0) sprintf(desc, _("±Êµ×¸÷¸»(Ⱦ·Â %d)", "Permanent Light(radius %d)"), rad);
- if(rad < 0) sprintf(desc, _("±Êµ×¸÷¸»(Ⱦ·Â-%d)¡£", "Permanent Light(radius -%d)"), -rad);
+ if (rad > 0) sprintf(desc, _("永久光源(半径 %d)", "Permanent Light(radius %d)"), (int)rad);
+ if (rad < 0) sprintf(desc, _("永久光源(半径-%d)。", "Permanent Light(radius -%d)"), (int)-rad);
}
- if(rad != 0) *misc_list++ = quark_str(quark_add(desc));
+ if (rad != 0) *misc_list++ = quark_str(quark_add(desc));
/*
* Handle cursed objects here to avoid redundancies such as noting
* being "lightly cursed".
*/
-/* if (object_is_cursed(o_ptr)) */
+ /* if (object_is_cursed(o_ptr)) */
{
if (have_flag(flgs, TR_TY_CURSE))
{
- *misc_list++ = _("ÂÀ¸Å¤Î±åÇ°", "Ancient Curse");
+ *misc_list++ = _("太古の怨念", "Ancient Curse");
}
if (o_ptr->curse_flags & TRC_PERMA_CURSE)
{
- *misc_list++ = _("±Ê±ó¤Î¼ö¤¤", "Permanently Cursed");
+ *misc_list++ = _("永遠の呪い", "Permanently Cursed");
}
else if (o_ptr->curse_flags & TRC_HEAVY_CURSE)
{
- *misc_list++ = _("¶¯ÎϤʼö¤¤", "Heavily Cursed");
+ *misc_list++ = _("強力な呪い", "Heavily Cursed");
}
-/* else */
+ /* else */
else if (o_ptr->curse_flags & TRC_CURSED)
{
- *misc_list++ = _("¼ö¤¤", "Cursed");
+ *misc_list++ = _("呪い", "Cursed");
}
if (have_flag(flgs, TR_ADD_L_CURSE))
{
- *misc_list++ = _("¼ö¤¤¤òÁý¤ä¤¹", "Cursing");
+ *misc_list++ = _("呪いを増やす", "Cursing");
}
if (have_flag(flgs, TR_ADD_H_CURSE))
{
- *misc_list++ = _("¶¯ÎϤʼö¤¤¤òÁý¤ä¤¹", "Heavily Cursing");
+ *misc_list++ = _("強力な呪いを増やす", "Heavily Cursing");
}
}
/*!
- * @brief ¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¤ÎÄɲåé¥ó¥À¥àÆÃÀ¤ò¹½Â¤ÂΤ˼ý¤á¤ë /
+ * @brief アーティファクトの追加ランダム特性を構造体に収める /
* Note additional ability and/or resistance of fixed artifacts
- * @param o_ptr ¥ª¥Ö¥¸¥§¥¯¥È¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
- * @param addition Äɲåé¥ó¥À¥àÂÑÀ¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
- * @return ¤Ê¤·
+ * @param o_ptr ã\82ªã\83\96ã\82¸ã\82§ã\82¯ã\83\88æ§\8bé\80 ä½\93ã\81®å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @param addition 追å\8a ã\83©ã\83³ã\83\80ã\83 è\80\90æ\80§æ§\8bé\80 ä½\93ã\81®å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @return なし
*/
static void analyze_addition(object_type *o_ptr, char *addition)
{
/* Init */
strcpy(addition, "");
-#ifdef JP
- if ((a_ptr->gen_flags & TRG_XTRA_POWER) && (a_ptr->gen_flags & TRG_XTRA_H_RES)) strcat(addition, "ǽÎÏandÂÑÀ");
+ 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, "ǽÎÏ");
- if (a_ptr->gen_flags & TRG_XTRA_RES_OR_POWER) strcat(addition, "(1/2¤ÇandÂÑÀ)");
+ 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, "ÂÑÀ");
- 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");
- 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, _("耐性", "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_H_RES)
- {
- strcat(addition, "Resistance");
- if (a_ptr->gen_flags & TRG_XTRA_RES_OR_POWER) strcat(addition, "(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"));
}
/*!
- * @brief ¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¤Î´ðËܾðÊó¤òʸ»úÎó¤Ë¼ý¤á¤ë /
+ * @brief アーティファクトの基本情報を文字列に収める /
* Determine the minimum depth an artifact can appear, its rarity, its weight,
* and its value in gold pieces
- * @param o_ptr ¥ª¥Ö¥¸¥§¥¯¥È¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
- * @param misc_desc ´ðËܾðÊó¤ò¼ý¤á¤ëʸ»úÎ󻲾ȥݥ¤¥ó¥¿
- * @return ¤Ê¤·
+ * @param o_ptr ã\82ªã\83\96ã\82¸ã\82§ã\82¯ã\83\88æ§\8bé\80 ä½\93ã\81®å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @param misc_desc å\9fºæ\9c¬æ\83\85å ±ã\82\92å\8f\8eã\82\81ã\82\8bæ\96\87å\97å\88\97å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @return なし
*/
static void analyze_misc(object_type *o_ptr, char *misc_desc)
{
artifact_type *a_ptr = &a_info[o_ptr->name1];
+ sprintf(misc_desc, _("レベル %d, 希少度 %u, %d.%d kg, $%ld", "Level %d, Rarity %u, %d.%d lbs, %ld Gold"), (int)a_ptr->level, a_ptr->rarity,
#ifdef JP
- sprintf(misc_desc, "¥ì¥Ù¥ë %u, ´õ¾¯ÅÙ %u, %d.%d kg, ¡ð%ld",
- a_ptr->level, a_ptr->rarity,
lbtokg1(a_ptr->weight), lbtokg2(a_ptr->weight), (long int)a_ptr->cost);
#else
- sprintf(misc_desc, "Level %u, Rarity %u, %d.%d lbs, %ld Gold",
- a_ptr->level, a_ptr->rarity,
- a_ptr->weight / 10, a_ptr->weight % 10, a_ptr->cost);
+ a_ptr->weight / 10, a_ptr->weight % 10, (long int)a_ptr->cost);
#endif
}
/*!
- * @brief ¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¤Î¾ðÊóÁ´ÂΤò¹½Â¤ÂΤ˼ý¤á¤ë /
+ * @brief アーティファクトの情報全体を構造体に収める /
* Fill in an object description structure for a given object
* and its value in gold pieces
- * @param o_ptr ¥ª¥Ö¥¸¥§¥¯¥È¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
- * @param misc_desc Á´¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¾ðÊó¤ò¼ý¤á¤ëʸ»úÎ󻲾ȥݥ¤¥ó¥¿
- * @return ¤Ê¤·
+ * @param o_ptr ã\82ªã\83\96ã\82¸ã\82§ã\82¯ã\83\88æ§\8bé\80 ä½\93ã\81®å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @param desc_ptr å\85¨ã\82¢ã\83¼ã\83\86ã\82£ã\83\95ã\82¡ã\82¯ã\83\88æ\83\85å ±ã\82\92å\8f\8eã\82\81ã\82\8bæ\96\87å\97å\88\97å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @return なし
*/
static void object_analyze(object_type *o_ptr, obj_desc_list *desc_ptr)
{
/*!
- * @brief ¥Ð¥Ã¥Õ¥¡¤Ë¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È½ÐÎϾðÊó¥Ø¥Ã¥À¤ò¼ý¤á¤ë /
- * @return ¤Ê¤·
+ * @brief バッファにアーティファクト出力情報ヘッダを収める /
+ * @return なし
*/
static void print_header(void)
{
char buf[80];
- sprintf(buf, "Artifact Spoilers for Hengband Version %d.%d.%d",
- FAKE_VER_MAJOR-10, FAKE_VER_MINOR, FAKE_VER_PATCH);
+ sprintf(buf, "Artifact Spoilers for Hengband Version %d.%d.%d", FAKE_VER_MAJOR - 10, FAKE_VER_MINOR, FAKE_VER_PATCH);
spoiler_underline(buf);
}
* but that's not relevant to line wrapping and indention.)
*/
-/* ITEM_SEP separates items within a list */
+ /* ITEM_SEP separates items within a list */
#define ITEM_SEP ','
#endif
/*!
- * @brief ¥Õ¥é¥°Ì¾¾Î¤ò½ÐÎϤ¹¤ëÈÆÍÑ´Ø¿ô
- * @param header ¥Ø¥Ã¥À¤Ë½ÐÎϤ¹¤ë¥Õ¥é¥°·²¤Î̾Á°
- * @param list ¥Õ¥é¥°Ì¾¥ê¥¹¥È
- * @param separator ¥Õ¥é¥°É½¼¨¤Î¶èÀڤ굹æ
- * @return ¤Ê¤·
+ * @brief フラグ名称を出力する汎用関数
+ * @param header ヘッダに出力するフラグ群の名前
+ * @param list フラグ名リスト
+ * @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];
+ char line[MAX_LINE_LEN + 1], buf[80];
/* Ignore an empty list */
if (*list == NULL) return;
line_len = strlen(line);
/* Now begin the tedious task */
- while (1)
+ while (TRUE)
{
/* Copy the current item to a buffer */
strcpy(buf, *list);
* item separator.
*/
if (line_len > 1 && line[line_len - 1] == ' '
- && line[line_len - 2] == LIST_SEP)
+ && line[line_len - 2] == LIST_SEP)
{
/* Ignore space and separator */
line[line_len - 2] = '\0';
}
/*!
- * @brief ¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È°ì·ï¤ò¥¹¥Ý¥¤¥é¡¼½ÐÎϤ¹¤ë /
+ * @brief アーティファクト一件をスポイラー出力する /
* Create a spoiler file entry for an artifact
- * @param art_ptr ¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¾ðÊó¤ò¤Þ¤È¤á¤¿¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
- * @return ¤Ê¤·
+ * @param art_ptr ã\82¢ã\83¼ã\83\86ã\82£ã\83\95ã\82¡ã\82¯ã\83\88æ\83\85å ±ã\82\92ã\81¾ã\81¨ã\82\81ã\81\9fæ§\8bé\80 ä½\93ã\81®å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @return なし
*/
static void spoiler_print_art(obj_desc_list *art_ptr)
{
pval_info_type *pval_ptr = &art_ptr->pval_info;
-
char buf[80];
/* Don't indent the first line */
if (pval_ptr->pval_desc[0])
{
/* Mention the effects of pval */
-#ifdef JP
- sprintf(buf, "%s¤Î½¤Àµ:", pval_ptr->pval_desc);
-#else
- sprintf(buf, "%s to", pval_ptr->pval_desc);
-#endif
+ sprintf(buf, _("%sの修正:", "%s to"), pval_ptr->pval_desc);
spoiler_outlist(buf, pval_ptr->pval_affects, ITEM_SEP);
}
/* 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);
if (art_ptr->addition[0])
{
-#ifdef JP
- fprintf(fff, "%sÄɲÃ: %s\n", INDENT1, art_ptr->addition);
-#else
- fprintf(fff, "%sAdditional %s\n", INDENT1, art_ptr->addition);
-#endif
+ fprintf(fff, _("%s追加: %s\n", "%sAdditional %s\n"), INDENT1, art_ptr->addition);
}
/* Write out the possible activation at the primary indention level */
if (art_ptr->activation)
{
-#ifdef JP
- fprintf(fff, "%sȯư: %s\n", INDENT1, art_ptr->activation);
-#else
- fprintf(fff, "%sActivates for %s\n", INDENT1, art_ptr->activation);
-#endif
+ fprintf(fff, _("%s発動: %s\n", "%sActivates for %s\n"), INDENT1, art_ptr->activation);
}
/* End with the miscellaneous facts */
/*!
- * @brief ¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¾ðÊó¤ò½ÐÎϤ¹¤ë¤¿¤á¤Ë¥À¥ß¡¼À¸À®¤ò¹Ô¤¦ /
+ * @brief アーティファクト情報を出力するためにダミー生成を行う /
* Hack -- Create a "forged" artifact
- * @param o_ptr °ì»þÀ¸À®Àè¤òÊݴɤ¹¤ë¥ª¥Ö¥¸¥§¥¯¥È¹½Â¤ÂÎ
- * @param name1 À¸À®¤¹¤ë¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥ÈID
- * @return À¸À®¤¬À®¸ù¤·¤¿¾ì¹çTRUE¤òÊÖ¤¹
+ * @param o_ptr 一時生成先を保管するオブジェクト構造体
+ * @param name1 生成するアーティファクトID
+ * @return 生成が成功した場合TRUEを返す
*/
-static bool make_fake_artifact(object_type *o_ptr, int name1)
+static bool make_fake_artifact(object_type *o_ptr, IDX name1)
{
- int i;
-
+ OBJECT_IDX i;
artifact_type *a_ptr = &a_info[name1];
-
/* Ignore "empty" artifacts */
if (!a_ptr->name) return FALSE;
/* Acquire the "kind" index */
i = lookup_kind(a_ptr->tval, a_ptr->sval);
- /* Oops */
- if (!i) return (FALSE);
+ if (!i) return FALSE;
- /* Create the artifact */
object_prep(o_ptr, i);
/* Save the name */
- o_ptr->name1 = name1;
+ o_ptr->name1 = (byte_hack)name1;
/* Extract the fields */
o_ptr->pval = a_ptr->pval;
o_ptr->weight = a_ptr->weight;
/* Success */
- return (TRUE);
+ return TRUE;
}
/*!
- * @brief ¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¾ðÊó¤Î¥¹¥Ý¥¤¥é¡¼½ÐÎϤò¹Ô¤¦¥á¥¤¥ó¥ë¡¼¥Á¥ó /
+ * @brief アーティファクト情報のスポイラー出力を行うメインルーチン /
* Create a spoiler file for artifacts
- * @param fname À¸À®¥Õ¥¡¥¤¥ë̾
- * @return ¤Ê¤·
+ * @param fname 生成ファイル名
+ * @return なし
*/
-static void spoil_artifact(cptr fname)
+static void spoil_artifact(concptr fname)
{
- int i, j;
+ int i;
+ IDX j;
object_type forge;
object_type *q_ptr;
-
obj_desc_list artifact;
-
char buf[1024];
-
-
- /* Build the filename */
path_build(buf, sizeof(buf), ANGBAND_DIR_USER, fname);
/* File type is "TEXT" */
FILE_TYPE(FILE_TYPE_TEXT);
-
- /* Open the file */
fff = my_fopen(buf, "w");
- /* Oops */
if (!fff)
{
msg_print("Cannot create spoiler file.");
/* We only want objects in the current group */
if (a_ptr->tval != group_artifact[i].tval) continue;
-
- /* Get local object */
q_ptr = &forge;
-
- /* Wipe the object */
object_wipe(q_ptr);
/* Attempt to "forge" the artifact */
return;
}
- /* Message */
msg_print("Successfully created a spoiler file.");
}
/*!
- * @brief ¥â¥ó¥¹¥¿¡¼´Ê°×¾ðÊó¤Î¥¹¥Ý¥¤¥é¡¼½ÐÎϤò¹Ô¤¦¥á¥¤¥ó¥ë¡¼¥Á¥ó /
+ * @brief モンスター簡易情報のスポイラー出力を行うメインルーチン /
* Create a spoiler file for monsters -BEN-
- * @param fname À¸À®¥Õ¥¡¥¤¥ë̾
- * @return ¤Ê¤·
+ * @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];
char ac[80];
char hp[80];
char exp[80];
-
- /* Build the filename */
path_build(buf, sizeof(buf), ANGBAND_DIR_USER, fname);
/* File type is "TEXT" */
FILE_TYPE(FILE_TYPE_TEXT);
-
- /* Open the file */
fff = my_fopen(buf, "w");
- /* Oops */
if (!fff)
{
msg_print("Cannot create spoiler file.");
}
/* 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",
- FAKE_VER_MAJOR-10, FAKE_VER_MINOR, FAKE_VER_PATCH);
+ FAKE_VER_MAJOR - 10, FAKE_VER_MINOR, FAKE_VER_PATCH);
fprintf(fff, "------------------------------------------\n\n");
/* Dump the header */
monster_race *r_ptr = &r_info[i];
/* Use that monster */
- if (r_ptr->name) who[n++] = i;
+ if (r_ptr->name) who[n++] = (s16b)i;
}
- /* Select the sort method */
- ang_sort_comp = ang_sort_comp_hook;
- ang_sort_swap = ang_sort_swap_hook;
-
/* Sort the array by dungeon depth of monsters */
- ang_sort(who, &why, n);
+ ang_sort(who, &why, n, ang_sort_comp_hook, ang_sort_swap_hook);
/* Scan again */
for (i = 0; i < n; i++)
{
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" */
/*
- else if (r_ptr->flags1 & (RF1_QUESTOR))
+ else if (r_ptr->flags3 & (RF3_NO_CONF))
{
- sprintf(nam, "[Q] %s", name);
+ sprintf(nam, "[*] %s", name);
}
*/
else if (r_ptr->flags1 & (RF1_UNIQUE))
}
else
{
-#ifdef JP
- sprintf(nam, " %s", name);
-#else
- sprintf(nam, "The %s", name);
-#endif
+ sprintf(nam, _(" %s", "The %s"), name);
}
-
/* Level */
- sprintf(lev, "%d", r_ptr->level);
+ sprintf(lev, "%d", (int)r_ptr->level);
/* Rarity */
- sprintf(rar, "%d", r_ptr->rarity);
+ sprintf(rar, "%d", (int)r_ptr->rarity);
- /* Speed */
if (r_ptr->speed >= 110)
{
sprintf(spd, "+%d", (r_ptr->speed - 110));
-/*!
- * @brief ʸ»úÎó¤ò¥Õ¥¡¥¤¥ë¥Ý¥¤¥ó¥¿¤Ë½ÐÎϤ¹¤ë /
- * Buffer text to the given file. (-SHAWN-)
- * This is basically c_roff() from mon-desc.c with a few changes.
- * @param str ʸ»úÎ󻲾ȥݥ¤¥ó¥¿
- * @return ¤Ê¤·
- */
-static void spoil_out(cptr str)
+ /*!
+ * @brief 文字列をファイルポインタに出力する /
+ * Buffer text to the given file. (-SHAWN-)
+ * This is basically c_roff() from mon-desc.c with a few changes.
+ * @param str æ\96\87å\97å\88\97å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @return なし
+ */
+static void spoil_out(concptr str)
{
- cptr r;
+ concptr r;
/* Line buffer */
static char roff_buf[256];
bool wrap = (ch == '\n');
#ifdef JP
- if (!isprint(ch) && !k_flag && !iskanji_flag) ch = ' ';
+ if (!isprint((unsigned char)ch) && !k_flag && !iskanji_flag) ch = ' ';
iskanji_flag = k_flag && !iskanji_flag;
#else
if (!isprint(ch)) ch = ' ';
#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++)
#ifdef JP
k_flag_local = iskanji((unsigned char)(*tail));
- if (isprint(*tail) || k_flag_local || iskanji_flag_local) break;
+ if (isprint((unsigned char)*tail) || k_flag_local || iskanji_flag_local) break;
iskanji_flag_local = k_flag_local && !iskanji_flag_local;
#else
if (isprint(*tail)) break;
else
{
if (iskanji_flag &&
- strncmp(str, "¡£", 2) != 0 &&
- strncmp(str, "¡¢", 2) != 0 &&
- strncmp(str, "¥£", 2) != 0 &&
- strncmp(str, "¡¼", 2) != 0) roff_s = roff_p;
+ strncmp(str, "。", 2) != 0 &&
+ strncmp(str, "、", 2) != 0 &&
+ strncmp(str, "ã\82£", 2) != 0 &&
+ strncmp(str, "ã\83¼", 2) != 0) roff_s = roff_p;
}
#else
if (ch == ' ') roff_s = roff_p;
/*!
- * @brief ´Ø¿ô¥Ý¥¤¥ó¥¿ÍѤνÐÎÏ´Ø¿ô /
+ * @brief 関数ポインタ用の出力関数 /
* Hook function used in spoil_mon_info()
- * @param attr ̤»ÈÍÑ
- * @param str ʸ»úÎ󻲾ȥݥ¤¥ó¥¿
- * @return ¤Ê¤·
+ * @param attr 未使用
+ * @param str æ\96\87å\97å\88\97å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @return なし
*/
-static void roff_func(byte attr, cptr str)
+static void roff_func(TERM_COLOR attr, concptr str)
{
/* Unused */
(void)attr;
/*!
- * @brief ¥â¥ó¥¹¥¿¡¼¾ÜºÙ¾ðÊó¤ò¥¹¥Ý¥¤¥é¡¼½ÐÎϤ¹¤ë¥á¥¤¥ó¥ë¡¼¥Á¥ó /
+ * @brief モンスター詳細情報をスポイラー出力するメインルーチン /
* Create a spoiler file for monsters (-SHAWN-)
- * @param fname ¥Õ¥¡¥¤¥ë̾
- * @return ¤Ê¤·
+ * @param fname ファイル名
+ * @return なし
*/
-static void spoil_mon_info(cptr fname)
+static void spoil_mon_info(player_type *player_ptr, concptr fname)
{
char buf[1024];
int i, l, n = 0;
- u32b flags1;
+ BIT_FLAGS flags1;
u16b why = 2;
- s16b *who;
-
- /* Build the filename */
+ MONRACE_IDX *who;
path_build(buf, sizeof(buf), ANGBAND_DIR_USER, fname);
/* File type is "TEXT" */
FILE_TYPE(FILE_TYPE_TEXT);
-
- /* Open the file */
fff = my_fopen(buf, "w");
- /* Oops */
if (!fff)
{
msg_print("Cannot create spoiler file.");
/* Dump the header */
sprintf(buf, "Monster Spoilers for Hengband Version %d.%d.%d\n",
- FAKE_VER_MAJOR-10, FAKE_VER_MINOR, FAKE_VER_PATCH);
+ FAKE_VER_MAJOR - 10, FAKE_VER_MINOR, FAKE_VER_PATCH);
spoil_out(buf);
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++)
monster_race *r_ptr = &r_info[i];
/* Use that monster */
- if (r_ptr->name) who[n++] = i;
+ if (r_ptr->name) who[n++] = (s16b)i;
}
- /* Select the sort method */
- ang_sort_comp = ang_sort_comp_hook;
- ang_sort_swap = ang_sort_swap_hook;
-
- /* Sort the array by dungeon depth of monsters */
- ang_sort(who, &why, n);
-
+ ang_sort(who, &why, n, ang_sort_comp_hook, ang_sort_swap_hook);
/*
* List all monsters in order
for (l = 0; l < n; l++)
{
monster_race *r_ptr = &r_info[who[l]];
-
- /* Extract the flags */
flags1 = r_ptr->flags1;
/* Prefix */
}
else
{
-#ifndef JP
+#ifdef JP
+#else
spoil_out("The ");
#endif
}
/* Name */
-#ifdef JP
- sprintf(buf, "%s/%s (", (r_name + r_ptr->name),(r_name+r_ptr->E_name)); /* ---)--- */
-#else
- sprintf(buf, "%s (", (r_name + r_ptr->name)); /* ---)--- */
-#endif
+ sprintf(buf, _("%s/%s (", "%s%s ("), (r_name + r_ptr->name), _(r_name + r_ptr->E_name, "")); /* ---)--- */
spoil_out(buf);
spoil_out(buf);
/* Level */
- sprintf(buf, "Lev:%d ", r_ptr->level);
+ sprintf(buf, "Lev:%d ", (int)r_ptr->level);
spoil_out(buf);
/* Rarity */
sprintf(buf, "Rar:%d ", r_ptr->rarity);
spoil_out(buf);
- /* Speed */
if (r_ptr->speed >= 110)
{
sprintf(buf, "Spd:+%d ", (r_ptr->speed - 110));
spoil_out(buf);
/* Reuse the code of monster recall. */
- output_monster_spoiler(who[l], roff_func);
+ output_monster_spoiler(player_ptr, who[l], roff_func);
spoil_out(NULL);
}
#define MAX_EVOL_DEPTH 64
-/*
+/*!
+ * @brief int配列でstrncmp()と似た比較処理を行う /
* Compare two int-type array like strncmp() and return TRUE if equals
+ * @param a 比較するint配列1
+ * @param b 比較するint配列2
+ * @param length
+ * @return 両者の値が等しければTRUEを返す
*/
static bool int_n_cmp(int *a, int *b, int length)
{
{
if (*a != *(b++)) return FALSE;
if (!(*(a++))) break;
- }
- while (--length);
+ } while (--length);
return TRUE;
}
-/*
+/*!
+ * @brief ある木が指定された木の部分木かどうかを返す /
* Returns TRUE if an evolution tree is "partial tree"
+ * @param tree 元となる木構造リスト
+ * @param partial_tree 部分木かどうか判定したい木構造リスト
+ * @return 部分木ならばTRUEを返す
*/
static bool is_partial_tree(int *tree, int *partial_tree)
{
return FALSE;
}
-
-/*
- * Sorting hook -- Comp function
- */
-static bool ang_sort_comp_evol_tree(vptr u, vptr v, int a, int b)
-{
- int **evol_tree = (int **)u;
-
- int w1 = evol_tree[a][0];
- int w2 = evol_tree[b][0];
- monster_race *r1_ptr = &r_info[w1];
- monster_race *r2_ptr = &r_info[w2];
-
- /* Unused */
- (void)v;
-
- /* Used tree first */
- if (w1 && !w2) return TRUE;
- if (!w1 && w2) return FALSE;
-
- /* Sort by monster level */
- if (r1_ptr->level < r2_ptr->level) return TRUE;
- if (r1_ptr->level > r2_ptr->level) return FALSE;
-
- /* Sort by monster experience */
- if (r1_ptr->mexp < r2_ptr->mexp) return TRUE;
- if (r1_ptr->mexp > r2_ptr->mexp) return FALSE;
-
- /* Compare indexes */
- return w1 <= w2;
-}
-
-
-/*
- * Sorting hook -- Swap function
- */
-static void ang_sort_swap_evol_tree(vptr u, vptr v, int a, int b)
-{
- int **evol_tree = (int **)u;
- int *holder;
-
- /* Unused */
- (void)v;
-
- /* Swap */
- holder = evol_tree[a];
- evol_tree[a] = evol_tree[b];
- evol_tree[b] = holder;
-}
-
-
-/*
+/*!
+ * @brief 進化ツリーをスポイラー出力するメインルーチン /
* Print monsters' evolution information to file
+ * @param fname 出力ファイル名
+ * @return なし
*/
-static void spoil_mon_evol(cptr fname)
+static void spoil_mon_evol(concptr fname)
{
char buf[1024];
monster_race *r_ptr;
int **evol_tree, i, j, n, r_idx;
int *evol_tree_zero; /* For C_KILL() */
-
- /* Build the filename */
path_build(buf, sizeof buf, ANGBAND_DIR_USER, fname);
/* File type is "TEXT" */
FILE_TYPE(FILE_TYPE_TEXT);
-
- /* Open the file */
fff = my_fopen(buf, "w");
- /* Oops */
if (!fff)
{
msg_print("Cannot create spoiler file.");
- return;
+ return;
}
/* Dump the header */
sprintf(buf, "Monster Spoilers for Hengband Version %d.%d.%d\n",
- FAKE_VER_MAJOR-10, FAKE_VER_MINOR, FAKE_VER_PATCH);
+ FAKE_VER_MAJOR - 10, FAKE_VER_MINOR, FAKE_VER_PATCH);
spoil_out(buf);
spoil_out("------------------------------------------\n\n");
{
evol_tree[i][n++] = r_ptr->next_r_idx;
r_ptr = &r_info[r_ptr->next_r_idx];
- }
- while (r_ptr->next_exp && (n < MAX_EVOL_DEPTH));
+ } while (r_ptr->next_exp && (n < MAX_EVOL_DEPTH));
}
/* Step 2: Scan the evolution trees and remove "partial tree" */
}
/* Step 3: Sort the evolution trees */
-
- /* Select the sort method */
- ang_sort_comp = ang_sort_comp_evol_tree;
- ang_sort_swap = ang_sort_swap_evol_tree;
-
- /* Sort the array */
- ang_sort(evol_tree, NULL, max_r_idx);
+ ang_sort(evol_tree, NULL, max_r_idx, ang_sort_comp_evol_tree, ang_sort_swap_evol_tree);
/* Step 4: Print the evolution trees */
for (i = 0; i < max_r_idx; i++)
/* Trace the evolution tree */
r_ptr = &r_info[r_idx];
-#ifdef JP
- fprintf(fff, "[%d]: %s (¥ì¥Ù¥ë%d, '%c')\n", r_idx,
- r_name + r_ptr->name, r_ptr->level, r_ptr->d_char);
-#else
- fprintf(fff, "[%d]: %s (Level %d, '%c')\n", r_idx,
- r_name + r_ptr->name, r_ptr->level, r_ptr->d_char);
-#endif
+ fprintf(fff, _("[%d]: %s (レベル%d, '%c')\n", "[%d]: %s (Level %d, '%c')\n"),
+ r_idx, r_name + r_ptr->name, (int)r_ptr->level, r_ptr->d_char);
+
for (n = 1; r_ptr->next_exp; n++)
{
fprintf(fff, "%*s-(%ld)-> ", n * 2, "", (long int)r_ptr->next_exp);
fprintf(fff, "[%d]: ", r_ptr->next_r_idx);
r_ptr = &r_info[r_ptr->next_r_idx];
-#ifdef JP
- fprintf(fff, "%s (¥ì¥Ù¥ë%d, '%c')\n",
- r_name + r_ptr->name, r_ptr->level, r_ptr->d_char);
-#else
- fprintf(fff, "%s (Level %d, '%c')\n",
- r_name + r_ptr->name, r_ptr->level, r_ptr->d_char);
-#endif
+ fprintf(fff, _("%s (レベル%d, '%c')\n", "%s (Level %d, '%c')\n"),
+ r_name + r_ptr->name, (int)r_ptr->level, r_ptr->d_char);
}
/* End of evolution tree */
return;
}
- /* Message */
msg_print("Successfully created a spoiler file.");
}
-
-/*
- * Forward declare
- */
-extern void do_cmd_spoilers(void);
-
-/*
+/*!
+ * @brief スポイラー出力を行うコマンドのメインルーチン /
* Create Spoiler files -BEN-
+ * @return なし
*/
-void do_cmd_spoilers(void)
+void do_cmd_spoilers(player_type *player_ptr)
{
- /* Save the screen */
screen_save();
/* Interact */
- while (1)
+ while (TRUE)
{
- /* Clear screen */
Term_clear();
/* Info */
prt("Create a spoiler file.", 2, 0);
/* Prompt for a file */
- prt("(1) Brief Object Info (obj-desc.spo)", 5, 5);
- prt("(2) Brief Artifact Info (artifact.spo)", 6, 5);
- prt("(3) Brief Monster Info (mon-desc.spo)", 7, 5);
- prt("(4) Full Monster Info (mon-info.spo)", 8, 5);
- prt("(5) Monster Evolution Info (mon-evol.spo)", 9, 5);
+ prt("(1) Brief Object Info (obj-desc.txt)", 5, 5);
+ prt("(2) Brief Artifact Info (artifact.txt)", 6, 5);
+ prt("(3) Brief Monster Info (mon-desc.txt)", 7, 5);
+ prt("(4) Full Monster Info (mon-info.txt)", 8, 5);
+ prt("(5) Monster Evolution Info (mon-evol.txt)", 9, 5);
/* Prompt */
-#ifdef JP
- prt("¥³¥Þ¥ó¥É:", 18, 0);
-#else
- prt("Command: ", 12, 0);
-#endif
+ prt(_("コマンド:", "Command: "), _(18, 12), 0);
/* Get a choice */
switch (inkey())
{
- /* Escape */
+ /* Escape */
case ESCAPE:
- /* Restore the screen */
screen_load();
return;
- /* Option (1) */
+ /* Option (1) */
case '1':
- spoil_obj_desc("obj-desc.spo");
+ spoil_obj_desc("obj-desc.txt");
break;
- /* Option (2) */
+ /* Option (2) */
case '2':
- spoil_artifact("artifact.spo");
+ spoil_artifact("artifact.txt");
break;
- /* Option (3) */
+ /* Option (3) */
case '3':
- spoil_mon_desc("mon-desc.spo");
+ spoil_mon_desc("mon-desc.txt");
break;
- /* Option (4) */
+ /* Option (4) */
case '4':
- spoil_mon_info("mon-info.spo");
+ spoil_mon_info(player_ptr, "mon-info.txt");
break;
- /* Option (5) */
+ /* Option (5) */
case '5':
- spoil_mon_evol("mon-evol.spo");
+ spoil_mon_evol("mon-evol.txt");
break;
- /* Oops */
default:
bell();
break;
}
- /* Flush messages */
- msg_print(NULL);
+ msg_erase();
}
}
-/*
+/*!
+ * @brief ランダムアーティファクト1件を解析する /
* Fill in an object description structure for a given object
+ * @param o_ptr ランダムアーティファクトのオブジェクト構造体参照ポインタ
+ * @param desc_ptr 記述内容を収める構造体参照ポインタ
+ * @return なし
*/
static void random_artifact_analyze(object_type *o_ptr, obj_desc_list *desc_ptr)
{
analyze_misc_magic(o_ptr, desc_ptr->misc_magic);
desc_ptr->activation = item_activation(o_ptr);
#ifdef JP
- sprintf(desc_ptr->misc_desc, "½Å¤µ %d.%d kg",
+ sprintf(desc_ptr->misc_desc, "重さ %d.%d kg",
lbtokg1(o_ptr->weight), lbtokg2(o_ptr->weight));
#else
sprintf(desc_ptr->misc_desc, "Weight %d.%d lbs",
#endif
}
-/* Create a spoiler file entry for an artifact */
-
+/*!
+ * @brief ランダムアーティファクト1件をスポイラー出力する /
+ * Create a spoiler file entry for an artifact
+ * @param o_ptr ランダムアーティファクトのオブジェクト構造体参照ポインタ
+ * @param art_ptr 記述内容を収めた構造体参照ポインタ
+ * Fill in an object description structure for a given object
+ * @return なし
+ */
static void spoiler_print_randart(object_type *o_ptr, obj_desc_list *art_ptr)
{
pval_info_type *pval_ptr = &art_ptr->pval_info;
/* Don't indent the first line */
fprintf(fff, "%s\n", art_ptr->description);
-
+
/* unidentified */
if (!(o_ptr->ident & (IDENT_MENTAL)))
{
-#ifdef JP
- fprintf(fff, "%sÉÔÌÀ\n",INDENT1);
-#else
- fprintf(fff, "%sUnknown\n",INDENT1);
-#endif
+ fprintf(fff, _("%s不明\n", "%sUnknown\n"), INDENT1);
}
else {
/* An "empty" pval description indicates that the pval affects nothing */
if (pval_ptr->pval_desc[0])
{
/* Mention the effects of pval */
-#ifdef JP
- sprintf(buf, "%s¤Î½¤Àµ:", pval_ptr->pval_desc);
-#else
- sprintf(buf, "%s to", pval_ptr->pval_desc);
-#endif
+ sprintf(buf, _("%sの修正:", "%s to"), pval_ptr->pval_desc);
spoiler_outlist(buf, pval_ptr->pval_affects, ITEM_SEP);
}
/* 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 */
if (art_ptr->activation)
{
-#ifdef JP
- fprintf(fff, "%sȯư: %s\n", INDENT1, art_ptr->activation);
-#else
- fprintf(fff, "%sActivates for %s\n", INDENT1, art_ptr->activation);
-#endif
+ fprintf(fff, _("%s発動: %s\n", "%sActivates for %s\n"), INDENT1, art_ptr->activation);
}
}
/* End with the miscellaneous facts */
fprintf(fff, "%s%s\n\n", INDENT1, art_ptr->misc_desc);
}
-/* Create a part of file for random artifacts */
+/*!
+ * @brief ランダムアーティファクト内容をスポイラー出力するサブルーチン /
+ * @param o_ptr ランダムアーティファクトのオブジェクト構造体参照ポインタ
+ * @param i 出力したい記録ランダムアーティファクトID
+ * @return なし
+ */
static void spoil_random_artifact_aux(object_type *o_ptr, int i)
{
obj_desc_list artifact;
spoiler_print_randart(o_ptr, &artifact);
}
-/*
+/*!
+ * @brief ランダムアーティファクト内容をスポイラー出力するメインルーチン /
* Create a list file for random artifacts
+ * @param fname 出力ファイル名
+ * @return なし
*/
-void spoil_random_artifact(cptr fname)
+void spoil_random_artifact(player_type *creature_ptr, concptr fname)
{
- int i,j;
+ int i, j;
store_type *st_ptr;
object_type *q_ptr;
char buf[1024];
-
-
- /* Build the filename */
path_build(buf, sizeof(buf), ANGBAND_DIR_USER, fname);
/* File type is "TEXT" */
FILE_TYPE(FILE_TYPE_TEXT);
-
- /* Open the file */
fff = my_fopen(buf, "w");
- /* Oops */
if (!fff)
{
msg_print("Cannot create list file.");
/* random artifacts wielding */
for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
{
- q_ptr = &inventory[i];
+ q_ptr = &creature_ptr->inventory_list[i];
spoil_random_artifact_aux(q_ptr, j);
}
- /* random artifacts in inventory */
for (i = 0; i < INVEN_PACK; i++)
{
- q_ptr = &inventory[i];
+ q_ptr = &creature_ptr->inventory_list[i];
spoil_random_artifact_aux(q_ptr, j);
}
/* random artifacts in home */
- st_ptr = &town[1].store[STORE_HOME];
+ st_ptr = &town_info[1].store[STORE_HOME];
for (i = 0; i < st_ptr->stock_num; i++)
{
q_ptr = &st_ptr->stock[i];
}
/* random artifacts in museum */
- st_ptr = &town[1].store[STORE_MUSEUM];
+ st_ptr = &town_info[1].store[STORE_MUSEUM];
for (i = 0; i < st_ptr->stock_num; i++)
{
q_ptr = &st_ptr->stock[i];
return;
}
- /* Message */
msg_print("Successfully created a list file.");
}