Fix the reachable Hyperspace coordinates regression introduced by rounding error correction in r3162; also remove the ?: operator from the affected constants to keep it clean, since we will never invert the axes
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3601 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
+9
-6
@@ -92,14 +92,17 @@ extern int ScreenHeight;
|
|||||||
|
|
||||||
#define MAX_X_UNIVERSE 9999
|
#define MAX_X_UNIVERSE 9999
|
||||||
#define MAX_Y_UNIVERSE 9999
|
#define MAX_Y_UNIVERSE 9999
|
||||||
|
// Due to the added rounding error correction, the maximum logical X and Y
|
||||||
|
// in Hyperspace cannot go past 999.94999, otherwise the values will be
|
||||||
|
// rounded up to 1000.0. We do not want that so we subtract half a unit.
|
||||||
#define MAX_X_LOGICAL \
|
#define MAX_X_LOGICAL \
|
||||||
((UNIVERSE_TO_LOGX (MAX_X_UNIVERSE + 1) > UNIVERSE_TO_LOGX (-1) ? \
|
(UNIVERSE_TO_LOGX (MAX_X_UNIVERSE + 1) - (UNIVERSE_TO_LOGX (1) >> 1) \
|
||||||
UNIVERSE_TO_LOGX (MAX_X_UNIVERSE + 1) : UNIVERSE_TO_LOGX (-1)) \
|
- 1L)
|
||||||
- 1L)
|
// The Y axis is inverted with respect to the screen Y axis.
|
||||||
|
// (MAX_Y_UNIVERSE - 1) is really 1 for our purposes.
|
||||||
#define MAX_Y_LOGICAL \
|
#define MAX_Y_LOGICAL \
|
||||||
((UNIVERSE_TO_LOGY (MAX_Y_UNIVERSE + 1) > UNIVERSE_TO_LOGY (-1) ? \
|
(UNIVERSE_TO_LOGY (-1) - (UNIVERSE_TO_LOGY (MAX_Y_UNIVERSE - 1) >> 1) \
|
||||||
UNIVERSE_TO_LOGY (MAX_Y_UNIVERSE + 1) : UNIVERSE_TO_LOGY (-1)) \
|
- 1L)
|
||||||
- 1L)
|
|
||||||
|
|
||||||
#define SPHERE_RADIUS_INCREMENT 11
|
#define SPHERE_RADIUS_INCREMENT 11
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user