Added keyboard shortcuts to video menu

This commit is contained in:
pagefault
2001-08-22 19:52:47 +00:00
parent 5ea18b12b9
commit a83fefe661
2 changed files with 216 additions and 18 deletions

View File

@@ -381,6 +381,8 @@ GUIgetcurrentinput:
je near GUIStateSelKeys je near GUIStateSelKeys
cmp ebx,4 cmp ebx,4
je near GUIOptionKeys je near GUIOptionKeys
cmp ebx,5
je near GUIVideoKeys
cmp ebx,6 cmp ebx,6
je near GUISoundKeys je near GUISoundKeys
cmp ebx,7 cmp ebx,7
@@ -979,10 +981,206 @@ GUIGUIOptnsKeys:
xor byte[FilteredGUI],1 xor byte[FilteredGUI],1
cmp byte[En2xSaI],1 cmp byte[En2xSaI],1
jnae .guioptn15 jnae .guioptn15
call ClearScreen
call Clear2xSaIBuffer call Clear2xSaIBuffer
.guioptn15 .guioptn15
ret ret
GUIVideoKeys:
cmp dh,'a'
jb .nocap
cmp dh,'z'
ja .nocap
sub dh,'z'-'Z'
.nocap
xor eax,eax
mov al,[cvidmode]
cmp byte[GUISLVID+eax],0
je .nofullscanlines
cmp dh,'F'
jne .nofullscanlines
cmp byte[En2xSaI],0
jne .nofullscanlines
call ClearScreen
GUIkeystoggleoptn byte[scanlines],1
%ifdef __MSDOS__
cmp byte[cvidmode],1
jne .nofullscanlines
mov byte[cbitmode],1
call initvideo2
mov byte[cbitmode],0
call GUISetPal
%endif
.nofullscanlines
xor eax,eax
mov al,[cvidmode]
cmp byte[GUIHSVID+eax],0
je near .noquarterscanlines
cmp dh,'5'
jne .nohalfscanlines
cmp byte[En2xSaI],0
jne .nohalfscanlines
call ClearScreen
GUIkeystoggleoptn byte[scanlines],3
%ifdef __MSDOS__
cmp byte[cvidmode],1
jne .nohalfscanlines
mov byte[cbitmode],1
call initvideo2
mov byte[cbitmode],0
call GUISetPal
%endif
.nohalfscanlines
cmp dh,'2'
jne .noquarterscanlines
cmp byte[En2xSaI],0
jne .noquarterscanlines
call ClearScreen
GUIkeystoggleoptn byte[scanlines],2
%ifdef __MSDOS__
cmp byte[cvidmode],1
jne .noquarterscanlines
mov byte[cbitmode],1
call initvideo2
mov byte[cbitmode],0
call GUISetPal
%endif
.noquarterscanlines
cmp dh,'X'
jne .no2xsai
xor ebx,ebx
mov bl,[cvidmode]
cmp byte[GUI2xVID+ebx],0
je near .no2xsai
call Clear2xSaIBuffer
GUIkeystoggleoptn byte[En2xSaI],1
.no2xsai
cmp dh,'E'
jne .nosupereagle
xor ebx,ebx
mov bl,[cvidmode]
cmp byte[GUI2xVID+ebx],0
je near .nosupereagle
call Clear2xSaIBuffer
GUIkeystoggleoptn byte[En2xSaI],2
.nosupereagle
cmp dh,'S'
jne .nosuper2xsai
xor ebx,ebx
mov bl,[cvidmode]
cmp byte[GUI2xVID+ebx],0
je near .nosuper2xsai
call Clear2xSaIBuffer
GUIkeystoggleoptn byte[En2xSaI],3
.nosuper2xsai
cmp dh,'I'
jne .nointerpolationwin
xor eax,eax
mov al,[cvidmode]
cmp byte[GUII2VID+eax],0
je .nointerpolationwin
xor byte[antienab],1
mov al,[antienab]
mov [cfginterp],al
.nointerpolationwin
cmp dh,'I'
jne .nointerpolation
xor eax,eax
mov al,[cvidmode]
cmp byte[GUIIEVID+eax],0
je .nointerpolation
xor byte[antienab],1
mov al,[antienab]
mov [cfginterp],al
.nointerpolation
cmp dh,'U'
jne .nofullscreen
xor eax,eax
mov al,[cvidmode]
cmp byte[GUIFSVID+eax],0
je .nofullscreen
call ClearScreen
xor byte[ScreenScale],1
mov al,[ScreenScale]
mov [GUIScreenScale],al
push eax
push ecx
mov eax,[vidbufferofsb]
mov ecx,288*128
.fsloop
mov dword[eax],0
add eax,4
loop .fsloop
pop ecx
pop eax
.nofullscreen
cmp dh,'M'
jne .nosmallscreen
xor eax,eax
mov al,[cvidmode]
cmp byte[GUISSVID+eax],0
je .nosmallscreen
call ClearScreen
xor byte[smallscreenon],1
mov al,[smallscreenon]
mov [GUIsmallscreenon],al
push eax
push ecx
mov eax,[vidbufferofsb]
mov ecx,288*128
.ssloop
mov dword[eax],0
add eax,4
loop .ssloop
pop ecx
pop eax
.nosmallscreen
cmp dh,'H'
jne .nohiresmode7
xor ebx,ebx
mov bl,[cvidmode]
cmp byte[GUIM7VID+ebx],0
je .nohiresmode7
xor byte[Mode7HiRes16b],1
.nohiresmode7
cmp dh,'B'
jne .nobilinearfilter
xor ebx,ebx
mov bl,[cvidmode]
cmp byte[GUIBIFIL+ebx],0
je .nobilinearfilter
xor byte[BilinearFilter],1
.nobilinearfilter
cmp dh,'T'
jne .notriplebufferwin
xor eax,eax
mov al,[cvidmode]
cmp byte[GUITBWVID+eax],0
je near .notriplebufferwin
xor byte[TripleBufferWin],1
.notriplebufferwin
cmp dh,'T'
jne .notriplebuffer
xor ebx,ebx
mov bl,[cvidmode]
cmp byte[GUITBVID+ebx],0
je .notriplebuffer
xor byte[Triplebufen],1
.notriplebuffer
cmp dh,'G'
jne .nograyscale
xor byte[GrayscaleMode],1
.nograyscale
%ifndef __LINUX__
cmp dh,'V'
jne .novsync
xor byte[vsyncon],1
mov al,[vsyncon]
mov [cfgvsync],al
.novsync
%endif
ret
GUISoundKeys: GUISoundKeys:
cmp dh,'a' cmp dh,'a'
jb .nocap jb .nocap

