• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision51fed3f38bb23912780c679183043fb12980ff00 (tree)
Time2019-02-28 21:00:19
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 MUTATION_IDX 型を定義して置換。 / Type replacement to MUTATION_IDX.

Change Summary

Incremental Difference

--- a/src/h-type.h
+++ b/src/h-type.h
@@ -135,6 +135,7 @@ typedef s16b OBJECT_IDX; /*!< ゲーム中のアイテムID型を定義 */
135135 typedef s32b ESSENCE_IDX; /*!< 鍛冶エッセンスのID型 */
136136 typedef s16b KIND_OBJECT_IDX; /*!< ゲーム中のベースアイテムID型を定義 */
137137 typedef s16b VAULT_IDX; /*!< 固定部屋のID型を定義 */
138+typedef int MUTATION_IDX; /*!< 突然変異のID型を定義 */
138139
139140 typedef s32b POSITION; /*!< ゲーム中の座標型を定義 */
140141 typedef s16b POSITION_IDX; /*!< ゲーム中の座標リストID型 */
--- a/src/mutation.c
+++ b/src/mutation.c
@@ -25,7 +25,7 @@
2525 * @param choose_mut 与えたい突然変異のID、0ならばランダムに選択
2626 * @return なし
2727 */
28-bool gain_random_mutation(int choose_mut)
28+bool gain_random_mutation(MUTATION_IDX choose_mut)
2929 {
3030 int attempts_left = 20;
3131 concptr muta_desc = "";
@@ -863,7 +863,7 @@ bool gain_random_mutation(int choose_mut)
863863 * @param choose_mut 取り除きたい突然変異のID、0ならばランダムに消去
864864 * @return なし
865865 */
866-bool lose_mutation(int choose_mut)
866+bool lose_mutation(MUTATION_IDX choose_mut)
867867 {
868868 int attempts_left = 20;
869869 concptr muta_desc = "";
--- a/src/mutation.h
+++ b/src/mutation.h
@@ -1,6 +1,6 @@
11 /* mutation.c */
2-extern bool gain_random_mutation(int choose_mut);
3-extern bool lose_mutation(int choose_mut);
2+extern bool gain_random_mutation(MUTATION_IDX choose_mut);
3+extern bool lose_mutation(MUTATION_IDX choose_mut);
44 extern void lose_all_mutations(void);
55 extern void dump_mutations(FILE *OutFile);
66 extern void do_cmd_knowledge_mutations(void);
--- a/src/realm-craft.c
+++ b/src/realm-craft.c
@@ -483,7 +483,7 @@ concptr do_craft_spell(SPELL_IDX spell, BIT_FLAGS mode)
483483 {
484484 if (cast)
485485 {
486- int mutation;
486+ MUTATION_IDX mutation;
487487
488488 if (one_in_(7))
489489 /* Teleport control */
Show on old repository browser