Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 2464 → Rev 2465

/kernel/branches/Kolibri-acpi/video/blitter.inc
1,3 → 1,9
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2011-2012. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
struct BLITTER_BLOCK
xmin dd ?
340,7 → 346,9
mov edi, ebp
 
imul edi, [_display.pitch]
imul ebp, [_display.width]
; imul ebp, [_display.width]
mov ebp, [d_width_calc_area + ebp*4]
 
add ebp, ebx
add ebp, [_WinMapAddress]
 
373,11 → 381,19
align 4
.inner32:
cmp [ebp+ecx], bl
jne @F
jne .skip
;--------------------------------------
push eax
mov eax, [esi+ecx*4]
 
; check for hardware cursor
cmp [_display.select_cursor], select_cursor
je @f
cmp [_display.select_cursor], 0
jne .no_mouseunder
;--------------------------------------
align 4
@@:
push ecx
 
mov ecx, [esp+4]
389,12 → 405,15
; check mouse area for putpixel
call [_display.check_mouse]
pop ecx
;--------------------------------------
align 4
.no_mouseunder:
; store to real LFB
mov [LFB_BASE+edi+ecx*4], eax
pop eax
;--------------------------------------
align 4
@@:
.skip:
inc ecx
dec edx
jnz .inner32
408,7 → 427,8
jnz .outer32
 
.done:
call [draw_pointer]
; call [draw_pointer]
call __sys_draw_pointer
.L57:
add esp, 72
pop ebx
430,7 → 450,7
align 4
.inner24:
cmp [ebp+ecx], bl
jne @F
jne .skip_1
;--------------------------------------
push eax
mov eax, [esi+ecx*4]
437,6 → 457,14
 
lea edi, [edi+ecx*2]
 
; check for hardware cursor
cmp [_display.select_cursor], select_cursor
je @f
cmp [_display.select_cursor], 0
jne .no_mouseunder_1
;--------------------------------------
align 4
@@:
push ecx
 
mov ecx, [esp+4]
448,7 → 476,9
; check mouse area for putpixel
call [_display.check_mouse]
pop ecx
 
;--------------------------------------
align 4
.no_mouseunder_1:
mov [edi+ecx], ax
shr eax, 16
mov [edi+ecx+2], al
456,7 → 486,7
pop eax
;--------------------------------------
align 4
@@:
.skip_1:
mov edi, [esp+64]
inc ecx
dec edx
/kernel/branches/Kolibri-acpi/video/cursors.inc
1,6 → 1,6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;;
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
592,7 → 592,7
mov esi, [hcursor]
mov ecx, [x]
mov eax, [y]
mov ebx, [BytesPerScanLine]
; mov ebx, [BytesPerScanLine]
 
xor edx, edx
sub ecx, [esi+CURSOR.hot_x]
618,7 → 618,10
sub edx, [y]
mov [_dy], edx
 
mul dword [BytesPerScanLine]
; mul dword [BytesPerScanLine]
mov eax, [d_width_calc_area + eax*4]
lea eax, [eax + eax*2]
 
lea edx, [LFB_BASE+ecx*3]
add edx, eax
mov [cur_saved_base], edx
734,7 → 737,10
sub edx, [y]
mov [_dy], edx
 
mul dword [BytesPerScanLine]
; mul dword [BytesPerScanLine]
mov eax, [d_width_calc_area + eax*4]
shl eax, 2
 
lea edx, [LFB_BASE+eax+ecx*4]
mov [cur_saved_base], edx
 
