OSDN Git Service

[Refactor] #37353 コメント整理。 / Refactor comments.
[hengband/hengband.git] / src / files.c
index c098b82..19eb7af 100644 (file)
@@ -23,6 +23,8 @@
 #include "artifact.h"
 #include "avatar.h"
 #include "shoot.h"
+#include "player-move.h"
+#include "patron.h"
 
 
 /*
@@ -564,8 +566,8 @@ errr process_pref_file_command(char *buf)
                        }
                        break;
 
-               /* Process "X:<str>" -- turn option off */
-               /* Process "Y:<str>" -- turn option on */
+               /* Process "X:<str>" -- current_world_ptr->game_turn option off */
+               /* Process "Y:<str>" -- current_world_ptr->game_turn option on */
                case 'X':
                case 'Y':
                        for (i = 0; option_info[i].o_desc; i++)
@@ -623,7 +625,7 @@ errr process_pref_file_command(char *buf)
                                if (streq(gf_desc[i].name, buf + 2))
                                {
                                        /* Remember this color set */
-                                       gf_color[gf_desc[i].num] = quark_add(t);
+                                       gf_color[gf_desc[i].num] = (TERM_COLOR)quark_add(t);
 
                                        /* Success */
                                        return 0;
@@ -1335,8 +1337,6 @@ errr check_time_init(void)
                if (prefix(buf, "FRI:")) strcpy(days[5], buf);
                if (prefix(buf, "SAT:")) strcpy(days[6], buf);
        }
-
-       /* Close it */
        my_fclose(fp);
 
 #endif
@@ -1820,8 +1820,8 @@ static void display_player_middle(void)
                }
                else
                {
-                       if (MON_FAST(&m_list[p_ptr->riding])) tmp_speed += 10;
-                       if (MON_SLOW(&m_list[p_ptr->riding])) tmp_speed -= 10;
+                       if (MON_FAST(&current_floor_ptr->m_list[p_ptr->riding])) tmp_speed += 10;
+                       if (MON_SLOW(&current_floor_ptr->m_list[p_ptr->riding])) tmp_speed -= 10;
                }
 
                if (tmp_speed)
@@ -1906,7 +1906,7 @@ static void display_player_middle(void)
                display_player_one_line(ENTRY_SP, format("%4d/%4d", p_ptr->csp , p_ptr->msp), TERM_RED);
 
        /* Dump play time */
-       display_player_one_line(ENTRY_PLAY_TIME, format("%.2lu:%.2lu:%.2lu", playtime/(60*60), (playtime/60)%60, playtime%60), TERM_L_GREEN);
+       display_player_one_line(ENTRY_PLAY_TIME, format("%.2lu:%.2lu:%.2lu", current_world_ptr->play_time/(60*60), (current_world_ptr->play_time/60)%60, current_world_ptr->play_time%60), TERM_L_GREEN);
 }
 
 
@@ -4187,7 +4187,7 @@ static void dump_aux_pet(FILE *fff)
 
        for (i = m_max - 1; i >= 1; i--)
        {
-               monster_type *m_ptr = &m_list[i];
+               monster_type *m_ptr = &current_floor_ptr->m_list[i];
 
                if (!m_ptr->r_idx) continue;
                if (!is_pet(m_ptr)) continue;
@@ -4896,7 +4896,7 @@ static void dump_aux_home_museum(FILE *fff)
        store_type  *st_ptr;
 
        /* Do we need it?? */
-       /* process_dungeon_file("w_info.txt", 0, 0, max_wild_y, max_wild_x); */
+       /* process_dungeon_file("w_info.txt", 0, 0, current_world_ptr->max_wild_y, current_world_ptr->max_wild_x); */
 
        /* Print the home */
        st_ptr = &town_info[1].store[STORE_HOME];
@@ -5046,8 +5046,6 @@ errr file_character(concptr name)
        }
 
        (void)make_character_dump(fff);
-
-       /* Close it */
        my_fclose(fff);
 
 
@@ -5424,7 +5422,6 @@ bool show_file(bool show_version, concptr name, concptr what, int line, BIT_FLAG
                /* Re-open the file if needed */
                if (next > line)
                {
-                       /* Close it */
                        my_fclose(fff);
 
                        /* Hack -- Re-Open the file */
@@ -5703,8 +5700,6 @@ bool show_file(bool show_version, concptr name, concptr what, int line, BIT_FLAG
                        strcpy (xtmp, "");
 
                        if (!get_string(_("ファイル名: ", "File name: "), xtmp, 80)) continue;
-
-                       /* Close it */
                        my_fclose(fff);
 
                        /* Build the filename */
@@ -5728,8 +5723,6 @@ bool show_file(bool show_version, concptr name, concptr what, int line, BIT_FLAG
 
                        while (!my_fgets(fff, buff, sizeof(buff)))
                                my_fputs(ffp, buff, 80);
-
-                       /* Close it */
                        my_fclose(fff);
                        my_fclose(ffp);
 
@@ -6880,7 +6873,7 @@ void exit_game_panic(void)
        /* Clear the top line */
        prt("", 0, 0);
 
-       /* Hack -- turn off some things */
+       /* Hack -- current_world_ptr->game_turn off some things */
        disturb(TRUE, TRUE);
 
        /* Mega-Hack -- Delay death */