6490 lines
173 KiB
PHP
6490 lines
173 KiB
PHP
;Copyright (C) 1997-2005 ZSNES Team ( zsKnight, _Demo_, pagefault, Nach )
|
|
;
|
|
;http://www.zsnes.com
|
|
;http://sourceforge.net/projects/zsnes
|
|
;
|
|
;This program is free software; you can redistribute it and/or
|
|
;modify it under the terms of the GNU General Public License
|
|
;as published by the Free Software Foundation; either
|
|
;version 2 of the License, or (at your option) any later
|
|
;version.
|
|
;
|
|
;This program is distributed in the hope that it will be useful,
|
|
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
;GNU General Public License for more details.
|
|
;
|
|
;You should have received a copy of the GNU General Public License
|
|
;along with this program; if not, write to the Free Software
|
|
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
; Window Display Routines
|
|
; Last button value used = 65
|
|
|
|
GUIStringGreater:
|
|
; compares string at esi to edi and returns 1 to al if esi is >, else 0
|
|
push esi
|
|
cmp word[esi],'.'
|
|
je .less
|
|
cmp word[esi+32],'.'
|
|
je .greater
|
|
cmp word[esi],'..'
|
|
je .less
|
|
cmp word[esi+32],'..'
|
|
je .greater
|
|
.nextchar
|
|
cmp byte[esi],0
|
|
je .less
|
|
cmp byte[esi+32],0
|
|
je .greater
|
|
mov al,[esi]
|
|
mov cl,[esi+32]
|
|
cmp al,'a'
|
|
jb .noucase1
|
|
cmp al,'z'
|
|
ja .noucase1
|
|
sub al,'z'-'Z'
|
|
.noucase1
|
|
cmp cl,'a'
|
|
jb .noucase2
|
|
cmp cl,'z'
|
|
ja .noucase2
|
|
sub cl,'z'-'Z'
|
|
.noucase2
|
|
cmp al,cl
|
|
jb .less
|
|
ja .greater
|
|
inc esi
|
|
jmp .nextchar
|
|
.less
|
|
mov al,0
|
|
jmp .skip
|
|
.greater
|
|
mov al,1
|
|
.skip
|
|
pop esi
|
|
ret
|
|
|
|
GUIStringGreater2:
|
|
; compares string at ebx to edx and returns 1 to al if esi is >, else 0
|
|
push edx
|
|
push ebx
|
|
cmp word[ebx],'.'
|
|
je .less
|
|
cmp word[edx],'.'
|
|
je .greater
|
|
cmp word[ebx],'..'
|
|
je .less
|
|
cmp word[ebx],'..'
|
|
je .greater
|
|
.nextchar
|
|
cmp byte[ebx],0
|
|
je .less
|
|
cmp byte[edx],0
|
|
je .greater
|
|
mov al,[ebx]
|
|
mov cl,[edx]
|
|
cmp al,'a'
|
|
jb .noucase1
|
|
cmp al,'z'
|
|
ja .noucase1
|
|
sub al,'z'-'Z'
|
|
.noucase1
|
|
cmp cl,'a'
|
|
jb .noucase2
|
|
cmp cl,'z'
|
|
ja .noucase2
|
|
sub cl,'z'-'Z'
|
|
.noucase2
|
|
cmp al,cl
|
|
jb .less
|
|
ja .greater
|
|
inc ebx
|
|
inc edx
|
|
jmp .nextchar
|
|
.less
|
|
mov al,0
|
|
jmp .skip
|
|
.greater
|
|
mov al,1
|
|
.skip
|
|
pop ebx
|
|
pop edx
|
|
ret
|
|
|
|
%Macro DrawGUILineSc 2
|
|
mov dword[GUIcolscaleval],%2
|
|
mov edx,%1
|
|
push eax
|
|
push ecx
|
|
call GUIHLines
|
|
pop ecx
|
|
pop eax
|
|
inc ebx
|
|
%Endmacro
|
|
|
|
%Macro DrawGUILine 0
|
|
push eax
|
|
push ecx
|
|
call GUIHLine
|
|
pop ecx
|
|
pop eax
|
|
inc ebx
|
|
%Endmacro
|
|
|
|
%macro DrawTitleBar 0
|
|
mov edx,46+157+6
|
|
sub edx,[GUIWincoladd]
|
|
DrawGUILine
|
|
mov edx,42+157+4+4
|
|
sub edx,[GUIWincoladd]
|
|
DrawGUILine
|
|
dec edx
|
|
DrawGUILine
|
|
dec edx
|
|
DrawGUILine
|
|
dec edx
|
|
DrawGUILine
|
|
dec edx
|
|
DrawGUILine
|
|
dec edx
|
|
DrawGUILine
|
|
dec edx
|
|
DrawGUILine
|
|
dec edx
|
|
DrawGUILine
|
|
mov edx,38+157+4
|
|
sub edx,[GUIWincoladd]
|
|
DrawGUILine
|
|
sub ebx,10
|
|
mov edx,44+157+4
|
|
sub edx,[GUIWincoladd]
|
|
mov esi,9
|
|
push ecx
|
|
mov ecx,eax
|
|
%%loop2
|
|
DrawGUILine
|
|
dec esi
|
|
jnz %%loop2
|
|
pop ecx
|
|
sub ebx,8
|
|
mov edx,40+157+4
|
|
sub edx,[GUIWincoladd]
|
|
mov esi,9
|
|
push eax
|
|
mov eax,ecx
|
|
%%loop3
|
|
DrawGUILine
|
|
dec esi
|
|
jnz %%loop3
|
|
pop eax
|
|
%endmacro
|
|
|
|
%macro drawshadow2 3
|
|
mov edx,[GUIwinposy+%1*4]
|
|
cmp edx,223
|
|
jg near .noshadow
|
|
cmp edx,0
|
|
jge .noshadclip
|
|
mov edx,0
|
|
.noshadclip
|
|
mov ebx,edx
|
|
add ebx,%3
|
|
add ebx,9
|
|
cmp ebx,0
|
|
jl near .noshadow
|
|
cmp ebx,223
|
|
jng .noshadclip2
|
|
mov ebx,223
|
|
.noshadclip2
|
|
sub ebx,edx
|
|
inc ebx
|
|
mov edi,edx
|
|
shl edi,8
|
|
mov eax,edx
|
|
shl eax,5
|
|
add edi,eax
|
|
mov edx,[GUIwinposx+%1*4]
|
|
mov ecx,edx
|
|
cmp edx,255
|
|
jg .noshadow
|
|
cmp edx,-3
|
|
jnl .noshadclip3
|
|
mov edx,-3
|
|
.noshadclip3
|
|
add ecx,%2
|
|
cmp ecx,0
|
|
jl .noshadow
|
|
cmp ecx,255
|
|
jng .noshadclip4
|
|
mov ecx,255
|
|
.noshadclip4
|
|
sub ecx,edx
|
|
inc ecx
|
|
add edi,edx
|
|
add edi,[vidbuffer]
|
|
add edi,288*3+3+16
|
|
call GUIDrawShadow2
|
|
.noshadow
|
|
%endmacro
|
|
|
|
%macro GUIDrawWindowBox 2
|
|
mov dword[GUIWincoladd],4
|
|
mov dword[GUIWincol],148+10
|
|
cmp byte[cwindrawn],1
|
|
jne .noone
|
|
mov dword[GUIWincol],148+5
|
|
.noone
|
|
cmp byte[cwindrawn],0
|
|
jne .nozero
|
|
mov dword[GUIWincoladd],0
|
|
mov dword[GUIWincol],148
|
|
.nozero
|
|
drawshadow2 %1,dword[GUIwinsizex+%1*4],dword[GUIwinsizey+%1*4]
|
|
mov eax,dword[GUIwinposx+%1*4]
|
|
mov ebx,dword[GUIwinposy+%1*4]
|
|
mov ecx,eax
|
|
add ecx,dword[GUIwinsizex+%1*4]
|
|
DrawTitleBar
|
|
mov esi,dword[GUIwinsizey+%1*4]
|
|
dec esi
|
|
mov edx,dword[GUIWincol]
|
|
add edx,2
|
|
.loop
|
|
DrawGUILine
|
|
dec esi
|
|
jnz .loop
|
|
mov edx,dword[GUIWincol]
|
|
DrawGUILine
|
|
mov eax,dword[GUIwinposx+%1*4]
|
|
mov ebx,dword[GUIwinposy+%1*4]
|
|
add ebx,10
|
|
mov ecx,eax
|
|
mov esi,dword[GUIwinsizey+%1*4]
|
|
mov edx,dword[GUIWincol]
|
|
add edx,3
|
|
dec esi
|
|
.loop2
|
|
DrawGUILine
|
|
dec esi
|
|
jnz .loop2
|
|
mov eax,dword[GUIwinposx+%1*4]
|
|
mov ebx,dword[GUIwinposy+%1*4]
|
|
add ebx,10
|
|
add eax,dword[GUIwinsizex+%1*4]
|
|
mov ecx,eax
|
|
mov esi,dword[GUIwinsizey+%1*4]
|
|
mov edx,dword[GUIWincol]
|
|
add edx,1
|
|
.loop3
|
|
DrawGUILine
|
|
dec esi
|
|
jnz .loop3
|
|
mov ebx,dword[GUIwinposy+%1*4]
|
|
add ebx,3
|
|
mov edx,dword[GUIwinposx+%1*4]
|
|
add edx,3
|
|
mov byte[GUItextcolor],184
|
|
GUIOuttextwin %2
|
|
mov ebx,dword[GUIwinposy+%1*4]
|
|
add ebx,2
|
|
mov edx,dword[GUIwinposx+%1*4]
|
|
add edx,2
|
|
mov byte[GUItextcolor],220
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero2
|
|
sub byte[GUItextcolor],6
|
|
.zero2
|
|
GUIOuttextwin %2
|
|
mov eax,dword[GUIwinposx+%1*4]
|
|
mov ebx,dword[GUIwinposy+%1*4]
|
|
add eax,dword[GUIwinsizex+%1*4]
|
|
sub eax,10
|
|
GUIDisplayIcon GUIIconDataClose
|
|
%endmacro
|
|
|
|
%macro DrawGUIWinBox 6
|
|
mov eax,dword[GUIwinposx+%1*4]
|
|
mov ebx,dword[GUIwinposy+%1*4]
|
|
add eax,%2
|
|
add ebx,%3
|
|
mov ecx,eax
|
|
add ecx,%4-%2+1
|
|
mov dl,%6
|
|
mov esi,%5-%3+1
|
|
%%loop
|
|
DrawGUILine
|
|
dec esi
|
|
jnz %%loop
|
|
%endmacro
|
|
|
|
%macro DrawGUIWinBox2 5
|
|
mov eax,dword[GUIwinposx+%1*4]
|
|
add eax,%2
|
|
mov ecx,eax
|
|
add ecx,%3-%2+1
|
|
mov dl,%5
|
|
cmp byte[GUIWincoladd],0
|
|
je %%zero
|
|
inc dl
|
|
%%zero
|
|
mov esi,%4
|
|
add ebx,dword[GUIwinposy+%1*4]
|
|
%%loop
|
|
DrawGUILine
|
|
dec esi
|
|
jnz %%loop
|
|
%endmacro
|
|
|
|
%macro DrawGUIWinBox3 6
|
|
mov ecx,%4
|
|
mov eax,dword[GUIwinposx+%1*4]
|
|
mov ebx,dword[GUIwinposy+%1*4]
|
|
add eax,%2
|
|
add ebx,%3
|
|
add ecx,eax
|
|
sub ecx,%2
|
|
inc ecx
|
|
mov dl,%6
|
|
mov esi,%5-%3+1
|
|
%%loop
|
|
DrawGUILine
|
|
dec esi
|
|
jnz %%loop
|
|
%endmacro
|
|
|
|
%macro DrawGUIButton 9
|
|
mov dl,byte[GUItextcolor]
|
|
sub dl,5
|
|
cmp byte[GUICBHold],%7
|
|
jne %%noa
|
|
sub dl,13
|
|
%%noa
|
|
DrawGUIWinBox %1,%2,%3,%4,%3,dl
|
|
sub dl,3
|
|
cmp byte[GUICBHold],%7
|
|
jne %%nob
|
|
add dl,5
|
|
%%nob
|
|
DrawGUIWinBox %1,%2,%3,%2,%5,dl
|
|
sub dl,3
|
|
cmp byte[GUICBHold],%7
|
|
jne %%noc
|
|
add dl,5
|
|
%%noc
|
|
DrawGUIWinBox %1,%2+1,%3+1,%4-2,%5-2,dl
|
|
sub dl,3
|
|
cmp byte[GUICBHold],%7
|
|
jne %%nod
|
|
add dl,5
|
|
%%nod
|
|
DrawGUIWinBox %1,%4+1,%3+1,%4-2,%5-2,dl
|
|
sub dl,3
|
|
cmp byte[GUICBHold],%7
|
|
jne %%noe
|
|
add dl,5
|
|
%%noe
|
|
DrawGUIWinBox %1,%2,%5,%4-1,%5,dl
|
|
cmp byte[GUICBHold],%7
|
|
je near %%no2
|
|
sub byte[GUItextcolor],15
|
|
GUIOuttextwin2 %1,%2+5+%8,%3+4+%9,%6
|
|
add byte[GUItextcolor],15
|
|
GUIOuttextwin2 %1,%2+4+%8,%3+3+%9,%6
|
|
jmp %%yes
|
|
%%no2
|
|
sub byte[GUItextcolor],18
|
|
GUIOuttextwin2 %1,%2+6+%8,%3+5+%9,%6
|
|
add byte[GUItextcolor],15
|
|
GUIOuttextwin2 %1,%2+5+%8,%3+4+%9,%6
|
|
add byte[GUItextcolor],3
|
|
%%yes
|
|
%endmacro
|
|
|
|
%macro GUIOuttextwin2load 3
|
|
test dword[cloadnleft],80000000h
|
|
jnz %%skip
|
|
cmp byte[GUIloadfntype],0
|
|
jne %%nottype0
|
|
mov eax,[cloadnposb]
|
|
mov eax,[spcRamcmp+eax*4]
|
|
inc eax
|
|
mov [cloadnpos],eax
|
|
inc dword[cloadnposb]
|
|
%%nottype0
|
|
GUIOuttextwin2l %1,%2,%3,[cloadnpos]
|
|
add dword[cloadnpos],32
|
|
dec dword[cloadnleft]
|
|
%%skip
|
|
%endmacro
|
|
|
|
%macro GUIDisplayButtonHole 5
|
|
mov dword[GUITemp],GUIIconDataButtonHole
|
|
cmp %4,%5
|
|
jne %%nofill
|
|
mov dword[GUITemp],GUIIconDataButtonFill
|
|
%%nofill
|
|
GUIDisplayIconWin %1,%2,%3,[GUITemp]
|
|
%endmacro
|
|
|
|
; DGUIDisplay
|
|
|
|
DisplayGUILoad:
|
|
GUIDrawWindowBox 1,GUILoadDisp
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero
|
|
mov byte[GUItextcolor],211
|
|
.zero
|
|
sub byte[GUItextcolor],15
|
|
%ifdef __MSDOS__
|
|
GUIOuttextwin2 1,21,166,GUILoadText3
|
|
GUIOuttextwin2 1,21,174,GUILoadText4
|
|
GUIOuttextwin2 1,21,182,GUILoadText5
|
|
%endif
|
|
GUIOuttextwin2 1,21,192,GUILoadText6
|
|
GUIOuttextwin2 1,6,16,GUILoadText7
|
|
GUIOuttextwin2 1,161,16,GUILoadText8
|
|
GUIOuttextwin2 1,6,138,GUIcurrentdir
|
|
|
|
GUIOuttextwin2 1,146,172,GUILoadTextB
|
|
GUIOuttextwin2 1,155,182,GUILoadTextC
|
|
GUIOuttextwin2 1,155,192,GUILoadTextD
|
|
GUIOuttextwin2 1,195,182,GUILoadTextE
|
|
GUIOuttextwin2 1,195,192,GUILoadTextF
|
|
|
|
mov dword[cloadmaxlen],39
|
|
cmp dword[GUIcurrentfilewin],0
|
|
jne .nofiles
|
|
%ifndef __MSDOS__
|
|
mov eax,[GUIcurrentcursloc]
|
|
mov eax,[spcRamcmp+eax*4]
|
|
inc eax
|
|
mov [cloadnpos],eax
|
|
GUIOuttextwin2l 1,6,158,[cloadnpos]
|
|
%endif
|
|
.nofiles
|
|
add byte[GUItextcolor],15
|
|
%ifdef __MSDOS__
|
|
GUIOuttextwin2 1,20,165,GUILoadText3
|
|
GUIOuttextwin2 1,20,173,GUILoadText4
|
|
GUIOuttextwin2 1,20,181,GUILoadText5
|
|
%endif
|
|
GUIOuttextwin2 1,20,191,GUILoadText6
|
|
GUIOuttextwin2 1,5,15,GUILoadText7
|
|
GUIOuttextwin2 1,160,15,GUILoadText8
|
|
GUIOuttextwin2 1,5,137,GUIcurrentdir
|
|
|
|
GUIOuttextwin2 1,145,171,GUILoadTextB
|
|
GUIOuttextwin2 1,154,181,GUILoadTextC
|
|
GUIOuttextwin2 1,154,191,GUILoadTextD
|
|
GUIOuttextwin2 1,194,181,GUILoadTextE
|
|
GUIOuttextwin2 1,194,191,GUILoadTextF
|
|
|
|
mov dword[cloadmaxlen],39
|
|
cmp dword[GUIcurrentfilewin],0
|
|
jne .nofilesb
|
|
%ifndef __MSDOS__
|
|
mov eax,[GUIcurrentcursloc]
|
|
mov eax,[spcRamcmp+eax*4]
|
|
inc eax
|
|
mov [cloadnpos],eax
|
|
GUIOuttextwin2l 1,5,157,[cloadnpos]
|
|
%endif
|
|
.nofilesb
|
|
DrawGUIButton 1,186,165,228,176,GUILoadText9,1,0,0
|
|
mov al,[GUIWincol]
|
|
mov byte[GUItextcolor],al
|
|
%ifdef __MSDOS__
|
|
GUIOuttextwin2 1,6,157,GUILoadText2
|
|
%endif
|
|
mov byte[GUItextcolor],163
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero3
|
|
mov byte[GUItextcolor],164
|
|
.zero3
|
|
%ifdef __MSDOS__
|
|
GUIOuttextwin2 1,5,156,GUILoadText2
|
|
%endif
|
|
DrawGUIWinBox 1,5,25,144,134,167 ; 126 = 6 * 21, 112 = 7 * 16
|
|
DrawGUIWinBox 1,160,25,228,134,167 ; 78 = 6 * 13
|
|
DrawGUIWinBox 1,5,145,228,152,167 ; 126 = 6 * 21, 112 = 7 * 16
|
|
|
|
xor ebx,ebx
|
|
mov bl,[GUILoadPos]
|
|
mov byte[GUILoadTextA+ebx],0
|
|
test byte[GUILDFlash],8
|
|
jnz .nound
|
|
mov byte[GUILoadTextA+ebx],'_'
|
|
mov byte[GUILoadTextA+ebx+1],0
|
|
.nound
|
|
|
|
mov ebx,[GUIcurrentcursloc]
|
|
sub ebx,[GUIcurrentviewloc]
|
|
cmp dword[GUIcurrentfilewin],0
|
|
je .files
|
|
mov ebx,[GUIcurrentdircursloc]
|
|
sub ebx,[GUIcurrentdirviewloc]
|
|
.files
|
|
|
|
mov eax,ebx
|
|
lea ebx,[ebx*4]
|
|
add ebx,eax
|
|
add ebx,eax
|
|
add ebx,eax
|
|
add ebx,27
|
|
cmp dword[GUIcurrentfilewin],0
|
|
jne .dir
|
|
DrawGUIWinBox2 1,5,144,7,224
|
|
jmp .files2
|
|
.dir
|
|
DrawGUIWinBox2 1,160,228,7,224
|
|
.files2
|
|
|
|
mov byte[GUItextcolor],223
|
|
GUIOuttextwin2 1,8,148, GUILoadTextA
|
|
mov eax,[spcBuffera]
|
|
inc eax
|
|
mov dword[cloadnpos],eax
|
|
mov eax,[GUIfileentries]
|
|
sub eax,[GUIcurrentviewloc]
|
|
dec eax
|
|
mov dword[cloadnleft],eax
|
|
mov eax,[GUIcurrentviewloc]
|
|
mov [cloadnposb],eax
|
|
shl eax,5
|
|
add [cloadnpos],eax
|
|
mov dword[cloadmaxlen],23
|
|
|
|
GUIOuttextwin2load 1,8,29
|
|
GUIOuttextwin2load 1,8,29+7
|
|
GUIOuttextwin2load 1,8,29+7*2
|
|
GUIOuttextwin2load 1,8,29+7*3
|
|
GUIOuttextwin2load 1,8,29+7*4
|
|
GUIOuttextwin2load 1,8,29+7*5
|
|
GUIOuttextwin2load 1,8,29+7*6
|
|
GUIOuttextwin2load 1,8,29+7*7
|
|
GUIOuttextwin2load 1,8,29+7*8
|
|
GUIOuttextwin2load 1,8,29+7*9
|
|
GUIOuttextwin2load 1,8,29+7*10
|
|
GUIOuttextwin2load 1,8,29+7*11
|
|
GUIOuttextwin2load 1,8,29+7*12
|
|
GUIOuttextwin2load 1,8,29+7*13
|
|
GUIOuttextwin2load 1,8,29+7*14
|
|
|
|
mov eax,[spcBuffera]
|
|
inc eax
|
|
mov dword[cloadnpos],eax
|
|
mov eax,[GUIdirentries]
|
|
sub eax,[GUIcurrentdirviewloc]
|
|
dec eax
|
|
mov dword[cloadnleft],eax
|
|
mov eax,[GUIcurrentdirviewloc]
|
|
add eax,[GUIfileentries]
|
|
mov [cloadnposb],eax
|
|
shl eax,5
|
|
add [cloadnpos],eax
|
|
mov dword[cloadmaxlen],11
|
|
GUIOuttextwin2load 1,164,29
|
|
GUIOuttextwin2load 1,164,29+7
|
|
GUIOuttextwin2load 1,164,29+7*2
|
|
GUIOuttextwin2load 1,164,29+7*3
|
|
GUIOuttextwin2load 1,164,29+7*4
|
|
GUIOuttextwin2load 1,164,29+7*5
|
|
GUIOuttextwin2load 1,164,29+7*6
|
|
GUIOuttextwin2load 1,164,29+7*7
|
|
GUIOuttextwin2load 1,164,29+7*8
|
|
GUIOuttextwin2load 1,164,29+7*9
|
|
GUIOuttextwin2load 1,164,29+7*10
|
|
GUIOuttextwin2load 1,164,29+7*11
|
|
GUIOuttextwin2load 1,164,29+7*12
|
|
GUIOuttextwin2load 1,164,29+7*13
|
|
GUIOuttextwin2load 1,164,29+7*14
|
|
|
|
mov byte[GUItextcolor],221
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero4
|
|
mov byte[GUItextcolor],222
|
|
.zero4
|
|
GUIOuttextwin2 1,7,147, GUILoadTextA
|
|
mov eax,[spcBuffera]
|
|
inc eax
|
|
mov dword[cloadnpos],eax
|
|
mov eax,[GUIfileentries]
|
|
sub eax,[GUIcurrentviewloc]
|
|
dec eax
|
|
mov dword[cloadnleft],eax
|
|
mov eax,[GUIcurrentviewloc]
|
|
mov [cloadnposb],eax
|
|
shl eax,5
|
|
add [cloadnpos],eax
|
|
mov dword[cloadmaxlen],23
|
|
GUIOuttextwin2load 1,7,28
|
|
GUIOuttextwin2load 1,7,28+7
|
|
GUIOuttextwin2load 1,7,28+7*2
|
|
GUIOuttextwin2load 1,7,28+7*3
|
|
GUIOuttextwin2load 1,7,28+7*4
|
|
GUIOuttextwin2load 1,7,28+7*5
|
|
GUIOuttextwin2load 1,7,28+7*6
|
|
GUIOuttextwin2load 1,7,28+7*7
|
|
GUIOuttextwin2load 1,7,28+7*8
|
|
GUIOuttextwin2load 1,7,28+7*9
|
|
GUIOuttextwin2load 1,7,28+7*10
|
|
GUIOuttextwin2load 1,7,28+7*11
|
|
GUIOuttextwin2load 1,7,28+7*12
|
|
GUIOuttextwin2load 1,7,28+7*13
|
|
GUIOuttextwin2load 1,7,28+7*14
|
|
mov eax,[spcBuffera]
|
|
inc eax
|
|
mov dword[cloadnpos],eax
|
|
mov eax,[GUIdirentries]
|
|
sub eax,[GUIcurrentdirviewloc]
|
|
dec eax
|
|
mov dword[cloadnleft],eax
|
|
mov eax,[GUIcurrentdirviewloc]
|
|
add eax,[GUIfileentries]
|
|
mov [cloadnposb],eax
|
|
shl eax,5
|
|
add [cloadnpos],eax
|
|
mov dword[cloadmaxlen],11
|
|
GUIOuttextwin2load 1,163,28
|
|
GUIOuttextwin2load 1,163,28+7
|
|
GUIOuttextwin2load 1,163,28+7*2
|
|
GUIOuttextwin2load 1,163,28+7*3
|
|
GUIOuttextwin2load 1,163,28+7*4
|
|
GUIOuttextwin2load 1,163,28+7*5
|
|
GUIOuttextwin2load 1,163,28+7*6
|
|
GUIOuttextwin2load 1,163,28+7*7
|
|
GUIOuttextwin2load 1,163,28+7*8
|
|
GUIOuttextwin2load 1,163,28+7*9
|
|
GUIOuttextwin2load 1,163,28+7*10
|
|
GUIOuttextwin2load 1,163,28+7*11
|
|
GUIOuttextwin2load 1,163,28+7*12
|
|
GUIOuttextwin2load 1,163,28+7*13
|
|
GUIOuttextwin2load 1,163,28+7*14
|
|
|
|
xor ebx,ebx
|
|
mov bl,[GUILoadPos]
|
|
mov byte[GUILoadTextA+ebx],0
|
|
|
|
%ifdef __MSDOS__
|
|
GUIDisplayButtonHole 1,9,163,byte[GUIloadfntype],0
|
|
GUIDisplayButtonHole 1,9,171,byte[GUIloadfntype],1
|
|
GUIDisplayButtonHole 1,9,179,byte[GUIloadfntype],2
|
|
%endif
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[showallext],1
|
|
jne .noshowallext
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.noshowallext
|
|
GUIDisplayIconWin 1,10,187,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[ForceROMTiming],1
|
|
jne .noforcentsc
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.noforcentsc
|
|
GUIDisplayIconWin 1,144,177,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[ForceROMTiming],2
|
|
jne .noforcepal
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.noforcepal
|
|
GUIDisplayIconWin 1,144,187,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[ForceHiLoROM],1
|
|
jne .noforcelorom
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.noforcelorom
|
|
GUIDisplayIconWin 1,184,177,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[ForceHiLoROM],2
|
|
jne .noforcehirom
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.noforcehirom
|
|
GUIDisplayIconWin 1,184,187,[GUITemp]
|
|
|
|
; win#,X,Y start, %4-List Loc, %5-List size, %6-Screen size, %7-Bar Size
|
|
DrawSlideBarWin 1,146,33,[GUIcurrentviewloc],[GUIfileentries],15,94,GUILStA
|
|
cmp byte[GUICHold],1
|
|
jne .noholda
|
|
add byte[GUIWincoladd],3
|
|
.noholda
|
|
GUIDisplayIconWin 1,146,25,GUIIconDataUpArrow
|
|
cmp byte[GUICHold],1
|
|
jne .noholda2
|
|
sub byte[GUIWincoladd],3
|
|
.noholda2
|
|
cmp byte[GUICHold],2
|
|
jne .noholdb
|
|
add byte[GUIWincoladd],3
|
|
.noholdb
|
|
GUIDisplayIconWin 1,146,127,GUIIconDataDownArrow
|
|
cmp byte[GUICHold],2
|
|
jne .noholdb2
|
|
sub byte[GUIWincoladd],3
|
|
.noholdb2
|
|
DrawSlideBarWin 1,230,33,[GUIcurrentdirviewloc],[GUIdirentries],15,94,GUILStB
|
|
cmp byte[GUICHold],3
|
|
jne .noholdc
|
|
add byte[GUIWincoladd],3
|
|
.noholdc
|
|
GUIDisplayIconWin 1,230,25,GUIIconDataUpArrow
|
|
cmp byte[GUICHold],3
|
|
jne .noholdc2
|
|
sub byte[GUIWincoladd],3
|
|
.noholdc2
|
|
cmp byte[GUICHold],4
|
|
jne .noholdd
|
|
add byte[GUIWincoladd],3
|
|
.noholdd
|
|
GUIDisplayIconWin 1,230,127,GUIIconDataDownArrow
|
|
cmp byte[GUICHold],4
|
|
jne .noholdd2
|
|
sub byte[GUIWincoladd],3
|
|
.noholdd2
|
|
; Draw borders
|
|
mov dword[GUIWincol],148+10
|
|
cmp byte[cwindrawn],1
|
|
jne .noone2
|
|
mov dword[GUIWincol],148+5
|
|
.noone2
|
|
cmp byte[cwindrawn],0
|
|
jne .nozero2
|
|
mov dword[GUIWincol],148
|
|
.nozero2
|
|
|
|
mov dl,[GUIWincol]
|
|
DrawGUIWinBox 1,5,24,144,24,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,1
|
|
DrawGUIWinBox 1,4,25,3,134,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,4
|
|
DrawGUIWinBox 1,5,135,144,135,dl
|
|
|
|
mov dl,[GUIWincol]
|
|
DrawGUIWinBox 1,160,24,228,24,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,1
|
|
DrawGUIWinBox 1,159,25,158,134,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,4
|
|
DrawGUIWinBox 1,160,135,228,135,dl
|
|
|
|
mov dl,[GUIWincol]
|
|
DrawGUIWinBox 1,5,144,227,144,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,1
|
|
DrawGUIWinBox 1,4,145,3,152,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,4
|
|
DrawGUIWinBox 1,5,153,227,153,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,3
|
|
DrawGUIWinBox 1,229,145,228,152,dl
|
|
ret
|
|
|
|
SECTION .data
|
|
GUILoadText1 db 'SELECT FILE TO LOAD :',0
|
|
GUILoadText2 db 'DISPLAY TYPE :',0
|
|
GUILoadText3 db 'NORMAL 8.3 FORMAT',0
|
|
GUILoadText4 db 'SNES HEADER NAME',0
|
|
GUILoadText5 db 'WIN95 LONG FILENAME',0
|
|
GUILoadText6 db 'SHOW ALL EXTENSIONS',0
|
|
GUILoadText7 db 'FILENAME',0
|
|
GUILoadText8 db 'DIRECTORY',0
|
|
GUILoadText9 db 'LOAD',0
|
|
GUILoadTextA times 40 db 0
|
|
GUILoadTextB db 'FORCE',0
|
|
GUILoadTextC db 'NTSC',0
|
|
GUILoadTextD db 'PAL',0
|
|
GUILoadTextE db 'LOROM',0
|
|
GUILoadTextF db 'HIROM',0
|
|
|
|
SECTION .bss
|
|
GUILStA resd 3
|
|
GUILStB resd 3
|
|
GUILoadPos resb 1
|
|
SECTION .text
|
|
|
|
DisplayGUIReset: ; Reset Confirmation
|
|
GUIDrawWindowBox 12,GUIResetDisp
|
|
|
|
cmp byte[GUIWincoladd],0 ;Red Box around buttons
|
|
je .zero
|
|
mov byte[GUItextcolor],211
|
|
.zero
|
|
mov dl,224
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero4
|
|
inc dl
|
|
.zero4
|
|
cmp byte[GUICResetPos],0
|
|
je near .resetboxa
|
|
DrawGUIWinBox 12,79,29,117,42,dl
|
|
jmp .resetboxb
|
|
.resetboxa
|
|
DrawGUIWinBox 12,19,29,57,42,dl
|
|
.resetboxb
|
|
|
|
DrawGUIButton 12,20,30,56,41,GUIResetText2,2,0,0 ; Buttons
|
|
DrawGUIButton 12,80,30,116,41,GUIResetText3,3,0,0
|
|
|
|
mov al,[GUIWincol] ; Yellow Shadow
|
|
mov byte[GUItextcolor],al
|
|
GUIOuttextwin2 12,6,16,GUIResetText1
|
|
mov byte[GUItextcolor],163 ; Yellow Text
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero3
|
|
mov byte[GUItextcolor],164
|
|
.zero3
|
|
GUIOuttextwin2 12,5,15,GUIResetText1
|
|
ret
|
|
|
|
SECTION .data
|
|
GUIResetText1 db 'RESET : ARE YOU SURE ?',0
|
|
GUIResetText2 db 'YES',0
|
|
GUIResetText3 db 'NO',0
|
|
SECTION .text
|
|
|
|
DisplayGUIStates: ; Save/Load State Confirmation
|
|
GUIDrawWindowBox 14,GUIStatesDisp
|
|
|
|
cmp byte[GUIWincoladd],0 ; Red Box around buttons
|
|
je .zero
|
|
mov byte[GUItextcolor],211
|
|
.zero
|
|
mov dl,224
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero4
|
|
inc dl
|
|
.zero4
|
|
cmp byte[GUICStatePos],0
|
|
je near .resetboxa
|
|
DrawGUIWinBox 14,79,29,117,42,dl
|
|
jmp .resetboxb
|
|
.resetboxa
|
|
DrawGUIWinBox 14,19,29,57,42,dl
|
|
.resetboxb
|
|
|
|
DrawGUIButton 14,20,30,56,41,GUIStatesText3,10,0,0 ; buttons
|
|
DrawGUIButton 14,80,30,116,41,GUIStatesText4,11,0,0
|
|
|
|
mov al,[GUIWincol] ; Yellow Shadow
|
|
mov byte[GUItextcolor],al
|
|
cmp byte[GUIStatesText5],1 ; Determines Load or Save box
|
|
je .load
|
|
GUIOuttextwin2 14,6,16,GUIStatesText1
|
|
jmp .save
|
|
.load
|
|
GUIOuttextwin2 14,6,16,GUIStatesText2
|
|
.save
|
|
mov byte[GUItextcolor],163 ; Yellow Text
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero3
|
|
mov byte[GUItextcolor],164
|
|
.zero3
|
|
cmp byte[GUIStatesText5],1
|
|
je .load2
|
|
GUIOuttextwin2 14,5,15,GUIStatesText1
|
|
jmp .save2
|
|
.load2
|
|
GUIOuttextwin2 14,5,15,GUIStatesText2
|
|
.save2
|
|
ret
|
|
|
|
SECTION .data
|
|
GUIStatesText1 db 'OKAY TO SAVE STATE?',0
|
|
GUIStatesText2 db 'OKAY TO LOAD STATE?',0
|
|
GUIStatesText3 db 'YES',0
|
|
GUIStatesText4 db 'NO',0
|
|
GUIStatesText5 db 0
|
|
SECTION .text
|
|
|
|
DisplayGUIChoseSave: ; Pick Save State
|
|
GUIDrawWindowBox 2,GUIStateSelDisp
|
|
|
|
cmp byte[GUIWincoladd],0 ; Shadow
|
|
je .zero
|
|
mov byte[GUItextcolor],211
|
|
.zero
|
|
sub byte[GUItextcolor],15
|
|
mov byte[GUIChoseSaveText2],'0'
|
|
GUIOuttextwin2 2,21,31,GUIChoseSaveText2
|
|
mov byte[GUIChoseSaveText2],'1'
|
|
GUIOuttextwin2 2,41,31,GUIChoseSaveText2
|
|
mov byte[GUIChoseSaveText2],'2'
|
|
GUIOuttextwin2 2,61,31,GUIChoseSaveText2
|
|
mov byte[GUIChoseSaveText2],'3'
|
|
GUIOuttextwin2 2,81,31,GUIChoseSaveText2
|
|
mov byte[GUIChoseSaveText2],'4'
|
|
GUIOuttextwin2 2,101,31,GUIChoseSaveText2
|
|
mov byte[GUIChoseSaveText2],'5'
|
|
GUIOuttextwin2 2,21,46,GUIChoseSaveText2
|
|
mov byte[GUIChoseSaveText2],'6'
|
|
GUIOuttextwin2 2,41,46,GUIChoseSaveText2
|
|
mov byte[GUIChoseSaveText2],'7'
|
|
GUIOuttextwin2 2,61,46,GUIChoseSaveText2
|
|
mov byte[GUIChoseSaveText2],'8'
|
|
GUIOuttextwin2 2,81,46,GUIChoseSaveText2
|
|
mov byte[GUIChoseSaveText2],'9'
|
|
GUIOuttextwin2 2,101,46,GUIChoseSaveText2
|
|
|
|
add byte[GUItextcolor],15 ; Text
|
|
mov byte[GUIChoseSaveText2],'0'
|
|
GUIOuttextwin2 2,20,30,GUIChoseSaveText2
|
|
mov byte[GUIChoseSaveText2],'1'
|
|
GUIOuttextwin2 2,40,30,GUIChoseSaveText2
|
|
mov byte[GUIChoseSaveText2],'2'
|
|
GUIOuttextwin2 2,60,30,GUIChoseSaveText2
|
|
mov byte[GUIChoseSaveText2],'3'
|
|
GUIOuttextwin2 2,80,30,GUIChoseSaveText2
|
|
mov byte[GUIChoseSaveText2],'4'
|
|
GUIOuttextwin2 2,100,30,GUIChoseSaveText2
|
|
mov byte[GUIChoseSaveText2],'5'
|
|
GUIOuttextwin2 2,20,45,GUIChoseSaveText2
|
|
mov byte[GUIChoseSaveText2],'6'
|
|
GUIOuttextwin2 2,40,45,GUIChoseSaveText2
|
|
mov byte[GUIChoseSaveText2],'7'
|
|
GUIOuttextwin2 2,60,45,GUIChoseSaveText2
|
|
mov byte[GUIChoseSaveText2],'8'
|
|
GUIOuttextwin2 2,80,45,GUIChoseSaveText2
|
|
mov byte[GUIChoseSaveText2],'9'
|
|
GUIOuttextwin2 2,100,45,GUIChoseSaveText2
|
|
|
|
mov al,[GUIWincol] ; Yellow Shadow
|
|
mov byte[GUItextcolor],al
|
|
GUIOuttextwin2 2,6,16,GUIChoseSaveText1
|
|
mov byte[GUItextcolor],163 ; Yellow Text
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero3
|
|
mov byte[GUItextcolor],164
|
|
.zero3
|
|
GUIOuttextwin2 2,5,15,GUIChoseSaveText1
|
|
|
|
mov dword[GUITemp],GUIIconDataButtonHole ; Ratio Buttons
|
|
mov ebx,[statefileloc]
|
|
mov al,byte[fnamest+ebx]
|
|
mov [GUIChoseSaveText2],al
|
|
GUIDisplayButtonHole 2,10,28,byte[GUIChoseSaveText2],'t'
|
|
GUIDisplayButtonHole 2,30,28,byte[GUIChoseSaveText2],'1'
|
|
GUIDisplayButtonHole 2,50,28,byte[GUIChoseSaveText2],'2'
|
|
GUIDisplayButtonHole 2,70,28,byte[GUIChoseSaveText2],'3'
|
|
GUIDisplayButtonHole 2,90,28,byte[GUIChoseSaveText2],'4'
|
|
GUIDisplayButtonHole 2,10,43,byte[GUIChoseSaveText2],'5'
|
|
GUIDisplayButtonHole 2,30,43,byte[GUIChoseSaveText2],'6'
|
|
GUIDisplayButtonHole 2,50,43,byte[GUIChoseSaveText2],'7'
|
|
GUIDisplayButtonHole 2,70,43,byte[GUIChoseSaveText2],'8'
|
|
GUIDisplayButtonHole 2,90,43,byte[GUIChoseSaveText2],'9'
|
|
ret
|
|
|
|
SECTION .data
|
|
GUIChoseSaveText1 db 'SELECT SAVE SLOT :',0
|
|
GUIChoseSaveText2 db '-',0
|
|
SECTION .text
|
|
|
|
%macro DGOptnsBorderBox 3
|
|
mov dword[GUIWincol],148+10
|
|
cmp byte[cwindrawn],1
|
|
jne %%noone
|
|
mov dword[GUIWincol],148+5
|
|
%%noone
|
|
cmp byte[cwindrawn],0
|
|
jne %%nozero
|
|
mov dword[GUIWincol],148
|
|
%%nozero
|
|
mov dl,[GUIWincol]
|
|
DrawGUIWinBox %1,%2+1,%3,%2+18,%3,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,1
|
|
DrawGUIWinBox %1,%2,%3+1,%2-1,%3+5,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,4
|
|
DrawGUIWinBox %1,%2+1,%3+8,%2+18,%3-8,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,3
|
|
DrawGUIWinBox %1,%2+22,%3+1,%2-23,%3+5,dl
|
|
%endmacro
|
|
|
|
%macro DGOptnsDrawBox 3
|
|
mov eax,dword[GUIwinposx+9*4]
|
|
mov ebx,dword[GUIwinposy+9*4]
|
|
add eax,%1
|
|
add ebx,%2
|
|
mov ecx,eax
|
|
add ecx,20
|
|
mov dl,167
|
|
mov esi,7
|
|
%%loop
|
|
DrawGUILine
|
|
dec esi
|
|
jnz %%loop
|
|
mov eax,%3
|
|
mov ebx,[ScanCodeListing+eax*3]
|
|
mov [GUIGameDisplayKy],ebx
|
|
mov byte[GUIGameDisplayKy+3],0
|
|
mov byte[GUItextcolor],223
|
|
GUIOuttextwin2 9,%1+3,%2+2,GUIGameDisplayKy
|
|
mov byte[GUItextcolor],221
|
|
cmp byte[GUIWincoladd],0
|
|
je %%zero
|
|
mov byte[GUItextcolor],222
|
|
%%zero
|
|
GUIOuttextwin2 9,%1+2,%2+1,GUIGameDisplayKy
|
|
%endmacro
|
|
|
|
%macro DDrawBox 4
|
|
mov eax,dword[GUIwinposx+%1*4]
|
|
mov ebx,dword[GUIwinposy+%1*4]
|
|
add eax,%2
|
|
add ebx,%3
|
|
mov ecx,eax
|
|
add ecx,20
|
|
mov dl,167
|
|
mov esi,7
|
|
%%loop
|
|
DrawGUILine
|
|
dec esi
|
|
jnz %%loop
|
|
mov eax,%4
|
|
mov ebx,[ScanCodeListing+eax*3]
|
|
mov [GUIGameDisplayKy],ebx
|
|
mov byte[GUIGameDisplayKy+3],0
|
|
mov byte[GUItextcolor],223
|
|
GUIOuttextwin2 %1,%2+3,%3+2,GUIGameDisplayKy
|
|
mov byte[GUItextcolor],221
|
|
cmp byte[GUIWincoladd],0
|
|
je %%zero
|
|
mov byte[GUItextcolor],222
|
|
%%zero
|
|
GUIOuttextwin2 %1,%2+2,%3+1,GUIGameDisplayKy
|
|
%endmacro
|
|
|
|
%macro DGOptnsDrawBox2 3
|
|
mov eax,dword[GUIwinposx+3*4]
|
|
mov ebx,dword[GUIwinposy+3*4]
|
|
add eax,%1
|
|
add ebx,%2
|
|
mov ecx,eax
|
|
add ecx,20
|
|
mov dl,167
|
|
mov esi,7
|
|
%%loop
|
|
DrawGUILine
|
|
dec esi
|
|
jnz %%loop
|
|
mov eax,%3
|
|
mov ebx,[ScanCodeListing+eax*3]
|
|
mov [GUIGameDisplayKy],ebx
|
|
mov byte[GUIGameDisplayKy+3],0
|
|
mov byte[GUItextcolor],223
|
|
GUIOuttextwin2 3,%1+3,%2+2,GUIGameDisplayKy
|
|
mov byte[GUItextcolor],221
|
|
cmp byte[GUIWincoladd],0
|
|
je %%zero
|
|
mov byte[GUItextcolor],222
|
|
%%zero
|
|
GUIOuttextwin2 3,%1+2,%2+1,GUIGameDisplayKy
|
|
%endmacro
|
|
|
|
%macro GUIInputDispKey 2
|
|
mov eax,[edi]
|
|
mov [GUIInputTextQ],eax
|
|
push edi
|
|
DGOptnsDrawBox2 %1,%2,[GUIInputTextQ]
|
|
pop edi
|
|
add edi,4
|
|
%endmacro
|
|
|
|
DisplayGUIInput:
|
|
; Player Select, Joystick/keyboard Type List, Button Assignments
|
|
GUIDrawWindowBox 3,GUIInputDisp
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero
|
|
mov byte[GUItextcolor],211
|
|
.zero
|
|
sub byte[GUItextcolor],15
|
|
GUIOuttextwin2 3,6,102,GUIInputText3
|
|
GUIOuttextwin2 3,6,112,GUIInputText4
|
|
GUIOuttextwin2 3,6,122,GUIInputText5
|
|
GUIOuttextwin2 3,6,132,GUIInputText6
|
|
GUIOuttextwin2 3,6,142,GUIInputTextD
|
|
GUIOuttextwin2 3,6,152,GUIInputTextE
|
|
GUIOuttextwin2 3,76,102,GUIInputText7
|
|
GUIOuttextwin2 3,76,112,GUIInputText8
|
|
GUIOuttextwin2 3,76,122,GUIInputText9
|
|
GUIOuttextwin2 3,76,132,GUIInputTextA
|
|
GUIOuttextwin2 3,76,142,GUIInputTextB
|
|
GUIOuttextwin2 3,76,152,GUIInputTextC
|
|
%ifdef __MSDOS__
|
|
GUIOuttextwin2 3,20,167,GUIInputTextW
|
|
%endif
|
|
GUIOuttextwin2 3,156,102,GUIInputText7
|
|
GUIOuttextwin2 3,156,112,GUIInputText8
|
|
GUIOuttextwin2 3,156,122,GUIInputTextC
|
|
GUIOuttextwin2 3,116,102,GUIInputText9
|
|
GUIOuttextwin2 3,116,112,GUIInputTextA
|
|
GUIOuttextwin2 3,116,122,GUIInputTextB
|
|
GUIOuttextwin2 3,153,142,GUIInputTextd
|
|
GUIOuttextwin2 3,153,152,GUIInputTexte
|
|
GUIOuttextwin2 3,113,142,GUIInputTextf
|
|
GUIOuttextwin2 3,113,152,GUIInputTextg
|
|
add byte[GUItextcolor],15
|
|
GUIOuttextwin2 3,5,101,GUIInputText3
|
|
GUIOuttextwin2 3,5,111,GUIInputText4
|
|
GUIOuttextwin2 3,5,121,GUIInputText5
|
|
GUIOuttextwin2 3,5,131,GUIInputText6
|
|
GUIOuttextwin2 3,5,141,GUIInputTextD
|
|
GUIOuttextwin2 3,5,151,GUIInputTextE
|
|
GUIOuttextwin2 3,75,101,GUIInputText7
|
|
GUIOuttextwin2 3,75,111,GUIInputText8
|
|
GUIOuttextwin2 3,75,121,GUIInputText9
|
|
GUIOuttextwin2 3,75,131,GUIInputTextA
|
|
GUIOuttextwin2 3,75,141,GUIInputTextB
|
|
GUIOuttextwin2 3,75,151,GUIInputTextC
|
|
%ifdef __MSDOS__
|
|
GUIOuttextwin2 3,19,166,GUIInputTextW
|
|
%endif
|
|
GUIOuttextwin2 3,155,101,GUIInputText7
|
|
GUIOuttextwin2 3,155,111,GUIInputText8
|
|
GUIOuttextwin2 3,155,121,GUIInputTextC
|
|
GUIOuttextwin2 3,115,101,GUIInputText9
|
|
GUIOuttextwin2 3,115,111,GUIInputTextA
|
|
GUIOuttextwin2 3,115,121,GUIInputTextB
|
|
GUIOuttextwin2 3,152,141,GUIInputTextd
|
|
GUIOuttextwin2 3,152,151,GUIInputTexte
|
|
GUIOuttextwin2 3,112,141,GUIInputTextf
|
|
GUIOuttextwin2 3,112,151,GUIInputTextg
|
|
%ifdef __MSDOS__
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
xor eax,eax
|
|
mov al,[cplayernum]
|
|
cmp byte[pl1p209+eax],0
|
|
je .nocheckbox2
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox2
|
|
GUIDisplayIconWin 3,5,162,[GUITemp]
|
|
%endif
|
|
DrawGUIButton 3,125,34,155,45,GUIInputTextV,14,0,0
|
|
%ifdef __MSDOS__
|
|
DrawGUIButton 3,125,50,185,61,GUIInputTexta,15,0,0
|
|
%endif
|
|
DrawGUIButton 3,125,66,179,77,GUIInputTexta2,15,0,0
|
|
mov al,[GUIWincol]
|
|
mov byte[GUItextcolor],al
|
|
mov al,[cplayernum]
|
|
add al,'1'
|
|
mov [GUIInputText1+8],al
|
|
GUIOuttextwin2 3,6,16,GUIInputText1
|
|
GUIOuttextwin2 3,6,26,GUIInputText2
|
|
GUIOuttextwin2 3,6,92,GUIInputTextP
|
|
GUIOuttextwin2 3,116,92,GUIInputTextb
|
|
GUIOuttextwin2 3,116,131,GUIInputTextc
|
|
xor eax,eax
|
|
mov al,[cplayernum]
|
|
mov ebx,[GUIInputRefP+eax*4]
|
|
mov al,[ebx]
|
|
mov al,[GUIInputRefB+eax]
|
|
mov ebx,eax
|
|
shl eax,4
|
|
add eax,ebx
|
|
add eax,GUIInputNames
|
|
mov dword[GUITemp],eax
|
|
GUIOuttextwin2 3,7+24,83,[GUITemp]
|
|
GUIOuttextwin2 3,7,83,GUIInputTextT
|
|
mov byte[GUItextcolor],163
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero3
|
|
mov byte[GUItextcolor],164
|
|
.zero3
|
|
GUIOuttextwin2 3,5,15,GUIInputText1
|
|
GUIOuttextwin2 3,5,25,GUIInputText2
|
|
GUIOuttextwin2 3,5,91,GUIInputTextP
|
|
GUIOuttextwin2 3,115,91,GUIInputTextb
|
|
GUIOuttextwin2 3,115,130,GUIInputTextc
|
|
GUIOuttextwin2 3,6+24,82,[GUITemp]
|
|
GUIOuttextwin2 3,6,82,GUIInputTextT
|
|
DrawGUIWinBox 3,5,34,107,77,167
|
|
mov ebx,[GUIcurrentinputcursloc]
|
|
sub ebx,[GUIcurrentinputviewloc]
|
|
mov eax,ebx
|
|
lea ebx,[ebx*8]
|
|
add ebx,36
|
|
DrawGUIWinBox2 3,5,107,7,224
|
|
mov edi,pl1selk
|
|
cmp byte[cplayernum],1
|
|
jne .nopl2
|
|
mov edi,pl2selk
|
|
.nopl2
|
|
cmp byte[cplayernum],2
|
|
jne .nopl3
|
|
mov edi,pl3selk
|
|
.nopl3
|
|
cmp byte[cplayernum],3
|
|
jne .nopl4
|
|
mov edi,pl4selk
|
|
.nopl4
|
|
cmp byte[cplayernum],4
|
|
jne .nopl5
|
|
mov edi,pl5selk
|
|
.nopl5
|
|
GUIInputDispKey 45,150 ; Select
|
|
GUIInputDispKey 45,140 ; Start
|
|
GUIInputDispKey 45,100 ; Up
|
|
GUIInputDispKey 45,110 ; Down
|
|
GUIInputDispKey 45,120 ; Left
|
|
GUIInputDispKey 45,130 ; Right
|
|
GUIInputDispKey 85,120 ; X
|
|
GUIInputDispKey 85,100 ; A
|
|
GUIInputDispKey 85,140 ; L
|
|
GUIInputDispKey 85,130 ; Y
|
|
GUIInputDispKey 85,110 ; B
|
|
GUIInputDispKey 85,150 ; R
|
|
mov edi,pl1Atk
|
|
cmp byte[cplayernum],1
|
|
jne .nopl2t
|
|
mov edi,pl2Atk
|
|
.nopl2t
|
|
cmp byte[cplayernum],2
|
|
jne .nopl3t
|
|
mov edi,pl3Atk
|
|
.nopl3t
|
|
cmp byte[cplayernum],3
|
|
jne .nopl4t
|
|
mov edi,pl4Atk
|
|
.nopl4t
|
|
cmp byte[cplayernum],4
|
|
jne .nopl5t
|
|
mov edi,pl5Atk
|
|
.nopl5t
|
|
GUIInputDispKey 165,100 ; A Turbo
|
|
GUIInputDispKey 165,110 ; B Turbo
|
|
GUIInputDispKey 125,100 ; X Turbo
|
|
GUIInputDispKey 125,110 ; Y Turbo
|
|
mov edi,pl1Ltk
|
|
cmp byte[cplayernum],1
|
|
jne .nopl2tl
|
|
mov edi,pl2Ltk
|
|
.nopl2tl
|
|
cmp byte[cplayernum],2
|
|
jne .nopl3tl
|
|
mov edi,pl3Ltk
|
|
.nopl3tl
|
|
cmp byte[cplayernum],3
|
|
jne .nopl4tl
|
|
mov edi,pl4Ltk
|
|
.nopl4tl
|
|
cmp byte[cplayernum],4
|
|
jne .nopl5tl
|
|
mov edi,pl5Ltk
|
|
.nopl5tl
|
|
GUIInputDispKey 125,120 ; L Turbo
|
|
GUIInputDispKey 165,120 ; R Turbo
|
|
|
|
mov edi,pl1ULk
|
|
cmp byte[cplayernum],1
|
|
jne .nopl2tb
|
|
mov edi,pl2ULk
|
|
.nopl2tb
|
|
cmp byte[cplayernum],2
|
|
jne .nopl3tb
|
|
mov edi,pl3ULk
|
|
.nopl3tb
|
|
cmp byte[cplayernum],3
|
|
jne .nopl4tb
|
|
mov edi,pl4ULk
|
|
.nopl4tb
|
|
cmp byte[cplayernum],4
|
|
jne .nopl5tb
|
|
mov edi,pl5ULk
|
|
.nopl5tb
|
|
GUIInputDispKey 165,140 ; Up-Left
|
|
GUIInputDispKey 165,150 ; Up-Right
|
|
GUIInputDispKey 125,140 ; Down-Left
|
|
GUIInputDispKey 125,150 ; Down-Right
|
|
|
|
mov byte[GUItextcolor],223
|
|
mov eax,[GUIcurrentinputviewloc]
|
|
shl eax,4
|
|
add eax,[GUIcurrentinputviewloc]
|
|
add eax,GUIInputNames
|
|
mov dword[GUITemp],eax
|
|
GUIOuttextwin2 3,11,38,[GUITemp]
|
|
add dword[GUITemp],17
|
|
GUIOuttextwin2 3,11,38+8,[GUITemp]
|
|
add dword[GUITemp],17
|
|
GUIOuttextwin2 3,11,38+8*2,[GUITemp]
|
|
add dword[GUITemp],17
|
|
GUIOuttextwin2 3,11,38+8*3,[GUITemp]
|
|
add dword[GUITemp],17
|
|
GUIOuttextwin2 3,11,38+8*4,[GUITemp]
|
|
|
|
mov byte[GUItextcolor],221
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero5
|
|
mov byte[GUItextcolor],222
|
|
.zero5
|
|
mov eax,[GUIcurrentinputviewloc]
|
|
shl eax,4
|
|
add eax,[GUIcurrentinputviewloc]
|
|
add eax,GUIInputNames
|
|
mov dword[GUITemp],eax
|
|
GUIOuttextwin2 3,10,37,[GUITemp]
|
|
add dword[GUITemp],17
|
|
GUIOuttextwin2 3,10,37+8,[GUITemp]
|
|
add dword[GUITemp],17
|
|
GUIOuttextwin2 3,10,37+8*2,[GUITemp]
|
|
add dword[GUITemp],17
|
|
GUIOuttextwin2 3,10,37+8*3,[GUITemp]
|
|
add dword[GUITemp],17
|
|
GUIOuttextwin2 3,10,37+8*4,[GUITemp]
|
|
|
|
DrawSlideBarWin 3,109,42,[GUIcurrentinputviewloc],[NumInputDevices],5,28,GUIIStA
|
|
|
|
cmp byte[GUICHold],9
|
|
jne .noholda
|
|
add byte[GUIWincoladd],3
|
|
.noholda
|
|
GUIDisplayIconWin 3,109,34,GUIIconDataUpArrow
|
|
cmp byte[GUICHold],9
|
|
jne .noholda2
|
|
sub byte[GUIWincoladd],3
|
|
.noholda2
|
|
cmp byte[GUICHold],10
|
|
jne .noholdb
|
|
add byte[GUIWincoladd],3
|
|
.noholdb
|
|
GUIDisplayIconWin 3,109,70,GUIIconDataDownArrow
|
|
cmp byte[GUICHold],10
|
|
jne .noholdb2
|
|
sub byte[GUIWincoladd],3
|
|
.noholdb2
|
|
|
|
; Draw border
|
|
mov dword[GUIWincol],148+10
|
|
cmp byte[cwindrawn],1
|
|
jne .noone2
|
|
mov dword[GUIWincol],148+5
|
|
.noone2
|
|
cmp byte[cwindrawn],0
|
|
jne .nozero2
|
|
mov dword[GUIWincol],148
|
|
.nozero2
|
|
mov dl,[GUIWincol] ;Device
|
|
DrawGUIWinBox 3,5,33,107,33,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,1
|
|
DrawGUIWinBox 3,4,34,3,77,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,4
|
|
DrawGUIWinBox 3,5,78,107,78,dl
|
|
|
|
DGOptnsBorderBox 3,44,99
|
|
DGOptnsBorderBox 3,44,109
|
|
DGOptnsBorderBox 3,44,119
|
|
DGOptnsBorderBox 3,44,129
|
|
DGOptnsBorderBox 3,44,139
|
|
DGOptnsBorderBox 3,44,149
|
|
DGOptnsBorderBox 3,84,99
|
|
DGOptnsBorderBox 3,84,109
|
|
DGOptnsBorderBox 3,84,119
|
|
DGOptnsBorderBox 3,84,129
|
|
DGOptnsBorderBox 3,84,139
|
|
DGOptnsBorderBox 3,84,149
|
|
DGOptnsBorderBox 3,124,99
|
|
DGOptnsBorderBox 3,124,109
|
|
DGOptnsBorderBox 3,124,119
|
|
DGOptnsBorderBox 3,124,139
|
|
DGOptnsBorderBox 3,124,149
|
|
DGOptnsBorderBox 3,164,99
|
|
DGOptnsBorderBox 3,164,109
|
|
DGOptnsBorderBox 3,164,119
|
|
DGOptnsBorderBox 3,164,139
|
|
DGOptnsBorderBox 3,164,149
|
|
; End draw borders
|
|
ret
|
|
|
|
SECTION .data
|
|
GUIInputRefF db 0,1,2,3,5,18,6,7,8,9,10,11,14,15,16,17
|
|
GUIInputRefB db 0,1,2,3,3,4,6,7,8,9,10,11,11,11,12,13,14,15,5
|
|
GUIInputRefP dd pl1contrl,pl2contrl,pl3contrl,pl4contrl,pl5contrl
|
|
GUIInputText1 db 'PLAYER # CONTROL :',0
|
|
GUIInputText2 db 'DEVICE :',0
|
|
GUIInputText3 db ' UP',0
|
|
GUIInputText4 db ' DOWN',0
|
|
GUIInputText5 db ' LEFT',0
|
|
GUIInputText6 db ' RIGHT',0
|
|
GUIInputText7 db 'A',0
|
|
GUIInputText8 db 'B',0
|
|
GUIInputText9 db 'X',0
|
|
GUIInputTextA db 'Y',0
|
|
GUIInputTextB db 'L',0
|
|
GUIInputTextC db 'R',0
|
|
GUIInputTextD db ' START',0
|
|
GUIInputTextE db 'SELECT',0
|
|
GUIInputTextP db 'KEYS :',0
|
|
GUIInputTextQ dd 0
|
|
GUIInputTextT db 'CDV:',0
|
|
GUIInputTextV db 'SET',0
|
|
GUIInputTextW db 'USE JOYSTICK PORT 209H',0
|
|
GUIInputTexta db 'CALIBRATE',0
|
|
GUIInputTexta2 db 'SET KEYS',0
|
|
GUIInputTextb db 'TURBO :',0
|
|
GUIInputTextc db 'DIAGONALS :',0
|
|
GUIInputTextd db 'UL',0
|
|
GUIInputTexte db 'UR',0
|
|
GUIInputTextf db 'DL',0
|
|
GUIInputTextg db 'DR',0
|
|
|
|
SECTION .bss
|
|
GUIIStA resd 3
|
|
|
|
GUIcurrentinputviewloc resd 1
|
|
GUIcurrentinputcursloc resd 1
|
|
SECTION .text
|
|
|
|
DisplayGUIOption:
|
|
; Frame Rate/Auto Frame Rate/Max Frame Skip/New Gfx Engine
|
|
GUIDrawWindowBox 4,GUIOptionDisp
|
|
mov byte[GUItextcolor],217
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero
|
|
mov byte[GUItextcolor],211
|
|
.zero
|
|
sub byte[GUItextcolor],15
|
|
mov dword[GUITemp],GUIOptionText1
|
|
cmp byte[frameskip],0
|
|
jne .noauto
|
|
mov dword[GUITemp],GUIOptionText1b
|
|
.noauto
|
|
GUIOuttextwin2 4,6,14,[GUITemp]
|
|
GUIOuttextwin2u 4,26,24,GUIOptionText2,0
|
|
GUIOuttextwin2u 4,26,34,GUIOptionText3,0
|
|
GUIOuttextwin2u 4,26,44,GUIOptionText4,0
|
|
GUIOuttextwin2u 4,26,54,GUIOptionText5,0
|
|
%ifdef __MSDOS__
|
|
GUIOuttextwin2u 4,26,64,GUIOptionText6,1
|
|
%endif
|
|
%ifdef __WIN32__
|
|
GUIOuttextwin2u 4,26,64,GUIOptionText6b,0
|
|
%endif
|
|
GUIOuttextwin2u 4,26,74,GUIOptionText7,0
|
|
GUIOuttextwin2u 4,26,84,GUIOptionText8,2
|
|
GUIOuttextwin2u 4,26,94,GUIOptionText9,12
|
|
GUIOuttextwin2u 4,26,104,GUIOptionTextA,2
|
|
GUIOuttextwin2u 4,26,114,GUIOptionTextB,0
|
|
GUIOuttextwin2u 4,26,124,GUIOptionTextC,0
|
|
GUIOuttextwin2u 4,26,134,GUIOptionTextD,1
|
|
GUIOuttextwin2u 4,26,144,GUIOptionTextE,12
|
|
GUIOuttextwin2u 4,26,154,GUIOptionTextF,15
|
|
%ifdef __WIN32__
|
|
GUIOuttextwin2u 4,26,164,GUIOptionTextW,1
|
|
%endif
|
|
add byte[GUItextcolor],15
|
|
GUIOuttextwin2 4,5,13,[GUITemp]
|
|
GUIOuttextwin2 4,25,23,GUIOptionText2
|
|
GUIOuttextwin2 4,25,33,GUIOptionText3
|
|
GUIOuttextwin2 4,25,43,GUIOptionText4
|
|
GUIOuttextwin2 4,25,53,GUIOptionText5
|
|
%ifdef __MSDOS__
|
|
GUIOuttextwin2 4,25,63,GUIOptionText6
|
|
%endif
|
|
%ifdef __WIN32__
|
|
GUIOuttextwin2 4,25,63,GUIOptionText6b
|
|
%endif
|
|
GUIOuttextwin2 4,25,73,GUIOptionText7
|
|
GUIOuttextwin2 4,25,83,GUIOptionText8
|
|
GUIOuttextwin2 4,25,93,GUIOptionText9
|
|
GUIOuttextwin2 4,25,103,GUIOptionTextA
|
|
GUIOuttextwin2 4,25,113,GUIOptionTextB
|
|
GUIOuttextwin2 4,25,123,GUIOptionTextC
|
|
GUIOuttextwin2 4,25,133,GUIOptionTextD
|
|
GUIOuttextwin2 4,25,143,GUIOptionTextE
|
|
GUIOuttextwin2 4,25,153,GUIOptionTextF
|
|
%ifdef __WIN32__
|
|
GUIOuttextwin2 4,25,163,GUIOptionTextW
|
|
%endif
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[frameskip],0
|
|
jne .nocheckbox
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox
|
|
GUIDisplayIconWin 4,11,20,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[newengen],0
|
|
je .nocheckbox1
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox1
|
|
GUIDisplayIconWin 4,11,30,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[MMXSupport],1
|
|
jne .nocheckbox2
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox2
|
|
GUIDisplayIconWin 4,11,40,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[pl12s34],0
|
|
je .nocheckbox3
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox3
|
|
GUIDisplayIconWin 4,11,50,[GUITemp]
|
|
%ifdef __MSDOS__
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[SidewinderFix],0
|
|
je .nocheckbox4
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox4
|
|
GUIDisplayIconWin 4,11,60,[GUITemp]
|
|
%endif
|
|
%ifdef __WIN32__
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[HighPriority],0
|
|
je .nocheckbox4
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox4
|
|
GUIDisplayIconWin 4,11,60,[GUITemp]
|
|
%endif
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[FPSAtStart],0
|
|
je .nocheckbox5
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox5
|
|
GUIDisplayIconWin 4,11,70,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[Turbo30hz],0
|
|
je .nocheckbox6
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox6
|
|
GUIDisplayIconWin 4,11,80,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[TimerEnable],0
|
|
je .nocheckbox7
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox7
|
|
GUIDisplayIconWin 4,11,90,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[FastFwdToggle],0
|
|
je .nocheckbox8
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox8
|
|
GUIDisplayIconWin 4,11,100,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[OldGfxMode2],0
|
|
je .nocheckbox9
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox9
|
|
GUIDisplayIconWin 4,11,110,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[DontSavePath],0
|
|
je .nocheckbox10
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox10
|
|
GUIDisplayIconWin 4,11,120,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[SmallMsgText],0
|
|
je .nocheckbox11
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox11
|
|
GUIDisplayIconWin 4,11,130,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC ;Autopatch Checkbox
|
|
cmp byte[AutoPatch],0
|
|
je .nocheckbox12
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox12
|
|
GUIDisplayIconWin 4,11,140,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[RomInfo],0
|
|
je .nocheckbox13
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox13
|
|
GUIDisplayIconWin 4,11,150,[GUITemp]
|
|
%ifdef __WIN32__
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[DisableScreenSaver],0
|
|
je .nocheckbox14
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox14
|
|
GUIDisplayIconWin 4,11,160,[GUITemp]
|
|
%endif
|
|
|
|
|
|
cmp byte[frameskip],0
|
|
je near .auto
|
|
; Draw borders
|
|
mov dword[GUIWincol],148+10
|
|
cmp byte[cwindrawn],1
|
|
jne .noone3
|
|
mov dword[GUIWincol],148+5
|
|
.noone3
|
|
cmp byte[cwindrawn],0
|
|
jne .nozero3
|
|
mov dword[GUIWincol],148
|
|
.nozero3
|
|
mov dl,[GUIWincol]
|
|
DrawGUIWinBox 4,75,11,93,11,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,1
|
|
DrawGUIWinBox 4,74,12,74,19,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,4
|
|
DrawGUIWinBox 4,75,20,93,20,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,3
|
|
DrawGUIWinBox 4,95,12,94,19,dl
|
|
; End draw borders
|
|
DrawGUIWinBox 4,75,12,93,19,167
|
|
mov al,[frameskip]
|
|
add al,47
|
|
mov [GUIOptionTextX],al
|
|
mov byte[GUItextcolor],223
|
|
GUIOuttextwin2 4,85,14,GUIOptionTextX
|
|
mov byte[GUItextcolor],221
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero4
|
|
mov byte[GUItextcolor],222
|
|
.zero4
|
|
GUIOuttextwin2 4,84,13,GUIOptionTextX
|
|
mov byte[GUItextcolor],217
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero6
|
|
mov byte[GUItextcolor],211
|
|
.zero6
|
|
DrawGUIButton 4,97,12,105,20,GUIOptionTextY,12,-2,-1
|
|
DrawGUIButton 4,108,12,116,20,GUIOptionTextZ,13,-2,-1
|
|
ret
|
|
|
|
.auto
|
|
; Draw borders
|
|
mov dword[GUIWincol],148+10
|
|
cmp byte[cwindrawn],1
|
|
jne .noone2
|
|
mov dword[GUIWincol],148+5
|
|
.noone2
|
|
cmp byte[cwindrawn],0
|
|
jne .nozero2
|
|
mov dword[GUIWincol],148
|
|
.nozero2
|
|
mov dl,[GUIWincol]
|
|
DrawGUIWinBox 4,96,11,114,11,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,1
|
|
DrawGUIWinBox 4,95,12,94,19,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,4
|
|
DrawGUIWinBox 4,96,20,114,20,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,3
|
|
DrawGUIWinBox 4,115,12,115,19,dl
|
|
; End draw borders
|
|
DrawGUIWinBox 4,96,12,114,19,167
|
|
mov al,[maxskip]
|
|
add al,48
|
|
mov [GUIOptionTextX],al
|
|
mov byte[GUItextcolor],223
|
|
GUIOuttextwin2 4,107,14,GUIOptionTextX
|
|
mov byte[GUItextcolor],221
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero5
|
|
mov byte[GUItextcolor],222
|
|
.zero5
|
|
GUIOuttextwin2 4,106,13,GUIOptionTextX
|
|
mov byte[GUItextcolor],217
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero7
|
|
mov byte[GUItextcolor],211
|
|
.zero7
|
|
DrawGUIButton 4,118,12,126,20,GUIOptionTextY,12,-2,-1
|
|
DrawGUIButton 4,129,12,137,20,GUIOptionTextZ,13,-2,-1
|
|
ret
|
|
|
|
SECTION .data
|
|
GUIOptionText1 db 'FRAME RATE',0
|
|
GUIOptionText1b db 'MAX FRAME SKIP',0
|
|
GUIOptionText2 db 'AUTO FRAME RATE',0
|
|
GUIOptionText3 db 'NEW GFX ENGINE',0
|
|
GUIOptionText4 db 'MMX SUPPORT',0
|
|
GUIOptionText5 db 'USE PL3/4 AS PL1/2',0
|
|
GUIOptionText6 db 'SIDEWINDER FIX',0
|
|
GUIOptionText6b db 'HIGH PRIORITY MODE',0
|
|
GUIOptionText7 db 'FPS AT PROGRAM START',0
|
|
GUIOptionText8 db 'USE 30HZ FOR TURBO',0
|
|
GUIOptionText9 db 'ENABLE GAME CLOCK',0
|
|
GUIOptionTextA db 'TOGGLED FAST FWD/SLWDWN',0
|
|
GUIOptionTextB db 'OLD GFX MODE 2',0
|
|
GUIOptionTextC db 'DON',39,'T SAVE CUR PATH',0
|
|
GUIOptionTextD db 'USE SMALL MESSAGE TEXT',0
|
|
GUIOptionTextE db 'ENABLE AUTO-PATCH',0
|
|
GUIOptionTextF db 'ENABLE ROMINFO.TXT',0
|
|
GUIOptionTextW db 'DISABLE SCREENSAVER',0 ; Try to keep as last option, since its Win Only.
|
|
GUIOptionTextX db '-',0
|
|
GUIOptionTextY db '+',0
|
|
GUIOptionTextZ db '-',0
|
|
|
|
SECTION .text
|
|
|
|
DisplayGUIVideo:
|
|
cmp byte[TripBufAvail],0
|
|
jne .notexttb
|
|
mov byte[Triplebufen],0
|
|
.notexttb
|
|
cmp byte[MMXSupport],1
|
|
jne .2xSaIdis
|
|
cmp byte[newgfx16b],0
|
|
je .2xSaIdis
|
|
jmp .no2xSaIdis
|
|
.2xSaIdis
|
|
mov byte[En2xSaI],0
|
|
mov byte[hqFilter],0
|
|
.no2xSaIdis
|
|
cmp byte[En2xSaI],0
|
|
je .no2xsaidis
|
|
mov byte[Triplebufen],0
|
|
.no2xsaidis
|
|
cmp byte[En2xSaI],0
|
|
je .no2xsaien
|
|
mov byte[hqFilter],0
|
|
mov byte[scanlines],0
|
|
mov byte[antienab],0
|
|
.no2xsaien
|
|
cmp byte[hqFilter],0
|
|
je .nohq3xen
|
|
mov byte[En2xSaI],0
|
|
mov byte[scanlines],0
|
|
mov byte[antienab],0
|
|
.nohq3xen
|
|
; Video Modes List/Scanlines/Interpolation/Full(Small) Screen
|
|
GUIDrawWindowBox 5,GUIVideoDisp
|
|
mov byte[GUItextcolor],217
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero
|
|
mov byte[GUItextcolor],211
|
|
.zero
|
|
sub byte[GUItextcolor],15
|
|
|
|
%ifndef __MSDOS__
|
|
GUIOuttextwin2 5,8,76,GUIVideoTextw0
|
|
GUIOuttextwin2 5,10,85,GUIVideoTextw1
|
|
GUIOuttextwin2 5,10,92,GUIVideoTextw2
|
|
GUIOuttextwin2 5,10,99,GUIVideoTextw3
|
|
%endif
|
|
%ifdef __LINUX__
|
|
GUIOuttextwin2 5,10,106,GUIVideoTextw4
|
|
%endif
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUISLVID+eax],0
|
|
je near .notext2
|
|
%ifdef __LINUX__
|
|
GUIOuttextwin2 5,13,116,GUIVideoTextb
|
|
GUIOuttextwin2u 5,36,124,GUIVideoTexta,0
|
|
%else
|
|
GUIOuttextwin2 5,13,111,GUIVideoTextb
|
|
GUIOuttextwin2u 5,36,119,GUIVideoTexta,0
|
|
%endif
|
|
.notext2
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUIHSVID+eax],0
|
|
je near .notexta
|
|
%ifdef __LINUX__
|
|
GUIOuttextwin2 5,13,116,GUIVideoTextb
|
|
GUIOuttextwin2u 5,76,124,GUIVideoTexta2,0
|
|
GUIOuttextwin2u 5,116,124,GUIVideoTexta3,0
|
|
%else
|
|
GUIOuttextwin2 5,13,111,GUIVideoTextb
|
|
GUIOuttextwin2u 5,76,119,GUIVideoTexta2,0
|
|
GUIOuttextwin2u 5,116,119,GUIVideoTexta3,0
|
|
%endif
|
|
.notexta
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUITBWVID+eax],0
|
|
je near .nottbw
|
|
GUIOuttextwin2u 5,26,128,GUIVideoText7,0
|
|
.nottbw
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUI2xVID+eax],0
|
|
je near .notextb
|
|
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
|
|
GUIOuttextwin2u 5,26,168,GUIVideoText3,0
|
|
.notextb2
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUIBIFIL+eax],0
|
|
je near .notextbf2
|
|
GUIOuttextwin2u 5,26,168,GUIVideoTextbf,0
|
|
.notextbf2
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUIINVID+eax],0
|
|
je .notext3
|
|
GUIOuttextwin2u 5,26,83,GUIVideoText3,0
|
|
.notext3
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUIEAVID+eax],0
|
|
je .notext4
|
|
GUIOuttextwin2u 5,26,83,GUIVideoText4,9
|
|
.notext4
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUIFSVID+eax],0
|
|
je near .notext5
|
|
cmp byte[GUIWSVID+eax],0
|
|
je .notext4a
|
|
GUIOuttextwin2u 5,26,93,GUIVideoText5b,6
|
|
jmp .notext5
|
|
.notext4a
|
|
GUIOuttextwin2u 5,26,93,GUIVideoText5,6
|
|
.notext5
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUISSVID+eax],0
|
|
je .notext6
|
|
GUIOuttextwin2u 5,26,103,GUIVideoText6,1
|
|
.notext6
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[TripBufAvail],0
|
|
je near .notext7
|
|
cmp byte[GUITBVID+eax],0
|
|
je .notext7
|
|
GUIOuttextwin2u 5,26,168,GUIVideoText7,0
|
|
.notext7
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUIM7VID+eax],0
|
|
je .notext8
|
|
cmp byte[newengen],0
|
|
je .notext8
|
|
GUIOuttextwin2u 5,26,178,GUIVideoText8b,0
|
|
.notext8
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUI2xVID+eax],0
|
|
je near .notext11a
|
|
;GUIOuttextwin2u 5,130,158,GUIVideoTextscale2x,1
|
|
.notext11a
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUIHQ2X+eax],0
|
|
je near .notexthq2xa
|
|
GUIOuttextwin2u 5,130,168,GUIVideoTexthq2x,1
|
|
.notexthq2xa
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUIHQ3X+eax],0
|
|
je near .notexthq3xa
|
|
GUIOuttextwin2u 5,130,168,GUIVideoTexthq3x,1
|
|
.notexthq3xa
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUIHQ4X+eax],0
|
|
je near .notexthq4xa
|
|
GUIOuttextwin2u 5,130,168,GUIVideoTexthq4x,1
|
|
.notexthq4xa
|
|
GUIOuttextwin2u 5,26,188,GUIVideoText8c,0
|
|
%ifndef __LINUX__
|
|
GUIOuttextwin2u 5,130,188,GUIVideoText9,0
|
|
%endif
|
|
add byte[GUItextcolor],15
|
|
|
|
%ifndef __MSDOS__
|
|
GUIOuttextwin2 5,7,75,GUIVideoTextw0
|
|
GUIOuttextwin2 5,9,84,GUIVideoTextw1
|
|
GUIOuttextwin2 5,9,91,GUIVideoTextw2
|
|
GUIOuttextwin2 5,9,98,GUIVideoTextw3
|
|
%endif
|
|
%ifdef __LINUX__
|
|
GUIOuttextwin2 5,9,105,GUIVideoTextw4
|
|
%endif
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUISLVID+eax],0
|
|
je .notext2b
|
|
%ifdef __LINUX__
|
|
GUIOuttextwin2 5,12,115,GUIVideoTextb
|
|
GUIOuttextwin2 5,35,123,GUIVideoTexta
|
|
%else
|
|
GUIOuttextwin2 5,12,110,GUIVideoTextb
|
|
GUIOuttextwin2 5,35,118,GUIVideoTexta
|
|
%endif
|
|
.notext2b
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUIHSVID+eax],0
|
|
je near .notextab
|
|
%ifdef __LINUX__
|
|
GUIOuttextwin2 5,12,115,GUIVideoTextb
|
|
GUIOuttextwin2 5,75,123,GUIVideoTexta2
|
|
GUIOuttextwin2 5,115,123,GUIVideoTexta3
|
|
%else
|
|
GUIOuttextwin2 5,12,110,GUIVideoTextb
|
|
GUIOuttextwin2 5,75,118,GUIVideoTexta2
|
|
GUIOuttextwin2 5,115,118,GUIVideoTexta3
|
|
%endif
|
|
.notextab
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUITBWVID+eax],0
|
|
je near .nottbwb
|
|
GUIOuttextwin2 5,25,127,GUIVideoText7
|
|
.nottbwb
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUI2xVID+eax],0
|
|
je near .notextbb
|
|
GUIOuttextwin2 5,25,137,GUIVideoTextc
|
|
GUIOuttextwin2 5,25,147,GUIVideoTextd
|
|
GUIOuttextwin2 5,25,157,GUIVideoTextd2
|
|
.notextbb
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUII2VID+eax],0
|
|
je near .notextb2b
|
|
GUIOuttextwin2 5,25,167,GUIVideoText3
|
|
.notextb2b
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUIBIFIL+eax],0
|
|
je near .notextb2bf
|
|
GUIOuttextwin2 5,25,167,GUIVideoTextbf
|
|
.notextb2bf
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUIINVID+eax],0
|
|
je .notext3b
|
|
GUIOuttextwin2 5,25,82,GUIVideoText3
|
|
.notext3b
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUIEAVID+eax],0
|
|
je .notext4b
|
|
GUIOuttextwin2 5,25,82,GUIVideoText4
|
|
.notext4b
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUIFSVID+eax],0
|
|
je near .notext5b
|
|
cmp byte[GUIWSVID+eax],0
|
|
je .notext4ba
|
|
GUIOuttextwin2 5,25,92,GUIVideoText5b
|
|
jmp .notext5b
|
|
.notext4ba
|
|
GUIOuttextwin2 5,25,92,GUIVideoText5
|
|
.notext5b
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUISSVID+eax],0
|
|
je .notext6b
|
|
GUIOuttextwin2 5,25,102,GUIVideoText6
|
|
.notext6b
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[TripBufAvail],0
|
|
je near .notext7b
|
|
cmp byte[GUITBVID+eax],0
|
|
je .notext7b
|
|
GUIOuttextwin2 5,25,167,GUIVideoText7
|
|
.notext7b
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUIM7VID+eax],0
|
|
je .notext8b
|
|
cmp byte[newengen],0
|
|
je .notext8b
|
|
GUIOuttextwin2 5,25,177,GUIVideoText8b
|
|
.notext8b
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUI2xVID+eax],0
|
|
je near .notext11b
|
|
;GUIOuttextwin2 5,129,157,GUIVideoTextscale2x
|
|
.notext11b
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUIHQ2X+eax],0
|
|
je near .notexthq2xb
|
|
GUIOuttextwin2 5,129,167,GUIVideoTexthq2x
|
|
.notexthq2xb
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUIHQ3X+eax],0
|
|
je near .notexthq3xb
|
|
GUIOuttextwin2 5,129,167,GUIVideoTexthq3x
|
|
.notexthq3xb
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUIHQ4X+eax],0
|
|
je near .notexthq4xb
|
|
GUIOuttextwin2 5,129,167,GUIVideoTexthq4x
|
|
.notexthq4xb
|
|
GUIOuttextwin2 5,25,187,GUIVideoText8c
|
|
%ifndef __LINUX__
|
|
GUIOuttextwin2 5,129,187,GUIVideoText9
|
|
%endif
|
|
DrawGUIButton 5,128,60,164,71,GUIVideoText8,4,0,0
|
|
mov al,[GUIWincol]
|
|
mov byte[GUItextcolor],al
|
|
GUIOuttextwin2 5,6,16,GUIVideoText1
|
|
mov byte[GUItextcolor],163
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero3
|
|
mov byte[GUItextcolor],164
|
|
.zero3
|
|
GUIOuttextwin2 5,5,15,GUIVideoText1
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUISLVID+eax],0
|
|
je near .nocheckboxb
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[scanlines],1
|
|
jne .nocheckbox
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox
|
|
%ifdef __LINUX__
|
|
GUIDisplayIconWin 5,21,119,[GUITemp]
|
|
%else
|
|
GUIDisplayIconWin 5,21,114,[GUITemp]
|
|
%endif
|
|
.nocheckboxb
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUIHSVID+eax],0
|
|
je .nocheckboxw
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[scanlines],3
|
|
jne .nocheckboxv
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckboxv
|
|
%ifdef __LINUX__
|
|
GUIDisplayIconWin 5,61,119,[GUITemp]
|
|
%else
|
|
GUIDisplayIconWin 5,61,114,[GUITemp]
|
|
%endif
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[scanlines],2
|
|
jne .nocheckboxv2
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckboxv2
|
|
%ifdef __LINUX__
|
|
GUIDisplayIconWin 5,101,119,[GUITemp]
|
|
%else
|
|
GUIDisplayIconWin 5,101,114,[GUITemp]
|
|
%endif
|
|
.nocheckboxw
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUITBWVID+eax],0
|
|
je near .nocheckboxslw2
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[TripleBufferWin],1
|
|
jne .nocheckboxslw
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckboxslw
|
|
GUIDisplayIconWin 5,11,123,[GUITemp]
|
|
.nocheckboxslw2
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUI2xVID+eax],0
|
|
je near .nocheckboxx
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[En2xSaI],1
|
|
jne .nocheckboxx2
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckboxx2
|
|
GUIDisplayIconWin 5,11,133,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[En2xSaI],2
|
|
jne .nocheckboxx3
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckboxx3
|
|
GUIDisplayIconWin 5,11,143,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[En2xSaI],3
|
|
jne .nocheckboxx4
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckboxx4
|
|
GUIDisplayIconWin 5,11,153,[GUITemp]
|
|
.nocheckboxx
|
|
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUII2VID+eax],0
|
|
je near .nocheckboxi2
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[antienab],0
|
|
je .nocheckbox1i2
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox1i2
|
|
GUIDisplayIconWin 5,11,163,[GUITemp]
|
|
.nocheckboxi2
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUIBIFIL+eax],0
|
|
je near .nocheckboxbf
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[BilinearFilter],0
|
|
je .nocheckbox1bf
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox1bf
|
|
GUIDisplayIconWin 5,11,163,[GUITemp]
|
|
.nocheckboxbf
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUITBVID+eax],0
|
|
je .nocheckboxtbb
|
|
cmp byte[TripBufAvail],0
|
|
je near .nocheckboxtbb
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[Triplebufen],1
|
|
jne .nocheckboxtb
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckboxtb
|
|
GUIDisplayIconWin 5,11,163,[GUITemp]
|
|
.nocheckboxtbb
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUIM7VID+eax],0
|
|
je near .nocheckboxm72
|
|
cmp byte[newengen],0
|
|
je near .nocheckboxm72
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[Mode7HiRes16b],0
|
|
je .nocheckbox1m72
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox1m72
|
|
GUIDisplayIconWin 5,11,173,[GUITemp]
|
|
.nocheckboxm72
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[GrayscaleMode],0
|
|
je .nocheckboxm73
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckboxm73
|
|
GUIDisplayIconWin 5,11,183,[GUITemp]
|
|
%ifndef __LINUX__
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[vsyncon],0
|
|
je .nocheckboxm74
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckboxm74
|
|
GUIDisplayIconWin 5,115,183,[GUITemp]
|
|
%endif
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUIIEVID+eax],0
|
|
je .nocheckbox1b
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[antienab],0
|
|
je .nocheckbox1
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox1
|
|
GUIDisplayIconWin 5,11,78,[GUITemp]
|
|
.nocheckbox1b
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUIFSVID+eax],0
|
|
je .nocheckbox2b
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[ScreenScale],0
|
|
je .nocheckbox2
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox2
|
|
GUIDisplayIconWin 5,11,88,[GUITemp]
|
|
.nocheckbox2b
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUISSVID+eax],0
|
|
je .nocheckbox3b
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[smallscreenon],0
|
|
je .nocheckbox3
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox3
|
|
GUIDisplayIconWin 5,11,98,[GUITemp]
|
|
.nocheckbox3b
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUI2xVID+eax],0
|
|
je near .nocheckbox2scale2x
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[scale2xFilter],0
|
|
je .nocheckbox1scale2x
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox1scale2x
|
|
;GUIDisplayIconWin 5,115,153,[GUITemp]
|
|
.nocheckbox2scale2x
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
cmp byte[GUIHQ2X+eax],0
|
|
jne near .checkboxhq
|
|
cmp byte[GUIHQ3X+eax],0
|
|
jne near .checkboxhq
|
|
cmp byte[GUIHQ4X+eax],0
|
|
jne near .checkboxhq
|
|
jmp .nocheckboxhq
|
|
.checkboxhq
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[hqFilter],0
|
|
je .uncheckedhq
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.uncheckedhq
|
|
GUIDisplayIconWin 5,115,163,[GUITemp]
|
|
.nocheckboxhq
|
|
DrawGUIWinBox 5,5,26,115,69,167
|
|
DrawSlideBarWin 5,117,34,[GUIcurrentvideoviewloc],[NumVideoModes],5,28,GUIVStA
|
|
cmp byte[GUICHold],5
|
|
jne .noholda
|
|
add byte[GUIWincoladd],3
|
|
.noholda
|
|
GUIDisplayIconWin 5,117,26,GUIIconDataUpArrow
|
|
cmp byte[GUICHold],5
|
|
jne .noholdb
|
|
sub byte[GUIWincoladd],3
|
|
.noholdb
|
|
cmp byte[GUICHold],6
|
|
jne .noholdc
|
|
add byte[GUIWincoladd],3
|
|
.noholdc
|
|
GUIDisplayIconWin 5,117,62,GUIIconDataDownArrow
|
|
cmp byte[GUICHold],6
|
|
jne .noholdd
|
|
sub byte[GUIWincoladd],3
|
|
.noholdd
|
|
|
|
mov ebx,[GUIcurrentvideocursloc]
|
|
sub ebx,[GUIcurrentvideoviewloc]
|
|
lea ebx,[ebx*8]
|
|
add ebx,28
|
|
DrawGUIWinBox2 5,5,115,7,224
|
|
|
|
mov byte[GUItextcolor],223
|
|
mov eax,[GUIcurrentvideoviewloc]
|
|
mov ebx,eax
|
|
shl eax,4
|
|
add eax,ebx
|
|
add eax,ebx
|
|
add eax,GUIVideoModeNames
|
|
mov dword[GUITemp],eax
|
|
GUIOuttextwin2 5,11,30,[GUITemp]
|
|
add dword[GUITemp],18
|
|
GUIOuttextwin2 5,11,30+8,[GUITemp]
|
|
add dword[GUITemp],18
|
|
GUIOuttextwin2 5,11,30+8*2,[GUITemp]
|
|
add dword[GUITemp],18
|
|
GUIOuttextwin2 5,11,30+8*3,[GUITemp]
|
|
add dword[GUITemp],18
|
|
GUIOuttextwin2 5,11,30+8*4,[GUITemp]
|
|
|
|
mov byte[GUItextcolor],221
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero5
|
|
mov byte[GUItextcolor],222
|
|
.zero5
|
|
mov eax,[GUIcurrentvideoviewloc]
|
|
mov ebx,eax
|
|
shl eax,4
|
|
add eax,ebx
|
|
add eax,ebx
|
|
add eax,GUIVideoModeNames
|
|
mov dword[GUITemp],eax
|
|
GUIOuttextwin2 5,10,29,[GUITemp]
|
|
add dword[GUITemp],18
|
|
GUIOuttextwin2 5,10,29+8,[GUITemp]
|
|
add dword[GUITemp],18
|
|
GUIOuttextwin2 5,10,29+8*2,[GUITemp]
|
|
add dword[GUITemp],18
|
|
GUIOuttextwin2 5,10,29+8*3,[GUITemp]
|
|
add dword[GUITemp],18
|
|
GUIOuttextwin2 5,10,29+8*4,[GUITemp]
|
|
|
|
; Draw border
|
|
mov dword[GUIWincol],148+10
|
|
cmp byte[cwindrawn],1
|
|
jne .noone2
|
|
mov dword[GUIWincol],148+5
|
|
.noone2
|
|
cmp byte[cwindrawn],0
|
|
jne .nozero2
|
|
mov dword[GUIWincol],148
|
|
.nozero2
|
|
mov dl,[GUIWincol]
|
|
DrawGUIWinBox 5,5,25,115,25,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,1
|
|
DrawGUIWinBox 5,4,26,3,69,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,4
|
|
DrawGUIWinBox 5,5,70,115,70,dl
|
|
xor eax,eax
|
|
mov al,[cvidmode]
|
|
mov ebx,eax
|
|
shl eax,4
|
|
add eax,ebx
|
|
add eax,ebx
|
|
add eax,GUIVideoModeNames
|
|
mov dword[GUITemp],eax
|
|
mov al,[GUIWincol]
|
|
mov byte[GUItextcolor],al
|
|
GUIOuttextwin2 5,7,196,GUIVideoTextH
|
|
GUIOuttextwin2 5,49,196,[GUITemp]
|
|
mov byte[GUItextcolor],163
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero6
|
|
mov byte[GUItextcolor],164
|
|
.zero6
|
|
GUIOuttextwin2 5,6,195,GUIVideoTextH
|
|
GUIOuttextwin2 5,48,195,[GUITemp]
|
|
ret
|
|
|
|
SECTION .data
|
|
GUIVideoText1 db 'VIDEO MODES :',0
|
|
GUIVideoText2 db 'FULL SCANLINES',0
|
|
GUIVideoTextb db 'SCANLINES:',0
|
|
GUIVideoTexta db 'FULL',0
|
|
GUIVideoTexta2 db '50%',0
|
|
GUIVideoTexta3 db '25%',0
|
|
GUIVideoTextc db '2XSAI ENGINE',0
|
|
GUIVideoTextd db 'SUPER EAGLE',0
|
|
GUIVideoTextd2 db 'SUPER 2XSAI',0
|
|
GUIVideoTextbf db 'BILINEAR FILTER',0
|
|
GUIVideoText3 db 'INTERPOLATION',0 ; -y
|
|
GUIVideoText4 db 'EAGLE ENGINE',0 ; -y
|
|
GUIVideoTextscale2x db 'SCALE2X',0
|
|
GUIVideoTexthq2x db 'HQ2X',0
|
|
GUIVideoTexthq3x db 'HQ3X',0
|
|
GUIVideoTexthq4x db 'HQ4X',0
|
|
GUIVideoText5 db 'FULL SCREEN',0 ; -c
|
|
GUIVideoText5b db 'WIDE SCREEN',0 ; -c
|
|
GUIVideoText6 db 'SMALL SCREEN',0 ; -c
|
|
GUIVideoText7 db 'TRIPLE BUFFERING',0 ; -c
|
|
GUIVideoText8b db 'HI-RES MODE 7',0 ; -c
|
|
GUIVideoText8c db 'GRAYSCALE MODE',0 ; -c
|
|
GUIVideoText8 db 'SET',0 ; set button
|
|
GUIVideoText9 db 'VSYNC',0 ; -c
|
|
GUIVideoTextH db 'MODE : ',0
|
|
GUIVideoTextw0 db 'LEGEND:',0
|
|
GUIVideoTextw1 db 'S = STRETCH R = KEEP RATIO',0
|
|
GUIVideoTextw2 db ' D = ALLOW SPECIAL FILTERS',0
|
|
GUIVideoTextw3 db ' W = WIN F = FULL',0
|
|
GUIVideoTextw4 db ' O = USES OPENGL',0
|
|
|
|
|
|
SECTION .bss
|
|
GUIVStA resd 3
|
|
|
|
GUIcurrentvideoviewloc resd 1
|
|
GUIcurrentvideocursloc resd 1
|
|
|
|
SECTION .text
|
|
|
|
|
|
DisplayGUISound: ; Sound Related Options
|
|
GUIDrawWindowBox 6,GUISoundDisp
|
|
|
|
;Text Display
|
|
mov byte[GUItextcolor],217 ; Shadows
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero
|
|
mov byte[GUItextcolor],211
|
|
.zero
|
|
sub byte[GUItextcolor],15
|
|
GUIOuttextwin2u 6,26,26,GUISoundTextA1,0
|
|
GUIOuttextwin2u 6,26,35,GUISoundTextA2,0
|
|
%ifdef __MSDOS__
|
|
GUIOuttextwin2u 6,26,44,GUISoundTextA3,1
|
|
GUIOuttextwin2u 6,116,26,GUISoundTextA4,0
|
|
%endif
|
|
|
|
%ifdef __WIN32__
|
|
GUIOuttextwin2u 6,26,106,GUISoundTextD1,4
|
|
%endif
|
|
GUIOuttextwin2u 6,26,116,GUISoundTextD2,2
|
|
GUIOuttextwin2u 6,26,126,GUISoundTextD3,1
|
|
GUIOuttextwin2u 6,26,136,GUISoundTextD4,6
|
|
GUIOuttextwin2u 6,26,146,GUISoundTextD5,0
|
|
|
|
GUIOuttextwin2u 6,26,168,GUISoundTextE1,0
|
|
GUIOuttextwin2u 6,26,178,GUISoundTextE2,0
|
|
%ifndef __MSDOS__
|
|
GUIOuttextwin2u 6,26,188,GUISoundTextE3,0
|
|
%endif
|
|
|
|
GUIOuttextwin2u 6,126,168,GUISoundTextF1,1
|
|
GUIOuttextwin2u 6,126,178,GUISoundTextF2,1
|
|
%ifndef __MSDOS__
|
|
GUIOuttextwin2u 6,126,188,GUISoundTextF3,0
|
|
%endif
|
|
|
|
add byte[GUItextcolor],15 ;Text
|
|
GUIOuttextwin2 6,25,25,GUISoundTextA1
|
|
GUIOuttextwin2 6,25,34,GUISoundTextA2
|
|
%ifdef __MSDOS__
|
|
GUIOuttextwin2 6,25,43,GUISoundTextA3
|
|
GUIOuttextwin2 6,115,25,GUISoundTextA4
|
|
%endif
|
|
|
|
%ifdef __WIN32__
|
|
GUIOuttextwin2 6,25,105,GUISoundTextD1
|
|
%endif
|
|
GUIOuttextwin2 6,25,115,GUISoundTextD2
|
|
GUIOuttextwin2 6,25,125,GUISoundTextD3
|
|
GUIOuttextwin2 6,25,135,GUISoundTextD4
|
|
GUIOuttextwin2 6,25,145,GUISoundTextD5
|
|
|
|
GUIOuttextwin2 6,25,167,GUISoundTextE1
|
|
GUIOuttextwin2 6,25,177,GUISoundTextE2
|
|
%ifndef __MSDOS__
|
|
GUIOuttextwin2 6,25,187,GUISoundTextE3
|
|
%endif
|
|
|
|
GUIOuttextwin2 6,125,167,GUISoundTextF1
|
|
GUIOuttextwin2 6,125,177,GUISoundTextF2
|
|
%ifndef __MSDOS__
|
|
GUIOuttextwin2 6,125,187,GUISoundTextF3
|
|
%endif
|
|
|
|
mov al,[GUIWincol] ;Yellow Shadow
|
|
mov byte[GUItextcolor],al
|
|
GUIOuttextwin2 6,6,16,GUISoundTextA
|
|
GUIOuttextwin2u 6,6,53,GUISoundTextB,9
|
|
GUIOuttextwin2 6,6,76,GUISoundTextC
|
|
GUIOuttextwin2 6,6,158,GUISoundTextE
|
|
GUIOuttextwin2 6,106,158,GUISoundTextF
|
|
|
|
mov byte[GUItextcolor],163 ;Yellow Text
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero3
|
|
mov byte[GUItextcolor],164
|
|
.zero3
|
|
GUIOuttextwin2 6,5,15,GUISoundTextA
|
|
GUIOuttextwin2 6,5,52,GUISoundTextB
|
|
GUIOuttextwin2 6,5,75,GUISoundTextC
|
|
GUIOuttextwin2 6,5,157,GUISoundTextE
|
|
GUIOuttextwin2 6,105,157,GUISoundTextF
|
|
|
|
|
|
;Checkboxes
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[cfgsoundon],0
|
|
je .nocheckbox
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox
|
|
GUIDisplayIconWin 6,11,21,[GUITemp]
|
|
|
|
%ifdef __MSDOS__
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[cfgforce8b],0
|
|
je .nocheckbox0
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox0
|
|
GUIDisplayIconWin 6,102,21,[GUITemp]
|
|
%endif
|
|
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[cfgStereoSound],0
|
|
je .nocheckbox1
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox1
|
|
GUIDisplayIconWin 6,11,30,[GUITemp]
|
|
|
|
%ifdef __MSDOS__
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[RaisePitch],0
|
|
je .nocheckbox1b
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox1b
|
|
GUIDisplayIconWin 6,11,39,[GUITemp]
|
|
%endif
|
|
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[RevStereo],0
|
|
je .nocheckbox3
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox3
|
|
GUIDisplayIconWin 6,11,111,[GUITemp]
|
|
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[Surround],0
|
|
je .nocheckbox4
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox4
|
|
GUIDisplayIconWin 6,11,121,[GUITemp]
|
|
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[SoundBufEn],0
|
|
je .nocheckbox5
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox5
|
|
GUIDisplayIconWin 6,11,131,[GUITemp]
|
|
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[SPCDisable],0
|
|
je .nocheckbox6
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox6
|
|
GUIDisplayIconWin 6,11,141,[GUITemp]
|
|
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[SoundInterpType],1
|
|
jne .nocheckbox7
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox7
|
|
GUIDisplayIconWin 6,11,163,[GUITemp]
|
|
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[SoundInterpType],2
|
|
jne .nocheckbox8
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox8
|
|
GUIDisplayIconWin 6,11,173,[GUITemp]
|
|
|
|
%ifndef __MSDOS__
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[SoundInterpType],3
|
|
jne .nocheckbox9
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox9
|
|
GUIDisplayIconWin 6,11,183,[GUITemp]
|
|
%endif
|
|
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[LowPassFilterType],1
|
|
jne .nocheckbox10
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox10
|
|
GUIDisplayIconWin 6,111,163,[GUITemp]
|
|
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[LowPassFilterType],2
|
|
jne .nocheckbox11
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox11
|
|
GUIDisplayIconWin 6,111,173,[GUITemp]
|
|
|
|
%ifndef __MSDOS__
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[LowPassFilterType],3
|
|
jne .nocheckbox12
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox12
|
|
GUIDisplayIconWin 6,111,183,[GUITemp]
|
|
%endif
|
|
|
|
%ifdef __WIN32__
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[PrimaryBuffer],0
|
|
je .nocheckbox13
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox13
|
|
GUIDisplayIconWin 6,11,101,[GUITemp]
|
|
%endif
|
|
|
|
|
|
;Sampling Rate Box
|
|
DrawGUIWinBox 6,15,61,69,69,167
|
|
mov dword[GUITemp],GUISoundTextB1
|
|
xor eax,eax
|
|
mov al,[cfgSoundQuality]
|
|
shl eax,3
|
|
add [GUITemp],eax
|
|
mov byte[GUItextcolor],223 ; Text
|
|
GUIOuttextwin2 6,23,64,[GUITemp]
|
|
mov byte[GUItextcolor],221 ; Shadow
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero4
|
|
mov byte[GUItextcolor],222
|
|
.zero4
|
|
GUIOuttextwin2 6,22,63,[GUITemp]
|
|
|
|
|
|
; Draw borders
|
|
mov dword[GUIWincol],148+10
|
|
cmp byte[cwindrawn],1
|
|
jne .noone3
|
|
mov dword[GUIWincol],148+5
|
|
.noone3
|
|
cmp byte[cwindrawn],0
|
|
jne .nozero3
|
|
mov dword[GUIWincol],148
|
|
.nozero3
|
|
mov dl,[GUIWincol]
|
|
DrawGUIWinBox 6,15,60,69,60,dl ;top
|
|
mov dl,[GUIWincol]
|
|
add dl,1
|
|
DrawGUIWinBox 6,14,61,13,69,dl ;left
|
|
mov dl,[GUIWincol]
|
|
add dl,4
|
|
DrawGUIWinBox 6,15,70,69,70,dl ;bottom
|
|
mov dl,[GUIWincol]
|
|
add dl,3
|
|
DrawGUIWinBox 6,71,61,70,69,dl ;right
|
|
|
|
|
|
; Volume Level Slider
|
|
mov eax,dword[GUIwinposx+6*4]
|
|
mov ebx,dword[GUIwinposy+6*4]
|
|
mov ecx,eax
|
|
add eax,15
|
|
add ecx,15+100
|
|
add ebx,91
|
|
xor edx,edx
|
|
mov dl,215
|
|
sub dl,[GUIWincoladd]
|
|
DrawGUILine
|
|
inc ecx
|
|
inc eax
|
|
sub dl,13
|
|
DrawGUILine
|
|
xor eax,eax
|
|
mov al,[MusicRelVol]
|
|
mov dword[GUITemp],11
|
|
add [GUITemp],eax
|
|
GUIDisplayIconWin 6,[GUITemp],87,GUIIconDataSlideBar
|
|
mov dword[GUISoundTextC1],' '
|
|
mov byte[GUISoundTextC1+3],'%'
|
|
mov esi,GUISoundTextC1+2
|
|
xor eax,eax
|
|
mov al,[MusicRelVol]
|
|
mov ebx,10
|
|
div bl
|
|
add ah,48
|
|
mov [esi],ah
|
|
cmp al,0
|
|
je .nomore
|
|
dec esi
|
|
xor ah,ah
|
|
div bl
|
|
add ah,48
|
|
mov [esi],ah
|
|
cmp al,0
|
|
je .nomore
|
|
dec esi
|
|
xor ah,ah
|
|
div bl
|
|
add ah,48
|
|
mov [esi],ah
|
|
.nomore
|
|
mov [GUITemp],esi
|
|
mov byte[GUItextcolor],223
|
|
GUIOuttextwin2 6,119,89,[GUITemp]
|
|
mov byte[GUItextcolor],221
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero5
|
|
mov byte[GUItextcolor],222
|
|
.zero5
|
|
GUIOuttextwin2 6,118,88,[GUITemp]
|
|
ret
|
|
|
|
SECTION .data
|
|
GUISoundTextA db 'SOUND SWITCHES :',0
|
|
GUISoundTextA1 db 'ENABLE SOUND',0
|
|
GUISoundTextA2 db 'STEREO SOUND',0
|
|
GUISoundTextA3 db 'RAISE PITCH LEVEL',0 ; DOS Only
|
|
GUISoundTextA4 db 'FORCE 8-BIT',0 ; DOS Only
|
|
|
|
GUISoundTextB db 'SAMPLING RATE :',0
|
|
GUISoundTextB1 db ' 8000HZ',0
|
|
GUISoundTextB2 db '11025HZ',0
|
|
GUISoundTextB3 db '22050HZ',0
|
|
GUISoundTextB4 db '44100HZ',0
|
|
GUISoundTextB5 db '16000HZ',0
|
|
GUISoundTextB6 db '32000HZ',0
|
|
GUISoundTextB7 db '48000HZ',0
|
|
|
|
GUISoundTextC db 'VOLUME LEVEL :',0
|
|
GUISoundTextC1 db '---%',0
|
|
|
|
GUISoundTextD1 db 'USE PRIMARY BUFFER',0 ; Win Only
|
|
GUISoundTextD2 db 'REVERSE STEREO',0
|
|
GUISoundTextD3 db 'SURROUND SOUND',0
|
|
GUISoundTextD4 db 'SOUND BUFFERING',0
|
|
GUISoundTextD5 db 'DISABLE SPC EMULATION',0
|
|
|
|
GUISoundTextE db 'INTERPOLATION :',0
|
|
GUISoundTextE1 db 'GAUSSIAN',0
|
|
GUISoundTextE2 db 'CUBIC SPLINE',0
|
|
GUISoundTextE3 db '8-POINT',0 ; Non-DOS Only
|
|
|
|
GUISoundTextF db 'LOWPASS :',0
|
|
GUISoundTextF1 db 'SIMPLE',0
|
|
GUISoundTextF2 db 'DYNAMIC',0
|
|
GUISoundTextF3 db 'HI QUALITY',0 ; Non-DOS Only
|
|
|
|
SECTION .text
|
|
|
|
|
|
DisplayGUICheatConv:
|
|
mov eax,[ccheatnpos]
|
|
add eax,4
|
|
xor ebx,ebx
|
|
mov ecx,3
|
|
mov edx,GUICheatTextZ3
|
|
.loop
|
|
mov bl,[eax]
|
|
and bl,0Fh
|
|
mov bl,[GUICheatTextZ4+ebx]
|
|
mov [edx+1],bl
|
|
mov bl,[eax]
|
|
and bl,0F0h
|
|
shr bl,4
|
|
mov bl,[GUICheatTextZ4+ebx]
|
|
mov [edx],bl
|
|
add edx,2
|
|
dec eax
|
|
dec ecx
|
|
jnz .loop
|
|
mov eax,[ccheatnpos]
|
|
inc eax
|
|
mov edx,GUICheatTextZ3+7
|
|
mov bl,[eax]
|
|
and bl,0Fh
|
|
mov bl,[GUICheatTextZ4+ebx]
|
|
mov [edx+1],bl
|
|
mov bl,[eax]
|
|
and bl,0F0h
|
|
shr bl,4
|
|
mov bl,[GUICheatTextZ4+ebx]
|
|
mov [edx],bl
|
|
mov eax,[ccheatnpos]
|
|
add eax,5
|
|
mov edx,GUICheatTextZ3+10
|
|
mov bl,[eax]
|
|
and bl,0Fh
|
|
mov bl,[GUICheatTextZ4+ebx]
|
|
mov [edx+1],bl
|
|
mov bl,[eax]
|
|
and bl,0F0h
|
|
shr bl,4
|
|
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[GUICheatTextZ3+13],'O'
|
|
mov byte[GUICheatTextZ3+14],'F'
|
|
mov byte[GUICheatTextZ3+15],'F'
|
|
jmp .off
|
|
.on
|
|
test byte[eax],80h
|
|
jnz .repl
|
|
mov byte[GUICheatTextZ3+13],'O'
|
|
mov byte[GUICheatTextZ3+14],'N'
|
|
mov byte[GUICheatTextZ3+15],' '
|
|
jmp .off
|
|
.repl
|
|
mov byte[GUICheatTextZ3+13],'R'
|
|
mov byte[GUICheatTextZ3+14],'P'
|
|
mov byte[GUICheatTextZ3+15],'L'
|
|
jmp .off
|
|
.src
|
|
mov byte[GUICheatTextZ3+13],'S'
|
|
mov byte[GUICheatTextZ3+14],'R'
|
|
mov byte[GUICheatTextZ3+15],'C'
|
|
.off
|
|
mov ecx,20
|
|
add eax,8
|
|
mov edx,GUICheatTextZ3+17
|
|
.loop2
|
|
mov bl,[eax]
|
|
mov [edx],bl
|
|
inc eax
|
|
inc edx
|
|
dec ecx
|
|
jnz .loop2
|
|
ret
|
|
|
|
%macro GUIOuttextwin2cheat 2
|
|
test dword[ccheatnleft],80000000h
|
|
jnz %%skip
|
|
call DisplayGUICheatConv
|
|
GUIOuttextwin2 7,%1,%2,GUICheatTextZ3
|
|
add dword[ccheatnpos],28
|
|
dec dword[ccheatnleft]
|
|
%%skip
|
|
%endmacro
|
|
|
|
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 ;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
|
|
|
|
|
|
; 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
|
|
|
|
; 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
|
|
jne near .nowinbox
|
|
mov ebx,[GUIcurrentcheatcursloc]
|
|
sub ebx,[GUIcurrentcheatviewloc]
|
|
mov eax,ebx
|
|
lea ebx,[ebx*8]
|
|
sub ebx,eax
|
|
add ebx,22
|
|
DrawGUIWinBox2 7,5,229,7,224
|
|
.nowinbox
|
|
|
|
|
|
; Draw Cheats box
|
|
mov byte[GUItextcolor],223
|
|
mov dword[ccheatnpos],cheatdata
|
|
mov eax,[NumCheats]
|
|
sub eax,[GUIcurrentcheatviewloc]
|
|
dec eax
|
|
mov dword[ccheatnleft],eax
|
|
mov eax,[GUIcurrentcheatviewloc]
|
|
mov ebx,eax
|
|
shl eax,5
|
|
sub eax,ebx
|
|
sub eax,ebx
|
|
sub eax,ebx
|
|
sub eax,ebx
|
|
add [ccheatnpos],eax
|
|
GUIOuttextwin2cheat 12,24 ; Shadow
|
|
GUIOuttextwin2cheat 12,24+7
|
|
GUIOuttextwin2cheat 12,24+7*2
|
|
GUIOuttextwin2cheat 12,24+7*3
|
|
GUIOuttextwin2cheat 12,24+7*4
|
|
GUIOuttextwin2cheat 12,24+7*5
|
|
GUIOuttextwin2cheat 12,24+7*6
|
|
GUIOuttextwin2cheat 12,24+7*7
|
|
GUIOuttextwin2cheat 12,24+7*8
|
|
GUIOuttextwin2cheat 12,24+7*9
|
|
GUIOuttextwin2cheat 12,24+7*10
|
|
GUIOuttextwin2cheat 12,24+7*11
|
|
|
|
mov byte[GUItextcolor],221
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero4
|
|
mov byte[GUItextcolor],222
|
|
.zero4
|
|
mov dword[ccheatnpos],cheatdata
|
|
mov eax,[NumCheats]
|
|
sub eax,[GUIcurrentcheatviewloc]
|
|
dec eax
|
|
mov dword[ccheatnleft],eax
|
|
mov eax,[GUIcurrentcheatviewloc]
|
|
mov ebx,eax
|
|
shl eax,5
|
|
sub eax,ebx
|
|
sub eax,ebx
|
|
sub eax,ebx
|
|
sub eax,ebx
|
|
add [ccheatnpos],eax
|
|
GUIOuttextwin2cheat 11,23 ;Text
|
|
GUIOuttextwin2cheat 11,23+7
|
|
GUIOuttextwin2cheat 11,23+7*2
|
|
GUIOuttextwin2cheat 11,23+7*3
|
|
GUIOuttextwin2cheat 11,23+7*4
|
|
GUIOuttextwin2cheat 11,23+7*5
|
|
GUIOuttextwin2cheat 11,23+7*6
|
|
GUIOuttextwin2cheat 11,23+7*7
|
|
GUIOuttextwin2cheat 11,23+7*8
|
|
GUIOuttextwin2cheat 11,23+7*9
|
|
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
|
|
add byte[GUIWincoladd],3
|
|
.noholda
|
|
GUIDisplayIconWin 7,231,20,GUIIconDataUpArrow
|
|
cmp byte[GUICHold],7
|
|
jne .noholda2
|
|
sub byte[GUIWincoladd],3
|
|
.noholda2
|
|
cmp byte[GUICHold],8
|
|
jne .noholdb
|
|
add byte[GUIWincoladd],3
|
|
.noholdb
|
|
GUIDisplayIconWin 7,231,101,GUIIconDataDownArrow
|
|
cmp byte[GUICHold],8
|
|
jne .noholdb2
|
|
sub byte[GUIWincoladd],3
|
|
.noholdb2
|
|
|
|
|
|
; Draw borders
|
|
mov dword[GUIWincol],148+10
|
|
cmp byte[cwindrawn],1
|
|
jne .noone2
|
|
mov dword[GUIWincol],148+5
|
|
.noone2
|
|
cmp byte[cwindrawn],0
|
|
jne .nozero2
|
|
mov dword[GUIWincol],148
|
|
.nozero2
|
|
mov dl,[GUIWincol]
|
|
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
|
|
DrawGUIWinBox 7,81,129,80,136,dl
|
|
DrawGUIWinBox 7,81,140,80,147,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,4
|
|
DrawGUIWinBox 7,5,109,229,109,dl
|
|
DrawGUIWinBox 7,82,137,172,137,dl
|
|
DrawGUIWinBox 7,82,148,196,148,dl
|
|
mov dl,[GUIWincol]
|
|
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 input boxes
|
|
mov ebx,[GUIcurrentcheatcursloc]
|
|
sub ebx,[GUIcurrentcheatviewloc]
|
|
mov eax,ebx
|
|
lea ebx,[ebx*4]
|
|
add ebx,eax
|
|
add ebx,eax
|
|
add ebx,eax
|
|
add ebx,22
|
|
|
|
mov dl,167 ;Code Box
|
|
cmp dword[GUIcurrentcheatwin],1
|
|
jne .notopibox
|
|
mov dl,226
|
|
cmp byte[GUIWincoladd],0
|
|
je .nocoladd
|
|
inc dl
|
|
.nocoladd
|
|
.notopibox
|
|
DrawGUIWinBox 7,82,129,172,136,dl
|
|
|
|
mov dl,167 ;Descrip. Box
|
|
cmp dword[GUIcurrentcheatwin],2
|
|
jne .nobotibox
|
|
mov dl,226
|
|
cmp byte[GUIWincoladd],0
|
|
je .nocoladd2
|
|
inc dl
|
|
.nocoladd2
|
|
.nobotibox
|
|
DrawGUIWinBox 7,82,140,196,147,dl
|
|
|
|
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,GUICheatTextZ1
|
|
GUIOuttextwin2 7,83,142,GUICheatTextZ2
|
|
|
|
xor eax,eax ; Code for movement of cursor
|
|
mov al,[GUICheatPosA]
|
|
mov byte[GUICheatTextZ1+eax],0
|
|
xor ebx,ebx
|
|
mov bl,[GUICheatPosB]
|
|
mov byte[GUICheatTextZ2+ebx],0
|
|
test byte[GUICCFlash],8
|
|
jnz .nound
|
|
cmp dword[GUIcurrentcheatwin],1
|
|
je .win1
|
|
cmp dword[GUIcurrentcheatwin],2
|
|
je .win2
|
|
jmp .nound
|
|
.win1
|
|
mov byte[GUICheatTextZ1+eax],'_'
|
|
jmp .nound
|
|
.win2
|
|
mov byte[GUICheatTextZ2+ebx],'_'
|
|
.nound
|
|
|
|
|
|
; Checkbox
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[AutoLoadCht],1
|
|
jne .nocheckbox
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox
|
|
GUIDisplayIconWin 7,11,186,[GUITemp]
|
|
ret
|
|
|
|
SECTION .data
|
|
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'
|
|
GUICheatTextZ5 db ' ',0
|
|
|
|
|
|
SECTION .bss
|
|
GUICheatPosA resb 1
|
|
GUICheatPosB resb 1
|
|
GUICStA resd 3
|
|
GUIcurrentcheatviewloc resd 1
|
|
GUIcurrentcheatcursloc resd 1
|
|
GUIcurrentcheatwin resd 1
|
|
ccheatnpos resd 1
|
|
ccheatnleft resd 1
|
|
SECTION .text
|
|
|
|
|
|
DrawWindowSearch:
|
|
GUIDrawWindowBox 13,GUISearchDisp
|
|
ret
|
|
|
|
%macro TextWindowMacro 4
|
|
sub byte[GUItextcolor],15
|
|
GUIOuttextwin2 %1,%2+1,%3+1,%4
|
|
add byte[GUItextcolor],15
|
|
GUIOuttextwin2 %1,%2,%3,%4
|
|
%endmacro
|
|
|
|
CSRemoveFlash:
|
|
.loop
|
|
cmp byte[esi],'_'
|
|
je .flash
|
|
cmp byte[esi],0
|
|
je .notflash
|
|
inc esi
|
|
jmp .loop
|
|
.flash
|
|
mov byte[esi],0
|
|
.notflash
|
|
ret
|
|
|
|
CSAddFlash:
|
|
.loop
|
|
cmp byte[esi],'_'
|
|
je .flash
|
|
cmp byte[esi],0
|
|
je .notflash
|
|
inc esi
|
|
jmp .loop
|
|
.notflash
|
|
mov byte[esi],'_'
|
|
mov byte[esi+1],0
|
|
.flash
|
|
ret
|
|
|
|
DisplayGUISearch:
|
|
jmp .startcheat
|
|
call DrawWindowSearch
|
|
mov byte[GUItextcolor],217
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero
|
|
mov byte[GUItextcolor],211
|
|
.zero
|
|
sub byte[GUItextcolor],15
|
|
GUIOuttextwin2 13,6,16,GUISrcText1
|
|
GUIOuttextwin2 13,6,26,GUISrcText2
|
|
GUIOuttextwin2 13,6,36,GUISrcText3
|
|
add byte[GUItextcolor],15
|
|
GUIOuttextwin2 13,5,15,GUISrcText1
|
|
GUIOuttextwin2 13,5,25,GUISrcText2
|
|
GUIOuttextwin2 13,5,35,GUISrcText3
|
|
ret
|
|
; DrawGUIButton 13,197,30,239,41,GUICSrcText8+2,40,0,0
|
|
ret
|
|
.startcheat
|
|
cmp byte[CheatWinMode],1
|
|
je near Incheatmode
|
|
cmp byte[CheatWinMode],2
|
|
je near Cheatmodeview
|
|
cmp byte[CheatWinMode],3
|
|
je near Cheatmodeadd
|
|
|
|
mov dword[GUIwinsizex+13*4],170
|
|
mov dword[GUIwinsizey+13*4],150
|
|
call DrawWindowSearch
|
|
mov al,[GUIWincol]
|
|
mov byte[GUItextcolor],al
|
|
GUIOuttextwin2 13,6,16,GUICSrcText1
|
|
GUIOuttextwin2 13,6,101,GUICSrcText8
|
|
mov byte[GUItextcolor],163
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero3
|
|
mov byte[GUItextcolor],164
|
|
.zero3
|
|
GUIOuttextwin2 13,5,15,GUICSrcText1
|
|
GUIOuttextwin2 13,5,100,GUICSrcText8
|
|
|
|
mov byte[GUItextcolor],217
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero2
|
|
mov byte[GUItextcolor],211
|
|
.zero2
|
|
TextWindowMacro 13,25,30,GUICSrcText2
|
|
TextWindowMacro 13,25,40,GUICSrcText3
|
|
TextWindowMacro 13,25,50,GUICSrcText4
|
|
TextWindowMacro 13,25,60,GUICSrcText5
|
|
TextWindowMacro 13,25,75,GUICSrcText6
|
|
TextWindowMacro 13,25,85,GUICSrcText7
|
|
TextWindowMacro 13,25,115,GUICSrcText9
|
|
TextWindowMacro 13,25,125,GUICSrcTextA
|
|
DrawGUIButton 13,95,140,140,152,GUICSrcTextB,50,0,1
|
|
GUIDisplayButtonHole 13,11,28,byte[CheatSrcByteSize],0
|
|
GUIDisplayButtonHole 13,11,38,byte[CheatSrcByteSize],1
|
|
GUIDisplayButtonHole 13,11,48,byte[CheatSrcByteSize],2
|
|
GUIDisplayButtonHole 13,11,58,byte[CheatSrcByteSize],3
|
|
GUIDisplayButtonHole 13,11,73,byte[CheatSrcByteBase],0
|
|
GUIDisplayButtonHole 13,11,83,byte[CheatSrcByteBase],1
|
|
GUIDisplayButtonHole 13,11,113,byte[CheatSrcSearchType],0
|
|
GUIDisplayButtonHole 13,11,123,byte[CheatSrcSearchType],1
|
|
ret
|
|
Incheatmode:
|
|
mov dword[GUIwinsizex+13*4],180
|
|
mov dword[GUIwinsizey+13*4],150
|
|
call DrawWindowSearch
|
|
mov byte[GUItextcolor],217
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero2
|
|
mov byte[GUItextcolor],211
|
|
.zero2
|
|
cmp byte[CheatSearchStatus],1
|
|
jne near CheatSearching
|
|
TextWindowMacro 13,5,20,GUICSrcTextM
|
|
TextWindowMacro 13,5,30,GUICSrcTextN
|
|
TextWindowMacro 13,5,40,GUICSrcTextO
|
|
TextWindowMacro 13,5,50,GUICSrcTextP
|
|
jmp DisplayChtSrcRes.nosearch
|
|
CheatSearching:
|
|
cmp byte[CheatSrcSearchType],1
|
|
je near CheatSearchingComp
|
|
|
|
; Exact Value Search
|
|
TextWindowMacro 13,5,20,GUICSrcTextD
|
|
DrawGUIWinBox 13,10,40,80,47,167
|
|
; Draw border
|
|
mov dword[GUIWincol],148+10
|
|
cmp byte[cwindrawn],1
|
|
jne .noone2
|
|
mov dword[GUIWincol],148+5
|
|
.noone2
|
|
cmp byte[cwindrawn],0
|
|
jne .nozero2
|
|
mov dword[GUIWincol],148
|
|
.nozero2
|
|
mov dl,[GUIWincol]
|
|
DrawGUIWinBox 13,10,39,80,39,dl ; 0,-1,0,-1
|
|
mov dl,[GUIWincol]
|
|
add dl,1
|
|
DrawGUIWinBox 13,9,40,8,47,dl ; -1,0,-2,0
|
|
mov dl,[GUIWincol]
|
|
add dl,4
|
|
DrawGUIWinBox 13,10,48,80,48,dl ; 0,1,0,1
|
|
mov dl,[GUIWincol]
|
|
add dl,3
|
|
DrawGUIWinBox 13,82,40,81,47,dl ; 2,0,1,0
|
|
|
|
test byte[GUICCFlash],8
|
|
jnz .nound
|
|
mov esi,CSInputDisplay
|
|
call CSRemoveFlash
|
|
.nound
|
|
|
|
mov byte[GUItextcolor],223
|
|
cmp byte[CSOverValue],1
|
|
jne .notdark
|
|
mov byte[GUItextcolor],202
|
|
.notdark
|
|
GUIOuttextwin2 13,13,42,CSInputDisplay
|
|
mov byte[GUItextcolor],221
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero4
|
|
mov byte[GUItextcolor],222
|
|
.zero4
|
|
cmp byte[CSOverValue],1
|
|
jne .notdark2
|
|
mov byte[GUItextcolor],207
|
|
.notdark2
|
|
GUIOuttextwin2 13,12,41,CSInputDisplay
|
|
mov byte[GUItextcolor],217
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero2
|
|
mov byte[GUItextcolor],211
|
|
.zero2
|
|
TextWindowMacro 13,5,65,GUICSrcTextT
|
|
|
|
mov esi,CSInputDisplay
|
|
call CSAddFlash
|
|
|
|
xor eax,eax
|
|
mov al,[CheatSrcByteSize]
|
|
mov eax,[SrcMask+eax*4]
|
|
mov esi,GUICSrcTextQ
|
|
cmp byte[CheatSrcByteBase],1
|
|
je .hex
|
|
call convertnum
|
|
jmp .dec
|
|
.hex
|
|
xor ecx,ecx
|
|
mov cl,[CheatSrcByteSize]
|
|
inc ecx
|
|
call converthex
|
|
.dec
|
|
TextWindowMacro 13,71,65,GUICSrcTextQ
|
|
jmp DisplayChtSrcRes
|
|
|
|
CheatSearchingComp:
|
|
; Comparative search
|
|
mov al,[GUIWincol]
|
|
mov byte[GUItextcolor],al
|
|
GUIOuttextwin2 13,6,16,GUICSrcTextE
|
|
mov byte[GUItextcolor],163
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero3
|
|
mov byte[GUItextcolor],164
|
|
.zero3
|
|
GUIOuttextwin2 13,5,15,GUICSrcTextE
|
|
mov byte[GUItextcolor],217
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero2
|
|
mov byte[GUItextcolor],211
|
|
.zero2
|
|
TextWindowMacro 13,25,35,GUICSrcTextF
|
|
TextWindowMacro 13,25,45,GUICSrcTextG
|
|
TextWindowMacro 13,25,55,GUICSrcTextH
|
|
TextWindowMacro 13,25,65,GUICSrcTextHb
|
|
GUIDisplayButtonHole 13,11,33,byte[CheatCompareValue],0
|
|
GUIDisplayButtonHole 13,11,43,byte[CheatCompareValue],1
|
|
GUIDisplayButtonHole 13,11,53,byte[CheatCompareValue],2
|
|
GUIDisplayButtonHole 13,11,63,byte[CheatCompareValue],3
|
|
jmp DisplayChtSrcRes
|
|
|
|
|
|
FindChtSrcRes:
|
|
inc edi
|
|
; Calculate search results
|
|
mov eax,dword[vidbuffer]
|
|
add eax,129600+65536*2
|
|
mov ecx,16384
|
|
xor esi,esi
|
|
xor ebx,ebx
|
|
.searchloop
|
|
mov dl,[eax]
|
|
mov dh,8
|
|
.sloop2
|
|
test dl,1
|
|
jz .notset
|
|
inc ebx
|
|
dec edi
|
|
jz .found
|
|
.notset
|
|
inc esi
|
|
shr dl,1
|
|
dec dh
|
|
jnz .sloop2
|
|
inc eax
|
|
dec ecx
|
|
jnz .searchloop
|
|
mov eax,ebx
|
|
ret
|
|
.found
|
|
mov [CSStartEntry],esi
|
|
jmp .notset
|
|
|
|
DisplayChtSrcRes:
|
|
DrawGUIButton 13,120,140,170,152,GUICSrcTextI,53,0,1
|
|
.nosearch
|
|
DrawGUIButton 13,10,140,60,152,GUICSrcTextJ,51,0,1
|
|
DrawGUIButton 13,70,140,110,152,GUICSrcTextL,52,0,1
|
|
xor edi,edi
|
|
call FindChtSrcRes
|
|
mov esi,GUICSrcTextQ
|
|
call convertnum
|
|
TextWindowMacro 13,12,125,GUICSrcTextK
|
|
TextWindowMacro 13,97,125,GUICSrcTextQ
|
|
mov dword[GUIcurrentchtsrcviewloc],0
|
|
mov dword[GUIcurrentchtsrccursloc],0
|
|
ret
|
|
|
|
Cheatmodeview:
|
|
mov byte[GUICSrcTextS+12],32
|
|
cmp byte[CheatSrcByteSize],3
|
|
jne .yesprev
|
|
cmp byte[CheatSrcByteBase],0
|
|
jne .yesprev
|
|
mov byte[GUICSrcTextS+12],0
|
|
.yesprev
|
|
|
|
mov dword[GUIwinsizex+13*4],185
|
|
mov dword[GUIwinsizey+13*4],150
|
|
call DrawWindowSearch
|
|
mov byte[GUItextcolor],217
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero
|
|
mov byte[GUItextcolor],211
|
|
.zero
|
|
TextWindowMacro 13,10,12,GUICSrcTextS
|
|
DrawGUIWinBox 13,5,20,171,108,167
|
|
|
|
; Draw border
|
|
mov dword[GUIWincol],148+10
|
|
cmp byte[cwindrawn],1
|
|
jne .noone2
|
|
mov dword[GUIWincol],148+5
|
|
.noone2
|
|
cmp byte[cwindrawn],0
|
|
jne .nozero2
|
|
mov dword[GUIWincol],148
|
|
.nozero2
|
|
mov dl,[GUIWincol]
|
|
DrawGUIWinBox 13,5,19,171,19,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,1
|
|
DrawGUIWinBox 13,4,20,3,108,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,4
|
|
DrawGUIWinBox 13,5,109,171,109,dl
|
|
|
|
mov edi,[GUIcurrentchtsrcviewloc]
|
|
call FindChtSrcRes
|
|
mov [NumCheatSrc],eax
|
|
mov dword[ccheatnpos],esi
|
|
; Display Window Contents
|
|
|
|
mov byte[GUItextcolor],223
|
|
mov eax,[NumCheatSrc]
|
|
sub eax,[GUIcurrentchtsrcviewloc]
|
|
cmp eax,12
|
|
jbe .notof
|
|
mov eax,12
|
|
.notof
|
|
mov dword[ccheatnleft],eax
|
|
mov dword[ccheatnleftb],eax
|
|
|
|
mov dword[CheatSearchYPos],24
|
|
mov dword[CheatSearchXPos],10
|
|
mov eax,[CSStartEntry]
|
|
mov [CSCurEntry],eax
|
|
|
|
cmp dword[ccheatnleft],0
|
|
je near .noentry
|
|
mov byte[CheatLooped],0
|
|
mov ebx,[GUIcurrentchtsrccursloc]
|
|
sub ebx,[GUIcurrentchtsrcviewloc]
|
|
mov [curentryleft],ebx
|
|
mov eax,ebx
|
|
lea ebx,[ebx*8]
|
|
sub ebx,eax
|
|
add ebx,22
|
|
DrawGUIWinBox2 13,5,171,7,224
|
|
.nextdisplay
|
|
cmp dword[curentryleft],0
|
|
jne .notzero
|
|
mov eax,[CSCurEntry]
|
|
mov [curentryval],eax
|
|
.notzero
|
|
dec dword[curentryleft]
|
|
|
|
mov esi,GUICSrcTextQ
|
|
mov ecx,3
|
|
mov eax,[CSCurEntry]
|
|
add eax,7E0000h
|
|
call converthex
|
|
GUIOuttextwin2 13,[CheatSearchXPos],[CheatSearchYPos],GUICSrcTextQ
|
|
|
|
mov esi,GUICSrcTextQ
|
|
mov ebx,[wramdata]
|
|
add ebx,[CSCurEntry]
|
|
mov eax,[ebx]
|
|
cmp byte[CheatSrcByteBase],0
|
|
je .dec
|
|
xor ecx,ecx
|
|
mov cl,[CheatSrcByteSize]
|
|
inc ecx
|
|
call converthex
|
|
jmp .hex
|
|
.dec
|
|
xor ebx,ebx
|
|
mov bl,[CheatSrcByteSize]
|
|
and eax,[SrcMask+ebx*4]
|
|
call convertnum
|
|
.hex
|
|
add dword[CheatSearchXPos],42
|
|
GUIOuttextwin2 13,[CheatSearchXPos],[CheatSearchYPos],GUICSrcTextQ
|
|
|
|
add dword[CheatSearchXPos],60
|
|
cmp byte[GUICSrcTextS+12],0
|
|
je near .noprevious
|
|
mov esi,GUICSrcTextQ
|
|
mov ebx,dword[vidbuffer]
|
|
add ebx,129600
|
|
add ebx,[CSCurEntry]
|
|
mov eax,[ebx]
|
|
cmp byte[CheatSrcByteBase],0
|
|
je .decb
|
|
xor ecx,ecx
|
|
mov cl,[CheatSrcByteSize]
|
|
inc ecx
|
|
call converthex
|
|
jmp .hexb
|
|
.decb
|
|
xor ebx,ebx
|
|
mov bl,[CheatSrcByteSize]
|
|
and eax,[SrcMask+ebx*4]
|
|
call convertnum
|
|
.hexb
|
|
GUIOuttextwin2 13,[CheatSearchXPos],[CheatSearchYPos],GUICSrcTextQ
|
|
.noprevious
|
|
sub dword[CheatSearchXPos],102
|
|
add dword[CheatSearchYPos],7
|
|
; Search for next entry
|
|
.nextentry
|
|
inc dword[CSCurEntry]
|
|
mov eax,[CSCurEntry]
|
|
mov ecx,eax
|
|
and ecx,7
|
|
mov edx,1
|
|
shr eax,3
|
|
shl edx,cl
|
|
add eax,dword[vidbuffer]
|
|
add eax,129600+65536*2
|
|
test byte[eax],dl
|
|
jz .nextentry
|
|
dec dword[ccheatnleft]
|
|
jnz near .nextdisplay
|
|
mov byte[GUItextcolor],221
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero4
|
|
mov byte[GUItextcolor],222
|
|
.zero4
|
|
mov dword[CheatSearchYPos],23
|
|
mov dword[CheatSearchXPos],11
|
|
mov eax,[CSStartEntry]
|
|
mov [CSCurEntry],eax
|
|
mov eax,dword[ccheatnleftb]
|
|
mov dword[ccheatnleft],eax
|
|
inc byte[CheatLooped]
|
|
cmp byte[CheatLooped],2
|
|
jne near .nextdisplay
|
|
.noentry
|
|
|
|
; win#,X,Y start, %4-List Loc, %5-List size, %6-Screen size, %7-Bar Size
|
|
DrawSlideBarWin 13,173,28,[GUIcurrentchtsrcviewloc],[NumCheatSrc],12,73,GUICSStA
|
|
cmp byte[GUICHold],11
|
|
jne .noholda
|
|
add byte[GUIWincoladd],3
|
|
.noholda
|
|
GUIDisplayIconWin 13,173,20,GUIIconDataUpArrow
|
|
cmp byte[GUICHold],11
|
|
jne .noholda2
|
|
sub byte[GUIWincoladd],3
|
|
.noholda2
|
|
cmp byte[GUICHold],12
|
|
jne .noholdb
|
|
add byte[GUIWincoladd],3
|
|
.noholdb
|
|
GUIDisplayIconWin 13,173,101,GUIIconDataDownArrow
|
|
cmp byte[GUICHold],12
|
|
jne .noholdb2
|
|
sub byte[GUIWincoladd],3
|
|
.noholdb2
|
|
mov byte[GUItextcolor],217
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero3
|
|
mov byte[GUItextcolor],211
|
|
.zero3
|
|
DrawGUIButton 13,70,140,130,152,GUICSrcTextR,54,0,1
|
|
DrawGUIButton 13,140,140,180,152,GUICSrcTextU,55,0,1
|
|
ret
|
|
|
|
Cheatmodeadd:
|
|
mov dword[GUIwinsizex+13*4],170
|
|
mov dword[GUIwinsizey+13*4],165
|
|
call DrawWindowSearch
|
|
|
|
mov byte[GUItextcolor],217
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero3
|
|
mov byte[GUItextcolor],211
|
|
.zero3
|
|
|
|
TextWindowMacro 13,5,20,GUICSrcTextV
|
|
TextWindowMacro 13,5,45,GUICSrcTextW
|
|
TextWindowMacro 13,5,70,GUICSrcTextX
|
|
TextWindowMacro 13,22,143,GUICSrcTextY
|
|
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[CheatUpperByteOnly],1
|
|
jne .nocheck
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheck
|
|
GUIDisplayIconWin 13,8,139,[GUITemp]
|
|
|
|
DrawGUIWinBox 13,10,30,80,37,167
|
|
DrawGUIWinBox 13,10,55,126,62,167
|
|
DrawGUIWinBox 13,10,80,80,120,167
|
|
; Draw border
|
|
mov dword[GUIWincol],148+10
|
|
cmp byte[cwindrawn],1
|
|
jne .noone2
|
|
mov dword[GUIWincol],148+5
|
|
.noone2
|
|
cmp byte[cwindrawn],0
|
|
jne .nozero2
|
|
mov dword[GUIWincol],148
|
|
.nozero2
|
|
mov dl,[GUIWincol]
|
|
DrawGUIWinBox 13,10,29,80,29,dl ; 0,-1,0,-1
|
|
DrawGUIWinBox 13,10,54,126,54,dl ; 0,-1,0,-1
|
|
DrawGUIWinBox 13,10,79,80,79,dl ; 0,-1,0,-1
|
|
mov dl,[GUIWincol]
|
|
add dl,1
|
|
DrawGUIWinBox 13,9,30,8,37,dl ; -1,0,-2,0
|
|
DrawGUIWinBox 13,9,55,8,62,dl ; -1,0,-2,0
|
|
DrawGUIWinBox 13,9,80,8,120,dl ; -1,0,-2,0
|
|
mov dl,[GUIWincol]
|
|
add dl,4
|
|
DrawGUIWinBox 13,10,38,80,38,dl ; 0,1,0,1
|
|
DrawGUIWinBox 13,10,63,126,63,dl ; 0,1,0,1
|
|
DrawGUIWinBox 13,10,121,80,121,dl ; 0,1,0,1
|
|
mov dl,[GUIWincol]
|
|
add dl,3
|
|
DrawGUIWinBox 13,82,30,81,37,dl ; 2,0,1,0
|
|
DrawGUIWinBox 13,128,55,127,62,dl ; 2,0,1,0
|
|
DrawGUIWinBox 13,82,80,81,120,dl ; 2,0,1,0
|
|
|
|
DrawGUIButton 13,60,155,120,167,GUICSrcTextR,56,0,1
|
|
DrawGUIButton 13,130,155,160,167,GUICSrcTextU,57,0,1
|
|
|
|
TextWindowMacro 13,5,130,GUICSrcTextT
|
|
xor eax,eax
|
|
mov al,[CheatSrcByteSize]
|
|
mov eax,[SrcMask+eax*4]
|
|
mov esi,GUICSrcTextQ
|
|
cmp byte[CheatSrcByteBase],1
|
|
je .hex
|
|
call convertnum
|
|
jmp .dec
|
|
.hex
|
|
xor ecx,ecx
|
|
mov cl,[CheatSrcByteSize]
|
|
inc ecx
|
|
call converthex
|
|
.dec
|
|
TextWindowMacro 13,71,130,GUICSrcTextQ
|
|
|
|
cmp byte[CurCStextpos],0
|
|
jne near .nofirstbox
|
|
test byte[GUICCFlash],8
|
|
jnz .nound
|
|
.nofirstbox
|
|
mov esi,CSInputDisplay
|
|
call CSRemoveFlash
|
|
.nound
|
|
mov byte[GUItextcolor],223
|
|
cmp byte[CSOverValue],1
|
|
jne .notdark
|
|
mov byte[GUItextcolor],202
|
|
.notdark
|
|
GUIOuttextwin2 13,13,32,CSInputDisplay
|
|
mov byte[GUItextcolor],221
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero4
|
|
mov byte[GUItextcolor],222
|
|
.zero4
|
|
cmp byte[CSOverValue],1
|
|
jne .notdark2
|
|
mov byte[GUItextcolor],207
|
|
.notdark2
|
|
GUIOuttextwin2 13,12,31,CSInputDisplay
|
|
mov esi,CSInputDisplay
|
|
call CSAddFlash
|
|
|
|
cmp byte[CurCStextpos],1
|
|
jne .noundb
|
|
test byte[GUICCFlash],8
|
|
jnz .noundb
|
|
mov esi,CSDescDisplay
|
|
call CSAddFlash
|
|
.noundb
|
|
mov byte[GUItextcolor],223
|
|
GUIOuttextwin2 13,13,57,CSDescDisplay
|
|
mov byte[GUItextcolor],221
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero4b
|
|
mov byte[GUItextcolor],222
|
|
.zero4b
|
|
GUIOuttextwin2 13,12,56,CSDescDisplay
|
|
mov esi,CSDescDisplay
|
|
call CSRemoveFlash
|
|
|
|
cmp byte[CSOverValue],1
|
|
je near .nodisplay
|
|
cmp byte[CSInputDisplay],'_'
|
|
je near .nodisplay
|
|
|
|
mov dword[CheatSearchYPos],83
|
|
mov eax,[curentryval]
|
|
mov [curaddrvalcs],eax
|
|
mov eax,[CSCurValue]
|
|
mov [curvaluecs],eax
|
|
xor ecx,ecx
|
|
mov cl,[CheatSrcByteSize]
|
|
inc cl
|
|
cmp byte[CheatUpperByteOnly],0
|
|
je .cspardisploop
|
|
mov cl,1
|
|
.cspardispagain
|
|
cmp dword[curvaluecs],0FFh
|
|
jbe .cspardisploop
|
|
shr dword[curvaluecs],8
|
|
inc dword[curaddrvalcs]
|
|
jmp .cspardispagain
|
|
.cspardisploop
|
|
push ecx
|
|
mov esi,GUICSrcTextQ
|
|
mov ecx,3
|
|
mov eax,[curaddrvalcs]
|
|
add eax,7E0000h
|
|
call converthex
|
|
mov esi,GUICSrcTextQ+6
|
|
mov ecx,1
|
|
mov al,[curvaluecs]
|
|
call converthex
|
|
shr dword[curvaluecs],8
|
|
mov byte[GUItextcolor],223
|
|
inc dword[CheatSearchYPos]
|
|
GUIOuttextwin2 13,13,[CheatSearchYPos],GUICSrcTextQ
|
|
dec dword[CheatSearchYPos]
|
|
mov byte[GUItextcolor],221
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero4c
|
|
mov byte[GUItextcolor],222
|
|
.zero4c
|
|
GUIOuttextwin2 13,12,[CheatSearchYPos],GUICSrcTextQ
|
|
add dword[CheatSearchYPos],10
|
|
inc dword[curaddrvalcs]
|
|
pop ecx
|
|
dec ecx
|
|
jnz near .cspardisploop
|
|
|
|
.nodisplay
|
|
ret
|
|
|
|
SECTION .bss
|
|
CheatWinMode resb 1
|
|
CheatSearchStatus resb 1
|
|
CheatCompareValue resd 1
|
|
NumCheatSrc resd 1
|
|
GUIcurrentchtsrcviewloc resd 1
|
|
GUIcurrentchtsrccursloc resd 1
|
|
CSStartEntry resd 1
|
|
CSCurEntry resd 1
|
|
CheatSearchXPos resd 1
|
|
CheatSearchYPos resd 1
|
|
CheatLooped resd 1
|
|
ccheatnleftb resd 1
|
|
CurCStextpos resd 1
|
|
|
|
SECTION .data
|
|
SrcMask dd 0FFh,0FFFFh,0FFFFFFh,0FFFFFFFFh
|
|
CSInputDisplay db '_',0,' ',0
|
|
CSDescDisplay db ' ',0,0
|
|
|
|
SECTION .bss
|
|
curentryval resd 1
|
|
curentryleft resd 1
|
|
curaddrvalcs resd 1
|
|
curvaluecs resd 1
|
|
|
|
GUICSStA resd 3
|
|
|
|
SECTION .data
|
|
GUISrcText1 db 'CHEAT SEARCH',0
|
|
GUISrcText2 db 'HAS NOT BEEN',0
|
|
GUISrcText3 db 'IMPLEMENTED YET',0
|
|
GUICSrcText1 db 'SELECT SIZE AND FORMAT:',0
|
|
GUICSrcText2 db '1 BYTE [0..255]',0
|
|
GUICSrcText3 db '2 BYTES [0..65535]',0
|
|
GUICSrcText4 db '3 BYTES [0..16777215]',0
|
|
GUICSrcText5 db '4 BYTES [0..4294967295]',0
|
|
GUICSrcText6 db 'DEC (BASE 10)',0
|
|
GUICSrcText7 db 'HEX (BASE 16)',0
|
|
GUICSrcText8 db 'SELECT SEARCH TYPE:',0
|
|
GUICSrcText9 db 'EXACT VALUE SEARCH',0
|
|
GUICSrcTextA db 'COMPARATIVE SEARCH',0
|
|
GUICSrcTextB db 'START',0
|
|
GUICSrcTextD db 'ENTER VALUE:',0
|
|
GUICSrcTextE db 'SELECT COMPARISON:',0
|
|
GUICSrcTextF db 'NEW VALUE IS > OLD VALUE',0
|
|
GUICSrcTextG db 'NEW VALUE IS < OLD VALUE',0
|
|
GUICSrcTextH db 'NEW VALUE IS = OLD VALUE',0
|
|
GUICSrcTextHb db 'NEW VALUE IS != OLD VALUE',0
|
|
GUICSrcTextI db 'SEARCH',0
|
|
GUICSrcTextJ db 'RESTART',0
|
|
GUICSrcTextK db '# OF RESULTS:',0
|
|
GUICSrcTextL db 'VIEW',0
|
|
GUICSrcTextQ db ' ',0
|
|
GUICSrcTextM db 'NOW RETURN TO YOUR GAME',0
|
|
GUICSrcTextN db 'AND COME BACK WHEN ',0
|
|
GUICSrcTextO db 'THE NEXT SEARCH',0
|
|
GUICSrcTextP db 'SHOULD BE PROCESSED',0
|
|
GUICSrcTextR db 'RETURN',0
|
|
GUICSrcTextS db 'ADDR VALUE PVALUE',0
|
|
GUICSrcTextT db 'MAX VALUE:',0
|
|
GUICSrcTextU db 'ADD',0
|
|
GUICSrcTextV db 'ENTER NEW VALUE:',0
|
|
GUICSrcTextW db 'ENTER CHEAT DESCRIPTION:',0
|
|
GUICSrcTextX db 'PAR CODE EQUIVALENT:',0
|
|
GUICSrcTextY db 'USE ONLY UPPER BYTE',0
|
|
|
|
SECTION .bss
|
|
CCursLoc resd 1
|
|
CViewLoc resd 1
|
|
NViewLoc resd 1
|
|
TViewLoc resd 1
|
|
|
|
SECTION .text
|
|
|
|
DisplayNetOptns:
|
|
ret
|
|
|
|
SECTION .bss
|
|
NEWSYM GUINCStA, resd 3
|
|
FileNameMod resb 512
|
|
CurCStringPos resd 1
|
|
|
|
SECTION .text
|
|
|
|
DisplayGameOptns:
|
|
; Key redefinition for :
|
|
; Sound Channels 0 .. 7, Save/Select/Load States, Fast Forward
|
|
; State Selection 0 .. 9
|
|
; Exit, Load, Reset, BG Disables, Reset, Windowing, New Gfx, OffsetMode
|
|
GUIDrawWindowBox 9,GUIGameDisp
|
|
|
|
; Draw Shadows
|
|
mov al,[GUIWincol]
|
|
mov [GUIGameOptnsColA],al
|
|
mov byte[GUIGameOptnsColB],202
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero3
|
|
mov byte[GUIGameOptnsColB],196
|
|
.zero3
|
|
mov al,byte[GUIGameOptnsColA]
|
|
mov byte[GUItextcolor],al
|
|
GUIOuttextwin2 9,6,16,GUIGameOptnsText1
|
|
mov al,byte[GUIGameOptnsColB]
|
|
mov byte[GUItextcolor],al
|
|
mov byte[GUIGameOptnsText2+2],'1'
|
|
GUIOuttextwin2 9,9,25,GUIGameOptnsText2
|
|
mov byte[GUIGameOptnsText2+2],'2'
|
|
GUIOuttextwin2 9,9+45,25,GUIGameOptnsText2
|
|
mov byte[GUIGameOptnsText2+2],'3'
|
|
GUIOuttextwin2 9,9+90,25,GUIGameOptnsText2
|
|
mov byte[GUIGameOptnsText2+2],'4'
|
|
GUIOuttextwin2 9,9+135,25,GUIGameOptnsText2
|
|
GUIOuttextwin2 9,9+180,25,GUIGameOptnsText2a
|
|
mov al,byte[GUIGameOptnsColA]
|
|
mov byte[GUItextcolor],al
|
|
GUIOuttextwin2 9,6,34,GUIGameOptnsText3
|
|
mov al,byte[GUIGameOptnsColB]
|
|
mov byte[GUItextcolor],al
|
|
mov byte[GUIGameOptnsText4+2],'1'
|
|
GUIOuttextwin2 9,9,43,GUIGameOptnsText4
|
|
mov byte[GUIGameOptnsText4+2],'2'
|
|
GUIOuttextwin2 9,9+45,43,GUIGameOptnsText4
|
|
mov byte[GUIGameOptnsText4+2],'3'
|
|
GUIOuttextwin2 9,9+45*2,43,GUIGameOptnsText4
|
|
mov byte[GUIGameOptnsText4+2],'4'
|
|
GUIOuttextwin2 9,9+45*3,43,GUIGameOptnsText4
|
|
mov byte[GUIGameOptnsText4+2],'5'
|
|
GUIOuttextwin2 9,9,52,GUIGameOptnsText4
|
|
mov byte[GUIGameOptnsText4+2],'6'
|
|
GUIOuttextwin2 9,9+45,52,GUIGameOptnsText4
|
|
mov byte[GUIGameOptnsText4+2],'7'
|
|
GUIOuttextwin2 9,9+45*2,52,GUIGameOptnsText4
|
|
mov byte[GUIGameOptnsText4+2],'8'
|
|
GUIOuttextwin2 9,9+45*3,52,GUIGameOptnsText4
|
|
mov al,byte[GUIGameOptnsColA]
|
|
mov byte[GUItextcolor],al
|
|
mov al,byte[GUIGameOptnsColB]
|
|
mov byte[GUItextcolor],al
|
|
mov al,byte[GUIGameOptnsColA]
|
|
mov byte[GUItextcolor],al
|
|
GUIOuttextwin2 9,6,61,GUIGameOptnsText5
|
|
mov al,byte[GUIGameOptnsColB]
|
|
mov byte[GUItextcolor],al
|
|
GUIOuttextwin2 9,9,72,GUIGameOptnsText6
|
|
GUIOuttextwin2 9,9+52,72,GUIGameOptnsText7
|
|
GUIOuttextwin2 9,9+109,72,GUIGameOptnsText8
|
|
GUIOuttextwin2 9,9+160,72,GUIGameOptnsText9
|
|
GUIOuttextwin2 9,9,82,GUIGameOptnsTextA
|
|
GUIOuttextwin2 9,9+52,82,GUIGameOptnsTextB
|
|
GUIOuttextwin2 9,137,82,GUIGameOptnsTextC
|
|
mov al,byte[GUIGameOptnsColA]
|
|
mov byte[GUItextcolor],al
|
|
GUIOuttextwin2 9,6,93,GUIGameOptnsTextD
|
|
mov al,byte[GUIGameOptnsColB]
|
|
mov byte[GUItextcolor],al
|
|
GUIOuttextwin2 9,9,102,GUIGameOptnsTextE
|
|
GUIOuttextwin2 9,9,112,GUIGameOptnsTextF
|
|
GUIOuttextwin2 9,9,122,GUIGameOptnsTextG
|
|
GUIOuttextwin2 9,9,132,GUIGameOptnsTextH
|
|
GUIOuttextwin2 9,9,142,GUIGameOptnsTextI
|
|
GUIOuttextwin2 9,9,152,GUIGameOptnsTextJ
|
|
; GUIOuttextwin2 9,9,162,GUIGameOptnsTextK
|
|
GUIOuttextwin2 9,9,172,GUIGameOptnsTextL
|
|
; GUIOuttextwin2 9,109,102,GUIGameOptnsTextEa
|
|
; GUIOuttextwin2 9,109,112,GUIGameOptnsTextFa
|
|
GUIOuttextwin2 9,109,122,GUIGameOptnsTextGa
|
|
GUIOuttextwin2 9,109,132,GUIGameOptnsTextHa
|
|
GUIOuttextwin2 9,109,142,GUIGameOptnsTextIa
|
|
GUIOuttextwin2 9,109,152,GUIGameOptnsTextJa
|
|
GUIOuttextwin2 9,109,162,GUIGameOptnsTextKa
|
|
GUIOuttextwin2 9,109,172,GUIGameOptnsTextLa
|
|
mov byte[GUIGameOptnsColA],163
|
|
mov byte[GUIGameOptnsColB],217
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero
|
|
mov byte[GUIGameOptnsColA],164
|
|
mov byte[GUIGameOptnsColB],211
|
|
.zero
|
|
mov al,byte[GUIGameOptnsColA]
|
|
mov byte[GUItextcolor],al
|
|
GUIOuttextwin2 9,5,15,GUIGameOptnsText1
|
|
mov al,byte[GUIGameOptnsColB]
|
|
mov byte[GUItextcolor],al
|
|
mov byte[GUIGameOptnsText2+2],'1'
|
|
GUIOuttextwin2 9,8,24,GUIGameOptnsText2
|
|
mov byte[GUIGameOptnsText2+2],'2'
|
|
GUIOuttextwin2 9,8+45,24,GUIGameOptnsText2
|
|
mov byte[GUIGameOptnsText2+2],'3'
|
|
GUIOuttextwin2 9,8+90,24,GUIGameOptnsText2
|
|
mov byte[GUIGameOptnsText2+2],'4'
|
|
GUIOuttextwin2 9,8+135,24,GUIGameOptnsText2
|
|
GUIOuttextwin2 9,8+180,24,GUIGameOptnsText2a
|
|
mov al,byte[GUIGameOptnsColA]
|
|
mov byte[GUItextcolor],al
|
|
GUIOuttextwin2 9,5,33,GUIGameOptnsText3
|
|
mov al,byte[GUIGameOptnsColB]
|
|
mov byte[GUItextcolor],al
|
|
mov byte[GUIGameOptnsText4+2],'1'
|
|
GUIOuttextwin2 9,8,42,GUIGameOptnsText4
|
|
mov byte[GUIGameOptnsText4+2],'2'
|
|
GUIOuttextwin2 9,8+45,42,GUIGameOptnsText4
|
|
mov byte[GUIGameOptnsText4+2],'3'
|
|
GUIOuttextwin2 9,8+45*2,42,GUIGameOptnsText4
|
|
mov byte[GUIGameOptnsText4+2],'4'
|
|
GUIOuttextwin2 9,8+45*3,42,GUIGameOptnsText4
|
|
mov byte[GUIGameOptnsText4+2],'5'
|
|
GUIOuttextwin2 9,8,51,GUIGameOptnsText4
|
|
mov byte[GUIGameOptnsText4+2],'6'
|
|
GUIOuttextwin2 9,8+45,51,GUIGameOptnsText4
|
|
mov byte[GUIGameOptnsText4+2],'7'
|
|
GUIOuttextwin2 9,8+45*2,51,GUIGameOptnsText4
|
|
mov byte[GUIGameOptnsText4+2],'8'
|
|
GUIOuttextwin2 9,8+45*3,51,GUIGameOptnsText4
|
|
mov al,byte[GUIGameOptnsColA]
|
|
mov byte[GUItextcolor],al
|
|
mov al,byte[GUIGameOptnsColB]
|
|
mov byte[GUItextcolor],al
|
|
mov al,byte[GUIGameOptnsColA]
|
|
mov byte[GUItextcolor],al
|
|
GUIOuttextwin2 9,5,61,GUIGameOptnsText5
|
|
mov al,byte[GUIGameOptnsColB]
|
|
mov byte[GUItextcolor],al
|
|
GUIOuttextwin2 9,8,71,GUIGameOptnsText6
|
|
GUIOuttextwin2 9,8+52,71,GUIGameOptnsText7
|
|
GUIOuttextwin2 9,8+109,71,GUIGameOptnsText8
|
|
GUIOuttextwin2 9,8+160,71,GUIGameOptnsText9
|
|
GUIOuttextwin2 9,8,81,GUIGameOptnsTextA
|
|
GUIOuttextwin2 9,8+52,81,GUIGameOptnsTextB
|
|
GUIOuttextwin2 9,136,81,GUIGameOptnsTextC
|
|
|
|
|
|
mov al,byte[GUIGameOptnsColA]
|
|
mov byte[GUItextcolor],al
|
|
mov al,byte[GUIGameOptnsColB]
|
|
mov byte[GUItextcolor],al
|
|
mov al,byte[GUIGameOptnsColA]
|
|
mov byte[GUItextcolor],al
|
|
GUIOuttextwin2 9,5,92,GUIGameOptnsTextD
|
|
mov al,byte[GUIGameOptnsColB]
|
|
mov byte[GUItextcolor],al
|
|
GUIOuttextwin2 9,8,101,GUIGameOptnsTextE
|
|
GUIOuttextwin2 9,8,111,GUIGameOptnsTextF
|
|
GUIOuttextwin2 9,8,121,GUIGameOptnsTextG
|
|
GUIOuttextwin2 9,8,131,GUIGameOptnsTextH
|
|
GUIOuttextwin2 9,8,141,GUIGameOptnsTextI
|
|
GUIOuttextwin2 9,8,151,GUIGameOptnsTextJ
|
|
; GUIOuttextwin2 9,8,161,GUIGameOptnsTextK
|
|
GUIOuttextwin2 9,8,171,GUIGameOptnsTextL
|
|
; GUIOuttextwin2 9,108,101,GUIGameOptnsTextEa
|
|
; GUIOuttextwin2 9,108,111,GUIGameOptnsTextFa
|
|
GUIOuttextwin2 9,108,121,GUIGameOptnsTextGa
|
|
GUIOuttextwin2 9,108,131,GUIGameOptnsTextHa
|
|
GUIOuttextwin2 9,108,141,GUIGameOptnsTextIa
|
|
GUIOuttextwin2 9,108,151,GUIGameOptnsTextJa
|
|
GUIOuttextwin2 9,108,161,GUIGameOptnsTextKa
|
|
GUIOuttextwin2 9,108,171,GUIGameOptnsTextLa
|
|
;Draw Borders
|
|
DGOptnsBorderBox 9,26,22
|
|
DGOptnsBorderBox 9,71,22
|
|
DGOptnsBorderBox 9,116,22
|
|
DGOptnsBorderBox 9,161,22
|
|
DGOptnsBorderBox 9,206,22
|
|
|
|
DGOptnsBorderBox 9,26,40
|
|
DGOptnsBorderBox 9,71,40
|
|
DGOptnsBorderBox 9,116,40
|
|
DGOptnsBorderBox 9,161,40
|
|
DGOptnsBorderBox 9,26,49
|
|
DGOptnsBorderBox 9,71,49
|
|
DGOptnsBorderBox 9,116,49
|
|
DGOptnsBorderBox 9,161,49
|
|
|
|
DGOptnsBorderBox 9,32,69
|
|
DGOptnsBorderBox 9,90,69
|
|
DGOptnsBorderBox 9,141,69
|
|
DGOptnsBorderBox 9,199,69
|
|
DGOptnsBorderBox 9,32,79
|
|
DGOptnsBorderBox 9,109,79
|
|
DGOptnsBorderBox 9,185,79
|
|
|
|
DGOptnsBorderBox 9,77,99
|
|
DGOptnsBorderBox 9,77,109
|
|
DGOptnsBorderBox 9,77,119
|
|
DGOptnsBorderBox 9,77,129
|
|
DGOptnsBorderBox 9,77,139
|
|
DGOptnsBorderBox 9,77,149
|
|
; DGOptnsBorderBox 9,77,159
|
|
DGOptnsBorderBox 9,77,169
|
|
; DGOptnsBorderBox 9,177,99
|
|
; DGOptnsBorderBox 9,177,109
|
|
DGOptnsBorderBox 9,177,119
|
|
DGOptnsBorderBox 9,177,129
|
|
DGOptnsBorderBox 9,177,139
|
|
DGOptnsBorderBox 9,177,149
|
|
DGOptnsBorderBox 9,177,159
|
|
DGOptnsBorderBox 9,177,169
|
|
|
|
; Draw black boxes
|
|
DGOptnsDrawBox 27,23,[KeyBGDisble0]
|
|
DGOptnsDrawBox 27+45,23,[KeyBGDisble1]
|
|
DGOptnsDrawBox 27+45*2,23,[KeyBGDisble2]
|
|
DGOptnsDrawBox 27+45*3,23,[KeyBGDisble3]
|
|
DGOptnsDrawBox 27+45*4,23,[KeySprDisble]
|
|
DGOptnsDrawBox 27,41,[KeyDisableSC0]
|
|
DGOptnsDrawBox 27+45,41,[KeyDisableSC1]
|
|
DGOptnsDrawBox 27+45*2,41,[KeyDisableSC2]
|
|
DGOptnsDrawBox 27+45*3,41,[KeyDisableSC3]
|
|
DGOptnsDrawBox 27,50,[KeyDisableSC4]
|
|
DGOptnsDrawBox 27+45,50,[KeyDisableSC5]
|
|
DGOptnsDrawBox 27+45*2,50,[KeyDisableSC6]
|
|
DGOptnsDrawBox 27+45*3,50,[KeyDisableSC7]
|
|
|
|
DGOptnsDrawBox 8+25,70,[KeyQuickLoad]
|
|
DGOptnsDrawBox 8+57+26,70,[KeyQuickRst]
|
|
DGOptnsDrawBox 8+114+20,70,[KeyQuickExit]
|
|
DGOptnsDrawBox 8+114+78,70,[KeyQuickClock]
|
|
DGOptnsDrawBox 8+25,80,[KeyQuickChat]
|
|
DGOptnsDrawBox 8+57+45,80,[KeyQuickSnapShot]
|
|
DGOptnsDrawBox 8+108+70,80,[KeyQuickSaveSPC]
|
|
|
|
DGOptnsDrawBox 78,100,[KeyUsePlayer1234]
|
|
DGOptnsDrawBox 78,110,[KeyResetAll]
|
|
DGOptnsDrawBox 78,120,[KeyExtraEnab]
|
|
DGOptnsDrawBox 78,130,[KeyNewGfxSwt]
|
|
DGOptnsDrawBox 78,140,[KeyWinDisble]
|
|
DGOptnsDrawBox 78,150,[KeyOffsetMSw]
|
|
; DGOptnsDrawBox 78,160,[KeySlowDown]
|
|
DGOptnsDrawBox 78,170,[EMUPauseKey]
|
|
; DGOptnsDrawBox 178,100,[KeyRewind]
|
|
; DGOptnsDrawBox 178,110,[KeyFastFrwrd]
|
|
DGOptnsDrawBox 178,120,[KeyVolUp]
|
|
DGOptnsDrawBox 178,130,[KeyVolDown]
|
|
DGOptnsDrawBox 178,140,[KeyFRateUp]
|
|
DGOptnsDrawBox 178,150,[KeyFRateDown]
|
|
DGOptnsDrawBox 178,160,[KeyDisplayFPS]
|
|
DGOptnsDrawBox 178,170,[INCRFrameKey]
|
|
ret
|
|
|
|
SECTION .bss
|
|
GUIGameOptnsColA resb 1
|
|
GUIGameOptnsColB resb 1
|
|
GUIGameDisplayKy resd 1
|
|
|
|
SECTION .data
|
|
GUIGameOptnsText1 db 'BG DISABLES :',0
|
|
GUIGameOptnsText2 db 'BG#',0
|
|
GUIGameOptnsText2a db 'OBJ ',0
|
|
GUIGameOptnsText3 db 'SOUND DISABLES :',0
|
|
GUIGameOptnsText4 db 'CH#',0
|
|
|
|
GUIGameOptnsText5 db 'QUICK KEYS :',0
|
|
GUIGameOptnsText6 db 'LOAD',0
|
|
GUIGameOptnsText7 db 'RESET',0
|
|
GUIGameOptnsText8 db 'EXIT',0
|
|
GUIGameOptnsText9 db 'CLOCK',0
|
|
GUIGameOptnsTextA db 'CHAT',0
|
|
GUIGameOptnsTextB db 'SNAPSHOT',0
|
|
GUIGameOptnsTextC db 'SAVE SPC',0
|
|
|
|
GUIGameOptnsTextD db 'MISC TOGGLES :',0
|
|
GUIGameOptnsTextE db 'USE PL12/34',0
|
|
;GUIGameOptnsTextEa db 'FREE SPACE',0
|
|
GUIGameOptnsTextF db 'CLRSWITCHES',0
|
|
;GUIGameOptnsTextFa db 'FASTFWD KEY',0
|
|
GUIGameOptnsTextG db 'EXTRADEVICE',0
|
|
GUIGameOptnsTextGa db '+VOL',0
|
|
GUIGameOptnsTextH db 'NEW GFX ENG',0
|
|
GUIGameOptnsTextHa db '-VOL',0
|
|
GUIGameOptnsTextI db 'BG WINDOW',0
|
|
GUIGameOptnsTextIa db '+FRAME RATE',0
|
|
GUIGameOptnsTextJ db 'OFFSET MODE',0
|
|
GUIGameOptnsTextJa db '-FRAME RATE',0
|
|
;GUIGameOptnsTextK db 'SLOWDWN KEY',0
|
|
GUIGameOptnsTextKa db 'DISPLAY FPS',0
|
|
GUIGameOptnsTextL db 'PAUSE GAME',0
|
|
GUIGameOptnsTextLa db 'INCR FRAME',0
|
|
SECTION .text
|
|
|
|
DisplayGUIOptns:
|
|
%ifdef __WIN32__
|
|
mov dword[GUIwinsizey+10*4],192
|
|
%endif
|
|
GUIDrawWindowBox 10,GUIGUIDisp
|
|
|
|
push eax
|
|
cmp byte[CurPalSelect],1
|
|
je .yespal2b
|
|
cmp byte[CurPalSelect],2
|
|
je .yespal3b
|
|
mov al,[GUIRAdd]
|
|
mov [TRVal2],al
|
|
mov al,[GUIGAdd]
|
|
mov [TGVal2],al
|
|
mov al,[GUIBAdd]
|
|
mov [TBVal2],al
|
|
jmp .nopal1b
|
|
.yespal2b
|
|
mov al,[GUITRAdd]
|
|
mov [TRVal2],al
|
|
mov al,[GUITGAdd]
|
|
mov [TGVal2],al
|
|
mov al,[GUITBAdd]
|
|
mov [TBVal2],al
|
|
jmp .nopal1b
|
|
.yespal3b
|
|
mov al,[GUIWRAdd]
|
|
mov [TRVal2],al
|
|
mov al,[GUIWGAdd]
|
|
mov [TGVal2],al
|
|
mov al,[GUIWBAdd]
|
|
mov [TBVal2],al
|
|
.nopal1b
|
|
pop eax
|
|
|
|
mov eax,dword[GUIwinposx+10*4]
|
|
mov ebx,dword[GUIwinposy+10*4]
|
|
mov ecx,eax
|
|
add eax,25
|
|
add ecx,25+32*4
|
|
add ebx,124
|
|
xor edx,edx
|
|
mov dl,215
|
|
sub dl,[GUIWincoladd]
|
|
DrawGUILine
|
|
add ebx,11
|
|
DrawGUILine
|
|
add ebx,11
|
|
DrawGUILine
|
|
inc ecx
|
|
mov ebx,dword[GUIwinposy+10*4]
|
|
inc eax
|
|
add ebx,125
|
|
sub dl,13
|
|
DrawGUILine
|
|
add ebx,11
|
|
DrawGUILine
|
|
add ebx,11
|
|
DrawGUILine
|
|
xor eax,eax
|
|
mov al,[TRVal2]
|
|
shl eax,2
|
|
mov dword[GUITemp],22
|
|
add [GUITemp],eax
|
|
GUIDisplayIconWin 10,[GUITemp],120,GUIIconDataSlideBar
|
|
xor eax,eax
|
|
mov al,[TGVal2]
|
|
shl eax,2
|
|
mov dword[GUITemp],22
|
|
add [GUITemp],eax
|
|
GUIDisplayIconWin 10,[GUITemp],132,GUIIconDataSlideBar
|
|
xor eax,eax
|
|
mov al,[TBVal2]
|
|
shl eax,2
|
|
mov dword[GUITemp],22
|
|
add [GUITemp],eax
|
|
GUIDisplayIconWin 10,[GUITemp],144,GUIIconDataSlideBar
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
|
|
cmp byte[GUIEnableTransp],1
|
|
jne .nocheckt
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckt
|
|
GUIDisplayIconWin 10,124,23,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[FilteredGUI],1
|
|
jne .nocheckfg
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckfg
|
|
GUIDisplayIconWin 10,124,43,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[mousewrap],1
|
|
jne .nocheck
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheck
|
|
GUIDisplayIconWin 10,12,23,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[mouseshad],1
|
|
jne .nocheck2
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheck2
|
|
GUIDisplayIconWin 10,12,33,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[lastcursres],1
|
|
jne .nocheck3
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheck3
|
|
GUIDisplayIconWin 10,12,43,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[resetposn],1
|
|
je .nocheck4
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheck4
|
|
GUIDisplayIconWin 10,12,53,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[GUIClick],1
|
|
jne .nocheck5
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheck5
|
|
GUIDisplayIconWin 10,12,63,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[JoyPad1Move],1
|
|
jne .nocheck6
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheck6
|
|
GUIDisplayIconWin 10,12,73,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[GUIEffect],1
|
|
jne .nocheck6b
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheck6b
|
|
GUIDisplayIconWin 10,12,83,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[GUIEffect],4
|
|
jne .nocheck7
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheck7
|
|
GUIDisplayIconWin 10,124,83,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[GUIEffect],2
|
|
jne .nocheck7b
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheck7b
|
|
GUIDisplayIconWin 10,12,93,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[GUIEffect],3
|
|
jne .nocheck8
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheck8
|
|
GUIDisplayIconWin 10,124,93,[GUITemp]
|
|
%ifdef __WIN32__
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[MouseWheel],1
|
|
jne .nocheck9
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheck9
|
|
GUIDisplayIconWin 10,124,33,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[AlwaysOnTop],1
|
|
jne .nocheck10
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheck10
|
|
GUIDisplayIconWin 10,12,168,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[SaveMainWindowPos],1
|
|
jne .nocheck11
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheck11
|
|
GUIDisplayIconWin 10,12,178,[GUITemp]
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[AllowMultipleInst],1
|
|
jne .nocheck12
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheck12
|
|
GUIDisplayIconWin 10,12,188,[GUITemp]
|
|
%endif
|
|
mov al,[GUIWincol]
|
|
mov byte[GUItextcolor],al
|
|
GUIOuttextwin2 10,6,111,GUIGUIOptnsText1
|
|
GUIOuttextwin2 10,6,16,GUIGUIOptnsText5
|
|
%ifdef __WIN32__
|
|
GUIOuttextwin2 10,6,160,GUIGUIOptnsTextD
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[TrapMouseCursor],1
|
|
jne .nocheck13
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheck13
|
|
GUIDisplayIconWin 10,124,53,[GUITemp]
|
|
%endif
|
|
mov byte[GUItextcolor],163
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero
|
|
mov byte[GUItextcolor],164
|
|
.zero
|
|
GUIOuttextwin2 10,5,110,GUIGUIOptnsText1
|
|
GUIOuttextwin2 10,5,15,GUIGUIOptnsText5
|
|
%ifdef __WIN32__
|
|
GUIOuttextwin2 10,5,160,GUIGUIOptnsTextD
|
|
%endif
|
|
mov byte[GUItextcolor],217
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero3
|
|
mov byte[GUItextcolor],211
|
|
.zero3
|
|
sub byte[GUItextcolor],15
|
|
GUIOuttextwin2u 10,26,28,GUIGUIOptnsText2,0
|
|
GUIOuttextwin2u 10,26,38,GUIGUIOptnsText3,6
|
|
GUIOuttextwin2u 10,26,48,GUIGUIOptnsText4,0
|
|
GUIOuttextwin2u 10,26,58,GUIGUIOptnsText7,5
|
|
GUIOuttextwin2u 10,26,68,GUIGUIOptnsText8,0
|
|
GUIOuttextwin2u 10,26,78,GUIGUIOptnsTextA,0
|
|
GUIOuttextwin2 10,60,111,GUIGUIOptnsTextG
|
|
GUIOuttextwin2 10,100,111,GUIGUIOptnsTextH
|
|
GUIOuttextwin2 10,147,111,GUIGUIOptnsTextI
|
|
GUIOuttextwin2u 10,26,88,GUIGUIOptnsTextB,1
|
|
GUIOuttextwin2u 10,138,88,GUIGUIOptnsTextBb,2
|
|
GUIOuttextwin2u 10,26,98,GUIGUIOptnsTextC,3
|
|
GUIOuttextwin2u 10,138,98,GUIGUIOptnsTextCb,13
|
|
GUIOuttextwin2u 10,138,28,GUIGUIOptnsTextJ,0
|
|
GUIOuttextwin2u 10,138,48,GUIGUIOptnsTextM,0
|
|
%ifdef __WIN32__
|
|
GUIOuttextwin2u 10,26,173,GUIGUIOptnsTextE,0
|
|
GUIOuttextwin2u 10,26,183,GUIGUIOptnsTextF,2
|
|
GUIOuttextwin2u 10,138,38,GUIGUIOptnsTextK,1
|
|
GUIOuttextwin2u 10,26,193,GUIGUIOptnsTextL,1
|
|
GUIOuttextwin2u 10,138,58,GUIGUIOptnsTextN,3
|
|
%endif
|
|
mov byte[GUIGUIOptnsText6],'R'
|
|
GUIOuttextwin2 10,16,123,GUIGUIOptnsText6
|
|
mov byte[GUIGUIOptnsText6],'G'
|
|
GUIOuttextwin2 10,16,135,GUIGUIOptnsText6
|
|
mov byte[GUIGUIOptnsText6],'B'
|
|
GUIOuttextwin2 10,16,147,GUIGUIOptnsText6
|
|
add byte[GUItextcolor],15
|
|
GUIOuttextwin2 10,25,27,GUIGUIOptnsText2
|
|
GUIOuttextwin2 10,25,37,GUIGUIOptnsText3
|
|
GUIOuttextwin2 10,25,47,GUIGUIOptnsText4
|
|
GUIOuttextwin2 10,25,57,GUIGUIOptnsText7
|
|
GUIOuttextwin2 10,25,67,GUIGUIOptnsText8
|
|
GUIOuttextwin2 10,25,77,GUIGUIOptnsTextA
|
|
GUIOuttextwin2 10,59,110,GUIGUIOptnsTextG
|
|
GUIOuttextwin2 10,99,110,GUIGUIOptnsTextH
|
|
GUIOuttextwin2 10,146,110,GUIGUIOptnsTextI
|
|
GUIOuttextwin2 10,25,87,GUIGUIOptnsTextB
|
|
GUIOuttextwin2 10,137,87,GUIGUIOptnsTextBb
|
|
GUIOuttextwin2 10,25,97,GUIGUIOptnsTextC
|
|
GUIOuttextwin2 10,137,97,GUIGUIOptnsTextCb
|
|
GUIOuttextwin2 10,137,27,GUIGUIOptnsTextJ
|
|
GUIOuttextwin2 10,137,47,GUIGUIOptnsTextM
|
|
%ifdef __WIN32__
|
|
GUIOuttextwin2 10,25,172,GUIGUIOptnsTextE
|
|
GUIOuttextwin2 10,25,182,GUIGUIOptnsTextF
|
|
GUIOuttextwin2 10,137,37,GUIGUIOptnsTextK
|
|
GUIOuttextwin2 10,25,192,GUIGUIOptnsTextL
|
|
GUIOuttextwin2 10,137,57,GUIGUIOptnsTextN
|
|
%endif
|
|
mov byte[GUIGUIOptnsText6],'R'
|
|
GUIOuttextwin2 10,15,122,GUIGUIOptnsText6
|
|
mov byte[GUIGUIOptnsText6],'G'
|
|
GUIOuttextwin2 10,15,134,GUIGUIOptnsText6
|
|
mov byte[GUIGUIOptnsText6],'B'
|
|
GUIOuttextwin2 10,15,146,GUIGUIOptnsText6
|
|
|
|
GUIDisplayButtonHole 10,48,108,byte[CurPalSelect],0
|
|
GUIDisplayButtonHole 10,88,108,byte[CurPalSelect],1
|
|
GUIDisplayButtonHole 10,135,108,byte[CurPalSelect],2
|
|
|
|
mov dword[GUIGUIOptnsText9],0
|
|
mov esi,GUIGUIOptnsText9+2
|
|
xor eax,eax
|
|
mov al,[TRVal2]
|
|
call .processnum
|
|
GUIOuttextwin2 10,160,123,[GUITemp]
|
|
mov byte[GUItextcolor],221
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero5
|
|
mov byte[GUItextcolor],222
|
|
.zero5
|
|
GUIOuttextwin2 10,159,122,[GUITemp]
|
|
mov dword[GUIGUIOptnsText9],0
|
|
mov esi,GUIGUIOptnsText9+2
|
|
xor eax,eax
|
|
mov al,[TGVal2]
|
|
call .processnum
|
|
GUIOuttextwin2 10,160,135,[GUITemp]
|
|
mov byte[GUItextcolor],221
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero6
|
|
mov byte[GUItextcolor],222
|
|
.zero6
|
|
GUIOuttextwin2 10,159,134,[GUITemp]
|
|
mov dword[GUIGUIOptnsText9],0
|
|
mov esi,GUIGUIOptnsText9+2
|
|
xor eax,eax
|
|
mov al,[TBVal2]
|
|
call .processnum
|
|
GUIOuttextwin2 10,160,147,[GUITemp]
|
|
mov byte[GUItextcolor],221
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero7
|
|
mov byte[GUItextcolor],222
|
|
.zero7
|
|
GUIOuttextwin2 10,159,146,[GUITemp]
|
|
ret
|
|
|
|
.processnum
|
|
mov ebx,10
|
|
div bl
|
|
add ah,48
|
|
mov [esi],ah
|
|
cmp al,0
|
|
je .nomore
|
|
dec esi
|
|
xor ah,ah
|
|
div bl
|
|
add ah,48
|
|
mov [esi],ah
|
|
.nomore
|
|
mov [GUITemp],esi
|
|
mov byte[GUItextcolor],223
|
|
ret
|
|
|
|
;mousewrap 0 ; 0 = mouse boundries, 1 = mouse wrap
|
|
;mouseshad 1 ; 0 = no mouse shadow, 1 = mouse shadow
|
|
;lastcursres 0 ; 0 = go to load, 1 = go to previous menu, 2 = no menu
|
|
;resetposn 1 ; 0 = no window reset, 1 = window reset
|
|
|
|
SECTION .data
|
|
GUIGUIOptnsText1 db 'COLOR:',0
|
|
GUIGUIOptnsText2 db 'MOUSE WRAP',0
|
|
GUIGUIOptnsText3 db 'MOUSE SHADOW',0
|
|
GUIGUIOptnsText4 db 'KEEP MENU POSITN',0
|
|
GUIGUIOptnsText5 db 'GUI SWITCHES :',0
|
|
GUIGUIOptnsText6 db '@',0
|
|
GUIGUIOptnsText7 db 'SAVE WIN POSITNS',0
|
|
GUIGUIOptnsText8 db 'CLICK ENTERS GUI',0
|
|
GUIGUIOptnsText9 dd 0
|
|
GUIGUIOptnsTextA db 'USE JOYPAD1',0
|
|
GUIGUIOptnsTextB dd 'SNOW EFFECT',0
|
|
GUIGUIOptnsTextBb dd 'BURNING EFFECT',0
|
|
GUIGUIOptnsTextC dd 'WATER EFFECT A',0
|
|
GUIGUIOptnsTextCb dd 'WATER EFFECT B',0
|
|
GUIGUIOptnsTextD dd 'MAIN WINDOW OPTIONS :',0
|
|
GUIGUIOptnsTextE dd 'ALWAYS ON TOP',0
|
|
GUIGUIOptnsTextF db 'SAVE MAIN WINDOW POSITION',0
|
|
GUIGUIOptnsTextG db 'BACK',0
|
|
GUIGUIOptnsTextH db 'TITLE',0
|
|
GUIGUIOptnsTextI db 'WIN',0
|
|
GUIGUIOptnsTextJ db 'TRANSPARENT MSGS',0
|
|
GUIGUIOptnsTextK db 'WHEEL MOUSE',0
|
|
GUIGUIOptnsTextL db 'ALLOW MULTIPLE INSTANCES',0
|
|
GUIGUIOptnsTextM db 'FILTERED GUI',0
|
|
GUIGUIOptnsTextN db 'TRAP MOUSE CURSOR',0
|
|
SECTION .text
|
|
|
|
DisplayGUIAbout:
|
|
|
|
;This will attach compile date onto the end of GUIGUIAboutText1
|
|
pushad
|
|
EXTSYM VERSION_STR, placedate
|
|
mov eax,GUIGUIAboutText1
|
|
mov [VERSION_STR],eax
|
|
call placedate
|
|
popad
|
|
|
|
GUIDrawWindowBox 11,GUIAboutDisp
|
|
mov byte[GUItextcolor],217
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero3
|
|
mov byte[GUItextcolor],211
|
|
.zero3
|
|
DrawGUIButton 11,90,30,175,40,GUIGUIAboutText8,65,0,0
|
|
sub byte[GUItextcolor],15
|
|
GUIOuttextwin2 11,6,16,GUIGUIAboutText1
|
|
GUIOuttextwin2 11,6,26,GUIGUIAboutText7
|
|
GUIOuttextwin2 11,6,46,GUIGUIAboutText3
|
|
GUIOuttextwin2 11,6,56,GUIGUIAboutText4
|
|
GUIOuttextwin2 11,6,66,GUIGUIAboutText6c
|
|
GUIOuttextwin2 11,6,86,GUIGUIAboutText6
|
|
GUIOuttextwin2 11,6,96,GUIGUIAboutText6b
|
|
GUIOuttextwin2 11,6,106,GUIGUIAboutText6d
|
|
GUIOuttextwin2 11,6,116,GUIGUIAboutText6e
|
|
GUIOuttextwin2 11,6,131,GUIGUIAboutTextA
|
|
GUIOuttextwin2 11,6,141,GUIGUIAboutTextB
|
|
GUIOuttextwin2 11,6,151,GUIGUIAboutTextC
|
|
GUIOuttextwin2 11,6,161,GUIGUIAboutTextD
|
|
GUIOuttextwin2 11,6,171,GUIGUIAboutTextE
|
|
GUIOuttextwin2 11,6,181,GUIGUIAboutTextF
|
|
GUIOuttextwin2 11,6,191,GUIGUIAboutTextG
|
|
add byte[GUItextcolor],15
|
|
GUIOuttextwin2 11,5,15,GUIGUIAboutText1
|
|
GUIOuttextwin2 11,5,25,GUIGUIAboutText7
|
|
GUIOuttextwin2 11,5,45,GUIGUIAboutText3
|
|
GUIOuttextwin2 11,5,55,GUIGUIAboutText4
|
|
GUIOuttextwin2 11,5,65,GUIGUIAboutText6c
|
|
GUIOuttextwin2 11,5,85,GUIGUIAboutText6
|
|
GUIOuttextwin2 11,5,95,GUIGUIAboutText6b
|
|
GUIOuttextwin2 11,5,105,GUIGUIAboutText6d
|
|
GUIOuttextwin2 11,5,115,GUIGUIAboutText6e
|
|
GUIOuttextwin2 11,5,130,GUIGUIAboutTextA
|
|
GUIOuttextwin2 11,5,140,GUIGUIAboutTextB
|
|
GUIOuttextwin2 11,5,150,GUIGUIAboutTextC
|
|
GUIOuttextwin2 11,5,160,GUIGUIAboutTextD
|
|
GUIOuttextwin2 11,5,170,GUIGUIAboutTextE
|
|
GUIOuttextwin2 11,5,180,GUIGUIAboutTextF
|
|
GUIOuttextwin2 11,5,190,GUIGUIAboutTextG
|
|
mov al,[GUIWincol]
|
|
mov byte[GUItextcolor],al
|
|
GUIOuttextwin2 11,6,36,GUIGUIAboutText2
|
|
GUIOuttextwin2 11,6,76,GUIGUIAboutText5
|
|
mov byte[GUItextcolor],163
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero
|
|
mov byte[GUItextcolor],164
|
|
.zero
|
|
GUIOuttextwin2 11,5,35,GUIGUIAboutText2
|
|
GUIOuttextwin2 11,5,75,GUIGUIAboutText5
|
|
ret
|
|
|
|
SECTION .data
|
|
GUIGUIAboutText1 db 'ZSNES V',ZVERSION,' ',0 ;Need room for date
|
|
GUIGUIAboutText2 db 'CODED BY : ',0
|
|
GUIGUIAboutText3 db ' ZSKNIGHT _DEMO_',0
|
|
GUIGUIAboutText4 db ' PAGEFAULT NACH',0
|
|
GUIGUIAboutText6c db 0
|
|
GUIGUIAboutText5 db 'ASSISTANT CODERS :',0
|
|
GUIGUIAboutText6 db ' PHAROS STATMAT',0
|
|
GUIGUIAboutText6b db ' TEUF HPSOLO',0
|
|
GUIGUIAboutText6d db ' THEODDONE33 SILOH',0
|
|
GUIGUIAboutText6e db ' IPHER GRINVADER',0
|
|
|
|
%ifdef __MSDOS__
|
|
GUIGUIAboutText7 db 'DOS VERSION',0
|
|
%elifdef __WIN32__
|
|
GUIGUIAboutText7 db 'WIN VERSION',0
|
|
%elifdef __LINUX__
|
|
GUIGUIAboutText7 db 'SDL VERSION',0
|
|
%endif
|
|
|
|
GUIGUIAboutText8 db 'WWW.ZSNES.COM',0
|
|
GUIGUIAboutTextA db 'ZSNES comes with ABSOLUTELY',0
|
|
GUIGUIAboutTextB db 'NO WARRANTY. This is free',0
|
|
GUIGUIAboutTextC db 'software, and you are welcome',0
|
|
GUIGUIAboutTextD db 'to redistribute it under',0
|
|
GUIGUIAboutTextE db 'certain conditions; please',0
|
|
%ifndef __LINUX__
|
|
GUIGUIAboutTextF db 'read ',39,'LICENSE.TXT',39,0
|
|
%else
|
|
GUIGUIAboutTextF db 'read ',39,'LICENSE',39,0
|
|
%endif
|
|
GUIGUIAboutTextG db 'thoroughly before doing so.',0
|
|
|
|
SECTION .text
|
|
|
|
DisplayGUIMovies: ; Movie Record/Playback options
|
|
GUIDrawWindowBox 15,GUIMovieDisp ; Display Window
|
|
|
|
cmp byte[MovieRecordWinVal],0
|
|
je near .displayboxa
|
|
|
|
cmp byte[GUIWincoladd],0 ; Overwrite Message Box
|
|
je .zero4
|
|
mov byte[GUItextcolor],211
|
|
.zero4
|
|
sub byte[GUItextcolor],15 ; Shadows
|
|
GUIOuttextwin2 15,9,16,GUIMovieTextX1
|
|
GUIOuttextwin2 15,9,26,GUIMovieTextX2
|
|
GUIOuttextwin2 15,9,41,GUIMovieTextX3
|
|
add byte[GUItextcolor],15 ; Text
|
|
GUIOuttextwin2 15,8,15,GUIMovieTextX1
|
|
GUIOuttextwin2 15,8,25,GUIMovieTextX2
|
|
GUIOuttextwin2 15,8,40,GUIMovieTextX3
|
|
DrawGUIButton 15,17,55,59,66,GUIMovieTextX4,19,0,0 ; Yes/No Buttons
|
|
DrawGUIButton 15,70,55,112,66,GUIMovieTextX5,20,0,0
|
|
ret
|
|
|
|
|
|
.displayboxa ; Main Window
|
|
|
|
DrawGUIButton 15,7,17,49,28,GUIMovieTextA1,16,0,0 ; Draw Buttons
|
|
DrawGUIButton 15,7,33,49,44,GUIMovieTextA2,17,0,0
|
|
DrawGUIButton 15,7,49,49,60,GUIMovieTextA3,18,0,0
|
|
DrawGUIButton 15,7,65,49,76,GUIMovieTextA4,32,0,0
|
|
DrawGUIButton 15,7,81,109,92,GUIMovieTextA5,29,0,0
|
|
DrawGUIButton 15,7,97,109,108,GUIMovieTextA6,30,0,0
|
|
DrawGUIButton 15,7,113,109,124,GUIMovieTextA7,31,0,0
|
|
DrawGUIButton 15,61,65,155,76,GUIMovieTextA8,34,0,0
|
|
|
|
cmp byte[GUIWincoladd],0 ; Output Text
|
|
je .zero
|
|
mov byte[GUItextcolor],211
|
|
.zero
|
|
sub byte[GUItextcolor],15
|
|
GUIOuttextwin2 15,61,16,GUIMovieTextB ; Save Select Shadow
|
|
mov byte[GUIMovieTextB1],'0'
|
|
GUIOuttextwin2 15,71,28,GUIMovieTextB1
|
|
mov byte[GUIMovieTextB1],'1'
|
|
GUIOuttextwin2 15,91,28,GUIMovieTextB1
|
|
mov byte[GUIMovieTextB1],'2'
|
|
GUIOuttextwin2 15,111,28,GUIMovieTextB1
|
|
mov byte[GUIMovieTextB1],'3'
|
|
GUIOuttextwin2 15,131,28,GUIMovieTextB1
|
|
mov byte[GUIMovieTextB1],'4'
|
|
GUIOuttextwin2 15,151,28,GUIMovieTextB1
|
|
mov byte[GUIMovieTextB1],'5'
|
|
GUIOuttextwin2 15,71,43,GUIMovieTextB1
|
|
mov byte[GUIMovieTextB1],'6'
|
|
GUIOuttextwin2 15,91,43,GUIMovieTextB1
|
|
mov byte[GUIMovieTextB1],'7'
|
|
GUIOuttextwin2 15,111,43,GUIMovieTextB1
|
|
mov byte[GUIMovieTextB1],'8'
|
|
GUIOuttextwin2 15,131,43,GUIMovieTextB1
|
|
mov byte[GUIMovieTextB1],'9'
|
|
GUIOuttextwin2 15,151,43,GUIMovieTextB1
|
|
GUIOuttextwin2u 15,71,55,GUIMovieTextB2,0
|
|
|
|
GUIOuttextwin2 15,9,130,GUIMovieTextC ; "Start From" Section Shadow
|
|
GUIOuttextwin2u 15,21,140,GUIMovieTextC1,0
|
|
GUIOuttextwin2u 15,56,140,GUIMovieTextC2,0
|
|
GUIOuttextwin2u 15,101,140,GUIMovieTextC3,0
|
|
GUIOuttextwin2u 15,21,150,GUIMovieTextC4,8
|
|
|
|
add byte[GUItextcolor],15 ; State Select Text
|
|
GUIOuttextwin2 15,60,15,GUIMovieTextB
|
|
mov byte[GUIMovieTextB1],'0'
|
|
GUIOuttextwin2 15,70,27,GUIMovieTextB1
|
|
mov byte[GUIMovieTextB1],'1'
|
|
GUIOuttextwin2 15,90,27,GUIMovieTextB1
|
|
mov byte[GUIMovieTextB1],'2'
|
|
GUIOuttextwin2 15,110,27,GUIMovieTextB1
|
|
mov byte[GUIMovieTextB1],'3'
|
|
GUIOuttextwin2 15,130,27,GUIMovieTextB1
|
|
mov byte[GUIMovieTextB1],'4'
|
|
GUIOuttextwin2 15,150,27,GUIMovieTextB1
|
|
mov byte[GUIMovieTextB1],'5'
|
|
GUIOuttextwin2 15,70,42,GUIMovieTextB1
|
|
mov byte[GUIMovieTextB1],'6'
|
|
GUIOuttextwin2 15,90,42,GUIMovieTextB1
|
|
mov byte[GUIMovieTextB1],'7'
|
|
GUIOuttextwin2 15,110,42,GUIMovieTextB1
|
|
mov byte[GUIMovieTextB1],'8'
|
|
GUIOuttextwin2 15,130,42,GUIMovieTextB1
|
|
mov byte[GUIMovieTextB1],'9'
|
|
GUIOuttextwin2 15,150,42,GUIMovieTextB1
|
|
GUIOuttextwin2 15,70,54,GUIMovieTextB2
|
|
|
|
GUIOuttextwin2 15,8,129,GUIMovieTextC ; "Start From" Section Text
|
|
GUIOuttextwin2 15,20,139,GUIMovieTextC1
|
|
GUIOuttextwin2 15,55,139,GUIMovieTextC2
|
|
GUIOuttextwin2 15,100,139,GUIMovieTextC3
|
|
GUIOuttextwin2 15,20,149,GUIMovieTextC4
|
|
; Status text is at end of window
|
|
; Display ratio buttons
|
|
GUIDisplayButtonHole 15,60,25,byte[CMovieExt],'v' ; Select:
|
|
GUIDisplayButtonHole 15,80,25,byte[CMovieExt],'1'
|
|
GUIDisplayButtonHole 15,100,25,byte[CMovieExt],'2'
|
|
GUIDisplayButtonHole 15,120,25,byte[CMovieExt],'3'
|
|
GUIDisplayButtonHole 15,140,25,byte[CMovieExt],'4'
|
|
GUIDisplayButtonHole 15,60,40,byte[CMovieExt],'5'
|
|
GUIDisplayButtonHole 15,80,40,byte[CMovieExt],'6'
|
|
GUIDisplayButtonHole 15,100,40,byte[CMovieExt],'7'
|
|
GUIDisplayButtonHole 15,120,40,byte[CMovieExt],'8'
|
|
GUIDisplayButtonHole 15,140,40,byte[CMovieExt],'9'
|
|
|
|
GUIDisplayButtonHole 15,8,137,byte[MovieStartMethod],0 ; Start From:
|
|
GUIDisplayButtonHole 15,43,137,byte[MovieStartMethod],1
|
|
GUIDisplayButtonHole 15,88,137,byte[MovieStartMethod],2
|
|
GUIDisplayButtonHole 15,8,147,byte[MovieStartMethod],3
|
|
|
|
|
|
|
|
DDrawBox 15,116,84,[KeyInsrtChap] ; Chapter Keyboard Shortcut Boxes
|
|
DDrawBox 15,116,100,[KeyPrevChap]
|
|
DDrawBox 15,116,116,[KeyNextChap]
|
|
|
|
DGOptnsBorderBox 15,115,83 ; Borders to above boxes
|
|
DGOptnsBorderBox 15,115,99
|
|
DGOptnsBorderBox 15,115,115
|
|
|
|
|
|
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC ; Checkbox
|
|
cmp byte[MovieDisplayFrame],0
|
|
je .nocheckboxMDF
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckboxMDF
|
|
GUIDisplayIconWin 15,60,50,[GUITemp]
|
|
|
|
|
|
|
|
mov dword[GUIMovieTextZ+9],'INAC' ; Determine Status
|
|
mov dword[GUIMovieTextZ+13],'TIVE'
|
|
mov dword[GUIMovieTextZ+17],' '
|
|
cmp byte[MovieProcessing],1
|
|
jne .noplay
|
|
mov dword[GUIMovieTextZ+9],'PLAY'
|
|
mov dword[GUIMovieTextZ+13],'ING '
|
|
mov dword[GUIMovieTextZ+17],' '
|
|
.noplay
|
|
cmp byte[MovieProcessing],2
|
|
jne .norec
|
|
mov dword[GUIMovieTextZ+9],'RECO'
|
|
mov dword[GUIMovieTextZ+13],'RDIN'
|
|
mov dword[GUIMovieTextZ+17],'G '
|
|
.norec
|
|
cmp byte[MovieProcessing],3
|
|
jne .nooldplay
|
|
mov dword[GUIMovieTextZ+9],'OLD '
|
|
mov dword[GUIMovieTextZ+13],'PLAY'
|
|
mov dword[GUIMovieTextZ+17],'ING '
|
|
.nooldplay
|
|
|
|
; Display Status Text
|
|
mov al,[GUIWincol] ; Shadow (Yellow)
|
|
mov byte[GUItextcolor],al
|
|
GUIOuttextwin2 15,6,162,GUIMovieTextZ
|
|
|
|
mov byte[GUItextcolor],163 ; Text (Yellow)
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero5
|
|
mov byte[GUItextcolor],164
|
|
.zero5
|
|
GUIOuttextwin2 15,5,161,GUIMovieTextZ
|
|
ret
|
|
|
|
SECTION .data
|
|
GUIMovieTextA1 db 'PLAY',0 ; Buttons
|
|
GUIMovieTextA2 db 'RECORD',0
|
|
GUIMovieTextA3 db 'STOP',0
|
|
GUIMovieTextA4 db 'APPEND',0
|
|
GUIMovieTextA5 db 'INSERT CHAPTER',0
|
|
GUIMovieTextA6 db 'PREVIOUS CHAPTER',0
|
|
GUIMovieTextA7 db 'NEXT CHAPTER',0
|
|
GUIMovieTextA8 db 'DUMP RAW MOVIE',0
|
|
|
|
|
|
GUIMovieTextB db 'SELECT :',0
|
|
GUIMovieTextB1 db ' ',0
|
|
GUIMovieTextB2 db 'DISPLAY FRAMES',0
|
|
|
|
GUIMovieTextC db 'START FROM:',0
|
|
GUIMovieTextC1 db 'NOW',0
|
|
GUIMovieTextC2 db 'POWER',0
|
|
GUIMovieTextC3 db 'RESET',0
|
|
GUIMovieTextC4 db 'POWER + SRAM CLEAR',0
|
|
|
|
GUIMovieTextX1 db 'WARNING : THIS MOVIE',0 ; Overwrite Window
|
|
GUIMovieTextX2 db ' FILE ALREADY EXISTS',0
|
|
GUIMovieTextX3 db 'OKAY TO OVERWRITE?',0
|
|
GUIMovieTextX4 db 'YES',0
|
|
GUIMovieTextX5 db 'NO',0
|
|
|
|
GUIMovieTextZ db 'STATUS : ',0
|
|
|
|
NEWSYM CMovieExt, db 'v'
|
|
|
|
SECTION .text
|
|
|
|
; Key types: Up, Down, Left, Right, A, B, X, Y, L, R (Press/Relase/P+R)
|
|
; Frame delays: 1 frame, 2, 3, 4, 5, 1 sec., 2, 3 ,4 ,5
|
|
|
|
%macro DrawBorderedBox 6
|
|
; draw borders
|
|
mov dl,[GUIWincol]
|
|
DrawGUIWinBox %1,%2,%6,%4,%3,dl ; For some reason, this freezes if I
|
|
; replace %6 with %3-1
|
|
mov dl,[GUIWincol]
|
|
add dl,1
|
|
DrawGUIWinBox %1,%2-1,%3,%2,%5,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,4
|
|
DrawGUIWinBox %1,%2,%5,%4,%5+1,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,3
|
|
DrawGUIWinBox %1,%4,%3,%4+1,%5,dl
|
|
DrawGUIWinBox %1,%2,%3,%4,%5,167
|
|
%endmacro
|
|
|
|
%macro DrawBorderedBoxB 7 ; Special function for combo displays
|
|
; draw borders
|
|
mov dl,[GUIWincol]
|
|
DrawGUIWinBox %1,%2,%6,%4,%3,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,1
|
|
DrawGUIWinBox %1,%2-1,%3,%2,%5,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,4
|
|
DrawGUIWinBox %1,%2,%5,%4,%5+1,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,3
|
|
DrawGUIWinBox %1,%4,%3,%4+1,%5,dl
|
|
DrawGUIWinBox %1,%2,%3,%4,%5,167
|
|
mov byte[GUIComboText3],%7
|
|
mov byte[GUItextcolor],223
|
|
GUIOuttextwin2 %1,%2+5,%3+2,GUIComboText3
|
|
mov byte[GUItextcolor],221
|
|
cmp byte[GUIWincoladd],0
|
|
je %%zero
|
|
mov byte[GUItextcolor],222
|
|
%%zero
|
|
GUIOuttextwin2 %1,%2+4,%3+1,GUIComboText3
|
|
%endmacro
|
|
|
|
%macro DrawBorderedBoxB2 7 ; Special function for combo displays
|
|
; draw borders
|
|
mov dl,[GUIWincol]
|
|
DrawGUIWinBox %1,%2,%6,%4,%3,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,1
|
|
DrawGUIWinBox %1,%2-1,%3,%2,%5,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,4
|
|
DrawGUIWinBox %1,%2,%5,%4,%5+1,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,3
|
|
DrawGUIWinBox %1,%4,%3,%4+1,%5,dl
|
|
DrawGUIWinBox %1,%2,%3,%4,%5,167
|
|
mov byte[GUIComboText3b+1],%7
|
|
mov byte[GUItextcolor],223
|
|
GUIOuttextwin2 %1,%2+2,%3+2,GUIComboText3b
|
|
mov byte[GUItextcolor],221
|
|
cmp byte[GUIWincoladd],0
|
|
je %%zero
|
|
mov byte[GUItextcolor],222
|
|
%%zero
|
|
GUIOuttextwin2 %1,%2+1,%3+1,GUIComboText3b
|
|
%endmacro
|
|
|
|
%macro InitTextColor 0
|
|
mov al,217
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero3
|
|
mov al,211
|
|
.zero3
|
|
sub al,15
|
|
mov byte[TextColorSp+2],al
|
|
mov al,[GUIWincol]
|
|
mov byte[TextColorSp],al
|
|
mov al,163
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero
|
|
mov al,164
|
|
mov byte[GUItextcolor],164
|
|
.zero
|
|
mov byte[TextColorSp+1],al
|
|
%endmacro
|
|
|
|
%macro GUIOuttextwin2b 4 ; Special, yellow text
|
|
mov al,[TextColorSp]
|
|
mov byte[GUItextcolor],al
|
|
GUIOuttextwin2 %1,%2,%3,%4
|
|
mov al,[TextColorSp+1]
|
|
mov byte[GUItextcolor],al
|
|
GUIOuttextwin2 %1,%2-1,%3-1,%4
|
|
%endmacro
|
|
|
|
%macro GUIOuttextwin2c 4 ; Boxed, green text
|
|
mov byte[GUItextcolor],223
|
|
push ecx ;Needed for the macro below
|
|
GUIOuttextwin2 %1,%2,%3,%4
|
|
pop ecx
|
|
mov byte[GUItextcolor],221
|
|
cmp byte[GUIWincoladd],0
|
|
je %%zero
|
|
mov byte[GUItextcolor],222
|
|
%%zero
|
|
push esi
|
|
mov esi,%2
|
|
dec esi
|
|
GUIOuttextwin2 %1,esi,%3-1,%4
|
|
pop esi
|
|
%endmacro
|
|
|
|
%macro GUIOuttextwin2d 5 ; Boxed, green text, limited to 5th param
|
|
push ecx
|
|
mov ecx,%4 ;Move pointer to text into ecx
|
|
%%zero
|
|
cmp byte[ecx],0 ;Check for null in string
|
|
je %%one
|
|
inc ecx
|
|
jmp %%zero
|
|
%%one
|
|
push eax
|
|
mov eax,ecx ;Move pointer to null into eax
|
|
sub ecx,%5 ;Move ecx pointer back by length to display
|
|
cmp ecx,%4
|
|
jae %%two
|
|
mov ecx,%4 ;If pointer is before beginning, reset pointer to beginning
|
|
%%two
|
|
sub eax,ecx ;Subtract new pointer from old null pointer which gives us length of chars
|
|
push eax
|
|
GUIOuttextwin2c %1,%2,%3,ecx
|
|
pop eax
|
|
push ebx
|
|
pop ecx
|
|
call BlinkCursorCheck
|
|
cmp ebx,%4
|
|
pop ebx
|
|
jne near %%fixreg
|
|
cmp byte[GUIBlinkCursor],' '
|
|
je %%three
|
|
mov byte[GUIBlinkCursor],' '
|
|
jmp %%four
|
|
%%three
|
|
mov byte[GUIBlinkCursor],'_'
|
|
%%four
|
|
imul eax,6
|
|
add eax,%2
|
|
push ecx
|
|
mov ecx,eax
|
|
GUIOuttextwin2c %1,ecx,%3,GUIBlinkCursor
|
|
pop ecx
|
|
%%fixreg
|
|
pop eax
|
|
%endmacro
|
|
|
|
%macro DrawSlideBar 10
|
|
DrawSlideBarWin %1,%2,%3+8,%4,%5,%6,%7-16,%8
|
|
mov al,[TextColorSp+2]
|
|
mov byte[GUItextcolor],al
|
|
cmp byte[GUICHold],%9
|
|
jne .noholda
|
|
add byte[GUIWincoladd],3
|
|
.noholda
|
|
GUIDisplayIconWin %1,%2,%3,GUIIconDataUpArrow
|
|
cmp byte[GUICHold],%9
|
|
jne .noholda2
|
|
sub byte[GUIWincoladd],3
|
|
.noholda2
|
|
mov al,[TextColorSp+2]
|
|
mov byte[GUItextcolor],al
|
|
cmp byte[GUICHold],%10
|
|
jne .noholdb
|
|
add byte[GUIWincoladd],3
|
|
.noholdb
|
|
GUIDisplayIconWin %1,%2,%3+%7-8,GUIIconDataDownArrow
|
|
cmp byte[GUICHold],%10
|
|
jne .noholdb2
|
|
sub byte[GUIWincoladd],3
|
|
.noholdb2
|
|
%endmacro
|
|
|
|
%macro DrawCheckBox 4
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[%4],0
|
|
je %%nocheck4
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
%%nocheck4
|
|
GUIDisplayIconWin %1,%2,%3,[GUITemp]
|
|
%endmacro
|
|
|
|
|
|
%macro DetermineChar 2
|
|
cmp al,%1
|
|
jne %%control
|
|
mov al,%2
|
|
%%control
|
|
%endmacro
|
|
|
|
DisplayGUICombo:
|
|
mov eax,[GUIccombcursloc]
|
|
cmp [GUIccomblcursloc],eax
|
|
je .nolastcurschange
|
|
mov [GUIccomblcursloc],eax
|
|
; copy contents into temporary variables
|
|
mov esi,[GUIccombcursloc]
|
|
shl esi,6
|
|
add esi,[GUIccombcursloc]
|
|
add esi,[GUIccombcursloc]
|
|
add esi,CombinDataGlob
|
|
cmp byte[GUIComboGameSpec],0
|
|
je .nogamespecb
|
|
sub esi,CombinDataGlob
|
|
add esi,CombinDataLocl
|
|
.nogamespecb
|
|
; copy 20 bytes to GUIComboTextH
|
|
mov ecx,20
|
|
mov edi,GUIComboTextH
|
|
rep movsb
|
|
; copy 42 bytes to GUIComboData
|
|
mov ecx,42
|
|
mov edi,GUIComboData
|
|
rep movsb
|
|
mov ax,[esi]
|
|
mov [GUIComboKey],ax
|
|
mov al,[esi+2]
|
|
mov [GUIComboPNum],al
|
|
mov al,[esi+3]
|
|
mov [GUIComboLHorz],al
|
|
; determine length of combo data
|
|
mov eax,GUIComboData
|
|
xor ecx,ecx
|
|
.notfin
|
|
cmp byte[eax],0
|
|
je .fin
|
|
inc eax
|
|
inc ecx
|
|
jmp .notfin
|
|
.fin
|
|
mov [GUINumCombo],cl
|
|
.nolastcurschange
|
|
|
|
; copy into data if description equal
|
|
mov esi,[GUIccombcursloc]
|
|
shl esi,6
|
|
add esi,[GUIccombcursloc]
|
|
add esi,[GUIccombcursloc]
|
|
add esi,CombinDataGlob
|
|
cmp byte[GUIComboGameSpec],0
|
|
je .nogamespecc
|
|
sub esi,CombinDataGlob
|
|
add esi,CombinDataLocl
|
|
.nogamespecc
|
|
mov ecx,20
|
|
mov edi,GUIComboTextH
|
|
.comploop
|
|
mov al,[esi]
|
|
cmp al,[edi]
|
|
jne near .notequal
|
|
or al,al
|
|
jz .donecomp
|
|
inc esi
|
|
inc edi
|
|
dec ecx
|
|
jnz .comploop
|
|
.donecomp
|
|
call ComboClip
|
|
mov edi,[GUIccombcursloc]
|
|
shl edi,6
|
|
add edi,[GUIccombcursloc]
|
|
add edi,[GUIccombcursloc]
|
|
add edi,CombinDataGlob
|
|
cmp byte[GUIComboGameSpec],0
|
|
je .nogamespecd
|
|
sub edi,CombinDataGlob
|
|
add edi,CombinDataLocl
|
|
.nogamespecd
|
|
mov ecx,20
|
|
mov esi,GUIComboTextH
|
|
rep movsb
|
|
; copy 42 bytes to GUIComboData
|
|
mov ecx,42
|
|
mov esi,GUIComboData
|
|
rep movsb
|
|
mov ax,[GUIComboKey]
|
|
mov [edi],ax
|
|
mov al,[GUIComboPNum]
|
|
mov [edi+2],al
|
|
mov al,[GUIComboLHorz]
|
|
mov [edi+3],al
|
|
.notequal
|
|
InitTextColor
|
|
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero4
|
|
mov byte[GUItextcolor],211
|
|
.zero4
|
|
|
|
GUIDrawWindowBox 16,GUIComboDisp
|
|
|
|
DrawBorderedBox 16,10,20,190,80,19
|
|
DrawBorderedBox 16,37,91,157,99,90
|
|
DrawBorderedBox 16,10,91,32,99,90
|
|
DrawBorderedBox 16,10,110,220,146,109
|
|
|
|
; Draw SlideBar
|
|
; win#,X,Y start,List Loc,List size,# Lines,Bar Size(Y),UpArrowResource#,DownArrowRes#
|
|
DrawSlideBar 16,192,20,[GUIccombviewloc],[NumCombo],8,61,GUICSStC,13,14
|
|
|
|
; Draw control boxes
|
|
DrawBorderedBoxB 16,75,150,85,157,149,251
|
|
DrawBorderedBoxB 16,89,150,99,157,149,252
|
|
DrawBorderedBoxB 16,103,150,113,157,149,253
|
|
DrawBorderedBoxB 16,117,150,127,157,149,254
|
|
DrawBorderedBoxB 16,131,150,141,157,149,'A'
|
|
DrawBorderedBoxB 16,145,150,155,157,149,'B'
|
|
DrawBorderedBoxB 16,159,150,169,157,149,'X'
|
|
DrawBorderedBoxB 16,173,150,183,157,149,'Y'
|
|
DrawBorderedBoxB 16,187,150,197,157,149,'L'
|
|
DrawBorderedBoxB 16,201,150,211,157,149,'R'
|
|
DrawBorderedBoxB2 16,215,150,227,157,149,'T'
|
|
DrawBorderedBoxB2 16,231,150,243,157,149,'L'
|
|
|
|
DrawBorderedBoxB 16,75,160,85,167,159,251
|
|
DrawBorderedBoxB 16,89,160,99,167,159,252
|
|
DrawBorderedBoxB 16,103,160,113,167,159,253
|
|
DrawBorderedBoxB 16,117,160,127,167,159,254
|
|
DrawBorderedBoxB 16,131,160,141,167,159,'A'
|
|
DrawBorderedBoxB 16,145,160,155,167,159,'B'
|
|
DrawBorderedBoxB 16,159,160,169,167,159,'X'
|
|
DrawBorderedBoxB 16,173,160,183,167,159,'Y'
|
|
DrawBorderedBoxB 16,187,160,197,167,159,'L'
|
|
DrawBorderedBoxB 16,201,160,211,167,159,'R'
|
|
DrawBorderedBoxB2 16,215,160,227,167,159,'T'
|
|
DrawBorderedBoxB2 16,231,160,243,167,159,'L'
|
|
|
|
DrawBorderedBoxB 16,75,170,85,177,169,251
|
|
DrawBorderedBoxB 16,89,170,99,177,169,252
|
|
DrawBorderedBoxB 16,103,170,113,177,169,253
|
|
DrawBorderedBoxB 16,117,170,127,177,169,254
|
|
DrawBorderedBoxB 16,131,170,141,177,169,'A'
|
|
DrawBorderedBoxB 16,145,170,155,177,169,'B'
|
|
DrawBorderedBoxB 16,159,170,169,177,169,'X'
|
|
DrawBorderedBoxB 16,173,170,183,177,169,'Y'
|
|
DrawBorderedBoxB 16,187,170,197,177,169,'L'
|
|
DrawBorderedBoxB 16,201,170,211,177,169,'R'
|
|
DrawBorderedBoxB2 16,215,170,227,177,169,'T'
|
|
DrawBorderedBoxB2 16,231,170,243,177,169,'L'
|
|
|
|
DrawBorderedBoxB 16,10,189,20,196,188,'1'
|
|
DrawBorderedBoxB 16,24,189,34,196,188,'2'
|
|
DrawBorderedBoxB 16,38,189,48,196,188,'3'
|
|
DrawBorderedBoxB 16,52,189,62,196,188,'4'
|
|
DrawBorderedBoxB 16,66,189,76,196,188,'5'
|
|
DrawBorderedBoxB 16,80,189,90,196,188,'9'
|
|
|
|
DrawBorderedBoxB 16,107,189,117,196,188,250
|
|
DrawBorderedBoxB 16,121,189,131,196,188,'1'
|
|
DrawBorderedBoxB 16,135,189,145,196,188,'2'
|
|
DrawBorderedBoxB 16,149,189,159,196,188,'3'
|
|
DrawBorderedBoxB 16,163,189,173,196,188,'4'
|
|
DrawBorderedBoxB 16,177,189,187,196,188,'5'
|
|
|
|
DrawBorderedBoxB 16,204,189,218,196,188,255
|
|
|
|
; Normal Text
|
|
mov byte[GUItextcolor],217
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero5
|
|
mov byte[GUItextcolor],211
|
|
.zero5
|
|
sub byte[GUItextcolor],15
|
|
GUIOuttextwin2 16,10,13,GUIComboText1
|
|
GUIOuttextwin2 16,138,13,GUIComboText2
|
|
GUIOuttextwin2 16,38,84,GUIComboTextE
|
|
GUIOuttextwin2 16,10,84,GUIComboTextF
|
|
GUIOuttextwin2 16,10,103,GUIComboText4
|
|
GUIOuttextwin2 16,10,152,GUIComboText5
|
|
GUIOuttextwin2 16,10,162,GUIComboText6
|
|
GUIOuttextwin2 16,10,172,GUIComboText7
|
|
GUIOuttextwin2 16,10,182,GUIComboText8
|
|
GUIOuttextwin2 16,114,182,GUIComboText9
|
|
GUIOuttextwin2 16,204,182,GUIComboTextG
|
|
GUIOuttextwin2 16,145,85,GUIComboTextI
|
|
GUIOuttextwin2 16,176,93,GUIComboTextJ
|
|
GUIOuttextwin2 16,176,101,GUIComboTextK
|
|
|
|
add byte[GUItextcolor],15
|
|
GUIOuttextwin2 16,9,12,GUIComboText1
|
|
GUIOuttextwin2 16,137,12,GUIComboText2
|
|
GUIOuttextwin2 16,37,83,GUIComboTextE
|
|
GUIOuttextwin2 16,9,83,GUIComboTextF
|
|
GUIOuttextwin2 16,9,102,GUIComboText4
|
|
GUIOuttextwin2 16,9,151,GUIComboText5
|
|
GUIOuttextwin2 16,9,161,GUIComboText6
|
|
GUIOuttextwin2 16,9,171,GUIComboText7
|
|
GUIOuttextwin2 16,9,181,GUIComboText8
|
|
GUIOuttextwin2 16,113,181,GUIComboText9
|
|
GUIOuttextwin2 16,203,181,GUIComboTextG
|
|
GUIOuttextwin2 16,144,84,GUIComboTextI
|
|
GUIOuttextwin2 16,175,92,GUIComboTextJ
|
|
GUIOuttextwin2 16,175,100,GUIComboTextK
|
|
|
|
; Buttons
|
|
DrawGUIButton 16,202,20,246,31,GUIComboTextA,60,-1,0
|
|
DrawGUIButton 16,202,35,246,46,GUIComboTextB,61,-1,0
|
|
DrawGUIButton 16,202,50,246,61,GUIComboTextC,62,-1,0
|
|
DrawGUIButton 16,202,65,246,76,GUIComboTextD,63,-1,0
|
|
|
|
; Calculate Text Cursor Position / Draw Box Text
|
|
xor eax,eax
|
|
.nozerocp
|
|
cmp byte[GUIComboTextH+eax],0
|
|
je .zerocp
|
|
inc eax
|
|
jmp .nozerocp
|
|
.zerocp
|
|
mov [GUIComboPos],al
|
|
test byte[GUICCFlash],8
|
|
jnz .nound
|
|
mov byte[GUIComboTextH+eax],'_'
|
|
mov byte[GUIComboTextH+eax+1],0
|
|
.nound
|
|
GUIOuttextwin2c 16,39,94,GUIComboTextH
|
|
xor eax,eax
|
|
mov al,[GUIComboPos]
|
|
mov byte[GUIComboTextH+eax],0
|
|
|
|
; Display Current Combo Key
|
|
mov eax,[GUIComboKey]
|
|
mov ebx,[ScanCodeListing+eax*3]
|
|
mov [GUIGameDisplayKy],ebx
|
|
mov byte[GUIGameDisplayKy+3],0
|
|
GUIOuttextwin2c 16,14,94,GUIGameDisplayKy
|
|
|
|
; Buttons
|
|
mov byte[GUItextcolor],217
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero20
|
|
mov byte[GUItextcolor],211
|
|
.zero20
|
|
DrawGUIButton 16,202,20,246,31,GUIComboTextA,60,-1,0
|
|
DrawGUIButton 16,202,35,246,46,GUIComboTextB,61,-1,0
|
|
DrawGUIButton 16,202,50,246,61,GUIComboTextC,62,-1,0
|
|
DrawGUIButton 16,202,65,246,76,GUIComboTextD,63,-1,0
|
|
|
|
; Hole Switches
|
|
GUIDisplayButtonHole 16,158,82,byte[GUIComboPNum],0
|
|
GUIDisplayButtonHole 16,176,82,byte[GUIComboPNum],1
|
|
GUIDisplayButtonHole 16,194,82,byte[GUIComboPNum],2
|
|
GUIDisplayButtonHole 16,212,82,byte[GUIComboPNum],3
|
|
GUIDisplayButtonHole 16,230,82,byte[GUIComboPNum],4
|
|
; Check Box
|
|
DrawCheckBox 16,163,88,GUIComboLHorz
|
|
DrawCheckBox 16,163,96,GUIComboGameSpec
|
|
|
|
; Draw Combination Keys (Each 15x11 -> 210x36)
|
|
xor eax,eax
|
|
mov al,[GUINumCombo]
|
|
or eax,eax
|
|
jz near .comboend
|
|
xor ebx,ebx
|
|
mov ecx,11
|
|
mov edx,112
|
|
.comboiconloop
|
|
push eax
|
|
mov al,[GUIComboData+ebx]
|
|
dec al
|
|
mov esi,GUIIconDataComboPressRelease
|
|
cmp al,12
|
|
jb .doneicon
|
|
mov esi,GUIIconDataComboPress
|
|
sub al,12
|
|
cmp al,12
|
|
jb .doneicon
|
|
mov esi,GUIIconDataComboRelease
|
|
sub al,12
|
|
cmp al,12
|
|
jb .doneicon
|
|
mov esi,GUIIconDataComboFrame
|
|
cmp al,17
|
|
jne .not9
|
|
mov al,20
|
|
jmp .doneicon
|
|
.not9
|
|
cmp al,18
|
|
jb .doneicon
|
|
sub al,7
|
|
mov esi,GUIIconDataComboSecond
|
|
cmp al,11
|
|
jne .notback
|
|
mov al,250-37
|
|
jmp .doneicon
|
|
.notback
|
|
.doneicon
|
|
cmp al,11
|
|
jbe .control
|
|
add al,37
|
|
.control
|
|
DetermineChar 0,251
|
|
DetermineChar 1,252
|
|
DetermineChar 2,253
|
|
DetermineChar 3,254
|
|
DetermineChar 4,'A'
|
|
DetermineChar 5,'B'
|
|
DetermineChar 6,'X'
|
|
DetermineChar 7,'Y'
|
|
DetermineChar 8,'L'
|
|
DetermineChar 9,'R'
|
|
DetermineChar 10,'T'
|
|
DetermineChar 11,'E'
|
|
mov [GUIComboText3],al
|
|
pushad
|
|
mov eax,edx
|
|
add ecx,8
|
|
add eax,5
|
|
|
|
mov byte[GUItextcolor],223
|
|
push ecx
|
|
push eax
|
|
GUIOuttextwin2 16,ecx,eax,GUIComboText3
|
|
pop eax
|
|
pop ecx
|
|
mov byte[GUItextcolor],221
|
|
cmp byte[GUIWincoladd],0
|
|
je .zerocol
|
|
mov byte[GUItextcolor],222
|
|
.zerocol
|
|
dec ecx
|
|
dec eax
|
|
GUIOuttextwin2 16,ecx,eax,GUIComboText3
|
|
|
|
popad
|
|
push ecx
|
|
push edx
|
|
push ebx
|
|
GUIDisplayIconWin 16,ecx,edx,esi
|
|
pop ebx
|
|
pop edx
|
|
pop ecx
|
|
pop eax
|
|
add ecx,15
|
|
cmp ecx,11+15*14
|
|
jne .notoverflowx
|
|
sub ecx,15*14
|
|
add edx,11
|
|
.notoverflowx
|
|
inc ebx
|
|
dec eax
|
|
jnz near .comboiconloop
|
|
.comboend
|
|
|
|
; Display Bordered Box
|
|
cmp dword[NumCombo],0
|
|
je near .nowinbox
|
|
mov ebx,[GUIccombcursloc]
|
|
sub ebx,[GUIccombviewloc]
|
|
mov eax,ebx
|
|
lea ebx,[ebx*8]
|
|
sub ebx,eax
|
|
add ebx,23
|
|
DrawGUIWinBox2 16,10,190,7,224
|
|
.nowinbox
|
|
|
|
; Display Scroll Lines
|
|
; Copy Description to GUIScrolBufA, Others to GUIScrolBufB
|
|
mov edi,[GUIccombviewloc]
|
|
shl edi,6
|
|
add edi,[GUIccombviewloc]
|
|
add edi,[GUIccombviewloc]
|
|
add edi,CombinDataGlob
|
|
cmp byte[GUIComboGameSpec],0
|
|
je .nogamespec
|
|
sub edi,CombinDataGlob
|
|
add edi,CombinDataLocl
|
|
.nogamespec
|
|
|
|
mov ecx,12
|
|
mov eax,25
|
|
mov ebx,[NumCombo]
|
|
sub ebx,[GUIccombviewloc]
|
|
cmp ebx,0
|
|
jle near .noscrolldisplay
|
|
cmp ebx,8
|
|
jbe .scrolloop
|
|
mov ebx,8
|
|
.scrolloop
|
|
push ebx
|
|
push edi
|
|
push eax
|
|
|
|
xor eax,eax
|
|
mov ax,[edi+62]
|
|
mov eax,[ScanCodeListing+eax*3]
|
|
mov [GUIScrolBufB],eax
|
|
mov byte[GUIScrolBufB+3],32
|
|
mov dword[GUIScrolBufB+4],20202020h
|
|
mov al,[edi+64]
|
|
add al,49
|
|
mov [GUIScrolBufB+4],al
|
|
mov byte[GUIScrolBufB+7],'N'
|
|
cmp byte[edi+65],0
|
|
je .yesnoff
|
|
mov byte[GUIScrolBufB+7],'Y'
|
|
.yesnoff
|
|
mov bl,20
|
|
mov eax,GUIScrolBufA
|
|
.scloopb
|
|
mov bh,[edi]
|
|
mov [eax],bh
|
|
inc edi
|
|
inc eax
|
|
dec bl
|
|
jnz .scloopb
|
|
pop eax
|
|
|
|
mov byte[GUItextcolor],223
|
|
push ecx
|
|
push eax
|
|
GUIOuttextwin2 16,ecx,eax,GUIScrolBufA
|
|
pop eax
|
|
pop ecx
|
|
push ecx
|
|
push eax
|
|
add ecx,128
|
|
GUIOuttextwin2 16,ecx,eax,GUIScrolBufB
|
|
pop eax
|
|
pop ecx
|
|
mov byte[GUItextcolor],221
|
|
cmp byte[GUIWincoladd],0
|
|
je .zerocolb
|
|
mov byte[GUItextcolor],222
|
|
.zerocolb
|
|
push ecx
|
|
push eax
|
|
dec ecx
|
|
dec eax
|
|
push ecx
|
|
push eax
|
|
GUIOuttextwin2 16,ecx,eax,GUIScrolBufA
|
|
pop eax
|
|
pop ecx
|
|
add ecx,128
|
|
GUIOuttextwin2 16,ecx,eax,GUIScrolBufB
|
|
pop eax
|
|
pop ecx
|
|
pop edi
|
|
pop ebx
|
|
add eax,7
|
|
add edi,66
|
|
dec ebx
|
|
jnz near .scrolloop
|
|
.noscrolldisplay
|
|
ret
|
|
|
|
SECTION .bss
|
|
GUIccombviewloc resd 1
|
|
GUIccombcursloc resd 1
|
|
GUIccomblcursloc resd 1
|
|
NEWSYM NumCombo, resd 1
|
|
NumComboGlob resd 1
|
|
NEWSYM NumComboLocl, resd 1
|
|
GUICSStC resd 3
|
|
GUIComboKey resd 1
|
|
GUIComboPos resb 1
|
|
GUIComboPNum resb 1
|
|
GUIComboLHorz resb 1
|
|
NEWSYM GUINumCombo, resb 1
|
|
GUIComboData resb 50
|
|
GUIScrolBufA resb 21
|
|
GUIScrolBufB resb 10
|
|
|
|
SECTION .data
|
|
GUIComboText1 db 'DESCRIPTION',0
|
|
GUIComboText2 db 'KEY P# LH',0
|
|
GUIComboText3 db ' ',0
|
|
GUIComboText3b db 'S ',0
|
|
GUIComboText4 db 'COMBINATION KEYS:',0
|
|
GUIComboText5 db 'PRESS+REL',0
|
|
GUIComboText6 db 'PRESS ONLY',0
|
|
GUIComboText7 db 'REL ONLY',0
|
|
GUIComboText8 db 'FRAME DELAY',0
|
|
GUIComboText9 db 'SECOND DELAY',0
|
|
GUIComboTextA db 'CLEAR',0
|
|
GUIComboTextB db 'ADD',0
|
|
GUIComboTextC db 'REPLACE',0
|
|
GUIComboTextD db 'DELETE',0
|
|
GUIComboTextE db 'DESCRIPTION:',0
|
|
GUIComboTextF db 'KEY:',0
|
|
GUIComboTextG db 'DEL',0
|
|
GUIComboTextH db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
GUIComboTextI db 'P# 1 2 3 4 5',0
|
|
GUIComboTextJ db 254,' = LAST ',253,'/',254,0
|
|
GUIComboTextK db 'GAME SPECFIC',0
|
|
|
|
GUIIconDataComboPressRelease:
|
|
db 0 ,166,0 ,0 ,166,0 ,0 ,0 ,0 ,0
|
|
db 0 ,166,0 ,166,166,166,0 ,0 ,0 ,0
|
|
db 0 ,166,0 ,0 ,166,0 ,0 ,0 ,0 ,0
|
|
db 166,166,166,0 ,166,0 ,0 ,0 ,0 ,0
|
|
db 0 ,166,0 ,0 ,166,0 ,0 ,0 ,0 ,0
|
|
db 0 ,234,234,234,234,0 ,0 ,0 ,0 ,0
|
|
db 234,234,234,234,234,234,0 ,0 ,0 ,0
|
|
db 234,234,234,234,234,234,0 ,0 ,0 ,0
|
|
db 235,234,234,234,234,235,0 ,0 ,0 ,0
|
|
db 0 ,235,235,235,235,0 ,0 ,0 ,0 ,0
|
|
|
|
GUIIconDataComboPress:
|
|
db 0 ,0 ,166,0 ,0 ,0 ,0 ,0 ,0 ,0
|
|
db 0 ,0 ,166,0 ,0 ,0 ,0 ,0 ,0 ,0
|
|
db 0 ,0 ,166,0 ,0 ,0 ,0 ,0 ,0 ,0
|
|
db 0 ,166,166,166,0 ,0 ,0 ,0 ,0 ,0
|
|
db 0 ,0 ,166,0 ,0 ,0 ,0 ,0 ,0 ,0
|
|
db 0 ,236,236,236,236,0 ,0 ,0 ,0 ,0
|
|
db 236,236,236,236,236,236,0 ,0 ,0 ,0
|
|
db 236,236,236,236,236,236,0 ,0 ,0 ,0
|
|
db 237,236,236,236,236,237,0 ,0 ,0 ,0
|
|
db 0 ,237,237,237,237,0 ,0 ,0 ,0 ,0
|
|
|
|
GUIIconDataComboRelease:
|
|
db 0 ,0 ,0 ,166,0 ,0 ,0 ,0 ,0 ,0
|
|
db 0 ,0 ,166,166,166,0 ,0 ,0 ,0 ,0
|
|
db 0 ,0 ,0 ,166,0 ,0 ,0 ,0 ,0 ,0
|
|
db 0 ,0 ,0 ,166,0 ,0 ,0 ,0 ,0 ,0
|
|
db 0 ,0 ,0 ,166,0 ,0 ,0 ,0 ,0 ,0
|
|
db 0 ,238,238,238,238,0 ,0 ,0 ,0 ,0
|
|
db 238,238,238,238,238,238,0 ,0 ,0 ,0
|
|
db 238,238,238,238,238,238,0 ,0 ,0 ,0
|
|
db 239,238,238,238,238,239,0 ,0 ,0 ,0
|
|
db 0 ,239,239,239,239,0 ,0 ,0 ,0 ,0
|
|
|
|
GUIIconDataComboFrame:
|
|
db 0 ,0 ,0 ,0 ,58 ,0 ,0 ,0 ,0 ,0
|
|
db 0 ,0 ,0 ,0 ,56 ,46 ,0 ,0 ,0 ,0
|
|
db 0 ,0 ,0 ,0 ,54 ,44 ,0 ,0 ,0 ,0
|
|
db 0 ,0 ,0 ,52 ,0 ,42 ,0 ,0 ,0 ,0
|
|
db 0 ,0 ,0 ,50 ,40 ,0 ,0 ,0 ,0 ,0
|
|
db 0 ,0 ,0 ,48 ,38 ,0 ,0 ,0 ,0 ,0
|
|
db 0 ,0 ,0 ,46 ,36 ,0 ,0 ,0 ,0 ,0
|
|
db 0 ,0 ,44 ,0 ,34 ,0 ,0 ,0 ,0 ,0
|
|
db 0 ,0 ,42 ,32 ,0 ,0 ,0 ,0 ,0 ,0
|
|
db 0 ,0 ,40 ,32 ,0 ,0 ,0 ,0 ,0 ,0
|
|
|
|
GUIIconDataComboSecond:
|
|
db 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0
|
|
db 0 ,0 ,51 ,45 ,0 ,0 ,0 ,0 ,0 ,0
|
|
db 0 ,0 ,51 ,45 ,0 ,0 ,0 ,0 ,0 ,0
|
|
db 0 ,54 ,52 ,48 ,46 ,0 ,0 ,0 ,0 ,0
|
|
db 53 ,46 ,50 ,50 ,48 ,45 ,0 ,0 ,0 ,0
|
|
db 52 ,50 ,45 ,48 ,46 ,44 ,0 ,0 ,0 ,0
|
|
db 51 ,50 ,50 ,46 ,50 ,43 ,0 ,0 ,0 ,0
|
|
db 50 ,50 ,50 ,50 ,50 ,42 ,0 ,0 ,0 ,0
|
|
db 0 ,48 ,46 ,44 ,42 ,0 ,0 ,0 ,0 ,0
|
|
db 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0
|
|
|
|
|
|
SECTION .text
|
|
|
|
EEMode:
|
|
pushad
|
|
call GetTime
|
|
cmp eax,360
|
|
popad
|
|
ja .noEE
|
|
mov eax,1
|
|
ret
|
|
.noEE
|
|
mov eax,0
|
|
ret
|
|
|
|
DisplayGUIAddOns: ;Select Special Controllers
|
|
GUIDrawWindowBox 17,GUIAddOnsDisp
|
|
|
|
|
|
;Text Display
|
|
mov byte[GUItextcolor],217 ;Shadow
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero
|
|
mov byte[GUItextcolor],211
|
|
.zero
|
|
sub byte[GUItextcolor],15
|
|
call EEMode
|
|
cmp eax,0
|
|
je near .noEE ;You know it!
|
|
GUIOuttextwin2 17,21,18,GUIAddOnText1Alt
|
|
GUIOuttextwin2 17,21,28,GUIAddOnText2Alt
|
|
GUIOuttextwin2 17,21,38,GUIAddOnText3Alt
|
|
GUIOuttextwin2 17,21,48,GUIAddOnText4Alt
|
|
GUIOuttextwin2 17,21,58,GUIAddOnText5Alt
|
|
jmp .endEE
|
|
.noEE ;Regular
|
|
GUIOuttextwin2u 17,21,18,GUIAddOnText1,0
|
|
GUIOuttextwin2u 17,21,28,GUIAddOnText2,20
|
|
GUIOuttextwin2u 17,21,38,GUIAddOnText3,20
|
|
GUIOuttextwin2u 17,21,48,GUIAddOnText4,0
|
|
GUIOuttextwin2u 17,21,58,GUIAddOnText5,0
|
|
.endEE
|
|
|
|
add byte[GUItextcolor],15 ;Text
|
|
call EEMode
|
|
cmp eax,0
|
|
je near .noEE2 ;You know it!
|
|
GUIOuttextwin2 17,20,17,GUIAddOnText1Alt
|
|
GUIOuttextwin2 17,20,27,GUIAddOnText2Alt
|
|
GUIOuttextwin2 17,20,37,GUIAddOnText3Alt
|
|
GUIOuttextwin2 17,20,47,GUIAddOnText4Alt
|
|
GUIOuttextwin2 17,20,57,GUIAddOnText5Alt
|
|
jmp .endEE2
|
|
.noEE2 ;Regular
|
|
GUIOuttextwin2 17,20,17,GUIAddOnText1
|
|
GUIOuttextwin2 17,20,27,GUIAddOnText2
|
|
GUIOuttextwin2 17,20,37,GUIAddOnText3
|
|
GUIOuttextwin2 17,20,47,GUIAddOnText4
|
|
GUIOuttextwin2 17,20,57,GUIAddOnText5
|
|
.endEE2
|
|
|
|
|
|
;Ratio Buttons
|
|
GUIDisplayButtonHole 17,9,15,byte[snesmouse],0
|
|
GUIDisplayButtonHole 17,9,25,byte[snesmouse],1
|
|
GUIDisplayButtonHole 17,9,35,byte[snesmouse],2
|
|
GUIDisplayButtonHole 17,9,45,byte[snesmouse],3
|
|
GUIDisplayButtonHole 17,9,55,byte[snesmouse],4
|
|
ret
|
|
|
|
SECTION .data
|
|
GUIAddOnText1 db 'NONE',0
|
|
GUIAddOnText2 db 'SNES MOUSE AT PORT #1',0
|
|
GUIAddOnText3 db 'SNES MOUSE AT PORT #2',0
|
|
GUIAddOnText4 db 'SUPER SCOPE',0
|
|
GUIAddOnText5 db 'LETHAL ENFORCER GUN',0
|
|
|
|
;EE
|
|
GUIAddOnText1Alt db 79,70,70,0
|
|
GUIAddOnText2Alt db 84,79,65,83,84,32,77,89,32,66,82,69,65,68,0
|
|
GUIAddOnText3Alt db 71,73,77, 77,69,32,70,82,73,69,83,32,87,73,84,72,32,84,72,65,84,0
|
|
GUIAddOnText4Alt db 65,78,68,32,65,32,77,85,70,70,73,78,0
|
|
GUIAddOnText5Alt db 87,73,84,72,32,86,73,84,65,77,73,78,83,0
|
|
|
|
SECTION .text
|
|
|
|
DisplayGUIChipConfig:
|
|
GUIDrawWindowBox 18,GUIChipConfigDisp
|
|
|
|
;Text Display
|
|
mov byte[GUItextcolor],217 ;Shadow
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero
|
|
mov byte[GUItextcolor],211
|
|
.zero
|
|
sub byte[GUItextcolor],15
|
|
|
|
call EEMode ; You know it!
|
|
cmp eax,0
|
|
je near .noEE
|
|
GUIOuttextwin2 18,10,38,GUIChipText1Alt
|
|
GUIOuttextwin2 18,21,48,GUIChipText2Alt
|
|
GUIOuttextwin2 18,71,48,GUIChipText3Alt
|
|
GUIOuttextwin2 18,121,48,GUIChipText4Alt
|
|
GUIOuttextwin2 18,21,58,GUIChipText5Alt
|
|
GUIOuttextwin2 18,71,58,GUIChipText6Alt
|
|
GUIOuttextwin2 18,121,58,GUIChipText7Alt
|
|
jmp .endEE
|
|
.noEE ; Regular Window Shadow
|
|
GUIOuttextwin2u 18,21,48,GUIChipTextA1,4
|
|
GUIOuttextwin2u 18,71,48,GUIChipTextA2,4
|
|
GUIOuttextwin2u 18,121,48,GUIChipTextA3,4
|
|
GUIOuttextwin2u 18,21,58,GUIChipTextA4,4
|
|
GUIOuttextwin2u 18,71,58,GUIChipTextA5,4
|
|
GUIOuttextwin2u 18,121,58,GUIChipTextA6,4
|
|
.endEE
|
|
|
|
add byte[GUItextcolor],15 ; Text
|
|
call EEMode
|
|
cmp eax,0
|
|
je near .noEE2 ; You know it!
|
|
GUIOuttextwin2 18,9,37,GUIChipText1Alt
|
|
GUIOuttextwin2 18,20,47,GUIChipText2Alt
|
|
GUIOuttextwin2 18,70,47,GUIChipText3Alt
|
|
GUIOuttextwin2 18,120,47,GUIChipText4Alt
|
|
GUIOuttextwin2 18,20,57,GUIChipText5Alt
|
|
GUIOuttextwin2 18,70,57,GUIChipText6Alt
|
|
GUIOuttextwin2 18,120,57,GUIChipText7Alt
|
|
jmp .endEE2
|
|
.noEE2 ; Regular Window Text
|
|
GUIOuttextwin2 18,20,47,GUIChipTextA1
|
|
GUIOuttextwin2 18,70,47,GUIChipTextA2
|
|
GUIOuttextwin2 18,120,47,GUIChipTextA3
|
|
GUIOuttextwin2 18,20,57,GUIChipTextA4
|
|
GUIOuttextwin2 18,70,57,GUIChipTextA5
|
|
GUIOuttextwin2 18,120,57,GUIChipTextA6
|
|
|
|
mov al,[GUIWincol] ;Yellow Shadow
|
|
mov byte[GUItextcolor],al
|
|
GUIOuttextwin2 18,10,38,GUIChipTextA
|
|
|
|
mov byte[GUItextcolor],163 ; Yellow Text
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero8
|
|
mov byte[GUItextcolor],164
|
|
.zero8
|
|
GUIOuttextwin2 18,9,37,GUIChipTextA
|
|
.endEE2
|
|
|
|
;Checkboxes
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[nssdip1],0
|
|
je .nodip1
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nodip1
|
|
GUIDisplayIconWin 18,9,43,[GUITemp]
|
|
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[nssdip2],0
|
|
je .nodip2
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nodip2
|
|
GUIDisplayIconWin 18,59,43,[GUITemp]
|
|
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[nssdip3],0
|
|
je .nodip3
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nodip3
|
|
GUIDisplayIconWin 18,109,43,[GUITemp]
|
|
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[nssdip4],0
|
|
je .nodip4
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nodip4
|
|
GUIDisplayIconWin 18,9,53,[GUITemp]
|
|
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[nssdip5],0
|
|
je .nodip5
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nodip5
|
|
GUIDisplayIconWin 18,59,53,[GUITemp]
|
|
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[nssdip6],0
|
|
je .nodip6
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nodip6
|
|
GUIDisplayIconWin 18,109,53,[GUITemp]
|
|
ret
|
|
|
|
SECTION .data
|
|
GUIChipTextA db 'SUPER SYSTEM :',0
|
|
GUIChipTextA1 db 'DIP 1',0
|
|
GUIChipTextA2 db 'DIP 2',0
|
|
GUIChipTextA3 db 'DIP 3',0
|
|
GUIChipTextA4 db 'DIP 4',0
|
|
GUIChipTextA5 db 'DIP 5',0
|
|
GUIChipTextA6 db 'DIP 6',0
|
|
|
|
;EE
|
|
GUIChipText1Alt db 69,88,84,82,65,83,0
|
|
GUIChipText2Alt db 83,65,76,84,0
|
|
GUIChipText3Alt db 71,65,82,76,73,67,0
|
|
GUIChipText4Alt db 80,69,80,80,69,82,0
|
|
GUIChipText5Alt db 67,72,69,69,83,69,0
|
|
GUIChipText6Alt db 66,85,84,84,69,82,0
|
|
GUIChipText7Alt db 67,65,84,83,85,80,0
|
|
|
|
SECTION .text
|
|
|
|
BlinkCursorCheck:
|
|
cmp dword[GUIInputBox],0
|
|
jne .checkboxes
|
|
mov ebx,0
|
|
ret
|
|
|
|
.checkboxes
|
|
cmp dword[GUIInputBox],1
|
|
jne .notBox1
|
|
mov ebx,SRAMDir
|
|
ret
|
|
.notBox1
|
|
cmp dword[GUIInputBox],2
|
|
jne .notBox2
|
|
mov ebx,SnapPath
|
|
ret
|
|
.notBox2
|
|
cmp dword[GUIInputBox],3
|
|
jne .notBox3
|
|
mov ebx,SPCPath
|
|
ret
|
|
.notBox3
|
|
cmp dword[GUIInputBox],4
|
|
jne .notBox4
|
|
mov ebx,BSXPath
|
|
ret
|
|
.notBox4
|
|
cmp dword[GUIInputBox],5
|
|
jne .notBox5
|
|
mov ebx,SGPath
|
|
ret
|
|
.notBox5
|
|
cmp dword[GUIInputBox],6
|
|
jne .notBox6
|
|
mov ebx,STPath
|
|
ret
|
|
.notBox6
|
|
cmp dword[GUIInputBox],7
|
|
jne .notBox7
|
|
mov ebx,GNextPath
|
|
ret
|
|
.notBox7
|
|
cmp dword[GUIInputBox],8
|
|
jne .notBox8
|
|
mov ebx,FEOEZPath
|
|
ret
|
|
.notBox8
|
|
cmp dword[GUIInputBox],9
|
|
jne .notBox9
|
|
mov ebx,SJNSPath
|
|
ret
|
|
.notBox9
|
|
cmp dword[GUIInputBox],10
|
|
jne .notBox10
|
|
mov ebx,MDHPath
|
|
ret
|
|
.notBox10
|
|
cmp dword[GUIInputBox],11
|
|
jne .notBox11
|
|
mov ebx,SPL4Path
|
|
.notBox11
|
|
ret
|
|
|
|
|
|
DisplayGUIPaths:
|
|
GUIDrawWindowBox 19,GUIPathsDisp
|
|
sub byte[GUItextcolor],15
|
|
GUIOuttextwin2 19,8,18,GUIPathsText1
|
|
GUIOuttextwin2 19,8,38,GUIPathsText2
|
|
GUIOuttextwin2 19,8,58,GUIPathsText3
|
|
GUIOuttextwin2 19,60,78,GUIPathsText4
|
|
GUIOuttextwin2 19,8,88,GUIPathsText5
|
|
GUIOuttextwin2 19,135,88,GUIPathsText6
|
|
GUIOuttextwin2 19,8,113,GUIPathsText8
|
|
GUIOuttextwin2 19,135,113,GUIPathsText7
|
|
GUIOuttextwin2 19,45,138,GUIPathsText9
|
|
GUIOuttextwin2 19,8,148,GUIPathsTextA
|
|
GUIOuttextwin2 19,135,148,GUIPathsTextB
|
|
GUIOuttextwin2 19,8,173,GUIPathsTextC
|
|
GUIOuttextwin2 19,135,173,GUIPathsTextD
|
|
|
|
add byte[GUItextcolor],15
|
|
GUIOuttextwin2 19,7,17,GUIPathsText1
|
|
GUIOuttextwin2 19,7,37,GUIPathsText2
|
|
GUIOuttextwin2 19,7,57,GUIPathsText3
|
|
GUIOuttextwin2 19,59,77,GUIPathsText4
|
|
GUIOuttextwin2 19,7,87,GUIPathsText5
|
|
GUIOuttextwin2 19,134,87,GUIPathsText6
|
|
GUIOuttextwin2 19,7,112,GUIPathsText8
|
|
GUIOuttextwin2 19,134,112,GUIPathsText7
|
|
GUIOuttextwin2 19,44,137,GUIPathsText9
|
|
GUIOuttextwin2 19,7,147,GUIPathsTextA
|
|
GUIOuttextwin2 19,134,147,GUIPathsTextB
|
|
GUIOuttextwin2 19,7,172,GUIPathsTextC
|
|
GUIOuttextwin2 19,134,172,GUIPathsTextD
|
|
|
|
; Draw borders
|
|
mov dword[GUIWincol],148+10
|
|
cmp byte[cwindrawn],1
|
|
jne .noone3
|
|
mov dword[GUIWincol],148+5
|
|
.noone3
|
|
cmp byte[cwindrawn],0
|
|
jne .nozero3
|
|
mov dword[GUIWincol],148
|
|
.nozero3
|
|
mov dl,[GUIWincol] ; Saves Border
|
|
DrawGUIWinBox 19,75,14,231,14,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,1
|
|
DrawGUIWinBox 19,74,15,74,25,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,4
|
|
DrawGUIWinBox 19,75,26,231,26,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,3
|
|
DrawGUIWinBox 19,232,15,232,25,dl
|
|
mov dl,[GUIWincol] ; Snapshots Border
|
|
DrawGUIWinBox 19,75,34,231,34,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,1
|
|
DrawGUIWinBox 19,74,35,74,45,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,4
|
|
DrawGUIWinBox 19,75,46,231,46,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,3
|
|
DrawGUIWinBox 19,232,35,232,45,dl
|
|
mov dl,[GUIWincol] ; SPCs Border
|
|
DrawGUIWinBox 19,75,54,231,54,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,1
|
|
DrawGUIWinBox 19,74,55,74,65,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,4
|
|
DrawGUIWinBox 19,75,66,231,66,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,3
|
|
DrawGUIWinBox 19,232,55,232,65,dl
|
|
mov dl,[GUIWincol] ; BS-X Border
|
|
DrawGUIWinBox 19,8,94,106,94,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,1
|
|
DrawGUIWinBox 19,7,95,74,105,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,4
|
|
DrawGUIWinBox 19,8,106,106,106,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,3
|
|
DrawGUIWinBox 19,107,95,107,105,dl
|
|
mov dl,[GUIWincol] ; SAME GAME Border
|
|
DrawGUIWinBox 19,8,119,106,119,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,1
|
|
DrawGUIWinBox 19,7,120,7,130,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,4
|
|
DrawGUIWinBox 19,8,131,106,131,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,3
|
|
DrawGUIWinBox 19,107,120,107,130,dl
|
|
mov dl,[GUIWincol] ; FEOEZ Border
|
|
DrawGUIWinBox 19,8,154,106,154,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,1
|
|
DrawGUIWinBox 19,7,155,7,165,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,4
|
|
DrawGUIWinBox 19,8,166,106,166,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,3
|
|
DrawGUIWinBox 19,107,155,107,165,dl
|
|
mov dl,[GUIWincol] ; MDH Border
|
|
DrawGUIWinBox 19,8,179,106,179,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,1
|
|
DrawGUIWinBox 19,7,180,7,190,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,4
|
|
DrawGUIWinBox 19,8,191,106,191,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,3
|
|
DrawGUIWinBox 19,107,180,107,190,dl
|
|
mov dl,[GUIWincol] ; Sufami Turbo Border
|
|
DrawGUIWinBox 19,135,94,235,94,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,1
|
|
DrawGUIWinBox 19,134,95,134,105,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,4
|
|
DrawGUIWinBox 19,135,106,235,106,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,3
|
|
DrawGUIWinBox 19,236,95,236,105,dl
|
|
mov dl,[GUIWincol] ; SD GUNDAM Border
|
|
DrawGUIWinBox 19,135,119,235,119,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,1
|
|
DrawGUIWinBox 19,134,120,134,130,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,4
|
|
DrawGUIWinBox 19,135,131,235,131,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,3
|
|
DrawGUIWinBox 19,236,120,236,130,dl
|
|
mov dl,[GUIWincol] ; FEOEZ SJNS Border
|
|
DrawGUIWinBox 19,135,154,235,154,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,1
|
|
DrawGUIWinBox 19,134,155,134,165,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,4
|
|
DrawGUIWinBox 19,135,166,235,166,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,3
|
|
DrawGUIWinBox 19,236,155,236,165,dl
|
|
mov dl,[GUIWincol] ; SPL4 Border
|
|
DrawGUIWinBox 19,135,179,235,179,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,1
|
|
DrawGUIWinBox 19,134,180,134,190,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,4
|
|
DrawGUIWinBox 19,135,191,235,191,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,3
|
|
DrawGUIWinBox 19,236,180,236,190,dl
|
|
; End draw borders
|
|
;Input boxes
|
|
DrawGUIWinBox 19,75,15,231,25,167
|
|
DrawGUIWinBox 19,75,35,231,45,167
|
|
DrawGUIWinBox 19,75,55,231,65,167
|
|
DrawGUIWinBox 19,8,95,106,105,167
|
|
DrawGUIWinBox 19,8,120,106,130,167
|
|
DrawGUIWinBox 19,135,95,235,105,167
|
|
DrawGUIWinBox 19,135,120,235,130,167
|
|
DrawGUIWinBox 19,8,155,106,165,167
|
|
DrawGUIWinBox 19,8,180,106,190,167
|
|
DrawGUIWinBox 19,135,155,235,165,167
|
|
DrawGUIWinBox 19,135,180,235,190,167
|
|
|
|
GUIOuttextwin2d 19,77,19,SRAMDir,25
|
|
GUIOuttextwin2d 19,77,39,SnapPath,25
|
|
GUIOuttextwin2d 19,77,59,SPCPath,25
|
|
GUIOuttextwin2d 19,10,99,BSXPath,15
|
|
GUIOuttextwin2d 19,10,124,SGPath,15
|
|
GUIOuttextwin2d 19,137,99,STPath,15
|
|
GUIOuttextwin2d 19,137,124,GNextPath,15
|
|
GUIOuttextwin2d 19,10,159,FEOEZPath,15
|
|
GUIOuttextwin2d 19,10,184,MDHPath,15
|
|
GUIOuttextwin2d 19,137,159,SJNSPath,15
|
|
GUIOuttextwin2d 19,137,184,SPL4Path,15
|
|
ret
|
|
|
|
SECTION .data
|
|
GUIPathsText1 db 'SAVES:',0
|
|
GUIPathsText2 db 'SNAPSHOTS:',0
|
|
GUIPathsText3 db 'SPCS:',0
|
|
GUIPathsText4 db '--BIOS/BASE CARTS--',0
|
|
GUIPathsText5 db 'BS-X:',0
|
|
GUIPathsText6 db 'SUFAMI TURBO:',0
|
|
GUIPathsText7 db 'SD GUNDAM G-NEXT:',0
|
|
GUIPathsText8 db 'SAME GAME:',0
|
|
GUIPathsText9 db '--SPC7110 GRAPHIC PACKS--',0
|
|
GUIPathsTextA db 'FEOEZ:',0
|
|
GUIPathsTextB db 'FEOEZ - SJNS:',0
|
|
GUIPathsTextC db 'MDH:',0
|
|
GUIPathsTextD db 'SPL4:',0
|
|
NEWSYM GUIBlinkCursor, times 2 db 0
|
|
|
|
DisplayGUISave: ;Save & Rewind options/Hotkeys
|
|
GUIDrawWindowBox 20,GUISaveDisp
|
|
|
|
;Text Display
|
|
mov byte[GUItextcolor],217 ;Shadow
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero
|
|
mov byte[GUItextcolor],211
|
|
.zero
|
|
sub byte[GUItextcolor],15
|
|
GUIOuttextwin2 20,8,19,GUISaveTextA1
|
|
GUIOuttextwin2 20,8,31,GUISaveTextA2
|
|
|
|
GUIOuttextwin2u 20,26,44,GUISaveTextB1,5
|
|
GUIOuttextwin2u 20,26,54,GUISaveTextB2,5
|
|
GUIOuttextwin2u 20,26,64,GUISaveTextB3,0
|
|
GUIOuttextwin2u 20,26,74,GUISaveTextB4,0
|
|
GUIOuttextwin2u 20,26,84,GUISaveTextB5,0
|
|
GUIOuttextwin2u 20,26,94,GUISaveTextB6,0
|
|
GUIOuttextwin2u 20,26,104,GUISaveTextB7,12
|
|
|
|
GUIOuttextwin2 20,9+45*3,141,GUISaveTextC4
|
|
GUIOuttextwin2 20,9,150,GUISaveTextC5
|
|
GUIOuttextwin2 20,9+57,150,GUISaveTextC6
|
|
GUIOuttextwin2 20,9+114,150,GUISaveTextC7
|
|
GUIOuttextwin2 20,9,159,GUISaveTextC8
|
|
|
|
mov byte[GUISaveTextC2+2],'0' ; ST# Shadow
|
|
GUIOuttextwin2 20,9,123,GUISaveTextC2
|
|
mov byte[GUISaveTextC2+2],'1'
|
|
GUIOuttextwin2 20,9+45,123,GUISaveTextC2
|
|
mov byte[GUISaveTextC2+2],'2'
|
|
GUIOuttextwin2 20,9+45*2,123,GUISaveTextC2
|
|
mov byte[GUISaveTextC2+2],'3'
|
|
GUIOuttextwin2 20,9+45*3,123,GUISaveTextC2
|
|
mov byte[GUISaveTextC2+2],'4'
|
|
GUIOuttextwin2 20,9,132,GUISaveTextC2
|
|
mov byte[GUISaveTextC2+2],'5'
|
|
GUIOuttextwin2 20,9+45,132,GUISaveTextC2
|
|
mov byte[GUISaveTextC2+2],'6'
|
|
GUIOuttextwin2 20,9+45*2,132,GUISaveTextC2
|
|
mov byte[GUISaveTextC2+2],'7'
|
|
GUIOuttextwin2 20,9+45*3,132,GUISaveTextC2
|
|
mov byte[GUISaveTextC2+2],'8'
|
|
GUIOuttextwin2 20,9,141,GUISaveTextC2
|
|
mov byte[GUISaveTextC2+2],'9'
|
|
GUIOuttextwin2 20,9+45,141,GUISaveTextC2
|
|
mov byte[GUISaveTextC2+2],'+'
|
|
GUIOuttextwin2 20,9+45*2,141,GUISaveTextC2
|
|
mov byte[GUISaveTextC2+2],'-'
|
|
GUIOuttextwin2 20,9+45*2,141,GUISaveTextC2
|
|
|
|
add byte[GUItextcolor],15 ;Text
|
|
GUIOuttextwin2 20,7,18,GUISaveTextA1
|
|
GUIOuttextwin2 20,7,30,GUISaveTextA2
|
|
|
|
GUIOuttextwin2 20,25,43,GUISaveTextB1
|
|
GUIOuttextwin2 20,25,53,GUISaveTextB2
|
|
GUIOuttextwin2 20,25,63,GUISaveTextB3
|
|
GUIOuttextwin2 20,25,73,GUISaveTextB4
|
|
GUIOuttextwin2 20,25,83,GUISaveTextB5
|
|
GUIOuttextwin2 20,25,93,GUISaveTextB6
|
|
GUIOuttextwin2 20,25,103,GUISaveTextB7
|
|
|
|
GUIOuttextwin2 20,8+45*3,140,GUISaveTextC4
|
|
GUIOuttextwin2 20,8,149,GUISaveTextC5
|
|
GUIOuttextwin2 20,8+57,149,GUISaveTextC6
|
|
GUIOuttextwin2 20,8+114,149,GUISaveTextC7
|
|
GUIOuttextwin2 20,8,158,GUISaveTextC8
|
|
|
|
|
|
mov byte[GUISaveTextC2+2],'0' ; ST# Text
|
|
GUIOuttextwin2 20,8,122,GUISaveTextC2
|
|
mov byte[GUISaveTextC2+2],'1'
|
|
GUIOuttextwin2 20,8+45,122,GUISaveTextC2
|
|
mov byte[GUISaveTextC2+2],'2'
|
|
GUIOuttextwin2 20,8+45*2,122,GUISaveTextC2
|
|
mov byte[GUISaveTextC2+2],'3'
|
|
GUIOuttextwin2 20,8+45*3,122,GUISaveTextC2
|
|
mov byte[GUISaveTextC2+2],'4'
|
|
GUIOuttextwin2 20,8,131,GUISaveTextC2
|
|
mov byte[GUISaveTextC2+2],'5'
|
|
GUIOuttextwin2 20,8+45,131,GUISaveTextC2
|
|
mov byte[GUISaveTextC2+2],'6'
|
|
GUIOuttextwin2 20,8+45*2,131,GUISaveTextC2
|
|
mov byte[GUISaveTextC2+2],'7'
|
|
GUIOuttextwin2 20,8+45*3,131,GUISaveTextC2
|
|
mov byte[GUISaveTextC2+2],'8'
|
|
GUIOuttextwin2 20,8,140,GUISaveTextC2
|
|
mov byte[GUISaveTextC2+2],'9'
|
|
GUIOuttextwin2 20,8+45,140,GUISaveTextC2
|
|
mov byte[GUISaveTextC2+2],'+'
|
|
GUIOuttextwin2 20,8+45*2,140,GUISaveTextC2
|
|
mov byte[GUISaveTextC2+2],'-'
|
|
GUIOuttextwin2 20,8+45*2,140,GUISaveTextC2
|
|
|
|
mov al,[GUIWincol] ;State Selects (Yellow) Shadow
|
|
mov byte[GUItextcolor],al
|
|
GUIOuttextwin2 20,6,112,GUISaveTextC1
|
|
|
|
mov byte[GUItextcolor],163 ;State Selects (Yellow) Text
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero8
|
|
mov byte[GUItextcolor],164
|
|
.zero8
|
|
GUIOuttextwin2 20,5,111,GUISaveTextC1
|
|
|
|
;Checkboxes
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[AutoIncSaveSlot],0
|
|
je .nocheckbox
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox
|
|
GUIDisplayIconWin 20,11,40,[GUITemp]
|
|
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[SRAMSave5Sec],0
|
|
je .nocheckbox1
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox1
|
|
GUIDisplayIconWin 20,11,50,[GUITemp]
|
|
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[LatestSave],0
|
|
je .nocheckbox2
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox2
|
|
GUIDisplayIconWin 20,11,60,[GUITemp]
|
|
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[AutoState],0
|
|
je .nocheckbox3
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox3
|
|
GUIDisplayIconWin 20,11,70,[GUITemp]
|
|
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[SRAMState],0
|
|
je .nocheckbox4
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox4
|
|
GUIDisplayIconWin 20,11,80,[GUITemp]
|
|
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[PauseLoad],0
|
|
je .nocheckbox5
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox5
|
|
GUIDisplayIconWin 20,11,90,[GUITemp]
|
|
|
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
|
cmp byte[PauseRewind],0
|
|
je .nocheckbox6
|
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
|
.nocheckbox6
|
|
GUIDisplayIconWin 20,11,100,[GUITemp]
|
|
|
|
|
|
|
|
; Draw borders
|
|
mov dword[GUIWincol],148+10 ; Setup for borders
|
|
cmp byte[cwindrawn],1
|
|
jne .noone3
|
|
mov dword[GUIWincol],148+5
|
|
.noone3
|
|
cmp byte[cwindrawn],0
|
|
jne .nozero3
|
|
mov dword[GUIWincol],148
|
|
.nozero3
|
|
|
|
mov dl,[GUIWincol] ; # of Rewind States (Border)
|
|
DrawGUIWinBox 20,150,28,165,28,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,1
|
|
DrawGUIWinBox 20,149,29,149,36,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,4
|
|
DrawGUIWinBox 20,150,37,165,37,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,3
|
|
DrawGUIWinBox 20,165,29,166,36,dl
|
|
|
|
mov dl,[GUIWincol] ; Second/Rewind (Border)
|
|
DrawGUIWinBox 20,150,16,165,16,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,1
|
|
DrawGUIWinBox 20,149,17,149,24,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,4
|
|
DrawGUIWinBox 20,150,25,165,25,dl
|
|
mov dl,[GUIWincol]
|
|
add dl,3
|
|
DrawGUIWinBox 20,165,17,166,24,dl
|
|
|
|
DGOptnsBorderBox 20,26,120 ; ST0
|
|
DGOptnsBorderBox 20,71,120 ; ST1
|
|
DGOptnsBorderBox 20,116,120 ; ST2
|
|
DGOptnsBorderBox 20,161,120 ; ST3
|
|
DGOptnsBorderBox 20,26,129 ; ST4
|
|
DGOptnsBorderBox 20,71,129 ; ST5
|
|
DGOptnsBorderBox 20,116,129 ; ST6
|
|
DGOptnsBorderBox 20,161,129 ; ST7
|
|
DGOptnsBorderBox 20,26,138 ; ST8
|
|
DGOptnsBorderBox 20,71,138 ; ST9
|
|
DGOptnsBorderBox 20,116,138 ; ST+
|
|
DGOptnsBorderBox 20,161,138 ; ST-
|
|
DGOptnsBorderBox 20,32,147 ; SAVE
|
|
DGOptnsBorderBox 20,89,147 ; LOAD
|
|
DGOptnsBorderBox 20,146,147 ; PICK
|
|
DGOptnsBorderBox 20,45,156 ; REWIND
|
|
|
|
|
|
;Boxes
|
|
DrawGUIWinBox 20,150,17,165,24,167 ; Rewind States Box
|
|
xor ax,ax
|
|
mov ah,[RewindStates]
|
|
mov al,48
|
|
add ah,48
|
|
.asciiloop
|
|
cmp ah,58
|
|
jb .hex2asciidone
|
|
add al,1
|
|
sub ah,10
|
|
jmp .asciiloop
|
|
.hex2asciidone
|
|
mov [GUISaveTextZ3],ax
|
|
mov byte[GUItextcolor],223
|
|
GUIOuttextwin2 20,154,19,GUISaveTextZ3
|
|
mov byte[GUItextcolor],221
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero4
|
|
mov byte[GUItextcolor],222
|
|
.zero4
|
|
GUIOuttextwin2 20,153,18,GUISaveTextZ3
|
|
mov byte[GUItextcolor],217
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero6
|
|
mov byte[GUItextcolor],211
|
|
.zero6
|
|
|
|
DrawGUIWinBox 20,150,29,165,36,167 ; Second/Rewind Box
|
|
xor ax,ax
|
|
mov ah,[RewindFrames]
|
|
mov al,48
|
|
add ah,48
|
|
.asciiloop2
|
|
cmp ah,58
|
|
jb .hex2asciidone2
|
|
add al,1
|
|
sub ah,10
|
|
jmp .asciiloop2
|
|
.hex2asciidone2
|
|
mov [GUISaveTextZ3],ax
|
|
mov byte[GUItextcolor],223
|
|
GUIOuttextwin2 20,154,31,GUISaveTextZ3
|
|
mov byte[GUItextcolor],221
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero5
|
|
mov byte[GUItextcolor],222
|
|
.zero5
|
|
GUIOuttextwin2 20,153,30,GUISaveTextZ3
|
|
mov byte[GUItextcolor],217
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero7
|
|
mov byte[GUItextcolor],211
|
|
.zero7
|
|
|
|
DDrawBox 20,27,121,[KeyStateSlc0] ; Boxes for State section
|
|
DDrawBox 20,27+45,121,[KeyStateSlc1]
|
|
DDrawBox 20,27+45*2,121,[KeyStateSlc2]
|
|
DDrawBox 20,27+45*3,121,[KeyStateSlc3]
|
|
DDrawBox 20,27,130,[KeyStateSlc4]
|
|
DDrawBox 20,27+45,130,[KeyStateSlc5]
|
|
DDrawBox 20,27+45*2,130,[KeyStateSlc6]
|
|
DDrawBox 20,27+45*3,130,[KeyStateSlc7]
|
|
DDrawBox 20,27,139,[KeyStateSlc8]
|
|
DDrawBox 20,27+45,139,[KeyStateSlc9]
|
|
DDrawBox 20,27+45*2,139,[KeyIncStateSlot]
|
|
DDrawBox 20,27+45*3,139,[KeyDecStateSlot]
|
|
DDrawBox 20,8+25,148,[KeySaveState]
|
|
DDrawBox 20,8+57+25,148,[KeyLoadState]
|
|
DDrawBox 20,8+114+25,148,[KeyStateSelct]
|
|
DDrawBox 20,8+38,157,[KeyRewind]
|
|
|
|
|
|
;Buttons
|
|
mov byte[GUItextcolor],217 ;set color for buttons
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero88
|
|
mov byte[GUItextcolor],211
|
|
.zero88
|
|
sub byte[GUItextcolor],15
|
|
add byte[GUItextcolor],15
|
|
DrawGUIButton 20,173,17,181,25,GUISaveTextZ1,70,-2,-1 ; + Rewind States
|
|
DrawGUIButton 20,184,17,192,25,GUISaveTextZ2,71,-2,-1 ; - Rewind States
|
|
DrawGUIButton 20,173,29,181,37,GUISaveTextZ1,72,-2,-1 ; + Second/Rewind
|
|
DrawGUIButton 20,184,29,192,37,GUISaveTextZ2,73,-2,-1 ; - Second/Rewind
|
|
ret
|
|
|
|
SECTION .data
|
|
GUISaveTextA1 db '# OF REWIND STATES',0
|
|
GUISaveTextA2 db '1/5 SECONDS PER REWIND',0
|
|
|
|
GUISaveTextB1 db 'AUTO INCRMNT SAVE SLOT',0
|
|
GUISaveTextB2 db 'SRAM CHECK+SAVE',0
|
|
GUISaveTextB3 db 'START AT LATEST SAVE',0
|
|
GUISaveTextB4 db 'AUTO STATE SAVE/LOAD',0
|
|
GUISaveTextB5 db 'LOAD SAVESTATE W/SRAM',0
|
|
GUISaveTextB6 db 'PAUSE AFTER LOADING STATE',0
|
|
GUISaveTextB7 db 'PAUSE AFTER REWIND',0
|
|
|
|
GUISaveTextC1 db 'STATE SELECTS :',0
|
|
GUISaveTextC2 db 'ST#',0 ; Used for all numbers, 0-9
|
|
GUISaveTextC3 db 'ST+',0
|
|
GUISaveTextC4 db 'ST-',0
|
|
GUISaveTextC5 db 'SAVE',0
|
|
GUISaveTextC6 db 'LOAD',0
|
|
GUISaveTextC7 db 'PICK',0
|
|
GUISaveTextC8 db 'REWIND',0
|
|
|
|
GUISaveTextZ1 db '+',0
|
|
GUISaveTextZ2 db '-',0
|
|
GUISaveTextZ3 db ' ',0
|
|
|
|
|
|
DisplayGUISpeed: ;Speed Options
|
|
GUIDrawWindowBox 21,GUISpeedDisp
|
|
mov byte[GUItextcolor],217 ;Shadow
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero
|
|
mov byte[GUItextcolor],211
|
|
.zero
|
|
sub byte[GUItextcolor],15
|
|
GUIOuttextwin2 21,8,29,GUISpeedTextA1
|
|
GUIOuttextwin2 21,8,39,GUISpeedTextA2
|
|
GUIOuttextwin2 21,8,49,GUISpeedTextA3
|
|
|
|
add byte[GUItextcolor],15 ;Text
|
|
GUIOuttextwin2 21,7,28,GUISpeedTextA1
|
|
GUIOuttextwin2 21,7,38,GUISpeedTextA2
|
|
GUIOuttextwin2 21,7,48,GUISpeedTextA3
|
|
|
|
mov al,[GUIWincol] ;Yellow Shadow
|
|
mov byte[GUItextcolor],al
|
|
GUIOuttextwin2 21,8,19,GUISpeedTextA
|
|
GUIOuttextwin2 21,16,79,GUISpeedTextB
|
|
|
|
mov byte[GUItextcolor],163 ;Yellow Text
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero3
|
|
mov byte[GUItextcolor],164
|
|
.zero3
|
|
GUIOuttextwin2 21,7,18,GUISpeedTextA
|
|
GUIOuttextwin2 21,15,78,GUISpeedTextB
|
|
|
|
|
|
DDrawBox 21,100,28,[KeyFastFrwrd] ;Shortcut Boxes
|
|
DDrawBox 21,100,38,[KeySlowDown]
|
|
DDrawBox 21,100,48,[KeyResetSpeed]
|
|
|
|
DGOptnsBorderBox 21,99,27 ;Borders
|
|
DGOptnsBorderBox 21,99,37
|
|
DGOptnsBorderBox 21,99,47
|
|
|
|
|
|
mov eax,dword[GUIwinposx+21*4] ;Slider
|
|
mov ebx,dword[GUIwinposy+21*4]
|
|
mov ecx,eax
|
|
add eax,15
|
|
add ecx,15+116
|
|
add ebx,91
|
|
xor edx,edx
|
|
mov dl,215
|
|
sub dl,[GUIWincoladd]
|
|
DrawGUILine
|
|
inc ecx
|
|
inc eax
|
|
sub dl,13
|
|
DrawGUILine
|
|
xor eax,eax
|
|
mov al,[EmuSpeed]
|
|
shl eax,1
|
|
mov dword[GUITemp],12
|
|
add [GUITemp],eax
|
|
GUIDisplayIconWin 21,[GUITemp],87,GUIIconDataSlideBar
|
|
mov dword[GUISpeedTextB1],0
|
|
mov esi,GUISpeedTextB1+2
|
|
xor eax,eax ; currently emuspeed ranges from 0 to 58
|
|
mov al,[EmuSpeed] ; this turns it into '/30' to '30x'
|
|
cmp al,29
|
|
jb .slowmo
|
|
mov byte[esi],'x' ; adds 'x' after the ff value
|
|
dec esi
|
|
sub al,28
|
|
jmp .asciilp
|
|
.slowmo
|
|
mov byte[GUISpeedTextB1],1 ; slomo indicator
|
|
mov bl,30
|
|
sub bl,al
|
|
mov al,bl
|
|
.asciilp ; turns decimal into ascii
|
|
mov bl,10
|
|
div bl
|
|
add ah,48
|
|
mov [esi],ah
|
|
cmp al,0
|
|
je .nomore
|
|
dec esi
|
|
xor ah,ah
|
|
div bl
|
|
add ah,48
|
|
mov [esi],ah
|
|
.nomore
|
|
cmp byte[GUISpeedTextB1],1
|
|
jne .convdone
|
|
dec esi
|
|
mov byte[esi],'/' ; adds '/' before the slomo value
|
|
.convdone
|
|
mov [GUITemp],esi
|
|
mov byte[GUItextcolor],223
|
|
GUIOuttextwin2 21,63,79,[GUITemp]
|
|
mov byte[GUItextcolor],221
|
|
cmp byte[GUIWincoladd],0
|
|
je .zero4
|
|
mov byte[GUItextcolor],222
|
|
.zero4
|
|
GUIOuttextwin2 21,62,78,[GUITemp]
|
|
ret
|
|
|
|
SECTION .data
|
|
GUISpeedTextA db 'SHORTCUTS : ',0
|
|
GUISpeedTextA1 db 'FAST FORWARD',0
|
|
GUISpeedTextA2 db 'SLOWDOWN',0
|
|
GUISpeedTextA3 db 'RESET SPEED',0
|
|
|
|
GUISpeedTextB db 'SPEED : ',0
|
|
GUISpeedTextB1 db '---',0
|
|
|
|
;General data
|
|
GUILoadDisp db 'LOAD GAME',0
|
|
GUIResetDisp db 'RESET GAME',0
|
|
GUIStateSelDisp db 'STATE SELECT',0
|
|
GUIInputDisp db 'INPUT DEVICE',0
|
|
GUIOptionDisp db 'OPTIONS',0
|
|
GUISoundDisp db 'SOUND CONFIG',0
|
|
GUIVideoDisp db 'VIDEO CONFIG',0
|
|
GUICheatDisp db 'CHEAT',0
|
|
GUISearchDisp db 'CHEAT SEARCH',0
|
|
GUINetDisp db 'REMOTE',0,0,0,0,0,0,0,0,0
|
|
GUIGameDisp db 'MISC KEYS',0
|
|
GUIGUIDisp db 'GUI OPTIONS',0
|
|
GUIAboutDisp db 'ABOUT',0
|
|
GUIMovieDisp db 'MOVIE OPTIONS',0
|
|
GUIStatesDisp db 'STATE CONFIRM',0
|
|
GUIComboDisp db 'KEY COMBINATION EDITOR',0
|
|
GUIAddOnsDisp db 'ADD-ON SELECTOR',0
|
|
GUIChipConfigDisp db 'CONFIGURE CHIPS',0
|
|
GUIPathsDisp db 'SETUP PATHS',0
|
|
GUISaveDisp db 'SAVE OPTIONS',0
|
|
GUISpeedDisp db 'SPEED OPTIONS',0
|
|
|
|
SECTION .bss
|
|
GUIItemBoxColor resd 1
|
|
TextColorSp resd 1
|
|
|
|
SECTION .data
|
|
NEWSYM GUIMenuItem, db 'GAME ',0
|
|
db 'CONFIG',0
|
|
db 'CHEAT ',0
|
|
db 'NETPLAY',0
|
|
db 'MISC ',0
|
|
db 25,0
|
|
|
|
SECTION .text
|