⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 guiwindp.inc

📁 十七种模拟器源代码 非常有用的作课程设计不可缺少的
💻 INC
📖 第 1 页 / 共 5 页
字号:
    mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox3
    GUIDisplayIconWin 5,11,98,[GUITemp]
.nocheckbox3b

    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

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 ENGINE',0
GUIVideoTextd2 db 'SUPER 2XSAI ENGINE',0
GUIVideoTextbf db 'BILINEAR FILTER',0
GUIVideoText3 db 'INTERPOLATION',0      ; -y
GUIVideoText4 db 'EAGLE ENGINE',0       ; -y
GUIVideoText5 db 'FULL SCREEN',0        ; -c
GUIVideoText6 db 'SMALL SCREEN',0       ; -c
GUIVideoText7 db 'TRIPLE BUFFERING',0       ; -c
GUIVideoText8b db 'HI-RESOLUTION MODE7',0       ; -c
GUIVideoText8c db 'GRAYSCALE MODE',0       ; -c
GUIVideoText8 db 'SET',0                ; set button
GUIVideoTextH db 'MODE : ',0
GUIVideoTextw0 db 'LEGEND:',0
GUIVideoTextw1 db ' S = SCALED TO FIT SCREEN',0
GUIVideoTextw2 db ' R = MATCHED SCREEN RATIO',0
GUIVideoTextw3 db ' D = ALLOW 2XSAI,HIRES,ETC',0
GUIVStA dd 0,0,0

GUIcurrentvideoviewloc dd 0
GUIcurrentvideocursloc dd 0


DisplayGUISound:
    ; Enable Sound/Sampling Rate/Stereo/Sound Buffering/Volume
    GUIDrawWindowBox 6,GUISoundDisp
    mov byte[GUItextcolor],217
    cmp byte[GUIWincoladd],0
    je .zero
    mov byte[GUItextcolor],211
.zero
    sub byte[GUItextcolor],15
    ; E = Enable Sound, S = Stereo Sound, B = Sound Buffering
    ; R = Sample Rate
    GUIOuttextwin2u 6,26,26,GUISoundText1,0
    GUIOuttextwin2u 6,26,35,GUISoundText3,0
;    cmp byte[OSPort],3
;    je near .win32b
%ifdef __MSDOS__
    GUIOuttextwin2u 6,26,44,GUISoundText2b,1
%endif
;.win32b
    GUIOuttextwin2u 6,26,106,GUISoundText4,8
    GUIOuttextwin2u 6,26,116,GUISoundTextH,2
;    cmp byte[OSPort],3
;    je near .win32s2
%ifdef __MSDOS__
    GUIOuttextwin2u 6,26,126,GUISoundTextI,1
%endif
;.win32s2
%ifdef __WIN32__
    GUIOuttextwin2u 6,26,126,GUISoundTextIb,1
%endif
    GUIOuttextwin2u 6,26,136,GUISoundTextJ,1
    GUIOuttextwin2u 6,26,146,GUISoundTextK,0
    GUIOuttextwin2u 6,26,156,GUISoundTextL,6
    GUIOuttextwin2u 6,26,166,GUISoundTextM,0
    GUIOuttextwin2u 6,26,176,GUISoundTextN,0
%ifdef __WIN32__
    GUIOuttextwin2u 6,26,186,GUISoundTextO,1
%endif
    add byte[GUItextcolor],15
    GUIOuttextwin2 6,25,25,GUISoundText1
    GUIOuttextwin2 6,25,34,GUISoundText3
;    cmp byte[OSPort],3
;    je near .win32c
%ifdef __MSDOS__
    GUIOuttextwin2 6,25,43,GUISoundText2b
%endif
;.win32c
    GUIOuttextwin2 6,25,105,GUISoundText4
    GUIOuttextwin2 6,25,115,GUISoundTextH
;    cmp byte[OSPort],3
;    je near .win32s
%ifdef __MSDOS__
    GUIOuttextwin2 6,25,125,GUISoundTextI
%endif
;.win32s
%ifdef __WIN32__
    GUIOuttextwin2 6,25,125,GUISoundTextIb
%endif
    GUIOuttextwin2 6,25,135,GUISoundTextJ
    GUIOuttextwin2 6,25,145,GUISoundTextK
    GUIOuttextwin2 6,25,155,GUISoundTextL
    GUIOuttextwin2 6,25,165,GUISoundTextM
    GUIOuttextwin2 6,25,175,GUISoundTextN
