OSDN Git Service

Merge remote-tracking branch 'remotes/hengbandosx/english-market-edits' into feature...
[hengband/hengband.git] / src / core / scores.c
index 0717d8e..ceec92c 100644 (file)
@@ -15,7 +15,6 @@
 #include "core/asking-player.h"
 #include "core/turn-compensator.h"
 #include "dungeon/dungeon.h"
-#include "floor/floor.h"
 #include "game-option/birth-options.h"
 #include "game-option/game-play-options.h"
 #include "io/input-key-acceptor.h"
 #include "io/signal-handlers.h"
 #include "io/uid-checker.h"
 #include "io/write-diary.h"
-#include "locale/japanese.h"
 #include "player/player-class.h"
 #include "player/player-personality.h"
 #include "player/player-sex.h"
 #include "player/player-status.h"
 #include "player/race-info-table.h"
 #include "system/angband-version.h"
+#include "system/floor-type-definition.h"
 #include "term/screen-processor.h"
 #include "term/term-color-types.h"
 #include "util/angband-files.h"
@@ -37,6 +36,9 @@
 #include "util/string-processor.h"
 #include "view/display-messages.h"
 #include "world/world.h"
+#ifdef JP
+#include "locale/japanese.h"
+#endif
 
  /*
   * The "highscore" file descriptor, if available.
@@ -176,7 +178,7 @@ void display_scores_aux(int from, int to, int note, high_score *score)
 
        TERM_LEN wid, hgt, per_screen;
 
-       Term_get_size(&wid, &hgt);
+       term_get_size(&wid, &hgt);
        per_screen = (hgt - 4) / 4;
 
        /* Paranoia -- it may not have opened */
@@ -208,7 +210,7 @@ void display_scores_aux(int from, int to, int note, high_score *score)
        /* Show per_screen per page, until "done" */
        for (k = from, place = k+1; k < i; k += per_screen)
        {
-               Term_clear();
+               term_clear();
 
                /* Title */
                put_str(_("                変愚蛮怒: 勇者の殿堂", "                Hengband Hall of Fame"), 0, 0);
@@ -413,7 +415,7 @@ void display_scores(int from, int to)
 
        /* Paranoia -- No score file */
        if (highscore_fd < 0) quit(_("スコア・ファイルが使用できません。", "Score file unavailable."));
-       Term_clear();
+       term_clear();
 
        /* Display the scores */
        display_scores_aux(from, to, -1, NULL);
@@ -436,7 +438,7 @@ void display_scores(int from, int to)
  * @param do_send 実際に転送ア処置を行うか否か
  * @return 転送が成功したらTRUEを返す
  */
-bool send_world_score(player_type *current_player_ptr, bool do_send, void(*update_playtime)(void), display_player_pf display_player, map_name_pf map_name)
+bool send_world_score(player_type *current_player_ptr, bool do_send, void(*update_playtime)(void), display_player_pf display_player)
 {
 #ifdef WORLD_SCORE
        if (send_score && do_send)
@@ -455,9 +457,9 @@ bool send_world_score(player_type *current_player_ptr, bool do_send, void(*updat
                errr err;
                prt("", 0, 0);
                prt(_("送信中..", "Sending..."), 0, 0);
-               Term_fresh();
+               term_fresh();
                screen_save();
-               err = report_score(current_player_ptr, update_playtime, display_player, map_name);
+               err = report_score(current_player_ptr, update_playtime, display_player);
                screen_load();
                if (err) return FALSE;
 
@@ -537,7 +539,7 @@ errr top_twenty(player_type *current_player_ptr)
        }
 
        /* Grab permissions */
-       safe_setuid_grab();
+       safe_setuid_grab(current_player_ptr);
 
        /* Lock (for writing) the highscore file, or fail */
        errr err = fd_lock(highscore_fd, F_WRLCK);
@@ -551,7 +553,7 @@ errr top_twenty(player_type *current_player_ptr)
        int j = highscore_add(&the_score);
 
        /* Grab permissions */
-       safe_setuid_grab();
+       safe_setuid_grab(current_player_ptr);
 
        /* Unlock the highscore file, or fail */
        err = fd_lock(highscore_fd, F_UNLCK);
@@ -843,13 +845,13 @@ void kingly(player_type *winner_ptr)
        /* Restore the level */
        winner_ptr->lev = winner_ptr->max_plv;
 
-       Term_get_size(&wid, &hgt);
+       term_get_size(&wid, &hgt);
        cy = hgt / 2;
        cx = wid / 2;
 
        /* Hack -- Instant Gold */
        winner_ptr->au += 10000000L;
-       Term_clear();
+       term_clear();
 
        /* Display a crown */
        put_str("#", cy - 11, cx - 1);
@@ -899,7 +901,7 @@ void kingly(player_type *winner_ptr)
  */
 bool check_score(player_type *current_player_ptr)
 {
-       Term_clear();
+       term_clear();
 
        /* No score file */
        if (highscore_fd < 0)