From a83fefe66116794a45f0dfede3ef0655a16f641f Mon Sep 17 00:00:00 2001 From: pagefault <> Date: Wed, 22 Aug 2001 19:52:47 +0000 Subject: [PATCH] Added keyboard shortcuts to video menu --- zsnes/src/gui/guikeys.inc | 198 +++++++++++++++++++++++++++++++++++++ zsnes/src/gui/guiwindp.inc | 36 +++---- 2 files changed, 216 insertions(+), 18 deletions(-) diff --git a/zsnes/src/gui/guikeys.inc b/zsnes/src/gui/guikeys.inc index 3cf90d36..35ef7543 100644 --- a/zsnes/src/gui/guikeys.inc +++ b/zsnes/src/gui/guikeys.inc @@ -381,6 +381,8 @@ GUIgetcurrentinput: je near GUIStateSelKeys cmp ebx,4 je near GUIOptionKeys + cmp ebx,5 + je near GUIVideoKeys cmp ebx,6 je near GUISoundKeys cmp ebx,7 @@ -979,10 +981,206 @@ GUIGUIOptnsKeys: xor byte[FilteredGUI],1 cmp byte[En2xSaI],1 jnae .guioptn15 + call ClearScreen call Clear2xSaIBuffer .guioptn15 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: cmp dh,'a' jb .nocap diff --git a/zsnes/src/gui/guiwindp.inc b/zsnes/src/gui/guiwindp.inc index 0cd09250..a949c4ee 100644 --- a/zsnes/src/gui/guiwindp.inc +++ b/zsnes/src/gui/guiwindp.inc @@ -1666,67 +1666,67 @@ DisplayGUIVideo: xor eax,eax mov al,[cvidmode] cmp byte[GUISLVID+eax],0 - je .notext2 + je near .notext2 GUIOuttextwin2 5,13,111,GUIVideoTextb - GUIOuttextwin2 5,36,119,GUIVideoTexta + GUIOuttextwin2u 5,36,119,GUIVideoTexta,0 .notext2 xor eax,eax mov al,[cvidmode] cmp byte[GUIHSVID+eax],0 je near .notexta GUIOuttextwin2 5,13,111,GUIVideoTextb - GUIOuttextwin2 5,76,119,GUIVideoTexta2 - GUIOuttextwin2 5,116,119,GUIVideoTexta3 + GUIOuttextwin2u 5,76,119,GUIVideoTexta2,0 + GUIOuttextwin2u 5,116,119,GUIVideoTexta3,0 .notexta xor eax,eax mov al,[cvidmode] cmp byte[GUITBWVID+eax],0 je near .nottbw - GUIOuttextwin2 5,26,128,GUIVideoText7 + GUIOuttextwin2u 5,26,128,GUIVideoText7,0 .nottbw xor eax,eax mov al,[cvidmode] cmp byte[GUI2xVID+eax],0 je near .notextb - GUIOuttextwin2 5,26,138,GUIVideoTextc - GUIOuttextwin2 5,26,148,GUIVideoTextd - GUIOuttextwin2 5,26,158,GUIVideoTextd2 + GUIOuttextwin2u 5,26,138,GUIVideoTextc,1 + GUIOuttextwin2u 5,26,148,GUIVideoTextd,6 + GUIOuttextwin2u 5,26,158,GUIVideoTextd2,0 .notextb xor eax,eax mov al,[cvidmode] cmp byte[GUII2VID+eax],0 je near .notextb2 - GUIOuttextwin2 5,26,168,GUIVideoText3 + GUIOuttextwin2u 5,26,168,GUIVideoText3,0 .notextb2 xor eax,eax mov al,[cvidmode] cmp byte[GUIBIFIL+eax],0 je near .notextbf2 - GUIOuttextwin2 5,26,168,GUIVideoTextbf + GUIOuttextwin2u 5,26,168,GUIVideoTextbf,0 .notextbf2 xor eax,eax mov al,[cvidmode] cmp byte[GUIINVID+eax],0 je .notext3 - GUIOuttextwin2 5,26,83,GUIVideoText3 + GUIOuttextwin2u 5,26,83,GUIVideoText3,0 .notext3 xor eax,eax mov al,[cvidmode] cmp byte[GUIEAVID+eax],0 je .notext4 - GUIOuttextwin2 5,26,83,GUIVideoText4 + GUIOuttextwin2u 5,26,83,GUIVideoText4,1 .notext4 xor eax,eax mov al,[cvidmode] cmp byte[GUIFSVID+eax],0 je .notext5 - GUIOuttextwin2 5,26,93,GUIVideoText5 + GUIOuttextwin2u 5,26,93,GUIVideoText5,1 .notext5 xor eax,eax mov al,[cvidmode] cmp byte[GUISSVID+eax],0 je .notext6 - GUIOuttextwin2 5,26,103,GUIVideoText6 + GUIOuttextwin2u 5,26,103,GUIVideoText6,1 .notext6 xor eax,eax mov al,[cvidmode] @@ -1734,7 +1734,7 @@ DisplayGUIVideo: je near .notext7 cmp byte[GUITBVID+eax],0 je .notext7 - GUIOuttextwin2 5,26,168,GUIVideoText7 + GUIOuttextwin2u 5,26,168,GUIVideoText7,0 .notext7 xor eax,eax mov al,[cvidmode] @@ -1742,11 +1742,11 @@ DisplayGUIVideo: je .notext8 cmp byte[newengen],0 je .notext8 - GUIOuttextwin2 5,26,178,GUIVideoText8b + GUIOuttextwin2u 5,26,178,GUIVideoText8b,0 .notext8 - GUIOuttextwin2 5,26,188,GUIVideoText8c + GUIOuttextwin2u 5,26,188,GUIVideoText8c,0 %ifndef __LINUX__ - GUIOuttextwin2 5,130,188,GUIVideoText9 + GUIOuttextwin2u 5,130,188,GUIVideoText9,0 %endif add byte[GUItextcolor],15