Formatted and Commented the Add/Browse Cheats window

This commit is contained in:
ipher
2005-05-11 21:27:23 +00:00
parent c61a70962a
commit 8b38f848f0
3 changed files with 7739 additions and 7711 deletions

View File

@@ -718,7 +718,7 @@ ProcessCheatCode:
; make sure flashing cursor doesn't exist
xor ebx,ebx
mov bl,[GUICheatPosB]
mov byte[GUICheatTextA+ebx],0
mov byte[GUICheatTextZ2+ebx],0
; transfer description
mov eax,[NumCheats]
shl eax,5
@@ -728,7 +728,7 @@ ProcessCheatCode:
sub eax,[NumCheats]
add eax,cheatdata
add eax,6
mov ebx,GUICheatTextA
mov ebx,GUICheatTextZ2
mov ecx,20
.dloop
mov dl,[ebx]
@@ -741,7 +741,7 @@ ProcessCheatCode:
jnz .dloop
; determine whether it is gamegenie, par, or GF
; uppercase all codes if necessary
mov eax,GUICheatText9
mov eax,GUICheatTextZ1
mov ecx,14
.loop
mov bl,[eax]
@@ -759,7 +759,7 @@ ProcessCheatCode:
xor eax,eax
mov al,[GUICheatPosA]
dec al
cmp byte[GUICheatText9+eax],'R'
cmp byte[GUICheatTextZ1+eax],'R'
jne .notrep
mov byte[guicheatvalrep],80h
dec byte[GUICheatPosA]
@@ -774,7 +774,7 @@ ProcessCheatCode:
jmp guicheaterror
.par
; check if code is valid
mov eax,GUICheatText9
mov eax,GUICheatTextZ1
mov ecx,8
.looppar
mov bl,[eax]
@@ -795,7 +795,7 @@ ProcessCheatCode:
jmp guicheaterror
.gg
; check if code is valid
mov eax,GUICheatText9
mov eax,GUICheatTextZ1
mov ecx,9
.loopgg
cmp ecx,5
@@ -824,7 +824,7 @@ ProcessCheatCode:
jmp guicheaterror
.gf
; check if code is valid
mov eax,GUICheatText9
mov eax,GUICheatTextZ1
mov ecx,5
.loopgf
mov bl,[eax]
@@ -840,7 +840,7 @@ ProcessCheatCode:
inc eax
dec ecx
jnz .loopgf
mov eax,GUICheatText9+5
mov eax,GUICheatTextZ1+5
mov ecx,6
.loopgf2
mov bl,[eax]
@@ -858,7 +858,7 @@ ProcessCheatCode:
inc eax
dec ecx
jnz .loopgf2
mov bl,[GUICheatText9+13]
mov bl,[GUICheatTextZ1+13]
cmp bl,'0'
je .okaygf3
cmp bl,'1'
@@ -869,7 +869,7 @@ ProcessCheatCode:
decodegf:
; convert code to number format
mov ecx,14
mov esi,GUICheatText9
mov esi,GUICheatTextZ1
.loopb2
mov al,[esi]
cmp al,'X'
@@ -890,15 +890,15 @@ decodegf:
; get address
xor ebx,ebx
xor ecx,ecx
mov cl,[GUICheatText9]
mov cl,[GUICheatTextZ1]
shl ecx,4
add cl,[GUICheatText9+1]
add cl,[GUICheatTextZ1+1]
shl ecx,4
add cl,[GUICheatText9+2]
add cl,[GUICheatTextZ1+2]
shl ecx,4
add cl,[GUICheatText9+3]
add cl,[GUICheatTextZ1+3]
shl ecx,4
add cl,[GUICheatText9+4]
add cl,[GUICheatTextZ1+4]
mov edx,[NumCheats]
shl edx,5
@@ -908,17 +908,17 @@ decodegf:
sub edx,[NumCheats]
; Write data to memory
cmp byte[GUICheatText9+13],1
cmp byte[GUICheatTextZ1+13],1
je near .modifysram
; get data
cmp byte[GUICheatText9+5],'X'
cmp byte[GUICheatTextZ1+5],'X'
je near .nocode
cmp byte[GUICheatText9+6],'X'
cmp byte[GUICheatTextZ1+6],'X'
je near .nocode
mov bl,[GUICheatText9+5]
mov bl,[GUICheatTextZ1+5]
shl bl,4
add bl,[GUICheatText9+6]
add bl,[GUICheatTextZ1+6]
mov esi,[romdata]
mov al,[esi+ecx]
mov [esi+ecx],bl
@@ -934,15 +934,15 @@ decodegf:
add edx,28
.nocode
inc ecx
cmp byte[GUICheatText9+7],'X'
cmp byte[GUICheatTextZ1+7],'X'
je near .nocode1
cmp byte[GUICheatText9+8],'X'
cmp byte[GUICheatTextZ1+8],'X'
je near .nocode1
cmp byte[NumCheats],255
je near .nocode1
mov bl,[GUICheatText9+7]
mov bl,[GUICheatTextZ1+7]
shl bl,4
add bl,[GUICheatText9+8]
add bl,[GUICheatTextZ1+8]
mov esi,[romdata]
mov al,[esi+ecx]
mov [esi+ecx],bl
@@ -954,15 +954,15 @@ decodegf:
add edx,28
.nocode1
inc ecx
cmp byte[GUICheatText9+9],'X'
cmp byte[GUICheatTextZ1+9],'X'
je near .nocode2
cmp byte[GUICheatText9+10],'X'
cmp byte[GUICheatTextZ1+10],'X'
je near .nocode2
cmp byte[NumCheats],255
je near .nocode2
mov bl,[GUICheatText9+9]
mov bl,[GUICheatTextZ1+9]
shl bl,4
add bl,[GUICheatText9+10]
add bl,[GUICheatTextZ1+10]
mov esi,[romdata]
mov al,[esi+ecx]
mov [esi+ecx],bl
@@ -979,13 +979,13 @@ decodegf:
ja near .quit
mov esi,[sram]
; get data
cmp byte[GUICheatText9+5],'X'
cmp byte[GUICheatTextZ1+5],'X'
je .nocodeb
cmp byte[GUICheatText9+6],'X'
cmp byte[GUICheatTextZ1+6],'X'
je .nocodeb
mov bl,[GUICheatText9+5]
mov bl,[GUICheatTextZ1+5]
shl bl,4
add bl,[GUICheatText9+6]
add bl,[GUICheatTextZ1+6]
mov al,[esi+ecx]
mov [esi+ecx],bl
mov byte[cheatdata+edx],2
@@ -996,17 +996,17 @@ decodegf:
add edx,28
.nocodeb
inc ecx
cmp byte[GUICheatText9+7],'X'
cmp byte[GUICheatTextZ1+7],'X'
je .nocode1b
cmp byte[GUICheatText9+8],'X'
cmp byte[GUICheatTextZ1+8],'X'
je .nocode1b
cmp byte[NumCheats],255
je .nocode1b
cmp ecx,65535
ja .nocode1b
mov bl,[GUICheatText9+7]
mov bl,[GUICheatTextZ1+7]
shl bl,4
add bl,[GUICheatText9+8]
add bl,[GUICheatTextZ1+8]
mov al,[esi+ecx+1]
mov [esi+ecx+1],bl
mov byte[cheatdata+edx],2
@@ -1017,17 +1017,17 @@ decodegf:
add edx,28
.nocode1b
inc ecx
cmp byte[GUICheatText9+9],'X'
cmp byte[GUICheatTextZ1+9],'X'
je .nocode2c
cmp byte[GUICheatText9+10],'X'
cmp byte[GUICheatTextZ1+10],'X'
je .nocode2c
cmp byte[NumCheats],255
je .nocode2c
cmp ecx,65535
ja .nocode2c
mov bl,[GUICheatText9+9]
mov bl,[GUICheatTextZ1+9]
shl bl,4
add bl,[GUICheatText9+10]
add bl,[GUICheatTextZ1+10]
mov al,[esi+ecx+2]
mov [esi+ecx+2],bl
mov byte[cheatdata+edx],2
@@ -1052,8 +1052,8 @@ decodegf:
mov dword[GUIcurrentcheatviewloc],0
.noview
.nocheat
mov dword[GUICheatText9],0
mov dword[GUICheatTextA],0
mov dword[GUICheatTextZ1],0
mov dword[GUICheatTextZ2],0
mov byte[GUICheatPosA],0
mov byte[GUICheatPosB],0
ret
@@ -1063,7 +1063,7 @@ decodegg:
;Normal Hex: 0 1 2 3 4 5 6 7 8 9 A B C D E F
; 4 6 D E 2 7 8 3 B 5 C 9 A 0 F 1
; Convert code
mov esi,GUICheatText9
mov esi,GUICheatTextZ1
mov eax,[esi+5]
mov [esi+4],eax
; convert code to number format
@@ -1085,7 +1085,7 @@ decodegg:
dec ecx
jnz .loopb3
mov esi,GUICheatText9
mov esi,GUICheatTextZ1
xor ecx,ecx
mov cl,[esi+2]
shl ecx,4
@@ -1178,8 +1178,8 @@ decodegg:
mov byte[writeon],0
mov byte[CheatOn],1
inc byte[NumCheats]
mov dword[GUICheatText9],0
mov dword[GUICheatTextA],0
mov dword[GUICheatTextZ1],0
mov dword[GUICheatTextZ2],0
mov byte[GUICheatPosA],0
mov byte[GUICheatPosB],0
mov dword[GUIcurrentcheatwin],1
@@ -1200,7 +1200,7 @@ SECTION .text
decodepar:
; convert code to number format
mov ecx,8
mov esi,GUICheatText9
mov esi,GUICheatTextZ1
.loopb
mov al,[esi]
cmp al,'A'
@@ -1218,19 +1218,19 @@ decodepar:
; get address
xor ebx,ebx
xor ecx,ecx
mov bl,[GUICheatText9]
mov bl,[GUICheatTextZ1]
shl bl,4
add bl,[GUICheatText9+1]
mov cl,[GUICheatText9+2]
add bl,[GUICheatTextZ1+1]
mov cl,[GUICheatTextZ1+2]
shl cx,4
add cl,[GUICheatText9+3]
add cl,[GUICheatTextZ1+3]
shl cx,4
add cl,[GUICheatText9+4]
add cl,[GUICheatTextZ1+4]
shl cx,4
add cl,[GUICheatText9+5]
mov al,[GUICheatText9+6]
add cl,[GUICheatTextZ1+5]
mov al,[GUICheatTextZ1+6]
shl al,4
add al,[GUICheatText9+7]
add al,[GUICheatTextZ1+7]
; store into cheatdata
xor edx,edx
@@ -1272,8 +1272,8 @@ decodepar:
mov byte[writeon],0
mov byte[CheatOn],1
inc dword[NumCheats]
mov dword[GUICheatText9],0
mov dword[GUICheatTextA],0
mov dword[GUICheatTextZ1],0
mov dword[GUICheatTextZ2],0
mov byte[GUICheatPosA],0
mov byte[GUICheatPosB],0
mov dword[GUIcurrentcheatwin],1

