55,29 → 55,21 |
start: |
load_libraries l_libs_start,load_lib_end |
|
;¯à®¢¥àª ᪮«ìª® ã¤ ç® § £ã§¨« áì è «¨¡ |
mov ebp,lib0 |
cmp dword [ebp+ll_struc_size-4],0 |
jz @f |
mcall -1 ;exit not correct |
;¯à®¢¥àª ᪮«ìª® ã¤ ç® § £ã§¨«¨áì ¡¨¡«¨®â¥ª¨ |
cmp dword [lib0+ll_struc_size-4],0 |
jnz @f |
cmp dword [lib1+ll_struc_size-4],0 |
jnz @f |
cmp dword [lib2+ll_struc_size-4],0 |
jnz @f |
cmp dword [lib3+ll_struc_size-4],0 |
jnz @f |
jmp .lib |
@@: |
mov ebp,lib1 |
cmp dword [ebp+ll_struc_size-4],0 |
jz @f |
mcall -1 ;exit not correct |
@@: |
mov ebp,lib2 |
cmp dword [ebp+ll_struc_size-4],0 |
jz @f |
mcall -1 ;exit not correct |
@@: |
mov ebp,lib3 |
cmp dword [ebp+ll_struc_size-4],0 |
jz @f |
mcall -1 ;exit not correct |
@@: |
.lib: |
|
copy_path ini_name,sys_path,file_name,0x0 |
copy_path ini_name,sys_path,file_name,0 |
stdcall dword[ini_get_str],file_name,ini_sec,ini_k_cache,dword[edit1.text],dword[edit1.max],ini_def_cache |
stdcall [str_len],dword[edit1.text],dword[edit1.max] |
mov dword[edit1.size],eax |
93,7 → 85,7 |
stdcall dword[ini_get_str],file_name,ini_sec,ini_ext,txt_tile_type_0,dword[tree1.info_capt_len],ini_ext.def |
cmp byte[txt_tile_type_0],0 |
je @f |
stdcall dword[tl_node_add], txt_tile_type_0, 0, tree1 |
stdcall dword[tl_node_add], tree1, 0, txt_tile_type_0 |
jmp @b |
@@: |
mov byte[ini_ext.number],'0' ;áç¨âë¢ ¥¬ ¯ à ¬¥âà ®â ext0 ª®â®àë© ¡ã¤¥â ¢ë¡à ¢ ᯨ᪥ |
102,7 → 94,7 |
jne @f |
mov dword[txt_tile_type_0],'.bmp' ;¥á«¨ ¢ *.ini ä ©«¥ ¨ç¥£® ¥â ¤®¡ ¢«ï¥¬ à áè¨à¥¨¥ .bmp |
@@: |
stdcall dword[tl_node_add], txt_tile_type_0, 0, tree1 |
stdcall dword[tl_node_add], tree1, 0, txt_tile_type_0 |
|
; init bmp file |
stdcall mem.Alloc, dword RGB_TILE_SIZE+300 ;300 - § ¯ áë¥ ¡ ©âë á ãç¥â®¬ § £®«®¢ª bmp ä ©« |
117,8 → 109,7 |
stdcall mem.Alloc, dword TREE_ICON_NOD16_BMP_SIZE |
mov [tree_nod_icon],eax |
|
copy_path fn_icon1,sys_path,file_name,0x0 |
mov eax,70 ;load icon file |
copy_path fn_icon1,sys_path,file_name,0 |
mov [run_file_70.Function], 0 |
mov [run_file_70.Position], 0 |
mov [run_file_70.Flags], 0 |
126,8 → 117,7 |
m2m [run_file_70.Buffer], [tree_sys_icon] |
mov byte[run_file_70+20], 0 |
mov [run_file_70.FileName], file_name |
mov ebx,run_file_70 |
int 0x40 |
mcall 70,run_file_70 |
cmp ebx,0xffffffff |
je @f |
stdcall dword[img_decode], dword[tree_sys_icon],ebx,0 |
140,12 → 130,10 |
@@: |
|
|
copy_path fn_icon2,sys_path,file_name,0x0 |
mov eax,70 ;load icon file |
copy_path fn_icon2,sys_path,file_name,0 |
mov [run_file_70.Count], TREE_ICON_NOD16_BMP_SIZE |
m2m [run_file_70.Buffer], [tree_nod_icon] |
mov ebx,run_file_70 |
int 0x40 |
mcall 70,run_file_70 |
cmp ebx,0xffffffff |
je @f |
stdcall dword[img_decode], dword[tree_nod_icon],ebx,0 |
178,8 → 166,7 |
|
align 4 |
still: |
mov eax,10 |
mcall |
mcall 10 |
|
cmp al,0x1 ;¨§¬. ¯®«®¦¥¨¥ ®ª |
jz red_win |
188,14 → 175,10 |
cmp al,0x3 |
jz button |
|
push dword ch2 |
call [check_box_mouse] |
push dword ch1 |
call [check_box_mouse] |
|
stdcall [check_box_mouse],ch2 |
stdcall [check_box_mouse],ch1 |
stdcall [edit_box_mouse], edit1 |
stdcall [edit_box_mouse], edit2 |
|
stdcall [tl_mouse], tree1 |
stdcall [tl_mouse], tree2 |
|
208,10 → 191,8 |
stdcall [edit_box_key], edit1 |
stdcall [edit_box_key], edit2 |
|
push dword tree1 |
call [tl_key] |
push dword tree2 |
call [tl_key] |
stdcall [tl_key],tree1 |
stdcall [tl_key],tree2 |
|
mov ebx,dword[el_focus] ;çâ®-¡ë ª àâ ¥ ¤¢¨£ « áì ¥á«¨ ®ª treelist ¢ 䮪ãᥠ|
cmp ebx, dword tree1 |
272,12 → 253,10 |
mcall 12,1 |
|
xor eax,eax |
mov ebx,20*65536+min_window_w |
mov ecx,20*65536+min_window_h |
mov edx,[sc.work] |
or edx,0x33000000 |
mov edi,hed |
mcall |
mcall ,20*65536+min_window_w,20*65536+min_window_h |
|
mcall 9,procinfo,-1 |
|
293,7 → 272,7 |
|
mov eax,dword[tree2.box_left] ;¤¢¨£ ¥¬ áªà®««¨£ |
add eax,dword[tree2.box_width] |
mov ebx,dword[tree2.p_scrol] |
mov ebx,dword[tree2.p_scroll] |
mov word[ebx+2],ax |
|
mov dword[edit2.left],edi |
304,17 → 283,10 |
mov dword[wScrMetki.all_redraw],1 |
stdcall [scrollbar_ver_draw], dword wScrMetki |
|
mov eax,8 ;ª®¯ª |
mov ebx,145*65536+20 |
mov ecx,5*65536+25 |
mov edx,6 |
mov esi,[sc.work_button] |
int 0x40 |
mcall 8,145*65536+20,5*65536+25,6 ;ª®¯ª |
|
mov ebx,100*65536+20 |
mov ecx,5*65536+25 |
mov edx,5 |
int 0x40 |
mcall ,100*65536+20,5*65536+25,5 |
|
mov ebx,170*65536+40 ;ª®¯ª ¢ë§®¢ ¤¨ «®£ OpenDial |
;mov ecx,5*65536+25 |
503,14 → 475,17 |
cmp ah,5 |
jne @f |
call but_ZoomM |
jmp still |
@@: |
cmp ah,6 |
jne @f |
call but_ZoomP |
jmp still |
@@: |
cmp ah,7 |
jne @f |
call but_Refresh |
jmp still |
@@: |
|
cmp ah,9 |
521,18 → 496,22 |
cmp ah,10 |
jne @f |
call but_met_up |
jmp still |
@@: |
cmp ah,11 |
jne @f |
call but_met_dn |
jmp still |
@@: |
cmp ah,12 |
jne @f |
call fun_goto_met |
jmp still |
@@: |
cmp ah,13 ;¤¨ «®£ OpenDialog ¤«ï ¯®¨áª ¯ ¯ª¨ |
jne @f |
call fun_opn_dlg |
jmp still |
@@: |
cmp ah,1 |
jne still |
557,8 → 536,7 |
;data_rgb - pointer to rgb data |
;size - count img pixels (size img data / 3(rgb) ) |
align 4 |
proc img_rgb_wdiv2 data_rgb:dword, size:dword |
push eax ebx ecx edx |
proc img_rgb_wdiv2 uses eax ebx ecx edx, data_rgb:dword, size:dword |
mov eax,dword[data_rgb] |
mov ecx,dword[size] ;ecx = size |
imul ecx,3 |
596,8 → 574,6 |
add eax,3 |
add ebx,6 |
loop @b |
|
pop edx ecx ebx eax |
ret |
endp |
|
676,8 → 652,7 |
;data_rgb - pointer to rgb data |
;size - count img pixels (size img data / 3(rgb) ) |
align 4 |
proc img_rgb_wmul2, data_rgb:dword, size:dword |
push eax ebx ecx edx |
proc img_rgb_wmul2 uses eax ebx ecx edx, data_rgb:dword, size:dword |
;eax - source |
;ebx - destination |
mov ecx,dword[size] ;ecx = size |
697,7 → 672,6 |
sub eax,3 |
sub ebx,6 |
loop @b |
pop edx ecx ebx eax |
ret |
endp |
|
754,9 → 728,7 |
;size - count img pixels (size img data / 3(rgb) ) |
;size_w - width img in pixels |
align 4 |
proc img_rgb_hoffs, data_rgb:dword, size:dword, size_w:dword, hoffs:dword |
push eax ebx ecx edx esi |
|
proc img_rgb_hoffs uses eax ebx ecx edx esi, data_rgb:dword, size:dword, size_w:dword, hoffs:dword |
mov esi,dword[size_w] |
lea esi,[esi+esi*2] ;esi = width * 3(rgb) |
imul esi,dword[hoffs] |
779,7 → 751,6 |
sub eax,3 |
sub ebx,3 |
loop @b |
pop esi edx ecx ebx eax |
ret |
endp |
|
824,26 → 795,22 |
endp |
|
align 4 |
proc mem_copy, source:dword, destination:dword, len:dword |
push ecx esi edi |
proc mem_copy uses ecx esi edi, source:dword, destination:dword, len:dword |
cld |
mov esi, dword[source] |
mov edi, dword[destination] |
mov ecx, dword[len] |
rep movsb |
pop edi esi ecx |
ret |
endp |
|
align 4 |
proc mem_clear, mem:dword, len:dword |
push eax ecx edi |
proc mem_clear uses eax ecx edi, mem:dword, len:dword |
cld |
xor al,al |
mov edi, dword[mem] |
mov ecx, dword[len] |
repne stosb |
pop edi ecx eax |
ret |
endp |
|
897,38 → 864,7 |
el_focus, wScrMetki,fun_goto_met |
|
align 4 |
wScrMetki: |
.x: |
.size_x dw 16 ;+0 |
.start_x dw 0 ;+2 |
.y: |
.size_y dw 100 ;+4 |
.start_y dw 0 ;+6 |
.btn_high dd 15 ;+8 |
.type dd 1 ;+12 |
.max_area dd 100 ;+16 |
.cur_area dd 30 ;+20 |
.position dd 0 ;+24 |
.bckg_col dd 0xeeeeee ;+28 |
.frnt_col dd 0xbbddff ;+32 |
.line_col dd 0 ;+36 |
.redraw dd 0 ;+40 |
.delta dw 0 ;+44 |
.delta2 dw 0 ;+46 |
.run_x: |
.r_size_x dw 0 ;+48 |
.r_start_x dw 0 ;+50 |
.run_y: |
.r_size_y dw 0 ;+52 |
.r_start_y dw 0 ;+54 |
.m_pos dd 0 ;+56 |
.m_pos_2 dd 0 ;+60 |
.m_keys dd 0 ;+64 |
.run_size dd 0 ;+68 |
.position2 dd 0 ;+72 |
.work_size dd 0 ;+76 |
.all_redraw dd 0 ;+80 |
.ar_offset dd 1 ;+84 |
wScrMetki scrollbar 16,0, 100,0, 15, 100, 30,0, 0xeeeeee, 0xbbddff, 0, 1 |
|
ed_buffer: ;òåêñò äëÿ edit |
.2: rb 32 |
997,19 → 933,21 |
align 4 |
tile_00 rb size_tile_struc * max_tiles_count |
|
;íâ®â ª®¤ ¥ ¬®©, ® ¯à¥®¡à §ã¥â ç¨á«® ¢ áâபã |
;input: |
; eax = value |
; edi = string buffer |
; eax - ç¨á«® |
; edi - ¡ãä¥à ¤«ï áâப¨ |
; len - ¤«¨ ¡ãä¥à |
;output: |
; edi = |
align 4 |
tl_convert_to_str: |
proc convert_int_to_str, len:dword |
pushad |
mov dword[edi+1],0;0x20202020 |
mov esi,[len] |
add esi,edi |
dec esi |
call .str |
popad |
ret |
endp |
|
align 4 |
.str: |
1024,19 → 962,23 |
call .str;¯¥à¥©â¨ á ¬ã ᥡï â.¥. ¢ë§¢ âì á ¬ã á¥¡ï ¨ â ª ¤® ⮣® ¬®¬¥â ¯®ª ¢ eax ¥ á⠥⠬¥ìè¥ ç¥¬ ¢ ecx |
pop eax |
@@: ;cmp al,10 ;¯à®¢¥à¨âì ¥ ¬¥ìè¥ «¨ § 票¥ ¢ al 祬 10 (¤«ï á¨á⥬ë áç¨á«¥ï 10 ¤ ï ª®¬ ¤ - «¨è ï)) |
cmp edi,esi |
jge @f |
or al,0x30 ;¤ ï ª®¬ ¤ ª®à®ç¥ 祬 ¤¢¥ ¢ëè¥ |
stosb ;§ ¯¨á âì í«¥¬¥â ¨§ ॣ¨áâà al ¢ ï祪㠯 ¬ï⨠es:edi |
ret ;¢¥àãâìáï ç¥ì ¨â¥à¥áë© å®¤ â.ª. ¯®ª ¢ á⥪¥ åà ¨âìáï ª®«-¢® ¢ë§®¢®¢ â® á⮫쪮 à § ¬ë ¨ ¡ã¤¥¬ ¢ë§ë¢ âìáï |
mov byte[edi],0 ;¢ ª®¥æ áâப¨ áâ ¢¨¬ 0, çâ®-¡ë ¥ ¢ë« §¨« ¬ãá®à |
@@: |
ret ;¯®ª ¢ á⥪¥ åà ¨âìáï ª®«-¢® ¢ë§®¢®¢ â® á⮫쪮 à § ¬ë ¨ ¡ã¤¥¬ ¢ë§ë¢ âìáï |
|
|
hed db 'Planet viewer 16.01.13',0 ;¯®¤¯¨áì ®ª |
hed db 'Planet viewer 09.11.15',0 ;¯®¤¯¨áì ®ª |
|
sc system_colors ;á¨áâ¥¬ë¥ æ¢¥â |
mouse_dd dd 0 ;㦮 ¤«ï Shift- ¢ editbox |
align 16 |
i_end: |
procinfo process_information |
rb 1024 |
align 16 |
procinfo process_information |
stacktop: |
sys_path rb 4096 |
file_name: |