From 59b991f414ebd7234c09a669e8ab4aae1f66856e Mon Sep 17 00:00:00 2001 From: Kevin Anthoney Date: Sun, 20 Jul 2014 10:17:37 +0100 Subject: [PATCH] fix chart error with fuel range circle and reposition chart slightly so fuel range isn\'t clipped --- src/Core/Entities/PlayerEntityControls.m | 4 ++-- src/Core/GuiDisplayGen.m | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Core/Entities/PlayerEntityControls.m b/src/Core/Entities/PlayerEntityControls.m index a3bf2c7e..aac5295e 100644 --- a/src/Core/Entities/PlayerEntityControls.m +++ b/src/Core/Entities/PlayerEntityControls.m @@ -1696,7 +1696,7 @@ static NSTimeInterval time_last_frame; NSPoint maus = [gameView virtualJoystickPosition]; 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 vscale = MAIN_GUI_PIXEL_HEIGHT / (128.0 * chart_zoom); NSPoint centre = [self chart_centre_for_zoom: chart_zoom]; @@ -1726,7 +1726,7 @@ static NSTimeInterval time_last_frame; { [gameView resetTypedString]; cursor_coordinates = galaxy_coordinates; - chart_centre_coordinates = galaxy_coordinates; + target_chart_centre = galaxy_coordinates; found_system_seed = kNilRandomSeed; [UNIVERSE findSystemCoordinatesWithPrefix:@""]; moving = YES; diff --git a/src/Core/GuiDisplayGen.m b/src/Core/GuiDisplayGen.m index d71897d7..448d4a5b 100644 --- a/src/Core/GuiDisplayGen.m +++ b/src/Core/GuiDisplayGen.m @@ -1550,13 +1550,13 @@ static OOTextureSprite *NewTextureSpriteWithDescriptor(NSDictionary *descriptor) double hcenter = size_in_pixels.width/2.0; 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 vcenter = 10*MAIN_GUI_ROW_HEIGHT; + double vcenter = 11*MAIN_GUI_ROW_HEIGHT; double hoffset = hcenter - chart_centre_coordinates.x*hscale; double voffset = size_in_pixels.height - vcenter - chart_centre_coordinates.y*vscale; int i; double distance = 0.0, time = 0.0; 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; BOOL routeExists = NO;