View File

@@ -1666,67 +1666,67 @@ DisplayGUIVideo:
xor eax,eax xor eax,eax
mov al,[cvidmode] mov al,[cvidmode]
cmp byte[GUISLVID+eax],0 cmp byte[GUISLVID+eax],0
je .notext2 je near .notext2
GUIOuttextwin2 5,13,111,GUIVideoTextb GUIOuttextwin2 5,13,111,GUIVideoTextb
GUIOuttextwin2 5,36,119,GUIVideoTexta GUIOuttextwin2u 5,36,119,GUIVideoTexta,0
.notext2 .notext2
xor eax,eax xor eax,eax
mov al,[cvidmode] mov al,[cvidmode]
cmp byte[GUIHSVID+eax],0 cmp byte[GUIHSVID+eax],0
je near .notexta je near .notexta
GUIOuttextwin2 5,13,111,GUIVideoTextb GUIOuttextwin2 5,13,111,GUIVideoTextb
GUIOuttextwin2 5,76,119,GUIVideoTexta2 GUIOuttextwin2u 5,76,119,GUIVideoTexta2,0
GUIOuttextwin2 5,116,119,GUIVideoTexta3 GUIOuttextwin2u 5,116,119,GUIVideoTexta3,0
.notexta .notexta
xor eax,eax xor eax,eax
mov al,[cvidmode] mov al,[cvidmode]
cmp byte[GUITBWVID+eax],0 cmp byte[GUITBWVID+eax],0
je near .nottbw je near .nottbw
GUIOuttextwin2 5,26,128,GUIVideoText7 GUIOuttextwin2u 5,26,128,GUIVideoText7,0
.nottbw .nottbw
xor eax,eax xor eax,eax
mov al,[cvidmode] mov al,[cvidmode]
cmp byte[GUI2xVID+eax],0 cmp byte[GUI2xVID+eax],0
je near .notextb je near .notextb
GUIOuttextwin2 5,26,138,GUIVideoTextc GUIOuttextwin2u 5,26,138,GUIVideoTextc,1
GUIOuttextwin2 5,26,148,GUIVideoTextd GUIOuttextwin2u 5,26,148,GUIVideoTextd,6
GUIOuttextwin2 5,26,158,GUIVideoTextd2 GUIOuttextwin2u 5,26,158,GUIVideoTextd2,0
.notextb .notextb
xor eax,eax xor eax,eax
mov al,[cvidmode] mov al,[cvidmode]
cmp byte[GUII2VID+eax],0 cmp byte[GUII2VID+eax],0
je near .notextb2 je near .notextb2
GUIOuttextwin2 5,26,168,GUIVideoText3 GUIOuttextwin2u 5,26,168,GUIVideoText3,0
.notextb2 .notextb2
xor eax,eax xor eax,eax
mov al,[cvidmode] mov al,[cvidmode]
cmp byte[GUIBIFIL+eax],0 cmp byte[GUIBIFIL+eax],0
je near .notextbf2 je near .notextbf2
GUIOuttextwin2 5,26,168,GUIVideoTextbf GUIOuttextwin2u 5,26,168,GUIVideoTextbf,0
.notextbf2 .notextbf2
xor eax,eax xor eax,eax
mov al,[cvidmode] mov al,[cvidmode]
cmp byte[GUIINVID+eax],0 cmp byte[GUIINVID+eax],0
je .notext3 je .notext3
GUIOuttextwin2 5,26,83,GUIVideoText3 GUIOuttextwin2u 5,26,83,GUIVideoText3,0
.notext3 .notext3
xor eax,eax xor eax,eax
mov al,[cvidmode] mov al,[cvidmode]
cmp byte[GUIEAVID+eax],0 cmp byte[GUIEAVID+eax],0
je .notext4 je .notext4
GUIOuttextwin2 5,26,83,GUIVideoText4 GUIOuttextwin2u 5,26,83,GUIVideoText4,1
.notext4 .notext4
xor eax,eax xor eax,eax
mov al,[cvidmode] mov al,[cvidmode]
cmp byte[GUIFSVID+eax],0 cmp byte[GUIFSVID+eax],0
je .notext5 je .notext5
GUIOuttextwin2 5,26,93,GUIVideoText5 GUIOuttextwin2u 5,26,93,GUIVideoText5,1
.notext5 .notext5
xor eax,eax xor eax,eax
mov al,[cvidmode] mov al,[cvidmode]
cmp byte[GUISSVID+eax],0 cmp byte[GUISSVID+eax],0
je .notext6 je .notext6
GUIOuttextwin2 5,26,103,GUIVideoText6 GUIOuttextwin2u 5,26,103,GUIVideoText6,1
.notext6 .notext6
xor eax,eax xor eax,eax
mov al,[cvidmode] mov al,[cvidmode]
@@ -1734,7 +1734,7 @@ DisplayGUIVideo:
je near .notext7 je near .notext7
cmp byte[GUITBVID+eax],0 cmp byte[GUITBVID+eax],0
je .notext7 je .notext7
GUIOuttextwin2 5,26,168,GUIVideoText7 GUIOuttextwin2u 5,26,168,GUIVideoText7,0
.notext7 .notext7
xor eax,eax xor eax,eax
mov al,[cvidmode] mov al,[cvidmode]
@@ -1742,11 +1742,11 @@ DisplayGUIVideo:
je .notext8 je .notext8
cmp byte[newengen],0 cmp byte[newengen],0
je .notext8 je .notext8
GUIOuttextwin2 5,26,178,GUIVideoText8b GUIOuttextwin2u 5,26,178,GUIVideoText8b,0
.notext8 .notext8
GUIOuttextwin2 5,26,188,GUIVideoText8c GUIOuttextwin2u 5,26,188,GUIVideoText8c,0
%ifndef __LINUX__ %ifndef __LINUX__
GUIOuttextwin2 5,130,188,GUIVideoText9 GUIOuttextwin2u 5,130,188,GUIVideoText9,0
%endif %endif
add byte[GUItextcolor],15 add byte[GUItextcolor],15