22,6 → 22,7 |
include '../../proc32.inc' |
include '../../macros.inc' |
include 'mem.inc' |
include 'dll.inc' |
include '../../develop/libraries/box_lib/load_lib.mac' |
include '../../develop/libraries/box_lib/trunk/box_lib.mac' |
include 'lang.inc' |
31,8 → 32,56 |
include 't_draw.inc' ;draw main window functions |
include 't_button.inc' ;text work functions |
|
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,0 |
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load |
|
|
; ªà®á ¤«ï § £à㧪¨ ¨§®¡à ¦¥¨© á ¨á¯®«ì§®¢ ¨¥¬ ¡¨¡«¨®â¥ª¨ libimg.obj |
;¤«ï ¨á¯®«ì§®¢ ¨ï ¬ ªà®á ã¦ë ¯¥à¥¬¥ë¥: |
; - run_file_70 FileInfoBlock |
; - image_data dd 0 |
macro load_image_file path,buf,size |
{ |
;path - ¬®¦¥â ¡ëâì ¯¥à¥¬¥®© ¨«¨ áâப®¢ë¬ ¯ à ¬¥â஬ |
if path eqtype '' ;¯à®¢¥à塞 § ¤ «¨ áâப®© ¯ à ¬¥âà path |
jmp @f |
local .path_str |
.path_str db path ;ä®à¬¨à㥬 «®ª «ìãî ¯¥à¥¬¥ãî |
db 0 |
@@: |
;32 - áâ ¤ àâë© ¤à¥á ¯® ª®â®à®¬ã ¤®«¦¥ ¡ëâì ¡ãä¥à á á¨áâ¥¬ë¬ ¯ã⥬ |
copy_path .path_str,[32],file_name,0x0 |
else |
copy_path path,[32],file_name,0x0 ;ä®à¬¨à㥬 ¯®«ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ® ¢ ®¤®© ¯ ¯ª¥ á ¯à®£à ¬¬®© |
end if |
|
stdcall mem.Alloc, dword size ;¢ë¤¥«ï¥¬ ¯ ¬ïâì ¤«ï ¨§®¡à ¦¥¨ï |
mov [buf],eax |
|
mov eax,70 ;70-ï äãªæ¨ï à ¡®â á ä ©« ¬¨ |
mov [run_file_70.Function], 0 |
mov [run_file_70.Position], 0 |
mov [run_file_70.Flags], 0 |
mov [run_file_70.Count], dword size |
m2m [run_file_70.Buffer], [buf] |
mov byte[run_file_70+20], 0 |
mov [run_file_70.FileName], file_name |
mov ebx,run_file_70 |
int 0x40 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥¨ï |
cmp ebx,0xffffffff |
je @f |
;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥¨ï ¨ ¯¥à¥¢®¤¨¬ ¥£® ¢® ¢à¥¬¥ë© ¡ãä¥à image_data |
stdcall dword[img_decode], dword[buf],ebx,0 |
mov dword[image_data],eax |
;¯à¥®¡à §ã¥¬ ¨§®¡à ¦¥¨¥ ª ä®à¬ âã rgb |
stdcall dword[img_to_rgb2], dword[image_data],dword[buf] |
;㤠«ï¥¬ ¢à¥¬¥ë© ¡ãä¥à image_data |
stdcall dword[img_destroy], dword[image_data] |
@@: |
} |
|
image_data dd 0 ;㪠§ â¥«ì ¢à¥¬¥ãî ¯ ¬ïâì. ¤«ï 㦥 ¯à¥®¡à §®¢ ¨ï ¨§®¡à ¦¥¨ï |
icon_tl_sys dd 0 ;㪠§ â¥«ì ¯ ¬ïâì ¤«ï åà ¥¨ï á¨á⥬ëå ¨ª®®ª |
|
align 4 |
start: |
mcall 48,3,sc,sizeof.system_colors |
49,6 → 98,7 |
call strlen |
mov ecx,eax |
mov edi,openfile_path |
cld |
rep movsb ;ª®¯¨à㥬 ¨¬ï ä ©« ¢ ¡ãä¥à edit1 |
|
load_libraries l_libs_start,load_lib_end |
78,76 → 128,18 |
; OpenDialog initialisation |
stdcall [OpenDialog_Init],OpenDialog_data |
|
; init bmp file |
mov ecx,1200*18 |
stdcall mem.Alloc,ecx |
mov [bmp_icon],eax |
|
copy_path fn_icon,sys_path,file_name,0x0 |
|
mov eax,70 ;load icon file |
mov [run_file_70.Function], 0 |
mov [run_file_70.Position], 54 |
mov [run_file_70.Flags], 0 |
mov [run_file_70.Count], 1200*18 |
m2m [run_file_70.Buffer], [bmp_icon] |
mov byte[run_file_70+20], 0 |
mov [run_file_70.FileName], file_name |
mov ebx,run_file_70 |
int 0x40 |
|
cmp ebx,-1 |
mov [err_ini0],1 |
je @f ;if open file |
mov [err_ini0],0 |
@@: |
|
; init toolbar file |
load_image_file 'te_icon.png', bmp_icon,1200*18 |
;--------------------------------------------------------------------- |
; ç¨â ¥¬ bmp ä ©« á ªãàá®à ¬¨ ¨ «¨¨ï¬¨ |
copy_path fn_icon_tl_sys,sys_path,file_name,0x0 |
|
mov ecx,3*256*13 |
stdcall mem.Alloc,ecx |
; ç¨â ¥¬ ä ©« á ªãàá®à ¬¨ ¨ «¨¨ï¬¨ |
load_image_file 'tl_sys_16.png', icon_tl_sys,54+3*256*13 |
mov eax,dword[icon_tl_sys] |
mov dword[tree1.data_img_sys],eax |
|
;mov [run_file_70.Function], 0 |
;mov [run_file_70.Position], 54 |
;mov [run_file_70.Flags], 0 |
mov [run_file_70.Count], 3*256*13 |
mov [run_file_70.Buffer], eax |
;mov byte[run_file_70+20], 0 |
;mov [run_file_70.FileName], file_name |
|
mov eax,70 ;load icon file |
mov ebx,run_file_70 |
int 0x40 |
cmp ebx,0 |
jg @f |
mov dword[tree1.data_img_sys],0 |
@@: |
;--------------------------------------------------------------------- |
; ç¨â ¥¬ bmp ä ©« á ¨ª®ª ¬¨ 㧫®¢ |
copy_path fn_icon_tl_nod,sys_path,file_name,0x0 |
|
mov ecx,3*256*2 |
stdcall mem.Alloc,ecx |
; ç¨â ¥¬ ä ©« á ¨ª®ª ¬¨ 㧫®¢ |
load_image_file 'tl_nod_16.png', icon_tl_sys,54+3*256*2 |
mov eax,dword[icon_tl_sys] |
mov dword[tree1.data_img],eax |
|
; mov [run_file_70.Function], 0 |
; mov [run_file_70.Position], 54 |
; mov [run_file_70.Flags], 0 |
mov [run_file_70.Count], 3*256*2 |
mov [run_file_70.Buffer], eax |
; mov byte[run_file_70+20], 0 |
; mov [run_file_70.FileName], file_name |
|
mov eax,70 ;load icon file |
mov ebx,run_file_70 |
int 0x40 |
cmp ebx,0 |
jg @f |
mov dword[tree1.data_img],0 |
@@: |
;------------------------------------------------------------------------------ |
copy_path fn_syntax_dir,sys_path,file_name,0x0 ;¡¥à¥¬ ¯ãâì ª ¯ ¯ª¥ á ä ©« ¬¨ á¨â ªá¨á |
mov eax,70 |
243,28 → 235,7 |
|
call draw_but_toolbar |
|
cmp [err_ini0],1 |
jne @f |
mov eax,4 |
mov ebx,ted_wnd_l |
add ebx,ted_rec_l |
shl ebx,16 |
add ebx,ted_wnd_t |
add ebx,ted_rec_t |
mov ecx,0x80ff0000 |
mov edx,txtErrIni0 |
int 0x40 |
|
add ebx,10 ;move <--y--> |
mov ecx,0x80ff0080 |
mov edx,file_name |
int 0x40 |
@@: |
|
cmp [err_ini0],1 |
je @f |
stdcall [ted_draw], tedit0 |
@@: |
|
mcall 12,2 |
ret |
502,10 → 473,6 |
mcall -1 ;¢ë室 ¨§ ¯à®£à ¬¬ë |
|
|
|
txtErrIni0 db '¥ ®âªàë«áï ä ©« á ¨ª®ª ¬¨',0 |
err_ini0 db 0 |
|
edit1 edit_box 250, 220, 5, 0xffffff, 0xff80, 0xff0000, 0xff, 0x4080, 4090, openfile_path, mouse_dd, 0 |
edit2 edit_box TED_PANEL_WIDTH-1, 0, 20, 0xffffff, 0xff80, 0xff0000, 0xff, 0x4080, 300, buf_find, mouse_dd, 0 |
|
512,8 → 479,8 |
buf_find db 302 dup(0) |
|
if lang eq ru |
head_f_i0: |
head_f_l0 db '¨á⥬ ï ®è¨¡ª ',0 |
head_f_i: |
head_f_l db '¨á⥬ ï ®è¨¡ª ',0 |
err_message_found_lib0 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'box_lib.obj',39,0 |
err_message_import0 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'box_lib.obj',39,0 |
err_message_found_lib1 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'msgbox.obj',39,0 |
520,9 → 487,11 |
err_message_import1 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'msgbox.obj',39,0 |
err_message_found_lib2 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'proc_lib.obj',39,0 |
err_message_import2 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'proc_lib.obj',39,0 |
err_message_found_lib_3 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'libimg.obj',39,0 |
err_message_import_3 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libimg.obj',39,0 |
else |
head_f_i0: |
head_f_l0 db 'System error',0 |
head_f_i: |
head_f_l db 'System error',0 |
err_message_found_lib0 db 'Sorry I cannot found library ',39,'box_lib.obj',39,0 |
err_message_import0 db 'Error on load import library ',39,'box_lib.obj',39,0 |
err_message_found_lib1 db 'Sorry I cannot found library ',39,'msgbox.obj',39,0 |
529,13 → 498,20 |
err_message_import1 db 'Error on load import library ',39,'msgbox.obj',39,0 |
err_message_found_lib2 db 'Sorry I cannot found library ',39,'proc_lib.obj',39,0 |
err_message_import2 db 'Error on load import library ',39,'proc_lib.obj',39,0 |
err_message_found_lib_3 db 'Sorry I cannot found library ',39,'libimg.obj',39,0 |
err_message_import_3 db 'Error on load import library ',39,'libimg.obj',39,0 |
end if |
|
;library structures |
l_libs_start: |
lib0 l_libs lib0_name, sys_path, file_name, system_dir0, err_message_found_lib0, head_f_l0, boxlib_import,err_message_import0, head_f_i0 |
lib1 l_libs lib1_name, sys_path, file_name, system_dir1, err_message_found_lib1, head_f_l0, msgbox_lib_import, err_message_import1, head_f_i0 |
lib2 l_libs lib2_name, sys_path, file_name, system_dir2, err_message_found_lib2, head_f_l0, proclib_import, err_message_import2, head_f_i0 |
lib0 l_libs lib_name_0, sys_path, file_name, system_dir_0,\ |
err_message_found_lib0, head_f_l, import_box_lib,err_message_import0, head_f_i |
lib1 l_libs lib_name_1, sys_path, file_name, system_dir_1,\ |
err_message_found_lib1, head_f_l, import_msgbox_lib, err_message_import1, head_f_i |
lib2 l_libs lib_name_2, sys_path, file_name, system_dir_2,\ |
err_message_found_lib2, head_f_l, import_proclib, err_message_import2, head_f_i |
lib3 l_libs lib_name_3, sys_path, file_name, system_dir_3,\ |
err_message_found_lib_3, head_f_l, import_libimg, err_message_import_3, head_f_i |
load_lib_end: |
|
|