• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision52dfd28b9f33ae3440dd7d8dc2bcce85e739bb5d (tree)
Time2019-07-04 20:22:50
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #38997 get_stats() に player_type * 引数を追加.

Change Summary

Incremental Difference

--- a/src/birth.c
+++ b/src/birth.c
@@ -1097,7 +1097,7 @@ static int adjust_stat(int value, int amount)
10971097 * For efficiency, we include a chunk of "calc_bonuses()".\n
10981098 * @return なし
10991099 */
1100-static void get_stats(void)
1100+static void get_stats(player_type *creature_ptr)
11011101 {
11021102 /* Roll and verify some stats */
11031103 while (TRUE)
@@ -1119,7 +1119,7 @@ static void get_stats(void)
11191119
11201120 /* Save that value */
11211121 sum += val;
1122- p_ptr->stat_cur[3*i] = p_ptr->stat_max[3*i] = val;
1122+ creature_ptr->stat_cur[3*i] = creature_ptr->stat_max[3*i] = val;
11231123
11241124 /* Extract 5 + 1d3 + 1d4 + 1d5 */
11251125 val = 5 + 3;
@@ -1129,7 +1129,7 @@ static void get_stats(void)
11291129
11301130 /* Save that value */
11311131 sum += val;
1132- p_ptr->stat_cur[3*i+1] = p_ptr->stat_max[3*i+1] = val;
1132+ creature_ptr->stat_cur[3*i+1] = creature_ptr->stat_max[3*i+1] = val;
11331133
11341134 /* Extract 5 + 1d3 + 1d4 + 1d5 */
11351135 val = 5 + 3;
@@ -1139,7 +1139,7 @@ static void get_stats(void)
11391139
11401140 /* Save that value */
11411141 sum += val;
1142- p_ptr->stat_cur[3*i+2] = p_ptr->stat_max[3*i+2] = val;
1142+ creature_ptr->stat_cur[3*i+2] = creature_ptr->stat_max[3*i+2] = val;
11431143 }
11441144
11451145 /* Verify totals */
@@ -4193,7 +4193,7 @@ static bool player_birth_aux(void)
41934193 else
41944194 {
41954195 /* Get a new character */
4196- get_stats();
4196+ get_stats(p_ptr);
41974197
41984198 /* Roll for age/height/weight */
41994199 get_ahw();
@@ -4255,7 +4255,7 @@ static bool player_birth_aux(void)
42554255 bool accept = TRUE;
42564256
42574257 /* Get a new character */
4258- get_stats();
4258+ get_stats(p_ptr);
42594259
42604260 /* Advance the round */
42614261 auto_round++;
Show on old repository browser