t_edit: fix open null file

git-svn-id: svn://kolibrios.org@8262 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
IgorA 2020-11-27 14:30:47 +00:00
parent b43350b8b9
commit 2ef1505e27
4 changed files with 65 additions and 140 deletions

View File

@ -10,6 +10,7 @@ include '../../proc32.inc'
include '../../KOSfuncs.inc' include '../../KOSfuncs.inc'
include '../../develop/libraries/libs-dev/libimg/libimg.inc' include '../../develop/libraries/libs-dev/libimg/libimg.inc'
include '../../load_img.inc' include '../../load_img.inc'
include '../../load_lib.mac'
include '../../develop/libraries/box_lib/trunk/box_lib.mac' include '../../develop/libraries/box_lib/trunk/box_lib.mac'
include '../../develop/libraries/TinyGL/asm_fork/opengl_const.inc' include '../../develop/libraries/TinyGL/asm_fork/opengl_const.inc'
include 'lang.inc' include 'lang.inc'
@ -154,53 +155,53 @@ start:
;à ¡®â  á ä ©«®¬ ­ áâ஥ª ;à ¡®â  á ä ©«®¬ ­ áâ஥ª
copy_path ini_name,sys_path,file_name,0 copy_path ini_name,sys_path,file_name,0
mov dword[def_dr_mode],0 mov dword[def_dr_mode],0
stdcall dword[ini_get_int],file_name,ini_sec_w3d,key_dv,1 stdcall [ini_get_int],file_name,ini_sec_w3d,key_dv,1
or eax,eax or eax,eax
jz @f jz @f
or dword[def_dr_mode], 1 shl bit_vertexes or dword[def_dr_mode], 1 shl bit_vertexes
@@: @@:
stdcall dword[ini_get_int],file_name,ini_sec_w3d,key_df,1 stdcall [ini_get_int],file_name,ini_sec_w3d,key_df,1
or eax,eax or eax,eax
jz @f jz @f
or dword[def_dr_mode], 1 shl bit_faces or dword[def_dr_mode], 1 shl bit_faces
@@: @@:
stdcall dword[ini_get_int],file_name,ini_sec_w3d,key_dff,1 stdcall [ini_get_int],file_name,ini_sec_w3d,key_dff,1
or eax,eax or eax,eax
jz @f jz @f
or dword[def_dr_mode], 1 shl bit_faces_fill or dword[def_dr_mode], 1 shl bit_faces_fill
@@: @@:
stdcall dword[ini_get_int],file_name,ini_sec_w3d,key_dfm,1 stdcall [ini_get_int],file_name,ini_sec_w3d,key_dfm,1
or eax,eax or eax,eax
jz @f jz @f
or dword[def_dr_mode], 1 shl bit_faces_mat or dword[def_dr_mode], 1 shl bit_faces_mat
@@: @@:
stdcall dword[ini_get_int],file_name,ini_sec_w3d,key_dl,1 stdcall [ini_get_int],file_name,ini_sec_w3d,key_dl,1
or eax,eax or eax,eax
jz @f jz @f
or dword[def_dr_mode], 1 shl bit_light or dword[def_dr_mode], 1 shl bit_light
@@: @@:
stdcall dword[ini_get_int],file_name,ini_sec_w3d,key_ds,1 stdcall [ini_get_int],file_name,ini_sec_w3d,key_ds,1
or eax,eax or eax,eax
jz @f jz @f
or dword[def_dr_mode], 1 shl bit_smooth or dword[def_dr_mode], 1 shl bit_smooth
@@: @@:
stdcall dword[ini_get_color],file_name,ini_sec_w3d,key_ox,0x0000ff stdcall [ini_get_color],file_name,ini_sec_w3d,key_ox,0x0000ff
mov [color_ox],eax mov [color_ox],eax
stdcall dword[ini_get_color],file_name,ini_sec_w3d,key_oy,0xff0000 stdcall [ini_get_color],file_name,ini_sec_w3d,key_oy,0xff0000
mov [color_oy],eax mov [color_oy],eax
stdcall dword[ini_get_color],file_name,ini_sec_w3d,key_oz,0x00ff00 stdcall [ini_get_color],file_name,ini_sec_w3d,key_oz,0x00ff00
mov [color_oz],eax mov [color_oz],eax
stdcall dword[ini_get_color],file_name,ini_sec_w3d,key_bk,0x000000 stdcall [ini_get_color],file_name,ini_sec_w3d,key_bk,0x000000
mov [color_bk],eax mov [color_bk],eax
shr eax,8 shr eax,8
mov [color_bk+4],eax mov [color_bk+4],eax
shr eax,8 shr eax,8
mov [color_bk+8],eax mov [color_bk+8],eax
stdcall dword[ini_get_color],file_name,ini_sec_w3d,key_vert,0xffffff stdcall [ini_get_color],file_name,ini_sec_w3d,key_vert,0xffffff
mov [color_vert],eax mov [color_vert],eax
stdcall dword[ini_get_color],file_name,ini_sec_w3d,key_face,0x808080 stdcall [ini_get_color],file_name,ini_sec_w3d,key_face,0x808080
mov [color_face],eax mov [color_face],eax
stdcall dword[ini_get_color],file_name,ini_sec_w3d,key_select,0xffff00 stdcall [ini_get_color],file_name,ini_sec_w3d,key_select,0xffff00
mov [color_select],eax mov [color_select],eax
finit finit
fild dword[color_bk+8] fild dword[color_bk+8]
@ -1144,58 +1145,15 @@ lib_name_5 db 'tinygl.obj',0
system_dir_6 db '/sys/lib/' system_dir_6 db '/sys/lib/'
lib_name_6 db 'libini.obj',0 lib_name_6 db 'libini.obj',0
if lang eq ru
head_f_i:
head_f_l db '"‘¨á⥬­ ï ®è¨¡ª ',0
err_msg_found_lib_0 db '<27>¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'proc_lib.obj',39,'" -tE',0
err_msg_import_0 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'proc_lib.obj',39,'" -tW',0
err_msg_found_lib_1 db '<27>¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'libimg.obj',39,'" -tE',0
err_msg_import_1 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libimg.obj',39,'" -tW',0
err_msg_found_lib_2 db '<27>¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'box_lib.obj',39,'" -tE',0
err_msg_import_2 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'box_lib',39,'" -tW',0
err_msg_found_lib_3 db '<27>¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'buf2d.obj',39,'" -tE',0
err_msg_import_3 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'buf2d',39,'" -tW',0
err_msg_found_lib_4 db '<27>¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'kmenu.obj',39,'" -tE',0
err_msg_import_4 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'kmenu',39,'" -tW',0
err_msg_found_lib_5 db '<27>¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'tinygl.obj',39,'" -tE',0
err_msg_import_5 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'tinygl',39,'" -tW',0
err_msg_found_lib_6 db '<27>¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'libini.obj',39,'" -tE',0
err_msg_import_6 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libini',39,'" -tW',0
else
head_f_i:
head_f_l db '"System error',0
err_msg_found_lib_0 db 'Sorry I cannot found library ',39,'proc_lib.obj',39,'" -tE',0
err_msg_import_0 db 'Error on load import library ',39,'proc_lib.obj',39,'" -tW',0
err_msg_found_lib_1 db 'Sorry I cannot found library ',39,'libimg.obj',39,'" -tE',0
err_msg_import_1 db 'Error on load import library ',39,'libimg.obj',39,'" -tW',0
err_msg_found_lib_2 db 'Sorry I cannot found library ',39,'box_lib.obj',39,'" -tE',0
err_msg_import_2 db 'Error on load import library ',39,'box_lib.obj',39,'" -tW',0
err_msg_found_lib_3 db 'Sorry I cannot found library ',39,'buf2d.obj',39,'" -tE',0
err_msg_import_3 db 'Error on load import library ',39,'buf2d.obj',39,'" -tW',0
err_msg_found_lib_4 db 'Sorry I cannot found library ',39,'kmenu.obj',39,'" -tE',0
err_msg_import_4 db 'Error on load import library ',39,'kmenu.obj',39,'" -tW',0
err_msg_found_lib_5 db 'Sorry I cannot found library ',39,'tinygl.obj',39,'" -tE',0
err_msg_import_5 db 'Error on load import library ',39,'tinygl',39,'" -tW',0
err_msg_found_lib_6 db 'Sorry I cannot found library ',39,'libini.obj',39,'" -tE',0
err_msg_import_6 db 'Error on load import library ',39,'libini',39,'" -tW',0
end if
align 4 align 4
l_libs_start: l_libs_start:
lib_0 l_libs lib_name_0, sys_path, file_name, system_dir_0,\ lib_0 l_libs lib_name_0, file_name, system_dir_0, import_proclib
err_msg_found_lib_0, head_f_l, proclib_import,err_msg_import_0,head_f_i lib_1 l_libs lib_name_1, file_name, system_dir_1, import_libimg
lib_1 l_libs lib_name_1, sys_path, file_name, system_dir_1,\ lib_2 l_libs lib_name_2, file_name, system_dir_2, import_box_lib
err_msg_found_lib_1, head_f_l, import_libimg, err_msg_import_1,head_f_i lib_3 l_libs lib_name_3, file_name, system_dir_3, import_buf2d
lib_2 l_libs lib_name_2, sys_path, file_name, system_dir_2,\ lib_4 l_libs lib_name_4, file_name, system_dir_4, import_libkmenu
err_msg_found_lib_2, head_f_l, import_box_lib,err_msg_import_2,head_f_i lib_5 l_libs lib_name_5, file_name, system_dir_5, import_lib_tinygl
lib_3 l_libs lib_name_3, sys_path, file_name, system_dir_3,\ lib_6 l_libs lib_name_6, file_name, system_dir_6, import_libini
err_msg_found_lib_3, head_f_l, import_buf2d, err_msg_import_3,head_f_i
lib_4 l_libs lib_name_4, sys_path, file_name, system_dir_4,\
err_msg_found_lib_4, head_f_l, import_libkmenu,err_msg_import_4,head_f_i
lib_5 l_libs lib_name_5, sys_path, file_name, system_dir_5,\
err_msg_found_lib_5, head_f_l, import_lib_tinygl,err_msg_import_5,head_f_i
lib_6 l_libs lib_name_6, sys_path, file_name, system_dir_6,\
err_msg_found_lib_6, head_f_l, import_libini, err_msg_import_6,head_f_i
l_libs_end: l_libs_end:
align 4 align 4
@ -1246,7 +1204,7 @@ import_libimg:
aimg_draw db 'img_draw',0 aimg_draw db 'img_draw',0
align 4 align 4
proclib_import: import_proclib:
OpenDialog_Init dd aOpenDialog_Init OpenDialog_Init dd aOpenDialog_Init
OpenDialog_Start dd aOpenDialog_Start OpenDialog_Start dd aOpenDialog_Start
OpenDialog_Set_file_name dd aOpenDialog_Set_file_name OpenDialog_Set_file_name dd aOpenDialog_Set_file_name

