Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 2176 → Rev 2177

/programs/develop/libraries/buf2d/trunk/buf2d.asm
1068,18 → 1068,43
cmp buf2d_bits,24
jne .end24
 
mov ecx,dword[coord_y0]
bt ecx,31
jc .end24 ;¥á«¨ ª®®à¤¨­ â  y0 ®âà¨æ â¥«ì­ ï
cmp ecx,buf2d_h
jge .end24 ;¥á«¨ ª®®à¤¨­ â  y0 ¡®«ìè¥ ¢ëá®âë ¡ãä¥à 
 
mov ebx,dword[coord_x0]
mov ecx,dword[coord_y0]
mov edx,dword[color]
mov esi,dword[coord_x1]
cmp ebx,esi
jle @f
xchg ebx,esi ;¥á«¨ x0 > x1 â® ¬¥­ï¥¬ ¬¥áâ ¬¨ x0 ¨ x1
@@:
cmp esi,buf2d_w
jl @f
mov esi,buf2d_w
;dec esi
@@:
 
;¢ eax ¢ëç¨á«ï¥¬ ­ ç «® 1-© â®çª¨ «¨­¨¨ ¢ ¡ãä¥à¥ ¨§®¡à ¦¥­¨ï
mov eax,buf2d_w ;size x
imul eax,ecx ;size_x*y
add eax,ebx ;size_x*y+x
lea eax,[eax+eax*2] ;(size_x*y+x)*3
add eax,buf2d_data ;ptr+(size_x*y+x)*3
 
mov edx,dword[color]
@@: ;横« ¯® ®á¨ x ®â x0 ¤® x1
cmp ebx,esi
jge @f
call draw_pixel
bt ebx,31
jc .otr_x
mov word[eax],dx ;copy pixel color
ror edx,16
mov byte[eax+2],dl
ror edx,16
.otr_x:
add eax,3
inc ebx
jmp @b
@@: