Changes
Undo revision 111767 by [[Special:Contributions/Phi2x|Phi2x]] ([[User talk:Phi2x|talk]]) snake case is too ugly
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
# refresh_mouse refreshMouse has to be called before you redraw the mouse pointer (and ideally on every frame) def refresh_mouserefreshMouse():
# 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 ==