OSDN Git Service

[Refactor] #37353 item_tester_learn_spell() を object-hook.c へ移動。 / Move item_tester_l...
[hengband/hengband.git] / src / chuukei.c
index 190fedb..840e038 100644 (file)
@@ -52,7 +52,7 @@ static int browse_delay; /* 表示するまでの時間(100ms単位)(この間
 static int sd; /* ソケットのファイルディスクリプタ */
 static long time_diff;   /* プレイ側との時間のずれ(これを見ながらディレイを調整していく) */
 static int server_port;
-static char server_name[MAX_HOSTNAME];
+static GAME_TEXT server_name[MAX_HOSTNAME];
 #endif
 
 static int movie_fd;
@@ -104,7 +104,7 @@ static errr (*old_xtra_hook)(int n, int v);
 static errr (*old_curs_hook)(int x, int y);
 static errr (*old_bigcurs_hook)(int x, int y);
 static errr (*old_wipe_hook)(int x, int y, int n);
-static errr (*old_text_hook)(int x, int y, int n, byte a, cptr s);
+static errr (*old_text_hook)(int x, int y, int n, TERM_COLOR a, concptr s);
 
 static void disable_chuukei_server(void)
 {
@@ -285,7 +285,7 @@ void flush_ringbuf(void)
 }
 
 
-static int read_chuukei_prf(cptr prf_name)
+static int read_chuukei_prf(concptr prf_name)
 {
        char buf[1024];
        FILE *fp;
@@ -522,7 +522,7 @@ static bool string_is_repeat(char *str, int len)
        return (TRUE);
 }
 
-static errr send_text_to_chuukei_server(int x, int y, int len, byte col, cptr str)
+static errr send_text_to_chuukei_server(TERM_LEN x, TERM_LEN y, int len, TERM_COLOR col, concptr str)
 {
        char buf[1024];
        char buf2[1024];
@@ -544,7 +544,7 @@ static errr send_text_to_chuukei_server(int x, int y, int len, byte col, cptr st
        }
        else
        {
-#ifdef SJIS
+#if defined(SJIS) && defined(JP)
                sjis2euc(buf2);
 #endif
                sprintf(buf, "t%c%c%c%c%s", x+1, y+1, len, col, buf2);
@@ -652,20 +652,12 @@ void prepare_movie_hooks(void)
                disable_chuukei_server();
 #endif
                fd_close(movie_fd);
-#ifdef JP
-               msg_print("録画を終了しました。");
-#else
-               msg_print("Stopped recording.");
-#endif
+               msg_print(_("録画を終了しました。", "Stopped recording."));
        }
        else
        {
                sprintf(tmp, "%s.amv", player_base);
-#ifdef JP
-               if (get_string("ムービー記録ファイル: ", tmp, 80))
-#else
-               if (get_string("Movie file name: ", tmp, 80))
-#endif
+               if (get_string(_("ムービー記録ファイル: ", "Movie file name: "), tmp, 80))
                {
                        int fd;
 
@@ -677,16 +669,10 @@ void prepare_movie_hooks(void)
                        if (fd >= 0)
                        {
                                char out_val[160];
-
-                               /* Close the file */
                                (void)fd_close(fd);
 
                                /* Build query */
-#ifdef JP
-                               (void)sprintf(out_val, "現存するファイルに上書きしますか? (%s)", buf);
-#else
-                               (void)sprintf(out_val, "Replace existing file %s? ", buf);
-#endif
+                               (void)sprintf(out_val, _("現存するファイルに上書きしますか? (%s)", "Replace existing file %s? "), buf);
 
                                /* Ask */
                                if (!get_check(out_val)) return;
@@ -700,11 +686,7 @@ void prepare_movie_hooks(void)
 
                        if (!movie_fd)
                        {
-#ifdef JP
-                               msg_print("ファイルを開けません!");
-#else
-                               msg_print("Can not open file.");
-#endif
+                               msg_print(_("ファイルを開けません!", "Can not open file."));
                                return;
                        }
 
@@ -948,7 +930,8 @@ static bool flush_ringbuf_client(void)
        while (get_nextbuf(buf))
        {
                char id;
-               int x, y, len, col;
+               int x, y, len;
+               TERM_COLOR col;
                int i;
                unsigned char tmp1, tmp2, tmp3, tmp4;
                char *mesg;
@@ -968,7 +951,7 @@ static bool flush_ringbuf_client(void)
                switch (id)
                {
                case 't': /* 通常 */
-#ifdef SJIS
+#if defined(SJIS) && defined(JP)
                        euc2sjis(mesg);
 #endif
                        update_term_size(x, y, len);
@@ -1102,7 +1085,7 @@ void browse_chuukei()
 }
 #endif /* CHUUKEI */
 
-void prepare_browse_movie_aux(cptr filename)
+void prepare_browse_movie_aux(concptr filename)
 {
        movie_fd = fd_open(filename, O_RDONLY);
        
@@ -1111,7 +1094,7 @@ void prepare_browse_movie_aux(cptr filename)
        init_buffer();
 }
 
-void prepare_browse_movie(cptr filename)
+void prepare_browse_movie(concptr filename)
 {
        char buf[1024];
        path_build(buf, sizeof(buf), ANGBAND_DIR_USER, filename);