View File

@ -820,6 +820,12 @@ proc ted_on_open_file
push edx ;source push edx ;source
push esi push esi
or ebx,ebx
jnz @f
;¥á«¨ ä ©« ¯ãá⮩
stdcall ted_clear,edi,1 ;ç¨á⨬ ¢áî ¯ ¬ïâì
jmp .end_opn
@@:
stdcall ted_clear,edi,0 ;ç¨á⨬ ­¥ ¢áî ¯ ¬ïâì, ¯®â®¬ã çâ® ­¨¦¥ ¡ã¤¥¬ ¥¥ § ¯®«­ïâì ­®¢ë¬¨ ¤ ­ë¬¨ stdcall ted_clear,edi,0 ;ç¨á⨬ ­¥ ¢áî ¯ ¬ïâì, ¯®â®¬ã çâ® ­¨¦¥ ¡ã¤¥¬ ¥¥ § ¯®«­ïâì ­®¢ë¬¨ ¤ ­ë¬¨
;ª®£¤  ᨬ¢®« § ¢¥à襭¨ï áâப¨ ⮫쪮 10 (¡¥§ 13) ;ª®£¤  ᨬ¢®« § ¢¥à襭¨ï áâப¨ ⮫쪮 10 (¡¥§ 13)
@ -842,9 +848,8 @@ proc ted_on_open_file
.no_10: .no_10:
;¯¥à¥¢®¤¨¬ ®âªàëâë© ä ©« ¢­ãâàì í«¥¬¥­â  t_edit ;¯¥à¥¢®¤¨¬ ®âªàëâë© ä ©« ¢­ãâàì í«¥¬¥­â  t_edit
mov eax,ebx
mov ecx,ebx mov ecx,ebx
add eax,2 lea eax,[ebx+2]
ConvertIndexToPointer eax ConvertIndexToPointer eax
mov edx,ted_tex mov edx,ted_tex
add edx,ebx add edx,ebx
@ -860,8 +865,8 @@ proc ted_on_open_file
mov dword[eax+symbol.tc],-1 mov dword[eax+symbol.tc],-1
mov dword[eax+symbol.td],0 mov dword[eax+symbol.td],0
cmp ecx,0 or ecx,ecx
je @f jz @f
dec ecx dec ecx
dec edx dec edx
sub eax,sizeof.symbol sub eax,sizeof.symbol
@ -890,11 +895,11 @@ proc ted_on_open_file
@@: ;clear memory, need if before was open big file @@: ;clear memory, need if before was open big file
add edx,sizeof.symbol add edx,sizeof.symbol
cmp edx,ted_tex_end cmp edx,ted_tex_end
jge @f jge .end_opn
mov dword[edx+symbol.tc],0 mov dword[edx+symbol.tc],0
mov dword[edx+symbol.td],0 mov dword[edx+symbol.td],0
jmp @b jmp @b
@@: .end_opn:
call ted_get_num_lines call ted_get_num_lines
cmp eax,TED_LINES_IN_NEW_FILE cmp eax,TED_LINES_IN_NEW_FILE
@ -2446,12 +2451,11 @@ endp
; edi = pointer to tedit struct ; edi = pointer to tedit struct
; end_pos = position end 'symbol' struct ; end_pos = position end 'symbol' struct
align 16 align 16
proc ted_find_help_id, end_pos:dword proc ted_find_help_id uses ebx ecx, end_pos:dword
; ecx = word_n ; ecx = word_n
; ebx = l_pos ; ebx = l_pos
mov ted_help_id,-1 mov ted_help_id,-1
push ebx ecx
xor ebx,ebx xor ebx,ebx
mov bl,[edx] mov bl,[edx]
shl bx,2 ;ebx*=4 shl bx,2 ;ebx*=4
@ -2518,7 +2522,6 @@ proc ted_find_help_id, end_pos:dword
;return word_n; ;return word_n;
.if_0e: .if_0e:
pop ecx ebx
ret ret
endp endp
@ -2588,8 +2591,7 @@ align 4
or eax,eax or eax,eax
jz @f jz @f
cmp eax,6 cmp eax,6
je @f jne .ret_f
jmp .ret_f
@@: @@:
cmp ebx,-1 cmp ebx,-1
je .ret_f je .ret_f
@ -3427,8 +3429,7 @@ align 4
cmp byte[edx],9 cmp byte[edx],9
je @f je @f
cmp byte[edx],13 cmp byte[edx],13
je @f jne .end_f
jmp .end_f
@@: @@:
lea edx,[ted_symbol_space] lea edx,[ted_symbol_space]
.end_f: .end_f:
@ -3472,8 +3473,8 @@ proc ted_draw, edit:dword
stdcall ted_clear_line_before_draw, edi,ebx,1,esi stdcall ted_clear_line_before_draw, edi,ebx,1,esi
call ted_get_first_visible_pos call ted_get_first_visible_pos
cmp edx,0 or edx,edx
je .no_draw_text jz .no_draw_text
mov esi,1 ;¤«¨­­  ¢ë¢®¤¨¬®£® ⥪áâ  ¯® 1-¬ã ᨬ¢®«ã mov esi,1 ;¤«¨­­  ¢ë¢®¤¨¬®£® ⥪áâ  ¯® 1-¬ã ᨬ¢®«ã
@@: @@:
call ted_iterat_next call ted_iterat_next