/kernel/branches/Kolibri-acpi/video/vesa12.inc
1,6 → 1,6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;;
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;; VESA12.INC ;;
/kernel/branches/Kolibri-acpi/video/vesa20.inc
1,6 → 1,6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;;
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;; VESA20.INC ;;
53,6 → 53,14
; eax = x
; ebx = y
;--------------------------------------
; check for hardware cursor
cmp [_display.select_cursor], select_cursor
je @f
cmp [_display.select_cursor], 0
jne .no_mouseunder
;--------------------------------------
align 4
@@:
; check mouse area for putpixel
test ecx, 0x04000000 ; don't load to mouseunder area
jnz .no_mouseunder
59,9 → 67,13
call [_display.check_m_pixel]
test ecx, ecx ;0xff000000
jnz @f
;--------------------------------------
align 4
.no_mouseunder:
;--------------------------------------
imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
mov ebx, [d_width_calc_area + ebx*4]
lea ebx, [ebx + ebx*2]
lea edi, [eax+eax*2]; edi = x*3
add edi, ebx ; edi = x*3+(y*y multiplier)
mov ecx, [LFB_BASE+edi]
74,6 → 86,14
align 4
Vesa20_getpixel32:
;--------------------------------------
; check for hardware cursor
cmp [_display.select_cursor], select_cursor
je @f
cmp [_display.select_cursor], 0
jne .no_mouseunder
;--------------------------------------
align 4
@@:
; check mouse area for putpixel
test ecx, 0x04000000 ; don't load to mouseunder area
jnz .no_mouseunder
80,9 → 100,13
call [_display.check_m_pixel]
test ecx, ecx ;0xff000000
jnz @f
;--------------------------------------
align 4
.no_mouseunder:
;--------------------------------------
imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
mov ebx, [d_width_calc_area + ebx*4]
shl ebx, 2
lea edi, [ebx+eax*4]; edi = x*4+(y*y multiplier)
mov ecx, [LFB_BASE+edi]
;--------------------------------------
218,16 → 242,31
mov esi, [putimg.pti]
; pointer to screen
mov edx, [putimg.abs_cy]
imul edx, [BytesPerScanLine]
; imul edx, [BytesPerScanLine]
 
mov edx, [d_width_calc_area + edx*4]
cmp bl, 4
je .32
lea edx, [edx+edx*2]
jmp @f
;-------------------------------------
align 4
.32:
shl edx, 2
;-------------------------------------
align 4
@@:
mov eax, [putimg.abs_cx]
movzx ebx, byte [ScreenBPP]
shr ebx, 3
; movzx ebx, byte [ScreenBPP]
; shr ebx, 3
imul eax, ebx
add edx, eax
; pointer to pixel map
mov eax, [putimg.abs_cy]
imul eax, [Screen_Max_X]
add eax, [putimg.abs_cy]
; imul eax, [Screen_Max_X]
; add eax, [putimg.abs_cy]
mov eax, [d_width_calc_area + eax*4]
 
add eax, [putimg.abs_cx]
add eax, [_WinMapAddress]
xchg eax, ebp
246,9 → 285,14
;--------------------------------------
put_image_end_24:
mov edi, [putimg.real_sy]
cmp [_display.select_cursor], 0
jne put_image_end_24_new
;--------------------------------------
; check for hardware cursor
mov ecx, [_display.select_cursor]
cmp ecx, select_cursor
je put_image_end_24_new
cmp ecx, 0
je put_image_end_24_old
;--------------------------------------
align 4
.new_line:
mov ecx, [putimg.real_sx]
261,6 → 305,60
cmp [ebp], bl
jne .skip
;--------------------------------------
; store to real LFB
mov [LFB_BASE+edx], ax
shr eax, 16
mov [LFB_BASE+edx+2], al
;--------------------------------------
align 4
.skip:
add edx, 3
inc ebp
dec ecx
jnz .new_x
 
add esi, [putimg.line_increment]
add edx, [putimg.screen_newline];[BytesPerScanLine]
add ebp, [putimg.winmap_newline];[Screen_Max_X]
 