%ifdef __WIN32__
    GUIOuttextwin2 6,25,185,GUISoundTextO
%endif
    mov al,[GUIWincol]
    mov byte[GUItextcolor],al
    GUIOuttextwin2 6,6,16,GUISoundText6
    GUIOuttextwin2u 6,6,53,GUISoundText2,9
    GUIOuttextwin2 6,6,76,GUISoundText5
    mov byte[GUItextcolor],163
    cmp byte[GUIWincoladd],0
    je .zero3
    mov byte[GUItextcolor],164
.zero3
    GUIOuttextwin2 6,5,15,GUISoundText6
    GUIOuttextwin2 6,5,52,GUISoundText2
    GUIOuttextwin2 6,5,75,GUISoundText5
    mov dword[GUITemp],GUIIconDataCheckBoxUC
    cmp byte[cfgsoundon],0
    je .nocheckbox
    mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox
    GUIDisplayIconWin 6,11,21,[GUITemp]
    mov dword[GUITemp],GUIIconDataCheckBoxUC
    cmp byte[cfgStereoSound],0
    je .nocheckbox1
    mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox1
    GUIDisplayIconWin 6,11,30,[GUITemp]
    mov dword[GUITemp],GUIIconDataCheckBoxUC
    cmp byte[RaisePitch],0
    je .nocheckbox1b
    mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox1b
;    cmp byte[OSPort],3
;    je near .win32
%ifdef __MSDOS__
    GUIDisplayIconWin 6,11,39,[GUITemp]
%endif
;.win32
    mov dword[GUITemp],GUIIconDataCheckBoxUC
    cmp byte[SoundNoiseDis],0
    je .nocheckbox2
    mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox2
    GUIDisplayIconWin 6,11,101,[GUITemp]
    mov dword[GUITemp],GUIIconDataCheckBoxUC
    cmp byte[RevStereo],0
    je .nocheckbox3
    mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox3
    GUIDisplayIconWin 6,11,111,[GUITemp]
;    cmp byte[OSPort],3
;    je near .nocheckbox42
%ifdef __MSDOS__
    mov dword[GUITemp],GUIIconDataCheckBoxUC
    cmp byte[Surround],0
    je .nocheckbox4
    mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox4
    GUIDisplayIconWin 6,11,121,[GUITemp]
%endif
.nocheckbox42
%ifdef __WIN32__
    mov dword[GUITemp],GUIIconDataCheckBoxUC
    cmp byte[LargeSoundBuf],0
    je .nocheckbox43
    mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox43
    GUIDisplayIconWin 6,11,121,[GUITemp]
%endif
    mov dword[GUITemp],GUIIconDataCheckBoxUC
    cmp byte[InterSound],0
    je .nocheckbox5
    mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox5
    GUIDisplayIconWin 6,11,131,[GUITemp]
    mov dword[GUITemp],GUIIconDataCheckBoxUC
    cmp byte[LowPassFilter],0
    je .nocheckbox6
    mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox6
    GUIDisplayIconWin 6,11,141,[GUITemp]
    mov dword[GUITemp],GUIIconDataCheckBoxUC
    cmp byte[SoundBufEn],0
    je .nocheckbox7
    mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox7
    GUIDisplayIconWin 6,11,151,[GUITemp]
    mov dword[GUITemp],GUIIconDataCheckBoxUC
    cmp byte[UseCubicSpline],0
    je .nocheckbox8
    mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox8
    GUIDisplayIconWin 6,11,161,[GUITemp]
    mov dword[GUITemp],GUIIconDataCheckBoxUC
    cmp byte[SPCDisable],0
    je .nocheckbox9
    mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox9
    GUIDisplayIconWin 6,11,171,[GUITemp]
%ifdef __WIN32__
    mov dword[GUITemp],GUIIconDataCheckBoxUC
    cmp byte[ExclusiveSound],0
    je .nocheckbox10
    mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox10
    GUIDisplayIconWin 6,11,181,[GUITemp]
%endif
    DrawGUIWinBox 6,15,61,69,69,167
    mov dword[GUITemp],GUISoundText7
    xor eax,eax
    mov al,[cfgSoundQuality]
    shl eax,3
    add [GUITemp],eax
    mov byte[GUItextcolor],223
    GUIOuttextwin2 6,23,64,[GUITemp]
    mov byte[GUItextcolor],221
    cmp byte[GUIWincoladd],0
    je .zero4
    mov byte[GUItextcolor],222
