fix chart error with fuel range circle and reposition chart slightly so fuel range isn\'t clipped

This commit is contained in:
Kevin Anthoney 2014-07-20 10:17:37 +01:00
parent d6e300aa9c
commit 59b991f414
2 changed files with 4 additions and 4 deletions

View File

@ -1696,7 +1696,7 @@ static NSTimeInterval time_last_frame;
NSPoint maus = [gameView virtualJoystickPosition]; NSPoint maus = [gameView virtualJoystickPosition];
if (gui_screen == GUI_SCREEN_SHORT_RANGE_CHART) if (gui_screen == GUI_SCREEN_SHORT_RANGE_CHART)
{ {
double vadjust = 80; double vadjust = 64;
double hscale = MAIN_GUI_PIXEL_WIDTH / (64.0 * chart_zoom); double hscale = MAIN_GUI_PIXEL_WIDTH / (64.0 * chart_zoom);
double vscale = MAIN_GUI_PIXEL_HEIGHT / (128.0 * chart_zoom); double vscale = MAIN_GUI_PIXEL_HEIGHT / (128.0 * chart_zoom);
NSPoint centre = [self chart_centre_for_zoom: chart_zoom]; NSPoint centre = [self chart_centre_for_zoom: chart_zoom];
@ -1726,7 +1726,7 @@ static NSTimeInterval time_last_frame;
{ {
[gameView resetTypedString]; [gameView resetTypedString];
cursor_coordinates = galaxy_coordinates; cursor_coordinates = galaxy_coordinates;
chart_centre_coordinates = galaxy_coordinates; target_chart_centre = galaxy_coordinates;
found_system_seed = kNilRandomSeed; found_system_seed = kNilRandomSeed;
[UNIVERSE findSystemCoordinatesWithPrefix:@""]; [UNIVERSE findSystemCoordinatesWithPrefix:@""];
moving = YES; moving = YES;

View File

@ -1550,13 +1550,13 @@ static OOTextureSprite *NewTextureSpriteWithDescriptor(NSDictionary *descriptor)
double hcenter = size_in_pixels.width/2.0; double hcenter = size_in_pixels.width/2.0;
double hscale = size_in_pixels.width / (CHART_WIDTH_AT_MAX_ZOOM*zoom); double hscale = size_in_pixels.width / (CHART_WIDTH_AT_MAX_ZOOM*zoom);
double vscale = -size_in_pixels.height / (2*CHART_HEIGHT_AT_MAX_ZOOM*zoom); double vscale = -size_in_pixels.height / (2*CHART_HEIGHT_AT_MAX_ZOOM*zoom);
double vcenter = 10*MAIN_GUI_ROW_HEIGHT; double vcenter = 11*MAIN_GUI_ROW_HEIGHT;
double hoffset = hcenter - chart_centre_coordinates.x*hscale; double hoffset = hcenter - chart_centre_coordinates.x*hscale;
double voffset = size_in_pixels.height - vcenter - chart_centre_coordinates.y*vscale; double voffset = size_in_pixels.height - vcenter - chart_centre_coordinates.y*vscale;
int i; int i;
double distance = 0.0, time = 0.0; double distance = 0.0, time = 0.0;
NSPoint star; NSPoint star;
NSRect clipRect = NSMakeRect(-size_in_pixels.width / 2.0, -4.5 * MAIN_GUI_ROW_HEIGHT, size_in_pixels.width, 18*MAIN_GUI_ROW_HEIGHT); NSRect clipRect = NSMakeRect(x, y + 10*MAIN_GUI_ROW_HEIGHT, size_in_pixels.width, 19*MAIN_GUI_ROW_HEIGHT);
OORouteType advancedNavArrayMode = OPTIMIZED_BY_NONE; OORouteType advancedNavArrayMode = OPTIMIZED_BY_NONE;
BOOL routeExists = NO; BOOL routeExists = NO;