src/viewport.cpp
branchcpp_gui
changeset 6259 0f36789984b1
parent 6258 a2f86b8fd99b
child 6263 19dab6a68886
equal deleted inserted replaced
6258:a2f86b8fd99b 6259:0f36789984b1
   325 	int a,b;
   325 	int a,b;
   326 	uint z;
   326 	uint z;
   327 
   327 
   328 	if ( (uint)(x -= vp->left) >= (uint)vp->width ||
   328 	if ( (uint)(x -= vp->left) >= (uint)vp->width ||
   329 				(uint)(y -= vp->top) >= (uint)vp->height) {
   329 				(uint)(y -= vp->top) >= (uint)vp->height) {
   330 				Point pt = {-1, -1};
   330 				Point pt(-1, -1);
   331 				return pt;
   331 				return pt;
   332 	}
   332 	}
   333 
   333 
   334 	x = ((x << vp->zoom) + vp->virtual_left) >> 2;
   334 	x = ((x << vp->zoom) + vp->virtual_left) >> 2;
   335 	y = ((y << vp->zoom) + vp->virtual_top) >> 1;
   335 	y = ((y << vp->zoom) + vp->virtual_top) >> 1;