cmp [putimg.ebp], putimage_get1bpp
jz .correct
cmp [putimg.ebp], putimage_get2bpp
jz .correct
cmp [putimg.ebp], putimage_get4bpp
jnz @f
;--------------------------------------
align 4
.correct:
mov eax, [putimg.edi]
mov byte [eax], 80h
;--------------------------------------
align 4
@@:
dec edi
jnz .new_line
;--------------------------------------
align 4
.finish:
add esp, putimg.stack_data
popad
ret
;------------------------------------------------------------------------------
align 4
put_image_end_24_old:
;--------------------------------------
align 4
.new_line:
mov ecx, [putimg.real_sx]
;--------------------------------------
align 4
.new_x:
push [putimg.edi]
mov eax, [putimg.ebp+4]
call eax
cmp [ebp], bl
jne .skip
;--------------------------------------
push ecx
 
neg ecx
304,14 → 402,9
@@:
dec edi
jnz .new_line
;--------------------------------------
jmp put_image_end_24.finish
;------------------------------------------------------------------------------
align 4
.finish:
add esp, putimg.stack_data
popad
ret
;--------------------------------------
align 4
put_image_end_24_new:
;--------------------------------------
align 4
391,9 → 484,14
align 4
put_image_end_32:
mov edi, [putimg.real_sy]
cmp [_display.select_cursor], 0
jne put_image_end_32_new
;--------------------------------------
; check for hardware cursor
mov ecx, [_display.select_cursor]
cmp ecx, select_cursor
je put_image_end_32_new
cmp ecx, 0
je put_image_end_32_old
;--------------------------------------
align 4
.new_line:
mov ecx, [putimg.real_sx]
406,17 → 504,6
cmp [ebp], bl
jne .skip
;--------------------------------------
push ecx
 
neg ecx
add ecx, [putimg.real_sx_and_abs_cx + 4]
shl ecx, 16
add ecx, [putimg.real_sy_and_abs_cy + 4]
sub ecx, edi
 
; check mouse area for putpixel
call check_mouse_area_for_putpixel
pop ecx
; store to real LFB
mov [LFB_BASE+edx], eax
;--------------------------------------
460,8 → 547,66
@@:
mov [EGA_counter], 1
ret
;------------------------------------------------------------------------------
align 4
put_image_end_32_old:
;--------------------------------------
align 4
.new_line:
mov ecx, [putimg.real_sx]
;--------------------------------------
align 4
.new_x:
push [putimg.edi]
mov eax, [putimg.ebp+4]
call eax
cmp [ebp], bl
jne .skip
;--------------------------------------
push ecx
 
neg ecx
add ecx, [putimg.real_sx_and_abs_cx + 4]
shl ecx, 16
add ecx, [putimg.real_sy_and_abs_cy + 4]
sub ecx, edi
 
; check mouse area for putpixel
call check_mouse_area_for_putpixel
pop ecx
; store to real LFB
mov [LFB_BASE+edx], eax
;--------------------------------------
align 4
.skip:
add edx, 4
inc ebp
dec ecx
jnz .new_x
 
add esi, [putimg.line_increment]
add edx, [putimg.screen_newline];[BytesPerScanLine]
add ebp, [putimg.winmap_newline];[Screen_Max_X]
 
cmp [putimg.ebp], putimage_get1bpp
jz .correct
cmp [putimg.ebp], putimage_get2bpp
jz .correct
cmp [putimg.ebp], putimage_get4bpp
jnz @f
;--------------------------------------
align 4
.correct:
mov eax, [putimg.edi]
mov byte [eax], 80h
;--------------------------------------
align 4
@@:
dec edi
jnz .new_line
jmp put_image_end_32.finish
;------------------------------------------------------------------------------
align 4
put_image_end_32_new:
;--------------------------------------
align 4
594,10 → 739,16
shl ecx, 16
mov cx, bx
 
imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
mov ebx, [d_width_calc_area + ebx*4]
lea ebx, [ebx + ebx*2]
 
lea edi, [eax+eax*2]; edi = x*3
mov eax, [esp+32-8+4]
;--------------------------------------
; check for hardware cursor
cmp [_display.select_cursor], 0
jne @f
; check mouse area for putpixel
test eax, 0x04000000
jnz @f
619,10 → 770,16
shl ecx, 16
mov cx, bx
 
imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
mov ebx, [d_width_calc_area + ebx*4]
lea ebx, [ebx + ebx*2]
 
lea edi, [eax+eax*2]; edi = x*3
mov eax, [esp+32-8+4]
;--------------------------------------
; check for hardware cursor
cmp [_display.select_cursor], select_cursor
jne @f
; check mouse area for putpixel
test eax, 0x04000000
jnz @f
661,10 → 818,16
shl ecx, 16
mov cx, bx
 
imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
mov ebx, [d_width_calc_area + ebx*4]
shl ebx, 2
 
lea edi, [ebx+eax*4]; edi = x*4+(y*y multiplier)
mov eax, [esp+32-8+4]; eax = color
;--------------------------------------
; check for hardware cursor
cmp [_display.select_cursor], 0
jne @f
; check mouse area for putpixel
test eax, 0x04000000
jnz @f
685,10 → 848,16
shl ecx, 16
mov cx, bx
 
imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
mov ebx, [d_width_calc_area + ebx*4]
shl ebx, 2
 
lea edi, [ebx+eax*4]; edi = x*4+(y*y multiplier)
mov eax, [esp+32-8+4]; eax = color
;--------------------------------------
; check for hardware cursor
cmp [_display.select_cursor], select_cursor
jne @f
; check mouse area for putpixel
test eax, 0x04000000
jnz @f
720,9 → 889,10
;-----------------------------------------------------------------------------
align 4
calculate_edi:
mov edi, ebx
imul edi, [Screen_Max_X]
add edi, ebx
; mov edi, ebx
; imul edi, [Screen_Max_X]
; add edi, ebx
mov edi, [d_width_calc_area + ebx*4]
add edi, eax
ret
;-----------------------------------------------------------------------------
860,6 → 1030,8
mov ebx, [dl_y1]
shl eax, 16
shl ebx, 16
 
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
;-----------------------------------------------------------------------------
align 4
.draw:
884,8 → 1056,9
@@:
;--------------------------------------
shr ebx, 16
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
call [putpixel]
; and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
; call [putpixel]
call __sys_putpixel
pop ebx eax
add ebx, ebp ; y = y+dy
add eax, esi ; x = x+dx
894,8 → 1067,9
; force last drawn pixel to be at (x2,y2)
mov eax, [dl_x2]
mov ebx, [dl_y2]
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
call [putpixel]
; and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
; call [putpixel]
call __sys_putpixel
;--------------------------------------
align 4
.exit:
920,7 → 1094,11
align 4
@@:
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
call [putpixel]
;--------------------------------------
align 4
@@:
; call [putpixel]
call __sys_putpixel
inc eax
cmp eax, edx
jle @b
943,7 → 1121,11
align 4
@@:
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
call [putpixel]
;--------------------------------------
align 4
@@:
; call [putpixel]
call __sys_putpixel
inc ebx
cmp ebx, edx
jle @b
1055,16 → 1237,29
mov [drbar.line_inc_scr], eax
; pointer to screen
mov edx, [drbar.abs_cy]
imul edx, [BytesPerScanLine]
; imul edx, [BytesPerScanLine]
 
mov edx, [d_width_calc_area + edx*4]
cmp bl, 4
je .32
lea edx, [edx+edx*2]
jmp @f
;-------------------------------------
align 4
.32:
shl edx, 2
;-------------------------------------
align 4
@@:
mov eax, [drbar.abs_cx]
; movzx ebx, byte [ScreenBPP]
; shr ebx, 3
imul eax, ebx
add edx, eax
; pointer to pixel map
mov eax, [drbar.abs_cy]
imul eax, [Screen_Max_X]
add eax, [drbar.abs_cy]
; imul eax, [Screen_Max_X]
; add eax, [drbar.abs_cy]
mov eax, [d_width_calc_area + eax*4]
 
