Merge branch 'master' into jgrpp

# Conflicts:
#	src/company_cmd.cpp
#	src/core/geometry_func.cpp
#	src/date.cpp
#	src/genworld_gui.cpp
#	src/gfx.cpp
#	src/object_gui.cpp
#	src/openttd.cpp
#	src/settings_type.h
#	src/video/allegro_v.cpp
#	src/video/dedicated_v.cpp
#	src/video/null_v.cpp
#	src/video/sdl2_v.cpp
#	src/video/sdl_v.cpp
#	src/video/win32_v.cpp
This commit is contained in:
Jonathan G Rennison
2021-02-19 15:38:34 +00:00
176 changed files with 4275 additions and 3826 deletions

View File

@@ -165,7 +165,8 @@ struct ValuesInterval {
struct BaseGraphWindow : Window {
protected:
static const int GRAPH_MAX_DATASETS = 64;
static const int GRAPH_AXIS_LINE_COLOUR = PC_BLACK;
static const int GRAPH_AXIS_LINE_COLOUR = GREY_SCALE(1);
static const int GRAPH_ZERO_LINE_COLOUR = GREY_SCALE(8);
static const int GRAPH_NUM_MONTHS = 24; ///< Number of months displayed in the graph.
static const int MIN_GRAPH_NUM_LINES_Y = 9; ///< Minimal number of horizontal lines to draw.
@@ -292,7 +293,7 @@ protected:
static_assert(GRAPH_MAX_DATASETS >= (int)NUM_CARGO && GRAPH_MAX_DATASETS >= (int)MAX_COMPANIES);
assert(this->num_vert_lines > 0);
byte grid_colour = _colour_gradient[COLOUR_GREY][4];
byte grid_colour = GREY_SCALE(3);
/* Rect r will be adjusted to contain just the graph, with labels being
* placed outside the area. */
@@ -352,7 +353,7 @@ protected:
/* Draw the x axis. */
y = x_axis_offset + r.top;
GfxFillRect(r.left, y, r.right, y, GRAPH_AXIS_LINE_COLOUR);
GfxFillRect(r.left, y, r.right, y, GRAPH_ZERO_LINE_COLOUR);
/* Find the largest value that will be drawn. */
if (this->num_on_x_axis == 0) return;