OSDN Git Service

[Refactor] #37353 tsuri_dir を fishing_dir に改名して player_type 構造体に移動。
authorDeskull <deskull@users.sourceforge.jp>
Wed, 28 Nov 2018 13:02:15 +0000 (22:02 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Wed, 28 Nov 2018 13:02:15 +0000 (22:02 +0900)
Change tsuri_dir to fishing_dir in player_type structure.

src/cmd-activate.c
src/dungeon.c
src/externs.h
src/types.h
src/variable.c

index 64d2948..4ab06b7 100644 (file)
@@ -1632,7 +1632,7 @@ bool activate_artifact(object_type *o_ptr)
                if (!get_direction(&dir, FALSE, FALSE)) return FALSE;
                y = p_ptr->y + ddy[dir];
                x = p_ptr->x + ddx[dir];
-               tsuri_dir = dir;
+               p_ptr->fishing_dir = dir;
                if (!cave_have_flag_bold(y, x, FF_WATER))
                {
                        msg_print(_("そこは水辺ではない。", "There is no fishing place."));
index a824062..beb0c1c 100644 (file)
@@ -4769,8 +4769,8 @@ static void process_player(void)
                        if (r_idx && one_in_(2))
                        {
                                POSITION y, x;
-                               y = p_ptr->y + ddy[tsuri_dir];
-                               x = p_ptr->x + ddx[tsuri_dir];
+                               y = p_ptr->y + ddy[p_ptr->fishing_dir];
+                               x = p_ptr->x + ddx[p_ptr->fishing_dir];
                                if (place_monster_aux(0, y, x, r_idx, PM_NO_KAGE))
                                {
                                        char m_name[80];
index da08f8f..ec4ce37 100644 (file)
@@ -385,7 +385,6 @@ extern MONRACE_IDX today_mon;
 extern bool write_level;
 extern u32b playtime;
 extern u32b start_time;
-extern int tsuri_dir;
 extern bool sukekaku;
 extern bool new_mane;
 extern bool mon_fight;
index d41dd9c..7eec923 100644 (file)
@@ -1218,6 +1218,7 @@ struct player_type
        ALIGNMENT align;                                /* Good/evil/neutral */
        POSITION run_py;
        POSITION run_px;
+       DIRECTION fishing_dir;
 
 
        /*** Extracted fields ***/
index 5bd2d32..ce77189 100644 (file)
@@ -876,8 +876,6 @@ bool write_level;
 u32b playtime;
 u32b start_time;
 
-int tsuri_dir;
-
 bool sukekaku;
 bool new_mane;