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

📄 guiwindp.inc

📁 十七种模拟器源代码 非常有用的作课程设计不可缺少的
💻 INC
📖 第 1 页 / 共 5 页
字号:
    mov [cloadnpos],eax
    GUIOuttextwin2l 1,5,157,[cloadnpos]
%endif
.nofilesb

    DrawGUIButton 1,186,167,228,178,GUILoadText9,1,0,0
    mov al,[GUIWincol]
    mov byte[GUItextcolor],al
;    GUIOuttextwin2 1,6,16,GUILoadText1
;    cmp byte[OSPort],2
;    jae near .noloadtypee
%ifdef __MSDOS__
    GUIOuttextwin2 1,6,157,GUILoadText2
%endif
.noloadtypee
    mov byte[GUItextcolor],163
    cmp byte[GUIWincoladd],0
    je .zero3
    mov byte[GUItextcolor],164
.zero3
;    GUIOuttextwin2 1,5,15,GUILoadText1
;    cmp byte[OSPort],2
;    jae near .noloadtyped
%ifdef __MSDOS__
    GUIOuttextwin2 1,5,156,GUILoadText2
%endif
.noloadtyped
    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

;    cmp byte[OSPort],2
;    jae near .noloadtype
%ifdef __MSDOS__
    GUIDisplayButtonHole 1,9,163,byte[GUIloadfntype],0
    GUIDisplayButtonHole 1,9,171,byte[GUIloadfntype],1
    GUIDisplayButtonHole 1,9,179,byte[GUIloadfntype],2
%endif
.noloadtype
    mov dword[GUITemp],GUIIconDataCheckBoxUC
    cmp byte[showallext],1
    jne .nocheck
    mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheck
    GUIDisplayIconWin 1,10,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,229,144,dl
    mov dl,[GUIWincol]
    add dl,1
    DrawGUIWinBox 1,4,144,3,152,dl
    mov dl,[GUIWincol]
    add dl,4
    DrawGUIWinBox 1,5,153,228,153,dl
    mov dl,[GUIWincol]
    add dl,3
    DrawGUIWinBox 1,229,144,228,152,dl
    ret

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
GUILStA dd 0,0,0
GUILStB dd 0,0,0
GUILoadPos db 0

DisplayGUIReset:
    GUIDrawWindowBox 12,GUIResetDisp
    cmp byte[GUIWincoladd],0
    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
    DrawGUIButton 12,80,30,116,41,GUIResetText3,3,0,0
    mov al,[GUIWincol]
    mov byte[GUItextcolor],al
    GUIOuttextwin2 12,6,16,GUIResetText1
    mov byte[GUItextcolor],163
    cmp byte[GUIWincoladd],0
    je .zero3
    mov byte[GUItextcolor],164
.zero3
    GUIOuttextwin2 12,5,15,GUIResetText1
    ret

GUIResetText1 db 'RESET : ARE YOU SURE ?',0
GUIResetText2 db 'YES',0
GUIResetText3 db 'NO',0

DisplayGUIStates:
    GUIDrawWindowBox 14,GUIStatesDisp
    cmp byte[GUIWincoladd],0
    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
    DrawGUIButton 14,80,30,116,41,GUIStatesText4,11,0,0
    mov al,[GUIWincol]
    mov byte[GUItextcolor],al
    cmp byte[GUIStatesText5],1
    je .load
    GUIOuttextwin2 14,6,16,GUIStatesText1
    jmp .save
.load
    GUIOuttextwin2 14,6,16,GUIStatesText2
.save
    mov byte[GUItextcolor],163
    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

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

DisplayGUIChoseSave:
    GUIDrawWindowBox 2,GUIStateSelDisp
    cmp byte[GUIWincoladd],0
    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
    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]
    mov byte[GUItextcolor],al
    GUIOuttextwin2 2,6,16,GUIChoseSaveText1
    mov byte[GUItextcolor],163
    cmp byte[GUIWincoladd],0
    je .zero3
    mov byte[GUItextcolor],164
.zero3
    GUIOuttextwin2 2,5,15,GUIChoseSaveText1
    mov dword[GUITemp],GUIIconDataButtonHole
    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

GUIChoseSaveText1 db 'SELECT SAVE SLOT :',0
GUIChoseSaveText2 db '-',0

%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 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

⌨️ 快捷键说明

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