OSDN Git Service

#37287 #37353 (2.2.0.89) 型の置換を継続中。 / Ongoing type replacement.
authorDeskull <desull@users.sourceforge.jp>
Wed, 20 Dec 2017 13:27:35 +0000 (22:27 +0900)
committerDeskull <desull@users.sourceforge.jp>
Wed, 20 Dec 2017 13:27:35 +0000 (22:27 +0900)
src/cmd5.c
src/do-spell.c
src/hissatsu.c
src/mind.c
src/mspells3.c
src/util.c

index ec5604c..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;
        }
index 75cf04d..7d848c0 100644 (file)
@@ -989,10 +989,10 @@ static bool cast_summon_greater_demon(void)
 static void start_singing(SPELL_IDX spell, MAGIC_NUM1 song)
 {
        /* Remember the song index */
-       SINGING_SONG_EFFECT(p_ptr) = (MAGIC_NUM2)song;
+       SINGING_SONG_EFFECT(p_ptr) = (MAGIC_NUM1)song;
 
        /* Remember the index of the spell which activated the song */
-       SINGING_SONG_ID(p_ptr) = (SPELL_IDX)spell;
+       SINGING_SONG_ID(p_ptr) = (MAGIC_NUM2)spell;
 
 
        /* Now the player is singing */
index e8ebacd..e08c2c3 100644 (file)
@@ -45,7 +45,7 @@ static int get_hissatsu_power(SPELL_IDX *sn)
        char            out_val[160];
        SPELL_IDX sentaku[32];
        cptr            p = _("必殺剣", "special attack");
-
+       COMMAND_CODE code;
        magic_type spell;
        bool            flag, redraw;
        int menu_line = (use_menu ? 1 : 0);
@@ -56,8 +56,9 @@ static int get_hissatsu_power(SPELL_IDX *sn)
 #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 (technic_info[TECHNIC_HISSATSU][*sn].slevel <= plev)
                {
@@ -310,7 +311,7 @@ static int get_hissatsu_power(SPELL_IDX *sn)
 
 #ifdef ALLOW_REPEAT /* TNB */
 
-       repeat_push(*sn);
+       repeat_push((COMMAND_CODE)j);
 
 #endif /* ALLOW_REPEAT -- TNB */
 
index e153684..90717d5 100644 (file)
@@ -689,7 +689,7 @@ static bool_hack get_mind_power(SPELL_IDX *sn, bool only_browse)
        char            out_val[160];
        char            comment[80];
        cptr            p;
-
+       COMMAND_CODE code;
        mind_type       spell;
        const mind_power      *mind_ptr;
        bool            flag, redraw;
@@ -743,10 +743,13 @@ static bool_hack get_mind_power(SPELL_IDX *sn, bool only_browse)
 #ifdef ALLOW_REPEAT /* TNB */
 
        /* Get the spell, if available */
-       if (repeat_pull(sn))
+
+       if (repeat_pull(&code))
        {
+               *sn = (SPELL_IDX)code;
                /* Hack -- If requested INVEN_FORCE(1111), pull again */
-               if (*sn == INVEN_FORCE) repeat_pull(sn);
+               if (*sn == INVEN_FORCE) repeat_pull(&code);
+               *sn = (SPELL_IDX)code;
 
                /* Verify the spell */
                if (mind_ptr->info[*sn].min_lev <= plev)
@@ -1021,7 +1024,7 @@ put_str(format("Lv   %s   Fail Info", ((use_mind == MIND_BERSERKER) || (use_mind
 
 #ifdef ALLOW_REPEAT /* TNB */
 
-       repeat_push(*sn);
+       repeat_push((COMMAND_CODE)i);
 
 #endif /* ALLOW_REPEAT -- TNB */
 
index de195c0..a2bc371 100644 (file)
@@ -216,7 +216,7 @@ static int get_learned_power(SPELL_IDX *sn)
        char            comment[80];
        s32b            f4 = 0, f5 = 0, f6 = 0;
        cptr            p = _("魔法", "magic");
-
+       COMMAND_CODE code;
        monster_power   spell;
        bool            flag, redraw;
        int menu_line = (use_menu ? 1 : 0);
@@ -233,11 +233,13 @@ static int get_learned_power(SPELL_IDX *sn)
 #ifdef ALLOW_REPEAT /* TNB */
 
        /* Get the spell, if available */
-       if (repeat_pull(sn))
+       
+       if (repeat_pull(&code))
        {
                /* Success */
                return (TRUE);
        }
+       *sn = (SPELL_IDX)code;
 
 #endif /* ALLOW_REPEAT -- TNB */
 
@@ -587,7 +589,7 @@ static int get_learned_power(SPELL_IDX *sn)
 
 #ifdef ALLOW_REPEAT /* TNB */
 
-       repeat_push(*sn);
+       repeat_push((COMMAND_CODE)spellnum[i]);
 
 #endif /* ALLOW_REPEAT -- TNB */
 
index 5b65235..8270bad 100644 (file)
@@ -4408,7 +4408,7 @@ void request_command(int shopping)
 {
        int i;
 
-       char cmd;
+       s16b cmd;
        int mode;
 
        cptr act;