add eax, [drbar.abs_cx]
add eax, [_WinMapAddress]
xchg eax, ebp
1079,26 → 1274,31
add edx, LFB_BASE
;--------------------------------------
; get process number
mov ebx, [CURRENT_TASK]
mov ebx, [CURRENT_TASK] ; bl - process num
mov esi, [drbar.real_sy]
mov eax, [drbar.color] ; BBGGRR00
rol eax, 8
mov bh, al ; 0x80 drawing gradient bars
ror eax, 8
cmp byte [ScreenBPP], 24
jne draw_bar_end_32
;--------------------------------------
align 4
draw_bar_end_24:
mov eax, [drbar.color] ;; BBGGRR00
mov bh, al ;; bh = BB
shr eax, 8 ;; eax = RRGG
; eax - color high RRGG
; eax - color high RRGGBB
; bl - process num
; bh - color low BB
; ecx - temp
; edx - pointer to screen
; esi - counter
; edi - counter
mov esi, [drbar.real_sy]
cmp [_display.select_cursor], 0
jne draw_bar_end_24_new
;--------------------------------------
; check for hardware cursor
mov ecx, [_display.select_cursor]
cmp ecx, select_cursor
je draw_bar_end_24_new
cmp ecx, 0
je draw_bar_end_24_old
;--------------------------------------
align 4
.new_y:
mov edi, [drbar.real_sx]
1108,23 → 1308,10
cmp byte [ebp], bl
jne .skip
;--------------------------------------
push eax
 
mov ecx, [drbar.real_sx_and_abs_cx + 4]
sub ecx, edi
shl ecx, 16
add ecx, [drbar.real_sy_and_abs_cy + 4]
sub ecx, esi
 
shl eax, 8
mov al, bh
; check mouse area for putpixel
call check_mouse_area_for_putpixel
; store to real LFB
mov [edx], ax
shr eax, 16
mov [edx + 2], al
pop eax
;--------------------------------------
align 4
.skip:
1136,16 → 1323,15
; add line
add edx, [drbar.line_inc_scr]
add ebp, [drbar.line_inc_map]
; <Ivan 15.10.04> drawing gradient bars
test eax, 0x00800000
; drawing gradient bars
test bh, 0x80
jz @f
test bh, bh
test al, al
jz @f
dec bh
dec al
;--------------------------------------
align 4
@@:
; </Ivan 15.10.04>
dec esi
jnz .new_y
;--------------------------------------
1155,8 → 1341,56
popad
xor eax, eax
ret
;------------------------------------------------------------------------------
align 4
draw_bar_end_24_old:
;--------------------------------------
align 4
.new_y:
mov edi, [drbar.real_sx]
;--------------------------------------
align 4
.new_x:
cmp byte [ebp], bl
jne .skip
;--------------------------------------
mov ecx, [drbar.real_sx_and_abs_cx]
sub ecx, edi
shl ecx, 16
add ecx, [drbar.real_sy_and_abs_cy]
sub ecx, esi
; check mouse area for putpixel
call check_mouse_area_for_putpixel
; store to real LFB
mov [edx], ax
shr eax, 16
mov [edx + 2], al
mov eax, [drbar.color]
;--------------------------------------
align 4
.skip:
; add pixel
add edx, 3
inc ebp
dec edi
jnz .new_x
; add line
add edx, [drbar.line_inc_scr]
add ebp, [drbar.line_inc_map]
; drawing gradient bars
test bh, 0x80
jz @f
test al, al
jz @f
dec al
;--------------------------------------
align 4
@@:
dec esi
jnz .new_y
jmp draw_bar_end_24.end
;------------------------------------------------------------------------------
align 4
draw_bar_end_24_new:
;--------------------------------------
align 4
1190,24 → 1424,20
jae .no_mouse_area
;--------------------------------------
; check mouse area for putpixel
push eax
 
shl eax, 8
mov al, bh
 
