forked from KolibriOS/kolibrios
sysfunction 65 can now output 2bpp images
git-svn-id: svn://kolibrios.org@918 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
e22da872c9
commit
5847ff53fc
@ -4222,6 +4222,16 @@ sys_putimage_palette:
|
||||
add esp, 12
|
||||
pop edi
|
||||
ret
|
||||
@@:
|
||||
cmp esi, 2
|
||||
jnz @f
|
||||
push edi
|
||||
push 0ffffff80h
|
||||
mov edi, esp
|
||||
call put_2bit_image
|
||||
pop eax
|
||||
pop edi
|
||||
ret
|
||||
@@:
|
||||
cmp esi, 4
|
||||
jnz @f
|
||||
@ -4272,6 +4282,11 @@ put_mono_image:
|
||||
mov ebp, putimage_get1bpp
|
||||
mov esi, putimage_init1bpp
|
||||
jmp sys_putimage_bpp
|
||||
put_2bit_image:
|
||||
push ebp esi ebp
|
||||
mov ebp, putimage_get2bpp
|
||||
mov esi, putimage_init2bpp
|
||||
jmp sys_putimage_bpp
|
||||
put_4bit_image:
|
||||
push ebp esi ebp
|
||||
mov ebp, putimage_get4bpp
|
||||
@ -4325,6 +4340,38 @@ putimage_get1bpp:
|
||||
pop edx
|
||||
ret 4
|
||||
|
||||
putimage_init2bpp:
|
||||
add eax, ecx
|
||||
push ecx
|
||||
add ecx, 3
|
||||
add eax, 3
|
||||
shr ecx, 2
|
||||
shr eax, 2
|
||||
sub eax, ecx
|
||||
pop ecx
|
||||
ret
|
||||
align 16
|
||||
putimage_get2bpp:
|
||||
push edx
|
||||
mov edx, [esp+8]
|
||||
mov al, [edx]
|
||||
mov ah, al
|
||||
shr al, 6
|
||||
shl ah, 2
|
||||
jnz .nonewbyte
|
||||
lodsb
|
||||
mov ah, al
|
||||
shr al, 6
|
||||
shl ah, 2
|
||||
add ah, 1
|
||||
.nonewbyte:
|
||||
mov [edx], ah
|
||||
mov edx, [edx+4]
|
||||
movzx eax, al
|
||||
mov eax, [edx+eax*4]
|
||||
pop edx
|
||||
ret 4
|
||||
|
||||
putimage_init4bpp:
|
||||
add eax, ecx
|
||||
push ecx
|
||||
|
@ -880,6 +880,8 @@ vesa12_putimage:
|
||||
add esi,[esp+32]
|
||||
cmp ebp,putimage_get1bpp
|
||||
jz .correct
|
||||
cmp ebp,putimage_get2bpp
|
||||
jz .correct
|
||||
cmp ebp,putimage_get4bpp
|
||||
jnz @f
|
||||
.correct:
|
||||
@ -953,6 +955,8 @@ vesa12_putimage:
|
||||
add edi,[BytesPerScanLine]
|
||||
cmp ebp,putimage_get1bpp
|
||||
jz .correct
|
||||
cmp ebp,putimage_get2bpp
|
||||
jz .correct
|
||||
cmp ebp,putimage_get4bpp
|
||||
jnz @f
|
||||
.correct:
|
||||
|
@ -236,6 +236,8 @@ align 4
|
||||
; inc ebp
|
||||
cmp [putimg.ebp], putimage_get1bpp
|
||||
jz .correct
|
||||
cmp [putimg.ebp], putimage_get2bpp
|
||||
jz .correct
|
||||
cmp [putimg.ebp], putimage_get4bpp
|
||||
jnz @f
|
||||
.correct:
|
||||
@ -277,6 +279,8 @@ align 4
|
||||
; inc ebp
|
||||
cmp [putimg.ebp], putimage_get1bpp
|
||||
jz .correct
|
||||
cmp [putimg.ebp], putimage_get2bpp
|
||||
jz .correct
|
||||
cmp [putimg.ebp], putimage_get4bpp
|
||||
jnz @f
|
||||
.correct:
|
||||
|
Loading…
Reference in New Issue
Block a user