Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 2452 → Rev 2453

/kernel/trunk/data32.inc
164,17 → 164,17
 
 
; mike.dld {
db 0
dd servetable-0x10000
align 4
draw_line dd __sys_draw_line
draw_pointer dd __sys_draw_pointer
;db 0
;dd servetable-0x10000
;align 4
;draw_line dd __sys_draw_line
;draw_pointer dd __sys_draw_pointer
;//mike.dld, 2006-08-02 [
;drawbar dd __sys_drawbar
;drawbar dd __sys_drawbar.forced
drawbar dd vesa20_drawbar
;;drawbar dd __sys_drawbar
;;drawbar dd __sys_drawbar.forced
;drawbar dd vesa20_drawbar
;//mike.dld, 2006-08-02 ]
putpixel dd __sys_putpixel
;putpixel dd __sys_putpixel
; } mike.dld
 
 
/kernel/trunk/gui/button.inc
133,7 → 133,8
call button._.button_dececx
push edi
xor edi, edi
call [draw_line]
; call [draw_line]
call __sys_draw_line
pop edi
add ebx, 0x00010001
dec edx
164,7 → 165,8
xor edi, edi
mov ecx, esi
call button._.incecx
call [draw_line]
; call [draw_line]
call __sys_draw_line
 
; bottom border
movzx edx, word[esp + 4 + 0]
173,7 → 175,8
add ebx, edx
mov ecx, esi
call button._.dececx
call [draw_line]
; call [draw_line]
call __sys_draw_line
 
; left border
pop ebx
188,7 → 191,8
pop edx
mov ecx, esi
call button._.incecx
call [draw_line]
; call [draw_line]
call __sys_draw_line
 
; right border
mov dx, [esp + 4]
198,7 → 202,8
add ebx, 0x00010000
mov ecx, esi
call button._.dececx
call [draw_line]
; call [draw_line]
call __sys_draw_line
 
pop ecx ebx
 
/kernel/trunk/gui/font.inc
77,7 → 77,8
jz .pixloop1end
jnc .nopix
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
call [putpixel]
; call [putpixel]
call __sys_putpixel
jmp .pixloop1cont
;--------------------------------------
align 4
87,7 → 88,8
push ecx
mov ecx, [esp+4+20h+20h]
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
call [putpixel]
; call [putpixel]
call __sys_putpixel
pop ecx
;--------------------------------------
align 4
123,7 → 125,8
shr dl, 1
jnc .nopix2
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
call [putpixel]
; call [putpixel]
call __sys_putpixel
jmp .pixloop2cont
;--------------------------------------
align 4
133,7 → 136,8
push ecx
mov ecx, [esp+12+20h+20h]
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
call [putpixel]
; call [putpixel]
call __sys_putpixel
pop ecx
;--------------------------------------
align 4
/kernel/trunk/gui/skincode.inc
401,7 → 401,8
inc ecx
mov edx, [_skinh]
mov edi, [common_colours+4]; standard grab color
call [drawbar]
; call [drawbar]
call vesa20_drawbar
jmp draw_clientbar
;--------------------------------------
align 4
428,7 → 429,8
mov edi, [esi+WDATA.cl_workarea]
test edi, 0x40000000
jnz _noinside2
call [drawbar]
; call [drawbar]
call vesa20_drawbar
;--------------------------------------
align 4
_noinside2:
/kernel/trunk/gui/window.inc
60,7 → 60,8
 
; type II - only reserve area, no draw
; call sys_window_mouse
call [draw_pointer]
; call [draw_pointer]
call __sys_draw_pointer
jmp .exit
;--------------------------------------
align 4
681,7 → 682,8
test ecx, 1 shl 25
jnz @f
sub ecx, 1 shl 25
call [draw_line]
; call [draw_line]
call __sys_draw_line
;--------------------------------------
align 4
@@:
688,7 → 690,8
; draw bottom border
mov ebx, [esp - 2]
pop bx
call [draw_line]
; call [draw_line]
call __sys_draw_line
 
pop ebx
add ebx, 1 * 65536 - 1
698,12 → 701,14
push eax
rol eax, 16
pop ax
call [draw_line]
; call [draw_line]
call __sys_draw_line
 
; draw right border
mov eax, [esp - 2]
pop ax
call [draw_line]
; call [draw_line]
call __sys_draw_line
 