call check_mouse_area_for_putpixel_new.1
; store to real LFB
mov [edx], ax
shr eax, 16
mov [edx + 2], al
pop eax
mov eax, [drbar.color]
jmp .skip
; store to real LFB
;--------------------------------------
align 4
.no_mouse_area:
mov [edx], bh
mov [edx + 1], ax
mov [edx], ax
ror eax, 16
mov [edx + 2], al
rol eax, 16
;--------------------------------------
align 4
.skip:
1219,27 → 1449,35
; add line
add edx, [drbar.line_inc_scr]
add ebp, [drbar.line_inc_map]
; <Ivan 15.10.04> drawing gradient bars
test eax, 0x00800000
; drawing gradient bars
test bh, 0x80
jz @f
test bh, bh
test al, al
jz @f
dec bh
dec al
;--------------------------------------
align 4
@@:
; </Ivan 15.10.04>
dec esi
jnz .new_y
jmp draw_bar_end_24.end
;--------------------------------------
;------------------------------------------------------------------------------
align 4
draw_bar_end_32:
mov eax, [drbar.color] ;; BBGGRR00
mov esi, [drbar.real_sy]
cmp [_display.select_cursor], 0
jne draw_bar_end_32_new
; eax - color high RRGGBB
; bl - process num
; ecx - temp
; edx - pointer to screen
; esi - counter
; edi - counter
;--------------------------------------
; check for hardware cursor
mov ecx, [_display.select_cursor]
cmp ecx, select_cursor
je draw_bar_end_32_new
cmp ecx, 0
je draw_bar_end_32_old
;--------------------------------------
align 4
.new_y:
mov edi, [drbar.real_sx]
1249,19 → 1487,9
cmp byte [ebp], bl
jne .skip
;--------------------------------------
push eax
 
mov ecx, [drbar.real_sx_and_abs_cx + 4]
sub ecx, edi
shl ecx, 16
add ecx, [drbar.real_sy_and_abs_cy + 4]
sub ecx, esi
 
; check mouse area for putpixel
call check_mouse_area_for_putpixel
; store to real LFB
mov [edx], eax
pop eax
mov eax, [drbar.color]
;--------------------------------------
align 4
.skip:
1273,8 → 1501,8
; add line
add edx, [drbar.line_inc_scr]
add ebp, [drbar.line_inc_map]
; <Ivan 15.10.04> drawing gradient bars
test eax, 0x80000000
; drawing gradient bars
test bh, 0x80
jz @f
test al, al
jz @f
1282,7 → 1510,6
;--------------------------------------
align 4
@@:
; </Ivan 15.10.04>
dec esi
jnz .new_y
;--------------------------------------
1299,8 → 1526,55
xor eax, eax
mov [EGA_counter], 1
ret
;------------------------------------------------------------------------------
align 4
draw_bar_end_32_old:
;--------------------------------------
align 4
.new_y:
mov edi, [drbar.real_sx]
;--------------------------------------
align 4
.new_x:
cmp byte [ebp], bl
jne .skip
;--------------------------------------
mov ecx, [drbar.real_sx_and_abs_cx]
sub ecx, edi
shl ecx, 16
add ecx, [drbar.real_sy_and_abs_cy]
sub ecx, esi
 
