New algorithm of output of a mouse pointer

git-svn-id: svn://kolibrios.org@36 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Marat Zakiyanov (Mario79) 2006-01-13 18:30:12 +00:00
parent e32f2c8d1f
commit 1d998163de
3 changed files with 65 additions and 21 deletions

View File

@ -261,10 +261,13 @@ combine_colors:
__sys_disable_mouse: __sys_disable_mouse:
cli
pushad
cmp dword [0xf204],dword 0 cmp dword [0xf204],dword 0
jne no_mouse_disable je @f
ret
@@:
; cli
pushad
cmp [0x3000],dword 1 cmp [0x3000],dword 1
je disable_m je disable_m
@ -345,39 +348,52 @@ __sys_disable_mouse:
disable_m: disable_m:
cmp dword [0xf204],dword 0 cmp dword [0xf204],dword 0
jne @f jne @f
cli
call draw_mouse_under call draw_mouse_under
sti
; @@: ; @@:
mov [0xf204],dword 1 mov [0xf204],dword 1
; inc dword [0xf204] ; inc dword [0xf204]
@@: @@:
no_mouse_disable: no_mouse_disable:
popad popad
sti ; sti
ret ret
__sys_draw_pointer: __sys_draw_pointer:
cli
pushad
m_pause_1:
cmp [mouse_pause],0 cmp [mouse_pause],0
je @f je @f
; call change_task ret
; jmp m_pause_1
jmp nodmp
@@: @@:
push eax
mov eax,[timer_ticks]
sub eax,[MouseTickCounter]
cmp eax,1
ja @f
pop eax
ret
@@:
mov eax,[timer_ticks]
mov [MouseTickCounter],eax
pop eax
; cli ; cli
pushad
cmp dword [0xf204],dword 0 ; mouse visible ? cmp dword [0xf204],dword 0 ; mouse visible ?
je chms00 je chms00
mov [0xf204], dword 0 mov [0xf204], dword 0
movzx ebx,word [0xfb0c] movzx ebx,word [0xfb0c]
movzx eax,word [0xfb0a] movzx eax,word [0xfb0a]
cli
call save_draw_mouse call save_draw_mouse
sti
nodmu2: nodmu2:
popad popad
sti
ret ret
chms00: chms00:
@ -397,12 +413,11 @@ __sys_draw_pointer:
jmp nodmp jmp nodmp
redrawmouse: redrawmouse:
cli
call draw_mouse_under call draw_mouse_under
call save_draw_mouse call save_draw_mouse
nodmp:
popad
sti sti
nodmp:
popad
; sti
ret ret

View File

@ -2795,27 +2795,36 @@ sys_drawwindow:
cmp edi,0 ; type I - original style cmp edi,0 ; type I - original style
jne nosyswI jne nosyswI
inc [mouse_pause] inc [mouse_pause]
call [disable_mouse]
call sys_set_window call sys_set_window
call [disable_mouse]
call drawwindow_I call drawwindow_I
dec [mouse_pause] dec [mouse_pause]
call [draw_pointer]
ret ret
nosyswI: nosyswI:
cmp edi,1 ; type II - only reserve area, no draw cmp edi,1 ; type II - only reserve area, no draw
jne nosyswII jne nosyswII
inc [mouse_pause] inc [mouse_pause]
call [disable_mouse]
call sys_set_window call sys_set_window
call [disable_mouse]
call sys_window_mouse call sys_window_mouse
dec [mouse_pause] dec [mouse_pause]
call [draw_pointer]
ret ret
nosyswII: nosyswII:
cmp edi,2 ; type III - new style cmp edi,2 ; type III - new style
jne nosyswIII jne nosyswIII
inc [mouse_pause] inc [mouse_pause]
call [disable_mouse]
call sys_set_window call sys_set_window
call [disable_mouse]
call drawwindow_III call drawwindow_III
dec [mouse_pause] dec [mouse_pause]
call [draw_pointer]
ret ret
nosyswIII: nosyswIII:
@ -2834,9 +2843,12 @@ sys_drawwindow:
sti sti
inc [mouse_pause] inc [mouse_pause]
call [disable_mouse]
call sys_set_window call sys_set_window
call [disable_mouse]
call drawwindow_IV call drawwindow_IV
dec [mouse_pause] dec [mouse_pause]
call [draw_pointer]
ret ret
nosyswIV: nosyswIV:
@ -3781,10 +3793,12 @@ drawbackground:
jne bgrstr12 jne bgrstr12
call vga_drawbackground_tiled call vga_drawbackground_tiled
dec [mouse_pause] dec [mouse_pause]
call [draw_pointer]
ret ret
bgrstr12: bgrstr12:
call vga_drawbackground_stretch call vga_drawbackground_stretch
dec [mouse_pause] dec [mouse_pause]
call [draw_pointer]
ret ret
dbrv12: dbrv12:
@ -3794,24 +3808,30 @@ drawbackground:
je dbrv20 je dbrv20
call vesa12_drawbackground call vesa12_drawbackground
dec [mouse_pause] dec [mouse_pause]
call [draw_pointer]
ret ret
dbrv20: dbrv20:
cmp [display_data-12],dword 1 cmp [display_data-12],dword 1
jne bgrstr jne bgrstr
call vesa20_drawbackground_tiled call vesa20_drawbackground_tiled
dec [mouse_pause] dec [mouse_pause]
call [draw_pointer]
ret ret
bgrstr: bgrstr:
call vesa20_drawbackground_stretch call vesa20_drawbackground_stretch
dec [mouse_pause] dec [mouse_pause]
call [draw_pointer]
ret ret
sys_putimage: sys_putimage:
; inc [mouse_pause]
cmp [0xfe0c],word 0x12 cmp [0xfe0c],word 0x12
jne spiv20 jne spiv20
call vga_putimage call vga_putimage
; dec [mouse_pause]
call [draw_pointer]
ret ret
spiv20: spiv20:
cmp [0xfe0c],word 0100000000000000b cmp [0xfe0c],word 0100000000000000b
@ -3819,9 +3839,13 @@ sys_putimage:
cmp [0xfe0c],word 0x13 cmp [0xfe0c],word 0x13
je piv20 je piv20
call vesa12_putimage call vesa12_putimage
; dec [mouse_pause]
call [draw_pointer]
ret ret
piv20: piv20:
call vesa20_putimage call vesa20_putimage
; dec [mouse_pause]
call [draw_pointer]
ret ret
@ -3838,6 +3862,7 @@ __sys_drawbar:
jne sdbv20 jne sdbv20
call vga_drawbar call vga_drawbar
dec [mouse_pause] dec [mouse_pause]
call [draw_pointer]
ret ret
sdbv20: sdbv20:
cmp [0xfe0c],word 0100000000000000b cmp [0xfe0c],word 0100000000000000b
@ -3846,10 +3871,12 @@ __sys_drawbar:
je dbv20 je dbv20
call vesa12_drawbar call vesa12_drawbar
dec [mouse_pause] dec [mouse_pause]
call [draw_pointer]
ret ret
dbv20: dbv20:
call vesa20_drawbar call vesa20_drawbar
dec [mouse_pause] dec [mouse_pause]
call [draw_pointer]
ret ret
@ -4886,6 +4913,7 @@ active_process dd 0
active_process_flag db 0 active_process_flag db 0
deleted_process dd 0 deleted_process dd 0
mouse_pause dd 0 mouse_pause dd 0
MouseTickCounter dd 0
ps2_mouse_detected db 0 ps2_mouse_detected db 0
com1_mouse_detected db 0 com1_mouse_detected db 0
com2_mouse_detected db 0 com2_mouse_detected db 0

View File

@ -377,7 +377,7 @@ ret
align 4 align 4
__sys_draw_line: __sys_draw_line:
inc [mouse_pause] ; inc [mouse_pause]
call [disable_mouse] call [disable_mouse]
; draw a line ; draw a line
@ -513,7 +513,8 @@ align 4
.exit: .exit:
add esp, 6*4 add esp, 6*4
popa popa
dec [mouse_pause] ; dec [mouse_pause]
call [draw_pointer]
ret ret