OSDN Git Service

inkey_special()でテンキーは特別扱いしない(数値入力で固定する)ようにした。
authormogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 20 Oct 2003 12:54:03 +0000 (12:54 +0000)
committermogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 20 Oct 2003 12:54:03 +0000 (12:54 +0000)
src/autopick.c
src/birth.c
src/cmd4.c
src/externs.h
src/files.c
src/util.c

index 38c63bc..f41d434 100644 (file)
@@ -3156,7 +3156,7 @@ static byte get_string_for_search(object_type **o_handle, cptr *search_strp)
                Term_gotoxy(col + pos, 0);
 
                /* Get a special key code */
-               skey = inkey_special(FALSE);
+               skey = inkey_special();
 
                /* Analyze the key */
                switch (skey)
@@ -5676,7 +5676,7 @@ void do_cmd_edit_autopick(void)
                tb->old_hgt = tb->hgt;
 
                /* Get a command */
-               key = inkey_special(TRUE);
+               key = inkey_special();
 
                /* Special keys */
                if (key & SKEY_MASK)
index aeee479..a3829f9 100644 (file)
@@ -5412,7 +5412,7 @@ static void edit_history(void)
                Term_gotoxy(x + 10, y + 12);
 
                /* Get special key code */
-               skey = inkey_special(TRUE);
+               skey = inkey_special();
 
                /* Get a character code */
                if (!(skey & SKEY_MASK)) c = (char)skey;
index c4b4c75..a529d90 100644 (file)
@@ -1382,7 +1382,7 @@ void do_cmd_messages(int num_now)
 
 
                /* Get a command */
-               skey = inkey_special(TRUE);
+               skey = inkey_special();
 
                /* Exit on Escape */
                if (skey == ESCAPE) break;
index f3e5d83..5f95b99 100644 (file)
@@ -1228,7 +1228,7 @@ extern void build_gamma_table(int gamma);
 
 extern size_t my_strcpy(char *buf, const char *src, size_t bufsize);
 extern size_t my_strcat(char *buf, const char *src, size_t bufsize);
-extern int inkey_special(bool use_numkey_as_special);
+extern int inkey_special(void);
 
 
 /* xtra1.c */
index e8ee387..f9124d1 100644 (file)
@@ -5315,7 +5315,7 @@ prt("[
                }
 
                /* Get a special key code */
-               skey = inkey_special(TRUE);
+               skey = inkey_special();
 
                /* Show the help for the help */
                if (skey == '?')
index d1107f6..ae58ec4 100644 (file)
@@ -3194,7 +3194,7 @@ bool askfor_aux(char *buf, int len)
                Term_gotoxy(x + pos, y);
 
                /* Get a special key code */
-               skey = inkey_special(FALSE);
+               skey = inkey_special();
 
                /* Analyze the key */
                switch (skey)
@@ -5223,7 +5223,7 @@ size_t my_strcat(char *buf, const char *src, size_t bufsize)
  * This function is a Mega-Hack and depend on pref-xxx.prf's.
  * Currently works on Linux(UNIX), Windows, and Macintosh only.
  */
-int inkey_special(bool use_numkey_as_special)
+int inkey_special(void)
 {
        static const struct {
                cptr keyname;
@@ -5246,29 +5246,6 @@ int inkey_special(bool use_numkey_as_special)
                {"Page_Down]", SKEY_PGDOWN},
                {"Home]", SKEY_TOP},
                {"End]", SKEY_BOTTOM},
-               {"KP_Down]", SKEY_DOWN},
-               {"KP_Left]", SKEY_LEFT},
-               {"KP_Right]", SKEY_RIGHT},
-               {"KP_Up]", SKEY_UP},
-               {"KP_Page_Up]", SKEY_PGUP},
-               {"KP_Page_Down]", SKEY_PGDOWN},
-               {"KP_Home]", SKEY_TOP},
-               {"KP_End]", SKEY_BOTTOM},
-               {NULL, 0},
-       };
-
-       static const struct {
-               cptr keyname;
-               int keycode;
-       } numkey_list[] = {
-               {"KP_2]", SKEY_DOWN},
-               {"KP_4]", SKEY_LEFT},
-               {"KP_6]", SKEY_RIGHT},
-               {"KP_8]", SKEY_UP},
-               {"KP_9]", SKEY_PGUP},
-               {"KP_3]", SKEY_PGDOWN},
-               {"KP_7]", SKEY_TOP},
-               {"KP_1]", SKEY_BOTTOM},
                {NULL, 0},
        };
        char buf[1024];
@@ -5346,19 +5323,6 @@ int inkey_special(bool use_numkey_as_special)
                }
        }
 
-       if (!skey && use_numkey_as_special)
-       {
-               /* Get a numkey code */
-               for (i = 0; numkey_list[i].keyname; i++)
-               {
-                       if (streq(str, numkey_list[i].keyname))
-                       {
-                               skey = numkey_list[i].keycode;
-                               break;
-                       }
-               }
-       }
-
        /* No special key found? */
        if (!skey)
        {