Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 2465 → Rev 2464

/kernel/branches/Kolibri-acpi/video/cursors.inc
1,6 → 1,6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;;
;; Copyright (C) KolibriOS team 2004-2008. 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,10 → 618,7
sub edx, [y]
mov [_dy], edx
 
; mul dword [BytesPerScanLine]
mov eax, [d_width_calc_area + eax*4]
lea eax, [eax + eax*2]
 
mul dword [BytesPerScanLine]
lea edx, [LFB_BASE+ecx*3]
add edx, eax
mov [cur_saved_base], edx
737,10 → 734,7
sub edx, [y]
mov [_dy], edx
 
; mul dword [BytesPerScanLine]
mov eax, [d_width_calc_area + eax*4]
shl eax, 2
 
mul dword [BytesPerScanLine]
lea edx, [LFB_BASE+eax+ecx*4]
mov [cur_saved_base], edx
 
/kernel/branches/Kolibri-acpi/video/vesa20.inc
1,6 → 1,6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;;
;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;; VESA20.INC ;;
53,14 → 53,6
; 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
67,13 → 59,9
call [_display.check_m_pixel]
test ecx, ecx ;0xff000000
jnz @f
;--------------------------------------
align 4
.no_mouseunder:
;--------------------------------------
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
mov ebx, [d_width_calc_area + ebx*4]
lea ebx, [ebx + ebx*2]
imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
lea edi, [eax+eax*2]; edi = x*3
add edi, ebx ; edi = x*3+(y*y multiplier)
mov ecx, [LFB_BASE+edi]
86,14 → 74,6
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
100,13 → 80,9
call [_display.check_m_pixel]
test ecx, ecx ;0xff000000
jnz @f
;--------------------------------------
align 4
.no_mouseunder:
;--------------------------------------
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
mov ebx, [d_width_calc_area + ebx*4]
shl ebx, 2
imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
lea edi, [ebx+eax*4]; edi = x*4+(y*y multiplier)
mov ecx, [LFB_BASE+edi]
;--------------------------------------
242,31 → 218,16
mov esi, [putimg.pti]
; pointer to screen
mov edx, [putimg.abs_cy]
; 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
@@:
imul edx, [BytesPerScanLine]
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]
mov eax, [d_width_calc_area + eax*4]
 
imul eax, [Screen_Max_X]
add eax, [putimg.abs_cy]
add eax, [putimg.abs_cx]
add eax, [_WinMapAddress]
xchg eax, ebp
285,14 → 246,9
;--------------------------------------
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]
305,60 → 261,6
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
402,9 → 304,14
@@:
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
484,14 → 391,9
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]
504,6 → 406,17
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
;--------------------------------------
547,66 → 460,8
@@:
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
739,16 → 594,10
shl ecx, 16
mov cx, bx
 
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
mov ebx, [d_width_calc_area + ebx*4]
lea ebx, [ebx + ebx*2]
 
imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
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
770,16 → 619,10
shl ecx, 16
mov cx, bx
 
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
mov ebx, [d_width_calc_area + ebx*4]
lea ebx, [ebx + ebx*2]
 
imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
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
818,16 → 661,10
shl ecx, 16
mov cx, bx
 
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
mov ebx, [d_width_calc_area + ebx*4]
shl ebx, 2
 
imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
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
848,16 → 685,10
shl ecx, 16
mov cx, bx
 
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
mov ebx, [d_width_calc_area + ebx*4]
shl ebx, 2
 
imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
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
889,10 → 720,9
;-----------------------------------------------------------------------------
align 4
calculate_edi:
; mov edi, ebx
; imul edi, [Screen_Max_X]
; add edi, ebx
mov edi, [d_width_calc_area + ebx*4]
mov edi, ebx
imul edi, [Screen_Max_X]
add edi, ebx
add edi, eax
ret
;-----------------------------------------------------------------------------
1030,8 → 860,6
mov ebx, [dl_y1]
shl eax, 16
shl ebx, 16
 
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
;-----------------------------------------------------------------------------
align 4
.draw:
1056,9 → 884,8
@@:
;--------------------------------------
shr ebx, 16
; and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
; call [putpixel]
call __sys_putpixel
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
call [putpixel]
pop ebx eax
add ebx, ebp ; y = y+dy
add eax, esi ; x = x+dx
1067,9 → 894,8
; 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]
call __sys_putpixel
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
call [putpixel]
;--------------------------------------
align 4
.exit:
1094,11 → 920,7
align 4
@@:
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
;--------------------------------------
align 4
@@:
; call [putpixel]
call __sys_putpixel
call [putpixel]
inc eax
cmp eax, edx
jle @b
1121,11 → 943,7
align 4
@@:
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
;--------------------------------------
align 4
@@:
; call [putpixel]
call __sys_putpixel
call [putpixel]
inc ebx
cmp ebx, edx
jle @b
1237,29 → 1055,16
mov [drbar.line_inc_scr], eax
; pointer to screen
mov edx, [drbar.abs_cy]
; 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
@@:
imul edx, [BytesPerScanLine]
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]
mov eax, [d_width_calc_area + eax*4]
 
