From d3b9ed29505c3449e0019b3afbc0aac72c957561 Mon Sep 17 00:00:00 2001 From: Deskull Date: Fri, 10 Nov 2017 00:35:36 +0900 Subject: [PATCH] =?utf8?q?#37287=20#37353=20(2.2.0.89)=20BLOW=5FMETHOD,=20?= =?utf8?q?BLOW=5FEFFECT=E5=9E=8B=E3=82=92=E5=AE=9A=E7=BE=A9=E3=81=97?= =?utf8?q?=E3=80=81=E5=9E=8B=E3=81=AE=E7=BD=AE=E6=8F=9B=E3=82=92=E7=B6=99?= =?utf8?q?=E7=B6=9A=E4=B8=AD=E3=80=82=20/=20Define=20BLOW=5FMETHOD,=20BLOW?= =?utf8?q?=5FEFFECT=20ongoing=20type=20replacement.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/externs.h | 4 ++-- src/h-type.h | 4 ++++ src/init1.c | 10 +++++----- src/types.h | 16 ++++++++-------- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/src/externs.h b/src/externs.h index a4b01b03e..7d86332e9 100644 --- a/src/externs.h +++ b/src/externs.h @@ -784,8 +784,8 @@ extern void do_cmd_save_screen_html_aux(char *filename, int message); extern void do_cmd_save_screen(void); extern void do_cmd_knowledge_quests_completed(FILE *fff, IDX quest_num[]); extern void do_cmd_knowledge_quests_failed(FILE *fff, IDX quest_num[]); -extern bool ang_sort_comp_quest_num(vptr u, vptr v, int a, int b); -extern void ang_sort_swap_quest_num(vptr u, vptr v, int a, int b); +extern bool ang_sort_comp_quest_num(vptr u, vptr v, QUEST_IDX a, QUEST_IDX b); +extern void ang_sort_swap_quest_num(vptr u, vptr v, QUEST_IDX a, QUEST_IDX b); extern void do_cmd_knowledge(void); extern void plural_aux(char * Name); extern void do_cmd_checkquest(void); diff --git a/src/h-type.h b/src/h-type.h index de969b582..dffdd7c83 100644 --- a/src/h-type.h +++ b/src/h-type.h @@ -195,6 +195,10 @@ typedef byte FEAT_POWER; /*!< 地形強度の型定義 */ typedef int QUANTITY; /*!< インターフェース上の指定個数 */ +typedef byte BLOW_METHOD; /*!< モンスターの打撃手段ID */ +typedef byte BLOW_EFFECT; /*!< モンスターの打撃効果ID */ + + /*** Pointers to all the basic types defined above ***/ typedef real *real_ptr; diff --git a/src/init1.c b/src/init1.c index b6df92e55..1882d273d 100644 --- a/src/init1.c +++ b/src/init1.c @@ -2234,7 +2234,7 @@ errr parse_k_info(char *buf, header *head) /* Save the values */ k_ptr->level = (DEPTH)level; - k_ptr->extra = extra; + k_ptr->extra = (BIT_FLAGS8)extra; k_ptr->weight = (WEIGHT)wgt; k_ptr->cost = (PRICE)cost; } @@ -2262,7 +2262,7 @@ errr parse_k_info(char *buf, header *head) if (t && (!s || t < s)) { int chance = atoi(t+1); - if (chance > 0) k_ptr->chance[i] = chance; + if (chance > 0) k_ptr->chance[i] = (PROB)chance; } } } @@ -2698,8 +2698,8 @@ errr parse_e_info(char *buf, header *head) &slot, &rating)) return (1); /* Save the values */ - e_ptr->slot = slot; - e_ptr->rating = rating; + e_ptr->slot = (INVENTORY_IDX)slot; + e_ptr->rating = (PRICE)rating; } /* Process 'W' for "More Info" (one line only) */ @@ -3000,7 +3000,7 @@ errr parse_r_info(char *buf, header *head) /* Save the values */ r_ptr->level = (DEPTH)lev; r_ptr->rarity = (RARITY)rar; - r_ptr->extra = pad; + r_ptr->extra = (BIT_FLAGS16)pad; r_ptr->mexp = (EXP)exp; r_ptr->next_exp = (EXP)nextexp; r_ptr->next_r_idx = (IDX)nextmon; diff --git a/src/types.h b/src/types.h index d5a0f3af0..937be5763 100644 --- a/src/types.h +++ b/src/types.h @@ -129,10 +129,10 @@ struct object_kind BIT_FLAGS gen_flags; /*!< ベースアイテムの生成特性ビット配列 / flags for generate */ DEPTH locale[4]; /*!< ベースアイテムの生成階テーブル / Allocation level(s) */ - byte chance[4]; /*!< ベースアイテムの生成確率テーブル / Allocation chance(s) */ + PROB chance[4]; /*!< ベースアイテムの生成確率テーブル / Allocation chance(s) */ DEPTH level; /*!< ベースアイテムの基本生成階 / Level */ - byte extra; /*!< その他色々のビットフラグ配列 / Something */ + BIT_FLAGS8 extra; /*!< その他色々のビットフラグ配列 / Something */ SYMBOL_COLOR d_attr; /*!< デフォルトのアイテムシンボルカラー / Default object attribute */ SYMBOL_CODE d_char; /*!< デフォルトのアイテムシンボルアルファベット / Default object character */ @@ -213,8 +213,8 @@ struct ego_item_type STR_OFFSET name; /* Name (offset) */ STR_OFFSET text; /* Text (offset) */ - byte slot; /* Standard slot value */ - byte rating; /* Rating boost */ + INVENTORY_IDX slot; /*!< 装備部位 / Standard slot value */ + PRICE rating; /*!< ベースアイテムからの価値加速 / Rating boost */ DEPTH level; /* Minimum level */ RARITY rarity; /* Object rarity */ @@ -249,8 +249,8 @@ typedef struct monster_blow monster_blow; struct monster_blow { - byte method; - byte effect; + BLOW_METHOD method; + BLOW_EFFECT effect; DICE_NUMBER d_dice; DICE_SID d_side; }; @@ -307,9 +307,9 @@ struct monster_race EXP mexp; /*!< 殺害時基本経験値 / Exp value for kill */ - s16b extra; /*!< 未使用 / Unused (for now) */ + BIT_FLAGS16 extra; /*!< 未使用 / Unused (for now) */ - byte freq_spell; /*!< 魔法&特殊能力仕様頻度(1/n) / Spell frequency */ + RARITY freq_spell; /*!< 魔法&特殊能力仕様頻度(1/n) / Spell frequency */ BIT_FLAGS flags1; /* Flags 1 (general) */ BIT_FLAGS flags2; /* Flags 2 (abilities) */ -- 2.11.0