From 27210e260270deb9a7a17602393b72bb2c96c137 Mon Sep 17 00:00:00 2001 From: Deskull Date: Wed, 13 Dec 2017 01:22:57 +0900 Subject: [PATCH] =?utf8?q?#37287=20#37353=20(2.2.0.89)=20=E5=9E=8B?= =?utf8?q?=E3=81=AE=E7=BD=AE=E6=8F=9B=E3=82=92=E7=B6=99=E7=B6=9A=E4=B8=AD?= =?utf8?q?=E3=80=82=20/=20Ongoing=20type=20replacement.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/files.c | 2 +- src/floors.c | 2 +- src/init.h | 6 +----- src/init1.c | 12 ++++++------ src/init2.c | 4 ++-- src/main-win.c | 10 +++++----- src/types.h | 2 +- src/util.c | 2 +- 8 files changed, 18 insertions(+), 22 deletions(-) diff --git a/src/files.c b/src/files.c index 64926f8ed..07e12186b 100644 --- a/src/files.c +++ b/src/files.c @@ -124,7 +124,7 @@ void safe_setuid_grab(void) */ s16b tokenize(char *buf, s16b num, char **tokens, BIT_FLAGS mode) { - int i = 0; + s16b i = 0; char *s = buf; diff --git a/src/floors.c b/src/floors.c index 0391fd8c1..eda649571 100644 --- a/src/floors.c +++ b/src/floors.c @@ -238,7 +238,7 @@ static void kill_saved_floor(saved_floor_type *sf_ptr) s16b get_new_floor_id(void) { saved_floor_type *sf_ptr = NULL; - int i; + s16b i; /* Look for empty space */ for (i = 0; i < MAX_SAVED_FLOORS; i++) diff --git a/src/init.h b/src/init.h index 848a81d8a..d0e3e6d07 100644 --- a/src/init.h +++ b/src/init.h @@ -78,12 +78,8 @@ struct header byte v_patch; /* Version -- patch */ byte v_extra; /* Version -- extra */ - u16b info_num; /* Number of "info" records */ - - u16b info_len; /* Size of each "info" record */ - - + int info_len; /* Size of each "info" record */ u16b head_size; /* Size of the "header" in bytes */ STR_OFFSET info_size; /* Size of the "info" array in bytes */ diff --git a/src/init1.c b/src/init1.c index 998e18845..e51b84978 100644 --- a/src/init1.c +++ b/src/init1.c @@ -3619,14 +3619,14 @@ typedef struct dungeon_grid dungeon_grid; struct dungeon_grid { - IDX feature; /* Terrain feature */ - IDX monster; /* Monster */ - IDX object; /* Object */ - IDX ego; /* Ego-Item */ - IDX artifact; /* Artifact */ + FEAT_IDX feature; /* Terrain feature */ + MONSTER_IDX monster; /* Monster */ + OBJECT_IDX object; /* Object */ + EGO_IDX ego; /* Ego-Item */ + ARTIFACT_IDX artifact; /* Artifact */ IDX trap; /* Trap */ int cave_info; /* Flags for CAVE_MARK, CAVE_GLOW, CAVE_ICKY, CAVE_ROOM */ - int special; /* Reserved for special terrain info */ + s16b special; /* Reserved for special terrain info */ int random; /* Number of the random effect */ }; diff --git a/src/init2.c b/src/init2.c index 00e01b421..d4a1ba68c 100644 --- a/src/init2.c +++ b/src/init2.c @@ -404,7 +404,7 @@ static errr init_info_raw(int fd, header *head) * @param len データの長さ * @return エラーコード */ -static void init_header(header *head, int num, int len) +static void init_header(header *head, IDX num, int len) { /* Save the "version" */ head->v_major = FAKE_VER_MAJOR; @@ -413,7 +413,7 @@ static void init_header(header *head, int num, int len) head->v_extra = 0; /* Save the "record" information */ - head->info_num = num; + head->info_num = (IDX)num; head->info_len = len; /* Save the size of "*_head" and "*_info" */ diff --git a/src/main-win.c b/src/main-win.c index 129a4ba43..9e3e2fe27 100644 --- a/src/main-win.c +++ b/src/main-win.c @@ -1381,11 +1381,9 @@ static void load_prefs(void) */ static s16b tokenize_whitespace(char *buf, s16b num, char **tokens) { - int k = 0; - + s16b k = 0; char *s = buf; - /* Process */ while (k < num) { @@ -3199,11 +3197,13 @@ static errr Term_pict_win(int x, int y, int n, const byte *ap, const char *cp, c static void windows_map(void) { term_data *td = &data[0]; - byte a, c; + byte a; + char c; int x, min_x, max_x; int y, min_y, max_y; - byte ta, tc; + byte ta; + char tc; /* Only in graphics mode */ if (!use_graphics) return; diff --git a/src/types.h b/src/types.h index 4fa714c63..aae13d322 100644 --- a/src/types.h +++ b/src/types.h @@ -1671,7 +1671,7 @@ typedef struct { typedef struct { s16b floor_id; /* No recycle until 65536 IDs are all used */ - byte savefile_id; /* ID for savefile (from 0 to MAX_SAVED_FLOOR) */ + s16b savefile_id; /* ID for savefile (from 0 to MAX_SAVED_FLOOR) */ DEPTH dun_level; s32b last_visit; /* Time count of last visit. 0 for new floor. */ u32b visit_mark; /* Older has always smaller mark. */ diff --git a/src/util.c b/src/util.c index f11e077b2..57ea00020 100644 --- a/src/util.c +++ b/src/util.c @@ -2353,7 +2353,7 @@ void quark_init(void) */ s16b quark_add(cptr str) { - int i; + s16b i; /* Look for an existing quark */ for (i = 1; i < quark__num; i++) -- 2.11.0