Subversion Repositories Kolibri OS

Rev

Rev 1859 | Rev 1929 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1859 Rev 1899
Line 516... Line 516...
516
;? mouse cursor within its bounds
516
;? mouse cursor within its bounds
517
;------------------------------------------------------------------------------
517
;------------------------------------------------------------------------------
518
;< esi = process slot
518
;< esi = process slot
519
;< edi = pointer to WDATA struct
519
;< edi = pointer to WDATA struct
520
;------------------------------------------------------------------------------
520
;------------------------------------------------------------------------------
521
	mov	esi, [Screen_Max_X]
521
	mov	esi, [mouse.state.pos.y]
-
 
522
        mov     edi, [mouse.state.pos.x]
522
	inc	esi
523
        shr     esi, 1
-
 
524
        shr     edi, 2
523
	imul	esi, [mouse.state.pos.y]
525
	imul	esi, [_WinMapWidth]
524
	add	esi, [_WinMapAddress]
526
	add	edi, [_WinMapAddress]
525
	add	esi, [mouse.state.pos.x]
527
	add	esi, edi
526
	movzx	esi, byte[esi]
528
	movzx	esi, byte[esi]
527
	mov	edi, esi
529
	mov	edi, esi
528
	shl	edi, 5
530
	shl	edi, 5
529
	add	edi, window_data
531
	add	edi, window_data
530
	ret
532
	ret