OSDN Git Service

#37287 #37353 (2.2.0.89) ALIGNMENT 型を定義し、型の置換を継続中。 / Define ALIGNMENT, ongoing type...
[hengband/hengband.git] / src / scores.c
index 88bb981..4a92db2 100644 (file)
@@ -499,7 +499,7 @@ errr top_twenty(void)
 #endif
 
        /* Save the player name (15 chars) */
-       sprintf(the_score.who, "%-.15s", player_name);
+       sprintf(the_score.who, "%-.15s", p_ptr->name);
 
        /* Save the player info XXX XXX XXX */
        sprintf(the_score.uid, "%7u", player_uid);
@@ -510,9 +510,9 @@ errr top_twenty(void)
 
        /* Save the level and such */
        sprintf(the_score.cur_lev, "%3d", p_ptr->lev);
-       sprintf(the_score.cur_dun, "%3d", dun_level);
+       sprintf(the_score.cur_dun, "%3d", (int)dun_level);
        sprintf(the_score.max_lev, "%3d", p_ptr->max_plv);
-       sprintf(the_score.max_dun, "%3d", max_dlv[dungeon_type]);
+       sprintf(the_score.max_dun, "%3d", (int)max_dlv[dungeon_type]);
 
        /* Save the cause of death (31 chars) */
        if (strlen(p_ptr->died_from) >= sizeof(the_score.how))
@@ -612,7 +612,7 @@ errr predict_score(void)
        strcpy(the_score.day, _("今日", "TODAY"));
 
        /* Save the player name (15 chars) */
-       sprintf(the_score.who, "%-.15s", player_name);
+       sprintf(the_score.who, "%-.15s", p_ptr->name);
 
        /* Save the player info XXX XXX XXX */
        sprintf(the_score.uid, "%7u", player_uid);
@@ -622,10 +622,10 @@ errr predict_score(void)
        sprintf(the_score.p_a, "%2d", p_ptr->pseikaku);
 
        /* Save the level and such */
-       sprintf(the_score.cur_lev, "%3d", p_ptr->lev);
-       sprintf(the_score.cur_dun, "%3d", dun_level);
-       sprintf(the_score.max_lev, "%3d", p_ptr->max_plv);
-       sprintf(the_score.max_dun, "%3d", max_dlv[dungeon_type]);
+       sprintf(the_score.cur_lev, "%3d", (int)p_ptr->lev);
+       sprintf(the_score.cur_dun, "%3d", (int)dun_level);
+       sprintf(the_score.max_lev, "%3d", (int)p_ptr->max_plv);
+       sprintf(the_score.max_dun, "%3d", (int)max_dlv[dungeon_type]);
 
        /* Hack -- no cause of death */
        /* まだ死んでいないときの識別文字 */
@@ -663,7 +663,8 @@ void show_highclass(void)
 {
 
        register int i = 0, j, m = 0;
-       int pr, clev/*, al*/;
+       int pr;
+       PLAYER_LEVEL clev/*, al*/;
        high_score the_score;
        char buf[1024], out_val[256];
 
@@ -695,7 +696,7 @@ void show_highclass(void)
                if (highscore_seek(j)) break;
                if (highscore_read(&the_score)) break;
                pr = atoi(the_score.p_r);
-               clev = atoi(the_score.cur_lev);
+               clev = (PLAYER_LEVEL)atoi(the_score.cur_lev);
 
 #ifdef JP
                sprintf(out_val, "   %3d) %sの%s (レベル %2d)",
@@ -712,10 +713,10 @@ void show_highclass(void)
 
 #ifdef JP
        sprintf(out_val, "あなた) %sの%s (レベル %2d)",
-           race_info[p_ptr->prace].title,player_name, p_ptr->lev);
+           race_info[p_ptr->prace].title,p_ptr->name, p_ptr->lev);
 #else
        sprintf(out_val, "You) %s the %s (Level %2d)",
-           player_name, race_info[p_ptr->prace].title, p_ptr->lev);
+           p_ptr->name, race_info[p_ptr->prace].title, p_ptr->lev);
 #endif
 
        prt(out_val, (m + 8), 0);
@@ -803,10 +804,10 @@ void race_score(int race_num)
        {
 #ifdef JP
        sprintf(out_val, "あなた) %sの%s (レベル %2d)",
-                    race_info[p_ptr->prace].title,player_name, p_ptr->lev);
+                    race_info[p_ptr->prace].title,p_ptr->name, p_ptr->lev);
 #else
                sprintf(out_val, "You) %s the %s (Level %3d)",
-                   player_name, race_info[p_ptr->prace].title, p_ptr->lev);
+                   p_ptr->name, race_info[p_ptr->prace].title, p_ptr->lev);
 #endif
 
                prt(out_val, (m + 8), 0);