forked from KolibriOS/kolibrios
buf2d.obj: fix in functions: buf2d_bit_blt_transp, buf2d_draw_text.
git-svn-id: svn://kolibrios.org@9570 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
99057c5ac7
commit
e0db5d61cc
@ -1646,11 +1646,9 @@ endl
|
|||||||
|
|
||||||
;¯¥à¥¢®à 稢 ¥¬ § ç¥¨ï ¯à®§à ç®á⥩
|
;¯¥à¥¢®à 稢 ¥¬ § ç¥¨ï ¯à®§à ç®á⥩
|
||||||
neg edi
|
neg edi
|
||||||
inc edi
|
add edi,256
|
||||||
add edi,255
|
|
||||||
neg esi
|
neg esi
|
||||||
inc esi
|
add esi,256
|
||||||
add esi,255
|
|
||||||
|
|
||||||
movzx ecx,byte[eax]
|
movzx ecx,byte[eax]
|
||||||
imul ecx,edi
|
imul ecx,edi
|
||||||
@ -1694,8 +1692,7 @@ push eax ebx
|
|||||||
shr ecx,1
|
shr ecx,1
|
||||||
;¯¥à¥¢®à 稢 ¥¬ § ç¥¨ï ¯à®§à ç®áâ¨
|
;¯¥à¥¢®à 稢 ¥¬ § ç¥¨ï ¯à®§à ç®áâ¨
|
||||||
neg ecx
|
neg ecx
|
||||||
inc ecx
|
add ecx,256
|
||||||
add ecx,255
|
|
||||||
|
|
||||||
shl ecx,24
|
shl ecx,24
|
||||||
add ebx,ecx
|
add ebx,ecx
|
||||||
@ -1704,10 +1701,10 @@ pop ebx eax
|
|||||||
|
|
||||||
jmp .end_f
|
jmp .end_f
|
||||||
.c0_c1: ;¥á«¨ ¯à®§à ç®á⨠®¡®¨å 梥⮢ ᮢ¯ ¤ îâ
|
.c0_c1: ;¥á«¨ ¯à®§à ç®á⨠®¡®¨å 梥⮢ ᮢ¯ ¤ îâ
|
||||||
mov edx,dword[eax]
|
mov edx,[eax]
|
||||||
shr edx,1
|
shr edx,1
|
||||||
and edx,011111110111111101111111b
|
and edx,011111110111111101111111b
|
||||||
mov esi,dword[ebx]
|
mov esi,[ebx]
|
||||||
shr esi,1
|
shr esi,1
|
||||||
and esi,011111110111111101111111b
|
and esi,011111110111111101111111b
|
||||||
add edx,esi
|
add edx,esi
|
||||||
@ -1715,16 +1712,16 @@ pop ebx eax
|
|||||||
or edx,edi
|
or edx,edi
|
||||||
jmp .end_f
|
jmp .end_f
|
||||||
.c0z: ;¥á«¨ 梥⠢ eax ¯à®§à çë©
|
.c0z: ;¥á«¨ 梥⠢ eax ¯à®§à çë©
|
||||||
mov edx,dword[ebx]
|
mov edx,[ebx]
|
||||||
movzx edi,byte[ebx+3]
|
movzx edi,byte[ebx+3]
|
||||||
jmp @f
|
jmp @f
|
||||||
.c1z: ;¥á«¨ 梥⠢ ebx ¯à®§à çë©
|
.c1z: ;¥á«¨ 梥⠢ ebx ¯à®§à çë©
|
||||||
mov edx,dword[eax]
|
mov edx,[eax]
|
||||||
@@:
|
@@:
|
||||||
add edi,255 ;¤¥« ¥¬ 梥⠯®«®¢¨ã ¯à®§à çë¬
|
add edi,255 ;¤¥« ¥¬ 梥⠯®«®¢¨ã ¯à®§à çë¬
|
||||||
shr edi,1
|
shr edi,1
|
||||||
cmp edi,255
|
cmp edi,255
|
||||||
jl @f
|
jle @f
|
||||||
mov edi,255 ;¬ ªá¨¬ «ì ï ¯à®§à ç®áâì ¥ ¡®«¥¥ 255
|
mov edi,255 ;¬ ªá¨¬ «ì ï ¯à®§à ç®áâì ¥ ¡®«¥¥ 255
|
||||||
@@:
|
@@:
|
||||||
shl edi,24
|
shl edi,24
|
||||||
@ -2271,15 +2268,28 @@ proc buf_bit_blt, buf_destination:dword, coord_x:dword, coord_y:dword, buf_sourc
|
|||||||
endp
|
endp
|
||||||
|
|
||||||
;input:
|
;input:
|
||||||
; esi = pointer to color1 + transparent
|
; esi = pointer to color1 + transparent (32b)
|
||||||
; edi = pointer to background color2
|
; edi = pointer to background color2 (24b)
|
||||||
;output:
|
;output:
|
||||||
; [edi] = combine color
|
; [edi] = combine color (24b)
|
||||||
align 4
|
align 4
|
||||||
combine_colors_0:
|
combine_colors_0:
|
||||||
push ax bx cx dx
|
push ax cx
|
||||||
mov bx,0x00ff ;---get transparent---
|
|
||||||
movzx cx,byte[esi+3] ;pro
|
movzx cx,byte[esi+3] ;pro
|
||||||
|
cmp cx,255
|
||||||
|
je .end_f
|
||||||
|
or cx,cx
|
||||||
|
jnz @f
|
||||||
|
mov ax,[esi]
|
||||||
|
mov [edi],ax
|
||||||
|
mov al,[esi+2]
|
||||||
|
mov [edi+2],al
|
||||||
|
jmp .end_f
|
||||||
|
align 4
|
||||||
|
@@:
|
||||||
|
inc cx
|
||||||
|
push bx dx
|
||||||
|
mov bx,0x0100 ;---get transparent---
|
||||||
sub bx,cx ;256-pro
|
sub bx,cx ;256-pro
|
||||||
;---blye---
|
;---blye---
|
||||||
movzx ax,byte[esi]
|
movzx ax,byte[esi]
|
||||||
@ -2302,8 +2312,9 @@ combine_colors_0:
|
|||||||
imul dx,cx
|
imul dx,cx
|
||||||
add ax,dx
|
add ax,dx
|
||||||
mov byte[edi+2],ah
|
mov byte[edi+2],ah
|
||||||
|
pop dx bx
|
||||||
pop dx cx bx ax
|
.end_f:
|
||||||
|
pop cx ax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
;äãªæ¨ï ª®¯¨àã¥â ¨§®¡à ¦¥¨¥ ¨§ ¡ãä¥à buf_source (32b) ¢ buf_destination (24b)
|
;äãªæ¨ï ª®¯¨àã¥â ¨§®¡à ¦¥¨¥ ¨§ ¡ãä¥à buf_source (32b) ¢ buf_destination (24b)
|
||||||
@ -2426,17 +2437,28 @@ proc buf_bit_blt_transp, buf_destination:dword, coord_x:dword, coord_y:dword, bu
|
|||||||
endp
|
endp
|
||||||
|
|
||||||
;input:
|
;input:
|
||||||
; ebx - color1
|
; ebx - color1 (24b)
|
||||||
; esi = pointer to transparent
|
; esi = pointer to transparent (8b)
|
||||||
; edi = pointer to background color2
|
; edi = pointer to background color2 (24b)
|
||||||
;output:
|
;output:
|
||||||
; [edi] = combine color
|
; [edi] = combine color (24b)
|
||||||
align 4
|
align 4
|
||||||
combine_colors_2:
|
combine_colors_2:
|
||||||
push ax ebx cx dx si
|
push ebx cx
|
||||||
mov cl,byte[esi] ;pro
|
movzx cx,byte[esi] ;pro
|
||||||
xor ch,ch
|
cmp cx,255
|
||||||
mov si,0x00ff ;---get transparent---
|
je .end_f
|
||||||
|
or cx,cx
|
||||||
|
jnz @f
|
||||||
|
mov [edi],bx
|
||||||
|
shr ebx,16
|
||||||
|
mov [edi+2],bl
|
||||||
|
jmp .end_f
|
||||||
|
align 4
|
||||||
|
@@:
|
||||||
|
inc cx
|
||||||
|
push ax dx si
|
||||||
|
mov si,0x0100 ;---get transparent---
|
||||||
sub si,cx ;256-pro
|
sub si,cx ;256-pro
|
||||||
|
|
||||||
;---blye---
|
;---blye---
|
||||||
@ -2462,8 +2484,9 @@ combine_colors_2:
|
|||||||
imul dx,cx
|
imul dx,cx
|
||||||
add ax,dx
|
add ax,dx
|
||||||
mov byte[edi+2],ah
|
mov byte[edi+2],ah
|
||||||
|
pop si dx ax
|
||||||
pop si dx cx ebx ax
|
.end_f:
|
||||||
|
pop cx ebx
|
||||||
ret
|
ret
|
||||||
|
|
||||||
;äãªæ¨ï ª®¯¨àã¥â ¨§®¡à ¦¥¨¥ ¨§ ¡ãä¥à buf_source (8b) ¢ buf_destination (24b)
|
;äãªæ¨ï ª®¯¨àã¥â ¨§®¡à ¦¥¨¥ ¨§ ¡ãä¥à buf_source (8b) ¢ buf_destination (24b)
|
||||||
|
@ -142,25 +142,16 @@ raw_pointer_2 dd 0 ;+20 ; not use for scaling
|
|||||||
system_dir_CnvPNG db '/sys/lib/cnv_png.obj',0
|
system_dir_CnvPNG db '/sys/lib/cnv_png.obj',0
|
||||||
system_dir_UNPACK db '/sys/lib/archiver.obj',0
|
system_dir_UNPACK db '/sys/lib/archiver.obj',0
|
||||||
|
|
||||||
er_message_found_lib1 db 'cnv_png.obj - Not found!',0
|
|
||||||
er_message_import1 db 'cnv_png.obj - Wrong import!',0
|
|
||||||
|
|
||||||
err_message_found_lib2 db 'archiver.obj - Not found!',0
|
|
||||||
err_message_import2 db 'archiver.obj - Wrong import!',0
|
|
||||||
|
|
||||||
ihead_f_i:
|
|
||||||
ihead_f_l db 'Errors of plugins:',0
|
|
||||||
|
|
||||||
;plugins_directory db 'plugins/',0
|
;plugins_directory db 'plugins/',0
|
||||||
plugins_directory db 0
|
plugins_directory db 0
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
l_libs_start:
|
l_libs_start:
|
||||||
|
|
||||||
library01 l_libs system_dir_CnvPNG+9,path,library_path,system_dir_CnvPNG,\
|
library01 l_libs system_dir_CnvPNG+9,library_path,system_dir_CnvPNG,\
|
||||||
er_message_found_lib1,ihead_f_l,cnv_png_import,er_message_import1,ihead_f_i,plugins_directory
|
cnv_png_import,plugins_directory
|
||||||
|
|
||||||
library02 l_libs system_dir_UNPACK+9,path,library_path,system_dir_UNPACK,\
|
library02 l_libs system_dir_UNPACK+9,library_path,system_dir_UNPACK,\
|
||||||
err_message_found_lib2,ihead_f_l,UNPACK_import,err_message_import2,ihead_f_i,plugins_directory
|
UNPACK_import,plugins_directory
|
||||||
|
|
||||||
end_l_libs:
|
end_l_libs:
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
|
@ -81,7 +81,8 @@ ICON_STRIP equ '/rd/1/iconstrp.png'
|
|||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
include 'lang.inc'
|
include 'lang.inc'
|
||||||
include '../../../macros.inc'
|
include '../../../macros.inc'
|
||||||
include '../../../develop/libraries/box_lib/load_lib.mac'
|
include '../../../KOSfuncs.inc'
|
||||||
|
include '../../../load_lib.mac'
|
||||||
;include '../../../debug.inc'
|
;include '../../../debug.inc'
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
@use_library ;use load lib macros
|
@use_library ;use load lib macros
|
||||||
|
Loading…
Reference in New Issue
Block a user