pop edi ecx ebx eax
ret
760,7 → 765,8
align 4
@@:
and ecx, 0x00ffffff
call [draw_line]
; call [draw_line]
call __sys_draw_line
inc edx
cmp edx, [esp]
jb .next_line
813,7 → 819,8
mov ebx, 21
mov ecx, [esi + WDATA.box.width]
mov edx, [esi + WDATA.box.height]
call [drawbar]
; call [drawbar]
call vesa20_drawbar
;--------------------------------------
align 4
.exit:
871,7 → 878,8
@@:
mov [esi + WDATA.cl_titlebar], ecx
and ecx, 0x00ffffff
call [draw_line]
; call [draw_line]
call __sys_draw_line
inc edx
cmp edx, [esp]
jb .next_line
951,7 → 959,8
mov edx, [esi + WDATA.box.height]
sub ecx, 4
sub edx, 4
call [drawbar]
; call [drawbar]
call vesa20_drawbar
;--------------------------------------
align 4
.exit:
2314,7 → 2323,8
;--------------------------------------
align 4
.exit:
call [draw_pointer]
; call [draw_pointer]
call __sys_draw_pointer
ret
;------------------------------------------------------------------------------
align 4
/kernel/trunk/hid/mousedrv.inc
84,7 → 84,8
pop eax
mov edi, 1 ; force
or ecx, 0x04000000 ; don't save to mouseunder area
call [putpixel]
; call [putpixel]
call __sys_putpixel
pop edx
pop ecx
inc ecx
201,7 → 202,8
mov ecx, [MOUSE_COLOR_MEM]
mov edi, 1 ; force
or ecx, 0x04000000 ; don't save to mouseunder area
call [putpixel]
; call [putpixel]
call __sys_putpixel
pop ecx
mov ebx, [esp+0] ; pure y coord again
mov eax, [esp+4] ; and x
/kernel/trunk/kernel.asm
1042,7 → 1042,8
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
align 32
osloop:
call [draw_pointer]
; call [draw_pointer]
call __sys_draw_pointer
call window_check_events
call mouse_check_events
call checkmisc
1974,7 → 1975,8
mov [current_cursor], esi
@@:
mov [redrawmouse_unconditional], 1
call [draw_pointer]
; call [draw_pointer]
call __sys_draw_pointer
ret
;------------------------------------------------------------------------------
iglobal
3745,13 → 3747,15
cmp [BgrDrawMode], dword 1
jne bgrstr
call vesa20_drawbackground_tiled
call [draw_pointer]
; call [draw_pointer]
call __sys_draw_pointer
ret
;--------------------------------------
align 4
bgrstr:
call vesa20_drawbackground_stretch
call [draw_pointer]
; call [draw_pointer]
call __sys_draw_pointer
ret
;-----------------------------------------------------------------------------
align 4
4523,7 → 4527,8
add ebx, [edi+APPDATA.wnd_clientbox.top]
xor edi, edi ; no force
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
jmp [putpixel]
; jmp [putpixel]
jmp __sys_putpixel
 
align 4
 
4580,7 → 4585,8
add ebx, [esi + APPDATA.wnd_clientbox.top]
add ecx, eax
add edx, ebx
jmp [drawbar]
; jmp [drawbar]
jmp vesa20_drawbar
.drectr:
ret
 
4751,10 → 4757,10
xor edi, edi
add ebx, ebp
mov ecx, edx
jmp [draw_line]
; jmp [draw_line]
jmp __sys_draw_line
 
 
 
align 4
syscall_reserveportarea: ; ReservePortArea and FreePortArea
 
/kernel/trunk/video/blitter.inc
421,7 → 421,8
jnz .outer32
 
.done:
call [draw_pointer]
; call [draw_pointer]
call __sys_draw_pointer
.L57:
add esp, 72
pop ebx
/kernel/trunk/video/vesa20.inc
285,8 → 285,12
;--------------------------------------
put_image_end_24:
mov edi, [putimg.real_sy]
;--------------------------------------
; check for hardware cursor
cmp [_display.select_cursor], 0
jne put_image_end_24_new
je put_image_end_24_old
cmp [_display.select_cursor], select_cursor
je put_image_end_24_new
;--------------------------------------
align 4
.new_line:
300,9 → 304,60
cmp [ebp], bl
jne .skip
;--------------------------------------
; check for hardware cursor
cmp [_display.select_cursor], 0
jne .no_mouseunder
; 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
314,9 → 369,6
; check mouse area for putpixel
call check_mouse_area_for_putpixel
pop ecx
;--------------------------------------
align 4
.no_mouseunder:
; store to real LFB
mov [LFB_BASE+edx], ax
shr eax, 16
349,14 → 401,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
371,10 → 418,6
cmp [ebp], bl
jne .skip
;--------------------------------------
; check for hardware cursor
cmp [_display.select_cursor], select_cursor
jne .no_mouseunder
 
