forked from KolibriOS/kolibrios
sysfunction 65: 16bpp is now 5+6+5, and 5+5+5=15bpp
git-svn-id: svn://kolibrios.org@906 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -4213,6 +4213,12 @@ sys_putimage_palette:
|
||||
mov ebp, putimage_get8bpp
|
||||
mov esi, putimage_init8bpp
|
||||
jmp sys_putimage_bpp
|
||||
@@:
|
||||
cmp esi, 15
|
||||
jnz @f
|
||||
mov ebp, putimage_get15bpp
|
||||
mov esi, putimage_init15bpp
|
||||
jmp sys_putimage_bpp
|
||||
@@:
|
||||
cmp esi, 16
|
||||
jnz @f
|
||||
@@ -4260,10 +4266,10 @@ putimage_get32bpp:
|
||||
lodsd
|
||||
ret 4
|
||||
|
||||
putimage_init16bpp:
|
||||
putimage_init15bpp:
|
||||
add eax, eax
|
||||
ret
|
||||
putimage_get16bpp:
|
||||
putimage_get15bpp:
|
||||
; 0RRRRRGGGGGBBBBB -> 00000000RRRRR000GGGGG000BBBBB000
|
||||
push ecx edx
|
||||
movzx eax, word [esi]
|
||||
@@ -4279,7 +4285,28 @@ putimage_get16bpp:
|
||||
or eax, ecx
|
||||
or eax, edx
|
||||
pop edx ecx
|
||||
ret 4
|
||||
|
||||
putimage_init16bpp:
|
||||
add eax, eax
|
||||
ret
|
||||
putimage_get16bpp:
|
||||
; RRRRRGGGGGGBBBBB -> 00000000RRRRR000GGGGGG00BBBBB000
|
||||
push ecx edx
|
||||
movzx eax, word [esi]
|
||||
add esi, 2
|
||||
mov ecx, eax
|
||||
mov edx, eax
|
||||
and eax, 0x1F
|
||||
and ecx, 0x3F shl 5
|
||||
and edx, 0x1F shl 11
|
||||
shl eax, 3
|
||||
shl ecx, 5
|
||||
shl edx, 8
|
||||
or eax, ecx
|
||||
or eax, edx
|
||||
pop edx ecx
|
||||
ret 4
|
||||
|
||||
; eax x beginning
|
||||
; ebx y beginning
|
||||
|
Reference in New Issue
Block a user