OSDN Git Service

[Refactor] #37353 return の直後にあるカッコを削除 (-1~9のみ) / Removed parenthesis right after...
[hengband/hengband.git] / src / files.c
index 492799f..9974918 100644 (file)
@@ -1116,7 +1116,7 @@ static errr process_pref_file_aux(player_type *creature_ptr, concptr name, int p
        fp = my_fopen(name, "r");
 
        /* No such file */
-       if (!fp) return (-1);
+       if (!fp) return -1;
 
        /* Process the file */
        char buf[1024];
@@ -1292,19 +1292,19 @@ errr check_time(void)
        struct tm   *tp;
 
        /* No restrictions */
-       if (!check_time_flag) return (0);
+       if (!check_time_flag) return 0;
 
        /* Check for time violation */
        c = time((time_t *)0);
        tp = localtime(&c);
 
        /* Violation */
-       if (days[tp->tm_wday][tp->tm_hour + 4] != 'X') return (1);
+       if (days[tp->tm_wday][tp->tm_hour + 4] != 'X') return 1;
 
 #endif
 
        /* Success */
-       return (0);
+       return 0;
 }
 
 
@@ -1326,7 +1326,7 @@ errr check_time_init(void)
        fp = my_fopen(buf, "r");
 
        /* No file, no restrictions */
-       if (!fp) return (0);
+       if (!fp) return 0;
 
        /* Assume restrictions */
        check_time_flag = TRUE;
@@ -1354,7 +1354,7 @@ errr check_time_init(void)
 #endif
 
        /* Success */
-       return (0);
+       return 0;
 }
 
 
@@ -1407,7 +1407,7 @@ errr check_load(void)
        struct statstime    st;
 
        /* Success if not checking */
-       if (!check_load_value) return (0);
+       if (!check_load_value) return 0;
 
        /* Check the load */
        if (0 == rstat("localhost", &st))
@@ -1416,13 +1416,13 @@ errr check_load(void)
                long val2 = (long)(check_load_value)* FSCALE;
 
                /* Check for violation */
-               if (val1 >= val2) return (1);
+               if (val1 >= val2) return 1;
        }
 
 #endif
 
        /* Success */
-       return (0);
+       return 0;
 }
 
 
@@ -1449,7 +1449,7 @@ errr check_load_init(void)
        fp = my_fopen(buf, "r");
 
        /* No file, no restrictions */
-       if (!fp) return (0);
+       if (!fp) return 0;
 
        /* Default load */
        check_load_value = 100;
@@ -1482,7 +1482,7 @@ errr check_load_init(void)
 #endif
 
        /* Success */
-       return (0);
+       return 0;
 }
 
 
@@ -1879,7 +1879,7 @@ static void display_player_middle(player_type *creature_ptr)
 
        /* Dump Day */
        int day, hour, min;
-       extract_day_hour_min(&day, &hour, &min);
+       extract_day_hour_min(creature_ptr, &day, &hour, &min);
 
        if (day < MAX_DAYS) sprintf(buf, _("%d日目 %2d:%02d", "Day %d %2d:%02d"), day, hour, min);
        else sprintf(buf, _("*****日目 %2d:%02d", "Day ***** %2d:%02d"), hour, min);
@@ -4538,7 +4538,7 @@ static void dump_aux_arena(player_type *creature_ptr, FILE *fff)
                fprintf(fff, "\n");
                return;
        }
-       
+
        if (creature_ptr->arena_number > MAX_ARENA_MONS - 1)
        {
                fprintf(fff, _("\n 闘技場: チャンピオン\n", "\n Arena: Champion\n"));
@@ -4913,7 +4913,7 @@ errr file_character(player_type *creature_ptr, concptr name)
                (void)inkey();
 
                /* Error */
-               return (-1);
+               return -1;
        }
 
        (void)make_character_dump(creature_ptr, fff);
@@ -5225,7 +5225,7 @@ bool show_file(player_type *creature_ptr, bool show_version, concptr name, concp
 
                        continue;
                }
-               
+
                /* Notice "tag" requests */
                if (str[6] != '<') continue;
 
@@ -5850,7 +5850,7 @@ void do_cmd_save_game(player_type *creature_ptr, int is_autosave)
        update_creature(creature_ptr);
 
        /* Initialize monster process */
-       mproc_init();
+       mproc_init(creature_ptr->current_floor_ptr);
 
        /* HACK -- reset the hackish flag */
        current_world_ptr->is_loading_now = TRUE;
@@ -6683,7 +6683,7 @@ static void handle_signal_suspend(int sig)
 
 
 /*!
- * todo ここにp_ptrを追加すると関数ポインタ周りの収拾がつかなくなるので保留
+ * todo ここにplayer_typeを追加すると関数ポインタ周りの収拾がつかなくなるので保留
  * @brief OSからのシグナルを受けて中断、終了する /
  * Handle signals -- simple (interrupt and quit)
  * @param sig 受け取ったシグナル