Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 3039 → Rev 3040

/programs/develop/libraries/buf2d/trunk/buf2d.asm
1986,7 → 1986,55
ret
endp
 
;®âà §¨âì ¯® ¢¥à⨪ «¨ (¢¥àå ¨ ­¨§ ¬¥­ïîâáï ¬¥áâ ¬¨)
align 4
proc buf_flip_v, buf_struc:dword
locals
line_pix dd ? ;ª®«. ¯¨ªá¥«¥© ¢ «¨­¨¨ ¡ãä¥à 
line_2byte dd ? ;ª®«. ¡ ©â ¢ «¨­¨¨ ¡ãä¥à  * 2
endl
pushad
mov edi,[buf_struc]
cmp buf2d_bits,24
jne .end_24
mov edx,buf2d_w
mov [line_pix],edx
mov ebx,buf2d_h
lea edx,[edx+edx*2]
mov esi,edx
imul esi,ebx
sub esi,edx
add esi,buf2d_data ;㪠§ â¥«ì ­  ­¨¦­îî «¨­¨î
shr ebx,1 ;ª®«. «¨­¥©­ëå 横«®¢
shl edx,1
mov [line_2byte],edx
mov edi,buf2d_data
xchg edi,esi
cld
.flip_24:
cmp ebx,0
jle .end_24
mov ecx,[line_pix]
@@:
lodsw
mov dx,word[edi]
mov word[esi-2],dx
mov [edi],ax
lodsb
mov ah,byte[edi+2]
mov byte[esi-1],ah
mov [edi+2],al
add edi,3
loop @b
sub edi,[line_2byte]
dec ebx
jmp .flip_24
.end_24:
popad
ret
endp
 
align 4
proc buf_img_wdiv2, buf_struc:dword
pushad
mov edi,dword[buf_struc]
2134,6 → 2182,8
ret
endp
 
;description:
; ᦠ⨥ ¨§®¡à ¦¥­¨ï ¯® ¢ëá®â¥ (¢ëá®â  ¡ãä¥à  ­¥ ¬¥­ï¥âáï)
align 4
proc buf_img_hdiv2, buf_struc:dword
pushad
2144,6 → 2194,7
mov ecx,buf2d_h
imul ecx,eax
stdcall img_8b_hdiv2, buf2d_data,ecx,eax
jmp .end_f ;edi ¯®àâ¨âáï ¢ ä㭪樨, ¯®â®¬ã ¨á¯®«ì§®¢ ­¨¥ buf2d_bits ®¯ á­®
@@:
cmp buf2d_bits,24
jne @f
2151,6 → 2202,7
mov ecx,buf2d_h
imul ecx,eax
stdcall img_rgb24_hdiv2, buf2d_data,ecx,eax
jmp .end_f
@@:
cmp buf2d_bits,32
jne @f
2159,7 → 2211,9
imul ecx,eax
shl eax,2
stdcall img_rgba32_hdiv2, buf2d_data,ecx,eax
;jmp .end_f
@@:
.end_f:
popad
ret
endp
4761,6 → 4815,7
dd sz_buf2d_flood_fill, buf_flood_fill
dd sz_buf2d_set_pixel, buf_set_pixel
dd sz_buf2d_get_pixel, buf_get_pixel
dd sz_buf2d_flip_v, buf_flip_v
dd sz_buf2d_vox_brush_create, vox_brush_create
dd sz_buf2d_vox_brush_delete, vox_brush_delete
dd sz_buf2d_vox_obj_get_img_w_3g, buf_vox_obj_get_img_w_3g
4800,6 → 4855,7
sz_buf2d_flood_fill db 'buf2d_flood_fill',0
sz_buf2d_set_pixel db 'buf2d_set_pixel',0
sz_buf2d_get_pixel db 'buf2d_get_pixel',0
sz_buf2d_flip_v db 'buf2d_flip_v',0
sz_buf2d_vox_brush_create db 'buf2d_vox_brush_create',0
sz_buf2d_vox_brush_delete db 'buf2d_vox_brush_delete',0
sz_buf2d_vox_obj_get_img_w_3g db 'buf2d_vox_obj_get_img_w_3g',0