fix function GetColorOfPixel

git-svn-id: svn://kolibrios.org@7258 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
IgorA 2018-04-25 05:36:00 +00:00
parent 9115f97464
commit 0096ee123b

View File

@ -44,13 +44,17 @@ PutPixel:
; eax - color of pixel in coordinats (x,y) ; eax - color of pixel in coordinats (x,y)
GetColorOfPixel: GetColorOfPixel:
cmp esi,ebx
jb @f
xor eax,eax
dec eax
ret
@@:
imul ebx,edi imul ebx,edi
add ebx,esi add ebx,esi
lea ebx,[ebx+ebx*2] lea ebx,[ebx+ebx*2]
add eax,ebx mov eax,[eax+ebx]
mov ebx,[eax] and eax,0xffffff
and ebx,0xffffff
mov eax,ebx
ret ret
;procedure <<<<calculate line>>>> ;procedure <<<<calculate line>>>>
@ -589,7 +593,7 @@ flood_fill:
call GetColorOfPixel call GetColorOfPixel
push eax push eax
cmp eax,[c] ;¥á«¨ 梥⠯஢¥àאַ£® ¯¨ªá¥«ï ­¥ à ¢¥­ á,â® ­¥ § ­®á¨¬ ¥£® ¢ á⥪ cmp eax,[c] ;¥á«¨ 梥⠯஢¥àאַ£® ¯¨ªá¥«ï ­¥ à ¢¥­ á, â® ­¥ § ­®á¨¬ ¥£® ¢ á⥪
jne no_fill_1 jne no_fill_1
mov ebx,[l_c] mov ebx,[l_c]
cmp ebx,[c] cmp ebx,[c]
@ -655,7 +659,7 @@ flood_fill:
call GetColorOfPixel call GetColorOfPixel
push eax push eax
cmp eax,[c] ;¥á«¨ 梥⠯஢¥àאַ£® ¯¨ªá¥«ï ­¥ à ¢¥­ á,â® ­¥ § ­®á¨¬ ¥£® ¢ á⥪ cmp eax,[c] ;¥á«¨ 梥⠯஢¥àאַ£® ¯¨ªá¥«ï ­¥ à ¢¥­ á, â® ­¥ § ­®á¨¬ ¥£® ¢ á⥪
je no_fill_3 je no_fill_3
mov ebx,[l_c] mov ebx,[l_c]
cmp ebx,[c] cmp ebx,[c]