View File

@ -1,5 +1,5 @@
use32 use32
org 0x0 org 0
db 'MENUET01' ;¨¤¥­â¨ä. ¨á¯®«­ï¥¬®£® ä ©«  ¢á¥£¤  8 ¡ ©â db 'MENUET01' ;¨¤¥­â¨ä. ¨á¯®«­ï¥¬®£® ä ©«  ¢á¥£¤  8 ¡ ©â
dd 1, start, i_end, mem, stacktop, 0, sys_path dd 1, start, i_end, mem, stacktop, 0, sys_path
@ -7,9 +7,10 @@ include '../../../../macros.inc'
include '../../../../proc32.inc' include '../../../../proc32.inc'
include '../../../../KOSfuncs.inc' include '../../../../KOSfuncs.inc'
include '../../../../load_img.inc' include '../../../../load_img.inc'
include '../../../../load_lib.mac'
include '../../../../develop/libraries/box_lib/trunk/box_lib.mac' include '../../../../develop/libraries/box_lib/trunk/box_lib.mac'
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load @use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
caption db '<27>à®á¬®âà ¨­ä®à¬ æ¨¨ Exif 11.03.16',0 ;¯®¤¯¨áì ®ª­  caption db '<27>à®á¬®âà ¨­ä®à¬ æ¨¨ Exif 11.03.16',0 ;¯®¤¯¨áì ®ª­ 
run_file_70 FileInfoBlock run_file_70 FileInfoBlock
@ -555,38 +556,20 @@ db 0
head_f_i:
head_f_l db '‘¨á⥬­ ï ®è¨¡ª ',0
system_dir_0 db '/sys/lib/' system_dir_0 db '/sys/lib/'
lib_name_0 db 'proc_lib.obj',0 lib_name_0 db 'proc_lib.obj',0
err_message_found_lib_0 db '<27>¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'proc_lib.obj',39,0
err_message_import_0 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'proc_lib.obj',39,0
system_dir_1 db '/sys/lib/' system_dir_1 db '/sys/lib/'
lib_name_1 db 'libimg.obj',0 lib_name_1 db 'libimg.obj',0
err_message_found_lib_1 db '<27>¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'libimg.obj',39,0
err_message_import_1 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libimg.obj',39,0
system_dir_2 db '/sys/lib/' system_dir_2 db '/sys/lib/'
lib_name_2 db 'buf2d.obj',0 lib_name_2 db 'buf2d.obj',0
err_msg_found_lib_2 db '<27>¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'buf2d.obj',39,0
err_msg_import_2 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'buf2d',39,0
system_dir_3 db '/sys/lib/' system_dir_3 db '/sys/lib/'
lib_name_3 db 'exif.obj',0 lib_name_3 db 'exif.obj',0
err_msg_found_lib_3 db '<27>¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'exif.obj',39,0
err_msg_import_3 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'exif',39,0
l_libs_start: l_libs_start:
lib_0 l_libs lib_name_0, sys_path, file_name, system_dir_0,\ lib_0 l_libs lib_name_0, file_name, system_dir_0, import_proclib
err_message_found_lib_0, head_f_l, proclib_import,err_message_import_0, head_f_i lib_1 l_libs lib_name_1, file_name, system_dir_1, import_libimg
lib_1 l_libs lib_name_1, sys_path, file_name, system_dir_1,\ lib_2 l_libs lib_name_2, file_name, system_dir_2, import_buf2d
err_message_found_lib_1, head_f_l, import_libimg, err_message_import_1, head_f_i lib_3 l_libs lib_name_3, file_name, system_dir_3, import_exif
lib_2 l_libs lib_name_2, sys_path, file_name, system_dir_2,\
err_msg_found_lib_2,head_f_l,import_buf2d,err_msg_import_2,head_f_i
lib_3 l_libs lib_name_3, sys_path, file_name, system_dir_3,\
err_msg_found_lib_3,head_f_l,import_exif,err_msg_import_3,head_f_i
l_libs_end: l_libs_end:
align 4 align 4
@ -637,7 +620,7 @@ import_libimg:
aimg_draw db 'img_draw',0 aimg_draw db 'img_draw',0
align 4 align 4
proclib_import: ;®¯¨á ­¨¥ íªá¯®àâ¨à㥬ëå ä㭪権 import_proclib: ;悖兕<E68296>言 磲嶍桌漼飹布錼 鳲酊璅<E9858A>
OpenDialog_Init dd aOpenDialog_Init OpenDialog_Init dd aOpenDialog_Init
OpenDialog_Start dd aOpenDialog_Start OpenDialog_Start dd aOpenDialog_Start
dd 0,0 dd 0,0