View File

@@ -1698,7 +1698,7 @@ GUICheatKeys:
sub esi,[GUIcurrentcheatcursloc]
sub esi,[GUIcurrentcheatcursloc]
add esi,cheatdata
mov al,[GUICheatText9]
mov al,[GUICheatTextZ1]
cmp al,'a'
jae .lowletter
cmp al,'A'
@@ -1711,7 +1711,7 @@ GUICheatKeys:
.letter
sub al,'A'-10
.num
mov ah,[GUICheatText9+1]
mov ah,[GUICheatTextZ1+1]
cmp ah,'a'
jae .lowletter2
cmp ah,'A'
@@ -1728,7 +1728,7 @@ GUICheatKeys:
and ah,0Fh
or al,ah
mov [esi+1],al
mov word[GUICheatText9],0
mov word[GUICheatTextZ1],0
pushad
call EnableCheatCodeNoPrevMod
popad
@@ -1743,8 +1743,8 @@ GUICheatKeys:
dec byte[GUICheatPosA]
xor eax,eax
mov al,[GUICheatPosA]
mov byte[GUICheatText9+eax],'_'
mov byte[GUICheatText9+eax+1],0
mov byte[GUICheatTextZ1+eax],'_'
mov byte[GUICheatTextZ1+eax+1],0
ret
.nobacksp
cmp dh,0
@@ -1760,9 +1760,9 @@ GUICheatKeys:
mov byte[GUICCFlash],0
xor eax,eax
mov al,[GUICheatPosA]
mov byte[GUICheatText9+eax],dh
mov byte[GUICheatText9+eax+1],'_'
mov byte[GUICheatText9+eax+2],0
mov byte[GUICheatTextZ1+eax],dh
mov byte[GUICheatTextZ1+eax+1],'_'
mov byte[GUICheatTextZ1+eax+2],0
inc byte[GUICheatPosA]
.nochar
ret
@@ -1781,8 +1781,8 @@ GUICheatKeys:
dec byte[GUICheatPosB]
xor eax,eax
mov al,[GUICheatPosB]
mov byte[GUICheatTextA+eax],'_'
mov byte[GUICheatTextA+eax+1],0
mov byte[GUICheatTextZ2+eax],'_'
mov byte[GUICheatTextZ2+eax+1],0
ret
.nobackspb
cmp dh,0
@@ -1796,9 +1796,9 @@ GUICheatKeys:
xor eax,eax
mov byte[GUICCFlash],0
mov al,[GUICheatPosB]
mov byte[GUICheatTextA+eax],dh
mov byte[GUICheatTextA+eax+1],'_'
mov byte[GUICheatTextA+eax+2],0
mov byte[GUICheatTextZ2+eax],dh
mov byte[GUICheatTextZ2+eax+1],'_'
mov byte[GUICheatTextZ2+eax+2],0
inc byte[GUICheatPosB]
.nocharb
ret

