📄 guimouse.inc
字号:
call CheatCodeToggle ret%%noprevhold mov dword[GUIDClickTL],%13 mov byte[GUIDClCWin],%11 mov [GUIDClCEntry],eax%%held mov eax,[GUIwinposy+%12*4] add eax,%2-1 mov [GUIHoldYlim],eax mov eax,[GUIwinposy+%12*4] add eax,%4+1 mov [GUIHoldYlimR],eax mov eax,[GUIwinposx+%12*4] add eax,%1 mov [GUIHoldXlimL],eax mov eax,[GUIwinposx+%12*4] add eax,%3 mov [GUIHoldXlimR],eax mov byte[GUIHold],3 ret%%noload%endmacro%macro DGOptnsProcBox 3 GUIClickArea %1,%2,%1+19,%2+6,%%skip push edi call guipresstest pop edi cmp ebx,1 je %%cancelkey cmp ebx,3Bh je %%cancelkey mov %3,ebx%ifndef __MSDOS__ cmp dword[keycontrolval],0 je %%notwin32 push ebx mov ebx,[keycontrolval] mov byte[ebx],1 pop ebx%%notwin32%endif ret%%cancelkey xor ebx,ebx mov %3,ebx ret%%skip%endmacro%macro DGOptnsProcBoxc 5 GUIClickArea %1,%2,%3,%4,%%skip push edi call guipresstest pop edi cmp ebx,1 je %%cancelkey cmp ebx,3Bh je %%cancelkey mov %5,ebx ret%%cancelkey cmp ebx,1 jne %%noesc mov byte[pressed+1],2%%noesc xor ebx,ebx mov %5,ebx ret%%skip%endmacro%macro DGOptnsProcBoxb 3 GUIClickArea %1,%2,%1+19,%2+6,%%skip push edi call guipresstest pop edi cmp ebx,1 je %%cancelkey cmp ebx,3Bh je %%cancelkey mov %3,ebx jmp %%donekey%%cancelkey cmp ebx,1 jne %%noesc mov byte[pressed+1],2%%noesc xor ebx,ebx mov %3,ebx%%donekey ret%%skip%endmacro%macro FilterExcl 3-* ; minX, minY, bytes to zero GUIClickArea %1+1,%2+3,%1+6,%2+8,%%noclick%rotate 1%rep (%0-2) %rotate 1 mov byte[%1],0%endrep%%noclick%endmacro%macro GUIPTabClick 4-* ; minX, maxX, value, var, vars to zero GUIClickArea %1+1,11,%2-1,22,%%noclick mov dword[%4],%3%if (%0>4) %rotate 4%rep (%0-4) mov dword[%1],0 %rotate 1%endrep%endif mov byte[GUIFreshInputSelect],1%%noclick%endmacro%macro GUIBoxVar 6 GUIClickArea %1,%2,%3,%4,%%nope mov dword[%5],%6%%nope%endmacro%macro ComboBoxProc 5 GUIClickArea %1,%2,%3,%4,%%nope cmp byte[GUINumCombo],42 je %%nope xor ebx,ebx mov bl,[GUINumCombo] mov byte[GUIComboData+ebx],%5 inc byte[GUINumCombo]%%nope%endmacro%macro ComboBoxProcD 4 GUIClickArea %1,%2,%3,%4,%%nope cmp byte[GUINumCombo],0 je %%nope dec byte[GUINumCombo]%%nope%endmacro; Mouse implementationDisplayGUIConfirmClick2: cmp dword[GUIfileentries],1 jbe near .noload2 GUISlidebarPostImpl 146,33,153,33+93,.scrollupsl,.scrolldownsl,1,15,GUIcurrentviewloc,GUIcurrentcursloc,GUIfileentries,GUIcurrentfilewin,0 GUIPostWinBoxMove 5,26,144,27+15*7,GUIcurrentviewloc,GUIcurrentcursloc,GUIfileentries,.scrollupsl,.scrolldownsl,DisplayGUIConfirmClick.skipscrol,15.noload2 cmp dword[GUIdirentries],1 jbe near .noload3 GUISlidebarPostImpl 230,33,237,33+93,.scrollupsld,.scrolldownsld,3,15,GUIcurrentdirviewloc,GUIcurrentdircursloc,GUIdirentries,GUIcurrentfilewin,1 GUIPostWinBoxMove 160,26,228,27+15*7,GUIcurrentdirviewloc,GUIcurrentdircursloc,GUIdirentries,.scrollupsld,.scrolldownsld,DisplayGUIConfirmClick.skipscrol,15.noload3DisplayGUIConfirmClick:;DrawSlideBarWin 1,133,43,[GUIcurrentviewloc],[GUIfileentries],15,94,[GUILStA] ; offset 0 = (ysize-(yend-ystart+1)), offset 1 = starty, offset 2 = endy ; SlideBar Implementation GUISlidebarImpl 146,33,153,33+93,GUILStA,15,GUIcurrentviewloc,GUIcurrentcursloc,GUIfileentries,1 GUISlidebarImpl 230,33,237,33+93,GUILStB,15,GUIcurrentdirviewloc,GUIcurrentdircursloc,GUIdirentries,1 mov dword[GUIScrolTim1],0 mov dword[GUIScrolTim2],6.skipscrol GUIClickCButtonL 10,187 GUIWinControl 5,27,144,26+15*7,GUIcurrentfilewin,GUIcurrentviewloc,GUIfileentries,27,7,GUIcurrentcursloc,0,1,30 GUIWinControl 160,27,228,26+15*7,GUIcurrentfilewin,GUIcurrentdirviewloc,GUIdirentries,27,7,GUIcurrentdircursloc,1,1,30 GUIPHoldbutton 186,165,228,176,1 GUIPButtonHoleLoad 9,163,byte[GUIloadfntype],0 GUIPButtonHoleLoad 9,171,byte[GUIloadfntype],1%ifdef __MSDOS__ GUIPButtonHoleLoad 9,179,byte[GUIloadfntype],2%endif GUIClickCButton5 144,177,byte[ForceROMTiming],1 GUIClickCButton5 144,187,byte[ForceROMTiming],2 GUIClickCButton5 184,177,byte[ForceHiLoROM],1 GUIClickCButton5 184,187,byte[ForceHiLoROM],2 retDisplayGUIChoseSaveClick: GUIPHoldbutton2 94,59,102,67,80,byte[GUIChoseSlotTextX],1,'9' GUIPHoldbutton2 105,59,113,67,81,byte[GUIChoseSlotTextX],-1,'0' GUIPButtonHole 10,28,byte[GUIChoseSaveText2],0 GUIPButtonHole 30,28,byte[GUIChoseSaveText2],1 GUIPButtonHole 50,28,byte[GUIChoseSaveText2],2 GUIPButtonHole 70,28,byte[GUIChoseSaveText2],3 GUIPButtonHole 90,28,byte[GUIChoseSaveText2],4 GUIPButtonHole 10,43,byte[GUIChoseSaveText2],5 GUIPButtonHole 30,43,byte[GUIChoseSaveText2],6 GUIPButtonHole 50,43,byte[GUIChoseSaveText2],7 GUIPButtonHole 70,43,byte[GUIChoseSaveText2],8 GUIPButtonHole 90,43,byte[GUIChoseSaveText2],9 movzx eax,byte[GUIChoseSlotTextX] sub al,'0' mov dl,10 mul dl add al,byte[GUIChoseSaveText2] mov [current_zst],eax retDisplayGUIMovieClick: cmp byte[MovieProcessing],4 je near .cannotzmv cmp byte[MovieProcessing],5 je near .cannotzmv cmp byte[MovieProcessing],6 je near .cannotzmv GUIPTabClick 0,57,1,GUIMovieTabs,GUIDumpingTab.cannotzmv cmp byte[MovieProcessing],1 je near .cannotdump cmp byte[MovieProcessing],2 je near .cannotdump cmp byte[MovieProcessing],3 je near .cannotdump GUIPTabClick 58,110,1,GUIDumpingTab,GUIMovieTabs.cannotdump GUIPButtonHole 8,39,byte[CMovieExt],'v' ; Radio buttons GUIPButtonHole 28,39,byte[CMovieExt],'1' GUIPButtonHole 48,39,byte[CMovieExt],'2' GUIPButtonHole 68,39,byte[CMovieExt],'3' GUIPButtonHole 88,39,byte[CMovieExt],'4' GUIPButtonHole 108,39,byte[CMovieExt],'5' GUIPButtonHole 128,39,byte[CMovieExt],'6' GUIPButtonHole 148,39,byte[CMovieExt],'7' GUIPButtonHole 168,39,byte[CMovieExt],'8' GUIPButtonHole 188,39,byte[CMovieExt],'9' cmp dword[GUIMovieTabs],1 jne near .nocontrols cmp byte[MovieRecordWinVal],0 ; Overwrite Window je near .displayboxa GUIPHoldbutton 17,65,59,76,19 GUIPHoldbutton 70,65,112,76,20 ret.displayboxa ; Main Window GUIPHoldbutton 7,80,49,91,16 ; Buttons GUIPHoldbutton 55,80,97,91,17 GUIPHoldbutton 103,80,145,91,18 GUIPHoldbutton 151,80,193,91,32 GUIPHoldbutton 7,108,50,119,29 GUIPHoldbutton 85,108,138,119,30 GUIPHoldbutton 173,108,203,119,31 GUIPButtonHole 8,64,byte[MovieStartMethod],0 ; Start From GUIPButtonHole 43,64,byte[MovieStartMethod],1 GUIPButtonHole 89,64,byte[MovieStartMethod],2 GUIPButtonHole 135,64,byte[MovieStartMethod],3 DGOptnsProcBox 58,110,[KeyInsrtChap] ; Keyboard Shortcut Boxes DGOptnsProcBox 146,110,[KeyPrevChap] DGOptnsProcBox 210,110,[KeyNextChap] DGOptnsProcBox 135,124,[KeyRTRCycle] GUIPButtonHole 8,133,byte[MZTForceRTR],0 GUIPButtonHole 8,143,byte[MZTForceRTR],1 GUIPButtonHole 8,153,byte[MZTForceRTR],2 GUIClickCButton 8,163,byte[MovieDisplayFrame] ; Checkbox.nocontrols cmp dword[GUIDumpingTab],1 jne near .nodumping GUIPHoldbutton 165,178,200,189,34 GUIPHoldbutton 206,178,235,189,35 GUIPButtonHole 8,64,byte[MovieVideoMode],0 ; Movie Options GUIPButtonHole 8,74,byte[MovieVideoMode],1 GUIPButtonHole 8,84,byte[MovieVideoMode],2 GUIPButtonHole 8,94,byte[MovieVideoMode],3 GUIPButtonHole 8,104,byte[MovieVideoMode],4 GUIPButtonHole 8,114,byte[MovieVideoMode],5 GUIClickCButton 130,62,byte[MovieAudio] GUIClickCButton 130,72,byte[MovieAudioCompress] GUIClickCButton 130,82,byte[MovieVideoAudio] GUIPButtonHole 8,135,byte[MovieForcedLengthEnabled],0 ; Movie Options GUIPButtonHole 8,145,byte[MovieForcedLengthEnabled],1 GUIPButtonHole 8,155,byte[MovieForcedLengthEnabled],2 GUITextBoxInputNach 136,144,205,154,14,11,SetMovieForcedLength.nodumping ret%macro GUIInputSetIndKey 1 ;Check if controller is set push eax mov eax,[keycontrolval] cmp dword[eax],0 pop eax je near %%lockInputChange DGOptnsProcBox 45,102,[%1upk] ; Up DGOptnsProcBox 45,112,[%1downk] ; Down DGOptnsProcBox 45,122,[%1leftk] ; Left DGOptnsProcBox 45,132,[%1rightk] ; Right DGOptnsProcBox 45,142,[%1startk] ; Start DGOptnsProcBox 45,152,[%1selk] ; Select DGOptnsProcBox 85,102,[%1Ak] ; A DGOptnsProcBox 85,112,[%1Bk] ; B DGOptnsProcBox 85,122,[%1Xk] ; X DGOptnsProcBox 85,132,[%1Yk] ; Y DGOptnsProcBox 85,142,[%1Lk] ; L DGOptnsProcBox 85,152,[%1Rk] ; R DGOptnsProcBox 125,102,[%1Xtk] ; X Turbo DGOptnsProcBox 125,112,[%1Ytk] ; Y Turbo DGOptnsProcBox 125,122,[%1Ltk] ; L Turbo DGOptnsProcBox 165,102,[%1Atk] ; A Turbo DGOptnsProcBox 165,112,[%1Btk] ; B Turbo DGOptnsProcBox 165,122,[%1Rtk] ; R Turbo DGOptnsProcBox 125,142,[%1DLk] ; Down-Left DGOptnsProcBox 125,152,[%1DRk] ; Down-Right DGOptnsProcBox 165,142,[%1ULk] ; Up-Left DGOptnsProcBox 165,152,[%1URk] ; Up-Right%%lockInputChange%endmacroDisplayGUIInputClick2: push eax mov eax,[NumInputDevices] mov [GUINumValue],eax pop eax GUISlidebarPostImpl 109,42,116,69,.scrollup,.scrolldown,9,5,GUIcurrentinputviewloc,GUIcurrentinputcursloc,GUINumValue,GUIBlankVar,1 GUIPostWinBoxMove 5,35,107,35+5*8,GUIcurrentinputviewloc,GUIcurrentinputcursloc,GUINumValue,.scrollup,.scrolldown,DisplayGUIInputClick.skipscrol,5DisplayGUIInputClick: ; SlideBar Implementation push eax mov eax,[NumInputDevices] mov [GUINumValue],eax pop eax GUISlidebarImpl 109,42,116,69,GUIIStA,5,GUIcurrentinputviewloc,GUIcurrentinputcursloc,GUINumValue,3.skipscrol ;x,y,x2,y2,currentwin,vpos,#entries,starty,y/entry,cpos,winval,win#,dclicktick# GUIWinControl 5,36,107,34+5*8,GUIBlankVar,GUIcurrentinputviewloc,GUINumValue,35,8,GUIcurrentinputcursloc,4,3,0 GUIPTabClick 0,21,1,GUIInputTabs GUIPTabClick 22,43,2,GUIInputTabs GUIPTabClick 44,65,3,GUIInputTabs GUIPTabClick 66,87,4,GUIInputTabs GUIPTabClick 88,109,5,GUIInputTabs GUIPHoldbutton 123,34,153,45,14 ; Buttons GUIPHoldbutton 123,50,177,61,40%ifdef __MSDOS__ GUIPHoldbutton 123,66,183,77,15%endif cmp byte[cplayernum],0 jne near .nopl1 mov dword[keycontrolval],pl1contrl GUIInputSetIndKey pl1.nopl1 cmp byte[cplayernum],1 jne near .nopl2 mov dword[keycontrolval],pl2contrl GUIInputSetIndKey pl2.nopl2 cmp byte[cplayernum],2 jne near .nopl3 mov dword[keycontrolval],pl3contrl GUIInputSetIndKey pl3.nopl3 cmp byte[cplayernum],3 jne near .nopl4 mov dword[keycontrolval],pl4contrl GUIInputSetIndKey pl4.nopl4 cmp byte[cplayernum],4 jne near .nopl5 mov dword[keycontrolval],pl5contrl GUIInputSetIndKey pl5.nopl5%ifdef __MSDOS__ cmp byte[cplayernum],0 jne .notpl1 GUIClickCButtonID 5,190,byte[pl1p209].notpl1 cmp byte[cplayernum],1 jne .notpl2 GUIClickCButtonID 5,190,byte[pl2p209].notpl2 cmp byte[cplayernum],2 jne .notpl3 GUIClickCButtonID 5,190,byte[pl3p209].notpl3 cmp byte[cplayernum],3 jne .notpl4 GUIClickCButtonID 5,190,byte[pl4p209].notpl4 cmp byte[cplayernum],4 jne .notpl5 GUIClickCButtonID 5,190,byte[pl5p209].notpl5 GUIClickCButton 105,160,byte[SidewinderFix]%endif GUIClickCButton 5,160,byte[GameSpecificInput] GUIClickCButton 5,170,byte[AllowUDLR] GUIClickCButton 105,170,byte[Turbo30hz] GUIClickCButtonM 5,180,byte[pl12s34] retDisplayGUIOptionClick: cmp byte[ShowMMXSupport],1 jne .nommx GUIClickCButton 11,18,byte[MMXSupport].nommx%ifdef __WIN32__ GUIClickCButton 11,28,byte[PauseFocusChange] GUIClickCButton 11,38,byte[HighPriority] pushad call CheckPriority popad GUIClickCButton 11,48,byte[DisableScreenSaver] pushad call CheckScreenSaver popad%endif GUIClickCButton 11,68,byte[newengen] GUIClickCButton 11,78,byte[bgfixer] GUIPButtonHole 143,70,byte[ScreenShotFormat],0%ifndef NO_PNG GUIPButtonHole 143,80,byte[ScreenShotFormat],1%endif GUIClickCButton 11,98,byte[AutoPatch] GUIClickCButton 11,108,byte[DisplayInfo] GUIClickCButton 11,118,byte[RomInfo] GUIClickCButton 11,138,byte[FPSAtStart] GUIClickCButton 11,148,byte[TimerEnable] GUIClickCButton 89,148,byte[TwelveHourClock] GUIClickCButton 11,158,byte[ClockBox] GUIClickCButton 11,178,byte[SmallMsgText] GUIClickCButton 11,188,byte[GUIEnableTransp] retDisplayGUIVideoClick2: cmp dword[GUIVideoTabs],1 ; modes jne near .notmodestab2 push eax mov eax,[NumVideoModes] mov [GUINumValue],eax pop eax GUISlidebarPostImpl 117,33,124,182,.scrollup,.scrolldown,5,20,GUIcurrentvideoviewloc,GUIcurrentvideocursloc,GUINumValue,GUIBlankVar,1 GUIPostWinBoxMove 5,27,115,27+20*8,GUIcurrentvideoviewloc,GUIcurrentvideocursloc,GUINumValue,.scrollup,.scrolldown,DisplayGUIVideoClick.skipscrol,20.notmodestab2DisplayGUIVideoClick: GUIPTabClick 0,39,1,GUIVideoTabs,GUIVntscTab GUIPTabClick 40,91,2,GUIVideoTabs,GUIVntscTab cmp byte[NTSCFilter],1 jne .nontscf GUIPTabClick 92,125,1,GUIVntscTab,GUIVideoTabs GUIPTabClick 126,184,2,GUIVntscTab,GUIVideoTabs.nontscf cmp dword[GUIVideoTabs],1 ; modes jne near .notmodestab ; SlideBar Implementation push eax mov eax,[NumVideoModes] mov [GUINumValue],eax pop eax GUISlidebarImpl 117,33,124,182,GUIVStA,20,GUIcurrentvideoviewloc,GUIcurrentvideocursloc,GUINumValue,5.skipscrol GUIWinControl 5,27,115,27+20*8,GUIBlankVar,GUIcurrentvideoviewloc,GUINumValue,27,8,GUIcurrentvideocursloc,2,5,0 GUIPHoldbutton 130,31,166,41,4%ifndef __MSDOS__ GUIPHoldbutton 182,116,218,126,12 GUITextBoxInputNach 130,130,178,140,12,5,SetCustomXY GUITextBoxInputNach 191,130,239,140,13,5,SetCustomXY%endif.notmodestab cmp dword[GUIVideoTabs],2 ; Filters tab jne near .notfilterstab pushad call Clear2xSaIBuffer popad%ifdef __MSDOS__ cmp byte[smallscreenon],1 je .nohsline cmp byte[ScreenScale],1 je .noradiobuttons%endif xor ebx,ebx ; Interpolations mov bl,[cvidmode]%ifdef __MSDOS__ cmp byte[GUIEAVID+ebx],0 jne near .yesinterp%endif%ifdef __WIN32__ cmp byte[GUIDSIZE+ebx],0%else cmp byte[GUII2VID+ebx],0%endif je near .nocheckboxi2.yesinterp FilterExcl 18,35,hqFilter,NTSCFilter,En2xSaI GUIClickCButton 18,35,byte[antienab].nocheckboxi2%ifdef __OPENGL__ xor ebx,ebx ; Bilinear mov bl,[cvidmode] cmp byte[GUIBIFIL+ebx],0 je .nocheckbox1bf FilterExcl 18,35,NTSCFilter GUIClickCButtonB 18,35,byte[BilinearFilter].nocheckbox1bf%endif xor ebx,ebx ; NTSC filter mov bl,[cvidmode] cmp byte[GUINTVID+ebx],0 je near .nontscfilter FilterExcl 128,35,En2xSaI,hqFilter,scanlines,antienab%ifdef __OPENGL__ FilterExcl 128,35,BilinearFilter%endif%ifndef __MSDOS__ GUIClickCButtonN 128,35,byte[NTSCFilter],NTSCFilterInit%endif.nontscfilter xor ebx,ebx ; Kreed 2x filters mov bl,[cvidmode]%ifdef __MSDOS__ cmp byte[GUI2xVID+ebx],0%else cmp byte[GUIDSIZE+ebx],0%endif je near .no2xSaI FilterExcl 18,45,hqFilter,scanlines,antienab,NTSCFilter FilterExcl 128,45,hqFilter,scanlines,antienab,NTSCFilter FilterExcl 18,55,hqFilter,scanlines,antienab,NTSCFilter GUIClickCButton6 18,45,byte[En2xSaI],1 GUIClickCButton6 128,45,byte[En2xSaI],2 GUIClickCButton6 18,55,byte[En2xSaI],3.no2xSaI xor ebx,ebx ; Hq*x filters mov bl,[cvidmode]%ifndef __MSDOS__ cmp byte[GUIHQ4X+ebx],0 jne near .radiobuttonhq4x cmp byte[GUIHQ3X+ebx],0 jne near .radiobuttonhq3x%endif cmp byte[GUIHQ2X+ebx],0%ifdef __MSDOS__ jne .checkboxhq%else jne near .radiobuttonhq2x%endif jmp .nocheckboxhq.checkboxhq FilterExcl 128,55,En2xSaI,scanlines,antienab,NTSCFilter GUIClickCButton 128,55,byte[hqFilter].nocheckboxhq%ifndef __MSDOS__ jmp .noradiobuttons.radiobuttonhq4x GUIPButtonHole 188,68,byte[hqFilterlevel],4.radiobuttonhq3x GUIPButtonHole 158,68,byte[hqFilterlevel],3.radiobuttonhq2x GUIPButtonHole 128,68,byte[hqFilterlevel],2 FilterExcl 128,55,En2xSaI,scanlines,antienab,NTSCFilter GUIClickCButton 128,55,byte[hqFilter]%endif.noradiobuttons xor ebx,ebx ; Scanlines mov bl,[cvidmode]%ifdef __MSDOS__ cmp byte[GUISLVID+ebx],0%else cmp byte[GUIDSIZE+ebx],0%endif je near .nocheckboxb FilterExcl 168,87,En2xSaI,hqFilter,NTSCFilter GUIPButtonHoleS 18,87,byte[scanlines],0 GUIPButtonHoleS 168,87,byte[scanlines],1.nocheckboxb%ifdef __MSDOS__ cmp byte[ScreenScale],1 je .nohsline
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -