Function 34 - who owner the pixel on the screen

git-svn-id: svn://kolibrios.org@2511 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Marat Zakiyanov (Mario79) 2012-03-27 13:25:30 +00:00
parent 8cdca726a0
commit a787d74980
4 changed files with 48 additions and 3 deletions

View File

@ -154,7 +154,7 @@ iglobal
dd undefined_syscall ; 31-reserved
dd undefined_syscall ; 32-reserved
dd undefined_syscall ; 33-reserved
dd undefined_syscall ; 34-reserved
dd syscall_getpixel_WinMap ; 34-GetPixel WinMap
dd syscall_getpixel ; 35-GetPixel
dd syscall_getarea ; 36-GetArea
dd readmousepos ; 37-GetMousePosition_ScreenRelative,.

View File

@ -1723,6 +1723,19 @@ dd 1675
* <20>ਠᮧ¤ ­¨¨ ―ΰ®ζ¥αα /―®β®<CEB2>  β¥<CEB2>γι ο <C2A0>  ­ α«¥¤γ¥βαο ®β
த¨β¥«ο.
======================================================================
========= ”ã­ªæ¨ï 34 - 㧭 âì ª®¬ã ¯à¨­ ¤«¥¦¨â â®çª  íªà ­ . =========
======================================================================
<EFBFBD> à ¬¥âàë:
* eax = 34 - ­®¬¥à ä㭪樨
* ebx = x-ª®®à¤¨­ â  (®â­®á¨â¥«ì­® íªà ­ )
* ecx = y-ª®®à¤¨­ â  (®â­®á¨â¥«ì­® íªà ­ )
‚®§¢à é ¥¬®¥ §­ ç¥­¨¥:
* eax = 0x000000XX - â®çª  ¯à¨­ ¤«¥¦¨â á«®âã ®ª­  N
<20>ਠ­¥ª®à४â­ëå §­ ç¥­¨ïå ebx ¨ ecx äã­ªæ¨ï ¢®§¢à é ¥â 0
* ”ã­ªæ¨ï ¡¥à¥â §­ ç¥­¨ï ¨§ ®¡« á⨠[_WinMapAddress]
======================================================================
============ ”γ­<CEB3>ζ¨ο 35 - ―ΰ®η¨β βμ ζΆ¥β β®η<C2AE>¨ ­  ν<>ΰ ­¥. ============
======================================================================

View File

@ -1701,6 +1701,19 @@ Remarks:
* At process/thread creation the current folder will be inherited
from the parent.
======================================================================
========= Function 34 - who owner the pixel on the screen. ===========
======================================================================
Parameters:
* eax = 34 - function number
* ebx = x-coordinate (relative to the display)
* ecx = y-coordinate (relative to the display)
Returned value:
* eax = 0x000000XX - owner of pixel the slot window N
If incorrect values ebx and ecx then function returns 0
* The function takes the value from the area [_WinMapAddress]
======================================================================
======= Function 35 - read the color of a pixel on the screen. =======
======================================================================

View File

@ -4672,9 +4672,28 @@ syscall_cdaudio: ; CD
call .free
; pop eax
ret
;-----------------------------------------------------------------------------
align 4
syscall_getpixel_WinMap: ; GetPixel WinMap
cmp ebx, [Screen_Max_X]
jbe @f
cmp ecx, [Screen_Max_Y]
jbe @f
xor eax, eax
jmp .store
;--------------------------------------
align 4
@@:
mov eax, [d_width_calc_area + ecx*4]
add eax, [_WinMapAddress]
movzx eax, byte[eax+ebx] ; get value for current point
;--------------------------------------
align 4
.store:
mov [esp + 32], eax
ret
;-----------------------------------------------------------------------------
align 4
syscall_getpixel: ; GetPixel
mov ecx, [Screen_Max_X]
inc ecx