push ecx
mov ecx, [putimg.real_sy_and_abs_cy + 4]
sub ecx, edi
403,9 → 446,6
align 4
.no_mouse_area:
pop ecx
;--------------------------------------
align 4
.no_mouseunder:
; store to real LFB
mov [LFB_BASE+edx], ax
shr eax, 16
443,8 → 483,12
align 4
put_image_end_32:
mov edi, [putimg.real_sy]
;--------------------------------------
; check for hardware cursor
cmp [_display.select_cursor], 0
jne put_image_end_32_new
je put_image_end_32_old
cmp [_display.select_cursor], select_cursor
je put_image_end_32_new
;--------------------------------------
align 4
.new_line:
458,24 → 502,6
cmp [ebp], bl
jne .skip
;--------------------------------------
; check for hardware cursor
cmp [_display.select_cursor], 0
jne .no_mouseunder
 
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
;--------------------------------------
align 4
.no_mouseunder:
; store to real LFB
mov [LFB_BASE+edx], eax
;--------------------------------------
519,8 → 545,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
535,9 → 619,6
cmp [ebp], bl
jne .skip
;--------------------------------------
; check for hardware cursor
cmp [_display.select_cursor], select_cursor
jne .no_mouseunder
push ecx
mov ecx, [putimg.real_sy_and_abs_cy + 4]
sub ecx, edi
566,9 → 647,6
align 4
.no_mouse_area:
pop ecx
;--------------------------------------
align 4
.no_mouseunder:
; store to real LFB
mov [LFB_BASE+edx], eax
;--------------------------------------
975,7 → 1053,8
;--------------------------------------
shr ebx, 16
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
call [putpixel]
; call [putpixel]
call __sys_putpixel
pop ebx eax
add ebx, ebp ; y = y+dy
add eax, esi ; x = x+dx
985,7 → 1064,8
mov eax, [dl_x2]
mov ebx, [dl_y2]
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
call [putpixel]
; call [putpixel]
call __sys_putpixel
;--------------------------------------
align 4
.exit:
1010,7 → 1090,8
align 4
@@:
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
call [putpixel]
; call [putpixel]
call __sys_putpixel
inc eax
cmp eax, edx
jle @b
1033,7 → 1114,8
align 4
@@:
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
call [putpixel]
; call [putpixel]
call __sys_putpixel
inc ebx
cmp ebx, edx
jle @b
1199,8 → 1281,12
; edx - pointer to screen
; esi - counter
; edi - counter
;--------------------------------------
; check for hardware cursor
cmp [_display.select_cursor], 0
jne draw_bar_end_24_new
je draw_bar_end_24_old
cmp [_display.select_cursor], select_cursor
je draw_bar_end_24_new
;--------------------------------------
align 4
.new_y:
1211,21 → 1297,59
cmp byte [ebp], bl
jne .skip
;--------------------------------------
; check for hardware cursor
cmp [_display.select_cursor], 0
jne .no_mouseunder
 
; store to real LFB
mov [edx], ax
shr eax, 16
mov [edx + 2], al
;--------------------------------------
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
;--------------------------------------
align 4
.end:
add esp, drbar.stack_data
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
;--------------------------------------
align 4
.no_mouseunder:
; store to real LFB
mov [edx], ax
shr eax, 16
1253,15 → 1377,9
@@:
dec esi
jnz .new_y
;--------------------------------------
jmp draw_bar_end_24.end
;------------------------------------------------------------------------------
align 4
.end:
add esp, drbar.stack_data
popad
xor eax, eax
ret
;--------------------------------------
align 4
draw_bar_end_24_new:
;--------------------------------------
align 4
1273,10 → 1391,6
cmp byte [ebp], bl
jne .skip
;--------------------------------------
; check for hardware cursor
cmp [_display.select_cursor], select_cursor
jne .no_mouse_area
 
mov ecx, [drbar.real_sy_and_abs_cy]
sub ecx, esi
;--------------------------------------
1336,7 → 1450,7
dec esi
jnz .new_y
jmp draw_bar_end_24.end
;--------------------------------------
;------------------------------------------------------------------------------
align 4
draw_bar_end_32:
; eax - color high RRGGBB
1345,8 → 1459,12
; edx - pointer to screen
; esi - counter
; edi - counter
;--------------------------------------
; check for hardware cursor
cmp [_display.select_cursor], 0
jne draw_bar_end_32_new
je draw_bar_end_32_old
cmp [_display.select_cursor], select_cursor
je draw_bar_end_32_new
;--------------------------------------
align 4
.new_y:
1357,21 → 1475,6
cmp byte [ebp], bl
jne .skip
;--------------------------------------
; check for hardware cursor
cmp [_display.select_cursor], 0
jne .no_mouseunder
 
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
;--------------------------------------
align 4
.no_mouseunder:
; store to real LFB
mov [edx], eax
mov eax, [drbar.color]
1411,8 → 1514,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
1424,10 → 1574,6
cmp byte [ebp], bl
jne .skip
;--------------------------------------
; check for hardware cursor
cmp [_display.select_cursor], select_cursor
jne .no_mouse_area
 
mov ecx, [drbar.real_sy_and_abs_cy]
sub ecx, esi
;--------------------------------------