📄 guikeys.inc
字号:
jmp .donesection1
.notnum2
cmp dh,8
jne .notbacksp
or ebx,ebx
jz near .donesection1
add ebx,edi
mov byte[ebx-1],0
jmp .donesection1
.notbacksp
cmp dh,'c'
je .yesc
cmp dh,'C'
jne .noc
.yesc
; mov byte[CNetType],15
; mov byte[ModemProcess],41
; mov byte[WhichRemote],4
.noc
cmp dh,'s'
je .yess
cmp dh,'S'
jne .nos
.yess
; mov byte[CNetType],15
; mov byte[ModemProcess],40
; mov byte[WhichRemote],4
.nos
.donesection1
ret
.section2
mov ebx,GUINetTextl2
.loopz
cmp byte[ebx],0
je .donez
inc ebx
jmp .loopz
.donez
cmp byte[GUINetTextl2],'0'
jne .notzerob
cmp byte[GUINetTextl2+1],0
jne .notzerob
dec ebx
.notzerob
cmp dh,'0'
jb .notnum
cmp dh,'9'
ja .notnum
mov byte[ebx],dh
mov byte[ebx+1],0
push ebx
call .convert
pop ebx
cmp ecx,65536
jb .donenumb
mov byte[ebx],0
.donenumb
jmp .donenum
.notnum
cmp dh,8
jne .donenum
cmp byte[GUINetTextl2],0
je .donenum
mov byte[ebx-1],0
.donenum
call .convert
cmp ecx,0
jne .notzero
mov byte[GUINetTextl2],'0'
mov byte[GUINetTextl2+1],0
.notzero
mov [TCPIPPortNum],ecx
ret
.convert
mov ebx,GUINetTextl2
xor ecx,ecx
.loop
cmp byte[ebx],0
je .done
mov eax,ecx
push ebx
mov ebx,10
mul ebx
pop ebx
mov ecx,eax
xor eax,eax
mov al,[ebx]
sub eax,48
add ecx,eax
inc ebx
jmp .loop
.done
ret
NEWSYM TCPIPPortNum, dd 7845
GUIOptionKeys:
cmp dh,'a'
jb .nocap
cmp dh,'z'
ja .nocap
sub dh,'z'-'Z'
.nocap
cmp dh,'A'
jne .noautofr
mov byte[FPSOn],0
cmp byte[frameskip],0
je .zero
mov byte[frameskip],0
jmp .notzero
.zero
mov byte[frameskip],2
.notzero
.noautofr
cmp dh,'N'
jne .nonewgfx
xor eax,eax
mov al,[cvidmode]
cmp byte[GUINGVID+eax],1
jne near .invalidng
xor byte[newengen],1
mov al,[newengen]
mov [cfgnewgfx],al
.invalidng
.nonewgfx
%ifndef __LINUX__
cmp dh,'V'
jne .novsync
xor byte[vsyncon],1
mov al,[vsyncon]
mov [cfgvsync],al
.novsync
%endif
cmp dh,'M'
jne .nommxcopy
xor byte[FPUCopy],2
mov al,[FPUCopy]
mov [cfgcopymethod],al
.nommxcopy
cmp dh,'U'
jne .nousepl34
xor byte[pl12s34],1
mov byte[MultiTap],1
cmp byte[pl12s34],1
je .nomtap
cmp byte[pl3contrl],0
jne .mtap
cmp byte[pl4contrl],0
jne .mtap
cmp byte[pl5contrl],0
jne .mtap
.nomtap
mov byte[MultiTap],0
.mtap
.nousepl34
cmp dh,'S'
jne .noswfix
xor byte[SidewinderFix],1
.noswfix
%ifdef __WIN32__
cmp dh,'H'
jne .nohighpriority
xor byte[HighPriority],1
.nohighpriority
%endif
cmp dh,'F'
jne .nofpsatstart
xor byte[FPSAtStart],1
.nofpsatstart
cmp dh,'E'
jne .nouse30hz
xor byte[Turbo30hz],1
.nouse30hz
cmp dh,'C'
jne .nogameclock
xor byte[TimerEnable],1
.nogameclock
cmp dh,'T'
jne .nofastforward
xor byte[FastFwdToggle],1
.nofastforward
cmp dh,'R'
jne .nosramcheck
xor byte[SRAMSave5Sec],1
.nosramcheck
cmp dh,'O'
jne .nooldgfx
xor byte[OldGfxMode2],1
.nooldgfx
cmp dh,'L'
jne .nostartsave
xor byte[LatestSave],1
.nostartsave
cmp dh,'/'
jne .noautostate
xor byte[AutoState],1
.noautostate
cmp dh,'D'
jne .nosavepath
xor byte[DontSavePath],1
.nosavepath
%ifdef __WIN32__
cmp dh,'I'
jne .noscreensaver
xor byte[DisableScreenSaver],1
.noscreensaver
cmp dh,'S'
jne .noalttimer
xor byte[AlternateTimer],1
call guimustrestartmsg
.noalttimer
%endif
ret
GUIGUIOptnsKeys:
cmp dh,'a'
jb .nocap
cmp dh,'z'
ja .nocap
sub dh,'z'-'Z'
.nocap
cmp dh,'M'
jne .guioptn1
xor byte[mousewrap],1
.guioptn1
cmp dh,'S'
jne .guioptn2
xor byte[mouseshad],1
.guioptn2
cmp dh,'K'
jne .guioptn3
xor byte[lastcursres],1
.guioptn3
cmp dh,'W'
jne .guioptn4
xor byte[resetposn],1
.guioptn4
cmp dh,'C'
jne .guioptn5
xor byte[GUIClick],1
.guioptn5
cmp dh,'U'
jne .guioptn6
xor byte[JoyPad1Move],1
.guioptn6
%ifdef __WIN32__
cmp dh,'A'
jne .guioptn7
xor byte[AlwaysOnTop],1
.guioptn7
cmp dh,'V'
jne .guioptn8
xor byte[SaveMainWindowPos],1
.guioptn8
cmp dh,'L'
jne .guioptn9
xor byte[AllowMultipleInst],1
.guioptn9
cmp dh,'H'
jne .guioptn10
xor byte[MouseWheel],1
.guioptn10
%endif
cmp dh,'T'
jne .guioptn11
xor byte[GUIEnableTransp],1
.guioptn11
ret
GUISoundKeys:
cmp dh,'a'
jb .nocap
cmp dh,'z'
ja .nocap
sub dh,'z'-'Z'
.nocap
cmp dh,'E'
jne .notenablesound
xor byte[cfgsoundon],1
.notenablesound
cmp dh,'S'
jne .notstereo
xor byte[cfgStereoSound],1
.notstereo
%ifdef __MSDOS__
cmp dh,'A'
jne .noraisepitch
xor byte[RaisePitch],1
.noraisepitch
%endif
cmp dh,'N'
jne .notnoise
xor byte[SoundNoiseDis],1
.notnoise
cmp dh,'R'
jne .notsrate
xor eax,eax
mov al,[cfgSoundQuality]
mov al,[.sampratenext+eax]
mov [cfgSoundQuality],al
.notsrate
cmp dh,'V'
jne .notrevst
xor byte[RevStereo],1
.notrevst
%ifdef __WIN32__
cmp dh,'A'
jne .nolargebuffer
xor byte[LargeSoundBuf],1
.nolargebuffer
%endif
%ifdef __MSDOS__
cmp dh,'U'
jne .nosurround
xor byte[Surround],1
.nosurround
%endif
cmp dh,'O'
jne .nointersound
xor byte[InterSound],1
.nointersound
cmp dh,'L'
jne .nolowpass
xor byte[LowPassFilter],1
.nolowpass
cmp dh,'B'
jne .nosoundbuf
xor byte[SoundBufEn],1
.nosoundbuf
cmp dh,'C'
jne .nocubic
xor byte[UseCubicSpline],1
.nocubic
cmp dh,'D'
jne .nospcdisable
xor byte[SPCDisable],1
.nospcdisable
%ifdef __WIN32__
cmp dh,'X'
jne .noexclusivesound
xor byte[ExclusiveSound],1
.noexclusivesound
%endif
ret
.sampratenext db 1,4,5,6,2,3,0,0,0,0
GUINetMenuKeys1:
cmp dh,'a'
jb .nocap
cmp dh,'z'
ja .nocap
sub dh,'z'-'Z'
.nocap
cmp dh,'C'
jne .notconfig
mov byte[CNetType],2
.notconfig
cmp dh,'D'
jne .notdial
mov byte[CNetType],3
.notdial
cmp dh,'M'
jne .notmanual
mov byte[CNetType],12
mov byte[ModemProcess],0
cmp byte[ModemInitStat],1
je .noinit
call InitModem
mov byte[ModemInitStat],1
.noinit
ret
.notmanual
cmp dh,'W'
jne .notwait
mov byte[CNetType],10
mov byte[ModemProcess],0
cmp byte[ModemInitStat],1
je .noinit2
call InitModem
mov byte[ModemInitStat],1
.noinit2
ret
.notwait
ret
GUIGetInputLine:
cmp ebx,8
jne .nodial
cmp byte[CNetType],20
jne .nochat
cmp dh,13
jne .nochat
mov byte[RemoteCommand],2
ret
.nochat
cmp byte[CNetType],3
jne .nodial
cmp dh,13
jne .nodial
mov byte[CNetType],11
mov byte[ModemProcess],0
cmp byte[ModemInitStat],1
je .noinit
call InitModem
mov byte[ModemInitStat],1
.noedit
ret
.noinit
.nodial
; search string for 0, record length of string
cmp dword[GUIEditString],0
je .noedit
mov eax,[GUIEditString]
xor ecx,ecx
dec ecx
.next
mov bl,[eax]
inc eax
inc ecx
cmp bl,0
jne .next
cmp byte[GUIEditStringcWin],0
je near .blinkstuff
cmp ecx,0
je .nodel
cmp dh,8
jne .nodel
mov byte[eax-2],0
dec eax
jmp .blinkstuff
.nodel
cmp ecx,[GUIEditStringmLen]
jne .notend
jmp .blinkstuff
.notend
cmp dh,'a'
jb .nocap
cmp dh,'z'
ja .nocap
sub dh,'z'-'Z'
.nocap
cmp dh,32
jb .noinsert
mov [eax-1],dh
mov byte[eax],0
inc eax
.noinsert
jmp .blinkstuff
.blinkstuff
dec eax
mov [GUIEditStringcLen],eax
ret
GUIEditString dd 0 ; Pointer to string
GUIEditStringcLen dd 0 ; Pointer to end of string (done in function)
GUIEditStringmLen dd 0 ; Max length of string
GUIEditStringLTxt dd 0 ; blink value, should be set to 0 when box selected
GUIEditStringLstb dd 0 ; if cursor is placed (set in main function)
GUIEditStringcWin dd 0 ; 0 = no text window selected
GUIComboKeys:
; Calculate Position
xor eax,eax
.nozero
cmp byte[GUIComboTextH+eax],0
je .zero
inc eax
jmp .nozero
.zero
mov [GUIComboPos],al
cmp dh,8
jne .nobacksp
cmp byte[GUIComboPos],0
je .nochar
mov byte[GUICCFlash],0
xor eax,eax
mov al,[GUIComboPos]
dec eax
mov byte[GUIComboTextH+eax],0
ret
.nobacksp
cmp dh,0
je .nochar
cmp dh,13
je .nochar
cmp byte[GUIComboPos],19
je .nochar
xor eax,eax
mov byte[GUICCFlash],0
mov al,[GUIComboPos]
mov byte[GUIComboTextH+eax],dh
.nochar
ret
GUICheatKeys:
cmp dword[GUIcurrentcheatwin],1
je near .textboxa
cmp dword[GUIcurrentcheatwin],2
je near .textboxb
cmp dh,'a'
jb .nocap
cmp dh,'z'
ja .nocap
sub dh,'z'-'Z'
.nocap
cmp dh,'R'
jne .noremocheat
jmp CheatCodeRemove
.noremocheat
cmp dh,'T'
jne .notoggcheat
jmp CheatCodeToggle
.notoggcheat
cmp dh,'S'
jne .nosavecheat
jmp CheatCodeSave
.nosavecheat
cmp dh,'L'
jne .noloadcheat
jmp CheatCodeLoad
.noloadcheat
cmp dword[NumCheats],0
jne .nozero
ret
.nozero
%ifdef __LINUX__
cmp al,89
je .homepressed
cmp dword[numlockptr],1
je .nohome
cmp al,71
jne .nohome
.homepressed
%else
cmp al,71
jne .nohome
%endif
mov dword[GUIcurrentcheatcursloc],0
mov dword[GUIcurrentcheatviewloc],0
ret
.nohome
%ifdef __LINUX__
cmp al,89
je .endppressed
cmp dword[numlockptr],1
je .noendp
cmp al,79
jne .noendp
.endppressed
%else
cmp al,79
jne .noendp
%endif
mov eax,[NumCheats]
dec eax
mov dword[GUIcurrentcheatcursloc],eax
sub eax,11
mov dword[GUIcurrentcheatviewloc],eax
test dword[GUIcurrentcheatviewloc],8000000h
jz .posve
mov dword[GUIcurrentcheatviewloc],0
.posve
ret
.noendp
%ifdef __LINUX__
cmp al,90
je .up
cmp dword[numlockptr],1
je .noup
cmp al,72
jne .noup
%else
cmp al,72
jne .noup
%endif
.up
cmp dword[GUIcurrentcheatcursloc],0
je .noup
mov ebx,[GUIcurrentcheatcursloc]
cmp [GUIcurrentcheatviewloc],ebx
jne .noviewdec
dec dword[GUIcurrentcheatviewloc]
.noviewdec
dec dword[GUIcurrentcheatcursloc]
.noup
%ifdef __LINUX__
cmp al, 96
je .downpressed
cmp dword[numlockptr],1
je .nodown
cmp al,80
jne .nodown
.downpressed
%else
cmp al,80
jne .nodown
%endif
mov ebx,[GUIcurrentcheatcursloc]
inc ebx
cmp ebx,[NumCheats]
jae .noviewinc
inc dword[GUIcurrentcheatcursloc]
sub ebx,12
cmp ebx,[GUIcurrentcheatviewloc]
jne .noviewinc
inc dword[GUIcurrentcheatviewloc]
.noviewinc
.nodown
%ifdef __LINUX__
cmp al,91
je .pageuppressed
cmp dword[numlockptr],1
je .nopageup
cmp al,73
jne .nopageup
.pageuppressed
%else
cmp al,73
jne .nopageup
%endif
sub dword[GUIcurrentcheatviewloc],12
sub dword[GUIcurrentcheatcursloc],12
test dword[GUIcurrentcheatviewloc],8000000h
jz .posv
mov dword[GUIcurrentcheatviewloc],0
.posv
test dword[GUIcurrentcheatcursloc],8000000h
jz .posc
mov dword[GUIcurrentcheatcursloc],0
.posc
.nopageup
%ifdef __LINUX__
cmp al, 97
je .pagednpressed
cmp dword[numlockptr],1
je .nopagedown
cmp al,81
jne .nopagedown
.pagednpressed
%else
cmp al,81
jne .nopagedown
%endif
add dword[GUIcurrentcheatviewloc],12
add dword[GUIcurrentcheatcursloc],12
mov ebx,[NumCheats]
dec ebx
cmp dword[GUIcurrentcheatcursloc],ebx
jb .poscd
mov dword[GUIcurrentcheatcursloc],ebx
.poscd
sub ebx,11
cmp dword[GUIcurrentcheatviewloc],ebx
jl .posvd
test ebx,8000000h
jz .noneg
mov ebx,0
.noneg
mov dword[GUIcurrentcheatviewloc],ebx
.posvd
.nopagedown
ret
.textboxa
cmp byte[GUICheatPosA],0
je near .nobacksp
cmp dh,9
je .yesret
cmp dh,13
jne near .noret
.yesret
cmp byte[GUICheatPosA],2
jne near .nocodemod
mov byte[GUICheatPosA],0
mov esi,[GUIcurrentcheatcursloc]
shl esi,5
sub esi,[GUIcurrentcheatcursloc]
sub esi,[GUIcurrentcheatcursloc]
sub esi,[GUIcurrentcheatcursloc]
sub esi,[GUIcurrentcheatcursloc]
add esi,cheatdata
mov al,[GUICheatText9]
cmp al,'a'
jae .lowletter
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -