Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 1633 → Rev 1634

/programs/develop/libraries/buf2d/trunk/buf2d.asm
998,7 → 998,56
ret
endp
 
;à¨á®¢ ­¨¥ £®à¨§®­â «ì­®© «¨­¨¨, ¯®â®¬ã ­¥â ¯ à ¬¥âà  coord_y0
align 4
proc buf_line_h, buf_struc:dword, coord_x0:dword, coord_y0:dword, coord_x1:dword, color:dword
pushad
mov edx,dword[color]
 
mov eax,edi
mov edi,[buf_struc]
cmp buf2d_bits,24
jne @f
 
mov ebx,dword[coord_x0]
mov ecx,dword[coord_y0]
mov esi,dword[coord_x1]
@@: ;for (x=x0 ; x<x1; x++) ;------------------------------------
call draw_pixel
inc ebx
cmp ebx,esi
jge @f
jmp @b
@@:
popad
ret
endp
 
align 4
proc buf_rect_by_size, buf_struc:dword, coord_x:dword,coord_y:dword,w:dword,h:dword, color:dword
pushad
mov edi,[buf_struc]
cmp buf2d_bits,24
jne .coord_end
 
mov eax,[coord_x]
mov ebx,[coord_y]
mov ecx,[w]
add ecx,eax
mov edx,[h]
add edx,ebx
mov esi,dword[color]
stdcall buf_line_h, edi, eax, ebx, ecx, esi ;«¨­¨ï -
stdcall buf_line_brs, edi, eax, ebx, eax, edx, esi ;«¨­¨ï |
stdcall buf_line_h, edi, eax, edx, ecx, esi ;«¨­¨ï -
stdcall buf_line_brs, edi, ecx, ebx, ecx, edx, esi ;«¨­¨ï |
.coord_end:
popad
ret
endp
 
align 4
proc buf_circle, buf_struc:dword, coord_x:dword, coord_y:dword, r:dword, color:dword
locals
po_x dd ?
2034,6 → 2083,7
dd sz_buf2d_draw, buf_draw_buf
dd sz_buf2d_delete, buf_delete
dd sz_buf2d_line, buf_line_brs
dd sz_buf2d_rect_by_size, buf_rect_by_size
dd sz_buf2d_circle, buf_circle
dd sz_buf2d_img_hdiv2, buf_img_hdiv2
dd sz_buf2d_img_wdiv2, buf_img_wdiv2
2055,6 → 2105,7
sz_buf2d_draw db 'buf2d_draw',0
sz_buf2d_delete db 'buf2d_delete',0
sz_buf2d_line db 'buf2d_line',0 ;à¨á®¢ ­¨¥ «¨­¨¨
sz_buf2d_rect_by_size db 'buf2d_rect_by_size',0 ;à¨á®¢ ­¨¥ ¯àאַ㣮«ì­¨ª , 2-ï ª®®à¤¨­ â  § ¤ ­  ¯® à §¬¥àã
sz_buf2d_circle db 'buf2d_circle',0 ;à¨á®¢ ­¨¥ ®ªà㦭®áâ¨
sz_buf2d_img_hdiv2 db 'buf2d_img_hdiv2',0 ;ᦠ⨥ ¨§®¡à ¦¥­¨ï ¯® ¢ëá®â¥ ¢ 2 à §  (à §¬¥à ¡ãä¥à  ­¥ ¬¥­ï¥âáï)
sz_buf2d_img_wdiv2 db 'buf2d_img_wdiv2',0 ;ᦠ⨥ ¨§®¡à ¦¥­¨ï ¯® è¨à¨­¥ ¢ 2 à §  (à §¬¥à ¡ãä¥à  ­¥ ¬¥­ï¥âáï)