Re: Patch update: searching stashes




> * Unwielding a weapon using "w-" now works even if you have auto_list
> on.
That's cool! Can you also add up two my patches?

One is for the "G a +0 club" bug, and I believe it was:
diff -ru dc400b26-src/source/menu.cc crawl-4.0.0beta26/source/menu.cc
--- dc400b26-src/source/menu.cc 2005-09-10 15:13:05.000000000 +0400
+++ crawl-4.0.0beta26/source/menu.cc 2005-09-13 00:16:38.000000000
+0400
@@ -81,6 +81,7 @@
return false;
case CK_ESCAPE:
sel->clear();
+ lastch = keyin;
return false;
case ' ': case CK_PGDN: case '>': case '\'':
nav = true;
@@ -196,9 +197,9 @@
void Menu::select_items( int key, int qty ) {
int x = wherex(), y = wherey();

- if (key == ',' || key == '*')
+/* if (key == ',' || key == '*')
select_index( -1, qty );
- else if (key == '-')
+ else*/ if (key == '-')
select_index( -1, 0 );
else {
int final = items.size();
diff -ru dc400b26-src/source/libutil.cc
crawl-4.0.0beta26/source/libutil.cc
--- dc400b26-src/source/libutil.cc 2005-09-10 15:13:05.000000000
+0400
+++ crawl-4.0.0beta26/source/libutil.cc 2005-09-05 11:01:54.000000000
+0400
@@ -26,6 +26,14 @@
// Check whether file exists, is readable, etc.?
if (file && *file)
sndPlaySound(file, SND_ASYNC | SND_NODEFAULT);
+#elif defined(PLAYCOMMAND)
+ char command[255];
+ command[0] = '\0';
+ if(file && *file && (strlen(file) + strlen(PLAYCOMMAND) < 255))
+ {
+ sprintf(command, PLAYCOMMAND, file);
+ system(command);
+ }
#endif
}
@@ -720,6 +720,10 @@
selmode | MF_SELECT_ANY_PAGE,
titlefn, &items, select_filter );

+/* ILYAK if (ch == '?' || ch == '*' || ch == ',')
+ need_redraw = true;
+ continue;*/
+
if (selmode & MF_SINGLESELECT) {
keyin = ch;
need_getch = false;

Where first and last patch was to fix problem when you identify G as +0
club if you press '*' at second page of auto-list.
Also to make you able to press '*' everywhere (even after pressing
'ESC' to auto-list') to see a list of items, not getting 'Huh?'. Don't
recall quite everything, this was some time away.

Second (and this: to AppHdr)
+ #define PLAYCOMMAND "/usr/bin/play -v .5 %s &"
Gives you conventional way to use sounds under unix/linux. Worked fine
for me. Maybe should make playcommand configurable via .config /
init.txt

Thanx.

.



Relevant Pages