From a591c2d4cbf0e3e33f6e4b73f7fa03f664abff12 Mon Sep 17 00:00:00 2001 From: Deskull Date: Thu, 3 Jan 2019 11:29:06 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#37353=20=E5=9E=8B=E3=81=AE?= =?utf8?q?=E7=BD=AE=E6=8F=9B=E3=80=82=20/=20Type=20replacement.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/h-type.h | 1 + src/types.h | 25 +++++++++---------------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/src/h-type.h b/src/h-type.h index 4fd53a45b..3a0186517 100644 --- a/src/h-type.h +++ b/src/h-type.h @@ -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型を定義 */ diff --git a/src/types.h b/src/types.h index 0bded9f3a..10ccb95e5 100644 --- a/src/types.h +++ b/src/types.h @@ -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; -- 2.11.0