View File

@ -1,7 +1,7 @@
;Ž£à®¬­ ï ¡« £®¤ à­®áâì Maxxxx32, Diamond, Heavyiron ;Ž£à®¬­ ï ¡« £®¤ à­®áâì Maxxxx32, Diamond, Heavyiron
;¨ ¤à㣨¬ ¯à®£à ¬¬¨áâ ¬,   â ª¦¥ ’¥¯«®¢ã €«¥ªá¥î ;¨ ¤à㣨¬ ¯à®£à ¬¬¨áâ ¬,   â ª¦¥ ’¥¯«®¢ã €«¥ªá¥î
use32 use32
org 0x0 org 0
db 'MENUET01' ;¨¤¥­â¨ä. ¨á¯®«­ï¥¬®£® ä ©«  ¢á¥£¤  8 ¡ ©â db 'MENUET01' ;¨¤¥­â¨ä. ¨á¯®«­ï¥¬®£® ä ©«  ¢á¥£¤  8 ¡ ©â
dd 1,start,i_end,mem,stacktop,0,sys_path dd 1,start,i_end,mem,stacktop,0,sys_path
@ -9,6 +9,7 @@ include '../../proc32.inc'
include '../../macros.inc' include '../../macros.inc'
include '../../KOSfuncs.inc' include '../../KOSfuncs.inc'
include '../../load_img.inc' include '../../load_img.inc'
include '../../load_lib.mac'
include '../../develop/libraries/box_lib/trunk/box_lib.mac' include '../../develop/libraries/box_lib/trunk/box_lib.mac'
min_window_w equ 485 ;¬¨­¨¬ «ì­ ï è¨à¨­  ®ª­  min_window_w equ 485 ;¬¨­¨¬ «ì­ ï è¨à¨­  ®ª­ 
@ -18,7 +19,7 @@ otst_panel_left equ 265
include 'tile_fun.inc' include 'tile_fun.inc'
include 'pl_import.inc' include 'pl_import.inc'
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc, dll.Load @use_library mem.Alloc,mem.Free,mem.ReAlloc, dll.Load
fn_metki db 'pl_metki.lst',0 fn_metki db 'pl_metki.lst',0
ini_name db 'planet_v.ini',0 ini_name db 'planet_v.ini',0
@ -363,19 +364,6 @@ pushad
popad popad
ret ret
head_f_i:
head_f_l db '‘¨á⥬­ ï ®è¨¡ª ',0
err_message_found_lib0 db '<27>¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  box_lib.obj',0
err_message_import0 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ box_lib.obj',0
err_message_found_lib1 db '<27>¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  libimg.obj',0
err_message_import1 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ libimg.obj',0
err_message_found_lib2 db '<27>¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  str.obj',0
err_message_import2 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ str.obj',0
err_message_found_lib3 db '<27>¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  libini.obj',0
err_message_import3 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ libini.obj',0
err_message_found_lib4 db '<27>¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  proc_lib.obj',0
err_message_import4 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ proc_lib.obj',0
system_dir0 db '/sys/lib/' system_dir0 db '/sys/lib/'
lib0_name db 'box_lib.obj',0 lib0_name db 'box_lib.obj',0
@ -393,16 +381,11 @@ lib4_name db 'proc_lib.obj',0
;library structures ;library structures
l_libs_start: l_libs_start:
lib_0 l_libs lib0_name, sys_path, file_name, system_dir0,\ lib_0 l_libs lib0_name, file_name, system_dir0, boxlib_import
err_message_found_lib0, head_f_l, boxlib_import, err_message_import0, head_f_i lib_1 l_libs lib1_name, file_name, system_dir1, libimg_import
lib_1 l_libs lib1_name, sys_path, file_name, system_dir1,\ lib_2 l_libs lib2_name, file_name, system_dir2, strlib_import
err_message_found_lib1, head_f_l, libimg_import, err_message_import1, head_f_i lib_3 l_libs lib3_name, file_name, system_dir3, libini_import
lib_2 l_libs lib2_name, sys_path, file_name, system_dir2,\ lib_4 l_libs lib4_name, file_name, system_dir4, proclib_import
err_message_found_lib2, head_f_l, strlib_import, err_message_import2, head_f_i
lib_3 l_libs lib3_name, sys_path, file_name, system_dir3,\
err_message_found_lib3, head_f_l, libini_import, err_message_import3, head_f_i
lib_4 l_libs lib4_name, sys_path, file_name, system_dir4,\
err_message_found_lib4, head_f_l, proclib_import, err_message_import4, head_f_i
load_lib_end: load_lib_end:
align 4 align 4
@ -887,23 +870,23 @@ endp
align 4 align 4
.str: .str:
mov ecx,0x0a ;§ ¤ ¥âáï á¨á⥬  áç¨á«¥­¨ï ¨§¬¥­ïîâáï ॣ¨áâàë ebx,eax,ecx,edx ¢å®¤­ë¥ ¯ à ¬¥âàë eax - ç¨á«® mov ecx,10
;¯à¥à¥¢®¤ ç¨á«  ¢ ASCII áâப㠢§®¤­ë¥ ¤ ­­ë¥ ecx=á¨á⥬  áç¨á«¥­ï edi  ¤à¥á ªã¤  § ¯¨á뢠âì, ¡ã¤¥¬ áâபã, ¯à¨ç¥¬ ª®­¥æ ¯¥à¥¬¥­­®© cmp eax,ecx
cmp eax,ecx ;áà ¢­¨âì ¥á«¨ ¢ eax ¬¥­ìè¥ ç¥¬ ¢ ecx â® ¯¥à¥©â¨ ­  @@-1 â.¥. ­  pop eax
jb @f jb @f
xor edx,edx ;®ç¨áâ¨âì edx xor edx,edx
div ecx ;à §¤¥«¨âì - ®áâ â®ª ¢ edx div ecx
push edx ;¯®«®¦¨âì ¢ á⥪ push edx
call .str ;¯¥à¥©â¨ ­  á ¬ã ᥡï â.¥. ¢ë§¢ âì á ¬ã á¥¡ï ¨ â ª ¤® ⮣® ¬®¬¥­â  ¯®ª  ¢ eax ­¥ áâ ­¥â ¬¥­ìè¥ ç¥¬ ¢ ecx ;dec edi ;ᏼ鼭¨Ľ ­ĽŽĄĺŽ¤¨ŹŽĽ ¤Ťď § Ż¨á¨ á ŞŽ­ć  áâப¨
call .str
pop eax pop eax
@@: ;cmp al,10 ;¯à®¢¥à¨âì ­¥ ¬¥­ìè¥ «¨ §­ ç¥­¨¥ ¢ al 祬 10 (¤«ï á¨á⥬ë áç¨á«¥­ï 10 ¤ ­­ ï ª®¬ ­¤  - «¨è­ ï)) @@:
cmp edi,esi cmp edi,esi
jge @f jge @f
or al,0x30 ;¤ ­­ ï ª®¬ ­¤  ª®à®ç¥ 祬 ¤¢¥ ¢ëè¥ or al,0x30
stosb ;§ ¯¨á âì í«¥¬¥­â ¨§ ॣ¨áâà  al ¢ ï祪㠯 ¬ï⨠es:edi stosb
mov byte[edi],0 ;¢ ª®­¥æ áâப¨ áâ ¢¨¬ 0, çâ®-¡ë ­¥ ¢ë« §¨« ¬ãá®à mov byte[edi],0 ;¢ ª®­¥æ áâப¨ áâ ¢¨¬ 0, çâ®-¡ë ­¥ ¢ë« §¨« ¬ãá®à
@@: @@:
ret ;¯®ª  ¢ á⥪¥ åà ­¨âìáï ª®«-¢® ¢ë§®¢®¢ â® á⮫쪮 à § ¬ë ¨ ¡ã¤¥¬ ¢ë§ë¢ âìáï ret
hed db 'Planet viewer 16.02.16',0 ;¯®¤¯¨áì ®ª­  hed db 'Planet viewer 16.02.16',0 ;¯®¤¯¨áì ®ª­ 
mouse_dd dd 0 ;­ã¦­® ¤«ï Shift-  ¢ editbox mouse_dd dd 0 ;­ã¦­® ¤«ï Shift-  ¢ editbox