Changes

Jump to: navigation, search

Kempston Mouse

No change in size, 17:32, 8 December 2012
/* Get mouse position on screen */
// get the relative mouse displacement since last call
deltaX = rawX - oldX;
deltaY = rawY - oldY - rawY; // Kempston mouse Y-axis is inverted compared to screen coordinates!
// store raw mouse values
oldX = rawX;
// calculate new unclipped virtual position
virtualX = virtualX + deltaX;
virtualY = virtualY + - deltaY;// Kempston mouse Y-axis is inverted compared to screen coordinates!
// perform clipping
if (virtualX < 0) then virtualX = 0;
8,324
edits