- I think GetScaledWidth/Height rounding should be correct now.

SVN r725 (trunk)
This commit is contained in:
Randy Heit 2008-01-29 18:47:33 +00:00
parent 59801d2b00
commit 17e9a2c8fd

View file

@ -688,11 +688,11 @@ public:
int GetWidth () { return Width; }
int GetHeight () { return Height; }
int GetScaledWidth () { return ((Width<<16) + (xScale>>1)) / xScale; }
int GetScaledHeight () { return ((Height<<16) + (yScale>>1)) / yScale; }
int GetScaledWidth () { int foo = (Width << 17) / xScale; return (foo >> 1) + (foo & 1); }
int GetScaledHeight () { int foo = (Height << 17) / yScale; return (foo >> 1) + (foo & 1); }
int GetScaledLeftOffset () { return ((LeftOffset<<16) + (xScale>>1)) / xScale; }
int GetScaledTopOffset () { return ((TopOffset<<16) + (yScale>>1)) / yScale; }
int GetScaledLeftOffset () { int foo = (LeftOffset << 17) / xScale; return (foo >> 1) + (foo & 1); }
int GetScaledTopOffset () { int foo = (TopOffset << 17) / yScale; return (foo >> 1) + (foo & 1); }
virtual void SetFrontSkyLayer();