stop stars dropping off left of chart before scissor test gets them
This commit is contained in:
parent
24bb7a7870
commit
42ab20b0c4
@ -97,15 +97,16 @@ typedef enum
|
||||
OOLRC_MODE_TECHLEVEL = 3
|
||||
} OOLongRangeChartMode;
|
||||
|
||||
#define CHART_WIDTH_AT_MAX_ZOOM 64.0
|
||||
#define CHART_HEIGHT_AT_MAX_ZOOM 64.0
|
||||
#define CHART_WIDTH_AT_MAX_ZOOM 64.0
|
||||
#define CHART_HEIGHT_AT_MAX_ZOOM 64.0
|
||||
// Galaxy width / width of chart area at max zoom
|
||||
#define CHART_MAX_ZOOM (256.0/CHART_WIDTH_AT_MAX_ZOOM)
|
||||
#define CHART_MAX_ZOOM (256.0/CHART_WIDTH_AT_MAX_ZOOM)
|
||||
//start scrolling when cursor is this number of units away from centre
|
||||
#define CHART_SCROLL_AT_X 25.0
|
||||
#define CHART_SCROLL_AT_Y 31.0
|
||||
#define CHART_SCROLL_AT_X 25.0
|
||||
#define CHART_SCROLL_AT_Y 31.0
|
||||
#define CHART_CLIP_BORDER 10.0
|
||||
|
||||
#define CHART_ZOOM_SHOW_LABELS 2.0
|
||||
#define CHART_ZOOM_SHOW_LABELS 2.0
|
||||
|
||||
// OO_RESOLUTION_OPTION: true if full screen resolution can be changed.
|
||||
#if OOLITE_MAC_OS_X && OOLITE_64_BIT
|
||||
|
@ -1700,7 +1700,7 @@ static OOTextureSprite *NewTextureSpriteWithDescriptor(NSDictionary *descriptor)
|
||||
dx = fabs(chart_centre_coordinates.x - g_seed.d);
|
||||
dy = fabs(chart_centre_coordinates.y - g_seed.b);
|
||||
|
||||
if ((dx > zoom*CHART_WIDTH_AT_MAX_ZOOM/2.0)||(dy > zoom*CHART_HEIGHT_AT_MAX_ZOOM))
|
||||
if ((dx > zoom*(CHART_WIDTH_AT_MAX_ZOOM/2.0 + CHART_CLIP_BORDER))||(dy > zoom*(CHART_HEIGHT_AT_MAX_ZOOM + CHART_CLIP_BORDER)))
|
||||
continue;
|
||||
float blob_size = (4.0f + 0.5f * (g_seed.f & 15))/zoom;
|
||||
if (blob_size < 0.5) blob_size = 0.5;
|
||||
@ -1807,7 +1807,7 @@ static OOTextureSprite *NewTextureSpriteWithDescriptor(NSDictionary *descriptor)
|
||||
dx = fabs(chart_centre_coordinates.x - g_seed.d);
|
||||
dy = fabs(chart_centre_coordinates.y - g_seed.b);
|
||||
|
||||
if (mark && (dx <= zoom*CHART_WIDTH_AT_MAX_ZOOM/2.0)&&(dy <= zoom*CHART_HEIGHT_AT_MAX_ZOOM))
|
||||
if (mark && (dx <= zoom*(CHART_WIDTH_AT_MAX_ZOOM/2.0+CHART_CLIP_BORDER))&&(dy <= zoom*(CHART_HEIGHT_AT_MAX_ZOOM+CHART_CLIP_BORDER)))
|
||||
{
|
||||
star.x = (float)(g_seed.d * hscale + hoffset);
|
||||
star.y = (float)(g_seed.b * vscale + voffset);
|
||||
@ -1848,7 +1848,7 @@ static OOTextureSprite *NewTextureSpriteWithDescriptor(NSDictionary *descriptor)
|
||||
dx = fabs(chart_centre_coordinates.x - sys->seed.d);
|
||||
dy = fabs(chart_centre_coordinates.y - sys->seed.b);
|
||||
|
||||
if ((dx > zoom*CHART_WIDTH_AT_MAX_ZOOM/2.0)||(dy > zoom*CHART_HEIGHT_AT_MAX_ZOOM))
|
||||
if ((dx > zoom*(CHART_WIDTH_AT_MAX_ZOOM/2.0+CHART_CLIP_BORDER))||(dy > zoom*(CHART_HEIGHT_AT_MAX_ZOOM+CHART_CLIP_BORDER)))
|
||||
continue;
|
||||
star.x = (float)(sys->seed.d * hscale + hoffset);
|
||||
star.y = (float)(sys->seed.b * vscale + voffset);
|
||||
|
Loading…
x
Reference in New Issue
Block a user