Added force 8-bit sound toggle to GUI in DOS port.

This commit is contained in:
stainless
2001-11-09 06:16:05 +00:00
parent 4cd11b6f78
commit b0306a448b
4 changed files with 22 additions and 2 deletions

View File

@@ -137,8 +137,8 @@ EXTSYM NumInputDevices,GUIInputNames
EXTSYM GUIVideoModeNames EXTSYM GUIVideoModeNames
EXTSYM GUISLVID,GUIINVID,GUIEAVID,GUIIEVID,GUIFSVID,GUIWSVID EXTSYM GUISLVID,GUIINVID,GUIEAVID,GUIIEVID,GUIFSVID,GUIWSVID
EXTSYM GUISSVID,GUITBVID,GUIHSVID,GUI2xVID,GUII2VID,GUIM7VID EXTSYM GUISSVID,GUITBVID,GUIHSVID,GUI2xVID,GUII2VID,GUIM7VID
EXTSYM cfgsoundon,cfgSoundQuality,cfgStereoSound EXTSYM cfgsoundon,cfgSoundQuality,cfgStereoSound,cfgforce8b
EXTSYM convertnum,converthex EXTSYM Force8b,convertnum,converthex
EXTSYM per2exec EXTSYM per2exec
EXTSYM hostname EXTSYM hostname
EXTSYM UDPConfig EXTSYM UDPConfig

View File

@@ -1208,6 +1208,12 @@ GUISoundKeys:
jne .notenablesound jne .notenablesound
xor byte[cfgsoundon],1 xor byte[cfgsoundon],1
.notenablesound .notenablesound
%ifdef __MSDOS__
cmp dh,'F'
jne .notforce8b
xor byte[cfgforce8b],1
.notforce8b
%endif
cmp dh,'S' cmp dh,'S'
jne .notstereo jne .notstereo
xor byte[cfgStereoSound],1 xor byte[cfgStereoSound],1

View File

@@ -2348,6 +2348,9 @@ DisplayGUISoundClick:
mov edx,[GUImouseposy] mov edx,[GUImouseposy]
sub edx,[GUIwinposy+6*4] sub edx,[GUIwinposy+6*4]
GUIClickCButton 11,21,byte[cfgsoundon] GUIClickCButton 11,21,byte[cfgsoundon]
%ifdef __MSDOS__
GUIClickCButton 102,21,byte[cfgforce8b]
%endif
GUIClickCButton 11,30,byte[cfgStereoSound] GUIClickCButton 11,30,byte[cfgStereoSound]
GUIClickCButton 11,39,byte[RaisePitch] GUIClickCButton 11,39,byte[RaisePitch]
GUIClickCButton 11,101,byte[SoundNoiseDis] GUIClickCButton 11,101,byte[SoundNoiseDis]

View File

@@ -2170,6 +2170,7 @@ DisplayGUISound:
; cmp byte[OSPort],3 ; cmp byte[OSPort],3
; je near .win32b ; je near .win32b
%ifdef __MSDOS__ %ifdef __MSDOS__
GUIOuttextwin2u 6,116,26,GUISoundText1b,0
GUIOuttextwin2u 6,26,44,GUISoundText2b,1 GUIOuttextwin2u 6,26,44,GUISoundText2b,1
%endif %endif
;.win32b ;.win32b
@@ -2197,6 +2198,7 @@ DisplayGUISound:
; cmp byte[OSPort],3 ; cmp byte[OSPort],3
; je near .win32c ; je near .win32c
%ifdef __MSDOS__ %ifdef __MSDOS__
GUIOuttextwin2 6,115,25,GUISoundText1b
GUIOuttextwin2 6,25,43,GUISoundText2b GUIOuttextwin2 6,25,43,GUISoundText2b
%endif %endif
;.win32c ;.win32c
@@ -2241,6 +2243,14 @@ DisplayGUISound:
mov dword[GUITemp],GUIIconDataCheckBoxC mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox .nocheckbox
GUIDisplayIconWin 6,11,21,[GUITemp] GUIDisplayIconWin 6,11,21,[GUITemp]
%ifdef __MSDOS__
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[cfgforce8b],0
je .nocheckbox0
mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox0
GUIDisplayIconWin 6,102,21,[GUITemp]
%endif
mov dword[GUITemp],GUIIconDataCheckBoxUC mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[cfgStereoSound],0 cmp byte[cfgStereoSound],0
je .nocheckbox1 je .nocheckbox1
@@ -2399,6 +2409,7 @@ DisplayGUISound:
ret ret
GUISoundText1 db 'ENABLE SOUND',0 GUISoundText1 db 'ENABLE SOUND',0
GUISoundText1b db 'FORCE 8-BIT',0
GUISoundText2 db 'SAMPLING RATE :',0 GUISoundText2 db 'SAMPLING RATE :',0
GUISoundText2b db 'RAISE PITCH LEVEL',0 GUISoundText2b db 'RAISE PITCH LEVEL',0
GUISoundText3 db 'STEREO SOUND',0 GUISoundText3 db 'STEREO SOUND',0