• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revisionefc95174d8fa3b4f5b32941278489ec12995ace8 (tree)
Time2019-07-11 23:53:04
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

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

Change Summary

Incremental Difference

--- a/src/cmd-dump.c
+++ b/src/cmd-dump.c
@@ -6345,7 +6345,7 @@ static void do_cmd_knowledge_virtues(void)
63456345
63466346 if (fff)
63476347 {
6348- fprintf(fff, _("現在の属性 : %s\n\n", "Your alighnment : %s\n\n"), your_alignment());
6348+ fprintf(fff, _("現在の属性 : %s\n\n", "Your alighnment : %s\n\n"), your_alignment(p_ptr));
63496349 dump_virtues(p_ptr, fff);
63506350 }
63516351 my_fclose(fff);
--- a/src/files.c
+++ b/src/files.c
@@ -3888,7 +3888,7 @@ void display_player(int mode)
38883888 display_player_one_line(ENTRY_WEIGHT, format("%d" ,(int)p_ptr->wt), TERM_L_BLUE);
38893889 display_player_one_line(ENTRY_SOCIAL, format("%d" ,(int)p_ptr->sc), TERM_L_BLUE);
38903890 #endif
3891- display_player_one_line(ENTRY_ALIGN, format("%s" ,your_alignment()), TERM_L_BLUE);
3891+ display_player_one_line(ENTRY_ALIGN, format("%s" ,your_alignment(p_ptr)), TERM_L_BLUE);
38923892
38933893
38943894 /* Display the stats */
@@ -4843,7 +4843,7 @@ static void dump_aux_virtues(FILE *fff)
48434843 else fprintf(fff, "%s ???\n", stat_names[v_nr]);
48444844 }
48454845
4846- fprintf(fff, _("\n属性 : %s\n", "\nYour alighnment : %s\n"), your_alignment());
4846+ fprintf(fff, _("\n属性 : %s\n", "\nYour alighnment : %s\n"), your_alignment(p_ptr));
48474847 fprintf(fff, "\n");
48484848 dump_virtues(p_ptr, fff);
48494849 }
--- a/src/player-status.c
+++ b/src/player-status.c
@@ -1290,14 +1290,14 @@ player_type *p_ptr = &p_body;
12901290 /*
12911291 * Return alignment title
12921292 */
1293-concptr your_alignment(void)
1293+concptr your_alignment(player_type *creature_ptr)
12941294 {
1295- if (p_ptr->align > 150) return _("大善", "Lawful");
1296- else if (p_ptr->align > 50) return _("中善", "Good");
1297- else if (p_ptr->align > 10) return _("小善", "Neutral Good");
1298- else if (p_ptr->align > -11) return _("中立", "Neutral");
1299- else if (p_ptr->align > -51) return _("小悪", "Neutral Evil");
1300- else if (p_ptr->align > -151) return _("中悪", "Evil");
1295+ if (creature_ptr->align > 150) return _("大善", "Lawful");
1296+ else if (creature_ptr->align > 50) return _("中善", "Good");
1297+ else if (creature_ptr->align > 10) return _("小善", "Neutral Good");
1298+ else if (creature_ptr->align > -11) return _("中立", "Neutral");
1299+ else if (creature_ptr->align > -51) return _("小悪", "Neutral Evil");
1300+ else if (creature_ptr->align > -151) return _("中悪", "Evil");
13011301 else return _("大悪", "Chaotic");
13021302 }
13031303
--- a/src/player-status.h
+++ b/src/player-status.h
@@ -725,7 +725,7 @@ struct player_type
725725 };
726726 extern player_type *p_ptr;
727727
728-extern concptr your_alignment(void);
728+extern concptr your_alignment(player_type *creature_ptr);
729729 extern int weapon_exp_level(int weapon_exp);
730730 extern int riding_exp_level(int riding_exp);
731731 extern int spell_exp_level(int spell_exp);
--- a/src/selfinfo.c
+++ b/src/selfinfo.c
@@ -111,7 +111,7 @@ void self_knowledge(void)
111111 }
112112 info[i++] = "";
113113
114- sprintf(Dummy, _("現在の属性 : %s(%ld)", "Your alighnment : %s(%ld)"), your_alignment(), (long int)p_ptr->align);
114+ sprintf(Dummy, _("現在の属性 : %s(%ld)", "Your alighnment : %s(%ld)"), your_alignment(p_ptr), (long int)p_ptr->align);
115115 strcpy(buf[1], Dummy);
116116 info[i++] = buf[1];
117117 for (v_nr = 0; v_nr < 8; v_nr++)
Show on old repository browser