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
@ -4209,36 +4209,46 @@ sys_putimage_palette:
|
|||||||
add dx, word [eax+SLOT_BASE+APPDATA.wnd_clientbox.left]
|
add dx, word [eax+SLOT_BASE+APPDATA.wnd_clientbox.left]
|
||||||
rol edx, 16
|
rol edx, 16
|
||||||
.forced:
|
.forced:
|
||||||
cmp esi, 1
|
cmp esi, 1
|
||||||
jnz @f
|
jnz @f
|
||||||
push edi
|
push edi
|
||||||
mov eax, [edi+4]
|
mov eax, [edi+4]
|
||||||
sub eax, [edi]
|
sub eax, [edi]
|
||||||
push eax
|
push eax
|
||||||
push dword [edi]
|
push dword [edi]
|
||||||
push 0ffffff80h
|
push 0ffffff80h
|
||||||
mov edi, esp
|
mov edi, esp
|
||||||
call put_mono_image
|
call put_mono_image
|
||||||
add esp, 12
|
add esp, 12
|
||||||
pop edi
|
pop edi
|
||||||
ret
|
ret
|
||||||
@@:
|
@@:
|
||||||
cmp esi, 4
|
cmp esi, 2
|
||||||
jnz @f
|
jnz @f
|
||||||
push edi
|
push edi
|
||||||
push 0ffffff80h
|
push 0ffffff80h
|
||||||
mov edi, esp
|
mov edi, esp
|
||||||
call put_4bit_image
|
call put_2bit_image
|
||||||
pop eax
|
pop eax
|
||||||
pop edi
|
pop edi
|
||||||
ret
|
ret
|
||||||
@@:
|
@@:
|
||||||
push ebp esi ebp
|
cmp esi, 4
|
||||||
cmp esi, 8
|
jnz @f
|
||||||
jnz @f
|
push edi
|
||||||
mov ebp, putimage_get8bpp
|
push 0ffffff80h
|
||||||
mov esi, putimage_init8bpp
|
mov edi, esp
|
||||||
jmp sys_putimage_bpp
|
call put_4bit_image
|
||||||
|
pop eax
|
||||||
|
pop edi
|
||||||
|
ret
|
||||||
|
@@:
|
||||||
|
push ebp esi ebp
|
||||||
|
cmp esi, 8
|
||||||
|
jnz @f
|
||||||
|
mov ebp, putimage_get8bpp
|
||||||
|
mov esi, putimage_init8bpp
|
||||||
|
jmp sys_putimage_bpp
|
||||||
@@:
|
@@:
|
||||||
cmp esi, 15
|
cmp esi, 15
|
||||||
jnz @f
|
jnz @f
|
||||||
@ -4268,15 +4278,20 @@ sys_putimage_palette:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
put_mono_image:
|
put_mono_image:
|
||||||
push ebp esi ebp
|
push ebp esi ebp
|
||||||
mov ebp, putimage_get1bpp
|
mov ebp, putimage_get1bpp
|
||||||
mov esi, putimage_init1bpp
|
mov esi, putimage_init1bpp
|
||||||
jmp sys_putimage_bpp
|
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:
|
put_4bit_image:
|
||||||
push ebp esi ebp
|
push ebp esi ebp
|
||||||
mov ebp, putimage_get4bpp
|
mov ebp, putimage_get4bpp
|
||||||
mov esi, putimage_init4bpp
|
mov esi, putimage_init4bpp
|
||||||
jmp sys_putimage_bpp
|
jmp sys_putimage_bpp
|
||||||
|
|
||||||
putimage_init24bpp:
|
putimage_init24bpp:
|
||||||
lea eax, [eax*3]
|
lea eax, [eax*3]
|
||||||
@ -4325,6 +4340,38 @@ putimage_get1bpp:
|
|||||||
pop edx
|
pop edx
|
||||||
ret 4
|
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:
|
putimage_init4bpp:
|
||||||
add eax, ecx
|
add eax, ecx
|
||||||
push ecx
|
push ecx
|
||||||
|
@ -880,6 +880,8 @@ vesa12_putimage:
|
|||||||
add esi,[esp+32]
|
add esi,[esp+32]
|
||||||
cmp ebp,putimage_get1bpp
|
cmp ebp,putimage_get1bpp
|
||||||
jz .correct
|
jz .correct
|
||||||
|
cmp ebp,putimage_get2bpp
|
||||||
|
jz .correct
|
||||||
cmp ebp,putimage_get4bpp
|
cmp ebp,putimage_get4bpp
|
||||||
jnz @f
|
jnz @f
|
||||||
.correct:
|
.correct:
|
||||||
@ -953,6 +955,8 @@ vesa12_putimage:
|
|||||||
add edi,[BytesPerScanLine]
|
add edi,[BytesPerScanLine]
|
||||||
cmp ebp,putimage_get1bpp
|
cmp ebp,putimage_get1bpp
|
||||||
jz .correct
|
jz .correct
|
||||||
|
cmp ebp,putimage_get2bpp
|
||||||
|
jz .correct
|
||||||
cmp ebp,putimage_get4bpp
|
cmp ebp,putimage_get4bpp
|
||||||
jnz @f
|
jnz @f
|
||||||
.correct:
|
.correct:
|
||||||
|
@ -236,6 +236,8 @@ align 4
|
|||||||
; inc ebp
|
; inc ebp
|
||||||
cmp [putimg.ebp], putimage_get1bpp
|
cmp [putimg.ebp], putimage_get1bpp
|
||||||
jz .correct
|
jz .correct
|
||||||
|
cmp [putimg.ebp], putimage_get2bpp
|
||||||
|
jz .correct
|
||||||
cmp [putimg.ebp], putimage_get4bpp
|
cmp [putimg.ebp], putimage_get4bpp
|
||||||
jnz @f
|
jnz @f
|
||||||
.correct:
|
.correct:
|
||||||
@ -277,6 +279,8 @@ align 4
|
|||||||
; inc ebp
|
; inc ebp
|
||||||
cmp [putimg.ebp], putimage_get1bpp
|
cmp [putimg.ebp], putimage_get1bpp
|
||||||
jz .correct
|
jz .correct
|
||||||
|
cmp [putimg.ebp], putimage_get2bpp
|
||||||
|
jz .correct
|
||||||
cmp [putimg.ebp], putimage_get4bpp
|
cmp [putimg.ebp], putimage_get4bpp
|
||||||
jnz @f
|
jnz @f
|
||||||
.correct:
|
.correct:
|
||||||
|
Loading…
Reference in New Issue
Block a user