sysfunction 65: added 16-bit color

git-svn-id: svn://kolibrios.org@842 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Evgeny Grechnikov (Diamond)
2008-08-04 16:43:51 +00:00
parent b2e313b0d9
commit 059b851217
2 changed files with 40 additions and 4 deletions

View File

@@ -4199,6 +4199,12 @@ sys_putimage_palette:
mov ebp, putimage_get8bpp
mov esi, putimage_init8bpp
jmp sys_putimage_bpp
@@:
cmp esi, 16
jnz @f
mov ebp, putimage_get16bpp
mov esi, putimage_init16bpp
jmp sys_putimage_bpp
@@:
cmp esi, 24
jnz @f
@@ -4212,7 +4218,7 @@ sys_putimage_palette:
mov esi, putimage_init32bpp
jmp sys_putimage_bpp
@@:
pop ebp esi
pop ebp esi ebp
ret
putimage_init24bpp:
@@ -4240,6 +4246,27 @@ putimage_get32bpp:
lodsd
ret 4
putimage_init16bpp:
add eax, eax
ret
putimage_get16bpp:
; 0RRRRRGGGGGBBBBB -> 00000000RRRRR000GGGGG000BBBBB000
push ecx edx
movzx eax, word [esi]
add esi, 2
mov ecx, eax
mov edx, eax
and eax, 0x1F
and ecx, 0x1F shl 5
and edx, 0x1F shl 10
shl eax, 3
shl ecx, 6
shl edx, 9
or eax, ecx
or eax, edx
pop edx ecx
ret
; eax x beginning
; ebx y beginning
; ecx x end