n2 = strtol(zz[2], NULL, 0);
if (i >= max_r_idx) return 1;
r_ptr = &r_info[i];
- if (n1 || (!(n2 & 0x80) && n2)) r_ptr->x_attr = n1; /* Allow ATTR_DARK text */
+ if (n1 || (!(n2 & 0x80) && n2)) r_ptr->x_attr = n1; /* Allow TERM_DARK text */
if (n2) r_ptr->x_char = n2;
return 0;
}
n2 = strtol(zz[2], NULL, 0);
if (i >= max_k_idx) return 1;
k_ptr = &k_info[i];
- if (n1 || (!(n2 & 0x80) && n2)) k_ptr->x_attr = n1; /* Allow ATTR_DARK text */
+ if (n1 || (!(n2 & 0x80) && n2)) k_ptr->x_attr = n1; /* Allow TERM_DARK text */
if (n2) k_ptr->x_char = n2;
return 0;
}
n1 = strtol(zz[1], NULL, 0);
n2 = strtol(zz[2], NULL, 0);
- if (n1 || (!(n2 & 0x80) && n2)) f_ptr->x_attr[F_LIT_STANDARD] = n1; /* Allow ATTR_DARK text */
+ if (n1 || (!(n2 & 0x80) && n2)) f_ptr->x_attr[F_LIT_STANDARD] = n1; /* Allow TERM_DARK text */
if (n2) f_ptr->x_char[F_LIT_STANDARD] = n2;
/* Mega-hack -- feat supports lighting */
{
n1 = strtol(zz[j * 2 + 1], NULL, 0);
n2 = strtol(zz[j * 2 + 2], NULL, 0);
- if (n1 || (!(n2 & 0x80) && n2)) f_ptr->x_attr[j] = n1; /* Allow ATTR_DARK text */
+ if (n1 || (!(n2 & 0x80) && n2)) f_ptr->x_attr[j] = n1; /* Allow TERM_DARK text */
if (n2) f_ptr->x_char[j] = n2;
}
break;
int day, hour, min;
extract_day_hour_min(&day, &hour, &min);
- sprintf(buf,
#ifdef JP
- "%dÆüÌÜ %2d:%02d",
+ if (day < MAX_DAYS) sprintf(buf, "%dÆüÌÜ %2d:%02d", day, hour, min);
+ else sprintf(buf, "*****ÆüÌÜ %2d:%02d", hour, min);
#else
- "Day %d %2d:%02d",
+ if (day < MAX_DAYS) sprintf(buf, "Day %d %2d:%02d", day, hour, min);
+ else sprintf(buf, "Day ***** %2d:%02d", hour, min);
#endif
- day, hour, min);
}
display_player_one_line(ENTRY_DAY, buf, TERM_L_GREEN);
if (p_ptr->lev > 14)
{
add_flag(flgs, TR_REGEN);
- if (p_ptr->pclass == CLASS_WARRIOR)
+ if ((p_ptr->pclass == CLASS_WARRIOR) || (p_ptr->pclass == CLASS_BERSERKER))
{
add_flag(flgs, TR_SLOW_DIGEST);
/*
*statmsg = '\0';
- if (p_ptr->is_dead && p_ptr->total_winner)
+ if (p_ptr->is_dead)
{
+ if (p_ptr->total_winner)
+ {
#ifdef JP
- strcpy(statmsg, "¡Ä¤¢¤Ê¤¿¤Ï¾¡Íø¤Î¸å°úÂष¤¿¡£");
+ sprintf(statmsg, "¡Ä¤¢¤Ê¤¿¤Ï¾¡Íø¤Î¸å%s¤·¤¿¡£", streq(p_ptr->died_from, "Seppuku") ? "ÀÚÊ¢" : "°úÂà");
#else
- strcpy(statmsg, "...You retired from the adventure after the winning.");
+ sprintf(statmsg, "...You %s after the winning.", streq(p_ptr->died_from, "Seppuku") ? "did Seppuku" : "retired from the adventure");
#endif
- }
- else if (p_ptr->is_dead)
- {
- if (!dun_level)
+ }
+ else if (!dun_level)
{
#ifdef JP
sprintf(statmsg, "¡Ä¤¢¤Ê¤¿¤Ï%s¤Ç%s¤Ë»¦¤µ¤ì¤¿¡£", map_name(), p_ptr->died_from);
{
int i;
bool pet = FALSE;
+ bool pet_settings = FALSE;
char pet_name[80];
for (i = m_max - 1; i >= 1; i--)
if (!m_ptr->r_idx) continue;
if (!is_pet(m_ptr)) continue;
+ pet_settings = TRUE;
if (!m_ptr->nickname && (p_ptr->riding != i)) continue;
if (!pet)
{
#ifdef JP
- fprintf(fff, "\n [¼ç¤Ê¥Ú¥Ã¥È]\n\n");
+ fprintf(fff, "\n\n [¼ç¤Ê¥Ú¥Ã¥È]\n\n");
#else
- fprintf(fff, "\n [leading pets]\n\n");
+ fprintf(fff, "\n\n [Leading Pets]\n\n");
#endif
pet = TRUE;
}
fprintf(fff, "%s\n", pet_name);
}
- if (pet) fprintf(fff, "\n");
+ if (pet_settings)
+ {
+#ifdef JP
+ fprintf(fff, "\n\n [¥Ú¥Ã¥È¤Ø¤ÎÌ¿Îá]\n");
+#else
+ fprintf(fff, "\n\n [Command for Pets]\n");
+#endif
+
+#ifdef JP
+ fprintf(fff, "\n ¥É¥¢¤ò³«¤±¤ë: %s", (p_ptr->pet_extra_flags & PF_OPEN_DOORS) ? "ON" : "OFF");
+#else
+ fprintf(fff, "\n Pets open doors: %s", (p_ptr->pet_extra_flags & PF_OPEN_DOORS) ? "ON" : "OFF");
+#endif
+
+#ifdef JP
+ fprintf(fff, "\n ¥¢¥¤¥Æ¥à¤ò½¦¤¦: %s", (p_ptr->pet_extra_flags & PF_PICKUP_ITEMS) ? "ON" : "OFF");
+#else
+ fprintf(fff, "\n Pets pick up items: %s", (p_ptr->pet_extra_flags & PF_PICKUP_ITEMS) ? "ON" : "OFF");
+#endif
+
+#ifdef JP
+ fprintf(fff, "\n ¥Æ¥ì¥Ý¡¼¥È·ÏËâË¡¤ò»È¤¦: %s", (p_ptr->pet_extra_flags & PF_TELEPORT) ? "ON" : "OFF");
+#else
+ fprintf(fff, "\n Allow teleport: %s", (p_ptr->pet_extra_flags & PF_TELEPORT) ? "ON" : "OFF");
+#endif
+
+#ifdef JP
+ fprintf(fff, "\n ¹¶·âËâË¡¤ò»È¤¦: %s", (p_ptr->pet_extra_flags & PF_ATTACK_SPELL) ? "ON" : "OFF");
+#else
+ fprintf(fff, "\n Allow cast attack spell: %s", (p_ptr->pet_extra_flags & PF_ATTACK_SPELL) ? "ON" : "OFF");
+#endif
+
+#ifdef JP
+ fprintf(fff, "\n ¾¤´ËâË¡¤ò»È¤¦: %s", (p_ptr->pet_extra_flags & PF_SUMMON_SPELL) ? "ON" : "OFF");
+#else
+ fprintf(fff, "\n Allow cast summon spell: %s", (p_ptr->pet_extra_flags & PF_SUMMON_SPELL) ? "ON" : "OFF");
+#endif
+
+#ifdef JP
+ fprintf(fff, "\n ¥×¥ì¥¤¥ä¡¼¤ò´¬¤¹þ¤àÈÏ°ÏËâË¡¤ò»È¤¦: %s", (p_ptr->pet_extra_flags & PF_BALL_SPELL) ? "ON" : "OFF");
+#else
+ fprintf(fff, "\n Allow involve player in area spell: %s", (p_ptr->pet_extra_flags & PF_BALL_SPELL) ? "ON" : "OFF");
+#endif
+
+ fputc('\n', fff);
+ }
}
for (i=0;i<60;i++) { p[i][0] = '\0'; }
#ifdef JP
- strcat(p[col], "\n [³Ø½¬ºÑ¤ß¤ÎÀÄËâË¡]\n");
+ strcat(p[col], "\n\n [³Ø½¬ºÑ¤ß¤ÎÀÄËâË¡]\n");
#else
- strcat(p[col], "\n [Learned blue magic]\n");
+ strcat(p[col], "\n\n [Learned Blue Magic]\n");
#endif
#ifdef JP
strcat(p[col], "\n [¥Ü¥ë¥È·¿]\n");
#else
- strcat(p[col], "\n [Bolt type]\n");
+ strcat(p[col], "\n [Bolt Type]\n");
#endif
break;
#ifdef JP
strcat(p[col], "\n [¥Ü¡¼¥ë·¿]\n");
#else
- strcat(p[col], "\n [Ball type]\n");
+ strcat(p[col], "\n [Ball Type]\n");
#endif
break;
#ifdef JP
strcat(p[col], "\n [ ¤½¤Î¾ ]\n");
#else
- strcat(p[col], "\n [Other type]\n");
+ strcat(p[col], "\n [Other Type]\n");
#endif
break;
}
#ifdef JP
fprintf(fff, "\n\n [¥¯¥¨¥¹¥È¾ðÊó]\n");
#else
- fprintf(fff, "\n\n [Quest information]\n");
+ fprintf(fff, "\n\n [Quest Information]\n");
#endif
/* Allocate Memory */
do_cmd_knowledge_quests_completed(fff, quest_num);
fputc('\n', fff);
do_cmd_knowledge_quests_failed(fff, quest_num);
+ fputc('\n', fff);
/* Free Memory */
C_KILL(quest_num, max_quests, int);
#ifdef JP
fprintf(fff, "\n [»à¤ÌľÁ°¤Î¥á¥Ã¥»¡¼¥¸]\n\n");
#else
- fprintf(fff, "\n [Last messages]\n\n");
+ fprintf(fff, "\n [Last Messages]\n\n");
#endif
for (i = MIN(message_num(), 30); i >= 0; i--)
{
fprintf(fff,"> %s\n",message_str((s16b)i));
}
- fprintf(fff, "\n");
+ fputc('\n', fff);
}
/* Hack -- *Winning* message */
#ifdef JP
fprintf(fff, "\n [*¾¡Íø*¥á¥Ã¥»¡¼¥¸]\n\n");
#else
- fprintf(fff, "\n [*Winning* message]\n\n");
+ fprintf(fff, "\n [*Winning* Message]\n\n");
#endif
fprintf(fff," %s\n", p_ptr->last_message);
+ fputc('\n', fff);
}
}
}
int y;
#ifdef JP
- fprintf(fff, "\n\n [µ¢´Ô¾ì½ê]\n\n");
+ fprintf(fff, "\n [µ¢´Ô¾ì½ê]\n\n");
#else
- fprintf(fff, "\n\n [Recall Depth]\n\n");
+ fprintf(fff, "\n [Recall Depth]\n\n");
#endif
for (y = 1; y < max_d_idx; y++)
#ifdef JP
fprintf(fff, "\n [¥ª¥×¥·¥ç¥óÀßÄê]\n");
#else
- fprintf(fff, "\n [Option settings]\n");
+ fprintf(fff, "\n [Option Settings]\n");
#endif
#endif
- fprintf(fff,"\n");
+ fputc('\n', fff);
if (p_ptr->noscore)
#ifdef JP
- fprintf(fff, "\n ²¿¤«ÉÔÀµ¤Ê¤³¤È¤ò¤·¤Æ¤·¤Þ¤Ã¤Æ¤¤¤Þ¤¹¡£");
+ fprintf(fff, "\n ²¿¤«ÉÔÀµ¤Ê¤³¤È¤ò¤·¤Æ¤·¤Þ¤Ã¤Æ¤¤¤Þ¤¹¡£\n");
#else
- fprintf(fff, "\n You have done something illegal.");
+ fprintf(fff, "\n You have done something illegal.\n");
#endif
- fprintf(fff,"\n");
+ fputc('\n', fff);
}
#ifdef JP
fprintf(fff, "\n [Åݤ·¤¿¥â¥ó¥¹¥¿¡¼]\n\n");
#else
- fprintf(fff, "\n [Defeated monsters]\n\n");
+ fprintf(fff, "\n [Defeated Monsters]\n\n");
#endif
/* Allocate the "who" array */
fprintf(fff, "\n You were a %s before.", race_info[i].title);
#endif
}
+
+ fputc('\n', fff);
}
}
{
int i;
+ fputc('\n', fff);
for (i = 0; i < MAX_MAGIC; i++)
{
if (!(p_ptr->old_realm & 1L << i)) continue;
fprintf(fff, "\n You were able to use %s magic before.", realm_names[i+1]);
#endif
}
+ fputc('\n', fff);
}
}
dump_mutations(fff);
}
-
- /* Skip some lines */
- fprintf(fff, "\n\n");
}
dump_aux_class_special(fff);
dump_aux_mutations(fff);
dump_aux_pet(fff);
+ fputs("\n\n", fff);
dump_aux_equipment_inventory(fff);
dump_aux_home_museum(fff);
break;
}
- sprintf(xtmp, "%s: %s", player_name, what);
+ sprintf(xtmp, "%s: %s", player_name, what ? what : caption);
my_fputs(ffp, xtmp, 80);
my_fputs(ffp, "\n", 80);
{
char buf[1024] = "";
+ do
+ {
#ifdef JP
- while (!get_string("*¾¡Íø*¥á¥Ã¥»¡¼¥¸: ", buf, sizeof buf)) ;
+ while (!get_string("*¾¡Íø*¥á¥Ã¥»¡¼¥¸: ", buf, sizeof buf)) ;
#else
- while (!get_string("*Winning* message: ", buf, sizeof buf)) ;
+ while (!get_string("*Winning* message: ", buf, sizeof buf)) ;
+#endif
+ }
+#ifdef JP
+ while (!get_check_strict("¤è¤í¤·¤¤¤Ç¤¹¤«¡©", CHECK_NO_HISTORY));
+#else
+ while (!get_check_strict("Are you sure? ", CHECK_NO_HISTORY));
#endif
if (buf[0])
}
+#define GRAVE_LINE_WIDTH 31
/*
- * Centers a string within a 31 character string -JWT-
+ * Centers a string within a GRAVE_LINE_WIDTH character string -JWT-
*/
static void center_string(char *buf, cptr str)
{
i = strlen(str);
/* Necessary border */
- j = 15 - i / 2;
+ j = GRAVE_LINE_WIDTH / 2 - i / 2;
/* Mega-Hack */
- (void)sprintf(buf, "%*s%s%*s", j, "", str, 31 - i - j, "");
+ (void)sprintf(buf, "%*s%s%*s", j, "", str, GRAVE_LINE_WIDTH - i - j, "");
}
/* Print the text-tombstone */
if (!done)
{
- cptr p;
-
- char tmp[160];
-
- char buf[1024];
-#ifndef JP
- char dummy[80];
+ cptr p;
+ char tmp[160];
+ char buf[1024];
+ char dummy[80];
+ char *t;
+ FILE *fp;
+ time_t ct = time((time_t)0);
+#ifdef JP
+ int extra_line = 0;
#endif
- FILE *fp;
-
- time_t ct = time((time_t)0);
-
-
/* Clear screen */
Term_clear();
path_build(buf, sizeof(buf), ANGBAND_DIR_FILE, "dead.txt");
#endif
-
/* Open the News file */
fp = my_fopen(buf, "r");
my_fclose(fp);
}
-
/* King or Queen */
if (p_ptr->total_winner || (p_ptr->lev > PY_MAX_LEVEL))
{
#ifdef JP
- /* ±ÑÆüÀÚ¤êÂؤ¨ */
- p= "°ÎÂç¤Ê¤ë¼Ô";
+ /* ±ÑÆüÀÚ¤êÂؤ¨ */
+ p= "°ÎÂç¤Ê¤ë¼Ô";
#else
p = "Magnificent";
#endif
-
}
/* Normal */
center_string(buf, p);
put_str(buf, 8, 11);
-
center_string(buf, cp_ptr->title);
-
put_str(buf, 10, 11);
#ifdef JP
-(void)sprintf(tmp, "¥ì¥Ù¥ë: %d", (int)p_ptr->lev);
+ (void)sprintf(tmp, "¥ì¥Ù¥ë: %d", (int)p_ptr->lev);
#else
(void)sprintf(tmp, "Level: %d", (int)p_ptr->lev);
#endif
-
center_string(buf, tmp);
put_str(buf, 11, 11);
#ifdef JP
-(void)sprintf(tmp, "·Ð¸³ÃÍ: %ld", (long)p_ptr->exp);
+ (void)sprintf(tmp, "·Ð¸³ÃÍ: %ld", (long)p_ptr->exp);
#else
(void)sprintf(tmp, "Exp: %ld", (long)p_ptr->exp);
#endif
-
center_string(buf, tmp);
put_str(buf, 12, 11);
#ifdef JP
-(void)sprintf(tmp, "½ê»ý¶â: %ld", (long)p_ptr->au);
+ (void)sprintf(tmp, "½ê»ý¶â: %ld", (long)p_ptr->au);
#else
(void)sprintf(tmp, "AU: %ld", (long)p_ptr->au);
#endif
-
center_string(buf, tmp);
put_str(buf, 13, 11);
#ifdef JP
- /* Êè¤Ë¹ï¤à¸ÀÍÕ¤ò¥ª¥ê¥¸¥Ê¥ë¤è¤êºÙ¤«¤¯É½¼¨ */
- if (streq(p_ptr->died_from, "ÅÓÃ潪λ"))
- {
- strcpy(tmp, "<¼«»¦>");
- }
- else
- {
- if (streq(p_ptr->died_from, "ripe"))
+ /* Êè¤Ë¹ï¤à¸ÀÍÕ¤ò¥ª¥ê¥¸¥Ê¥ë¤è¤êºÙ¤«¤¯É½¼¨ */
+ if (streq(p_ptr->died_from, "ÅÓÃ潪λ"))
+ {
+ strcpy(tmp, "<¼«»¦>");
+ }
+ else if (streq(p_ptr->died_from, "ripe"))
{
strcpy(tmp, "°úÂà¸å¤ËÅ·¼÷¤òÁ´¤¦");
}
}
else
{
- strcpy(tmp, p_ptr->died_from);
- }
- }
- center_string(buf, tmp);
- put_str(buf, 14, 11);
-
- if(!streq(p_ptr->died_from, "ripe") && !streq(p_ptr->died_from, "Seppuku"))
- {
- if( dun_level == 0 )
- {
- cptr town = (p_ptr->town_num ? "³¹" : "¹ÓÌî");
- if(streq(p_ptr->died_from, "ÅÓÃ潪λ"))
- {
- sprintf(tmp, "%s¤Ç»à¤ó¤À", town);
- }
- else
+ roff_to_buf(p_ptr->died_from, GRAVE_LINE_WIDTH + 1, tmp, sizeof tmp);
+ t = tmp + strlen(tmp) + 1;
+ if (*t)
{
- sprintf(tmp, "¤Ë%s¤Ç»¦¤µ¤ì¤¿", town);
+ strcpy(dummy, t); /* 2nd line */
+ if (*(t + strlen(t) + 1)) /* Does 3rd line exist? */
+ {
+ for (t = dummy + strlen(dummy) - 2; iskanji(*(t - 1)); t--) /* Loop */;
+ strcpy(t, "¡Ä");
+ }
+ else if (my_strstr(tmp, "¡Ø") && suffix(dummy, "¡Ù"))
+ {
+ char dummy2[80];
+ char *name_head = my_strstr(tmp, "¡Ø");
+ sprintf(dummy2, "%s%s", name_head, dummy);
+ if (strlen(dummy2) <= GRAVE_LINE_WIDTH)
+ {
+ strcpy(dummy, dummy2);
+ *name_head = '\0';
+ }
+ }
+ else if (my_strstr(tmp, "¡Ö") && suffix(dummy, "¡×"))
+ {
+ char dummy2[80];
+ char *name_head = my_strstr(tmp, "¡Ö");
+ sprintf(dummy2, "%s%s", name_head, dummy);
+ if (strlen(dummy2) <= GRAVE_LINE_WIDTH)
+ {
+ strcpy(dummy, dummy2);
+ *name_head = '\0';
+ }
+ }
+ center_string(buf, dummy);
+ put_str(buf, 15, 11);
+ extra_line = 1;
}
}
- else
+ center_string(buf, tmp);
+ put_str(buf, 14, 11);
+
+ if (!streq(p_ptr->died_from, "ripe") && !streq(p_ptr->died_from, "Seppuku"))
{
- if(streq(p_ptr->died_from, "ÅÓÃ潪λ"))
+ if (dun_level == 0)
{
- sprintf(tmp, "Ãϲ¼ %d ³¬¤Ç»à¤ó¤À", dun_level);
+ cptr town = p_ptr->town_num ? "³¹" : "¹ÓÌî";
+ if (streq(p_ptr->died_from, "ÅÓÃ潪λ"))
+ {
+ sprintf(tmp, "%s¤Ç»à¤ó¤À", town);
+ }
+ else
+ {
+ sprintf(tmp, "¤Ë%s¤Ç»¦¤µ¤ì¤¿", town);
+ }
}
else
{
- sprintf(tmp, "¤ËÃϲ¼ %d ³¬¤Ç»¦¤µ¤ì¤¿", dun_level);
+ if (streq(p_ptr->died_from, "ÅÓÃ潪λ"))
+ {
+ sprintf(tmp, "Ãϲ¼ %d ³¬¤Ç»à¤ó¤À", dun_level);
+ }
+ else
+ {
+ sprintf(tmp, "¤ËÃϲ¼ %d ³¬¤Ç»¦¤µ¤ì¤¿", dun_level);
+ }
}
+ center_string(buf, tmp);
+ put_str(buf, 15 + extra_line, 11);
}
- center_string(buf, tmp);
- put_str(buf, 15, 11);
- }
#else
(void)sprintf(tmp, "Killed on Level %d", dun_level);
center_string(buf, tmp);
put_str(buf, 14, 11);
-
- if (strlen(p_ptr->died_from) > 24)
- {
- strncpy(dummy, p_ptr->died_from, 24);
- dummy[24] = '\0';
- (void)sprintf(tmp, "by %s.", dummy);
- }
- else
- (void)sprintf(tmp, "by %s.", p_ptr->died_from);
-
+ roff_to_buf(format("by %s.", p_ptr->died_from), GRAVE_LINE_WIDTH + 1, tmp, sizeof tmp);
center_string(buf, tmp);
put_str(buf, 15, 11);
+ t = tmp + strlen(tmp) + 1;
+ if (*t)
+ {
+ strcpy(dummy, t); /* 2nd line */
+ if (*(t + strlen(t) + 1)) /* Does 3rd line exist? */
+ {
+ int dummy_len = strlen(dummy);
+ strcpy(dummy + MIN(dummy_len, GRAVE_LINE_WIDTH - 3), "...");
+ }
+ center_string(buf, dummy);
+ put_str(buf, 16, 11);
+ }
#endif
-
-
(void)sprintf(tmp, "%-.24s", ctime(&ct));
center_string(buf, tmp);
put_str(buf, 17, 11);
#ifdef JP
-msg_format("¤µ¤è¤¦¤Ê¤é¡¢%s!", player_name);
+ msg_format("¤µ¤è¤¦¤Ê¤é¡¢%s!", player_name);
#else
msg_format("Goodbye, %s!", player_name);
#endif
-
}
}
#endif
+#ifdef JP
+ do_cmd_write_nikki(NIKKI_GAMESTART, 0, "----¥²¡¼¥à°Û¾ï½ªÎ»----");
+#else
+ do_cmd_write_nikki(NIKKI_GAMESTART, 0, "---- Panic Save and Abort Game ----");
+#endif
+
/* Flush output */
Term_fresh();