OSDN Git Service

#37345 (2.2.0.54) [l]ook(Roguelikeキーモード時[x])を[*]と同じく押しっ放しで対象候補の次を選べるように実装。 / Implemen...
authorDeskull <desull@users.sourceforge.jp>
Fri, 25 Aug 2017 15:33:25 +0000 (00:33 +0900)
committerDeskull <desull@users.sourceforge.jp>
Fri, 25 Aug 2017 15:33:25 +0000 (00:33 +0900)
src/defines.h
src/xtra2.c

index 2ad7911..c1bb181 100644 (file)
@@ -53,7 +53,7 @@
 #define FAKE_VER_MAJOR 12 /*!< ゲームのバージョン番号定義(メジャー番号 + 10) */
 #define FAKE_VER_MINOR 2 /*!< ゲームのバージョン番号定義(マイナー番号) */
 #define FAKE_VER_PATCH 0 /*!< ゲームのバージョン番号定義(パッチ番号) */
-#define FAKE_VER_EXTRA 53 /*!< ゲームのバージョン番号定義(エクストラ番号) */
+#define FAKE_VER_EXTRA 54 /*!< ゲームのバージョン番号定義(エクストラ番号) */
 
 
  /*!
index 9f1453a..bfbc306 100644 (file)
@@ -3592,6 +3592,8 @@ bool target_set(int mode)
 
        char    info[80];
 
+       char    same_key;
+
        cave_type               *c_ptr;
 
        int wid, hgt;
@@ -3606,6 +3608,14 @@ bool target_set(int mode)
        /* Cancel tracking */
        /* health_track(0); */
 
+       if (rogue_like_commands)
+       {
+               same_key = 'x';
+       }
+       else
+       {
+               same_key = 'l';
+       }
 
        /* Prepare the "temp" array */
        target_set_prepare(mode);
@@ -3748,14 +3758,24 @@ bool target_set(int mode)
 
                                default:
                                {
-                                       /* Extract the action (if any) */
-                                       d = get_keymap_dir(query);
+                                       if(query == same_key)
+                                       {
+                                               if (++m == temp_n)
+                                               {
+                                                       m = 0;
+                                                       if (!expand_list) done = TRUE;
+                                               }
+                                       }
+                                       else
+                                       {
+                                               /* Extract the action (if any) */
+                                               d = get_keymap_dir(query);
 
-                                       if (!d) bell();
-                                       break;
+                                               if (!d) bell();
+                                               break;
+                                       }
                                }
                        }
-
                        /* Hack -- move around */
                        if (d)
                        {