OSDN Git Service

It's not currently used in hengband, but bring over the change to mouse event handlin...
[hengbandforosx/hengbandosx.git] / src / scores.c
index e8d61dc..873b451 100644 (file)
@@ -481,8 +481,8 @@ errr top_twenty(void)
        sprintf(the_score.gold, "%9lu", (long)p_ptr->au);
        the_score.gold[9] = '\0';
 
-       /* Save the current turn */
-       sprintf(the_score.turns, "%9lu", (long)turn_real(turn));
+       /* Save the current current_world_ptr->game_turn */
+       sprintf(the_score.turns, "%9lu", (long)turn_real(current_world_ptr->game_turn));
        the_score.turns[9] = '\0';
 
 #ifdef HIGHSCORE_DATE_HACK
@@ -507,9 +507,9 @@ errr top_twenty(void)
 
        /* Save the level and such */
        sprintf(the_score.cur_lev, "%3d", MIN((u16b)p_ptr->lev, 999));
-       sprintf(the_score.cur_dun, "%3d", (int)dun_level);
+       sprintf(the_score.cur_dun, "%3d", (int)current_floor_ptr->dun_level);
        sprintf(the_score.max_lev, "%3d", MIN((u16b)p_ptr->max_plv, 999));
-       sprintf(the_score.max_dun, "%3d", (int)max_dlv[dungeon_type]);
+       sprintf(the_score.max_dun, "%3d", (int)max_dlv[p_ptr->dungeon_idx]);
 
        /* Save the cause of death (31 chars) */
        if (strlen(p_ptr->died_from) >= sizeof(the_score.how))
@@ -602,8 +602,8 @@ errr predict_score(void)
        /* Save the current gold */
        sprintf(the_score.gold, "%9lu", (long)p_ptr->au);
 
-       /* Save the current turn */
-       sprintf(the_score.turns, "%9lu", (long)turn_real(turn));
+       /* Save the current current_world_ptr->game_turn */
+       sprintf(the_score.turns, "%9lu", (long)turn_real(current_world_ptr->game_turn));
 
        /* Hack -- no time needed */
        strcpy(the_score.day, _("今日", "TODAY"));
@@ -620,9 +620,9 @@ errr predict_score(void)
 
        /* Save the level and such */
        sprintf(the_score.cur_lev, "%3d", MIN((u16b)p_ptr->lev, 999));
-       sprintf(the_score.cur_dun, "%3d", (int)dun_level);
+       sprintf(the_score.cur_dun, "%3d", (int)current_floor_ptr->dun_level);
        sprintf(the_score.max_lev, "%3d", MIN((u16b)p_ptr->max_plv, 999));
-       sprintf(the_score.max_dun, "%3d", (int)max_dlv[dungeon_type]);
+       sprintf(the_score.max_dun, "%3d", (int)max_dlv[p_ptr->dungeon_idx]);
 
        /* Hack -- no cause of death */
        /* まだ死んでいないときの識別文字 */
@@ -846,7 +846,7 @@ void kingly(void)
        bool seppuku = streq(p_ptr->died_from, "Seppuku");
 
        /* Hack -- retire in town */
-       dun_level = 0;
+       current_floor_ptr->dun_level = 0;
 
        /* Fake death */
        if (!seppuku)