OSDN Git Service

move_player_effect()の余分な引数 oy, ox を削除。
authormogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 13 Dec 2003 11:12:49 +0000 (11:12 +0000)
committermogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 13 Dec 2003 11:12:49 +0000 (11:12 +0000)
src/cmd1.c
src/cmd2.c
src/cmd5.c
src/externs.h
src/hissatsu.c
src/melee2.c
src/mind.c
src/mutation.c
src/spells2.c
src/spells3.c

index 3ae4818..2b52222 100644 (file)
@@ -3441,13 +3441,15 @@ bool player_can_enter(s16b feature, u16b mode)
 /*
  * Move the player
  */
-bool move_player_effect(int oy, int ox, int ny, int nx, u32b mpe_mode)
+bool move_player_effect(int ny, int 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))
        {
+               int oy = py;
+               int ox = px;
                cave_type *oc_ptr = &cave[oy][ox];
                int om_idx = oc_ptr->m_idx;
                int nm_idx = c_ptr->m_idx;
@@ -4196,7 +4198,7 @@ void move_player(int dir, bool do_pickup, bool break_trap)
                if (break_trap) mpe_mode |= MPE_BREAK_TRAP;
 
                /* Move the player */
-               (void)move_player_effect(py, px, y, x, mpe_mode);
+               (void)move_player_effect(y, x, mpe_mode);
        }
 }
 
index 6544914..36e886e 100644 (file)
@@ -2823,7 +2823,7 @@ void do_cmd_stay(bool pickup)
        energy_use = 100;
 
        if (pickup) mpe_mode |= MPE_DO_PICKUP;
-       (void)move_player_effect(py, px, py, px, mpe_mode);
+       (void)move_player_effect(py, px, mpe_mode);
 }
 
 
index 8ecba58..ecdcb21 100644 (file)
@@ -5615,7 +5615,7 @@ msg_format("%s
 
        /* Move the player */
        if (sy && !p_ptr->is_dead)
-               (void)move_player_effect(py, px, py, px, MPE_DONT_PICKUP | MPE_DONT_SWAP_MON);
+               (void)move_player_effect(py, px, MPE_DONT_PICKUP | MPE_DONT_SWAP_MON);
 
        return fall_dam;
 }
@@ -5776,7 +5776,7 @@ bool do_riding(bool force)
        p_ptr->redraw |= (PR_UHEALTH);
 
        /* Move the player */
-       (void)move_player_effect(py, px, y, x, MPE_HANDLE_STUFF | MPE_ENERGY_USE | MPE_DONT_PICKUP | MPE_DONT_SWAP_MON);
+       (void)move_player_effect(y, x, MPE_HANDLE_STUFF | MPE_ENERGY_USE | MPE_DONT_PICKUP | MPE_DONT_SWAP_MON);
 
        return TRUE;
 }
index 69639b8..839c8e7 100644 (file)
@@ -660,7 +660,7 @@ 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(int oy, int ox, int ny, int nx, u32b mpe_mode);
+extern bool move_player_effect(int ny, int nx, u32b mpe_mode);
 extern bool trap_can_be_ignored(int feat);
 extern void move_player(int dir, bool do_pickup, bool break_trap);
 extern void run_step(int dir);
index a3e85d7..ef7d4fb 100644 (file)
@@ -504,7 +504,7 @@ static bool cast_hissatsu_spell(int spell)
                        msg_print(NULL);
 
                        /* Move the player */
-                       (void)move_player_effect(py, px, y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
+                       (void)move_player_effect(y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
                }
                break;
        }
@@ -910,7 +910,7 @@ static bool cast_hissatsu_spell(int spell)
                        if (player_can_enter(c_ptr->feat, 0))
                        {
                                /* Move the player */
-                               if (!move_player_effect(py, px, y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP)) break;
+                               if (!move_player_effect(y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP)) break;
                        }
 
                        /* -more- */
index c47804b..1e8d3db 100644 (file)
@@ -3316,7 +3316,7 @@ msg_format("%^s%s", m_name, monmessage);
                                /* sound(SOUND_WALK); */
 
                                /* Move the player */
-                               if (!move_player_effect(py, px, ny, nx, MPE_DONT_PICKUP)) break;
+                               if (!move_player_effect(ny, nx, MPE_DONT_PICKUP)) break;
                        }
 
                        /* Possible disturb */
index 98f6561..8957753 100644 (file)
@@ -1501,7 +1501,7 @@ static bool cast_berserk_spell(int spell)
                        msg_print(NULL);
 
                        /* Move the player */
-                       (void)move_player_effect(py, px, y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
+                       (void)move_player_effect(y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
                }
                break;
        }
index 60c64d8..63fbbb7 100644 (file)
@@ -3528,7 +3528,7 @@ bool mutation_power_aux(u32b power)
                                cave_alter_feat(y, x, FF_HURT_ROCK);
 
                                /* Move the player */
-                               (void)move_player_effect(py, px, y, x, MPE_DONT_PICKUP);
+                               (void)move_player_effect(y, x, MPE_DONT_PICKUP);
                        }
                        break;
 
index 6a9d818..233ecbd 100644 (file)
@@ -5660,7 +5660,7 @@ msg_print("
                        }
 
                        /* Move the player to the safe location */
-                       (void)move_player_effect(py, px, sy, sx, MPE_DONT_PICKUP);
+                       (void)move_player_effect(sy, sx, MPE_DONT_PICKUP);
                }
 
                /* Important -- no wall on player */
@@ -6684,7 +6684,7 @@ msg_print("
        sound(SOUND_TELEPORT);
 
        /* Swap the player and monster */
-       (void)move_player_effect(py, px, ty, tx, MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
+       (void)move_player_effect(ty, tx, MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
 
        /* Success */
        return TRUE;
index 17d3022..e54c50e 100644 (file)
@@ -391,7 +391,7 @@ msg_print("
        ox = px;
 
        /* Move the player */
-       (void)move_player_effect(py, px, y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
+       (void)move_player_effect(y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
 
        /* Monsters with teleport ability may follow the player */
        for (xx = -1; xx < 2; xx++)
@@ -472,7 +472,7 @@ void teleport_player_to(int ny, int nx, bool no_tele, bool passive)
        sound(SOUND_TELEPORT);
 
        /* Move the player */
-       (void)move_player_effect(py, px, y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
+       (void)move_player_effect(y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
 }