OSDN Git Service

[Refactor] #37287 #37353 型の置換。 / Type replacement.
authorDeskull <deskull@users.sourceforge.jp>
Tue, 6 Nov 2018 16:12:55 +0000 (01:12 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Tue, 6 Nov 2018 16:12:55 +0000 (01:12 +0900)
20 files changed:
src/cmd-spell.c
src/cmd-spell.h
src/cmd-zaprod.c
src/cmd-zapwand.c
src/externs.h
src/mspells2.c
src/object1.c
src/realm-arcane.c
src/realm-chaos.c
src/realm-crusade.c
src/realm-daemon.c
src/realm-death.c
src/realm-hex.c
src/realm-life.c
src/realm-nature.c
src/realm-song.c
src/realm-sorcery.c
src/realm-trump.c
src/spells2.c
src/wizard1.c

index e7d7b0a..b6816cd 100644 (file)
@@ -158,7 +158,7 @@ cptr info_power_dice(int dice, int sides)
  * @param rad 効果半径\r
  * @return フォーマットに従い整形された文字列\r
  */\r
-cptr info_radius(int rad)\r
+cptr info_radius(POSITION rad)\r
 {\r
        return format(_("半径:%d", "rad %d"), rad);\r
 }\r
index 4a9434b..1e8b3ce 100644 (file)
@@ -9,5 +9,5 @@ extern cptr info_multi_damage(HIT_POINT dam);
 extern cptr info_multi_damage_dice(int dice, int sides);\r
 extern cptr info_power(int power);\r
 extern cptr info_power_dice(int dice, int sides);\r
-extern cptr info_radius(int rad);\r
+extern cptr info_radius(POSITION rad);\r
 extern cptr info_weight(int weight);\r
index 93baa84..7f17995 100644 (file)
@@ -14,7 +14,7 @@ int rod_effect(OBJECT_SUBTYPE_VALUE sval, DIRECTION dir, bool *use_charge, bool
        int ident = FALSE;
        int lev = powerful ? p_ptr->lev * 2 : p_ptr->lev;
        int detect_rad = powerful ? DETECT_RAD_DEFAULT * 3 / 2 : DETECT_RAD_DEFAULT;
-       int rad = powerful ? 3 : 2;
+       POSITION rad = powerful ? 3 : 2;
 
        /* Unused */
        (void)magic;
index e06e892..0202225 100644 (file)
@@ -13,7 +13,7 @@ int wand_effect(OBJECT_SUBTYPE_VALUE sval, DIRECTION dir, bool powerful, bool ma
 {
        int ident = FALSE;
        int lev = powerful ? p_ptr->lev * 2 : p_ptr->lev;
-       int rad = powerful ? 3 : 2;
+       POSITION rad = powerful ? 3 : 2;
 
        /* XXX Hack -- Wand of wonder can do anything before it */
        if (sval == SV_WAND_WONDER)
index cd44f38..c3f5da8 100644 (file)
@@ -924,12 +924,12 @@ extern bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_i
 extern bool earthquake(POSITION cy, POSITION cx, POSITION r);
 extern void lite_room(POSITION y1, POSITION x1);
 extern void unlite_room(POSITION y1, POSITION x1);
-extern bool lite_area(HIT_POINT dam, int rad);
-extern bool unlite_area(HIT_POINT dam, int rad);
-extern bool fire_ball(int typ, DIRECTION dir, HIT_POINT dam, int rad);
-extern bool fire_breath(int typ, DIRECTION dir, HIT_POINT dam, int rad);
-extern bool fire_rocket(int typ, DIRECTION dir, HIT_POINT dam, int rad);
-extern bool fire_ball_hide(int typ, DIRECTION dir, HIT_POINT dam, int rad);
+extern bool lite_area(HIT_POINT dam, POSITION rad);
+extern bool unlite_area(HIT_POINT dam, POSITION rad);
+extern bool fire_ball(int typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
+extern bool fire_breath(int typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
+extern bool fire_rocket(int typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
+extern bool fire_ball_hide(int typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
 extern bool fire_meteor(MONSTER_IDX who, EFFECT_ID typ, POSITION x, POSITION y, HIT_POINT dam, POSITION rad);
 extern bool fire_bolt(int typ, DIRECTION dir, HIT_POINT dam);
 extern bool fire_blast(int typ, DIRECTION dir, int dd, int ds, int num, int dev);
@@ -992,8 +992,8 @@ extern bool rush_attack(bool *mdeath);
 extern void remove_all_mirrors(bool explode);
 extern void ring_of_power(DIRECTION dir);
 extern void wild_magic(int spell);
-extern void cast_meteor(HIT_POINT dam, int rad);
-extern bool cast_wrath_of_the_god(HIT_POINT dam, int rad);
+extern void cast_meteor(HIT_POINT dam, POSITION rad);
+extern bool cast_wrath_of_the_god(HIT_POINT dam, POSITION rad);
 extern void cast_wonder(DIRECTION dir);
 extern void cast_invoke_spirits(DIRECTION dir);
 extern void cast_shuffle(void);
index a38431d..f66dd59 100644 (file)
@@ -528,7 +528,7 @@ bool monst_spell_monst(MONSTER_IDX m_idx)
                            (f6 & RF6_BREATH_MASK))
                        {
                                /* Expected breath radius */
-                               int rad = (r_ptr->flags2 & RF2_POWERFUL) ? 3 : 2;
+                               POSITION rad = (r_ptr->flags2 & RF2_POWERFUL) ? 3 : 2;
 
                                if (!breath_direct(m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx, rad, 0, TRUE))
                                {
index 13359d5..fdba093 100644 (file)
@@ -520,7 +520,7 @@ bool screen_object(object_type *o_ptr, BIT_FLAGS mode)
        cptr            info[128];
        char o_name[MAX_NLEN];
        int wid, hgt;
-       int rad;
+       POSITION rad;
        char desc[256];
 
        int trivial_info = 0;
@@ -627,12 +627,12 @@ bool screen_object(object_type *o_ptr, BIT_FLAGS mode)
                
        if (have_flag(flgs, TR_LITE_FUEL) && o_ptr->name2 != EGO_LITE_DARKNESS)
        {
-               if(rad > 0) sprintf(desc, _("それは燃料補給によって明かり(半径 %d)を授ける。", "It provides light (radius %d) when fueled."), rad);        
+               if(rad > 0) sprintf(desc, _("それは燃料補給によって明かり(半径 %d)を授ける。", "It provides light (radius %d) when fueled."), (int)rad);   
        }
        else
        {
-               if(rad > 0) sprintf(desc, _("それは永遠なる明かり(半径 %d)を授ける。", "It provides light (radius %d) forever."), rad);        
-               if(rad < 0) sprintf(desc, _("それは明かりの半径を狭める(半径に-%d)。", "It decreases radius of light source by %d."), -rad);
+               if(rad > 0) sprintf(desc, _("それは永遠なる明かり(半径 %d)を授ける。", "It provides light (radius %d) forever."), (int)rad);
+               if(rad < 0) sprintf(desc, _("それは明かりの半径を狭める(半径に-%d)。", "It decreases radius of light source by %d."), (int)-rad);
        }
        
        if(rad != 0) info[i++] = desc;
index c0f6620..0ee0d1e 100644 (file)
@@ -57,7 +57,7 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("近くの透明なモンスターを感知する。", "Detects all invisible monsters in your vicinity.");
 
                {
-                       int rad = DETECT_RAD_DEFAULT;
+                       POSITION rad = DETECT_RAD_DEFAULT;
 
                        if (info) return info_radius(rad);
 
@@ -73,7 +73,7 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("近くの全ての見えるモンスターを感知する。", "Detects all monsters in your vicinity unless invisible.");
 
                {
-                       int rad = DETECT_RAD_DEFAULT;
+                       POSITION rad = DETECT_RAD_DEFAULT;
 
                        if (info) return info_radius(rad);
 
@@ -107,7 +107,7 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
                {
                        int dice = 2;
                        int sides = plev / 2;
-                       int rad = plev / 10 + 1;
+                       POSITION rad = plev / 10 + 1;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -150,7 +150,7 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("近くの全ての罠と扉と階段を感知する。", "Detects traps, doors, and stairs in your vicinity.");
 
                {
-                       int rad = DETECT_RAD_DEFAULT;
+                       POSITION rad = DETECT_RAD_DEFAULT;
 
                        if (info) return info_radius(rad);
 
@@ -180,7 +180,7 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("近くの財宝を感知する。", "Detects all treasures in your vicinity.");
 
                {
-                       int rad = DETECT_RAD_DEFAULT;
+                       POSITION rad = DETECT_RAD_DEFAULT;
 
                        if (info) return info_radius(rad);
 
@@ -197,7 +197,7 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("近くの魔法がかかったアイテムを感知する。", "Detects all magical items in your vicinity.");
 
                {
-                       int rad = DETECT_RAD_DEFAULT;
+                       POSITION rad = DETECT_RAD_DEFAULT;
 
                        if (info) return info_radius(rad);
 
@@ -213,7 +213,7 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("近くの全てのアイテムを感知する。", "Detects all items in your vicinity.");
 
                {
-                       int rad = DETECT_RAD_DEFAULT;
+                       POSITION rad = DETECT_RAD_DEFAULT;
 
                        if (info) return info_radius(rad);
 
@@ -464,7 +464,7 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        HIT_POINT dam = 75 + plev;
-                       int rad = 2;
+                       POSITION rad = 2;
 
                        if (info) return info_damage(0, 0, dam);
 
@@ -493,7 +493,7 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
                        "Detects all monsters, traps, doors, stairs, treasures and items in your vicinity.");
 
                {
-                       int rad = DETECT_RAD_DEFAULT;
+                       POSITION rad = DETECT_RAD_DEFAULT;
 
                        if (info) return info_radius(rad);
 
index 5af95e8..eb579c8 100644 (file)
@@ -46,7 +46,7 @@ cptr do_chaos_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("隣接する罠と扉を破壊する。", "Destroys all traps in adjacent squares.");
 
                {
-                       int rad = 1;
+                       POSITION rad = 1;
 
                        if (info) return info_radius(rad);
 
@@ -64,7 +64,7 @@ cptr do_chaos_spell(SPELL_IDX spell, BIT_FLAGS mode)
                {
                        int dice = 2;
                        int sides = plev / 2;
-                       int rad = (plev / 10) + 1;
+                       POSITION rad = (plev / 10) + 1;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -99,7 +99,7 @@ cptr do_chaos_spell(SPELL_IDX spell, BIT_FLAGS mode)
                {
                        int dice = 3;
                        int sides = 5;
-                       int rad = (plev < 30) ? 2 : 3;
+                       POSITION rad = (plev < 30) ? 2 : 3;
                        int base;
 
                        if (IS_WIZARD_CLASS())
@@ -221,7 +221,7 @@ cptr do_chaos_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        HIT_POINT dam = 60 + plev;
-                       int rad = plev / 10 + 2;
+                       POSITION rad = plev / 10 + 2;
 
                        if (info) return info_damage(0, 0, dam / 2);
 
@@ -258,7 +258,7 @@ cptr do_chaos_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        HIT_POINT dam = plev + 55;
-                       int rad = 2;
+                       POSITION rad = 2;
 
                        if (info) return info_damage(0, 0, dam);
 
@@ -310,7 +310,7 @@ cptr do_chaos_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        HIT_POINT dam = plev * 2 + 99;
-                       int rad = plev / 5;
+                       POSITION rad = plev / 5;
 
                        if (info) return info_damage(0, 0, dam);
 
@@ -380,7 +380,7 @@ cptr do_chaos_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        HIT_POINT dam = plev + 70;
-                       int rad = 3 + plev / 40;
+                       POSITION rad = 3 + plev / 40;
 
                        if (info) return info_damage(0, 0, dam);
 
@@ -416,7 +416,7 @@ cptr do_chaos_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        HIT_POINT dam = 120 + plev * 2;
-                       int rad = 2;
+                       POSITION rad = 2;
 
                        if (info) return info_damage(0, 0, dam);
 
@@ -497,7 +497,7 @@ cptr do_chaos_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        HIT_POINT dam = plev * 2;
-                       int rad = 2;
+                       POSITION rad = 2;
 
                        if (info) return info_multi_damage(dam);
 
@@ -514,7 +514,7 @@ cptr do_chaos_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        HIT_POINT dam = 300 + 3 * plev;
-                       int rad = 8;
+                       POSITION rad = 8;
 
                        if (info) return info_damage(0, 0, dam / 2);
 
@@ -558,7 +558,7 @@ cptr do_chaos_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        HIT_POINT dam = 300 + plev * 4;
-                       int rad = 4;
+                       POSITION rad = 4;
 
                        if (info) return info_damage(0, 0, dam);
 
@@ -576,7 +576,7 @@ cptr do_chaos_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        HIT_POINT dam = p_ptr->chp;
-                       int rad = 2;
+                       POSITION rad = 2;
 
                        if (info) return info_damage(0, 0, dam);
 
index 8cb5ce3..57d5383 100644 (file)
@@ -45,7 +45,7 @@ cptr do_crusade_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("近くの邪悪なモンスターを感知する。", "Detects all evil monsters in your vicinity.");
 
                {
-                       int rad = DETECT_RAD_DEFAULT;
+                       POSITION rad = DETECT_RAD_DEFAULT;
 
                        if (info) return info_radius(rad);
 
@@ -175,7 +175,7 @@ cptr do_crusade_spell(SPELL_IDX spell, BIT_FLAGS mode)
                {
                        int dice = 3;
                        int sides = 6;
-                       int rad = (plev < 30) ? 2 : 3;
+                       POSITION rad = (plev < 30) ? 2 : 3;
                        int base;
 
                        if (p_ptr->pclass == CLASS_PRIEST ||
@@ -403,7 +403,7 @@ cptr do_crusade_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        HIT_POINT dam = 100 + plev * 2;
-                       int rad = 4;
+                       POSITION rad = 4;
 
                        if (info) return info_damage(0, 0, dam);
 
@@ -534,7 +534,7 @@ cptr do_crusade_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        HIT_POINT dam = plev * 3 + 25;
-                       int rad = 2;
+                       POSITION rad = 2;
 
                        if (info) return info_multi_damage(dam);
 
index 4dc2f55..79458db 100644 (file)
@@ -46,7 +46,7 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("近くの生命のないモンスターを感知する。", "Detects all nonliving monsters in your vicinity.");
 
                {
-                       int rad = DETECT_RAD_DEFAULT;
+                       POSITION rad = DETECT_RAD_DEFAULT;
 
                        if (info) return info_radius(rad);
 
@@ -151,7 +151,7 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
                {
                        int dice = 3;
                        int sides = 6;
-                       int rad = (plev < 30) ? 2 : 3;
+                       POSITION rad = (plev < 30) ? 2 : 3;
                        int base;
 
                        if (IS_WIZARD_CLASS())
@@ -194,7 +194,7 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("周辺の地形を感知する。", "Maps nearby area.");
 
                {
-                       int rad = DETECT_RAD_MAP;
+                       POSITION rad = DETECT_RAD_MAP;
 
                        if (info) return info_radius(rad);
 
@@ -246,7 +246,7 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        HIT_POINT dam = plev + 55;
-                       int rad = 2;
+                       POSITION rad = 2;
 
                        if (info) return info_damage(0, 0, dam);
 
@@ -277,7 +277,7 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        HIT_POINT dam = plev * 3 / 2 + 100;
-                       int rad = plev / 20 + 2;
+                       POSITION rad = plev / 20 + 2;
 
                        if (info) return info_damage(0, 0, dam);
 
@@ -374,7 +374,7 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        HIT_POINT dam = (55 + plev) * 2;
-                       int rad = 3;
+                       POSITION rad = 3;
 
                        if (info) return info_damage(0, 0, dam / 2);
 
@@ -392,7 +392,7 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        HIT_POINT dam = plev * 3 / 2 + 80;
-                       int rad = 2 + plev / 40;
+                       POSITION rad = 2 + plev / 40;
 
                        if (info) return info_damage(0, 0, dam);
 
@@ -447,7 +447,7 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        HIT_POINT dam = 100 + plev * 2;
-                       int rad = 4;
+                       POSITION rad = 4;
 
                        if (info) return info_damage(0, 0, dam);
 
@@ -511,7 +511,7 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
                {
                        HIT_POINT dam = 50 + plev;
                        int power = 20 + plev;
-                       int rad = 3 + plev / 20;
+                       POSITION rad = 3 + plev / 20;
 
                        if (info) return format("%s%d+%d", s_dam, dam / 2, dam / 2);
 
@@ -555,7 +555,7 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        HIT_POINT dam = plev * 15;
-                       int rad = plev / 5;
+                       POSITION rad = plev / 5;
 
                        if (info) return info_damage(0, 0, dam);
 
@@ -575,7 +575,7 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        HIT_POINT dam = 600;
-                       int rad = 0;
+                       POSITION rad = 0;
 
                        if (info) return info_damage(0, 0, dam);
 
index 8d60120..8a6a908 100644 (file)
@@ -29,7 +29,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("近くの生命のないモンスターを感知する。", "Detects all nonliving monsters in your vicinity.");
 
                {
-                       int rad = DETECT_RAD_DEFAULT;
+                       POSITION rad = DETECT_RAD_DEFAULT;
 
                        if (info) return info_radius(rad);
 
@@ -48,7 +48,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
                {
                        int dice = 3 + (plev - 1) / 5;
                        int sides = 4;
-                       int rad = 0;
+                       POSITION rad = 0;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -89,7 +89,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("近くの邪悪なモンスターを感知する。", "Detects all evil monsters in your vicinity.");
 
                {
-                       int rad = DETECT_RAD_DEFAULT;
+                       POSITION rad = DETECT_RAD_DEFAULT;
 
                        if (info) return info_radius(rad);
 
@@ -106,7 +106,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        HIT_POINT dam = 10 + plev / 2;
-                       int rad = 2;
+                       POSITION rad = 2;
 
                        if (info) return info_damage(0, 0, dam);
 
@@ -198,7 +198,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
                {
                        int dice = 3;
                        int sides = 6;
-                       int rad = (plev < 30) ? 2 : 3;
+                       POSITION rad = (plev < 30) ? 2 : 3;
                        int base;
 
                        if (IS_WIZARD_CLASS())
@@ -243,7 +243,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        HIT_POINT dam = (30 + plev) * 2;
-                       int rad = plev / 10 + 2;
+                       POSITION rad = plev / 10 + 2;
 
                        if (info) return info_damage(0, 0, dam / 2);
 
@@ -491,7 +491,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        HIT_POINT dam = 100 + plev * 2;
-                       int rad = 4;
+                       POSITION rad = 4;
 
                        if (info) return info_damage(0, 0, dam);
 
@@ -633,7 +633,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        HIT_POINT dam = 666;
-                       int rad = 3;
+                       POSITION rad = 3;
 
                        if (info) return info_damage(0, 0, dam);
 
index b66c1ba..9074799 100644 (file)
@@ -539,7 +539,7 @@ cptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
                }
                if (cont)
                {
-                       int rad = 2 + (power / 50);
+                       POSITION rad = 2 + (power / 50);
 
                        HEX_REVENGE_TURN(p_ptr)--;
 
index 0de91ac..0f6ec7e 100644 (file)
@@ -68,7 +68,7 @@ cptr do_life_spell(SPELL_IDX spell, BIT_FLAGS mode)
                {
                        int dice = 2;
                        int sides = plev / 2;
-                       int rad = plev / 10 + 1;
+                       POSITION rad = plev / 10 + 1;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -83,7 +83,7 @@ cptr do_life_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (name) return _("罠 & 隠し扉感知", "Detect Doors & Traps");
                if (desc) return _("近くの全ての罠と扉と階段を感知する。", "Detects traps, doors, and stairs in your vicinity.");
                {
-                       int rad = DETECT_RAD_DEFAULT;
+                       POSITION rad = DETECT_RAD_DEFAULT;
 
                        if (info) return info_radius(rad);
 
@@ -196,7 +196,7 @@ cptr do_life_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("周辺の地形を感知する。", "Maps nearby area.");
 
                {
-                       int rad = DETECT_RAD_MAP;
+                       POSITION rad = DETECT_RAD_MAP;
 
                        if (info) return info_radius(rad);
 
@@ -360,7 +360,7 @@ cptr do_life_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("自分のいる床と周囲8マスの床の上に、モンスターが通り抜けたり召喚されたりすることができなくなるルーンを描く。", "Creates glyphs in all adjacent squares and under you.");
 
                {
-                       int rad = 1;
+                       POSITION rad = 1;
 
                        if (info) return info_radius(rad);
 
@@ -389,7 +389,7 @@ cptr do_life_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("近くの全てのモンスター、罠、扉、階段、財宝、そしてアイテムを感知する。", "Detects all monsters, traps, doors, stairs, treasures and items in your vicinity.");
 
                {
-                       int rad = DETECT_RAD_DEFAULT;
+                       POSITION rad = DETECT_RAD_DEFAULT;
 
                        if (info) return info_radius(rad);
 
index 48a9069..41d30bf 100644 (file)
@@ -28,7 +28,7 @@ cptr do_nature_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("近くの全ての見えるモンスターを感知する。", "Detects all monsters in your vicinity unless invisible.");\r
 \r
                {\r
-                       int rad = DETECT_RAD_DEFAULT;\r
+                       POSITION rad = DETECT_RAD_DEFAULT;\r
 \r
                        if (info) return info_radius(rad);\r
 \r
@@ -66,7 +66,7 @@ cptr do_nature_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("近くの全ての罠と扉を感知する。", "Detects traps, doors, and stairs in your vicinity.");\r
 \r
                {\r
-                       int rad = DETECT_RAD_DEFAULT;\r
+                       POSITION rad = DETECT_RAD_DEFAULT;\r
 \r
                        if (info) return info_radius(rad);\r
 \r
@@ -105,7 +105,7 @@ cptr do_nature_spell(SPELL_IDX spell, BIT_FLAGS mode)
                {\r
                        int dice = 2;\r
                        int sides = plev / 2;\r
-                       int rad = (plev / 10) + 1;\r
+                       POSITION rad = (plev / 10) + 1;\r
 \r
                        if (info) return info_damage(dice, sides, 0);\r
 \r
@@ -437,7 +437,7 @@ cptr do_nature_spell(SPELL_IDX spell, BIT_FLAGS mode)
                        "Shakes dungeon structure, and results in random swapping of floors and walls.");\r
 \r
                {\r
-                       int rad = 10;\r
+                       POSITION rad = 10;\r
 \r
                        if (info) return info_radius(rad);\r
 \r
@@ -482,7 +482,7 @@ cptr do_nature_spell(SPELL_IDX spell, BIT_FLAGS mode)
 \r
                {\r
                        HIT_POINT dam = 70 + plev * 3 / 2;\r
-                       int rad = plev / 12 + 1;\r
+                       POSITION rad = plev / 12 + 1;\r
 \r
                        if (info) return info_damage(0, 0, dam);\r
 \r
@@ -501,7 +501,7 @@ cptr do_nature_spell(SPELL_IDX spell, BIT_FLAGS mode)
 \r
                {\r
                        HIT_POINT dam = 90 + plev * 3 / 2;\r
-                       int rad = plev / 12 + 1;\r
+                       POSITION rad = plev / 12 + 1;\r
 \r
                        if (info) return info_damage(0, 0, dam);\r
 \r
@@ -520,7 +520,7 @@ cptr do_nature_spell(SPELL_IDX spell, BIT_FLAGS mode)
 \r
                {\r
                        HIT_POINT dam = 100 + plev * 3 / 2;\r
-                       int rad = plev / 12 + 1;\r
+                       POSITION rad = plev / 12 + 1;\r
 \r
                        if (info) return info_damage(0, 0, dam);\r
 \r
@@ -539,7 +539,7 @@ cptr do_nature_spell(SPELL_IDX spell, BIT_FLAGS mode)
 \r
                {\r
                        HIT_POINT dam = 150;\r
-                       int rad = 8;\r
+                       POSITION rad = 8;\r
 \r
                        if (info) return info_damage(0, 0, dam / 2);\r
 \r
index d053f3e..ce62369 100644 (file)
@@ -218,7 +218,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                {
                        int dice = 2;
                        int sides = plev / 2;
-                       int rad = plev / 10 + 1;
+                       POSITION rad = plev / 10 + 1;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -305,7 +305,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                }
 
                {
-                       int rad = DETECT_RAD_DEFAULT;
+                       POSITION rad = DETECT_RAD_DEFAULT;
 
                        if (info) return info_radius(rad);
 
@@ -390,7 +390,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                }
 
                {
-                       int rad = 1;
+                       POSITION rad = 1;
 
                        if (info) return info_radius(rad);
 
@@ -623,7 +623,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("近くのモンスターをテレポートさせる。抵抗されると無効。", "Teleports all nearby monsters away unless resisted.");
 
                {
-                       int rad = plev / 15 + 1;
+                       POSITION rad = plev / 15 + 1;
                        int power = plev * 3 + 1;
 
                        if (info) return info_radius(rad);
@@ -752,7 +752,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                }
 
                {
-                       int rad = 10;
+                       POSITION rad = 10;
 
                        if (info) return info_radius(rad);
 
@@ -910,7 +910,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
                {
                        int dice = 50 + plev;
                        int sides = 10;
-                       int rad = 0;
+                       POSITION rad = 0;
 
                        if (info) return info_damage(dice, sides, 0);
 
index 654b4c8..0651966 100644 (file)
@@ -25,7 +25,7 @@ cptr do_sorcery_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("近くの全ての見えるモンスターを感知する。", "Detects all monsters in your vicinity unless invisible.");
 
                {
-                       int rad = DETECT_RAD_DEFAULT;
+                       POSITION rad = DETECT_RAD_DEFAULT;
 
                        if (info) return info_radius(rad);
 
@@ -57,7 +57,7 @@ cptr do_sorcery_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("近くの全ての扉と罠を感知する。", "Detects traps, doors, and stairs in your vicinity.");
 
                {
-                       int rad = DETECT_RAD_DEFAULT;
+                       POSITION rad = DETECT_RAD_DEFAULT;
 
                        if (info) return info_radius(rad);
 
@@ -77,7 +77,7 @@ cptr do_sorcery_spell(SPELL_IDX spell, BIT_FLAGS mode)
                {
                        int dice = 2;
                        int sides = plev / 2;
-                       int rad = plev / 10 + 1;
+                       POSITION rad = plev / 10 + 1;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -161,7 +161,7 @@ cptr do_sorcery_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("周辺の地形を感知する。", "Maps nearby area.");
 
                {
-                       int rad = DETECT_RAD_MAP;
+                       POSITION rad = DETECT_RAD_MAP;
 
                        if (info) return info_radius(rad);
 
@@ -259,7 +259,7 @@ cptr do_sorcery_spell(SPELL_IDX spell, BIT_FLAGS mode)
                        "Detects all monsters, traps, doors, stairs, treasures and items in your vicinity.");
 
                {
-                       int rad = DETECT_RAD_DEFAULT;
+                       POSITION rad = DETECT_RAD_DEFAULT;
 
                        if (info) return info_radius(rad);
 
@@ -287,7 +287,7 @@ cptr do_sorcery_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("近くの全てのアイテムと財宝を感知する。", "Detects all treasures and items in your vicinity.");
 
                {
-                       int rad = DETECT_RAD_DEFAULT;
+                       POSITION rad = DETECT_RAD_DEFAULT;
 
                        if (info) return info_radius(rad);
 
index b5ea23f..35d4299 100644 (file)
@@ -489,7 +489,7 @@ cptr do_trump_spell(SPELL_IDX spell, BIT_FLAGS mode)
                        "Detects all monsters, traps, doors, stairs, treasures and items in your vicinity.");
 
                {
-                       int rad = DETECT_RAD_DEFAULT;
+                       POSITION rad = DETECT_RAD_DEFAULT;
 
                        if (info) return info_radius(rad);
 
@@ -566,7 +566,7 @@ cptr do_trump_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        HIT_POINT dam = plev * 2;
-                       int rad = 2;
+                       POSITION rad = 2;
 
                        if (info) return info_multi_damage(dam);
 
index 4ab644d..731333b 100644 (file)
@@ -2797,7 +2797,7 @@ void unlite_room(POSITION y1, POSITION x1)
  * @param rad 効果半径
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool lite_area(HIT_POINT dam, int rad)
+bool lite_area(HIT_POINT dam, POSITION rad)
 {
        BIT_FLAGS flg = PROJECT_GRID | PROJECT_KILL;
 
@@ -2830,7 +2830,7 @@ bool lite_area(HIT_POINT dam, int rad)
  * @param rad 効果半径
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool unlite_area(HIT_POINT dam, int rad)
+bool unlite_area(HIT_POINT dam, POSITION rad)
 {
        BIT_FLAGS flg = PROJECT_GRID | PROJECT_KILL;
 
@@ -2866,7 +2866,7 @@ bool unlite_area(HIT_POINT dam, int rad)
  * Affect grids, objects, and monsters
  * </pre>
  */
-bool fire_ball(int typ, DIRECTION dir, HIT_POINT dam, int rad)
+bool fire_ball(int typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
 {
        int tx, ty;
 
@@ -2903,7 +2903,7 @@ bool fire_ball(int typ, DIRECTION dir, HIT_POINT dam, int rad)
 * Affect grids, objects, and monsters
 * </pre>
 */
-bool fire_breath(int typ, DIRECTION dir, HIT_POINT dam, int rad)
+bool fire_breath(int typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
 {
        return fire_ball(typ, dir, dam, -rad);
 }
@@ -2923,7 +2923,7 @@ bool fire_breath(int typ, DIRECTION dir, HIT_POINT dam, int rad)
  * Affect grids, objects, and monsters
  * </pre>
  */
-bool fire_rocket(int typ, DIRECTION dir, HIT_POINT dam, int rad)
+bool fire_rocket(int typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
 {
        int tx, ty;
 
@@ -2959,7 +2959,7 @@ bool fire_rocket(int typ, DIRECTION dir, HIT_POINT dam, int rad)
  * Affect grids, objects, and monsters
  * </pre>
  */
-bool fire_ball_hide(int typ, DIRECTION dir, HIT_POINT dam, int rad)
+bool fire_ball_hide(int typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
 {
        int tx, ty;
 
@@ -4437,7 +4437,7 @@ void wild_magic(int spell)
 * @param rad 効力の半径
 * @return なし
 */
-void cast_meteor(HIT_POINT dam, int rad)
+void cast_meteor(HIT_POINT dam, POSITION rad)
 {
        int i;
        int b = 10 + randint1(10);
@@ -4482,7 +4482,7 @@ void cast_meteor(HIT_POINT dam, int rad)
 * @param rad 効力の半径
 * @return ターゲットを指定し、実行したならばTRUEを返す。
 */
-bool cast_wrath_of_the_god(HIT_POINT dam, int rad)
+bool cast_wrath_of_the_god(HIT_POINT dam, POSITION rad)
 {
        POSITION x, y, tx, ty;
        POSITION nx, ny;
index 8eee54f..ed2ad49 100644 (file)
@@ -1252,7 +1252,7 @@ static void analyze_sustains(object_type *o_ptr, cptr *sustain_list)
 static void analyze_misc_magic(object_type *o_ptr, cptr *misc_list)
 {
        u32b flgs[TR_FLAG_SIZE];
-       int rad;
+       POSITION rad;
        char desc[256];
 
        object_flags(o_ptr, flgs);
@@ -1278,12 +1278,12 @@ static void analyze_misc_magic(object_type *o_ptr, cptr *misc_list)
 
        if (have_flag(flgs, TR_LITE_FUEL))
        {
-               if(rad > 0) sprintf(desc, _("それは燃料補給によって明かり(半径 %d)を授ける。", "It provides light (radius %d) when fueled."), rad);        
+               if(rad > 0) sprintf(desc, _("それは燃料補給によって明かり(半径 %d)を授ける。", "It provides light (radius %d) when fueled."), (int)rad);   
        }
        else
        {
-               if(rad > 0) sprintf(desc, _("永久光源(半径 %d)", "Permanent Light(radius %d)"), rad);     
-               if(rad < 0) sprintf(desc, _("永久光源(半径-%d)。", "Permanent Light(radius -%d)"), -rad);
+               if(rad > 0) sprintf(desc, _("永久光源(半径 %d)", "Permanent Light(radius %d)"), (int)rad);        
+               if(rad < 0) sprintf(desc, _("永久光源(半径-%d)。", "Permanent Light(radius -%d)"), (int)-rad);
        }
 
        if(rad != 0) *misc_list++ = quark_str(quark_add(desc));