mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-11-27 19:29:46 +03:00
add new functions in open dialog,
fix programs info3ds, info3ds_u git-svn-id: svn://kolibrios.org@7616 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
0c01e81393
commit
2ef19ac48c
@ -520,10 +520,24 @@ but_open_file:
|
||||
cmp [OpenDialog_data.status],2
|
||||
je .end_open_file
|
||||
;ª®¤ ¯à¨ 㤠箬 ®âªàë⨨ ¤¨ «®£
|
||||
jmp @f
|
||||
jmp .end0
|
||||
.no_dlg: ;¥á«¨ ¬¨ã¥¬ ¤¨ «®£ ®âªàëâ¨ï ä ©«
|
||||
pushad
|
||||
@@:
|
||||
mov esi,openfile_path
|
||||
stdcall str_len,esi
|
||||
add esi,eax
|
||||
@@: ;横« ¤«ï ¯®¨áª ç « ¨¬¥¨ ä ©«
|
||||
dec esi
|
||||
cmp byte[esi],'/'
|
||||
je @f
|
||||
cmp byte[esi],0x5c ;'\'
|
||||
je @f
|
||||
cmp esi,openfile_path
|
||||
jg @b
|
||||
@@:
|
||||
inc esi
|
||||
stdcall [OpenDialog_Set_file_name],OpenDialog_data,esi ;ª®¯¨à㥬 ¨¬ï ä ©« ¢ ¤¨ «®£ á®åà ¥¨ï
|
||||
.end0:
|
||||
mov [run_file_70.Function], SSF_GET_INFO
|
||||
mov [run_file_70.Position], 0
|
||||
mov [run_file_70.Flags], 0
|
||||
@ -915,6 +929,7 @@ but_save_file:
|
||||
pushad
|
||||
copy_path open_dialog_name,communication_area_default_path,file_name,0
|
||||
mov [OpenDialog_data.type],1
|
||||
stdcall [OpenDialog_Set_file_ext],OpenDialog_data,Filter.1 ;.3ds
|
||||
stdcall [OpenDialog_Start],OpenDialog_data
|
||||
cmp [OpenDialog_data.status],2
|
||||
je .end_save_file
|
||||
@ -1037,6 +1052,7 @@ dd Filter.end - Filter.1
|
||||
.1:
|
||||
db '3DS',0
|
||||
db 'STL',0
|
||||
.3:
|
||||
db 'PNG',0
|
||||
.end:
|
||||
db 0
|
||||
@ -1160,12 +1176,16 @@ import_libimg:
|
||||
aimg_draw db 'img_draw',0
|
||||
|
||||
align 4
|
||||
proclib_import: ;®¯¨á ¨¥ íªá¯®àâ¨à㥬ëå äãªæ¨©
|
||||
proclib_import:
|
||||
OpenDialog_Init dd aOpenDialog_Init
|
||||
OpenDialog_Start dd aOpenDialog_Start
|
||||
OpenDialog_Set_file_name dd aOpenDialog_Set_file_name
|
||||
OpenDialog_Set_file_ext dd aOpenDialog_Set_file_ext
|
||||
dd 0,0
|
||||
aOpenDialog_Init db 'OpenDialog_init',0
|
||||
aOpenDialog_Start db 'OpenDialog_start',0
|
||||
aOpenDialog_Set_file_name db 'OpenDialog_set_file_name',0
|
||||
aOpenDialog_Set_file_ext db 'OpenDialog_set_file_ext',0
|
||||
|
||||
align 4
|
||||
import_buf2d:
|
||||
@ -1387,9 +1407,9 @@ white_light dd 0.8, 0.8, 0.8, 1.0 ;
|
||||
lmodel_ambient dd 0.3, 0.3, 0.3, 1.0 ; <20> à ¬¥âàë ä®®¢®£® ®á¢¥é¥¨ï
|
||||
|
||||
if lang eq ru
|
||||
capt db 'info 3ds ¢¥àá¨ï 14.03.19',0 ;¯®¤¯¨áì ®ª
|
||||
capt db 'info 3ds ¢¥àá¨ï 23.03.19',0 ;¯®¤¯¨áì ®ª
|
||||
else
|
||||
capt db 'info 3ds version 14.03.19',0 ;window caption
|
||||
capt db 'info 3ds version 23.03.19',0 ;window caption
|
||||
end if
|
||||
|
||||
align 16
|
||||
|
@ -656,10 +656,24 @@ but_open_file:
|
||||
cmp [OpenDialog_data.status],2
|
||||
je .end_open_file
|
||||
;ª®¤ ¯à¨ 㤠箬 ®âªàë⨨ ¤¨ «®£
|
||||
jmp @f
|
||||
jmp .end0
|
||||
.no_dlg: ;¥á«¨ ¬¨ã¥¬ ¤¨ «®£ ®âªàëâ¨ï ä ©«
|
||||
pushad
|
||||
@@:
|
||||
mov esi,openfile_path
|
||||
stdcall str_len,esi
|
||||
add esi,eax
|
||||
@@: ;横« ¤«ï ¯®¨áª ç « ¨¬¥¨ ä ©«
|
||||
dec esi
|
||||
cmp byte[esi],'/'
|
||||
je @f
|
||||
cmp byte[esi],0x5c ;'\'
|
||||
je @f
|
||||
cmp esi,openfile_path
|
||||
jg @b
|
||||
@@:
|
||||
inc esi
|
||||
stdcall [OpenDialog_Set_file_name],OpenDialog_data,esi ;ª®¯¨à㥬 ¨¬ï ä ©« ¢ ¤¨ «®£ á®åà ¥¨ï
|
||||
.end0:
|
||||
mov [run_file_70.Function], SSF_GET_INFO
|
||||
mov [run_file_70.Position], 0
|
||||
mov [run_file_70.Flags], 0
|
||||
@ -1110,6 +1124,7 @@ dd Filter.end - Filter.1
|
||||
.1:
|
||||
db '3DS',0
|
||||
db 'STL',0
|
||||
.3:
|
||||
db 'PNG',0
|
||||
.end:
|
||||
db 0
|
||||
@ -1233,12 +1248,16 @@ import_libimg:
|
||||
aimg_draw db 'img_draw',0
|
||||
|
||||
align 4
|
||||
proclib_import: ;®¯¨á ¨¥ íªá¯®àâ¨à㥬ëå äãªæ¨©
|
||||
proclib_import:
|
||||
OpenDialog_Init dd aOpenDialog_Init
|
||||
OpenDialog_Start dd aOpenDialog_Start
|
||||
OpenDialog_Set_file_name dd aOpenDialog_Set_file_name
|
||||
OpenDialog_Set_file_ext dd aOpenDialog_Set_file_ext
|
||||
dd 0,0
|
||||
aOpenDialog_Init db 'OpenDialog_init',0
|
||||
aOpenDialog_Start db 'OpenDialog_start',0
|
||||
aOpenDialog_Set_file_name db 'OpenDialog_set_file_name',0
|
||||
aOpenDialog_Set_file_ext db 'OpenDialog_set_file_ext',0
|
||||
|
||||
align 4
|
||||
import_buf2d:
|
||||
@ -1455,9 +1474,9 @@ white_light dd 0.8, 0.8, 0.8, 1.0 ;
|
||||
lmodel_ambient dd 0.3, 0.3, 0.3, 1.0 ; <20> à ¬¥âàë ä®®¢®£® ®á¢¥é¥¨ï
|
||||
|
||||
if lang eq ru
|
||||
capt db 'info 3ds [user] ¢¥àá¨ï 14.03.19',0 ;¯®¤¯¨áì ®ª
|
||||
capt db 'info 3ds [user] ¢¥àá¨ï 23.03.19',0 ;¯®¤¯¨áì ®ª
|
||||
else
|
||||
capt db 'info 3ds [user] version 14.03.19',0 ;window caption
|
||||
capt db 'info 3ds [user] version 23.03.19',0 ;window caption
|
||||
end if
|
||||
|
||||
align 16
|
||||
|
@ -5,7 +5,7 @@
|
||||
; Š®«¨ç¥á⢮ § ª®¢ ç¨á« ¯®á«¥ § ¯ï⮩ (1-17)
|
||||
NumberSymbolsAD DW 5
|
||||
; Š®áâ âë (10 ¢ á⥯¥¨ N)
|
||||
MConst DQ 1.0E1,1.0E2,1.0E3,1.0E4,1.0E5
|
||||
MConst: DQ 1.0E1,1.0E2,1.0E3,1.0E4,1.0E5
|
||||
DQ 1.0E6,1.0E7,1.0E8,1.0E9,1.0E10
|
||||
DQ 1.0E11,1.0E12,1.0E13,1.0E14,1.0E15
|
||||
DQ 1.0E16,1.0E17,1.0E18,1.0E19,1.0E20
|
||||
@ -31,6 +31,7 @@ MConst DQ 1.0E1,1.0E2,1.0E3,1.0E4,1.0E5
|
||||
DQ 1.0E116,1.0E117,1.0E118,1.0E119,1.0E120
|
||||
DQ 1.0E121,1.0E122,1.0E123,1.0E124,1.0E125
|
||||
DQ 1.0E126,1.0E127,1.0E128
|
||||
.end:
|
||||
; —¨á«® á ¯« ¢ î饩 § ¯ï⮩ ¤¢®©®© â®ç®áâ¨
|
||||
Data_Double DQ ?
|
||||
; —¨á«® ¢ BCD-ä®à¬ â¥
|
||||
@ -302,11 +303,23 @@ align 4
|
||||
jz .NoDiv ;¥á«¨ ç¨á«® e+0
|
||||
dec ebx
|
||||
lea ebx,[MConst+8*ebx]
|
||||
cmp ebx,MConst.end
|
||||
jl @f
|
||||
ffree st0
|
||||
fincstp
|
||||
jmp .Error ;¥á«¨ ®ç¥ì ¡®«ì讥 ç¨á«® e+**
|
||||
@@:
|
||||
fmul qword [ebx] ;㬮¦¨âì ª®áâ âã (¤«ï ç¨á¥« á ¯à¨áâ ¢ª®© e+..)
|
||||
jmp .NoDiv
|
||||
.NoMul:
|
||||
neg ebx
|
||||
lea ebx,[MConst+8*ebx]
|
||||
cmp ebx,MConst.end
|
||||
jl @f
|
||||
ffree st0
|
||||
fincstp
|
||||
jmp .Error ;¥á«¨ ®ç¥ì ¬ «¥ìª®¥ ç¨á«® e-**
|
||||
@@:
|
||||
fdiv qword [ebx] ;à §¤¥«¨âì ª®áâ âã
|
||||
.NoDiv: ;‚ë£à㧨âì ç¨á«® ¢ ¤¢®¨ç®¬ ä®à¬ â¥
|
||||
fstp [Data_Double]
|
||||
@ -356,6 +369,8 @@ proc string_ExpForm uses ebx
|
||||
jmp .cycle0
|
||||
.cycle0end:
|
||||
|
||||
cmp ebx,328 ;308 - ¬ ªá. à §¬¥à á⥯¥¨ ¤«ï double + 20 - ç¨á«® à §à冷¢ ¢ BCD
|
||||
ja .Error
|
||||
cmp [Data_Sign_Exp],0
|
||||
je @f
|
||||
neg ebx
|
||||
|
@ -60,9 +60,9 @@ key_select db 'col_select',0
|
||||
|
||||
txt_err_save_img_file:
|
||||
if lang eq ru
|
||||
db '<EFBFBD>¥ ¬®£ã á®åà ¨âì ä ©«.',0
|
||||
db '"<EFBFBD>¥ ¬®£ã á®åà ¨âì ä ©«." -W',0
|
||||
else
|
||||
db 'Can',39,'t save file.',0
|
||||
db '"Can',39,'t save file." -W',0
|
||||
end if
|
||||
|
||||
align 4
|
||||
@ -1090,9 +1090,10 @@ mnu_make_scrshot:
|
||||
pushad
|
||||
copy_path open_dialog_name,communication_area_default_path,file_name,0
|
||||
mov [OpenDialog_data.type],1
|
||||
stdcall [OpenDialog_Set_file_ext],OpenDialog_data,Filter.3 ;.png
|
||||
stdcall [OpenDialog_Start],OpenDialog_data
|
||||
cmp [OpenDialog_data.status],2
|
||||
je .end_save_file
|
||||
cmp [OpenDialog_data.status],1
|
||||
jne .end_save_file
|
||||
;ª®¤ ¯à¨ 㤠箬 ®âªàë⨨ ¤¨ «®£
|
||||
mov dword[png_data],0
|
||||
|
||||
|
@ -396,5 +396,56 @@ OpenDialog_exit
|
||||
cld
|
||||
ret
|
||||
;----------------------------------------------
|
||||
align 4
|
||||
.set_file_name:
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
push eax ecx edi esi
|
||||
mov edi,[ebp+8] ;open dlg struct
|
||||
mov edi,[edi+40] ;+40 - filename_area
|
||||
mov esi,[ebp+12] ;file name
|
||||
mov ecx,256
|
||||
;copy file name in dialog
|
||||
@@:
|
||||
lodsb
|
||||
stosb
|
||||
test eax,eax
|
||||
loop @b
|
||||
pop esi edi ecx eax
|
||||
pop ebp
|
||||
ret 8
|
||||
;----------------------------------------------
|
||||
align 4
|
||||
.set_file_ext:
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
push eax ecx edi esi
|
||||
mov esi,[ebp+8] ;open dlg struct
|
||||
|
||||
xor eax,eax
|
||||
mov ecx,256
|
||||
mov edi,[esi+40] ;+40 - filename_area
|
||||
repne scasb
|
||||
@@: ;found position of '.'
|
||||
dec edi
|
||||
cmp byte[edi],'.'
|
||||
je @f
|
||||
cmp edi,[esi+40]
|
||||
ja @b
|
||||
jmp .no_dot
|
||||
@@:
|
||||
inc edi
|
||||
mov esi,[ebp+12] ;file ext
|
||||
;copy file ext in dialog
|
||||
@@:
|
||||
lodsb
|
||||
stosb
|
||||
test eax,eax
|
||||
jnz @b
|
||||
|
||||
.no_dot:
|
||||
pop esi edi ecx eax
|
||||
pop ebp
|
||||
ret 8
|
||||
}
|
||||
;*****************************************************************************
|
@ -45,6 +45,8 @@ dd sz_version, 0x00000001
|
||||
|
||||
dd sz_OpenDialog_init, OpenDialog.init
|
||||
dd sz_OpenDialog_start, OpenDialog.start
|
||||
dd sz_OpenDialog_set_file_name, OpenDialog.set_file_name
|
||||
dd sz_OpenDialog_set_file_ext, OpenDialog.set_file_ext
|
||||
dd szVersion_OpenDialog, 0x00010001
|
||||
|
||||
dd sz_ColorDialog_init, ColorDialog.init
|
||||
@ -58,6 +60,8 @@ sz_version db 'version',0
|
||||
|
||||
sz_OpenDialog_init db 'OpenDialog_init',0
|
||||
sz_OpenDialog_start db 'OpenDialog_start',0
|
||||
sz_OpenDialog_set_file_name db 'OpenDialog_set_file_name',0
|
||||
sz_OpenDialog_set_file_ext db 'OpenDialog_set_file_ext',0
|
||||
szVersion_OpenDialog db 'Version_OpenDialog',0
|
||||
|
||||
sz_ColorDialog_init db 'ColorDialog_init',0
|
||||
|
Loading…
Reference in New Issue
Block a user