; check mouse area for putpixel
call check_mouse_area_for_putpixel
; store to real LFB
mov [edx], eax
mov eax, [drbar.color]
;--------------------------------------
align 4
.skip:
; add pixel
add edx, 4
inc ebp
dec edi
jnz .new_x
; add line
add edx, [drbar.line_inc_scr]
add ebp, [drbar.line_inc_map]
; drawing gradient bars
test bh, 0x80
jz @f
test al, al
jz @f
dec al
;--------------------------------------
align 4
@@:
dec esi
jnz .new_y
jmp draw_bar_end_32.end
;------------------------------------------------------------------------------
align 4
draw_bar_end_32_new:
;--------------------------------------
align 4
1334,10 → 1608,9
jae .no_mouse_area
;--------------------------------------
; check mouse area for putpixel
push eax
call check_mouse_area_for_putpixel_new.1
mov [edx], eax
pop eax
mov eax, [drbar.color]
jmp .skip
; store to real LFB
;--------------------------------------
1355,8 → 1628,8
; add line
add edx, [drbar.line_inc_scr]
add ebp, [drbar.line_inc_map]
; <Ivan 15.10.04> drawing gradient bars
test eax, 0x80000000
; drawing gradient bars
test bh, 0x80
jz @f
test al, al
jz @f
1364,7 → 1637,6
;--------------------------------------
align 4
@@:
; </Ivan 15.10.04>
dec esi
jnz .new_y
jmp draw_bar_end_32.end
1380,8 → 1652,20
mov ebp, [draw_data+32+RECT.left] ; x start
; 1) Calculate pointers in WinMapAddress (does pixel belong to OS thread?) [ebp]
; and LFB data (output for our function) [edi]
mov eax, [BytesPerScanLine]
mul ebx
; mov eax, [BytesPerScanLine]
; mul ebx
mov eax, [d_width_calc_area + ebx*4]
cmp [ScreenBPP], byte 32
je .32
lea eax, [eax+eax*2]
jmp @f
;-------------------------------------
align 4
.32:
shl eax, 2
;-------------------------------------
align 4
@@:
xchg ebp, eax
add ebp, eax
add ebp, eax
1437,9 → 1721,21
add ecx, ebx
 
mov eax, [esi]
 
; check for hardware cursor
cmp [_display.select_cursor], select_cursor
je @f
cmp [_display.select_cursor], 0
jne .no_mouseunder
;--------------------------------------
align 4
@@:
and eax, 0xffffff
; check mouse area for putpixel
call [_display.check_mouse]
;--------------------------------------
align 4
.no_mouseunder:
; store to real LFB
mov [edi], ax
shr eax, 16
1513,8 → 1809,21
mov ebp, [draw_data+32+RECT.left] ; x start
; 1) Calculate pointers in WinMapAddress (does pixel belong to OS thread?) [ebp]
; and LFB data (output for our function) [edi]
mov eax, [BytesPerScanLine]
mul ebx
; mov eax, [BytesPerScanLine]
; mul ebx
mov eax, [d_width_calc_area + ebx*4]
cmp [ScreenBPP], byte 32
je .32
lea eax, [eax+eax*2]
jmp @f
;-------------------------------------
align 4
.32:
shl eax, 2
;-------------------------------------
align 4
@@:
 
xchg ebp, eax
add ebp, eax
add ebp, eax
1614,11 → 1923,22
align 4
.novert:
push ecx
; check for hardware cursor
cmp [_display.select_cursor], select_cursor
je @f
cmp [_display.select_cursor], 0
jne .no_mouseunder
;--------------------------------------
align 4
@@:
mov ecx, [esp+20+4] ;x
shl ecx, 16
add ecx, [esp+24+4] ;y
; check mouse area for putpixel
call [_display.check_mouse]
;--------------------------------------
align 4
.no_mouseunder:
; store to real LFB
mov [LFB_BASE+edi], ax
shr eax, 16
/kernel/branches/Kolibri-acpi/video/vga.inc
1,6 → 1,6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;; VGA.INC ;;
380,6 → 380,14
mov ecx, eax
mov eax, [esp+32-8+4] ; color
;--------------------------------------
; check for hardware cursor
cmp [_display.select_cursor], select_cursor
je @f
cmp [_display.select_cursor], 0
jne .no_mouseunder
;--------------------------------------
align 4
@@:
push ecx
shl ecx, 16
mov cx, bx
391,6 → 399,9
align 4
@@:
pop ecx
;--------------------------------------
align 4
.no_mouseunder:
shl ebx, 9
lea ebx, [ebx+ebx*4] ; óìíîæåíèå íà 5
lea edx, [ebx+ecx*4] ; + x*BytesPerPixel (Vesa2.0 32)