diff --git a/doc/fixes37.0 b/doc/fixes37.0 index e37bb35ee..7cc2fb7a2 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -1386,6 +1386,7 @@ Qt: [later] augment extended command selection dialog's Filter to add a fourth subset, those commands which autocomplete when typed for tty, typically commands with no keystroke or only meta character keystroke; that makes Filter useful in normal mode (much shorter list of choices) +Qt: add '#' as "Extended-commands" to the 'game' dropdown menu tiles: male and female variations in monsters.txt; tested only with tile2bmp conversion utility so far; also supported by tilemap utility to generate tile.c diff --git a/include/extern.h b/include/extern.h index d54665590..322cba807 100644 --- a/include/extern.h +++ b/include/extern.h @@ -247,6 +247,7 @@ extern void cmdq_clear(void); extern char pgetchar(void); extern void pushch(char); extern void savech(char); +extern int doextcmd(void); extern const char *key2extcmddesc(uchar); extern boolean bind_specialkey(uchar, const char *); extern void parseautocomplete(char *, boolean); diff --git a/src/cmd.c b/src/cmd.c index 68a8fa5c9..fe90ea4d7 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -101,7 +101,6 @@ static int dotherecmdmenu(void); static int doprev_message(void); static int timed_occupation(void); static boolean can_do_extcmd(const struct ext_func_tab *); -static int doextcmd(void); static int dotravel(void); static int dotravel_target(void); static int doclicklook(void); @@ -372,7 +371,7 @@ can_do_extcmd(const struct ext_func_tab *extcmd) } /* here after # - now read a full-word command */ -static int +int doextcmd(void) { int idx, retval; @@ -2091,7 +2090,8 @@ struct ext_func_tab extcmdlist[] = { { '#', "#", "perform an extended command", doextcmd, IFBURIED | GENERALCMD | CMD_M_PREFIX, NULL }, { M('?'), "?", "list all extended commands", - doextlist, IFBURIED | AUTOCOMPLETE | GENERALCMD | CMD_M_PREFIX, NULL }, + doextlist, IFBURIED | AUTOCOMPLETE | GENERALCMD | CMD_M_PREFIX, + NULL }, { M('a'), "adjust", "adjust inventory letters", doorganize, IFBURIED | AUTOCOMPLETE, NULL }, { M('A'), "annotate", "name current level", diff --git a/win/Qt/qt_main.cpp b/win/Qt/qt_main.cpp index fabf8453c..bac9b465b 100644 --- a/win/Qt/qt_main.cpp +++ b/win/Qt/qt_main.cpp @@ -580,11 +580,13 @@ NetHackQtMainWindow::NetHackQtMainWindow(NetHackQtKeyBuffer& ks) : enum { OnDesktop=1, OnHandhelds=2 }; struct Macro { - QMenu* menu; - const char* name; - int flags; + QMenu *menu; + const char *name; + int flags; // 1 desktop, 2 handheld, 3 either/both int (*funct)(void); } item[] = { + { game, 0, 3}, + { game, "Extended-commands", 3, doextcmd }, { game, 0, 3}, { game, "Version", 3, doversion}, { game, "Compilation", 3, doextversion},