.zero4
    GUIOuttextwin2 6,22,63,[GUITemp]
    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[GUISoundTextD],' '
    mov byte[GUISoundTextD+3],'%'
    mov esi,GUISoundTextD+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

GUISoundText1 db 'ENABLE SOUND',0
GUISoundText2 db 'SAMPLING RATE :',0
GUISoundText2b db 'RAISE PITCH LEVEL',0
GUISoundText3 db 'STEREO SOUND',0
GUISoundText4 db 'DISABLE NOISE SIM.',0
GUISoundText5 db 'VOLUME LEVEL :',0
GUISoundText6 db 'SOUND SWITCHES :',0
GUISoundText7 db ' 8000HZ',0
GUISoundText8 db '11025HZ',0
GUISoundText9 db '22050HZ',0
GUISoundTextA db '44100HZ',0
GUISoundTextB db '16000HZ',0
GUISoundTextC db '32000HZ',0
GUISoundTextCb db '48000HZ',0
GUISoundTextD db '---%',0
GUISoundTextH db 'REVERSE STEREO',0
GUISoundTextI db 'SURROUND SOUND',0
GUISoundTextIb db 'LARGE SOUND BUFFER',0
GUISoundTextJ db 'SOUND INTERPOLATION',0
GUISoundTextK db 'LOW PASS FILTER',0
GUISoundTextL db 'SOUND BUFFERING',0
GUISoundTextM db 'CUBIC SPLINE INTERP',0
GUISoundTextN db 'DISABLE SPC EMU',0
GUISoundTextO db 'EXCLUSIVE MODE',0

DisplayGUICheatConv:
    mov eax,[ccheatnpos]
    add eax,4
    xor ebx,ebx
    mov ecx,3
    mov edx,GUICheatTextB
.loop
    mov bl,[eax]
    and bl,0Fh
    mov bl,[GUICheatTextC+ebx]
    mov [edx+1],bl
    mov bl,[eax]
    and bl,0F0h
    shr bl,4
    mov bl,[GUICheatTextC+ebx]
    mov [edx],bl
    add edx,2
    dec eax
    loop .loop
    mov eax,[ccheatnpos]
    inc eax
    mov edx,GUICheatTextB+7
    mov bl,[eax]
    and bl,0Fh
    mov bl,[GUICheatTextC+ebx]
    mov [edx+1],bl
    mov bl,[eax]
    and bl,0F0h
    shr bl,4
    mov bl,[GUICheatTextC+ebx]
    mov [edx],bl
    mov eax,[ccheatnpos]
    add eax,5
    mov edx,GUICheatTextB+10
    mov bl,[eax]
    and bl,0Fh
    mov bl,[GUICheatTextC+ebx]
    mov [edx+1],bl
    mov bl,[eax]
    and bl,0F0h
    shr bl,4
    mov bl,[GUICheatTextC+ebx]
    mov [edx],bl
    mov eax,[ccheatnpos]
    test byte[eax-28],80h
    jnz .src
    test byte[eax],04h
    jz .on
    mov byte[GUICheatTextB+13],'O'
    mov byte[GUICheatTextB+14],'F'
    mov byte[GUICheatTextB+15],'F'
    jmp .off
.on
    test byte[eax],80h
    jnz .repl
    mov byte[GUICheatTextB+13],'O'
    mov byte[GUICheatTextB+14],'N'
    mov byte[GUICheatTextB+15],' '
    jmp .off
.repl
    mov byte[GUICheatTextB+13],'R'
    mov byte[GUICheatTextB+14],'P'
    mov byte[GUICheatTextB+15],'L'
    jmp .off
.src
    mov byte[GUICheatTextB+13],'S'
    mov byte[GUICheatTextB+14],'R'
    mov byte[GUICheatTextB+15],'C'
.off
    mov ecx,20
    add eax,8
    mov edx,GUICheatTextB+17
.loop2
    mov bl,[eax]
    mov [edx],bl
    inc eax
    inc edx
    loop .loop2
    ret

%macro GUIOuttextwin2cheat 2
    test dword[ccheatnleft],80000000h
    jnz %%skip
    call DisplayGUICheatConv
    GUIOuttextwin2 7,%1,%2,GUICheatTextB
    add dword[ccheatnpos],28
    dec dword[ccheatnleft]
%%

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -