Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 2487 → Rev 2501

/programs/media/log_el/trunk/le_pole.inc
27,6 → 27,7
pole_data equ dword[edi +4] ;㪠§ â¥«ì ­  ¯ ¬ïâì á® áâàãªâãà ¬¨ ï祥ª
pole_max_cell equ dword[edi +8]
pole_b_sort equ dword[edi+12] ;£à ­¨æ  ¤«ï á®àâ¨à®¢ ­­ëå ï祥ª
offs_pole_b_sort equ 12
 
macro get_cell_offset reg,ind
{
151,6 → 152,8
proc pole_cell_delete, pole:dword, x:dword, y:dword
pushad
mov edi,dword[pole]
mov ebx,edi
add ebx,offs_pole_b_sort
mov esi,pole_index
 
mov ecx,[esi]
161,10 → 164,6
cmp eax,0
je .fun_e ;¥á«¨ ª«¥âª  ­¥ ¡ë«  ᮧ¤ ­ 
 
cmp pole_b_sort,0
je @f
dec pole_b_sort
@@:
dec dword[esi]
 
mov edi,esi
174,6 → 173,17
repnz scasd ;¯®¨áª
sub edi,4
 
cmp dword[ebx],1 ;[ebx]=pole_b_sort
jl @f
mov eax,edi
sub eax,esi ;esi=pole_index
shr eax,2
dec eax
cmp [ebx],eax ;eax - ¯®§¨æ¨ï 㪠§ â¥«ï 㤠«ï¥¬®© ï祩ª¨
jle @f ;¡ë«® jl @f
dec dword[ebx]
@@:
 
shl edx,2
add edx,esi ;ª®­¥ç­ë© í«¥¬¥­â ¬ áᨢ 
sub edx,edi
193,7 → 203,7
ret
endp
 
if 0
if debug
align 4
proc but_test_pole, pole:dword
pushad
205,7 → 215,12
 
mov esi,pole_index
mov ecx,[esi]
 
mov eax,pole_b_sort
mov edi,open_file_lif
stdcall convert_int_to_str
stdcall [buf2d_draw_text], buf_0, buf_font,edi,5,ebx,color_s0 ;à¨á㥬 b_sort
add ebx,18
 
mov eax,[esi]
add esi,4
279,9 → 294,11
mov edx,ebx
shl edx,2
add edx,ecx
inc ebx
mov ecx,dword[ecx]
.cycle_b: ;for(i=pole_b_sort+1;i<=fristC;i++)
inc ebx
cmp ebx,ecx
jg .not_found
add edx,4
get_cell_offset esi,dword[edx]
mov eax,dword[x]
294,9 → 311,8
mov eax,dword[edx] ;fnd=pole_index[i];
jmp .cycle_e ;break;
.if_e:
inc ebx
cmp ebx,ecx
jle .cycle_b
jmp .cycle_b
.not_found:
xor eax,eax ;¢®ááâ ­ ¢«¨¢ ¥¬ ­ã«¥¢®¥ §­ ç¥­¨¥ ¥á«¨ ­¥ ­ è«¨ ï祩ªã (¢ 横«¥ eax ¯®àâ¨âáï ¯à¨ ¯à®¢¥àª¥ ª®®à¤¨­ â)
.cycle_e:
pop esi edx ecx ebx
363,6 → 379,58
ret
endp
 
;ᤢ¨£ ¢á¥å ï祥ª (¨ ®¡ê¥ªâ®¢)
align 4
proc pole_move_all, pole:dword, m_d_x:dword, m_d_y:dword
pushad
mov edi,dword[pole]
mov edx,[m_d_x]
mov esi,[m_d_y]
 
mov eax,pole_index
cmp dword[eax],0
je .end_0 ;¥á«¨ ­¥â ï祥ª (¯à®¢®¤®¢) â® ¢ë室
 
mov ecx,dword[eax]
cld
@@: ;横« ¯® ¢á¥¬ ï祩ª ¬
add eax,4
mov ebx,[eax]
imul ebx,sizeof.Cell
add ebx,pole_data
 
add dword[ebx+offs_cell_x],edx
add dword[ebx+offs_cell_y],esi
loop @b
.end_0:
 
;横« ¯® «®£¨ç¥áª¨¬ í«¥¬¥­â ¬ ¨ ¯®¤¯¨áï¬
stdcall dword[tl_node_poi_get_info],0,tree1
pop eax
@@:
cmp eax,0
je .end_1
cmp word[eax],el_icon_elems ;¯®«ã祭¨¥ ç¥à¥§ eax ⨯ ¨ª®­ª¨
je .mov_1
cmp word[eax],el_icon_captions
je .mov_1
jmp .end_mov_1
.mov_1:
stdcall [tl_node_poi_get_data], eax, tree1
pop ecx
 
add [ecx],edx ;coord x
add [ecx+4],esi ;coord y
.end_mov_1:
stdcall dword[tl_node_poi_get_next_info],eax,tree1
pop eax ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
jmp @b
.end_1:
 
popad
ret
endp
 
;output:
; dl
align 4
910,7 → 978,7
;mov edi,dword[pole]
 
mov eax,4 ;à¨á®¢ ­¨¥ ⥪áâ 
mov ebx,325*65536+5
mov ebx,400*65536+5
mov ecx,[sc.work_text]
or ecx,0x80000000 ;or (1 shl 30)
mov edx,txt_zoom
928,7 → 996,7
mov eax,47
movzx ecx,byte[zoom]
mov ebx,(2 shl 16)
mov edx,(325+6*9)*65536+5
mov edx,(400+6*9)*65536+5
mov esi,[sc.work_button_text]
or esi,(1 shl 30)
mov edi,[sc.work_button]