• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: コミット

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


コミットメタ情報

リビジョン4c97fb2ec6ded2b036de7bd53c0047caf962d3e7 (tree)
日時2017-10-11 18:03:21
作者Deskull <desull@user...>
コミッターDeskull

ログメッセージ

#37287 #37353 (2.2.0.89) 型の置換を継続中。 / Ongoing type replacement.

変更サマリ

差分

--- a/src/japanese.c
+++ b/src/japanese.c
@@ -70,7 +70,7 @@ void sindarin_to_kana(char *kana, const char *sindarin)
7070
7171 sprintf(kana, "%s$", sindarin);
7272 for (idx = 0; kana[idx]; idx++)
73- if (isupper(kana[idx])) kana[idx] = tolower(kana[idx]);
73+ if (isupper(kana[idx])) kana[idx] = (char)tolower(kana[idx]);
7474
7575 for (idx = 0; s2j_table[idx].key1 != NULL; idx++)
7676 {
--- a/src/object1.c
+++ b/src/object1.c
@@ -1856,7 +1856,7 @@ void display_equip(void)
18561856 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,\n
18571857 * and "x" is the "current" command_cmd code.\n
18581858 */
1859-static bool get_tag(int *cp, char tag, int mode)
1859+static bool get_tag(COMMAND_CODE *cp, char tag, int mode)
18601860 {
18611861 int i, start, end;
18621862 cptr s;
--- a/src/rooms.c
+++ b/src/rooms.c
@@ -5456,7 +5456,7 @@ static void build_elemental_vault(int x0, int y0, int xsiz, int ysiz)
54565456 */
54575457 static bool build_type10(void)
54585458 {
5459- int y0, x0, xsize, ysize, vtype;
5459+ POSITION y0, x0, xsize, ysize, vtype;
54605460
54615461 /* Get size */
54625462 /* big enough to look good, small enough to be fairly common. */
@@ -5564,7 +5564,7 @@ static bool build_type11(void)
55645564 */
55655565 static bool build_type12(void)
55665566 {
5567- int rad, x, y, x0, y0;
5567+ POSITION rad, x, y, x0, y0;
55685568 int light = FALSE;
55695569 bool emptyflag = TRUE;
55705570
@@ -6561,7 +6561,7 @@ static bool build_type16(void)
65616561 STORE_ALCHEMIST, STORE_MAGIC, STORE_BLACK, STORE_BOOK,
65626562 };
65636563 int n = sizeof stores / sizeof (int);
6564- int i, y, x, y1, x1, yval, xval;
6564+ POSITION i, y, x, y1, x1, yval, xval;
65656565 int town_hgt = rand_range(MIN_TOWN_HGT, MAX_TOWN_HGT);
65666566 int town_wid = rand_range(MIN_TOWN_WID, MAX_TOWN_WID);
65676567 bool prevent_bm = FALSE;
--- a/src/types.h
+++ b/src/types.h
@@ -168,29 +168,30 @@ struct artifact_type
168168 STR_OFFSET name; /*!< アーティファクト名(headerオフセット参照) / Name (offset) */
169169 STR_OFFSET text; /*!< アーティファクト解説(headerオフセット参照) / Text (offset) */
170170
171- byte tval; /*!< ベースアイテム大項目ID / Artifact type */
172- byte sval; /*!< ベースアイテム小項目ID / Artifact sub type */
171+ OBJECT_TYPE_VALUE tval; /*!< ベースアイテム大項目ID / Artifact type */
172+ OBJECT_SUBTYPE_VALUE sval; /*!< ベースアイテム小項目ID / Artifact sub type */
173173
174- s16b pval; /*!< pval修正値 / Artifact extra info */
174+ PARAMETER_VALUE pval; /*!< pval修正値 / Artifact extra info */
175175
176- s16b to_h; /*!< 命中ボーナス値 / Bonus to hit */
177- s16b to_d; /*!< ダメージボーナス値 / Bonus to damage */
178- s16b to_a; /*!< ACボーナス値 / Bonus to armor */
176+ HIT_PROB to_h; /*!< 命中ボーナス値 / Bonus to hit */
177+ HIT_POINT to_d; /*!< ダメージボーナス値 / Bonus to damage */
178+ ARMOUR_CLASS to_a; /*!< ACボーナス値 / Bonus to armor */
179179
180- s16b ac; /*!< 上書きベースAC値 / Base armor */
180+ ARMOUR_CLASS ac; /*!< 上書きベースAC値 / Base armor */
181181
182- byte dd, ds; /*!< ダイス値 / Damage when hits */
182+ DICE_NUMBER dd;
183+ DICE_SID ds; /*!< ダイス値 / Damage when hits */
183184
184- s16b weight; /*!< 重量 / Weight */
185+ WEIGHT weight; /*!< 重量 / Weight */
185186
186- s32b cost; /*!< 基本価格 / Artifact "cost" */
187+ PRICE cost; /*!< 基本価格 / Artifact "cost" */
187188
188- u32b flags[TR_FLAG_SIZE]; /*! アイテムフラグ / Artifact Flags */
189+ BIT_FLAGS flags[TR_FLAG_SIZE]; /*! アイテムフラグ / Artifact Flags */
189190
190- u32b gen_flags; /*! アイテム生成フラグ / flags for generate */
191+ BIT_FLAGS gen_flags; /*! アイテム生成フラグ / flags for generate */
191192
192- byte level; /*! 基本生成階 / Artifact level */
193- byte rarity; /*! レアリティ / Artifact rarity */
193+ DEPTH level; /*! 基本生成階 / Artifact level */
194+ RARITY rarity; /*! レアリティ / Artifact rarity */
194195
195196 byte cur_num; /*! 現在の生成数 / Number created (0 or 1) */
196197 byte max_num; /*! (未使用)最大生成数 / Unused (should be "1") */
@@ -305,25 +306,25 @@ struct monster_race
305306 byte aaf; /*!< 感知範囲(1-100スクエア) / Area affect radius (1-100) */
306307 SPEED speed; /*!< 加速(110で+0) / Speed (normally 110) */
307308
308- s32b mexp; /*!< 殺害時基本経験値 / Exp value for kill */
309+ EXP mexp; /*!< 殺害時基本経験値 / Exp value for kill */
309310
310311 s16b extra; /*!< 未使用 / Unused (for now) */
311312
312313 byte freq_spell; /*!< 魔法&特殊能力仕様頻度(1/n) / Spell frequency */
313314
314- u32b flags1; /* Flags 1 (general) */
315- u32b flags2; /* Flags 2 (abilities) */
316- u32b flags3; /* Flags 3 (race/resist) */
317- u32b flags4; /* Flags 4 (inate/breath) */
318- u32b flags7; /* Flags 7 (movement related abilities) */
319- u32b flags8; /* Flags 8 (wilderness info) */
320- u32b flags9; /* Flags 9 (drops info) */
321- u32b flagsr; /* Flags R (resistances info) */
315+ BIT_FLAGS flags1; /* Flags 1 (general) */
316+ BIT_FLAGS flags2; /* Flags 2 (abilities) */
317+ BIT_FLAGS flags3; /* Flags 3 (race/resist) */
318+ BIT_FLAGS flags4; /* Flags 4 (inate/breath) */
319+ BIT_FLAGS flags7; /* Flags 7 (movement related abilities) */
320+ BIT_FLAGS flags8; /* Flags 8 (wilderness info) */
321+ BIT_FLAGS flags9; /* Flags 9 (drops info) */
322+ BIT_FLAGS flagsr; /* Flags R (resistances info) */
322323
323- u32b a_ability_flags1; /* Activate Ability Flags 5 (normal spells) */
324- u32b a_ability_flags2; /* Activate Ability Flags 6 (special spells) */
325- u32b a_ability_flags3; /* Activate Ability Flags 7 (implementing) */
326- u32b a_ability_flags4; /* Activate Ability Flags 8 (implementing) */
324+ BIT_FLAGS a_ability_flags1; /* Activate Ability Flags 5 (normal spells) */
325+ BIT_FLAGS a_ability_flags2; /* Activate Ability Flags 6 (special spells) */
326+ BIT_FLAGS a_ability_flags3; /* Activate Ability Flags 7 (implementing) */
327+ BIT_FLAGS a_ability_flags4; /* Activate Ability Flags 8 (implementing) */
327328
328329 monster_blow blow[4]; /* Up to four blows per round */
329330 MONRACE_IDX reinforce_id[6];
@@ -336,8 +337,8 @@ struct monster_race
336337
337338 PERCENTAGE arena_ratio; /* アリーナの評価修正値(%基準 / 0=100%) / Arena */
338339
339- IDX next_r_idx;
340- u32b next_exp;
340+ MONRACE_IDX next_r_idx;
341+ EXP next_exp;
341342
342343 DEPTH level; /* Level of creature */
343344 RARITY rarity; /* Rarity of creature */
@@ -1704,13 +1705,13 @@ typedef struct
17041705 */
17051706 typedef struct
17061707 {
1707- s16b open;
1708- s16b broken;
1709- s16b closed;
1710- s16b locked[MAX_LJ_DOORS];
1711- s16b num_locked;
1712- s16b jammed[MAX_LJ_DOORS];
1713- s16b num_jammed;
1708+ FEAT_IDX open;
1709+ FEAT_IDX broken;
1710+ FEAT_IDX closed;
1711+ FEAT_IDX locked[MAX_LJ_DOORS];
1712+ FEAT_IDX num_locked;
1713+ FEAT_IDX jammed[MAX_LJ_DOORS];
1714+ FEAT_IDX num_jammed;
17141715 } door_type;
17151716
17161717
旧リポジトリブラウザで表示