A bit more commenting, added underlines to buttons to show hotkeys in the Add/Browse Cheats window, also added "Fix" keyboard shortcut (F)

This commit is contained in:
ipher
2005-05-12 02:08:07 +00:00
parent 50fddd0250
commit f8646c566e
2 changed files with 41 additions and 5 deletions

View File

@@ -710,37 +710,45 @@ GUIOptionKeys:
ret ret
GUISaveKeys: GUISaveKeys:
cmp dh,'a' cmp dh,'a' ; Setup
jb .nocap jb .nocap
cmp dh,'z' cmp dh,'z'
ja .nocap ja .nocap
sub dh,'z'-'Z' sub dh,'z'-'Z'
.nocap .nocap
;Checkboxes
cmp dh,'I' cmp dh,'I'
jne .noautoincsave jne .noautoincsave
xor byte[AutoIncSaveSlot],1 xor byte[AutoIncSaveSlot],1
mov byte[firstsaveinc],1 mov byte[firstsaveinc],1
.noautoincsave .noautoincsave
cmp dh,'C' cmp dh,'C'
jne .nosramcheck jne .nosramcheck
xor byte[SRAMSave5Sec],1 xor byte[SRAMSave5Sec],1
.nosramcheck .nosramcheck
cmp dh,'S' cmp dh,'S'
jne .nostartsave jne .nostartsave
xor byte[LatestSave],1 xor byte[LatestSave],1
.nostartsave .nostartsave
cmp dh,'A' cmp dh,'A'
jne .noautostate jne .noautostate
xor byte[AutoState],1 xor byte[AutoState],1
.noautostate .noautostate
cmp dh,'L' cmp dh,'L'
jne .nosramstate jne .nosramstate
xor byte[SRAMState],1 xor byte[SRAMState],1
.nosramstate .nosramstate
cmp dh,'P' cmp dh,'P'
jne .nopauseload jne .nopauseload
xor byte[PauseLoad],1 xor byte[PauseLoad],1
.nopauseload .nopauseload
cmp dh,'R' cmp dh,'R'
jne .nopauserewind jne .nopauserewind
xor byte[PauseRewind],1 xor byte[PauseRewind],1
@@ -749,32 +757,39 @@ GUISaveKeys:
GUIChipKeys: GUIChipKeys:
cmp dh,'a' cmp dh,'a' ;Setup
jb .nocap jb .nocap
cmp dh,'z' cmp dh,'z'
ja .nocap ja .nocap
sub dh,'z'-'Z' sub dh,'z'-'Z'
.nocap .nocap
;Checkboxes
cmp dh,'1' cmp dh,'1'
jne .nonssdip1 jne .nonssdip1
xor byte[nssdip1],1 xor byte[nssdip1],1
.nonssdip1 .nonssdip1
cmp dh,'2' cmp dh,'2'
jne .nonssdip2 jne .nonssdip2
xor byte[nssdip2],1 xor byte[nssdip2],1
.nonssdip2 .nonssdip2
cmp dh,'3' cmp dh,'3'
jne .nonssdip3 jne .nonssdip3
xor byte[nssdip3],1 xor byte[nssdip3],1
.nonssdip3 .nonssdip3
cmp dh,'4' cmp dh,'4'
jne .nonssdip4 jne .nonssdip4
xor byte[nssdip4],1 xor byte[nssdip4],1
.nonssdip4 .nonssdip4
cmp dh,'5' cmp dh,'5'
jne .nonssdip5 jne .nonssdip5
xor byte[nssdip5],1 xor byte[nssdip5],1
.nonssdip5 .nonssdip5
cmp dh,'6' cmp dh,'6'
jne .nonssdip6 jne .nonssdip6
xor byte[nssdip6],1 xor byte[nssdip6],1
@@ -1512,7 +1527,7 @@ GUIComboKeys:
ret ret
GUICheatKeys: GUICheatKeys:
cmp dword[GUIcurrentcheatwin],1 cmp dword[GUIcurrentcheatwin],1
je near .textboxa je near .textboxa
cmp dword[GUIcurrentcheatwin],2 cmp dword[GUIcurrentcheatwin],2
je near .textboxb je near .textboxb
@@ -1522,6 +1537,9 @@ GUICheatKeys:
ja .nocap ja .nocap
sub dh,'z'-'Z' sub dh,'z'-'Z'
.nocap .nocap
;Hotkeys for Buttons
cmp dh,'R' cmp dh,'R'
jne .noremocheat jne .noremocheat
jmp CheatCodeRemove jmp CheatCodeRemove
@@ -1538,6 +1556,12 @@ GUICheatKeys:
jne .noloadcheat jne .noloadcheat
jmp CheatCodeLoad jmp CheatCodeLoad
.noloadcheat .noloadcheat
cmp dh,'F'
jne .nofixcheat
jmp CheatCodeFix
.nofixcheat
;Main Cheat Box
cmp dword[NumCheats],0 cmp dword[NumCheats],0
jne .nozero jne .nozero
ret ret
@@ -1680,7 +1704,9 @@ GUICheatKeys:
.nopagedown .nopagedown
ret ret
.textboxa
;Enter Code Input Box
.textboxa
cmp byte[GUICheatPosA],0 cmp byte[GUICheatPosA],0
je near .nobacksp je near .nobacksp
cmp dh,9 cmp dh,9
@@ -1767,6 +1793,7 @@ GUICheatKeys:
.nochar .nochar
ret ret
;Description Input Box
.textboxb .textboxb
cmp dh,13 cmp dh,13
jne .noretb jne .noretb

View File

@@ -2835,6 +2835,7 @@ DisplayGUICheat: ; Add/Browse Cheats menu
GUIOuttextwin2 7,25,190,GUICheatTextE1 GUIOuttextwin2 7,25,190,GUICheatTextE1
DrawGUIWinBox 7,5,20,229,108,167 DrawGUIWinBox 7,5,20,229,108,167
; Draw Buttons ; Draw Buttons
DrawGUIButton 7,5,113,47,124,GUICheatTextB1,5,0,0 DrawGUIButton 7,5,113,47,124,GUICheatTextB1,5,0,0
DrawGUIButton 7,52,113,94,124,GUICheatTextB2,6,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,193,113,235,124,GUICheatTextB5,33,0,0
DrawGUIButton 7,212,134,236,145,GUICheatTextB6,9,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 ; Red Highlight for Cheats box
cmp dword[GUIcurrentcheatwin],0 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 (?) 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 GUICheatTextZ3 db '000000 00 00 OFF BLAHBLAH---',0,0,0,0,0,0,0,0,0,0,0,0
GUICheatTextZ4 db '0123456789ABCDEF' GUICheatTextZ4 db '0123456789ABCDEF'
GUICheatTextZ5 db ' ',0
SECTION .bss SECTION .bss
@@ -6286,7 +6295,7 @@ DisplayGUISave: ;Save & Rewind options/Hotkeys
;Buttons ;Buttons
mov byte[GUItextcolor],217 ;set color for boxes mov byte[GUItextcolor],217 ;set color for buttons
cmp byte[GUIWincoladd],0 cmp byte[GUIWincoladd],0
je .zero88 je .zero88
mov byte[GUItextcolor],211 mov byte[GUItextcolor],211