View File

@@ -2377,7 +2377,7 @@ GUIcurrentvideocursloc resd 1
SECTION .text
DisplayGUISound:
DisplayGUISound: ; Sound Related Options
GUIDrawWindowBox 6,GUISoundDisp
;Text Display
@@ -2717,16 +2717,16 @@ DisplayGUICheatConv:
add eax,4
xor ebx,ebx
mov ecx,3
mov edx,GUICheatTextB
mov edx,GUICheatTextZ3
.loop
mov bl,[eax]
and bl,0Fh
mov bl,[GUICheatTextC+ebx]
mov bl,[GUICheatTextZ4+ebx]
mov [edx+1],bl
mov bl,[eax]
and bl,0F0h
shr bl,4
mov bl,[GUICheatTextC+ebx]
mov bl,[GUICheatTextZ4+ebx]
mov [edx],bl
add edx,2
dec eax
@@ -2734,57 +2734,57 @@ DisplayGUICheatConv:
jnz .loop
mov eax,[ccheatnpos]
inc eax
mov edx,GUICheatTextB+7
mov edx,GUICheatTextZ3+7
mov bl,[eax]
and bl,0Fh
mov bl,[GUICheatTextC+ebx]
mov bl,[GUICheatTextZ4+ebx]
mov [edx+1],bl
mov bl,[eax]
and bl,0F0h
shr bl,4
mov bl,[GUICheatTextC+ebx]
mov bl,[GUICheatTextZ4+ebx]
mov [edx],bl
mov eax,[ccheatnpos]
add eax,5
mov edx,GUICheatTextB+10
mov edx,GUICheatTextZ3+10
mov bl,[eax]
and bl,0Fh
mov bl,[GUICheatTextC+ebx]
mov bl,[GUICheatTextZ4+ebx]
mov [edx+1],bl
mov bl,[eax]
and bl,0F0h
shr bl,4
mov bl,[GUICheatTextC+ebx]
mov bl,[GUICheatTextZ4+ebx]
mov [edx],bl
mov eax,[ccheatnpos]
test byte[eax-28],80h
jnz .src
test byte[eax],04h
jz .on
mov byte[GUICheatTextB+13],'O'
mov byte[GUICheatTextB+14],'F'
mov byte[GUICheatTextB+15],'F'
mov byte[GUICheatTextZ3+13],'O'
mov byte[GUICheatTextZ3+14],'F'
mov byte[GUICheatTextZ3+15],'F'
jmp .off
.on
test byte[eax],80h
jnz .repl
mov byte[GUICheatTextB+13],'O'
mov byte[GUICheatTextB+14],'N'
mov byte[GUICheatTextB+15],' '
mov byte[GUICheatTextZ3+13],'O'
mov byte[GUICheatTextZ3+14],'N'
mov byte[GUICheatTextZ3+15],' '
jmp .off
.repl
mov byte[GUICheatTextB+13],'R'
mov byte[GUICheatTextB+14],'P'
mov byte[GUICheatTextB+15],'L'
mov byte[GUICheatTextZ3+13],'R'
mov byte[GUICheatTextZ3+14],'P'
mov byte[GUICheatTextZ3+15],'L'
jmp .off
.src
mov byte[GUICheatTextB+13],'S'
mov byte[GUICheatTextB+14],'R'
mov byte[GUICheatTextB+15],'C'
mov byte[GUICheatTextZ3+13],'S'
mov byte[GUICheatTextZ3+14],'R'
mov byte[GUICheatTextZ3+15],'C'
.off
mov ecx,20
add eax,8
mov edx,GUICheatTextB+17
mov edx,GUICheatTextZ3+17
.loop2
mov bl,[eax]
mov [edx],bl
@@ -2798,46 +2798,53 @@ DisplayGUICheatConv:
test dword[ccheatnleft],80000000h
jnz %%skip
call DisplayGUICheatConv
GUIOuttextwin2 7,%1,%2,GUICheatTextB
GUIOuttextwin2 7,%1,%2,GUICheatTextZ3
add dword[ccheatnpos],28
dec dword[ccheatnleft]
%%skip
%endmacro
DisplayGUICheat:
DisplayGUICheat: ; Add/Browse Cheats menu
GUIDrawWindowBox 7,GUICheatDisp
; Display Text
mov byte[GUItextcolor],217
cmp byte[GUIWincoladd],0
je .zero
mov byte[GUItextcolor],211
.zero
sub byte[GUItextcolor],15
GUIOuttextwin2 7,6,132,GUICheatText1
GUIOuttextwin2 7,6,143,GUICheatText2
GUIOuttextwin2 7,6,13,GUICheatText3
GUIOuttextwin2 7,11,154,GUICheatTextD
GUIOuttextwin2 7,11,164,GUICheatTextE
GUIOuttextwin2 7,11,172,GUICheatTextF
GUIOuttextwin2 7,11,180,GUICheatTextG
GUIOuttextwin2 7,26,191,GUICheatTextJ
add byte[GUItextcolor],15
GUIOuttextwin2 7,5,131,GUICheatText1
GUIOuttextwin2 7,5,142,GUICheatText2
GUIOuttextwin2 7,5,12,GUICheatText3
GUIOuttextwin2 7,10,153,GUICheatTextD
GUIOuttextwin2 7,10,163,GUICheatTextE
GUIOuttextwin2 7,10,171,GUICheatTextF
GUIOuttextwin2 7,10,179,GUICheatTextG
GUIOuttextwin2 7,25,190,GUICheatTextJ
sub byte[GUItextcolor],15 ;Shadow
GUIOuttextwin2 7,6,13,GUICheatTextA
GUIOuttextwin2 7,6,132,GUICheatTextC1
GUIOuttextwin2 7,6,143,GUICheatTextC2
GUIOuttextwin2 7,11,154,GUICheatTextD1
GUIOuttextwin2 7,11,164,GUICheatTextD2
GUIOuttextwin2 7,11,172,GUICheatTextD3
GUIOuttextwin2 7,11,180,GUICheatTextD4
GUIOuttextwin2 7,26,191,GUICheatTextE1
add byte[GUItextcolor],15 ;Text
GUIOuttextwin2 7,5,12,GUICheatTextA
GUIOuttextwin2 7,5,131,GUICheatTextC1
GUIOuttextwin2 7,5,142,GUICheatTextC2
GUIOuttextwin2 7,10,153,GUICheatTextD1
GUIOuttextwin2 7,10,163,GUICheatTextD2
GUIOuttextwin2 7,10,171,GUICheatTextD3
GUIOuttextwin2 7,10,179,GUICheatTextD4
GUIOuttextwin2 7,25,190,GUICheatTextE1
DrawGUIWinBox 7,5,20,229,108,167
DrawGUIButton 7,5,113,47,124,GUICheatText4,5,0,0
DrawGUIButton 7,52,113,94,124,GUICheatText5,6,0,0
DrawGUIButton 7,99,113,141,124,GUICheatText7,7,0,0
DrawGUIButton 7,146,113,188,124,GUICheatText8,8,0,0
DrawGUIButton 7,212,134,236,145,GUICheatText6,9,0,0
DrawGUIButton 7,193,113,235,124,GUICheatTextI,33,0,0
; Draw Buttons
DrawGUIButton 7,5,113,47,124,GUICheatTextB1,5,0,0
DrawGUIButton 7,52,113,94,124,GUICheatTextB2,6,0,0
DrawGUIButton 7,99,113,141,124,GUICheatTextB3,7,0,0
DrawGUIButton 7,146,113,188,124,GUICheatTextB4,8,0,0
DrawGUIButton 7,193,113,235,124,GUICheatTextB5,33,0,0
DrawGUIButton 7,212,134,236,145,GUICheatTextB6,9,0,0
; Red Highlight for Cheats box
cmp dword[GUIcurrentcheatwin],0
jne near .nowinbox
mov ebx,[GUIcurrentcheatcursloc]
@@ -2849,6 +2856,8 @@ DisplayGUICheat:
DrawGUIWinBox2 7,5,229,7,224
.nowinbox
; Draw Cheats box
mov byte[GUItextcolor],223
mov dword[ccheatnpos],cheatdata
mov eax,[NumCheats]
@@ -2863,7 +2872,7 @@ DisplayGUICheat:
sub eax,ebx
sub eax,ebx
add [ccheatnpos],eax
GUIOuttextwin2cheat 12,24
GUIOuttextwin2cheat 12,24 ; Shadow
GUIOuttextwin2cheat 12,24+7
GUIOuttextwin2cheat 12,24+7*2
GUIOuttextwin2cheat 12,24+7*3
@@ -2894,7 +2903,7 @@ DisplayGUICheat:
sub eax,ebx
sub eax,ebx
add [ccheatnpos],eax
GUIOuttextwin2cheat 11,23
GUIOuttextwin2cheat 11,23 ;Text
GUIOuttextwin2cheat 11,23+7
GUIOuttextwin2cheat 11,23+7*2
GUIOuttextwin2cheat 11,23+7*3
@@ -2907,6 +2916,8 @@ DisplayGUICheat:
GUIOuttextwin2cheat 11,23+7*10
GUIOuttextwin2cheat 11,23+7*11
;Scrollbar
DrawSlideBarWin 7,231,28,[GUIcurrentcheatviewloc],[NumCheats],12,73,GUICStA
cmp byte[GUICHold],7
jne .noholda
@@ -2927,7 +2938,8 @@ DisplayGUICheat:
sub byte[GUIWincoladd],3
.noholdb2
; Draw border
; Draw borders
mov dword[GUIWincol],148+10
cmp byte[cwindrawn],1
jne .noone2
@@ -2938,9 +2950,9 @@ DisplayGUICheat:
mov dword[GUIWincol],148
.nozero2
mov dl,[GUIWincol]
DrawGUIWinBox 7,5,19,229,19,dl
DrawGUIWinBox 7,82,128,172,128,dl
DrawGUIWinBox 7,82,139,196,139,dl
DrawGUIWinBox 7,5,19,229,19,dl ; Cheat Box
DrawGUIWinBox 7,82,128,172,128,dl ; Code Box
DrawGUIWinBox 7,82,139,196,139,dl ; Descrip. Box
mov dl,[GUIWincol]
add dl,1
DrawGUIWinBox 7,4,20,3,108,dl
@@ -2952,11 +2964,12 @@ DisplayGUICheat:
DrawGUIWinBox 7,82,137,172,137,dl
DrawGUIWinBox 7,82,148,196,148,dl
mov dl,[GUIWincol]
add dl,3
add dl,3 ; Cheat Box doesn't have right border
DrawGUIWinBox 7,174,129,173,136,dl
DrawGUIWinBox 7,156,140,197,147,dl
; Draw boxes
; Draw input boxes
mov ebx,[GUIcurrentcheatcursloc]
sub ebx,[GUIcurrentcheatviewloc]
mov eax,ebx
@@ -2965,7 +2978,8 @@ DisplayGUICheat:
add ebx,eax
add ebx,eax
add ebx,22
mov dl,167
mov dl,167 ;Code Box
cmp dword[GUIcurrentcheatwin],1
jne .notopibox
mov dl,226
@@ -2975,7 +2989,8 @@ DisplayGUICheat:
.nocoladd
.notopibox
DrawGUIWinBox 7,82,129,172,136,dl
mov dl,167
mov dl,167 ;Descrip. Box
cmp dword[GUIcurrentcheatwin],2
jne .nobotibox
mov dl,226
@@ -2985,22 +3000,25 @@ DisplayGUICheat:
.nocoladd2
.nobotibox
DrawGUIWinBox 7,82,140,196,147,dl
mov byte[GUItextcolor],223
GUIOuttextwin2 7,84,132,GUICheatText9
GUIOuttextwin2 7,84,143,GUICheatTextA
mov byte[GUItextcolor],221
mov byte[GUItextcolor],223 ;Shadow
GUIOuttextwin2 7,84,132,GUICheatTextZ1
GUIOuttextwin2 7,84,143,GUICheatTextZ2
mov byte[GUItextcolor],221 ;Text
cmp byte[GUIWincoladd],0
je .zero3
mov byte[GUItextcolor],222
.zero3
GUIOuttextwin2 7,83,131,GUICheatText9
GUIOuttextwin2 7,83,142,GUICheatTextA
xor eax,eax
GUIOuttextwin2 7,83,131,GUICheatTextZ1
GUIOuttextwin2 7,83,142,GUICheatTextZ2
xor eax,eax ; Code for movement of cursor
mov al,[GUICheatPosA]
mov byte[GUICheatText9+eax],0
mov byte[GUICheatTextZ1+eax],0
xor ebx,ebx
mov bl,[GUICheatPosB]
mov byte[GUICheatTextA+ebx],0
mov byte[GUICheatTextZ2+ebx],0
test byte[GUICCFlash],8
jnz .nound
cmp dword[GUIcurrentcheatwin],1
@@ -3009,12 +3027,14 @@ DisplayGUICheat:
je .win2
jmp .nound
.win1
mov byte[GUICheatText9+eax],'_'
mov byte[GUICheatTextZ1+eax],'_'
jmp .nound
.win2
mov byte[GUICheatTextA+ebx],'_'
mov byte[GUICheatTextZ2+ebx],'_'
.nound
; Checkbox
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[AutoLoadCht],1
jne .nocheckbox
@@ -3024,24 +3044,31 @@ DisplayGUICheat:
ret
SECTION .data
GUICheatText1 db 'ENTER CODE :',0
GUICheatText2 db 'DESCRIPTION:',0
GUICheatText3 db 'ADDRESS CV PV TGL DESCRIPTION',0
GUICheatText4 db 'REMOVE',0
GUICheatText5 db 'TOGGLE',0
GUICheatText6 db 'ADD',0
GUICheatText7 db 'SAVE',0
GUICheatText8 db 'LOAD',0
GUICheatTextI db 'FIX',0
GUICheatText9 db '_',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; 14 digits
GUICheatTextA 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
GUICheatTextB db '000000 00 00 OFF BLAHBLAH---',0,0,0,0,0,0,0,0,0,0,0,0
GUICheatTextC db '0123456789ABCDEF'
GUICheatTextD db 'VALID CODES : GAME GENIE, PAR, AND GF',0
GUICheatTextE db 'NOTE : YOU MAY HAVE TO RESET THE GAME',0
GUICheatTextF db ' AFTER ENTERING THE CODE. REMEMBER TO',0
GUICheatTextG db ' INSERT THE "-" FOR GAME GENIE CODES',0
GUICheatTextJ db 'AUTO-LOAD .CHT FILE AT GAME LOAD',0
GUICheatTextA db 'ADDRESS CV PV TGL DESCRIPTION',0 ; Top
GUICheatTextB1 db 'REMOVE',0 ; Buttons
GUICheatTextB2 db 'TOGGLE',0
GUICheatTextB3 db 'SAVE',0
GUICheatTextB4 db 'LOAD',0
GUICheatTextB5 db 'FIX',0
GUICheatTextB6 db 'ADD',0
GUICheatTextC1 db 'ENTER CODE :',0 ; Text by input boxes
GUICheatTextC2 db 'DESCRIPTION:',0
GUICheatTextD1 db 'VALID CODES : GAME GENIE, PAR, AND GF',0 ; Info for User
GUICheatTextD2 db 'NOTE : YOU MAY HAVE TO RESET THE GAME',0
GUICheatTextD3 db ' AFTER ENTERING THE CODE. REMEMBER TO',0
GUICheatTextD4 db ' INSERT THE "-" FOR GAME GENIE CODES',0
GUICheatTextE1 db 'AUTO-LOAD .CHT FILE AT GAME LOAD',0 ; Checkbox Text
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'
SECTION .bss
GUICheatPosA resb 1
GUICheatPosB resb 1
@@ -3053,6 +3080,7 @@ ccheatnpos resd 1
ccheatnleft resd 1
SECTION .text
DrawWindowSearch:
GUIDrawWindowBox 13,GUISearchDisp
ret
@@ -5482,7 +5510,7 @@ EEMode:
mov eax,0
ret
DisplayGUIAddOns:
DisplayGUIAddOns: ;Select Special Controllers
GUIDrawWindowBox 17,GUIAddOnsDisp
@@ -5510,7 +5538,7 @@ DisplayGUIAddOns:
GUIOuttextwin2 17,21,58,GUIAddOnText5
.endEE
add byte[GUItextcolor],15 ;Test
add byte[GUItextcolor],15 ;Text
call EEMode
cmp eax,0
je near .noEE2 ;You know it!
@@ -5961,7 +5989,7 @@ GUIPathsTextC db 'MDH:',0
GUIPathsTextD db 'SPL4:',0
NEWSYM GUIBlinkCursor, times 2 db 0
DisplayGUISave:
DisplayGUISave: ;Save & Rewind options/Hotkeys
GUIDrawWindowBox 20,GUISaveDisp
;Text Display