• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revisiona2430042f51e41d46abbdc671d7c2271b71a72c8 (tree)
Time2019-02-20 00:17:46
AuthorDeskull <deskull@user...>
CommiterDeskull

Log Message

[Refactor] #37353 型の置換。 / Type replacement.

Change Summary

Incremental Difference

--- a/src/spells1.c
+++ b/src/spells1.c
@@ -5979,8 +5979,8 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
59795979 if( is_mirror_grid(&grid_array[y][x]) && !second_step )
59805980 {
59815981 /* The target of monsterspell becomes tha mirror(broken) */
5982- monster_target_y=(s16b)y;
5983- monster_target_x=(s16b)x;
5982+ monster_target_y = y;
5983+ monster_target_x = x;
59845984
59855985 remove_mirror(y,x);
59865986 for( j = 0; j <=i ; j++ )
--- a/src/types.h
+++ b/src/types.h
@@ -1020,7 +1020,7 @@ struct player_type
10201020
10211021 PLAYER_LEVEL lev; /* Level */
10221022
1023- s16b town_num; /* Current town number */
1023+ TOWN_IDX town_num; /* Current town number */
10241024 s16b arena_number; /* monster number in arena -KMW- */
10251025 bool inside_arena; /* Is character inside arena? */
10261026 QUEST_IDX inside_quest; /* Inside quest level */
@@ -1647,7 +1647,7 @@ typedef struct wilderness_type wilderness_type;
16471647 struct wilderness_type
16481648 {
16491649 int terrain;
1650- int town;
1650+ TOWN_IDX town;
16511651 int road;
16521652 u32b seed;
16531653 DEPTH level;
--- a/src/wild.c
+++ b/src/wild.c
@@ -321,7 +321,7 @@ static void generate_area(POSITION y, POSITION x, bool border, bool corner)
321321 POSITION x1, y1;
322322
323323 /* Number of the town (if any) */
324- p_ptr->town_num = (s16b)wilderness[y][x].town;
324+ p_ptr->town_num = wilderness[y][x].town;
325325
326326 /* Set the base level */
327327 base_level = wilderness[y][x].level;
@@ -747,8 +747,8 @@ typedef struct wilderness_grid wilderness_grid;
747747 struct wilderness_grid
748748 {
749749 int terrain; /* Terrain type */
750- int town; /* Town number */
751- s16b level; /* Level of the wilderness */
750+ TOWN_IDX town; /* Town number */
751+ DEPTH level; /* Level of the wilderness */
752752 byte road; /* Road */
753753 char name[32]; /* Name of the town/wilderness */
754754 };
@@ -811,7 +811,7 @@ errr parse_line_wilderness(char *buf, int ymin, int xmin, int ymax, int xmax, in
811811 w_letter[index].level = 0;
812812
813813 if (num > 3)
814- w_letter[index].town = atoi(zz[3]);
814+ w_letter[index].town = (TOWN_IDX)atoi(zz[3]);
815815 else
816816 w_letter[index].town = 0;
817817
Show on old repository browser