mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-15 19:33:59 +03:00
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]
|
||||
rol edx, 16
|
||||
.forced:
|
||||
cmp esi, 1
|
||||
jnz @f
|
||||
push edi
|
||||
mov eax, [edi+4]
|
||||
sub eax, [edi]
|
||||
push eax
|
||||
push dword [edi]
|
||||
push 0ffffff80h
|
||||
mov edi, esp
|
||||
call put_mono_image
|
||||
add esp, 12
|
||||
pop edi
|
||||
ret
|
||||
cmp esi, 1
|
||||
jnz @f
|
||||
push edi
|
||||
mov eax, [edi+4]
|
||||
sub eax, [edi]
|
||||
push eax
|
||||
push dword [edi]
|
||||
push 0ffffff80h
|
||||
mov edi, esp
|
||||
call put_mono_image
|
||||
add esp, 12
|
||||
pop edi
|
||||
ret
|
||||
@@:
|
||||
cmp esi, 4
|
||||
jnz @f
|
||||
push edi
|
||||
push 0ffffff80h
|
||||
mov edi, esp
|
||||
call put_4bit_image
|
||||
pop eax
|
||||
pop edi
|
||||
ret
|
||||
cmp esi, 2
|
||||
jnz @f
|
||||
push edi
|
||||
push 0ffffff80h
|
||||
mov edi, esp
|
||||
call put_2bit_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, 4
|
||||
jnz @f
|
||||
push edi
|
||||
push 0ffffff80h
|
||||
mov edi, esp
|
||||
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
|
||||
jnz @f
|
||||
@ -4268,15 +4278,20 @@ sys_putimage_palette:
|
||||
ret
|
||||
|
||||
put_mono_image:
|
||||
push ebp esi ebp
|
||||
mov ebp, putimage_get1bpp
|
||||
mov esi, putimage_init1bpp
|
||||
jmp sys_putimage_bpp
|
||||
push ebp esi ebp
|
||||
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
|
||||
mov esi, putimage_init4bpp
|
||||
jmp sys_putimage_bpp
|
||||
push ebp esi ebp
|
||||
mov ebp, putimage_get4bpp
|
||||
mov esi, putimage_init4bpp
|
||||
jmp sys_putimage_bpp
|
||||
|
||||
putimage_init24bpp:
|
||||
lea eax, [eax*3]
|
||||
@ -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