diff --git a/zsnes/src/gui/guikeys.inc b/zsnes/src/gui/guikeys.inc index d9fa5641..2ca8c90b 100644 --- a/zsnes/src/gui/guikeys.inc +++ b/zsnes/src/gui/guikeys.inc @@ -710,37 +710,45 @@ GUIOptionKeys: ret GUISaveKeys: - cmp dh,'a' + cmp dh,'a' ; Setup jb .nocap cmp dh,'z' ja .nocap sub dh,'z'-'Z' .nocap + +;Checkboxes cmp dh,'I' jne .noautoincsave xor byte[AutoIncSaveSlot],1 mov byte[firstsaveinc],1 .noautoincsave + cmp dh,'C' jne .nosramcheck xor byte[SRAMSave5Sec],1 .nosramcheck + cmp dh,'S' jne .nostartsave xor byte[LatestSave],1 .nostartsave + cmp dh,'A' jne .noautostate xor byte[AutoState],1 .noautostate + cmp dh,'L' jne .nosramstate xor byte[SRAMState],1 .nosramstate + cmp dh,'P' jne .nopauseload xor byte[PauseLoad],1 .nopauseload + cmp dh,'R' jne .nopauserewind xor byte[PauseRewind],1 @@ -749,32 +757,39 @@ GUISaveKeys: GUIChipKeys: - cmp dh,'a' + cmp dh,'a' ;Setup jb .nocap cmp dh,'z' ja .nocap sub dh,'z'-'Z' .nocap + +;Checkboxes cmp dh,'1' jne .nonssdip1 xor byte[nssdip1],1 .nonssdip1 + cmp dh,'2' jne .nonssdip2 xor byte[nssdip2],1 .nonssdip2 + cmp dh,'3' jne .nonssdip3 xor byte[nssdip3],1 .nonssdip3 + cmp dh,'4' jne .nonssdip4 xor byte[nssdip4],1 .nonssdip4 + cmp dh,'5' jne .nonssdip5 xor byte[nssdip5],1 .nonssdip5 + cmp dh,'6' jne .nonssdip6 xor byte[nssdip6],1 @@ -1512,7 +1527,7 @@ GUIComboKeys: ret GUICheatKeys: - cmp dword[GUIcurrentcheatwin],1 + cmp dword[GUIcurrentcheatwin],1 je near .textboxa cmp dword[GUIcurrentcheatwin],2 je near .textboxb @@ -1522,6 +1537,9 @@ GUICheatKeys: ja .nocap sub dh,'z'-'Z' .nocap + + +;Hotkeys for Buttons cmp dh,'R' jne .noremocheat jmp CheatCodeRemove @@ -1538,6 +1556,12 @@ GUICheatKeys: jne .noloadcheat jmp CheatCodeLoad .noloadcheat + cmp dh,'F' + jne .nofixcheat + jmp CheatCodeFix +.nofixcheat + +;Main Cheat Box cmp dword[NumCheats],0 jne .nozero ret @@ -1680,7 +1704,9 @@ GUICheatKeys: .nopagedown ret -.textboxa + +;Enter Code Input Box +.textboxa cmp byte[GUICheatPosA],0 je near .nobacksp cmp dh,9 @@ -1767,6 +1793,7 @@ GUICheatKeys: .nochar ret +;Description Input Box .textboxb cmp dh,13 jne .noretb diff --git a/zsnes/src/gui/guiwindp.inc b/zsnes/src/gui/guiwindp.inc index 96c742ea..07c833e4 100644 --- a/zsnes/src/gui/guiwindp.inc +++ b/zsnes/src/gui/guiwindp.inc @@ -2835,6 +2835,7 @@ DisplayGUICheat: ; Add/Browse Cheats menu GUIOuttextwin2 7,25,190,GUICheatTextE1 DrawGUIWinBox 7,5,20,229,108,167 + ; Draw Buttons DrawGUIButton 7,5,113,47,124,GUICheatTextB1,5,0,0 DrawGUIButton 7,52,113,94,124,GUICheatTextB2,6,0,0 @@ -2843,6 +2844,13 @@ DisplayGUICheat: ; Add/Browse Cheats menu DrawGUIButton 7,193,113,235,124,GUICheatTextB5,33,0,0 DrawGUIButton 7,212,134,236,145,GUICheatTextB6,9,0,0 +; Easiest way i could think of to underline the hotkeys for the buttons + GUIOuttextwin2u 7,10,117,GUICheatTextZ5,0 + GUIOuttextwin2u 7,57,117,GUICheatTextZ5,0 + GUIOuttextwin2u 7,104,117,GUICheatTextZ5,0 + GUIOuttextwin2u 7,151,117,GUICheatTextZ5,0 + GUIOuttextwin2u 7,198,117,GUICheatTextZ5,0 + ; Red Highlight for Cheats box cmp dword[GUIcurrentcheatwin],0 @@ -3067,6 +3075,7 @@ GUICheatTextZ1 db '_',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; 14 digits GUICheatTextZ2 db '_',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; 11 digits (?) GUICheatTextZ3 db '000000 00 00 OFF BLAHBLAH---',0,0,0,0,0,0,0,0,0,0,0,0 GUICheatTextZ4 db '0123456789ABCDEF' +GUICheatTextZ5 db ' ',0 SECTION .bss @@ -6286,7 +6295,7 @@ DisplayGUISave: ;Save & Rewind options/Hotkeys ;Buttons - mov byte[GUItextcolor],217 ;set color for boxes + mov byte[GUItextcolor],217 ;set color for buttons cmp byte[GUIWincoladd],0 je .zero88 mov byte[GUItextcolor],211