Import combined Enhanced viewport: zoom out, overlays & tooltips (r53_27127) patch

https://www.tt-forums.net/viewtopic.php?f=33&t=53394
This commit is contained in:
patch-import
2015-08-02 19:37:42 +01:00
committed by Jonathan G Rennison
parent fd3388467f
commit 536a95dfd0
105 changed files with 3509 additions and 325 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);
@@ -176,6 +200,8 @@ public:
SmallMapWindow(WindowDesc *desc, int window_number);
virtual ~SmallMapWindow() { delete this->overlay; }
static void RebuildColourIndexIfNecessary();
void SmallMapCenterOnCurrentPos();
Point GetStationMiddle(const Station *st) const;