OSDN Git Service

1.174の警告除去で "倒したユニーク数が10体以下の時ランキングがダンプに
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sun, 14 Dec 2003 16:51:25 +0000 (16:51 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sun, 14 Dec 2003 16:51:25 +0000 (16:51 +0000)
載らない" というバグを修正していたことに関連し, モンスター数のデータ
型をunsigned longからlongに直した.

src/files.c

index ae6e751..25007aa 100644 (file)
@@ -4593,8 +4593,8 @@ static void dump_aux_monsters(FILE *fff)
        /* Monsters slain */
 
        int k;
-       unsigned long uniq_total = 0;
-       unsigned long norm_total = 0;
+       long uniq_total = 0;
+       long norm_total = 0;
        s16b *who;
 
        /* Sort by monster level */
@@ -4655,9 +4655,9 @@ static void dump_aux_monsters(FILE *fff)
        else if (uniq_total == 0)
        {
 #ifdef JP
-               fprintf(fff,"%luÂΤÎŨ¤òÅݤ·¤Æ¤¤¤Þ¤¹¡£\n", norm_total);
+               fprintf(fff,"%ldÂΤÎŨ¤òÅݤ·¤Æ¤¤¤Þ¤¹¡£\n", norm_total);
 #else
-               fprintf(fff,"You have defeated %lu %s.\n", norm_total, norm_total == 1 ? "enemy" : "enemies");
+               fprintf(fff,"You have defeated %ld %s.\n", norm_total, norm_total == 1 ? "enemy" : "enemies");
 #endif
        }
 
@@ -4665,9 +4665,9 @@ static void dump_aux_monsters(FILE *fff)
        else /* if (uniq_total > 0) */
        {
 #ifdef JP
-               fprintf(fff, "%luÂΤΥæ¥Ë¡¼¥¯¡¦¥â¥ó¥¹¥¿¡¼¤ò´Þ¤à¡¢¹ç·×%luÂΤÎŨ¤òÅݤ·¤Æ¤¤¤Þ¤¹¡£\n", uniq_total, norm_total); 
+               fprintf(fff, "%ldÂΤΥæ¥Ë¡¼¥¯¡¦¥â¥ó¥¹¥¿¡¼¤ò´Þ¤à¡¢¹ç·×%ldÂΤÎŨ¤òÅݤ·¤Æ¤¤¤Þ¤¹¡£\n", uniq_total, norm_total); 
 #else
-               fprintf(fff, "You have defeated %lu %s including %lu unique monster%s in total.\n", norm_total, norm_total == 1 ? "enemy" : "enemies", uniq_total, (uniq_total == 1 ? "" : "s"));
+               fprintf(fff, "You have defeated %ld %s including %ld unique monster%s in total.\n", norm_total, norm_total == 1 ? "enemy" : "enemies", uniq_total, (uniq_total == 1 ? "" : "s"));
 #endif
 
 
@@ -4679,13 +4679,13 @@ static void dump_aux_monsters(FILE *fff)
                ang_sort(who, &why, uniq_total);
 
 #ifdef JP
-               fprintf(fff, "\n¡Ô¾å°Ì%luÂΤΥæ¥Ë¡¼¥¯¡¦¥â¥ó¥¹¥¿¡¼¡Õ\n", MIN(uniq_total, 10));
+               fprintf(fff, "\n¡Ô¾å°Ì%ldÂΤΥæ¥Ë¡¼¥¯¡¦¥â¥ó¥¹¥¿¡¼¡Õ\n", MIN(uniq_total, 10));
 #else
-               fprintf(fff, "\n< Unique monsters top %lu >\n", MIN(uniq_total, 10));
+               fprintf(fff, "\n< Unique monsters top %ld >\n", MIN(uniq_total, 10));
 #endif
 
                /* Print top 10 */
-               for (k = uniq_total - 1; k >= 0 && k >= (long)uniq_total - 10; k--)
+               for (k = uniq_total - 1; k >= 0 && k >= uniq_total - 10; k--)
                {
                        monster_race *r_ptr = &r_info[who[k]];