procedure img.draw fixed

git-svn-id: svn://kolibrios.org@1252 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Evgeny Grechnikov (Diamond) 2009-11-07 16:33:23 +00:00
parent b35a874c08
commit b599c0a70c

View File

@ -1495,12 +1495,19 @@ proc img.draw _img, _x, _y, _width, _height, _xpos, _ypos ;/////////////////////
call img._.get_scanline_len call img._.get_scanline_len
shl ecx, 16 shl ecx, 16
add ecx, edx add ecx, edx
push eax
mov eax, [ebx + Image.Width]
imul eax, [_ypos]
add eax, [_xpos]
call img._.get_scanline_len
add eax, [ebx + Image.Data]
mov edx, [_x - 2] mov edx, [_x - 2]
mov dx, word [_y] mov dx, word [_y]
mov esi, [ebx + Image.Type] mov esi, [ebx + Image.Type]
mov esi, [type2bpp + (esi-1)*4] mov esi, [type2bpp + (esi-1)*4]
mov edi, [ebx + Image.Palette] mov edi, [ebx + Image.Palette]
mov ebx, [ebx + Image.Data] xchg eax, ebx
pop eax
push ebp push ebp
push 65 push 65
pop ebp pop ebp
@ -1717,7 +1724,7 @@ align 4
export \ export \
lib_init , 'lib_init' , \ lib_init , 'lib_init' , \
0x00050006 , 'version' , \ 0x00050007 , 'version' , \
img.is_img , 'img_is_img' , \ img.is_img , 'img_is_img' , \
img.info , 'img_info' , \ img.info , 'img_info' , \
img.from_file , 'img_from_file' , \ img.from_file , 'img_from_file' , \