Changes
/* Get mouse position on screen */
Here is the algorithm in pseudo-code:
# initMouse init_mouse initializes variables and centers the mouse pointer on screen def initMouseinit_mouse(): maxX max_x = 639 maxY max_y = 399
# centering the mouse pointer on the screen
# store raw mouse values
# get mouse pointer position
# refreshMouse refresh_mouse has to be called before you redraw the mouse pointer (and ideally on every frame) def refreshMouserefresh_mouse():
# get raw mouse values
# get the relative mouse displacement since last call
# store raw mouse values
# calculate new unclipped virtual position
# perform clipping
if virtualX virtual_x < 0: virtualX virtual_x = 0 elif virtualX virtual_x > maxXmax_x: virtualX virtual_x = maxXmax_x if virtualY virtual_y < 0: virtualY virtual_y = 0 elif virtualY virtual_y > maxYmax_y: virtualY virtual_y = maxYmax_y
# now we translate position from the virtual screen to the current CPC screen mode
== Manual ==