Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 306 → Rev 307

/programs/media/scrshoot/gp.inc
1,5 → 1,3
macro use_gp
{
;esi - screen size
;edi - pointer to image
csi_width equ [esi+2]
6,6 → 4,8
csi_height equ [esi]
csi_bitspp equ [esi+4]
csi_bytesps equ [esi+6]
 
 
copy_screen_to_image:
pusha
xor edx,edx
12,6 → 12,9
xor ecx,ecx
xor ebx,ebx
 
bt dword [use_rect.flags],1
jc copy_area
 
cmp csi_bitspp,word 24
je .next_str_24
 
60,4 → 63,32
jl .next_str_24
popa
ret
}
 
copy_area:
mov eax,[scr.bytesps]
mov ebx,eax
movzx ecx,word [rect.top]
mul ecx
movzx ecx,word [rect.width]
shl ecx,2
sub ebx,ecx
movzx ecx,word [rect.left]
shl ecx,2
add eax,ecx
movzx ecx,word [rect.height]
mov edx,eax
.next_str:
movzx esi,word [rect.width]
.next_pixel:
mov eax,[gs:edx]
mov [edi],ax
shr eax,8
mov [edi+2],ah
add edx,4
add edi,3
dec esi
jnz .next_pixel
add edx,ebx
loop .next_str
popa
ret