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:
@@ -162,7 +162,7 @@ TILEBMP16 = $(SRC)\tiles.bmp
|
||||
TILEUTIL32 = $(UTIL)\til2bm32.exe
|
||||
TILEBMP32 = $(SRC)\tiles32.bmp
|
||||
|
||||
#SOUND = $(OBJ)\ntsound.o
|
||||
SOUND = $(OBJ)\ntsound.o
|
||||
|
||||
#SOUND =
|
||||
|
||||
@@ -573,7 +573,7 @@ $(NHRES): $(NTSYS)\console.rc $(NTSYS)\NetHack.ico
|
||||
$(GAMEFILE) : $(ALLOBJ) $(NHRES)
|
||||
@if not exist $(GAMEDIR)\*.* mkdir $(GAMEDIR)
|
||||
@echo Linking....
|
||||
$(link) $(LFLAGS) user32.lib -out:$@ @<<$(GAME).lnk
|
||||
$(link) $(LFLAGS) user32.lib winmm.lib -out:$@ @<<$(GAME).lnk
|
||||
$(ALLOBJ:^ =^
|
||||
) $(NHRES)
|
||||
<<
|
||||
|
||||
@@ -11,5 +11,18 @@
|
||||
*/
|
||||
|
||||
#include "hack.h"
|
||||
#include "win32api.h"
|
||||
#include <mmsystem.h>
|
||||
|
||||
#ifdef USER_SOUNDS
|
||||
|
||||
void play_usersound(filename, volume)
|
||||
const char* filename;
|
||||
int volume;
|
||||
{
|
||||
/* pline("play_usersound: %s (%d).", filename, volume); */
|
||||
(void)sndPlaySound(filename, SND_ASYNC | SND_NODEFAULT);
|
||||
}
|
||||
|
||||
#endif /*USER_SOUNDS*/
|
||||
/* ntsound.c */
|
||||
|
||||
Reference in New Issue
Block a user