📄 guimouse.inc
字号:
GUIClickCButton 11,101,byte[SoundNoiseDis]
GUIClickCButtonS 11,111,byte[RevStereo]
; cmp byte[OSPort],3
; je near .win32sound
%ifdef __MSDOS__
GUIClickCButton 11,121,byte[Surround]
%endif
;.win32sound
%ifdef __WIN32__
GUIClickCButton 11,121,byte[LargeSoundBuf]
%endif
GUIClickCButton 11,131,byte[InterSound]
GUIClickCButton 11,141,byte[LowPassFilter]
GUIClickCButton 11,151,byte[SoundBufEn]
GUIClickCButton 11,161,byte[UseCubicSpline]
GUIClickCButton 11,171,byte[SPCDisable]
%ifdef __WIN32__
GUIClickCButton 11,181,byte[ExclusiveSound]
%endif
cmp eax,15
jl near .nosrate
cmp edx,61
jl near .nosrate
cmp eax,69
jg near .nosrate
cmp edx,69
jg near .nosrate
xor eax,eax
mov al,[cfgSoundQuality]
mov al,[sampratenext+eax]
mov [cfgSoundQuality],al
.nosrate
cmp eax,15
jl near .nomovebar
cmp eax,15+100
jg near .nomovebar
cmp edx,89
jl near .nomovebar
cmp edx,93
jg near .nomovebar
sub eax,15
mov [MusicRelVol],al
mov [cfgvolume],al
mov byte[GUIHold],5
mov eax,[GUIwinposy+6*4]
add eax,91
mov [GUIHoldYlim],eax
xor eax,eax
xor edx,edx
mov al,[MusicRelVol]
shl eax,7
mov ebx,100
div ebx
cmp al,127
jb .noof
mov al,127
.noof
mov [MusicVol],al
mov al,[DSPMem+0Ch]
call WDSPReg0C
mov al,[DSPMem+1Ch]
call WDSPReg1C
mov eax,[GUIwinposx+6*4]
add eax,15
mov [GUIHoldXlimL],eax
add eax,100
mov [GUIHoldXlimR],eax
.nomovebar
ret
sampratenext db 1,4,5,6,2,3,0,0,0,0
%macro GUIBoxVar 6
cmp eax,%1
jl %%nope
cmp edx,%2
jl %%nope
cmp eax,%3
jg %%nope
cmp edx,%4
jg %%nope
mov dword[%5],%6
%%nope
%endmacro
DisplayGUICheatClick2:
GUISlidebarPostImpl 231,28,238,100,.scrollup,.scrolldown,7,12,GUIcurrentcheatviewloc,GUIcurrentcheatcursloc,NumCheats,GUIBlankVar,1
GUIPostWinBoxMove 5,22,229,22+12*7,GUIcurrentcheatviewloc,GUIcurrentcheatcursloc,NumCheats,.scrollup,.scrolldown,DisplayGUICheatClick.skipscrol,12
DisplayGUICheatClick:
GUIBoxVar 5,20,181,110,GUIcurrentcheatwin,0
GUIBoxVar 82,129,173,136,GUIcurrentcheatwin,1
GUIBoxVar 82,140,196,147,GUIcurrentcheatwin,2
; SlideBar Implementation
GUISlidebarImpl 231,28,238,100,GUICStA,12,GUIcurrentcheatviewloc,GUIcurrentcheatcursloc,NumCheats,7
.skipscrol
cmp byte[GUIcurrentcheatwin],0
jne near .nowin
GUIWinControl 5,23,229,21+12*7,GUIBlankVar,GUIcurrentcheatviewloc,NumCheats,22,7,GUIcurrentcheatcursloc,3,7,30
.nowin
GUIPHoldbutton 5,113,47,124,5
GUIPHoldbutton 52,113,94,124,6
GUIPHoldbutton 99,113,141,124,7
GUIPHoldbutton 146,113,188,124,8
GUIPHoldbutton 212,134,236,145,9
GUIPHoldbutton 193,113,235,124,33
GUIClickCButton5 11,186,byte[AutoLoadCht],1
ret
DisplayNetOptnsClick:
cmp byte[CNetType],1
jne near .nomodem
GUIPHoldbutton 5,15,89,26,21
GUIPHoldbutton 5,30,89,41,22
GUIPHoldbutton 5,45,89,56,23
GUIPHoldbutton 5,60,89,71,24
.nomodem
cmp byte[CNetType],2
jne near .nomodemc
GUIPButtonHole2 9,25,byte[ComNum],1,byte[ComIRQ],4
GUIPButtonHole2 9,35,byte[ComNum],2,byte[ComIRQ],3
GUIPButtonHole2 9,45,byte[ComNum],3,byte[ComIRQ],4
GUIPButtonHole2 9,55,byte[ComNum],4,byte[ComIRQ],3
GUIPButtonHole 94,25,byte[BaudRate],0
GUIPButtonHole 94,35,byte[BaudRate],1
GUIPButtonHole 94,45,byte[BaudRate],2
GUIPButtonHole 94,55,byte[BaudRate],3
GUIPButtonHole 94,65,byte[BaudRate],4
GUIPButtonHole 94,75,byte[BaudRate],5
GUIPButtonHole 94,85,byte[BaudRate],6
GUIPButtonHole 9,85,byte[GUIDialSt+3],'T'
GUIPButtonHole 9,95,byte[GUIDialSt+3],'P'
GUIPHoldbutton2 55,69,63,79,25,byte[ComIRQ],1,15
GUIPHoldbutton2 66,69,74,79,26,byte[ComIRQ],-1,2
GUITextBoxInput 21,125,175,133,GUIInitSt1,24
GUITextBoxInput 21,136,175,144,GUIInitSt2,24
GUIClickCButton 12,147,byte[FossilUse]
.nomodemc
cmp byte[CNetType],3
jne near .nomodemd
GUIPHoldbutton 141,38,175,49,28
.nomodemd
cmp byte[CNetType],4
jne near .notcpip
cmp byte[NetPlayNoMore],1
je near .notcpip
GUIPHoldbutton 5,35,129,46,25
GUIPHoldbutton 5,70,129,81,26
GUITextBoxInputB 55,13,95,21,1
GUITextBoxInputB 26,58,191,66,0
GUITextBoxInputB 55,23,119,31,2
GUIClickCButton 5,93,byte[UDPConfig]
.notcpip
cmp byte[CNetType],10
je .init
cmp byte[CNetType],11
je .init
cmp byte[CNetType],15
je .init
cmp byte[CNetType],12
jne near .noinit
.init
GUIPHoldbutton 120,135,181,146,27
.noinit
cmp byte[CNetType],7
jne near .noipx
GUIPHoldbutton 53,48,87,59,34
.noipx
cmp byte[CNetType],20
jne near .nochat
GUIPHoldbutton 111,169,181,180,27
GUIClickCButtonN 7,135,byte[RemoteCommand],3
GUIClickCButtonN 32,135,byte[RemoteCommand],4
GUIClickCButtonN 57,135,byte[RemoteCommand],5
GUIClickCButtonN 7,145,byte[RemoteCommand],6
GUIClickCButtonN 32,145,byte[RemoteCommand],7
GUIClickCButtonN 7,175,byte[RemoteCommand],8
GUIClickCButtonN 111,135,byte[RemoteCommand],50
GUIClickCButtonN 111,145,byte[RemoteCommand],41
GUIClickCButtonN 111,155,byte[RemoteCommand],42
GUIPHoldbutton2 79,156,87,166,29,byte[Latencytochange],1,19
GUIPHoldbutton2 90,156,98,166,30,byte[Latencytochange],-1,1
; DrawSlideBarWin 8,181,15,[GUIcurrentvideoviewloc],[TViewLoc],12,97,GUINCStA
; GUISlidebarImpl 181,15,188,112,GUINCStA,12,GUIcurrentcheatviewloc,TViewCLoc,TViewLoc,12
mov al,[Latency]
cmp byte[Latencytochange],al
je .nochat
mov byte[RemoteCommand],20
.nochat
cmp byte[CNetType],22
je .yesstate
cmp byte[CNetType],21
jne near .nostate
.yesstate
GUIPHoldbutton 73,48,127,59,64
.nostate
ret
guipresstest:
xor ebx,ebx
mov ecx,256+128+64
.a
mov byte[pressed+ebx],0
inc ebx
loop .a
call GUIUnBuffer
call DisplayBoxes
call DisplayMenu
GUIBox 75,95,180,131,160
GUIBox 75,95,180,95,162
GUIBox 75,95,75,131,161
GUIBox 180,95,180,131,159
GUIBox 75,131,180,131,158
GUIOuttext 81,101,guipresstext1,220-15
GUIOuttext 80,100,guipresstext1,220
GUIOuttext 81,111,guipresstext2,220-15
GUIOuttext 80,110,guipresstext2,220
GUIOuttext 81,121,guipresstext3,220-15
GUIOuttext 80,120,guipresstext3,220
call vidpastecopyscr
.again
call JoyRead
; mov dword[pressed+0CCh],0
; mov dword[pressed+0CCh+80h],0
; mov dword[pressed+0E8h],0
; mov dword[pressed+0E8h+80h],0
xor ebx,ebx
mov ecx,256+128+64
.b
cmp byte[pressed+ebx],0
jne .pressedokay
inc ebx
loop .b
jmp .again
.pressedokay
push ebx
xor ebx,ebx
mov ecx,256+128+64
.a2
cmp byte[pressed+ebx],0
je .pressedokayb
mov byte[pressed+ebx],2
.pressedokayb
inc ebx
loop .a2
pop ebx
.again2
call Check_Key
or al,al
jz .nokey
call Get_Key
jmp .again2
.nokey
; push ebx
; mov eax,0Bh
; int 33h
; pop ebx
ret
guipresstext1 db 'ENTER THE KEY',0
guipresstext2 db 'OR BUTTON TO USE',0
guipresstext3 db '(ESC TO CLEAR)',0
guipresstestb:
call GUIUnBuffer
call DisplayBoxes
call DisplayMenu
GUIBox 65,80,194,126,160
GUIBox 65,80,194,80,162
GUIBox 65,80,65,126,161
GUIBox 194,80,194,126,159
GUIBox 65,126,194,126,158
GUIOuttext 71,86,guipresstext1,220-15
GUIOuttext 70,85,guipresstext1,220
GUIOuttext 71,96,guipresstext2,220-15
GUIOuttext 70,95,guipresstext2,220
GUIOuttext 71,116,guipresstext3b,220-15
GUIOuttext 70,115,guipresstext3b,220
mov eax,[guipressptr]
GUIOuttext 71,106,eax,220-15
mov eax,[guipressptr]
GUIOuttext 70,105,eax,220
call vidpastecopyscr
mov ecx,8192
call delay
.tryagain
call JoyRead
xor ebx,ebx
mov ecx,256+128+64
.b2
cmp byte[pressed+ebx],0
jne .tryagain
inc ebx
loop .b2
.again
call JoyRead
; mov dword[pressed+0CCh],0
; mov dword[pressed+0CCh+80h],0
; mov dword[pressed+0E8h],0
; mov dword[pressed+0E8h+80h],0
xor ebx,ebx
mov ecx,256+128+64
.b
cmp byte[pressed+ebx],0
jne .pressedokay
inc ebx
loop .b
jmp .again
.pressedokay
.again2
call Check_Key
or al,al
jz .nokey
call Get_Key
jmp .again2
.nokey
cmp ebx,1
je .skip
cmp ebx,3Bh
je .skip
mov eax,[guicpressptr]
mov [eax],ebx
.skip
; push ebx
; mov eax,0Bh
; int 33h
; pop ebx
ret
guipresstext3b db '(ESC TO SKIP)',0
guipresstext4b db 'FOR UP ',0
db 'FOR DOWN ',0
db 'FOR LEFT ',0
db 'FOR RIGHT ',0
db 'FOR START ',0
db 'FOR SELECT ',0
db 'FOR A (RIGHT BUTTON)',0
db 'FOR B (DOWN BUTTON) ',0
db 'FOR X (TOP BUTTON) ',0
db 'FOR Y (LEFT BUTTON) ',0
db 'FOR THE L BUTTON ',0
db 'FOR THE R BUTTON ',0
guipressptr dd 0
guicpressptr dd 0
DisplayGameOptnsClick:
; Process boxes
mov dword[keycontrolval],0
DGOptnsProcBox 27,24,[KeyBGDisble0]
DGOptnsProcBox 27+45,24,[KeyBGDisble1]
DGOptnsProcBox 27+45*2,24,[KeyBGDisble2]
DGOptnsProcBox 27+45*3,24,[KeyBGDisble3]
DGOptnsProcBox 27,32,[KeySprDisble]
DGOptnsProcBox 78,52,[KeyResetAll]
DGOptnsProcBox 78,60,[KeyExtraEnab]
DGOptnsProcBox 78,68,[KeyNewGfxSwt]
DGOptnsProcBox 78,76,[KeyWinDisble]
DGOptnsProcBox 78,84,[KeyOffsetMSw]
DGOptnsProcBox 78,92,[KeySlowDown]
DGOptnsProcBox 178,60,[KeyVolUp]
DGOptnsProcBox 178,68,[KeyVolDown]
DGOptnsProcBox 178,76,[KeyFRateUp]
DGOptnsProcBox 178,84,[KeyFRateDown]
; cmp byte[OSPort],3
; jne near .notwin32
%ifndef __MSDOS__
DGOptnsProcBox 178,44,[KeyRewind]
%endif
;.notwin32
DGOptnsProcBox 178,52,[KeyFastFrwrd]
DGOptnsProcBox 27,112,[KeyDisableSC0]
DGOptnsProcBox 27+45,112,[KeyDisableSC1]
DGOptnsProcBox 27+45*2,112,[KeyDisableSC2]
DGOptnsProcBox 27+45*3,112,[KeyDisableSC3]
DGOptnsProcBox 27,120,[KeyDisableSC4]
DGOptnsProcBox 27+45,120,[KeyDisableSC5]
DGOptnsProcBox 27+45*2,120,[KeyDisableSC6]
DGOptnsProcBox 27+45*3,120,[KeyDisableSC7]
DGOptnsProcBox 27+45*2,132,[KeyStateSlc0]
DGOptnsProcBox 27+45*3,132,[KeyStateSlc1]
DGOptnsProcBox 27,140,[KeyStateSlc2]
DGOptnsProcBox 27+45,140,[KeyStateSlc3]
DGOptnsProcBox 27+45*2,140,[KeyStateSlc4]
DGOptnsProcBox 27+45*3,140,[KeyStateSlc5]
DGOptnsProcBox 27,148,[KeyStateSlc6]
DGOptnsProcBox 27+45,148,[KeyStateSlc7]
DGOptnsProcBox 27+45*2,148,[KeyStateSlc8]
DGOptnsProcBox 27+45*3,148,[KeyStateSlc9]
DGOptnsProcBox 8+25,158,[KeySaveState]
DGOptnsProcBox 8+57+25,158,[KeyLoadState]
DGOptnsProcBox 8+114+25,158,[KeyStateSelct]
DGOptnsProcBox 8+25,178,[KeyQuickLoad]
DGOptnsProcBox 8+57+31,178,[KeyQuickRst]
DGOptnsProcBox 8+114+25,178,[KeyQuickExit]
DGOptnsProcBox 8+25,188,[KeyQuickChat]
DGOptnsProcBox 8+57+49,188,[KeyQuickSnapShot]
ret
DisplayGUIOptnsClick:
mov eax,[GUImouseposx]
sub eax,[GUIwinposx+10*4]
mov edx,[GUImouseposy]
sub edx,[GUIwinposy+10*4]
GUIClickCButton 12,23,byte[mousewrap]
GUIClickCButton 12,33,byte[mouseshad]
GUIClickCButton 12,43,byte[lastcursres]
GUIClickCButton 12,53,byte[resetposn]
GUIClickCButton 12,63,byte[GUIClick]
GUIClickCButton 12,73,byte[JoyPad1Move]
GUIClickCButton6 12,83,byte[GUIEffect],1
GUIClickCButton6 12,93,byte[GUIEffect],2
GUIClickCButton 124,23,byte[GUIEnableTransp]
%ifdef __WIN32__
GUIClickCButton 12,168,byte[AlwaysOnTop]
GUIClickCButton 12,178,byte[SaveMainWindowPos]
GUIClickCButton 12,188,byte[AllowMultipleInst]
GUIClickCButton 124,33,byte[MouseWheel]
%endif
GUIClickCButton 124,43,byte[FilteredGUI]
GUIPButtonHole 48,108,byte[CurPalSelect],0
GUIPButtonHole 88,108,byte[CurPalSelect],1
GUIPButtonHole 135,108,byte[CurPalSelect],2
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
cmp eax,25
jl near .nomovebar
cmp eax,25+32*4-1
jg near .nomovebar
sub eax,25
shr eax,2
cmp edx,122
jl .nomovebar1
cmp edx,126
jg .nomovebar1
cmp byte[TRVal2],al
je .nomovebar1b
mov byte[TRVal2],al
mov byte[TRVal2+1],1
.nomovebar1b
mov byte[GUIHold],2
mov eax,[GUIwinposy+10*4]
add eax,124
mov [GUIHoldYlim],eax
jmp .nomovebar
.nomovebar1
cmp edx,134
jl .nomovebar2
cmp edx,138
jg .nomovebar2
cmp byte[TGVal2],al
je .nomovebar2b
mov byte[TGVal2],al
mov byte[TRVal2+1],1
.nomovebar2b
mov byte[GUIHold],2
mov eax,[GUIwinposy+10*4]
add eax,136
mov [GUIHoldYlim],eax
jmp .nomovebar
.nomovebar2
cmp edx,146
jl .nomovebar3
cmp edx,150
jg .nomovebar3
cmp byte[TBVal2],al
je .nomovebar3b
mov byte[TBVal2],al
mov byte[TRVal2+1],1
.nomovebar3b
mov byte[GUIHold],2
mov eax,[GUIwinposy+10*4]
add eax,148
mov [GUIHoldYlim],eax
.nomovebar3
.nomovebar
push eax
cmp byte[CurPalSelect],1
je .yespal2
cmp byte[CurPalSelect],2
je .yespal3
mov al,[TRVal2]
mov [GUIRAdd],al
mov al,[TGVal2]
mov [GUIGAdd],al
mov al,[TBVal2]
mov [GUIBAdd],al
jmp .nopal1
.yespal2
mov al,[TRVal2]
mov [GUITRAdd],al
mov al,[TGVal2]
mov [GUITGAdd],al
mov al,[TBVal2]
mov [GUITBAdd],al
jmp .nopal1
.yespal3
mov al,[TRVal2]
mov [GUIWRAdd],al
mov al,[TGVal2]
mov [GUIWGAdd],al
mov al,[TBVal2]
mov [GUIWBAdd],al
.nopal1
pop eax
cmp byte[TRVal2+1],1
jne .nopalchange
call GUISetPal
mov byte[TRVal2+1],0
.nopalchange
cmp byte[GUIHold],2
jne .nohold
mov eax,[GUIwinposx+10*4]
add eax,25
mov [GUIHoldXlimL],eax
mov eax,[GUIwinposx+10*4]
add eax,25+3
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -