win32 USER_SOUNDS

This uses pmatch() as a default pattern matcher,
and #defines USER_SOUNDS_REGEX for Qt
to enable the code for regular expressions.

This is enabled for win32tty and win32gui.
This commit is contained in:
nethack.allison
2002-09-02 23:28:54 +00:00
parent 0cb3b8543b
commit 6bebdbb135
8 changed files with 53 additions and 7 deletions
+8 -2
View File
@@ -18,8 +18,6 @@
#define MORE "--More--"
struct window_line {
int attr;
char text[MAXWINDOWTEXT];
@@ -61,6 +59,10 @@ static COLORREF setMsgTextColor(HDC hdc, int gray);
static void onPaint(HWND hWnd);
static void onCreate(HWND hWnd, WPARAM wParam, LPARAM lParam);
#ifdef USER_SOUNDS
extern void play_sound_for_message(const char* str);
#endif
HWND mswin_init_message_window () {
static int run_once = 0;
HWND ret;
@@ -242,6 +244,10 @@ void onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
/* update window content */
InvalidateRect(hWnd, NULL, TRUE);
#ifdef USER_SOUNDS
play_sound_for_message(msg_data->text);
#endif
}
break;