OSDN Git Service

#37287 #37353 (2.2.0.89) 新しい型定義を全大文字化。 / New typedef change to full-large letter.
authorDeskull <desull@users.sourceforge.jp>
Sat, 23 Sep 2017 06:58:19 +0000 (15:58 +0900)
committerDeskull <desull@users.sourceforge.jp>
Sat, 23 Sep 2017 06:58:19 +0000 (15:58 +0900)
30 files changed:
src/artifact.c
src/birth.c
src/cmd1.c
src/cmd2.c
src/cmd4.c
src/do-spell.c
src/effects.c
src/externs.h
src/floors.c
src/grid.c
src/grid.h
src/h-type.h
src/init.h
src/load.c
src/melee1.c
src/melee2.c
src/mind.c
src/monster2.c
src/mspells2.c
src/mspells4.c
src/mutation.c
src/object2.c
src/spells1.c
src/spells3.c
src/store.c
src/streams.c
src/types.h
src/variable.c
src/wild.c
src/xtra2.c

index 3307894..bf028d5 100644 (file)
@@ -1092,11 +1092,11 @@ static void random_misc(object_type * o_ptr)
                case 28:
                case 29:
                {
-                       hit_prob bonus_h;
-                       hit_point bonus_d;
+                       HIT_PROB bonus_h;
+                       HIT_POINT bonus_d;
                        add_flag(o_ptr->art_flags, TR_SHOW_MODS);
-                       bonus_h = 4 + (hit_prob)(randint1(11));
-                       bonus_d = 4 + (hit_point)(randint1(11));
+                       bonus_h = 4 + (HIT_PROB)(randint1(11));
+                       bonus_d = 4 + (HIT_POINT)(randint1(11));
                        if ((o_ptr->tval != TV_SWORD) && (o_ptr->tval != TV_POLEARM) && (o_ptr->tval != TV_HAFTED) && (o_ptr->tval != TV_DIGGING) && (o_ptr->tval != TV_GLOVES) && (o_ptr->tval != TV_RING))
                        {
                                bonus_h /= 2;
@@ -3421,7 +3421,7 @@ bool activate_random_artifact(object_type *o_ptr)
 
                case ACT_ULTIMATE_RESIST:
                {
-                       time_effect v = randint1(25)+25;
+                       TIME_EFFECT v = randint1(25)+25;
                        (void)set_afraid(0);
                        (void)set_hero(v, FALSE);
                        (void)hp_player(10);
index 67f4e60..6473be9 100644 (file)
@@ -2682,7 +2682,7 @@ static void get_stats(void)
                for (i = 0; i < 2; i++)
                {
                        s32b tmp = randint0(60*60*60);
-                       base_status val;
+                       BASE_STATUS val;
 
                        /* Extract 5 + 1d3 + 1d4 + 1d5 */
                        val = 5 + 3;
@@ -2708,7 +2708,7 @@ static void get_stats(void)
                        val = 5 + 3;
                        val += tmp % 3; tmp /= 3;
                        val += tmp % 4; tmp /= 4;
-                       val += (base_status)tmp;
+                       val += (BASE_STATUS)tmp;
 
                        /* Save that value */
                        sum += val;
@@ -2751,7 +2751,7 @@ void get_max_stats(void)
        /* Acquire the stats */
        for (i = 0; i < 6; i++)
        {
-               base_status max_max = 18 + 60 + dice[i]*10;
+               BASE_STATUS max_max = 18 + 60 + dice[i]*10;
 
                /* Save that value */
                p_ptr->stat_max_max[i] = max_max;
index fe3ff77..f87f653 100644 (file)
@@ -253,7 +253,7 @@ bool test_hit_norm(int chance, int ac, int vis)
  * @param dam 現在算出中のダメージ値
  * @return クリティカル修正が入ったダメージ値
  */
-hit_point critical_shot(int weight, int plus_ammo, int plus_bow, hit_point dam)
+HIT_POINT critical_shot(int weight, int plus_ammo, int plus_bow, HIT_POINT dam)
 {
        int i, k;
        object_type *j_ptr =  &inventory[INVEN_BOW];
@@ -311,7 +311,7 @@ hit_point critical_shot(int weight, int plus_ammo, int plus_bow, hit_point dam)
  * @param mode オプションフラグ
  * @return クリティカル修正が入ったダメージ値
  */
-hit_point critical_norm(int weight, int plus, hit_point dam, s16b meichuu, int mode)
+HIT_POINT critical_norm(int weight, int plus, HIT_POINT dam, s16b meichuu, int mode)
 {
        int i, k;
        
@@ -1214,7 +1214,7 @@ static void hit_trap(bool break_trap)
                        hit_trap_set_abnormal_status(
                                _("黒いガスに包み込まれた!", "A black gas surrounds you!"),
                                p_ptr->resist_blind,
-                               set_blind, p_ptr->blind + (time_effect)randint0(50) + 25);
+                               set_blind, p_ptr->blind + (TIME_EFFECT)randint0(50) + 25);
                        break;
                }
 
@@ -1223,7 +1223,7 @@ static void hit_trap(bool break_trap)
                        hit_trap_set_abnormal_status(
                                _("きらめくガスに包み込まれた!", "A gas of scintillating colors surrounds you!"),
                                p_ptr->resist_conf,
-                               set_confused, p_ptr->confused + (time_effect)randint0(20) + 10);
+                               set_confused, p_ptr->confused + (TIME_EFFECT)randint0(20) + 10);
                        break;
                }
 
@@ -1232,7 +1232,7 @@ static void hit_trap(bool break_trap)
                        hit_trap_set_abnormal_status(
                                _("刺激的な緑色のガスに包み込まれた!", "A pungent green gas surrounds you!"),
                                p_ptr->resist_pois || IS_OPPOSE_POIS(),
-                               set_poisoned, p_ptr->poisoned + (time_effect)randint0(20) + 10);
+                               set_poisoned, p_ptr->poisoned + (TIME_EFFECT)randint0(20) + 10);
                        break;
                }
 
@@ -1419,7 +1419,7 @@ static void touch_zap_player(monster_type *m_ptr)
  */
 static void natural_attack(s16b m_idx, int attack, bool *fear, bool *mdeath)
 {
-       hit_point k;
+       HIT_POINT k;
        int bonus, chance;
        int             n_weight = 0;
        monster_type    *m_ptr = &m_list[m_idx];
@@ -1562,7 +1562,7 @@ static void natural_attack(s16b m_idx, int attack, bool *fear, bool *mdeath)
 static void py_attack_aux(int y, int x, bool *fear, bool *mdeath, s16b hand, int mode)
 {
        int             num = 0, bonus, chance, vir;
-       hit_point k;
+       HIT_POINT k;
 
        cave_type       *c_ptr = &cave[y][x];
 
@@ -1653,7 +1653,7 @@ static void py_attack_aux(int y, int x, bool *fear, bool *mdeath, s16b hand, int
                        int now_exp = p_ptr->weapon_exp[tval][sval];
                        if (now_exp < s_info[p_ptr->pclass].w_max[tval][sval])
                        {
-                               sub_exp amount = 0;
+                               SUB_EXP amount = 0;
                                if (now_exp < WEAPON_EXP_BEGINNER) amount = 80;
                                else if (now_exp < WEAPON_EXP_SKILLED) amount = 10;
                                else if ((now_exp < WEAPON_EXP_EXPERT) && (p_ptr->lev > 19)) amount = 1;
@@ -1984,7 +1984,7 @@ static void py_attack_aux(int y, int x, bool *fear, bool *mdeath, s16b hand, int
                                                mult++;
                                        }
 
-                                       k *= (hit_point)mult;
+                                       k *= (HIT_POINT)mult;
 
                                        /* Ouch! */
                                        if (((r_ptr->flagsr & RFR_RES_ALL) ? k/100 : k) > m_ptr->hp)
@@ -2148,8 +2148,8 @@ static void py_attack_aux(int y, int x, bool *fear, bool *mdeath, s16b hand, int
                                {
                                        if (is_human)
                                        {
-                                               hit_prob to_h = o_ptr->to_h;
-                                               hit_point to_d = o_ptr->to_d;
+                                               HIT_PROB to_h = o_ptr->to_h;
+                                               HIT_POINT to_d = o_ptr->to_d;
                                                int i, flag;
 
                                                flag = 1;
@@ -2402,7 +2402,7 @@ static void py_attack_aux(int y, int x, bool *fear, bool *mdeath, s16b hand, int
                                                p_ptr->redraw |= (PR_MANA);
                                                mult = mult * 3 / 2 + 20;
                                        }
-                                       k *= (hit_point)mult;
+                                       k *= (HIT_POINT)mult;
                                        k /= 10;
                                }
 
@@ -2417,7 +2417,7 @@ static void py_attack_aux(int y, int x, bool *fear, bool *mdeath, s16b hand, int
                                                mult++;
                                        }
 
-                                       k *= (hit_point)mult;
+                                       k *= (HIT_POINT)mult;
                                }
                                k += (p_ptr->to_d[hand] + o_ptr->to_d);
                                if (k < 0) k = 0;
@@ -2823,18 +2823,18 @@ bool player_can_enter(s16b feature, u16b mode)
  * @param mpe_mode 移動オプションフラグ
  * @return プレイヤーが死亡やフロア離脱を行わず、実際に移動が可能ならばTRUEを返す。
  */
-bool move_player_effect(position ny, position nx, u32b mpe_mode)
+bool move_player_effect(POSITION ny, POSITION nx, u32b mpe_mode)
 {
        cave_type *c_ptr = &cave[ny][nx];
        feature_type *f_ptr = &f_info[c_ptr->feat];
 
        if (!(mpe_mode & MPE_STAYING))
        {
-               position oy = p_ptr->y;
-               position ox = p_ptr->x;
+               POSITION oy = p_ptr->y;
+               POSITION ox = p_ptr->x;
                cave_type *oc_ptr = &cave[oy][ox];
-               idx om_idx = oc_ptr->m_idx;
-               idx nm_idx = c_ptr->m_idx;
+               IDX om_idx = oc_ptr->m_idx;
+               IDX nm_idx = c_ptr->m_idx;
 
                /* Move the player */
                p_ptr->y = ny;
@@ -3107,11 +3107,11 @@ bool trap_can_be_ignored(int feat)
  * any monster which might be in the destination grid.  Previously,\n
  * moving into walls was "free" and did NOT hit invisible monsters.\n
  */
-void move_player(direction dir, bool do_pickup, bool break_trap)
+void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
 {
        /* Find the result of moving */
-       position y = p_ptr->y + ddy[dir];
-       position x = p_ptr->x + ddx[dir];
+       POSITION y = p_ptr->y + ddy[dir];
+       POSITION x = p_ptr->x + ddx[dir];
 
        /* Examine the destination */
        cave_type *c_ptr = &cave[y][x];
@@ -3633,12 +3633,12 @@ static byte chome[] =
 /*
  * The direction we are running
  */
-static direction find_current;
+static DIRECTION find_current;
 
 /*
  * The direction we came from
  */
-static direction find_prevdir;
+static DIRECTION find_prevdir;
 
 /*
  * We are looking for open area
index c946252..41b46a0 100644 (file)
@@ -891,7 +891,7 @@ static bool is_open(int feat)
  * @details Return the number of features around (or under) the character.
  * Usually look for doors and floor traps.
  */
-static int count_dt(position *y, position *x, bool (*test)(int feat), bool under)
+static int count_dt(POSITION *y, POSITION *x, bool (*test)(int feat), bool under)
 {
        int d, count, xx, yy;
 
@@ -995,7 +995,7 @@ static int count_chests(int *y, int *x, bool trapped)
  * @param x 方角を確認したX座標
  * @return 方向ID
  */
-static direction coords_to_dir(position y, position x)
+static DIRECTION coords_to_dir(POSITION y, POSITION x)
 {
        int d[3][3] = { {7, 4, 1}, {8, 5, 2}, {9, 6, 3} };
        int dy, dx;
@@ -1119,9 +1119,9 @@ static bool do_cmd_open_aux(int y, int x)
  */
 void do_cmd_open(void)
 {
-       position y, x;
-       direction dir;
-       idx o_idx;
+       POSITION y, x;
+       DIRECTION dir;
+       IDX o_idx;
 
        bool more = FALSE;
 
@@ -1295,8 +1295,8 @@ static bool do_cmd_close_aux(int y, int x)
  */
 void do_cmd_close(void)
 {
-       position y, x;
-       direction dir;
+       POSITION y, x;
+       DIRECTION dir;
 
        bool more = FALSE;
 
@@ -1957,8 +1957,8 @@ static bool do_cmd_disarm_aux(int y, int x, int dir)
  */
 void do_cmd_disarm(void)
 {
-       position y, x;
-       direction dir;
+       POSITION y, x;
+       DIRECTION dir;
        s16b o_idx;
 
        bool more = FALSE;
index 4411108..40c9ab4 100644 (file)
@@ -383,7 +383,7 @@ errr do_cmd_write_nikki(int type, int num, cptr note)
            type == NIKKI_RAND_QUEST_F ||
            type == NIKKI_TO_QUEST)
        {
-               idx old_quest;
+               IDX old_quest;
 
                old_quest = p_ptr->inside_quest;
                p_ptr->inside_quest = (quest[num].type == QUEST_TYPE_RANDOM) ? 0 : num;
@@ -2496,11 +2496,10 @@ static errr macro_dump(cptr fname)
  */
 static void do_cmd_macro_aux(char *buf)
 {
-       int i, n = 0;
-
+       char i;
+       int n = 0;
        char tmp[1024];
 
-
        /* Flush */
        flush();
 
index 8b439e8..ef7345a 100644 (file)
@@ -1547,13 +1547,13 @@ static cptr do_life_spell(int spell, int mode)
                if (desc) return _("一定時間、あらゆる耐性を付け、ACと魔法防御能力を上昇させる。", "Gives ultimate resistance, bonus to AC and speed.");
     
                {
-                       time_effect base = (time_effect)plev / 2;
+                       TIME_EFFECT base = (TIME_EFFECT)plev / 2;
 
                        if (info) return info_duration(base, base);
 
                        if (cast)
                        {
-                               time_effect v = randint1(base) + base;
+                               TIME_EFFECT v = randint1(base) + base;
                                set_fast(v, FALSE);
                                set_oppose_acid(v, FALSE);
                                set_oppose_elec(v, FALSE);
@@ -6097,13 +6097,13 @@ static cptr do_daemon_spell(int spell, int mode)
                        "Removes fear. Gives resistance to fire and cold, and aura of fire. These resistances can be added to which from equipment for more powerful resistances.");
     
                {
-                       time_effect base = 20;
+                       TIME_EFFECT base = 20;
 
                        if (info) return info_duration(base, base);
 
                        if (cast)
                        {
-                               time_effect dur = randint1(base) + base;
+                               TIME_EFFECT dur = randint1(base) + base;
                                        
                                set_oppose_fire(dur, FALSE);
                                set_oppose_cold(dur, FALSE);
index f6e70c5..b860796 100644 (file)
@@ -297,7 +297,7 @@ void dispel_player(void)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_mimic(time_effect v, int p, bool do_dec)
+bool set_mimic(TIME_EFFECT v, int p, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -366,7 +366,7 @@ bool set_mimic(time_effect v, int p, bool do_dec)
  * Note that blindness is currently the only thing which can affect\n
  * "player_can_see_bold()".\n
  */
-bool set_blind(time_effect v)
+bool set_blind(TIME_EFFECT v)
 {
        bool notice = FALSE;
 
@@ -446,7 +446,7 @@ bool set_blind(time_effect v)
  * @param v 継続時間
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_confused(time_effect v)
+bool set_confused(TIME_EFFECT v)
 {
        bool notice = FALSE;
 
@@ -537,7 +537,7 @@ bool set_confused(time_effect v)
  * @param v 継続時間
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_poisoned(time_effect v)
+bool set_poisoned(TIME_EFFECT v)
 {
        bool notice = FALSE;
 
@@ -591,7 +591,7 @@ bool set_poisoned(time_effect v)
  * @param v 継続時間
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_afraid(time_effect v)
+bool set_afraid(TIME_EFFECT v)
 {
        bool notice = FALSE;
 
@@ -658,7 +658,7 @@ bool set_afraid(time_effect v)
  * @param v 継続時間
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_paralyzed(time_effect v)
+bool set_paralyzed(TIME_EFFECT v)
 {
        bool notice = FALSE;
 
@@ -722,7 +722,7 @@ bool set_paralyzed(time_effect v)
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  * @details Note that we must redraw the map when hallucination changes.
  */
-bool set_image(time_effect v)
+bool set_image(TIME_EFFECT v)
 {
        bool notice = FALSE;
 
@@ -795,7 +795,7 @@ bool set_image(time_effect v)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_fast(time_effect v, bool do_dec)
+bool set_fast(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -855,7 +855,7 @@ bool set_fast(time_effect v, bool do_dec)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_lightspeed(time_effect v, bool do_dec)
+bool set_lightspeed(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -917,7 +917,7 @@ bool set_lightspeed(time_effect v, bool do_dec)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_slow(time_effect v, bool do_dec)
+bool set_slow(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -976,7 +976,7 @@ bool set_slow(time_effect v, bool do_dec)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_shield(time_effect v, bool do_dec)
+bool set_shield(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -1038,7 +1038,7 @@ bool set_shield(time_effect v, bool do_dec)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_tsubureru(time_effect v, bool do_dec)
+bool set_tsubureru(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -1100,7 +1100,7 @@ bool set_tsubureru(time_effect v, bool do_dec)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_magicdef(time_effect v, bool do_dec)
+bool set_magicdef(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -1161,7 +1161,7 @@ bool set_magicdef(time_effect v, bool do_dec)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_blessed(time_effect v, bool do_dec)
+bool set_blessed(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -1223,7 +1223,7 @@ bool set_blessed(time_effect v, bool do_dec)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_hero(time_effect v, bool do_dec)
+bool set_hero(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -1287,7 +1287,7 @@ bool set_hero(time_effect v, bool do_dec)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_shero(time_effect v, bool do_dec)
+bool set_shero(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -1352,7 +1352,7 @@ bool set_shero(time_effect v, bool do_dec)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_protevil(time_effect v, bool do_dec)
+bool set_protevil(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -1410,7 +1410,7 @@ bool set_protevil(time_effect v, bool do_dec)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_wraith_form(time_effect v, bool do_dec)
+bool set_wraith_form(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -1494,7 +1494,7 @@ bool set_wraith_form(time_effect v, bool do_dec)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_invuln(time_effect v, bool do_dec)
+bool set_invuln(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -1580,7 +1580,7 @@ bool set_invuln(time_effect v, bool do_dec)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_tim_esp(time_effect v, bool do_dec)
+bool set_tim_esp(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -1644,7 +1644,7 @@ bool set_tim_esp(time_effect v, bool do_dec)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_tim_invis(time_effect v, bool do_dec)
+bool set_tim_invis(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -1708,7 +1708,7 @@ bool set_tim_invis(time_effect v, bool do_dec)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_tim_infra(time_effect v, bool do_dec)
+bool set_tim_infra(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -1772,7 +1772,7 @@ bool set_tim_infra(time_effect v, bool do_dec)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_tim_regen(time_effect v, bool do_dec)
+bool set_tim_regen(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -1833,7 +1833,7 @@ bool set_tim_regen(time_effect v, bool do_dec)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_tim_stealth(time_effect v, bool do_dec)
+bool set_tim_stealth(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -1954,7 +1954,7 @@ bool set_superstealth(bool set)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_tim_levitation(time_effect v, bool do_dec)
+bool set_tim_levitation(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -2015,7 +2015,7 @@ bool set_tim_levitation(time_effect v, bool do_dec)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_tim_sh_touki(time_effect v, bool do_dec)
+bool set_tim_sh_touki(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -2073,7 +2073,7 @@ bool set_tim_sh_touki(time_effect v, bool do_dec)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_tim_sh_fire(time_effect v, bool do_dec)
+bool set_tim_sh_fire(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -2134,7 +2134,7 @@ bool set_tim_sh_fire(time_effect v, bool do_dec)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_tim_sh_holy(time_effect v, bool do_dec)
+bool set_tim_sh_holy(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -2195,7 +2195,7 @@ bool set_tim_sh_holy(time_effect v, bool do_dec)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_tim_eyeeye(time_effect v, bool do_dec)
+bool set_tim_eyeeye(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -2257,7 +2257,7 @@ bool set_tim_eyeeye(time_effect v, bool do_dec)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_resist_magic(time_effect v, bool do_dec)
+bool set_resist_magic(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -2318,7 +2318,7 @@ bool set_resist_magic(time_effect v, bool do_dec)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_tim_reflect(time_effect v, bool do_dec)
+bool set_tim_reflect(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -2377,7 +2377,7 @@ bool set_tim_reflect(time_effect v, bool do_dec)
 /*
  * Set "p_ptr->multishadow", notice observable changes
  */
-bool set_multishadow(time_effect v, bool do_dec)
+bool set_multishadow(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -2438,7 +2438,7 @@ bool set_multishadow(time_effect v, bool do_dec)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_dustrobe(time_effect v, bool do_dec)
+bool set_dustrobe(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -2499,7 +2499,7 @@ bool set_dustrobe(time_effect v, bool do_dec)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_kabenuke(time_effect v, bool do_dec)
+bool set_kabenuke(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -2560,7 +2560,7 @@ bool set_kabenuke(time_effect v, bool do_dec)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_tsuyoshi(time_effect v, bool do_dec)
+bool set_tsuyoshi(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -2630,7 +2630,7 @@ bool set_tsuyoshi(time_effect v, bool do_dec)
  * @param v 継続時間
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_ele_attack(u32b attack_type, time_effect v)
+bool set_ele_attack(u32b attack_type, TIME_EFFECT v)
 {
        /* Hack -- Force good values */
        v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -2710,7 +2710,7 @@ bool set_ele_attack(u32b attack_type, time_effect v)
  * @param v 継続時間
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_ele_immune(u32b immune_type, time_effect v)
+bool set_ele_immune(u32b immune_type, TIME_EFFECT v)
 {
        /* Hack -- Force good values */
        v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
@@ -2790,7 +2790,7 @@ bool set_ele_immune(u32b immune_type, time_effect v)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_oppose_acid(time_effect v, bool do_dec)
+bool set_oppose_acid(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -2848,7 +2848,7 @@ bool set_oppose_acid(time_effect v, bool do_dec)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_oppose_elec(time_effect v, bool do_dec)
+bool set_oppose_elec(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -2906,7 +2906,7 @@ bool set_oppose_elec(time_effect v, bool do_dec)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_oppose_fire(time_effect v, bool do_dec)
+bool set_oppose_fire(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -2965,7 +2965,7 @@ bool set_oppose_fire(time_effect v, bool do_dec)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_oppose_cold(time_effect v, bool do_dec)
+bool set_oppose_cold(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -3023,7 +3023,7 @@ bool set_oppose_cold(time_effect v, bool do_dec)
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_oppose_pois(time_effect v, bool do_dec)
+bool set_oppose_pois(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -3083,7 +3083,7 @@ bool set_oppose_pois(time_effect v, bool do_dec)
  * @details
  * Note the special code to only notice "range" changes.
  */
-bool set_stun(time_effect v)
+bool set_stun(TIME_EFFECT v)
 {
        int old_aux, new_aux;
        bool notice = FALSE;
@@ -3247,7 +3247,7 @@ bool set_stun(time_effect v)
  * @details
  * Note the special code to only notice "range" changes.
  */
-bool set_cut(time_effect v)
+bool set_cut(TIME_EFFECT v)
 {
        int old_aux, new_aux;
        bool notice = FALSE;
@@ -3467,7 +3467,7 @@ bool set_cut(time_effect v)
  * game turns, or 500/(100/5) = 25 player turns (if nothing else is
  * affecting the player speed).\n
  */
-bool set_food(time_effect v)
+bool set_food(TIME_EFFECT v)
 {
        int old_aux, new_aux;
 
@@ -3652,7 +3652,7 @@ bool set_food(time_effect v)
  */
 bool inc_stat(int stat)
 {
-       base_status value, gain;
+       BASE_STATUS value, gain;
 
        /* Then augment the current/max stat */
        value = p_ptr->stat_cur[stat];
@@ -4922,7 +4922,7 @@ bool drain_exp(s32b drain, s32b slip, int hold_exp_prob)
 }
 
 
-bool set_ultimate_res(time_effect v, bool do_dec)
+bool set_ultimate_res(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -4977,7 +4977,7 @@ bool set_ultimate_res(time_effect v, bool do_dec)
        return (TRUE);
 }
 
-bool set_tim_res_nether(time_effect v, bool do_dec)
+bool set_tim_res_nether(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -5032,7 +5032,7 @@ bool set_tim_res_nether(time_effect v, bool do_dec)
        return (TRUE);
 }
 
-bool set_tim_res_time(time_effect v, bool do_dec)
+bool set_tim_res_time(TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
 
@@ -5163,7 +5163,7 @@ bool choose_ele_attack(void)
 /*
  * Choose a elemental immune. -LM-
  */
-bool choose_ele_immune(time_effect immune_turn)
+bool choose_ele_immune(TIME_EFFECT immune_turn)
 {
        char choice;
 
index 4a5890b..7b5becc 100644 (file)
@@ -396,9 +396,9 @@ extern bool closing_flag;
 extern s16b panel_row_min, panel_row_max;
 extern s16b panel_col_min, panel_col_max;
 extern s16b panel_col_prt, panel_row_prt;
-extern idx target_who;
-extern position target_col;
-extern position target_row;
+extern IDX target_who;
+extern POSITION target_col;
+extern POSITION target_row;
 extern int player_uid;
 extern int player_euid;
 extern int player_egid;
@@ -698,8 +698,8 @@ extern void glow_deep_lava_and_bldg(void);
 /* cmd1.c */
 extern bool test_hit_fire(int chance, monster_type *m_ptr, int vis, char* o_name);
 extern bool test_hit_norm(int chance, int ac, int vis);
-extern hit_point critical_shot(int weight, int plus_ammo, int plus_bow, hit_point dam);
-extern hit_point critical_norm(int weight, int plus, hit_point dam, s16b meichuu, int mode);
+extern HIT_POINT critical_shot(int weight, int plus_ammo, int plus_bow, HIT_POINT dam);
+extern HIT_POINT critical_norm(int weight, int plus, HIT_POINT dam, s16b meichuu, int mode);
 extern s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr, int mode, bool thrown);
 extern void search(void);
 extern void py_pickup_aux(int o_idx);
@@ -707,9 +707,9 @@ extern void carry(bool pickup);
 extern bool py_attack(int y, int x, int mode);
 extern bool pattern_seq(int c_y, int c_x, int n_y, int n_x);
 extern bool player_can_enter(s16b feature, u16b mode);
-extern bool move_player_effect(position ny, position nx, u32b mpe_mode);
+extern bool move_player_effect(POSITION ny, POSITION nx, u32b mpe_mode);
 extern bool trap_can_be_ignored(int feat);
-extern void move_player(direction dir, bool do_pickup, bool break_trap);
+extern void move_player(DIRECTION dir, bool do_pickup, bool break_trap);
 extern void run_step(int dir);
 #ifdef TRAVEL
 extern void travel_step(void);
@@ -920,7 +920,7 @@ extern bool load_floor(saved_floor_type *sf_ptr, u32b mode);
 
 /* melee1.c */
 /* melee2.c */
-extern bool make_attack_normal(idx m_idx);
+extern bool make_attack_normal(IDX m_idx);
 extern void process_monsters(void);
 extern int get_mproc_idx(int m_idx, int mproc_type);
 extern void mproc_init(void);
@@ -1047,7 +1047,7 @@ extern void apply_magic(object_type *o_ptr, int lev, u32b mode);
 extern bool make_object(object_type *j_ptr, u32b mode);
 extern void place_object(int y, int x, u32b mode);
 extern bool make_gold(object_type *j_ptr);
-extern void place_gold(position y, position x);
+extern void place_gold(POSITION y, POSITION x);
 extern s16b drop_near(object_type *o_ptr, int chance, int y, int x);
 extern void acquirement(int y1, int x1, int num, bool great, bool special, bool known);
 extern void amusement(int y1, int x1, int num, bool known);
@@ -1213,13 +1213,13 @@ extern bool rush_attack(bool *mdeath);
 extern void remove_all_mirrors(bool explode);
 
 /* spells3.c */
-extern bool teleport_away(idx m_idx, int dis, u32b mode);
+extern bool teleport_away(IDX m_idx, int dis, u32b mode);
 extern void teleport_monster_to(int m_idx, int ty, int tx, int power, u32b mode);
 extern bool cave_player_teleportable_bold(int y, int x, u32b mode);
 extern bool teleport_player_aux(int dis, u32b mode);
 extern void teleport_player(int dis, u32b mode);
 extern void teleport_player_away(int m_idx, int dis);
-extern void teleport_player_to(position ny, position nx, u32b mode);
+extern void teleport_player_to(POSITION ny, POSITION nx, u32b mode);
 extern void teleport_away_followable(int m_idx);
 extern void teleport_level(int m_idx);
 extern int choose_dungeon(cptr note, int y, int x);
@@ -1415,49 +1415,49 @@ extern void update_playtime(void);
 extern void set_action(int typ);
 extern void reset_tim_flags(void);
 extern void dispel_player(void);
-extern bool set_mimic(time_effect v, int p, bool do_dec);
-extern bool set_blind(time_effect v);
-extern bool set_confused(time_effect v);
-extern bool set_poisoned(time_effect v);
-extern bool set_afraid(time_effect v);
-extern bool set_paralyzed(time_effect v);
-extern bool set_image(time_effect v);
-extern bool set_fast(time_effect v, bool do_dec);
-extern bool set_slow(time_effect v, bool do_dec);
-extern bool set_shield(time_effect v, bool do_dec);
-extern bool set_tsubureru(time_effect v, bool do_dec);
-extern bool set_magicdef(time_effect v, bool do_dec);
-extern bool set_blessed(time_effect v, bool do_dec);
-extern bool set_hero(time_effect v, bool do_dec);
-extern bool set_shero(time_effect v, bool do_dec);
-extern bool set_protevil(time_effect v, bool do_dec);
-extern bool set_invuln(time_effect v, bool do_dec);
-extern bool set_tim_invis(time_effect v, bool do_dec);
-extern bool set_tim_infra(time_effect v, bool do_dec);
-extern bool set_tim_regen(time_effect v, bool do_dec);
-extern bool set_tim_stealth(time_effect v, bool do_dec);
-extern bool set_lightspeed(time_effect v, bool do_dec);
-extern bool set_tim_levitation(time_effect v, bool do_dec);
-extern bool set_tim_sh_touki(time_effect v, bool do_dec);
-extern bool set_tim_sh_fire(time_effect v, bool do_dec);
-extern bool set_tim_sh_holy(time_effect v, bool do_dec);
-extern bool set_tim_eyeeye(time_effect v, bool do_dec);
-extern bool set_resist_magic(time_effect v, bool do_dec);
-extern bool set_tim_reflect(time_effect v, bool do_dec);
-extern bool set_multishadow(time_effect v, bool do_dec);
-extern bool set_dustrobe(time_effect v, bool do_dec);
-extern bool set_kabenuke(time_effect v, bool do_dec);
-extern bool set_tsuyoshi(time_effect v, bool do_dec);
-extern bool set_ele_attack(u32b attack_type, time_effect v);
-extern bool set_ele_immune(u32b immune_type, time_effect v);
-extern bool set_oppose_acid(time_effect v, bool do_dec);
-extern bool set_oppose_elec(time_effect v, bool do_dec);
-extern bool set_oppose_fire(time_effect v, bool do_dec);
-extern bool set_oppose_cold(time_effect v, bool do_dec);
-extern bool set_oppose_pois(time_effect v, bool do_dec);
-extern bool set_stun(time_effect v);
-extern bool set_cut(time_effect v);
-extern bool set_food(time_effect v);
+extern bool set_mimic(TIME_EFFECT v, int p, bool do_dec);
+extern bool set_blind(TIME_EFFECT v);
+extern bool set_confused(TIME_EFFECT v);
+extern bool set_poisoned(TIME_EFFECT v);
+extern bool set_afraid(TIME_EFFECT v);
+extern bool set_paralyzed(TIME_EFFECT v);
+extern bool set_image(TIME_EFFECT v);
+extern bool set_fast(TIME_EFFECT v, bool do_dec);
+extern bool set_slow(TIME_EFFECT v, bool do_dec);
+extern bool set_shield(TIME_EFFECT v, bool do_dec);
+extern bool set_tsubureru(TIME_EFFECT v, bool do_dec);
+extern bool set_magicdef(TIME_EFFECT v, bool do_dec);
+extern bool set_blessed(TIME_EFFECT v, bool do_dec);
+extern bool set_hero(TIME_EFFECT v, bool do_dec);
+extern bool set_shero(TIME_EFFECT v, bool do_dec);
+extern bool set_protevil(TIME_EFFECT v, bool do_dec);
+extern bool set_invuln(TIME_EFFECT v, bool do_dec);
+extern bool set_tim_invis(TIME_EFFECT v, bool do_dec);
+extern bool set_tim_infra(TIME_EFFECT v, bool do_dec);
+extern bool set_tim_regen(TIME_EFFECT v, bool do_dec);
+extern bool set_tim_stealth(TIME_EFFECT v, bool do_dec);
+extern bool set_lightspeed(TIME_EFFECT v, bool do_dec);
+extern bool set_tim_levitation(TIME_EFFECT v, bool do_dec);
+extern bool set_tim_sh_touki(TIME_EFFECT v, bool do_dec);
+extern bool set_tim_sh_fire(TIME_EFFECT v, bool do_dec);
+extern bool set_tim_sh_holy(TIME_EFFECT v, bool do_dec);
+extern bool set_tim_eyeeye(TIME_EFFECT v, bool do_dec);
+extern bool set_resist_magic(TIME_EFFECT v, bool do_dec);
+extern bool set_tim_reflect(TIME_EFFECT v, bool do_dec);
+extern bool set_multishadow(TIME_EFFECT v, bool do_dec);
+extern bool set_dustrobe(TIME_EFFECT v, bool do_dec);
+extern bool set_kabenuke(TIME_EFFECT v, bool do_dec);
+extern bool set_tsuyoshi(TIME_EFFECT v, bool do_dec);
+extern bool set_ele_attack(u32b attack_type, TIME_EFFECT v);
+extern bool set_ele_immune(u32b immune_type, TIME_EFFECT v);
+extern bool set_oppose_acid(TIME_EFFECT v, bool do_dec);
+extern bool set_oppose_elec(TIME_EFFECT v, bool do_dec);
+extern bool set_oppose_fire(TIME_EFFECT v, bool do_dec);
+extern bool set_oppose_cold(TIME_EFFECT v, bool do_dec);
+extern bool set_oppose_pois(TIME_EFFECT v, bool do_dec);
+extern bool set_stun(TIME_EFFECT v);
+extern bool set_cut(TIME_EFFECT v);
+extern bool set_food(TIME_EFFECT v);
 extern bool inc_stat(int stat);
 extern bool dec_stat(int stat, int amount, int permanent);
 extern bool res_stat(int stat);
@@ -1473,13 +1473,13 @@ extern void calc_android_exp(void);
 extern void lose_exp(s32b amount);
 extern bool drain_exp(s32b drain, s32b slip, int hold_exp_prob);
 extern void do_poly_self(void);
-extern bool set_ultimate_res(time_effect v, bool do_dec);
-extern bool set_tim_res_nether(time_effect v, bool do_dec);
-extern bool set_tim_res_time(time_effect v, bool do_dec);
+extern bool set_ultimate_res(TIME_EFFECT v, bool do_dec);
+extern bool set_tim_res_nether(TIME_EFFECT v, bool do_dec);
+extern bool set_tim_res_time(TIME_EFFECT v, bool do_dec);
 extern bool choose_ele_attack(void);
-extern bool choose_ele_immune(time_effect turn);
-extern bool set_wraith_form(time_effect v, bool do_dec);
-extern bool set_tim_esp(time_effect v, bool do_dec);
+extern bool choose_ele_immune(TIME_EFFECT turn);
+extern bool set_wraith_form(TIME_EFFECT v, bool do_dec);
+extern bool set_tim_esp(TIME_EFFECT v, bool do_dec);
 extern bool set_superstealth(bool set);
 
 /* xtra2.c */
@@ -1511,7 +1511,7 @@ extern void gain_level_reward(int chosen_reward);
 extern bool tgt_pt (int *x, int *y);
 extern void do_poly_wounds(void);
 extern void change_race(int new_race, cptr effect_msg);
-extern hit_point mon_damage_mod(monster_type *m_ptr, hit_point dam, bool is_psy_spear);
+extern HIT_POINT mon_damage_mod(monster_type *m_ptr, HIT_POINT dam, bool is_psy_spear);
 extern s16b gain_energy(void);
 extern s16b bow_energy(int sval);
 extern int bow_tmul(int sval);
@@ -1583,7 +1583,7 @@ extern void breath(int y, int x, int m_idx, int typ, int dam_hp, int rad, bool b
 
 /* mspells2.c */
 extern void get_project_point(int sy, int sx, int *ty, int *tx, int flg);
-extern bool monst_spell_monst(idx m_idx);
+extern bool monst_spell_monst(IDX m_idx);
 
 /* mspells3.c */
 extern bool do_cmd_cast_learned(void);
index 11ba5db..08553c7 100644 (file)
@@ -523,8 +523,8 @@ static void place_pet(void)
 
        for (i = 0; i < max_num; i++)
        {
-               position cy = 0, cx = 0;
-               idx m_idx;
+               POSITION cy = 0, cx = 0;
+               IDX m_idx;
 
                if (!(party_mon[i].r_idx)) continue;
 
index 167062d..93cb610 100644 (file)
@@ -23,7 +23,7 @@
  */
 bool new_player_spot(void)
 {
-       position y = 0, x = 0;
+       POSITION y = 0, x = 0;
        int max_attempts = 10000;
 
        cave_type *c_ptr;
@@ -33,8 +33,8 @@ bool new_player_spot(void)
        while (max_attempts--)
        {
                /* Pick a legal spot */
-               y = (position)rand_range(1, cur_hgt - 2);
-               x = (position)rand_range(1, cur_wid - 2);
+               y = (POSITION)rand_range(1, cur_hgt - 2);
+               x = (POSITION)rand_range(1, cur_wid - 2);
 
                c_ptr = &cave[y][x];
 
@@ -630,7 +630,7 @@ void set_floor(int x, int y)
  *   solid -- solid room walls\n
  * TODO: tmp_row/tmp_col をposition型に後から直す。
  */
-bool build_tunnel(position row1, position col1, position row2, position col2)
+bool build_tunnel(POSITION row1, POSITION col1, POSITION row2, POSITION col2)
 {
        int y, x;
        int tmp_row, tmp_col;
@@ -709,8 +709,8 @@ bool build_tunnel(position row1, position col1, position row2, position col2)
                        if (is_solid_bold(y, x)) continue;
 
                        /* Accept this location */
-                       row1 = (position)tmp_row;
-                       col1 = (position)tmp_col;
+                       row1 = (POSITION)tmp_row;
+                       col1 = (POSITION)tmp_col;
 
                        /* Save the wall location */
                        if (dun->wall_n < WALL_MAX)
@@ -740,16 +740,16 @@ bool build_tunnel(position row1, position col1, position row2, position col2)
                else if (c_ptr->info & (CAVE_ROOM))
                {
                        /* Accept the location */
-                       row1 = (position)tmp_row;
-                       col1 = (position)tmp_col;
+                       row1 = tmp_row;
+                       col1 = tmp_col;
                }
 
                /* Tunnel through all other walls */
                else if (is_extra_grid(c_ptr) || is_inner_grid(c_ptr) || is_solid_grid(c_ptr))
                {
                        /* Accept this location */
-                       row1 = (position)tmp_row;
-                       col1 = (position)tmp_col;
+                       row1 = tmp_row;
+                       col1 = tmp_col;
 
                        /* Save the tunnel location */
                        if (dun->tunn_n < TUNN_MAX)
@@ -768,8 +768,8 @@ bool build_tunnel(position row1, position col1, position row2, position col2)
                else
                {
                        /* Accept the location */
-                       row1 = (position)tmp_row;
-                       col1 = (position)tmp_col;
+                       row1 = tmp_row;
+                       col1 = tmp_col;
 
                        /* Collect legal door locations */
                        if (!door_flag)
@@ -826,7 +826,7 @@ bool build_tunnel(position row1, position col1, position row2, position col2)
  * routine.\n
  * @todo 特に詳細な処理の意味を調査すべし
  */
-static bool set_tunnel(position *x, position *y, bool affectwall)
+static bool set_tunnel(POSITION *x, POSITION *y, bool affectwall)
 {
        int i, j, dx, dy;
 
@@ -944,9 +944,9 @@ static bool set_tunnel(position *x, position *y, bool affectwall)
  * Note that this routine is only called on "even" squares - so it gives
  * a natural checkerboard pattern.
  */
-static void create_cata_tunnel(position x, position y)
+static void create_cata_tunnel(POSITION x, POSITION y)
 {
-       position x1, y1;
+       POSITION x1, y1;
 
        /* Build tunnel */
        x1 = x - 1;
@@ -992,7 +992,7 @@ static void create_cata_tunnel(position x, position y)
 static void short_seg_hack(int x1, int y1, int x2, int y2, int type, int count, bool *fail)
 {
        int i;
-       position x, y;
+       POSITION x, y;
        int length;
 
        /* Check for early exit */
@@ -1117,7 +1117,7 @@ static void short_seg_hack(int x1, int y1, int x2, int y2, int type, int count,
  * Note it is VERY important that the "stop if hit another passage" logic\n
  * stays as is.  Without this the dungeon turns into Swiss Cheese...\n
  */
-bool build_tunnel2(position x1, position y1, position x2, position y2, int type, int cutoff)
+bool build_tunnel2(POSITION x1, POSITION y1, POSITION x2, POSITION y2, int type, int cutoff)
 {
        int x3, y3, dx, dy; // TODO: いずれpositon型に変える
        int changex, changey;
@@ -1201,8 +1201,8 @@ bool build_tunnel2(position x1, position y1, position x2, position y2, int type,
                                        /* Save the door location */
                                        if (dun->door_n < DOOR_MAX)
                                        {
-                                               dun->door[dun->door_n].y = (position)y3;
-                                               dun->door[dun->door_n].x = (position)x3;
+                                               dun->door[dun->door_n].y = (POSITION)y3;
+                                               dun->door[dun->door_n].x = (POSITION)x3;
                                                dun->door_n++;
                                        }
                                        else return FALSE;
@@ -1219,9 +1219,9 @@ bool build_tunnel2(position x1, position y1, position x2, position y2, int type,
                else
                {
                        /* tunnel through walls */
-                       if (build_tunnel2(x1, y1, (position)x3, (position)y3, type, cutoff))
+                       if (build_tunnel2(x1, y1, (POSITION)x3, (POSITION)y3, type, cutoff))
                        {
-                               retval = build_tunnel2((position)x3, (position)y3, x2, y2, type, cutoff);
+                               retval = build_tunnel2((POSITION)x3, (POSITION)y3, x2, y2, type, cutoff);
                                firstsuccede = TRUE;
                        }
                        else
index f11d8de..ae0e043 100644 (file)
@@ -282,5 +282,5 @@ extern void rand_dir(int *rdir, int *cdir);
 extern bool get_is_floor(int x, int y);
 extern void set_floor(int x, int y);
 
-extern bool build_tunnel(position row1, position col1, position row2, position col2);
-extern bool build_tunnel2(position x1, position y1, position x2, position y2, int type, int cutoff);
+extern bool build_tunnel(POSITION row1, POSITION col1, POSITION row2, POSITION col2);
+extern bool build_tunnel2(POSITION x1, POSITION y1, POSITION x2, POSITION y2, int type, int cutoff);
index 28a1958..1af2693 100644 (file)
@@ -104,27 +104,28 @@ typedef unsigned long u32b;
 #endif
 
 
-typedef s16b idx;                      /*!< ゲーム中のID型を定義 */
-typedef byte position;         /*!< ゲーム中の座標型を定義 */
-typedef s16b hit_point;                /*!< ゲーム中のHP/ダメージ型を定義 */
-typedef s16b hit_prob;         /*!< ゲーム中の命中修正値を定義 */
-typedef s16b base_status;      /*!< ゲーム中の基礎能力値型を定義 */
-typedef byte item_number;      /*!< ゲーム中のアイテム数型を定義 */
-typedef s16b action_energy;    /*!< ゲーム中の行動エネルギー型を定義 */
-typedef s16b armour_class;     /*!< ゲーム中の行動アーマークラス型を定義 */
-typedef s16b time_effect;   /*!< ゲーム中の時限期間の型を定義 */
-typedef byte character_idx; /*!< ゲーム中のキャラクター特性各種IDの型を定義 */
-typedef byte discount_rate; /*!< ゲーム中の値引き率の型を定義 */
-
-typedef s16b player_level;  /*!< ゲーム中のプレイヤーレベルの型を定義 */
-typedef int direction;         /*!< ゲーム中の方角の型定義 */
-typedef s16b sub_exp;          /*!< ゲーム中の副経験値の型定義 */
-
-typedef byte object_type_value;    /*!< ゲーム中のアイテム主分類の型定義 */
-typedef byte object_subtype_value; /*!< ゲーム中のアイテム副分類の型定義 */
-typedef s16b parameter_value;      /*!< ゲーム中のアイテム能力値の型定義 */
-
-typedef u32b str_offset;      /*!< テキストオフセットの型定義 */
+typedef s16b IDX;                      /*!< ゲーム中のID型を定義 */
+typedef byte POSITION;         /*!< ゲーム中の座標型を定義 */
+typedef s16b HIT_POINT;                /*!< ゲーム中のHP/ダメージ型を定義 */
+typedef s16b HIT_PROB;         /*!< ゲーム中の命中修正値を定義 */
+typedef s16b BASE_STATUS;      /*!< ゲーム中の基礎能力値型を定義 */
+typedef byte ITEM_NUMBER;      /*!< ゲーム中のアイテム数型を定義 */
+typedef s16b ACTION_ENERGY;    /*!< ゲーム中の行動エネルギー型を定義 */
+typedef s16b ARMOUR_CLASS;     /*!< ゲーム中の行動アーマークラス型を定義 */
+typedef s16b TIME_EFFECT;   /*!< ゲーム中の時限期間の型を定義 */
+typedef byte CHARACTER_IDX; /*!< ゲーム中のキャラクター特性各種IDの型を定義 */
+typedef byte DISCOUNT_RATE; /*!< ゲーム中の値引き率の型を定義 */
+
+typedef s16b PLAYER_LEVEL;  /*!< ゲーム中のプレイヤーレベルの型を定義 */
+typedef int DIRECTION;         /*!< ゲーム中の方角の型定義 */
+typedef s16b SUB_EXP;          /*!< ゲーム中の副経験値の型定義 */
+
+typedef byte OBJECT_TYPE_VALUE;    /*!< ゲーム中のアイテム主分類の型定義 */
+typedef byte OBJECT_SUBTYPE_VALUE; /*!< ゲーム中のアイテム副分類の型定義 */
+typedef s16b PARAMETER_VALUE;      /*!< ゲーム中のアイテム能力値の型定義 */
+typedef s16b WEIGHT;               /*!< ゲーム中の重量の型定義 */
+
+typedef u32b STR_OFFSET;      /*!< テキストオフセットの型定義 */
 
 /*** Pointers to all the basic types defined above ***/
 
index da9dfa2..848a81d 100644 (file)
@@ -86,10 +86,10 @@ struct header
 
        u16b head_size;         /* Size of the "header" in bytes */
 
-       str_offset info_size;           /* Size of the "info" array in bytes */
-       str_offset name_size;           /* Size of the "name" array in bytes */
-       str_offset text_size;           /* Size of the "text" array in bytes */
-       str_offset tag_size;            /* Size of the "tag" array in bytes */
+       STR_OFFSET info_size;           /* Size of the "info" array in bytes */
+       STR_OFFSET name_size;           /* Size of the "name" array in bytes */
+       STR_OFFSET text_size;           /* Size of the "text" array in bytes */
+       STR_OFFSET tag_size;            /* Size of the "tag" array in bytes */
 
        void *info_ptr;
        char *name_ptr;
index f46b1c0..bd06158 100644 (file)
@@ -2727,7 +2727,7 @@ static errr rd_dungeon_old(void)
        /* Read the dungeon items */
        for (i = 1; i < limit; i++)
        {
-               idx o_idx;
+               IDX o_idx;
 
                object_type *o_ptr;
 
index 59934fc..0eb3dd5 100644 (file)
@@ -145,7 +145,7 @@ static cptr desc_moan[] =
  * @param m_idx 打撃を行うモンスターのID
  * @return 実際に攻撃処理を行った場合TRUEを返す
  */
-bool make_attack_normal(idx m_idx)
+bool make_attack_normal(IDX m_idx)
 {
        monster_type *m_ptr = &m_list[m_idx];
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
@@ -713,7 +713,7 @@ bool make_attack_normal(idx m_idx)
                                                        obvious = TRUE;
 
                                                        /* Heal the monster */
-                                                       m_ptr->hp += (hit_point)heal;
+                                                       m_ptr->hp += (HIT_POINT)heal;
 
                                                        /* Redraw (later) if needed */
                                                        if (p_ptr->health_who == m_idx) p_ptr->redraw |= (PR_HEALTH);
@@ -1692,7 +1692,7 @@ bool make_attack_normal(idx m_idx)
                                {
                                        if (!(r_ptr->flagsr & RFR_EFF_IM_FIRE_MASK))
                                        {
-                                               hit_point dam = damroll(2, 6);
+                                               HIT_POINT dam = damroll(2, 6);
 
                                                /* Modify the damage */
                                                dam = mon_damage_mod(m_ptr, dam, FALSE);
@@ -1724,7 +1724,7 @@ bool make_attack_normal(idx m_idx)
                                {
                                        if (!(r_ptr->flagsr & RFR_EFF_IM_ELEC_MASK))
                                        {
-                                               hit_point dam = damroll(2, 6);
+                                               HIT_POINT dam = damroll(2, 6);
 
                                                /* Modify the damage */
                                                dam = mon_damage_mod(m_ptr, dam, FALSE);
@@ -1756,7 +1756,7 @@ bool make_attack_normal(idx m_idx)
                                {
                                        if (!(r_ptr->flagsr & RFR_EFF_IM_COLD_MASK))
                                        {
-                                               hit_point dam = damroll(2, 6);
+                                               HIT_POINT dam = damroll(2, 6);
 
                                                /* Modify the damage */
                                                dam = mon_damage_mod(m_ptr, dam, FALSE);
@@ -1789,7 +1789,7 @@ bool make_attack_normal(idx m_idx)
                                {
                                        if (!(r_ptr->flagsr & RFR_EFF_RES_SHAR_MASK))
                                        {
-                                               hit_point dam = damroll(2, 6);
+                                               HIT_POINT dam = damroll(2, 6);
 
                                                /* Modify the damage */
                                                dam = mon_damage_mod(m_ptr, dam, FALSE);
@@ -1827,7 +1827,7 @@ bool make_attack_normal(idx m_idx)
                                        {
                                                if (!(r_ptr->flagsr & RFR_RES_ALL))
                                                {
-                                                       hit_point dam = damroll(2, 6);
+                                                       HIT_POINT dam = damroll(2, 6);
 
                                                        /* Modify the damage */
                                                        dam = mon_damage_mod(m_ptr, dam, FALSE);
@@ -1861,7 +1861,7 @@ bool make_attack_normal(idx m_idx)
                                {
                                        if (!(r_ptr->flagsr & RFR_RES_ALL))
                                        {
-                                               hit_point dam = damroll(2, 6);
+                                               HIT_POINT dam = damroll(2, 6);
 
                                                /* Modify the damage */
                                                dam = mon_damage_mod(m_ptr, dam, FALSE);
@@ -1891,7 +1891,7 @@ bool make_attack_normal(idx m_idx)
 
                                if (hex_spelling(HEX_SHADOW_CLOAK) && alive && !p_ptr->is_dead)
                                {
-                                       hit_point dam = 1;
+                                       HIT_POINT dam = 1;
                                        object_type *o_armed_ptr = &inventory[INVEN_RARM];
 
                                        if (!(r_ptr->flagsr & RFR_RES_ALL || r_ptr->flagsr & RFR_RES_DARK))
index a8634f3..016004a 100644 (file)
@@ -2110,7 +2110,7 @@ static void process_monster(int m_idx)
        monster_race    *ap_r_ptr = &r_info[m_ptr->ap_r_idx];
 
        int             i, d;
-       position        oy, ox, ny, nx;
+       POSITION        oy, ox, ny, nx;
 
        int             mm[8];
 
index d4c6a85..037d090 100644 (file)
@@ -1039,8 +1039,8 @@ static bool cast_mindcrafter_spell(int spell)
 {
        int             b = 0;
        int             dir;
-       time_effect t;
-       player_level plev = p_ptr->lev;
+       TIME_EFFECT t;
+       PLAYER_LEVEL plev = p_ptr->lev;
 
        /* spell code */
        switch (spell)
@@ -1070,7 +1070,7 @@ static bool cast_mindcrafter_spell(int spell)
                }
 
                if ((plev > 24) && (plev < 40))
-                       set_tim_esp((time_effect)plev, FALSE);
+                       set_tim_esp((TIME_EFFECT)plev, FALSE);
 
                if (!b) msg_print(_("安全な気がする。", "You feel safe."));
 
@@ -1114,12 +1114,12 @@ static bool cast_mindcrafter_spell(int spell)
                break;
        case 6:
                /* Character Armour */
-               set_shield((time_effect)plev, FALSE);
-               if (plev > 14) set_oppose_acid((time_effect)plev, FALSE);
-               if (plev > 19) set_oppose_fire((time_effect)plev, FALSE);
-               if (plev > 24) set_oppose_cold((time_effect)plev, FALSE);
-               if (plev > 29) set_oppose_elec((time_effect)plev, FALSE);
-               if (plev > 34) set_oppose_pois((time_effect)plev, FALSE);
+               set_shield((TIME_EFFECT)plev, FALSE);
+               if (plev > 14) set_oppose_acid((TIME_EFFECT)plev, FALSE);
+               if (plev > 19) set_oppose_fire((TIME_EFFECT)plev, FALSE);
+               if (plev > 24) set_oppose_cold((TIME_EFFECT)plev, FALSE);
+               if (plev > 29) set_oppose_elec((TIME_EFFECT)plev, FALSE);
+               if (plev > 34) set_oppose_pois((TIME_EFFECT)plev, FALSE);
                break;
        case 7:
                /* Psychometry */
@@ -1403,7 +1403,7 @@ static bool cast_mirror_spell(int spell)
        int             dir;
        int             plev = p_ptr->lev;
        int             tmp;
-       time_effect t;
+       TIME_EFFECT t;
        int             x,y;
 
        /* spell code */
@@ -1414,7 +1414,7 @@ static bool cast_mirror_spell(int spell)
          tmp = is_mirror_grid(&cave[p_ptr->y][p_ptr->x]) ? 4 : 0;
          if( plev + tmp > 4)detect_monsters_normal(DETECT_RAD_DEFAULT);
          if( plev + tmp > 18 )detect_monsters_invis(DETECT_RAD_DEFAULT);
-         if( plev + tmp > 28 )set_tim_esp((time_effect)plev, FALSE);
+         if( plev + tmp > 28 )set_tim_esp((TIME_EFFECT)plev, FALSE);
          if( plev + tmp > 38 )map_area(DETECT_RAD_MAP);
          if( tmp == 0 && plev < 5 ){
            msg_print(_("鏡がなくて集中できなかった!", "You need a mirror to concentrate!"));
@@ -1551,8 +1551,8 @@ static bool cast_mirror_spell(int spell)
  */
 static bool cast_berserk_spell(int spell)
 {
-       position y, x;
-       direction dir;
+       POSITION y, x;
+       DIRECTION dir;
 
        /* spell code */
        switch (spell)
@@ -1707,7 +1707,7 @@ static bool cast_ninja_spell(int spell)
        case 9:
                fire_ball(GF_FIRE, 0, 50+plev, plev/10+2);
                teleport_player(30, 0L);
-               set_oppose_fire((time_effect)plev, FALSE);
+               set_oppose_fire((TIME_EFFECT)plev, FALSE);
                break;
        case 10:
                return rush_attack(NULL);
@@ -1832,7 +1832,7 @@ static bool cast_ninja_spell(int spell)
                break;
        case 16:
                (void)set_kabenuke(randint1(plev/2) + plev/2, FALSE);
-               set_oppose_acid((time_effect)plev, FALSE);
+               set_oppose_acid((TIME_EFFECT)plev, FALSE);
                break;
        case 17:
                fire_ball(GF_POIS, 0, 75+plev*2/3, plev/5+2);
index 79e30c6..c842661 100644 (file)
@@ -2929,7 +2929,7 @@ void choose_new_monster(int m_idx, bool born, int r_idx)
        if (ironman_nightmare)
        {
                u32b hp = m_ptr->max_maxhp * 2L;
-               m_ptr->max_maxhp = (hit_point)MIN(30000, hp);
+               m_ptr->max_maxhp = (HIT_POINT)MIN(30000, hp);
        }
 
        m_ptr->maxhp = (long)(m_ptr->maxhp * m_ptr->max_maxhp) / oldmaxhp;
@@ -3275,7 +3275,7 @@ static bool place_monster_one(int who, int y, int x, int r_idx, u32b mode)
        {
                u32b hp = m_ptr->max_maxhp * 2L;
 
-               m_ptr->max_maxhp = (hit_point)MIN(30000, hp);
+               m_ptr->max_maxhp = (HIT_POINT)MIN(30000, hp);
        }
 
        m_ptr->maxhp = m_ptr->max_maxhp;
index 36e39f8..719c280 100644 (file)
@@ -253,7 +253,7 @@ static bool dispel_check_monster(int m_idx, int t_idx)
  * @details
  * The player is only disturbed if able to be affected by the spell.
  */
-bool monst_spell_monst(idx m_idx)
+bool monst_spell_monst(IDX m_idx)
 {
        int y = 0, x = 0;
        int i, k, t_idx = 0;
index 176f01a..5a07bcd 100644 (file)
@@ -1955,7 +1955,7 @@ int spell_RF6_WORLD(int m_idx)
 int spell_RF6_SPECIAL_BANORLUPART(int m_idx)
 {
        monster_type *m_ptr = &m_list[m_idx];
-       hit_point dummy_hp, dummy_maxhp;
+       HIT_POINT dummy_hp, dummy_maxhp;
        int k;
        int dummy_y = m_ptr->fy;
        int dummy_x = m_ptr->fx;
index 4fbddde..42e1c83 100644 (file)
@@ -2334,7 +2334,7 @@ bool mutation_power_aux(u32b power)
                case MUT1_RESIST:
                        {
                                int num = lvl / 10;
-                               time_effect dur = randint1(20) + 20;
+                               TIME_EFFECT dur = randint1(20) + 20;
 
                                if (randint0(5) < num)
                                {
index ad72d30..478683b 100644 (file)
@@ -250,9 +250,9 @@ void delete_object(int y, int x)
  * @param i2 整理したい配列の終点
  * @return なし
  */
-static void compact_objects_aux(idx i1, idx i2)
+static void compact_objects_aux(IDX i1, IDX i2)
 {
-       idx i;
+       IDX i;
        cave_type *c_ptr;
        object_type *o_ptr;
 
@@ -2282,11 +2282,11 @@ static byte get_random_ego(byte slot, bool good)
  */
 static void a_m_aux_1(object_type *o_ptr, int level, int power)
 {
-       hit_prob tohit1 = randint1(5) + m_bonus(5, level);
-       hit_point todam1 = randint1(5) + m_bonus(5, level);
+       HIT_PROB tohit1 = randint1(5) + m_bonus(5, level);
+       HIT_POINT todam1 = randint1(5) + m_bonus(5, level);
 
-       hit_prob tohit2 = m_bonus(10, level);
-       hit_point todam2 = m_bonus(10, level);
+       HIT_PROB tohit2 = m_bonus(10, level);
+       HIT_POINT todam2 = m_bonus(10, level);
 
        if ((o_ptr->tval == TV_BOLT) || (o_ptr->tval == TV_ARROW) || (o_ptr->tval == TV_SHOT))
        {
@@ -2670,8 +2670,8 @@ static void add_esp_weak(object_type *o_ptr, bool extra)
  */
 static void a_m_aux_2(object_type *o_ptr, int level, int power)
 {
-       armour_class toac1 = randint1(5) + m_bonus(5, level);
-       armour_class toac2 = m_bonus(10, level);
+       ARMOUR_CLASS toac1 = randint1(5) + m_bonus(5, level);
+       ARMOUR_CLASS toac2 = m_bonus(10, level);
 
        /* Good */
        if (power > 0)
@@ -4837,9 +4837,9 @@ bool make_object(object_type *j_ptr, u32b mode)
  * This routine uses "object_level" for the "generation level".\n
  * This routine requires a clean floor grid destination.\n
  */
-void place_object(position y, position x, u32b mode)
+void place_object(POSITION y, POSITION x, u32b mode)
 {
-       idx o_idx;
+       IDX o_idx;
 
        /* Acquire grid */
        cave_type *c_ptr = &cave[y][x];
@@ -4962,7 +4962,7 @@ bool make_gold(object_type *j_ptr)
  * @details
  * The location must be a legal, clean, floor grid.
  */
-void place_gold(position y, position x)
+void place_gold(POSITION y, POSITION x)
 {
        s16b o_idx;
 
@@ -5788,7 +5788,7 @@ void inven_item_increase(int item, int num)
        else if (num < 0) num = 0;
 
        /* Un-apply */
-       num -= (item_number)o_ptr->number;
+       num -= (ITEM_NUMBER)o_ptr->number;
 
        /* Change the number and weight */
        if (num)
@@ -5987,7 +5987,7 @@ void floor_item_increase(int item, int num)
        num -= (int)o_ptr->number;
 
        /* Change the number */
-       o_ptr->number += (item_number)num;
+       o_ptr->number += (ITEM_NUMBER)num;
 }
 
 
index 7c21123..00686e8 100644 (file)
@@ -1585,7 +1585,7 @@ static bool project_o(int who, int r, int y, int x, int dam, int typ)
  * "flg" was added.
  * </pre>
  */
-static bool project_m(int who, int r, int y, int x, hit_point dam, int typ, int flg, bool see_s_msg)
+static bool project_m(int who, int r, int y, int x, HIT_POINT dam, int typ, int flg, bool see_s_msg)
 {
        int tmp;
 
index 8dc74a2..c7d1b31 100644 (file)
@@ -63,11 +63,11 @@ static bool cave_monster_teleportable_bold(int m_idx, int y, int x, u32b mode)
  * Attempt to move the monster at least "dis/2" grids away.
  * But allow variation to prevent infinite loops.
  */
-bool teleport_away(idx m_idx, int dis, u32b mode)
+bool teleport_away(IDX m_idx, int dis, u32b mode)
 {
        int oy, ox, d, i, min;
        int tries = 0;
-       position ny = 0, nx = 0;
+       POSITION ny = 0, nx = 0;
 
        bool look = TRUE;
 
@@ -348,7 +348,7 @@ bool teleport_player_aux(int dis, u32b mode)
 {
        int candidates_at[MAX_TELEPORT_DISTANCE + 1];
        int total_candidates, cur_candidates;
-       position y = 0, x = 0;
+       POSITION y = 0, x = 0;
        int min, pick, i;
 
        int left = MAX(1, p_ptr->x - dis);
@@ -556,9 +556,9 @@ void teleport_player_away(int m_idx, int dis)
  * This function allows teleporting into vaults (!)
  * </pre>
  */
-void teleport_player_to(position ny, position nx, u32b mode)
+void teleport_player_to(POSITION ny, POSITION nx, u32b mode)
 {
-       position y, x;
+       POSITION y, x;
        int dis = 0, ctr = 0;
 
        if (p_ptr->anti_tele && !(mode & TELEPORT_NONMAGICAL))
@@ -573,8 +573,8 @@ void teleport_player_to(position ny, position nx, u32b mode)
                /* Pick a nearby legal location */
                while (1)
                {
-                       y = (position)rand_spread(ny, dis);
-                       x = (position)rand_spread(nx, dis);
+                       y = (POSITION)rand_spread(ny, dis);
+                       x = (POSITION)rand_spread(nx, dis);
                        if (in_bounds(y, x)) break;
                }
 
@@ -1157,7 +1157,7 @@ msg_format("%s(%c)は劣化を跳ね返した!",o_name, index_to_label(t) );
  */
 void mutate_player(void)
 {
-       base_status max1, cur1, max2, cur2;
+       BASE_STATUS max1, cur1, max2, cur2;
        int ii, jj, i;
 
        /* Pick a pair of stats */
@@ -2028,7 +2028,7 @@ int remove_all_curse(void)
 bool alchemy(void)
 {
        int item, amt = 1;
-       item_number old_number;
+       ITEM_NUMBER old_number;
        long price;
        bool force = FALSE;
        object_type *o_ptr;
index 23a23f8..28e64a7 100644 (file)
@@ -963,7 +963,7 @@ static s32b price_item(object_type *o_ptr, int greed, bool flip)
 static void mass_produce(object_type *o_ptr)
 {
        int size = 1;
-       discount_rate discount = 0;
+       DISCOUNT_RATE discount = 0;
 
        s32b cost = object_value(o_ptr);
 
@@ -1622,8 +1622,8 @@ bool combine_and_reorder_home(int store_num)
                                        }
                                        else
                                        {
-                                               item_number old_num = o_ptr->number;
-                                               item_number remain = j_ptr->number + o_ptr->number - max_num;
+                                               ITEM_NUMBER old_num = o_ptr->number;
+                                               ITEM_NUMBER remain = j_ptr->number + o_ptr->number - max_num;
 
                                                /* Add together the item counts */
                                                object_absorb(j_ptr, o_ptr);
@@ -1930,7 +1930,7 @@ static int store_carry(object_type *o_ptr)
  * Increase, by a given amount, the number of a certain item
  * in a certain store. This can result in zero items.
  * </pre>
- * @todo numは本来item_number型にしたい。
+ * @todo numは本来ITEM_NUMBER型にしたい。
  */
 static void store_item_increase(int item, int num)
 {
@@ -1947,7 +1947,7 @@ static void store_item_increase(int item, int num)
        num = cnt - o_ptr->number;
 
        /* Save the new number */
-       o_ptr->number += (item_number)num;
+       o_ptr->number += (ITEM_NUMBER)num;
 }
 
 
@@ -3433,7 +3433,7 @@ static void store_purchase(void)
        int i, choice;
        int item, item_new;
 
-       item_number amt;
+       ITEM_NUMBER amt;
 
        s32b price, best;
 
index 400f8e3..dea5811 100644 (file)
@@ -33,7 +33,7 @@
  * @param width 基本幅
  * @return なし
  */
-static void recursive_river(int x1, int y1, int x2, int y2, idx feat1, idx feat2, int width)
+static void recursive_river(int x1, int y1, int x2, int y2, IDX feat1, IDX feat2, int width)
 {
        int dx, dy, length, l, x, y;
        int changex, changey;
index 4c0a736..6cbe24a 100644 (file)
@@ -66,8 +66,8 @@ typedef struct feature_type feature_type;
 
 struct feature_type
 {
-       str_offset name;                /*!< 地形名参照のためのネームバッファオフセット値 / Name (offset) */
-       str_offset text;                /*!< 地形説明参照のためのネームバッファオフセット値 /  Text (offset) */
+       STR_OFFSET name;                /*!< 地形名参照のためのネームバッファオフセット値 / Name (offset) */
+       STR_OFFSET text;                /*!< 地形説明参照のためのネームバッファオフセット値 /  Text (offset) */
        s16b tag;                 /*!< 地形特性タグ参照のためのネームバッファオフセット値 /  Tag (offset) */
 
        s16b mimic;               /*!< 未確定時の外形地形ID / Feature to mimic */
@@ -102,9 +102,9 @@ typedef struct object_kind object_kind;
 
 struct object_kind
 {
-       str_offset name;                        /*!< ベースアイテム名参照のためのネームバッファオフセット値 / Name (offset) */
-       str_offset text;                        /*!< 解説テキスト参照のためのネームバッファオフセット値 / Text (offset) */
-       str_offset flavor_name; /*!< 未確定名参照のためのネームバッファオフセット値 / Flavor name (offset) */
+       STR_OFFSET name;                        /*!< ベースアイテム名参照のためのネームバッファオフセット値 / Name (offset) */
+       STR_OFFSET text;                        /*!< 解説テキスト参照のためのネームバッファオフセット値 / Text (offset) */
+       STR_OFFSET flavor_name; /*!< 未確定名参照のためのネームバッファオフセット値 / Flavor name (offset) */
 
        byte tval;                      /*!< ベースアイテム種別の大項目値 Object type */
        byte sval;                      /*!< ベースアイテム種別の小項目値 Object sub type */
@@ -164,8 +164,8 @@ typedef struct artifact_type artifact_type;
  */
 struct artifact_type
 {
-       str_offset name;                        /*!< アーティファクト名(headerオフセット参照) / Name (offset) */
-       str_offset text;                        /*!< アーティファクト解説(headerオフセット参照) / Text (offset) */
+       STR_OFFSET name;                        /*!< アーティファクト名(headerオフセット参照) / Name (offset) */
+       STR_OFFSET text;                        /*!< アーティファクト解説(headerオフセット参照) / Text (offset) */
 
        byte tval;                      /*!< ベースアイテム大項目ID / Artifact type */
        byte sval;                      /*!< ベースアイテム小項目ID / Artifact sub type */
@@ -208,8 +208,8 @@ typedef struct ego_item_type ego_item_type;
 
 struct ego_item_type
 {
-       str_offset name;                        /* Name (offset) */
-       str_offset text;                        /* Text (offset) */
+       STR_OFFSET name;                        /* Name (offset) */
+       STR_OFFSET text;                        /* Text (offset) */
 
        byte slot;                      /* Standard slot value */
        byte rating;            /* Rating boost */
@@ -289,11 +289,11 @@ typedef struct monster_race monster_race;
 
 struct monster_race
 {
-       str_offset name;        /*!< 名前データのオフセット(日本語) /  Name offset(Japanese) */
+       STR_OFFSET name;        /*!< 名前データのオフセット(日本語) /  Name offset(Japanese) */
 #ifdef JP
-       str_offset E_name;              /*!< 名前データのオフセット(英語) /  Name offset(English) */
+       STR_OFFSET E_name;              /*!< 名前データのオフセット(英語) /  Name offset(English) */
 #endif
-       str_offset text;                                /*!< 思い出テキストのオフセット / Lore text offset */
+       STR_OFFSET text;                                /*!< 思い出テキストのオフセット / Lore text offset */
 
        byte hdice;                             /*!< HPのダイス数 / Creatures hit dice count */
        byte hside;                             /*!< HPのダイス面数 / Creatures hit dice sides */
@@ -397,8 +397,8 @@ typedef struct vault_type vault_type;
 
 struct vault_type
 {
-       str_offset name;        /* Name (offset) */
-       str_offset text;        /* Text (offset) */
+       STR_OFFSET name;        /* Name (offset) */
+       STR_OFFSET text;        /* Text (offset) */
 
        byte typ;                       /* Vault type */
        byte rat;                       /* Vault rating */
@@ -454,9 +454,9 @@ struct cave_type
 {
        u16b info;              /* Hack -- cave flags */
 
-       idx feat;               /* Hack -- feature type */
-       idx o_idx;              /* Object in this grid */
-       idx m_idx;              /* Monster in this grid */
+       IDX feat;               /* Hack -- feature type */
+       IDX o_idx;              /* Object in this grid */
+       IDX m_idx;              /* Monster in this grid */
 
        s16b special;   /* Special cave info */
 
@@ -476,8 +476,8 @@ typedef struct coord coord;
 
 struct coord
 {
-       position y;
-       position x;
+       POSITION y;
+       POSITION x;
 };
 
 
@@ -514,21 +514,21 @@ typedef struct object_type object_type;
 
 struct object_type
 {
-       idx k_idx;                      /* Kind index (zero if "dead") */
+       IDX k_idx;                      /* Kind index (zero if "dead") */
 
-       position iy;                    /* Y-position on map, or zero */
-       position ix;                    /* X-position on map, or zero */
+       POSITION iy;                    /* Y-position on map, or zero */
+       POSITION ix;                    /* X-position on map, or zero */
 
-       object_type_value tval;                 /* Item type (from kind) */
-       object_subtype_value sval;                      /* Item sub-type (from kind) */
+       OBJECT_TYPE_VALUE tval;                 /* Item type (from kind) */
+       OBJECT_SUBTYPE_VALUE sval;                      /* Item sub-type (from kind) */
 
-       parameter_value pval;                   /* Item extra-parameter */
+       PARAMETER_VALUE pval;                   /* Item extra-parameter */
 
-       discount_rate discount;         /* Discount (if any) */
+       DISCOUNT_RATE discount;         /* Discount (if any) */
 
-       item_number number;     /* Number of items */
+       ITEM_NUMBER number;     /* Number of items */
 
-       s16b weight;            /* Item weight */
+       WEIGHT weight;          /* Item weight */
 
        byte name1;                     /* Artifact type, if any */
        byte name2;                     /* Ego-Item type, if any */
@@ -539,11 +539,11 @@ struct object_type
        s16b xtra4;                     /* Extra info fuel or captured monster's current HP */
        s16b xtra5;                     /* Extra info captured monster's max HP */
 
-       hit_prob to_h;                  /* Plusses to hit */
-       hit_point to_d;                 /* Plusses to damage */
-       armour_class to_a;                      /* Plusses to AC */
+       HIT_PROB to_h;                  /* Plusses to hit */
+       HIT_POINT to_d;                 /* Plusses to damage */
+       ARMOUR_CLASS to_a;                      /* Plusses to AC */
 
-       armour_class ac;                        /* Normal AC */
+       ARMOUR_CLASS ac;                        /* Normal AC */
 
        byte dd, ds;            /* Damage dice/sides */
 
@@ -562,8 +562,8 @@ struct object_type
 
        u32b curse_flags;        /* Flags for curse */
 
-       idx next_o_idx; /* Next object in stack (if any) */
-       idx held_m_idx; /* Monster holding us (if any) */
+       IDX next_o_idx; /* Next object in stack (if any) */
+       IDX held_m_idx; /* Monster holding us (if any) */
 };
 
 
@@ -585,27 +585,27 @@ struct monster_type
        s16b ap_r_idx;          /* Monster race appearance index */
        byte sub_align;         /* Sub-alignment for a neutral monster */
 
-       position fy;            /* Y location on map */
-       position fx;            /* X location on map */
+       POSITION fy;            /* Y location on map */
+       POSITION fx;            /* X location on map */
 
-       hit_point hp;           /* Current Hit points */
-       hit_point maxhp;                /* Max Hit points */
-       hit_point max_maxhp;            /* Max Max Hit points */
+       HIT_POINT hp;           /* Current Hit points */
+       HIT_POINT maxhp;                /* Max Hit points */
+       HIT_POINT max_maxhp;            /* Max Max Hit points */
        u32b dealt_damage;              /* Sum of damages dealt by player */
 
        s16b mtimed[MAX_MTIMED];        /* Timed status counter */
 
        byte mspeed;            /* Monster "speed" */
-       action_energy energy_need;      /* Monster "energy" */
+       ACTION_ENERGY energy_need;      /* Monster "energy" */
 
-       position cdis;          /* Current dis from player */
+       POSITION cdis;          /* Current dis from player */
 
        byte mflag;             /* Extra monster flags */
        byte mflag2;            /* Extra monster flags */
 
        bool ml;                /* Monster is "visible" */
 
-       idx hold_o_idx; /* Object being held (if any) */
+       IDX hold_o_idx; /* Object being held (if any) */
 
        s16b target_y;          /* Can attack !los player */
        s16b target_x;          /* Can attack !los player */
@@ -959,13 +959,13 @@ struct player_type
        s16b oldpy;             /* Previous player location -KMW- */
        s16b oldpx;             /* Previous player location -KMW- */
 
-       character_idx psex;                     /* Sex index */
-       character_idx prace;                    /* Race index */
-       character_idx pclass;           /* Class index */
-       character_idx pseikaku;         /* Seikaku index */
-       character_idx realm1;        /* First magic realm */
-       character_idx realm2;        /* Second magic realm */
-       character_idx oops;                     /* Unused */
+       CHARACTER_IDX psex;                     /* Sex index */
+       CHARACTER_IDX prace;                    /* Race index */
+       CHARACTER_IDX pclass;           /* Class index */
+       CHARACTER_IDX pseikaku;         /* Seikaku index */
+       CHARACTER_IDX realm1;        /* First magic realm */
+       CHARACTER_IDX realm2;        /* Second magic realm */
+       CHARACTER_IDX oops;                     /* Unused */
 
        byte hitdie;            /* Hit dice (sides) */
        u16b expfact;       /* Experience factor
@@ -986,12 +986,12 @@ struct player_type
        s32b exp;                       /* Cur experience */
        u32b exp_frac;          /* Cur exp frac (times 2^16) */
 
-       player_level lev;                       /* Level */
+       PLAYER_LEVEL lev;                       /* Level */
 
        s16b town_num;                  /* Current town number */
        s16b arena_number;              /* monster number in arena -KMW- */
        bool inside_arena;              /* Is character inside arena? */
-       idx inside_quest;               /* Inside quest level */
+       IDX inside_quest;               /* Inside quest level */
        bool inside_battle;             /* Is character inside tougijou? */
 
        s32b wilderness_x;      /* Coordinates in the wilderness */
@@ -1008,69 +1008,69 @@ struct player_type
 
        s16b max_plv;           /* Max Player Level */
 
-       base_status stat_max[6];        /* Current "maximal" stat values */
-       base_status stat_max_max[6];    /* Maximal "maximal" stat values */
-       base_status stat_cur[6];        /* Current "natural" stat values */
+       BASE_STATUS stat_max[6];        /* Current "maximal" stat values */
+       BASE_STATUS stat_max_max[6];    /* Maximal "maximal" stat values */
+       BASE_STATUS stat_cur[6];        /* Current "natural" stat values */
 
        s16b learned_spells;
        s16b add_spells;
 
        u32b count;
 
-       time_effect fast;               /* Timed -- Fast */
-       time_effect slow;               /* Timed -- Slow */
-       time_effect blind;              /* Timed -- Blindness */
-       time_effect paralyzed;          /* Timed -- Paralysis */
-       time_effect confused;           /* Timed -- Confusion */
-       time_effect afraid;             /* Timed -- Fear */
-       time_effect image;              /* Timed -- Hallucination */
-       time_effect poisoned;           /* Timed -- Poisoned */
-       time_effect cut;                /* Timed -- Cut */
-       time_effect stun;               /* Timed -- Stun */
-
-       time_effect protevil;           /* Timed -- Protection */
-       time_effect invuln;             /* Timed -- Invulnerable */
-       time_effect ult_res;            /* Timed -- Ultimate Resistance */
-       time_effect hero;               /* Timed -- Heroism */
-       time_effect shero;              /* Timed -- Super Heroism */
-       time_effect shield;             /* Timed -- Shield Spell */
-       time_effect blessed;            /* Timed -- Blessed */
-       time_effect tim_invis;          /* Timed -- See Invisible */
-       time_effect tim_infra;          /* Timed -- Infra Vision */
-       time_effect tsuyoshi;           /* Timed -- Tsuyoshi Special */
-       time_effect ele_attack; /* Timed -- Elemental Attack */
-       time_effect ele_immune; /* Timed -- Elemental Immune */
-
-       time_effect oppose_acid;        /* Timed -- oppose acid */
-       time_effect oppose_elec;        /* Timed -- oppose lightning */
-       time_effect oppose_fire;        /* Timed -- oppose heat */
-       time_effect oppose_cold;        /* Timed -- oppose cold */
-       time_effect oppose_pois;        /* Timed -- oppose poison */
-
-       time_effect tim_esp;       /* Timed ESP */
-       time_effect wraith_form;   /* Timed wraithform */
-
-       time_effect resist_magic;  /* Timed Resist Magic (later) */
-       time_effect tim_regen;
-       time_effect kabenuke;
-       time_effect tim_stealth;
-       time_effect tim_levitation;
-       time_effect tim_sh_touki;
-       time_effect lightspeed;
-       time_effect tsubureru;
-       time_effect magicdef;
-       time_effect tim_res_nether;     /* Timed -- Nether resistance */
-       time_effect tim_res_time;       /* Timed -- Time resistance */
+       TIME_EFFECT fast;               /* Timed -- Fast */
+       TIME_EFFECT slow;               /* Timed -- Slow */
+       TIME_EFFECT blind;              /* Timed -- Blindness */
+       TIME_EFFECT paralyzed;          /* Timed -- Paralysis */
+       TIME_EFFECT confused;           /* Timed -- Confusion */
+       TIME_EFFECT afraid;             /* Timed -- Fear */
+       TIME_EFFECT image;              /* Timed -- Hallucination */
+       TIME_EFFECT poisoned;           /* Timed -- Poisoned */
+       TIME_EFFECT cut;                /* Timed -- Cut */
+       TIME_EFFECT stun;               /* Timed -- Stun */
+
+       TIME_EFFECT protevil;           /* Timed -- Protection */
+       TIME_EFFECT invuln;             /* Timed -- Invulnerable */
+       TIME_EFFECT ult_res;            /* Timed -- Ultimate Resistance */
+       TIME_EFFECT hero;               /* Timed -- Heroism */
+       TIME_EFFECT shero;              /* Timed -- Super Heroism */
+       TIME_EFFECT shield;             /* Timed -- Shield Spell */
+       TIME_EFFECT blessed;            /* Timed -- Blessed */
+       TIME_EFFECT tim_invis;          /* Timed -- See Invisible */
+       TIME_EFFECT tim_infra;          /* Timed -- Infra Vision */
+       TIME_EFFECT tsuyoshi;           /* Timed -- Tsuyoshi Special */
+       TIME_EFFECT ele_attack; /* Timed -- Elemental Attack */
+       TIME_EFFECT ele_immune; /* Timed -- Elemental Immune */
+
+       TIME_EFFECT oppose_acid;        /* Timed -- oppose acid */
+       TIME_EFFECT oppose_elec;        /* Timed -- oppose lightning */
+       TIME_EFFECT oppose_fire;        /* Timed -- oppose heat */
+       TIME_EFFECT oppose_cold;        /* Timed -- oppose cold */
+       TIME_EFFECT oppose_pois;        /* Timed -- oppose poison */
+
+       TIME_EFFECT tim_esp;       /* Timed ESP */
+       TIME_EFFECT wraith_form;   /* Timed wraithform */
+
+       TIME_EFFECT resist_magic;  /* Timed Resist Magic (later) */
+       TIME_EFFECT tim_regen;
+       TIME_EFFECT kabenuke;
+       TIME_EFFECT tim_stealth;
+       TIME_EFFECT tim_levitation;
+       TIME_EFFECT tim_sh_touki;
+       TIME_EFFECT lightspeed;
+       TIME_EFFECT tsubureru;
+       TIME_EFFECT magicdef;
+       TIME_EFFECT tim_res_nether;     /* Timed -- Nether resistance */
+       TIME_EFFECT tim_res_time;       /* Timed -- Time resistance */
        byte mimic_form;
-       time_effect tim_mimic;
-       time_effect tim_sh_fire;
-       time_effect tim_sh_holy;
-       time_effect tim_eyeeye;
+       TIME_EFFECT tim_mimic;
+       TIME_EFFECT tim_sh_fire;
+       TIME_EFFECT tim_sh_holy;
+       TIME_EFFECT tim_eyeeye;
 
        /* for mirror master */
-       time_effect tim_reflect;       /* Timed -- Reflect */
-       time_effect multishadow;       /* Timed -- Multi-shadow */
-       time_effect dustrobe;          /* Timed -- Robe of dust */
+       TIME_EFFECT tim_reflect;       /* Timed -- Reflect */
+       TIME_EFFECT multishadow;       /* Timed -- Multi-shadow */
+       TIME_EFFECT dustrobe;          /* Timed -- Robe of dust */
 
        s16b chaos_patron;
        u32b muta1;
@@ -1101,9 +1101,9 @@ struct player_type
        u32b spell_forgotten2;    /* bit mask of spells learned but forgotten */
        byte spell_order[64];     /* order spells learned/remembered/forgotten */
 
-       sub_exp spell_exp[64];        /* Proficiency of spells */
-       sub_exp weapon_exp[5][64];    /* Proficiency of weapons */
-       sub_exp skill_exp[GINOU_MAX]; /* Proficiency of misc. skill */
+       SUB_EXP spell_exp[64];        /* Proficiency of spells */
+       SUB_EXP weapon_exp[5][64];    /* Proficiency of weapons */
+       SUB_EXP skill_exp[GINOU_MAX]; /* Proficiency of misc. skill */
 
        s32b magic_num1[108];     /* Array for non-spellbook type magic */
        byte magic_num2[108];     /* Flags for non-spellbook type magics */
@@ -1346,8 +1346,8 @@ struct player_type
 
        s16b energy_use;        /* Energy use this turn */
 
-       position y;     /* Player location in dungeon */
-       position x;     /* Player location in dungeon */
+       POSITION y;     /* Player location in dungeon */
+       POSITION x;     /* Player location in dungeon */
        char name[32]; /* Current player's character name */
 };
 
@@ -1594,8 +1594,8 @@ feat_prob;
 /* A structure for the != dungeon types */
 typedef struct dungeon_info_type dungeon_info_type;
 struct dungeon_info_type {
-       str_offset name;                /* Name */
-       str_offset text;                /* Description */
+       STR_OFFSET name;                /* Name */
+       STR_OFFSET text;                /* Description */
 
        byte dy;
        byte dx;
index f80152f..e5eb40b 100644 (file)
@@ -390,9 +390,9 @@ s16b panel_col_prt, panel_row_prt;
 /*
  * Targetting variables
  */
-idx target_who;
-position target_col;
-position target_row;
+IDX target_who;
+POSITION target_col;
+POSITION target_row;
 
 
 /*
index 59f80dc..aabfe93 100644 (file)
@@ -849,17 +849,12 @@ errr parse_line_wilderness(char *buf, int ymin, int xmin, int ymax, int xmax, in
                
                for (*x = xmin, i = 0; ((*x < xmax) && (i < len)); (*x)++, s++, i++)
                {
-                       int idx = s[0];
-                       
-                       wilderness[*y][*x].terrain = w_letter[idx].terrain;
-                       
-                       wilderness[*y][*x].level = w_letter[idx].level;
-                       
-                       wilderness[*y][*x].town = w_letter[idx].town;
-                       
-                       wilderness[*y][*x].road = w_letter[idx].road;
-                       
-                       strcpy(town[w_letter[idx].town].name, w_letter[idx].name);
+                       int id = s[0];
+                       wilderness[*y][*x].terrain = w_letter[id].terrain;
+                       wilderness[*y][*x].level = w_letter[id].level;
+                       wilderness[*y][*x].town = w_letter[id].town;
+                       wilderness[*y][*x].road = w_letter[id].road;
+                       strcpy(town[w_letter[id].town].name, w_letter[id].name);
                }
                
                (*y)++;
index fd5001f..4552a8d 100644 (file)
@@ -1436,7 +1436,7 @@ void monster_death(int m_idx, bool drop_item)
  * "type" is not yet used and should be 0.
  * </pre>
  */
-hit_point mon_damage_mod(monster_type *m_ptr, hit_point dam, bool is_psy_spear)
+HIT_POINT mon_damage_mod(monster_type *m_ptr, HIT_POINT dam, bool is_psy_spear)
 {
        monster_race    *r_ptr = &r_info[m_ptr->r_idx];