Merge branch 'enhanced_viewport_overlay-sx' into jgrpp

town_gui.cpp updated due to struct CommandContainer change.

Conflicts:
	src/command.cpp
	src/command_type.h
	src/gfxinit.cpp
	src/openttd.cpp
	src/pbs.cpp
	src/saveload/extended_ver_sl.cpp
	src/saveload/extended_ver_sl.h
	src/saveload/saveload.cpp
	src/stdafx.h
	src/train_cmd.cpp
	src/viewport_type.h
	src/window_type.h
This commit is contained in:
Jonathan G Rennison
2015-08-05 21:54:11 +01:00
110 changed files with 3527 additions and 336 deletions

View File

@@ -20,9 +20,34 @@
#include "linkgraph/linkgraph_gui.h"
#include "widgets/smallmap_widget.h"
static const int NUM_NO_COMPANY_ENTRIES = 4; ///< Number of entries in the owner legend that are not companies.
/** Mapping of tile type to importance of the tile (higher number means more interesting to show). */
static const byte _tiletype_importance[] = {
2, // MP_CLEAR
8, // MP_RAILWAY
7, // MP_ROAD
5, // MP_HOUSE
2, // MP_TREES
9, // MP_STATION
2, // MP_WATER
1, // MP_VOID
6, // MP_INDUSTRY
8, // MP_TUNNELBRIDGE
2, // MP_OBJECT
0,
};
/* set up the cargos to be displayed in the smallmap's route legend */
void BuildLinkStatsLegend();
struct TunnelBridgeToMap {
TileIndex from_tile;
TileIndex to_tile;
uint8 colour;
};
typedef SmallVector<TunnelBridgeToMap, 64> TunnelBridgeToMapVector;
void BuildIndustriesLegend();
void ShowSmallMap();
void BuildLandLegend();
@@ -147,7 +172,6 @@ protected:
return Company::IsValidID(_local_company) ? 1U << _local_company : 0xffffffff;
}
void RebuildColourIndexIfNecessary();
uint GetNumberRowsLegend(uint columns) const;
void SelectLegendItem(int click_pos, LegendAndColour *legend, int end_legend_item, int begin_legend_item = 0);
void SwitchMapType(SmallMapType map_type);
@@ -175,6 +199,8 @@ public:
SmallMapWindow(WindowDesc *desc, int window_number);
virtual ~SmallMapWindow() { delete this->overlay; }
static void RebuildColourIndexIfNecessary();
void SmallMapCenterOnCurrentPos();
Point GetStationMiddle(const Station *st) const;