Changes
/* Get mouse position on screen */
This mouse is supported by [[The OCP Art Studio]], [[The Advanced OCP Art Studio]] and [[Carrier Command]].
It is emulated in [[Arnold (Emulator)|Arnold]] and [http://ace.cpcscene.net/en:downloads ACE].
== Pictures ==
Here is the algorithm in pseudo-code:
# init_mouse initMouse initializes variables and centers the mouse pointer on screen def init_mouseinitMouse(): max_x maxX = 639 max_y maxY = 399
# centering the mouse pointer on the screen
# store raw mouse values
# get mouse pointer position
# get raw mouse values
# get the relative mouse displacement since last call
# store raw mouse values
# calculate new unclipped virtual position
# perform clipping
if virtual_x virtualX < 0: virtual_x virtualX = 0 elif virtual_x virtualX > max_xmaxX: virtual_x virtualX = max_xmaxX if virtual_y virtualY < 0: virtual_y virtualY = 0 elif virtual_y virtualY > max_ymaxY: virtual_y virtualY = max_ymaxY
# now we translate position from the virtual screen to the current CPC screen mode
== Manual ==