imul eax, [Screen_Max_X]
add eax, [drbar.abs_cy]
add eax, [drbar.abs_cx]
add eax, [_WinMapAddress]
xchg eax, ebp
1274,31 → 1079,26
add edx, LFB_BASE
;--------------------------------------
; get process number
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
mov ebx, [CURRENT_TASK]
cmp byte [ScreenBPP], 24
jne draw_bar_end_32
;--------------------------------------
align 4
draw_bar_end_24:
; eax - color high RRGGBB
mov eax, [drbar.color] ;; BBGGRR00
mov bh, al ;; bh = BB
shr eax, 8 ;; eax = RRGG
; eax - color high RRGG
; 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]
1308,10 → 1108,23
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:
1323,15 → 1136,16
; add line
add edx, [drbar.line_inc_scr]
add ebp, [drbar.line_inc_map]
; drawing gradient bars
test bh, 0x80
; <Ivan 15.10.04> drawing gradient bars
test eax, 0x00800000
jz @f
test al, al
test bh, bh
jz @f
dec al
dec bh
;--------------------------------------
align 4
@@:
; </Ivan 15.10.04>
dec esi
jnz .new_y
;--------------------------------------
1341,56 → 1155,8
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
1424,20 → 1190,24
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
mov eax, [drbar.color]
pop eax
jmp .skip
; store to real LFB
;--------------------------------------
align 4
.no_mouse_area:
mov [edx], ax
ror eax, 16
mov [edx + 2], al
rol eax, 16
mov [edx], bh
mov [edx + 1], ax
;--------------------------------------
align 4
.skip:
1449,35 → 1219,27
; add line
add edx, [drbar.line_inc_scr]
add ebp, [drbar.line_inc_map]
; drawing gradient bars
test bh, 0x80
; <Ivan 15.10.04> drawing gradient bars
test eax, 0x00800000
jz @f
test al, al
test bh, bh
jz @f
dec al
dec bh
;--------------------------------------
align 4
@@:
; </Ivan 15.10.04>
dec esi
jnz .new_y
jmp draw_bar_end_24.end
;------------------------------------------------------------------------------
;--------------------------------------
align 4
draw_bar_end_32:
; eax - color high RRGGBB
; bl - process num
; ecx - temp
; edx - pointer to screen
; esi - counter
; edi - counter
mov eax, [drbar.color] ;; BBGGRR00
mov esi, [drbar.real_sy]
cmp [_display.select_cursor], 0
jne draw_bar_end_32_new
;--------------------------------------
; 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]
1487,9 → 1249,19
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
mov eax, [drbar.color]
pop eax
;--------------------------------------
align 4
.skip:
1501,8 → 1273,8
; add line
add edx, [drbar.line_inc_scr]
add ebp, [drbar.line_inc_map]
; drawing gradient bars
test bh, 0x80
; <Ivan 15.10.04> drawing gradient bars
test eax, 0x80000000
jz @f
test al, al
jz @f
1510,6 → 1282,7
;--------------------------------------
align 4
@@:
; </Ivan 15.10.04>
dec esi
jnz .new_y
;--------------------------------------
1526,55 → 1299,8
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
1608,9 → 1334,10
jae .no_mouse_area
;--------------------------------------
; check mouse area for putpixel
push eax
call check_mouse_area_for_putpixel_new.1
mov [edx], eax
mov eax, [drbar.color]
pop eax
jmp .skip
; store to real LFB
;--------------------------------------
1628,8 → 1355,8
; add line
add edx, [drbar.line_inc_scr]
add ebp, [drbar.line_inc_map]
; drawing gradient bars
test bh, 0x80
; <Ivan 15.10.04> drawing gradient bars
test eax, 0x80000000
jz @f
test al, al
jz @f
1637,6 → 1364,7
;--------------------------------------
align 4
@@:
; </Ivan 15.10.04>
dec esi
jnz .new_y
jmp draw_bar_end_32.end
1652,20 → 1380,8
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, [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
@@:
mov eax, [BytesPerScanLine]
mul ebx
xchg ebp, eax
add ebp, eax
add ebp, eax
1721,21 → 1437,9
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
1809,21 → 1513,8
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, [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
@@:
 
mov eax, [BytesPerScanLine]
mul ebx
xchg ebp, eax
add ebp, eax
add ebp, eax
1923,22 → 1614,11
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-2012. All rights reserved. ;;
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;; VGA.INC ;;
380,14 → 380,6
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
399,9 → 391,6
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)
/kernel/branches/Kolibri-acpi/video/blitter.inc
1,9 → 1,3
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2011-2012. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
struct BLITTER_BLOCK
xmin dd ?
346,9 → 340,7
mov edi, ebp
 
imul edi, [_display.pitch]
; imul ebp, [_display.width]
mov ebp, [d_width_calc_area + ebp*4]
 
imul ebp, [_display.width]
add ebp, ebx
add ebp, [_WinMapAddress]
 
381,19 → 373,11
align 4
.inner32:
cmp [ebp+ecx], bl
jne .skip
jne @F
;--------------------------------------
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]
405,15 → 389,12
; 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
427,8 → 408,7
jnz .outer32
 
.done:
; call [draw_pointer]
call __sys_draw_pointer
call [draw_pointer]
.L57:
add esp, 72
pop ebx
450,7 → 430,7
align 4
.inner24:
cmp [ebp+ecx], bl
jne .skip_1
jne @F
;--------------------------------------
push eax
mov eax, [esi+ecx*4]
457,14 → 437,6
 
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]
476,9 → 448,7
; 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
486,7 → 456,7
pop eax
;--------------------------------------
align 4
.skip_1:
@@:
mov edi, [esp+64]
inc ecx
dec edx
/kernel/branches/Kolibri-acpi/video/vesa12.inc
1,6 → 1,6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;;
;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;; VESA12.INC ;;