Align the space origin on a whole pixel: fixes dancing Sa-Matra on slow flybys (part of bug #685); this does not resolve the object positioning jitter completely
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2826 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -324,10 +324,12 @@ CalcView (POINT *pNewScrollPt, SIZE next_reduction,
|
|||||||
&& zoom_out - next_reduction > ZOOM_JUMP)
|
&& zoom_out - next_reduction > ZOOM_JUMP)
|
||||||
next_reduction = zoom_out - ZOOM_JUMP;
|
next_reduction = zoom_out - ZOOM_JUMP;
|
||||||
|
|
||||||
SpaceOrg.x = (int)(LOG_SPACE_WIDTH >> 1)
|
// Always align the origin on a whole pixel to reduce the
|
||||||
- (LOG_SPACE_WIDTH * next_reduction / (MAX_ZOOM_OUT << 2));
|
// amount of object positioning jitter
|
||||||
SpaceOrg.y = (int)(LOG_SPACE_HEIGHT >> 1)
|
SpaceOrg.x = DISPLAY_ALIGN((int)(LOG_SPACE_WIDTH >> 1) -
|
||||||
- (LOG_SPACE_HEIGHT * next_reduction / (MAX_ZOOM_OUT << 2));
|
(LOG_SPACE_WIDTH * next_reduction / (MAX_ZOOM_OUT << 2)));
|
||||||
|
SpaceOrg.y = DISPLAY_ALIGN((int)(LOG_SPACE_HEIGHT >> 1) -
|
||||||
|
(LOG_SPACE_HEIGHT * next_reduction / (MAX_ZOOM_OUT << 2)));
|
||||||
}
|
}
|
||||||
zoom_out = next_reduction;
|
zoom_out = next_reduction;
|
||||||
view_state = VIEW_CHANGE;
|
view_state = VIEW_CHANGE;
|
||||||
|
|||||||
Reference in New Issue
Block a user