OSDN Git Service

Merge branch 'For2.2.2-Refactoring' into For3.0.0-Artifact-Monster-Addition
[hengband/hengband.git] / src / view / display-player-stat-info.c
index e4710ff..73115f8 100644 (file)
@@ -6,14 +6,20 @@
  * ここにこれ以上関数を引っ越してくるのは禁止。何ならここから更に分割していく
  */
 
-#include "system/angband.h"
 #include "display-player-stat-info.h"
+#include "inventory/inventory-slot-types.h"
+#include "mutation/mutation-flag-types.h"
+#include "object-enchant/tr-types.h"
+#include "object/object-flags.h"
 #include "player/mimic-info-table.h"
-#include "term/gameterm.h"
-#include "player/player-personality.h"
 #include "player/permanent-resistances.h"
-#include "player/player-races-table.h"
-#include "object/tr-types.h"
+#include "player/player-class.h"
+#include "player/player-personality.h"
+#include "player/player-race-types.h"
+#include "player/player-status-table.h"
+#include "term/screen-processor.h"
+#include "term/term-color-types.h"
+#include "util/bit-flags-calculator.h"
 
 /*!
  * @brief プレーヤーのパラメータ基礎値 (腕力等)を18以下になるようにして返す
@@ -49,7 +55,7 @@ static int calc_basic_stat(player_type *creature_ptr, int stat_num)
  */
 static int compensate_special_race(player_type *creature_ptr, int stat_num)
 {
-       if (!PRACE_IS_(creature_ptr, RACE_ENT)) return 0;
+       if (!is_specific_player_race(creature_ptr, RACE_ENT)) return 0;
 
        int r_adj = 0;
        switch (stat_num)
@@ -176,7 +182,7 @@ static void compensate_stat_by_weapon(char *c, TERM_COLOR *a, object_type *o_ptr
                if (o_ptr->pval < 10) *c = '0' + o_ptr->pval;
        }
 
-       if (have_flag(flags, stat + TR_SUST_STR))
+       if (has_flag(flags, stat + TR_SUST_STR))
        {
                *a = TERM_GREEN;
        }
@@ -199,26 +205,26 @@ static void compensate_stat_by_weapon(char *c, TERM_COLOR *a, object_type *o_ptr
  */
 static void display_equipments_compensation(player_type *creature_ptr, BIT_FLAGS *flags, int row, int *col)
 {
-       for (int i = INVEN_RARM; i < INVEN_TOTAL; i++)
+       for (inventory_slot_type i = INVEN_RARM; i < INVEN_TOTAL; i++)
        {
                object_type *o_ptr;
                o_ptr = &creature_ptr->inventory_list[i];
-               object_flags_known(o_ptr, flags);
+               object_flags_known(creature_ptr, o_ptr, flags);
                for (int stat = 0; stat < A_MAX; stat++)
                {
                        TERM_COLOR a = TERM_SLATE;
                        char c = '.';
-                       if (have_flag(flags, stat))
+                       if (has_flag(flags, stat))
                        {
                                compensate_stat_by_weapon(&c, &a, o_ptr, stat, flags);
                        }
-                       else if (have_flag(flags, stat + TR_SUST_STR))
+                       else if (has_flag(flags, stat + TR_SUST_STR))
                        {
                                a = TERM_GREEN;
                                c = 's';
                        }
 
-                       Term_putch(*col, row + stat + 1, a, c);
+                       term_putch(*col, row + stat + 1, a, c);
                }
 
                (*col)++;
@@ -329,13 +335,13 @@ static void display_mutation_compensation(player_type *creature_ptr, BIT_FLAGS *
                char c = '.';
                change_display_by_mutation(creature_ptr, stat, &c, &a);
 
-               if (have_flag(flags, stat + TR_SUST_STR))
+               if (has_flag(flags, stat + TR_SUST_STR))
                {
                        a = TERM_GREEN;
                        c = 's';
                }
 
-               Term_putch(col, row + stat + 1, a, c);
+               term_putch(col, row + stat + 1, a, c);
        }
 }