OSDN Git Service

#37287 #37353 (2.2.0.89) 型の置換を継続中。 / Ongoing type replacement.
authorDeskull <desull@users.sourceforge.jp>
Wed, 11 Oct 2017 09:03:21 +0000 (18:03 +0900)
committerDeskull <desull@users.sourceforge.jp>
Wed, 11 Oct 2017 09:03:21 +0000 (18:03 +0900)
src/japanese.c
src/object1.c
src/rooms.c
src/types.h

index 8744867..a3c0cf0 100644 (file)
@@ -70,7 +70,7 @@ void sindarin_to_kana(char *kana, const char *sindarin)
 
        sprintf(kana, "%s$", sindarin);
        for (idx = 0; kana[idx]; idx++)
-               if (isupper(kana[idx])) kana[idx] = tolower(kana[idx]);
+               if (isupper(kana[idx])) kana[idx] = (char)tolower(kana[idx]);
 
        for (idx = 0; s2j_table[idx].key1 != NULL; idx++)
        {
index 2cb8599..9800f53 100644 (file)
@@ -1856,7 +1856,7 @@ void display_equip(void)
  * Also, the tag "@xn" will work as well, where "n" is a any tag-char,\n
  * and "x" is the "current" command_cmd code.\n
  */
-static bool get_tag(int *cp, char tag, int mode)
+static bool get_tag(COMMAND_CODE *cp, char tag, int mode)
 {
        int i, start, end;
        cptr s;
index 35556e7..a84f017 100644 (file)
@@ -5456,7 +5456,7 @@ static void build_elemental_vault(int x0, int y0, int xsiz, int ysiz)
  */
 static bool build_type10(void)
 {
-       int y0, x0, xsize, ysize, vtype;
+       POSITION y0, x0, xsize, ysize, vtype;
 
        /* Get size */
        /* big enough to look good, small enough to be fairly common. */
@@ -5564,7 +5564,7 @@ static bool build_type11(void)
  */
 static bool build_type12(void)
 {
-       int rad, x, y, x0, y0;
+       POSITION rad, x, y, x0, y0;
        int light = FALSE;
        bool emptyflag = TRUE;
 
@@ -6561,7 +6561,7 @@ static bool build_type16(void)
                STORE_ALCHEMIST, STORE_MAGIC, STORE_BLACK, STORE_BOOK,
        };
        int n = sizeof stores / sizeof (int);
-       int i, y, x, y1, x1, yval, xval;
+       POSITION i, y, x, y1, x1, yval, xval;
        int town_hgt = rand_range(MIN_TOWN_HGT, MAX_TOWN_HGT);
        int town_wid = rand_range(MIN_TOWN_WID, MAX_TOWN_WID);
        bool prevent_bm = FALSE;
index 6661c9b..23468d5 100644 (file)
@@ -168,29 +168,30 @@ struct artifact_type
        STR_OFFSET name;                        /*!< アーティファクト名(headerオフセット参照) / Name (offset) */
        STR_OFFSET text;                        /*!< アーティファクト解説(headerオフセット参照) / Text (offset) */
 
-       byte tval;                      /*!< ベースアイテム大項目ID / Artifact type */
-       byte sval;                      /*!< ベースアイテム小項目ID / Artifact sub type */
+       OBJECT_TYPE_VALUE tval;         /*!< ベースアイテム大項目ID / Artifact type */
+       OBJECT_SUBTYPE_VALUE sval;      /*!< ベースアイテム小項目ID / Artifact sub type */
 
-       s16b pval;                      /*!< pval修正値 / Artifact extra info */
+       PARAMETER_VALUE pval;   /*!< pval修正値 / Artifact extra info */
 
-       s16b to_h;                      /*!< 命中ボーナス値 /  Bonus to hit */
-       s16b to_d;                      /*!< ダメージボーナス値 / Bonus to damage */
-       s16b to_a;                      /*!< ACボーナス値 / Bonus to armor */
+       HIT_PROB to_h;                  /*!< 命中ボーナス値 /  Bonus to hit */
+       HIT_POINT to_d;         /*!< ダメージボーナス値 / Bonus to damage */
+       ARMOUR_CLASS to_a;                      /*!< ACボーナス値 / Bonus to armor */
 
-       s16b ac;                        /*!< 上書きベースAC値 / Base armor */
+       ARMOUR_CLASS ac;                        /*!< 上書きベースAC値 / Base armor */
 
-       byte dd, ds;            /*!< ダイス値 / Damage when hits */
+       DICE_NUMBER dd;
+       DICE_SID ds;    /*!< ダイス値 / Damage when hits */
 
-       s16b weight;            /*!< 重量 / Weight */
+       WEIGHT weight;          /*!< 重量 / Weight */
 
-       s32b cost;                      /*!< 基本価格 / Artifact "cost" */
+       PRICE cost;                     /*!< 基本価格 / Artifact "cost" */
 
-       u32b flags[TR_FLAG_SIZE];       /*! アイテムフラグ / Artifact Flags */
+       BIT_FLAGS flags[TR_FLAG_SIZE];       /*! アイテムフラグ / Artifact Flags */
 
-       u32b gen_flags;         /*! アイテム生成フラグ / flags for generate */
+       BIT_FLAGS gen_flags;            /*! アイテム生成フラグ / flags for generate */
 
-       byte level;                     /*! 基本生成階 / Artifact level */
-       byte rarity;            /*! レアリティ / Artifact rarity */
+       DEPTH level;            /*! 基本生成階 / Artifact level */
+       RARITY rarity;          /*! レアリティ / Artifact rarity */
 
        byte cur_num;           /*! 現在の生成数 / Number created (0 or 1) */
        byte max_num;           /*! (未使用)最大生成数 / Unused (should be "1") */
@@ -305,25 +306,25 @@ struct monster_race
        byte aaf;                               /*!< 感知範囲(1-100スクエア) / Area affect radius (1-100) */
        SPEED speed;                            /*!< 加速(110で+0) / Speed (normally 110) */
 
-       s32b mexp;                              /*!< 殺害時基本経験値 / Exp value for kill */
+       EXP mexp;                               /*!< 殺害時基本経験値 / Exp value for kill */
 
        s16b extra;                             /*!< 未使用 /  Unused (for now) */
 
        byte freq_spell;                /*!< 魔法&特殊能力仕様頻度(1/n) /  Spell frequency */
 
-       u32b flags1;                    /* Flags 1 (general) */
-       u32b flags2;                    /* Flags 2 (abilities) */
-       u32b flags3;                    /* Flags 3 (race/resist) */
-       u32b flags4;                    /* Flags 4 (inate/breath) */
-       u32b flags7;                    /* Flags 7 (movement related abilities) */
-       u32b flags8;                    /* Flags 8 (wilderness info) */
-       u32b flags9;                    /* Flags 9 (drops info) */
-       u32b flagsr;                    /* Flags R (resistances info) */
+       BIT_FLAGS flags1;                       /* Flags 1 (general) */
+       BIT_FLAGS flags2;                       /* Flags 2 (abilities) */
+       BIT_FLAGS flags3;                       /* Flags 3 (race/resist) */
+       BIT_FLAGS flags4;                       /* Flags 4 (inate/breath) */
+       BIT_FLAGS flags7;                       /* Flags 7 (movement related abilities) */
+       BIT_FLAGS flags8;                       /* Flags 8 (wilderness info) */
+       BIT_FLAGS flags9;                       /* Flags 9 (drops info) */
+       BIT_FLAGS flagsr;                       /* Flags R (resistances info) */
 
-       u32b a_ability_flags1;  /* Activate Ability Flags 5 (normal spells) */
-       u32b a_ability_flags2;  /* Activate Ability Flags 6 (special spells) */
-       u32b a_ability_flags3;  /* Activate Ability Flags 7 (implementing) */
-       u32b a_ability_flags4;  /* Activate Ability Flags 8 (implementing) */
+       BIT_FLAGS a_ability_flags1;     /* Activate Ability Flags 5 (normal spells) */
+       BIT_FLAGS a_ability_flags2;     /* Activate Ability Flags 6 (special spells) */
+       BIT_FLAGS a_ability_flags3;     /* Activate Ability Flags 7 (implementing) */
+       BIT_FLAGS a_ability_flags4;     /* Activate Ability Flags 8 (implementing) */
 
        monster_blow blow[4];   /* Up to four blows per round */
        MONRACE_IDX reinforce_id[6];
@@ -336,8 +337,8 @@ struct monster_race
 
        PERCENTAGE arena_ratio;         /* アリーナの評価修正値(%基準 / 0=100%) / Arena */
 
-       IDX next_r_idx;
-       u32b next_exp;
+       MONRACE_IDX next_r_idx;
+       EXP next_exp;
 
        DEPTH level;                    /* Level of creature */
        RARITY rarity;                  /* Rarity of creature */
@@ -1704,13 +1705,13 @@ typedef struct
  */
 typedef struct
 {
-       s16b open;
-       s16b broken;
-       s16b closed;
-       s16b locked[MAX_LJ_DOORS];
-       s16b num_locked;
-       s16b jammed[MAX_LJ_DOORS];
-       s16b num_jammed;
+       FEAT_IDX open;
+       FEAT_IDX broken;
+       FEAT_IDX closed;
+       FEAT_IDX locked[MAX_LJ_DOORS];
+       FEAT_IDX num_locked;
+       FEAT_IDX jammed[MAX_LJ_DOORS];
+       FEAT_IDX num_jammed;
 } door_type;