OSDN Git Service

[Refactor] #37353 型の置換。 / Type replacement.
authorDeskull <deskull@users.sourceforge.jp>
Thu, 3 Jan 2019 02:29:06 +0000 (11:29 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Thu, 3 Jan 2019 02:29:06 +0000 (11:29 +0900)
src/h-type.h
src/types.h

index 4fd53a4..3a01865 100644 (file)
@@ -109,6 +109,7 @@ typedef s16b TOWN_IDX;                      /*!< ゲーム中の町ID型を定義 */
 typedef s16b FEAT_IDX;                 /*!< ゲーム中の地形ID型を定義 */
 typedef s16b FLOOR_IDX;                        /*!< ゲーム中のフロアID型を定義 */
 
+typedef byte SEX_IDX;                  /*!< ゲーム中のプレイヤー性別ID型を定義 */
 typedef s16b RACE_IDX;                 /*!< ゲーム中のプレイヤー種族ID型を定義 */
 typedef s16b CLASS_IDX;                        /*!< ゲーム中のプレイヤー職業ID型を定義 */
 typedef s16b CHARACTER_IDX;            /*!< ゲーム中のプレイヤー性格ID型を定義 */
index 0bded9f..10ccb95 100644 (file)
@@ -964,7 +964,7 @@ struct player_type
        POSITION oldpy;         /* Previous player location -KMW- */
        POSITION oldpx;         /* Previous player location -KMW- */
 
-       byte psex;      /* Sex index */
+       SEX_IDX psex;           /* Sex index */
        RACE_IDX prace;         /* Race index */
        CLASS_IDX pclass;       /* Class index */
        CHARACTER_IDX pseikaku; /* Seikaku index */
@@ -1370,12 +1370,12 @@ typedef struct birther birther;
 
 struct birther
 {
-       byte psex;         /* Sex index */
-       RACE_IDX prace;        /* Race index */
-       CLASS_IDX pclass;       /* Class index */
-       CHARACTER_IDX pseikaku;     /* Seikaku index */
-       REALM_IDX realm1;       /* First magic realm */
-       REALM_IDX realm2;       /* Second magic realm */
+       SEX_IDX psex;           /* Sex index */
+       RACE_IDX prace;         /* Race index */
+       CLASS_IDX pclass;       /* Class index */
+       CHARACTER_IDX pseikaku; /* Seikaku index */
+       REALM_IDX realm1;       /* First magic realm */
+       REALM_IDX realm2;       /* Second magic realm */
 
        s16b age;
        s16b ht;
@@ -1567,19 +1567,12 @@ typedef struct high_score high_score;
 struct high_score
 {
        char what[8];           /* Version info (string) */
-
        char pts[10];           /* Total Score (number) */
-
        char gold[10];          /* Total Gold (number) */
-
        char turns[10];         /* Turns Taken (number) */
-
        char day[10];           /* Time stamp (string) */
-
        char who[16];           /* Player Name (string) */
-
        char uid[8];            /* Player UID (number) */
-
        char sex[2];            /* Player Sex (string) */
        char p_r[3];            /* Player Race (number) */
        char p_c[3];            /* Player Class (number) */
@@ -1680,8 +1673,8 @@ typedef struct
        DEPTH dun_level;
        s32b last_visit;      /* Time count of last visit. 0 for new floor. */
        u32b visit_mark;      /* Older has always smaller mark. */
-       s16b upper_floor_id;  /* a floor connected with level teleportation */
-       s16b lower_floor_id;  /* a floor connected with level tel. and trap door */
+       FLOOR_IDX upper_floor_id;  /* a floor connected with level teleportation */
+       FLOOR_IDX lower_floor_id;  /* a floor connected with level tel. and trap door */
 } saved_floor_type;