OSDN Git Service

#37287 #37353 (2.2.0.89) 型の置換を継続中。 / Ongoing type replacement.
[hengband/hengband.git] / src / cmd5.c
index 20aa78e..11e9b30 100644 (file)
@@ -77,6 +77,7 @@ static int get_spell(SPELL_IDX *sn, cptr prompt, OBJECT_SUBTYPE_VALUE sval, bool
        const magic_type  *s_ptr;
        char        out_val[160];
        cptr        p;
+       COMMAND_CODE code;
 #ifdef JP
        char jverb_buf[128];
 #endif
@@ -85,8 +86,9 @@ static int get_spell(SPELL_IDX *sn, cptr prompt, OBJECT_SUBTYPE_VALUE sval, bool
 #ifdef ALLOW_REPEAT /* TNB */
 
        /* Get the spell, if available */
-       if (repeat_pull(sn))
+       if (repeat_pull(&code))
        {
+               *sn = (SPELL_IDX)code;
                /* Verify the spell */
                if (spell_okay(*sn, learned, FALSE, use_realm))
                {
@@ -338,7 +340,7 @@ static int get_spell(SPELL_IDX *sn, cptr prompt, OBJECT_SUBTYPE_VALUE sval, bool
 
 #ifdef ALLOW_REPEAT /* TNB */
 
-       repeat_push(*sn);
+       repeat_push((COMMAND_CODE)spell);
 
 #endif /* ALLOW_REPEAT -- TNB */
 
@@ -406,14 +408,16 @@ static bool player_has_no_spellbooks(void)
  */
 static void confirm_use_force(bool browse_only)
 {
-       SPELL_IDX item;
+       INVENTORY_IDX item;
        char which;
+       COMMAND_CODE code;
 
 #ifdef ALLOW_REPEAT
 
        /* Get the item index */
-       if (repeat_pull(&item) && (item == INVEN_FORCE))
+       if (repeat_pull(&code) && (code == INVEN_FORCE))
        {
+               item = (INVENTORY_IDX)code;
                browse_only ? do_cmd_mind_browse() : do_cmd_mind();
                return;
        }
@@ -466,14 +470,15 @@ static void confirm_use_force(bool browse_only)
  */
 void do_cmd_browse(void)
 {
-       int             item, sval;
+       OBJECT_IDX item;
+       OBJECT_SUBTYPE_VALUE sval;
        REALM_IDX use_realm = 0;
        int j, line;
        SPELL_IDX spell = -1;
-       int             num = 0;
+       int num = 0;
 
-       int             spells[64];
-       char    temp[62*4];
+       SPELL_IDX spells[64];
+       char temp[62*4];
 
        object_type     *o_ptr;
 
@@ -656,7 +661,8 @@ static void change_realm2(CHARACTER_IDX next_realm)
  */
 void do_cmd_study(void)
 {
-       int     i, item;
+       int     i;
+       OBJECT_IDX item;
        OBJECT_SUBTYPE_VALUE sval;
        int     increment = 0;
        bool    learned = FALSE;
@@ -1054,21 +1060,18 @@ static void wild_magic(int spell)
  */
 void do_cmd_cast(void)
 {
-       int     item;
+       OBJECT_IDX item;
        OBJECT_SUBTYPE_VALUE sval;
        SPELL_IDX spell;
        REALM_IDX realm;
        int     chance;
        int     increment = 0;
-       int     use_realm;
-       int     need_mana;
+       REALM_IDX use_realm;
+       MANA_POINT need_mana;
 
        cptr prayer;
-
        object_type     *o_ptr;
-
        const magic_type *s_ptr;
-
        cptr q, s;
 
        bool over_exerted = FALSE;
@@ -1668,7 +1671,7 @@ void do_cmd_pet_dismiss(void)
        MONSTER_IDX *who;
        u16b dummy_why;
        int max_pet = 0;
-       int cu, cv;
+       bool_hack cu, cv;
 
        cu = Term->scr->cu;
        cv = Term->scr->cv;
@@ -1846,7 +1849,7 @@ static bool player_can_ride_aux(cave_type *c_ptr, bool now_riding)
  * @param force TRUEならば強制的に落馬する
  * @return 実際に落馬したらTRUEを返す
  */
-bool rakuba(int dam, bool force)
+bool rakuba(HIT_POINT dam, bool force)
 {
        int i, y, x, oy, ox;
        int sn = 0, sy = 0, sx = 0;
@@ -2208,7 +2211,7 @@ static void do_name_pet(void)
  */
 void do_cmd_pet(void)
 {
-       SPELL_IDX i = 0;
+       COMMAND_CODE i = 0;
        int                     num;
        int                     powers[36];
        cptr                    power_desc[36];
@@ -2218,7 +2221,7 @@ void do_cmd_pet(void)
        int                     pet_ctr;
        monster_type    *m_ptr;
 
-       int mode = 0;
+       PET_COMMAND_IDX mode = 0;
 
        char buf[160];
        char target_buf[160];
@@ -2475,7 +2478,7 @@ void do_cmd_pet(void)
                        if (!redraw || use_menu)
                        {
                                byte y = 1, x = 0;
-                               int ctr = 0;
+                               PET_COMMAND_IDX ctr = 0;
 
                                /* Show list */
                                redraw = TRUE;