Only embed wav resources if soundlib defined

This commit is contained in:
nhmall
2023-01-31 02:22:25 -05:00
parent f2dc7f308d
commit e6012ab658
3 changed files with 14 additions and 9 deletions

View File

@@ -49,7 +49,7 @@ GAMEDIR = ..\binary # Default game build directory
#
# windsound uses built-in Microsoft API's, no 3rd party download is required.
#SOUND_LIBRARIES = windsound
SOUND_LIBRARIES = windsound
#
#------------------------------------------------------------------------------
@@ -797,6 +797,8 @@ SOUNDLIBDEFS = $(SOUNDLIBDEFS) -DUSER_SOUNDS
!IF "$(NEED_SEAUTOMAP)" == "Y"
SOUNDLIBDEFS = $(SOUNDLIBDEFS) -DSND_SOUNDEFFECTS_AUTOMAP
!ENDIF
WAV = $(WAVS)
RCFLAGS = $(RCFLAGS) -dRCWAV
!ENDIF #HAVE_SOUNDLIB
#==========================================
@@ -1448,17 +1450,16 @@ $(INCL)\nhlua.h:
tileutil: $(U)gif2txt.exe $(U)gif2tx32.exe $(U)txt2ppm.exe
@echo Optional tile development utilities are up to date.
$(OGUI)NetHackW.res: $(SRC)\tiles.bmp $(MSWIN)\NetHackW.rc \
$(MSWIN)\mnsel.bmp \
$(MSWIN)\mnselcnt.bmp $(MSWIN)\mnunsel.bmp \
$(OGUI)NetHackW.res: $(SRC)\tiles.bmp $(MSWIN)\NetHackW.rc $(MSWIN)\NetHack.ico \
$(MSWIN)\mnsel.bmp $(MSWIN)\mnselcnt.bmp $(MSWIN)\mnunsel.bmp \
$(MSWIN)\petmark.bmp $(MSWIN)\pilemark.bmp $(MSWIN)\NetHack.ico \
$(MSWIN)\rip.bmp $(MSWIN)\splash.bmp $(WAVS)
$(MSWIN)\rip.bmp $(MSWIN)\splash.bmp $(WAV)
@echo Building resource file $@ from $**
$(rc) -nologo -r -fo$@ -i$(MSWIN) -i$(SndWavDir) -dNDEBUG $(MSWIN)\NetHackW.rc
$(rc) -nologo -r -fo$@ -i$(MSWIN) -i$(SndWavDir) -dNDEBUG $(RCFLAGS) $(MSWIN)\NetHackW.rc
$(OTTY)console.res: $(MSWSYS)\console.rc $(MSWSYS)\NetHack.ico $(WAVS)
$(OTTY)console.res: $(MSWSYS)\console.rc $(MSWSYS)\NetHack.ico $(WAV)
@echo Building resource file $@ from $**
$(rc) -nologo -r -fo$@ -i$(MSWSYS) -i$(SndWavDir) -dNDEBUG $(MSWSYS)\console.rc
$(rc) -nologo -r -fo$@ -i$(MSWSYS) -i$(SndWavDir) -dNDEBUG $(RCFLAGS) $(MSWSYS)\console.rc
#
# Secondary Targets.

View File

@@ -43,6 +43,8 @@ BEGIN
VALUE "Translation", 0x409, 1200
END
END
#ifdef RCWAV
se_squeak_A WAVE "se_squeak_A.wav"
se_squeak_B WAVE "se_squeak_B.wav"
se_squeak_B_flat WAVE "se_squeak_B_flat.wav"
@@ -103,5 +105,6 @@ sound_Wooden_Harp_D WAVE "sound_Wooden_Harp_D.wav"
sound_Wooden_Harp_E WAVE "sound_Wooden_Harp_E.wav"
sound_Wooden_Harp_F WAVE "sound_Wooden_Harp_F.wav"
sound_Wooden_Harp_G WAVE "sound_Wooden_Harp_G.wav"
#endif
/*console.rc*/"

View File

@@ -391,6 +391,7 @@ BEGIN
IDS_APP_TITLE_SHORT "NetHack for Windows"
END
#ifdef RCWAV
se_squeak_A WAVE "se_squeak_A.wav"
se_squeak_B WAVE "se_squeak_B.wav"
se_squeak_B_flat WAVE "se_squeak_B_flat.wav"
@@ -451,7 +452,7 @@ sound_Wooden_Harp_D WAVE "sound_Wooden_Harp_D.wav"
sound_Wooden_Harp_E WAVE "sound_Wooden_Harp_E.wav"
sound_Wooden_Harp_F WAVE "sound_Wooden_Harp_F.wav"
sound_Wooden_Harp_G WAVE "sound_Wooden_Harp_G.wav"
#endif
#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////