# smallmap_gui.cpp File Reference

GUI that shows a small map of the world with metadata like owner or height. More...

`#include "stdafx.h"`
`#include "clear_map.h"`
`#include "industry.h"`
`#include "station_map.h"`
`#include "landscape.h"`
`#include "window_gui.h"`
`#include "tree_map.h"`
`#include "viewport_func.h"`
`#include "town.h"`
`#include "blitter/factory.hpp"`
`#include "tunnelbridge_map.h"`
`#include "strings_func.h"`
`#include "core/endian_func.hpp"`
`#include "vehicle_base.h"`
`#include "sound_func.h"`
`#include "window_func.h"`
`#include "company_base.h"`
`#include "table/strings.h"`
`#include "table/sprites.h"`

Go to the source code of this file.

## Data Structures
struct | LegendAndColour
| Structure for holding relevant data for legends in small map. More...
struct | SmallMapColourScheme
| Colour scheme of the smallmap. More...
struct | AndOr
class | SmallMapWindow
| Class managing the smallmap window. More...
class | NWidgetSmallmapDisplay
| Custom container class for displaying smallmap with a vertically resizing legend panel. More...
## Defines
#define | MK(a, b) {a, b, INVALID_INDUSTRYTYPE, true, false, false}
| Macro for ordinary entry of LegendAndColour.
#define | MC(b) MK(0, b)
| Macro for an entry with configurable colour.
#define | MKEND() {0, STR_NULL, INVALID_INDUSTRYTYPE, true, true, false}
| Macro for end of list marker in arrays of LegendAndColour.
#define | MS(a, b) {a, b, INVALID_INDUSTRYTYPE, true, false, true}
| Macro for break marker in arrays of LegendAndColour.
#define | MKCOLOUR(x) TO_LE32X(x)
## Enumerations
enum | SmallMapWindowWidgets { SM_WIDGET_CAPTION, SM_WIDGET_MAP_BORDER, SM_WIDGET_MAP, SM_WIDGET_LEGEND, SM_WIDGET_ZOOM_IN, SM_WIDGET_ZOOM_OUT, SM_WIDGET_CONTOUR, SM_WIDGET_VEHICLES, SM_WIDGET_INDUSTRIES, SM_WIDGET_ROUTES, SM_WIDGET_VEGETATION, SM_WIDGET_OWNERS, SM_WIDGET_CENTERMAP, SM_WIDGET_TOGGLETOWNNAME, SM_WIDGET_SELECTINDUSTRIES, SM_WIDGET_ENABLEINDUSTRIES, SM_WIDGET_DISABLEINDUSTRIES, SM_WIDGET_SHOW_HEIGHT }
| Widget numbers of the small map window. More...
## Functions
void | BuildIndustriesLegend ()
| Fills an array for the industries legends.
| assert_compile (lengthof(_green_map_heights)==MAX_TILE_HEIGHT+1)
| assert_compile (lengthof(_dark_green_map_heights)==MAX_TILE_HEIGHT+1)
| assert_compile (lengthof(_violet_map_heights)==MAX_TILE_HEIGHT+1)
void | BuildLandLegend ()
static uint32 | ApplyMask (uint32 colour, const AndOr *mask)
static TileType | GetEffectiveTileType (TileIndex tile)
static uint32 | GetSmallMapContoursPixels (TileIndex tile, TileType t)
| Return the colour a tile would be displayed with in the small map in mode "Contour".
static uint32 | GetSmallMapVehiclesPixels (TileIndex tile, TileType t)
| Return the colour a tile would be displayed with in the small map in mode "Vehicles".
static uint32 | GetSmallMapIndustriesPixels (TileIndex tile, TileType t)
| Return the colour a tile would be displayed with in the small map in mode "Industries".
static uint32 | GetSmallMapRoutesPixels (TileIndex tile, TileType t)
| Return the colour a tile would be displayed with in the small map in mode "Routes".
static uint32 | GetSmallMapVegetationPixels (TileIndex tile, TileType t)
| Return the colour a tile would be displayed with in the smallmap in mode "Vegetation".
static uint32 | GetSmallMapOwnerPixels (TileIndex tile, TileType t)
| Return the colour a tile would be displayed with in the small map in mode "Owner".
static NWidgetBase * | SmallMapDisplay (int *biggest_index)
void | ShowSmallMap ()
bool | ScrollMainWindowTo (int x, int y, int z, bool instant)
| Scrolls the main window to given coordinates.
## Variables
static int | _smallmap_industry_count
| Number of used industries.
static LegendAndColour | _legend_land_contours []
| Legend text giving the colours to look for on the minimap.
static const LegendAndColour | _legend_vehicles []
static const LegendAndColour | _legend_routes []
static const LegendAndColour | _legend_vegetation []
static const LegendAndColour | _legend_land_owners []
static LegendAndColour | _legend_from_industries [NUM_INDUSTRYTYPES+1]
| Allow room for all industries, plus a terminator entry This is required in order to have the indutry slots all filled up.
static uint | _industry_to_list_pos [NUM_INDUSTRYTYPES]
static bool | _smallmap_industry_show_heightmap
| Show heightmap in industry mode of smallmap window.
static const LegendAndColour *const | _legend_table []
static const uint32 | _green_map_heights []
| Height map colours for the green colour scheme, ordered by height.
static const uint32 | _dark_green_map_heights []
| Height map colours for the dark green colour scheme, ordered by height.
static const uint32 | _violet_map_heights []
| Height map colours for the violet colour scheme, ordered by height.
static const SmallMapColourScheme | _heightmap_schemes []
| Available colour schemes for height maps.
static const AndOr | _smallmap_contours_andor []
| Colour masks for "Contour" and "Routes" modes.
static const AndOr | _smallmap_vehicles_andor []
| Colour masks for "Vehicles", "Industry", and "Vegetation" modes.
static const byte | _tiletype_importance []
| Mapping of tile type to importance of the tile (higher number means more interesting to show).
static const uint32 | _vegetation_clear_bits []
static uint32 | _owner_colours [OWNER_END+1]
static const byte | _vehicle_type_colours [6]
| Vehicle colours in SMT_VEHICLES mode.
static const NWidgetPart | _nested_smallmap_display []
| Widget parts of the smallmap display.
static const NWidgetPart | _nested_smallmap_bar []
| Widget parts of the smallmap legend bar + image buttons.
static const NWidgetPart | _nested_smallmap_widgets []
static const WindowDesc | _smallmap_desc (WDP_AUTO, 446, 314, WC_SMALLMAP, WC_NONE, WDF_UNCLICK_BUTTONS, _nested_smallmap_widgets, lengthof(_nested_smallmap_widgets))

## Detailed Description

GUI that shows a small map of the world with metadata like owner or height.

Definition in file smallmap_gui.cpp.

## Define Documentation

#define MC | ( | b |  | ) | MK(0, b)

Macro for an entry with configurable colour.

Definition at line 60 of file smallmap_gui.cpp.

#define MS | ( | a,
|  | b |  | ) | {a, b, INVALID_INDUSTRYTYPE, true, false, true}

Macro for break marker in arrays of LegendAndColour.

It will have valid data, though

Definition at line 65 of file smallmap_gui.cpp.

## Enumeration Type Documentation

enum SmallMapWindowWidgets

Widget numbers of the small map window.

Enumerator:

  SM_WIDGET_CAPTION | Caption widget.
  SM_WIDGET_MAP_BORDER | Border around the smallmap.
  SM_WIDGET_MAP | Panel containing the smallmap.
  SM_WIDGET_LEGEND | Bottom panel to display smallmap legends.
  SM_WIDGET_ZOOM_IN | Button to zoom in one step.
  SM_WIDGET_ZOOM_OUT | Button to zoom out one step.
  SM_WIDGET_CONTOUR | Button to select the contour view (height map).
  SM_WIDGET_VEHICLES | Button to select the vehicles view.
  SM_WIDGET_INDUSTRIES | Button to select the industries view.
  SM_WIDGET_ROUTES | Button to select the routes view.
  SM_WIDGET_VEGETATION | Button to select the vegetation view.
  SM_WIDGET_OWNERS | Button to select the owners view.
  SM_WIDGET_CENTERMAP | Button to move smallmap center to main window center.
  SM_WIDGET_TOGGLETOWNNAME | Toggle button to display town names.
  SM_WIDGET_SELECTINDUSTRIES | Selection widget for the buttons at the industry mode.
  SM_WIDGET_ENABLEINDUSTRIES | Button to enable display of all industries.
  SM_WIDGET_DISABLEINDUSTRIES | Button to disable display of all industries.
  SM_WIDGET_SHOW_HEIGHT | Show heightmap toggle button.

Definition at line 34 of file smallmap_gui.cpp.

## Function Documentation

static uint32 GetSmallMapContoursPixels | ( | TileIndex | tile,
|  | TileType | t |
| ) |  |  | `[inline, static]`

Return the colour a tile would be displayed with in the small map in mode "Contour".

Parameters:

  | tile | The tile of which we would like to get the colour.
  | t | Effective tile type of the tile (see GetEffectiveTileType).

Returns:
  The colour of tile in the small map in mode "Contour"

Definition at line 362 of file smallmap_gui.cpp.

References _settings_client, ClientSettings::gui, SmallMapColourScheme::height_colours, GUISettings::smallmap_land_colour, and TileHeight().

Referenced by SmallMapWindow::GetTileColours().

static uint32 GetSmallMapIndustriesPixels | ( | TileIndex | tile,
|  | TileType | t |
| ) |  |  | `[inline, static]`

Return the colour a tile would be displayed with in the small map in mode "Industries".

Parameters:

  | tile | The tile of which we would like to get the colour.
  | t | Effective tile type of the tile (see GetEffectiveTileType).

Returns:
  The colour of tile in the small map in mode "Industries"

Definition at line 388 of file smallmap_gui.cpp.

References _settings_client, _smallmap_industry_show_heightmap, SmallMapColourScheme::default_colour, Industry::GetByTile(), GetIndustrySpec(), ClientSettings::gui, SmallMapColourScheme::height_colours, IndustrySpec::map_colour, MP_CLEAR, MP_INDUSTRY, GUISettings::smallmap_land_colour, and TileHeight().

Referenced by SmallMapWindow::GetTileColours().

static uint32 GetSmallMapOwnerPixels | ( | TileIndex | tile,
|  | TileType | t |
| ) |  |  | `[inline, static]`

Return the colour a tile would be displayed with in the small map in mode "Owner".

Parameters:

  | tile | The tile of which we would like to get the colour.
  | t | Effective tile type of the tile (see GetEffectiveTileType).

Returns:
  The colour of tile in the small map in mode "Owner"

Definition at line 486 of file smallmap_gui.cpp.

References GetTileOwner(), MP_HOUSE, MP_INDUSTRY, OWNER_END, and OWNER_TOWN.

Referenced by SmallMapWindow::GetTileColours().

static uint32 GetSmallMapRoutesPixels | ( | TileIndex | tile,
|  | TileType | t |
| ) |  |  | `[inline, static]`

Return the colour a tile would be displayed with in the small map in mode "Routes".

Parameters:

  | tile | The tile of which we would like to get the colour.
  | t | Effective tile type of the tile (see GetEffectiveTileType).

Returns:
  The colour of tile in the small map in mode "Routes"

Definition at line 411 of file smallmap_gui.cpp.

References _settings_client, SmallMapColourScheme::default_colour, GetRailType(), GetRailTypeInfo(), GetStationType(), ClientSettings::gui, RailtypeInfo::map_colour, MP_RAILWAY, MP_STATION, and GUISettings::smallmap_land_colour.

Referenced by SmallMapWindow::GetTileColours().

static uint32 GetSmallMapVegetationPixels | ( | TileIndex | tile,
|  | TileType | t |
| ) |  |  | `[inline, static]`

Return the colour a tile would be displayed with in the smallmap in mode "Vegetation".

Parameters:

  | tile | The tile of which we would like to get the colour.
  | t | Effective tile type of the tile (see GetEffectiveTileType).

Returns:
  The colour of tile in the smallmap in mode "Vegetation"

Definition at line 456 of file smallmap_gui.cpp.

References _settings_game, CHECK_FOREST, IndustrySpec::check_proc, CLEAR_GRASS, GameSettings::game_creation, Industry::GetByTile(), GetClearDensity(), GetClearGround(), GetIndustrySpec(), GetTreeGround(), IsClearGround(), GameCreationSettings::landscape, MP_CLEAR, MP_INDUSTRY, MP_TREES, TREE_GROUND_ROUGH_SNOW, and TREE_GROUND_SNOW_DESERT.

Referenced by SmallMapWindow::GetTileColours().

static uint32 GetSmallMapVehiclesPixels | ( | TileIndex | tile,
|  | TileType | t |
| ) |  |  | `[inline, static]`

Return the colour a tile would be displayed with in the small map in mode "Vehicles".

Parameters:

  | tile | The tile of which we would like to get the colour.
  | t | Effective tile type of the tile (see GetEffectiveTileType).

Returns:
  The colour of tile in the small map in mode "Vehicles"

Definition at line 375 of file smallmap_gui.cpp.

References _settings_client, SmallMapColourScheme::default_colour, ClientSettings::gui, and GUISettings::smallmap_land_colour.

Referenced by SmallMapWindow::GetTileColours().

bool ScrollMainWindowTo | ( | int | x,
|  | int | y,
|  | int | z,
|  | bool | instant |
| ) |  |  |

Scrolls the main window to given coordinates.

Parameters:

  | x | x coordinate
  | y | y coordinate
  | z | z coordinate; -1 to scroll to terrain height
  | instant | scroll instantly (meaningful only when smooth_scrolling is active)

Returns:
  did the viewport position change?

Definition at line 1504 of file smallmap_gui.cpp.

References FindWindowById(), and ScrollWindowTo().

Referenced by VehicleViewWindow::OnClick(), NewsWindow::OnClick(), and MainWindow::OnKeyPress().

## Variable Documentation

const uint32 _dark_green_map_heights[]`[static]`

Initial value:

     {
      MKCOLOUR(0x60606060),
      MKCOLOUR(0x60616061),
      MKCOLOUR(0x61616161),
      MKCOLOUR(0x61626162),
      MKCOLOUR(0x62626262),
      MKCOLOUR(0x62636263),
      MKCOLOUR(0x63636363),
      MKCOLOUR(0x63646364),
      MKCOLOUR(0x64646464),
      MKCOLOUR(0x64656465),
      MKCOLOUR(0x65656565),
      MKCOLOUR(0x65666566),
      MKCOLOUR(0x66666666),
      MKCOLOUR(0x66676667),
      MKCOLOUR(0x67676767),
      MKCOLOUR(0x67676767),
    }

Height map colours for the dark green colour scheme, ordered by height.

Definition at line 217 of file smallmap_gui.cpp.

const uint32 _green_map_heights[]`[static]`

Initial value:

     {
      MKCOLOUR(0x5A5A5A5A),
      MKCOLOUR(0x5A5B5A5B),
      MKCOLOUR(0x5B5B5B5B),
      MKCOLOUR(0x5B5C5B5C),
      MKCOLOUR(0x5C5C5C5C),
      MKCOLOUR(0x5C5D5C5D),
      MKCOLOUR(0x5D5D5D5D),
      MKCOLOUR(0x5D5E5D5E),
      MKCOLOUR(0x5E5E5E5E),
      MKCOLOUR(0x5E5F5E5F),
      MKCOLOUR(0x5F5F5F5F),
      MKCOLOUR(0x5F1F5F1F),
      MKCOLOUR(0x1F1F1F1F),
      MKCOLOUR(0x1F271F27),
      MKCOLOUR(0x27272727),
      MKCOLOUR(0x27272727),
    }

Height map colours for the green colour scheme, ordered by height.

Definition at line 196 of file smallmap_gui.cpp.

const SmallMapColourScheme _heightmap_schemes[]`[static]`

Initial value:

     {
      {_green_map_heights,      MKCOLOUR(0x54545454)},
      {_dark_green_map_heights, MKCOLOUR(0x62626262)},
      {_violet_map_heights,     MKCOLOUR(0x82828282)},
    }

Available colour schemes for height maps.

Definition at line 265 of file smallmap_gui.cpp.

LegendAndColour _legend_land_contours[]`[static]`

Initial value:

     {

      MC(STR_SMALLMAP_LEGENDA_100M),
      MC(STR_SMALLMAP_LEGENDA_200M),
      MC(STR_SMALLMAP_LEGENDA_300M),
      MC(STR_SMALLMAP_LEGENDA_400M),
      MC(STR_SMALLMAP_LEGENDA_500M),

      MS(0xD7, STR_SMALLMAP_LEGENDA_ROADS),
      MK(0x0A, STR_SMALLMAP_LEGENDA_RAILROADS),
      MK(0x98, STR_SMALLMAP_LEGENDA_STATIONS_AIRPORTS_DOCKS),
      MK(0xB5, STR_SMALLMAP_LEGENDA_BUILDINGS_INDUSTRIES),
      MK(0x0F, STR_SMALLMAP_LEGENDA_VEHICLES),

    }

Legend text giving the colours to look for on the minimap.

Definition at line 78 of file smallmap_gui.cpp.

const LegendAndColour _legend_land_owners[]`[static]`

Initial value:

     {
      MK(0xCA, STR_SMALLMAP_LEGENDA_WATER),
      MK(0x54, STR_SMALLMAP_LEGENDA_NO_OWNER),
      MK(0xB4, STR_SMALLMAP_LEGENDA_TOWNS),
      MK(0x20, STR_SMALLMAP_LEGENDA_INDUSTRIES),

    }

Definition at line 134 of file smallmap_gui.cpp.

const LegendAndColour _legend_routes[]`[static]`

Initial value:

     {
      MK(0xD7, STR_SMALLMAP_LEGENDA_ROADS),
      MK(0x0A, STR_SMALLMAP_LEGENDA_RAILROADS),
      MK(0xB5, STR_SMALLMAP_LEGENDA_BUILDINGS_INDUSTRIES),

      MS(0x56, STR_SMALLMAP_LEGENDA_RAILROAD_STATION),
      MK(0xC2, STR_SMALLMAP_LEGENDA_TRUCK_LOADING_BAY),
      MK(0xBF, STR_SMALLMAP_LEGENDA_BUS_STATION),
      MK(0xB8, STR_SMALLMAP_LEGENDA_AIRPORT_HELIPORT),
      MK(0x98, STR_SMALLMAP_LEGENDA_DOCK),

    }

Definition at line 105 of file smallmap_gui.cpp.

const LegendAndColour* const _legend_table[]`[static]`

Initial value:

     {
      _legend_land_contours,
      _legend_vehicles,
      _legend_from_industries,
      _legend_routes,
      _legend_vegetation,
      _legend_land_owners,
    }

Definition at line 184 of file smallmap_gui.cpp.

const LegendAndColour _legend_vegetation[]`[static]`

Initial value:

     {
      MK(0x52, STR_SMALLMAP_LEGENDA_ROUGH_LAND),
      MK(0x54, STR_SMALLMAP_LEGENDA_GRASS_LAND),
      MK(0x37, STR_SMALLMAP_LEGENDA_BARE_LAND),
      MK(0x25, STR_SMALLMAP_LEGENDA_FIELDS),
      MK(0x57, STR_SMALLMAP_LEGENDA_TREES),
      MK(0xD0, STR_SMALLMAP_LEGENDA_FOREST),

      MS(0x0A, STR_SMALLMAP_LEGENDA_ROCKS),
      MK(0xC2, STR_SMALLMAP_LEGENDA_DESERT),
      MK(0x98, STR_SMALLMAP_LEGENDA_SNOW),
      MK(0xD7, STR_SMALLMAP_LEGENDA_TRANSPORT_ROUTES),
      MK(0xB5, STR_SMALLMAP_LEGENDA_BUILDINGS_INDUSTRIES),

    }

Definition at line 118 of file smallmap_gui.cpp.

const LegendAndColour _legend_vehicles[]`[static]`

Initial value:

     {
      MK(0xB8, STR_SMALLMAP_LEGENDA_TRAINS),
      MK(0xBF, STR_SMALLMAP_LEGENDA_ROAD_VEHICLES),
      MK(0x98, STR_SMALLMAP_LEGENDA_SHIPS),
      MK(0x0F, STR_SMALLMAP_LEGENDA_AIRCRAFT),

      MS(0xD7, STR_SMALLMAP_LEGENDA_TRANSPORT_ROUTES),
      MK(0xB5, STR_SMALLMAP_LEGENDA_BUILDINGS_INDUSTRIES),

    }

Definition at line 94 of file smallmap_gui.cpp.

const NWidgetPart _nested_smallmap_bar[]`[static]`

Initial value:

     {
      NWidget(WWT_PANEL, COLOUR_BROWN),
        NWidget(NWID_HORIZONTAL),
          NWidget(WWT_EMPTY, INVALID_COLOUR, SM_WIDGET_LEGEND), SetResize(1, 1),
          NWidget(NWID_VERTICAL),

            NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
              NWidget(WWT_PUSHIMGBTN, COLOUR_BROWN, SM_WIDGET_ZOOM_IN), SetDataTip(SPR_IMG_ZOOMIN, STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_IN),
              NWidget(WWT_PUSHIMGBTN, COLOUR_BROWN, SM_WIDGET_CENTERMAP), SetDataTip(SPR_IMG_SMALLMAP, STR_SMALLMAP_CENTER),
              NWidget(WWT_IMGBTN, COLOUR_BROWN, SM_WIDGET_CONTOUR), SetDataTip(SPR_IMG_SHOW_COUNTOURS, STR_SMALLMAP_TOOLTIP_SHOW_LAND_CONTOURS_ON_MAP),
              NWidget(WWT_IMGBTN, COLOUR_BROWN, SM_WIDGET_VEHICLES), SetDataTip(SPR_IMG_SHOW_VEHICLES, STR_SMALLMAP_TOOLTIP_SHOW_VEHICLES_ON_MAP),
              NWidget(WWT_IMGBTN, COLOUR_BROWN, SM_WIDGET_INDUSTRIES), SetDataTip(SPR_IMG_INDUSTRY, STR_SMALLMAP_TOOLTIP_SHOW_INDUSTRIES_ON_MAP),
            EndContainer(),

            NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
              NWidget(WWT_PUSHIMGBTN, COLOUR_BROWN, SM_WIDGET_ZOOM_OUT), SetDataTip(SPR_IMG_ZOOMOUT, STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_OUT),
              NWidget(WWT_IMGBTN, COLOUR_BROWN, SM_WIDGET_TOGGLETOWNNAME), SetDataTip(SPR_IMG_TOWN, STR_SMALLMAP_TOOLTIP_TOGGLE_TOWN_NAMES_ON_OFF),
              NWidget(WWT_IMGBTN, COLOUR_BROWN, SM_WIDGET_ROUTES), SetDataTip(SPR_IMG_SHOW_ROUTES, STR_SMALLMAP_TOOLTIP_SHOW_TRANSPORT_ROUTES_ON),
              NWidget(WWT_IMGBTN, COLOUR_BROWN, SM_WIDGET_VEGETATION), SetDataTip(SPR_IMG_PLANTTREES, STR_SMALLMAP_TOOLTIP_SHOW_VEGETATION_ON_MAP),
              NWidget(WWT_IMGBTN, COLOUR_BROWN, SM_WIDGET_OWNERS), SetDataTip(SPR_IMG_COMPANY_GENERAL, STR_SMALLMAP_TOOLTIP_SHOW_LAND_OWNERS_ON_MAP),
            EndContainer(),
            NWidget(NWID_SPACER), SetResize(0, 1),
          EndContainer(),
        EndContainer(),
      EndContainer(),
    }

Widget parts of the smallmap legend bar + image buttons.

Definition at line 1420 of file smallmap_gui.cpp.

const NWidgetPart _nested_smallmap_display[]`[static]`

Initial value:

     {
      NWidget(WWT_PANEL, COLOUR_BROWN, SM_WIDGET_MAP_BORDER),
        NWidget(WWT_INSET, COLOUR_BROWN, SM_WIDGET_MAP), SetMinimalSize(346, 140), SetResize(1, 1), SetPadding(2, 2, 2, 2), EndContainer(),
      EndContainer(),
    }

Widget parts of the smallmap display.

Definition at line 1413 of file smallmap_gui.cpp.

const NWidgetPart _nested_smallmap_widgets[]`[static]`

Initial value:

     {
      NWidget(NWID_HORIZONTAL),
        NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
        NWidget(WWT_CAPTION, COLOUR_BROWN, SM_WIDGET_CAPTION), SetDataTip(STR_SMALLMAP_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
        NWidget(WWT_SHADEBOX, COLOUR_BROWN),
        NWidget(WWT_STICKYBOX, COLOUR_BROWN),
      EndContainer(),
      NWidgetFunction(SmallMapDisplay),

      NWidget(NWID_HORIZONTAL),
        NWidget(WWT_PANEL, COLOUR_BROWN),
          NWidget(NWID_HORIZONTAL),
            NWidget(NWID_SELECTION, INVALID_COLOUR, SM_WIDGET_SELECTINDUSTRIES),
              NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
                NWidget(WWT_TEXTBTN, COLOUR_BROWN, SM_WIDGET_ENABLEINDUSTRIES), SetDataTip(STR_SMALLMAP_ENABLE_ALL, STR_SMALLMAP_TOOLTIP_ENABLE_ALL),
                NWidget(WWT_TEXTBTN, COLOUR_BROWN, SM_WIDGET_DISABLEINDUSTRIES), SetDataTip(STR_SMALLMAP_DISABLE_ALL, STR_SMALLMAP_TOOLTIP_DISABLE_ALL),
                NWidget(WWT_TEXTBTN, COLOUR_BROWN, SM_WIDGET_SHOW_HEIGHT), SetDataTip(STR_SMALLMAP_SHOW_HEIGHT, STR_SMALLMAP_TOOLTIP_SHOW_HEIGHT),
              EndContainer(),
              NWidget(NWID_SPACER), SetFill(1, 1),
            EndContainer(),
            NWidget(NWID_SPACER), SetFill(1, 0), SetResize(1, 0),
          EndContainer(),
        EndContainer(),
        NWidget(WWT_RESIZEBOX, COLOUR_BROWN),
      EndContainer(),
    }

Definition at line 1457 of file smallmap_gui.cpp.

const AndOr _smallmap_contours_andor[]`[static]`

Initial value:

     {
      {MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
      {MKCOLOUR(0x000A0A00), MKCOLOUR(0xFF0000FF)},
      {MKCOLOUR(0x00D7D700), MKCOLOUR(0xFF0000FF)},
      {MKCOLOUR(0x00B5B500), MKCOLOUR(0xFF0000FF)},
      {MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
      {MKCOLOUR(0x98989898), MKCOLOUR(0x00000000)},
      {MKCOLOUR(0xCACACACA), MKCOLOUR(0x00000000)},
      {MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
      {MKCOLOUR(0xB5B5B5B5), MKCOLOUR(0x00000000)},
      {MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
      {MKCOLOUR(0x00B5B500), MKCOLOUR(0xFF0000FF)},
      {MKCOLOUR(0x000A0A00), MKCOLOUR(0xFF0000FF)},
    }

Colour masks for "Contour" and "Routes" modes.

Definition at line 292 of file smallmap_gui.cpp.

bool _smallmap_industry_show_heightmap`[static]`

Show heightmap in industry mode of smallmap window.

Definition at line 152 of file smallmap_gui.cpp.

Referenced by GetSmallMapIndustriesPixels(), and SmallMapWindow::OnClick().

const AndOr _smallmap_vehicles_andor[]`[static]`

Initial value:

     {
      {MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
      {MKCOLOUR(0x00D7D700), MKCOLOUR(0xFF0000FF)},
      {MKCOLOUR(0x00D7D700), MKCOLOUR(0xFF0000FF)},
      {MKCOLOUR(0x00B5B500), MKCOLOUR(0xFF0000FF)},
      {MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
      {MKCOLOUR(0x00D7D700), MKCOLOUR(0xFF0000FF)},
      {MKCOLOUR(0xCACACACA), MKCOLOUR(0x00000000)},
      {MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
      {MKCOLOUR(0xB5B5B5B5), MKCOLOUR(0x00000000)},
      {MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
      {MKCOLOUR(0x00B5B500), MKCOLOUR(0xFF0000FF)},
      {MKCOLOUR(0x00D7D700), MKCOLOUR(0xFF0000FF)},
    }

Colour masks for "Vehicles", "Industry", and "Vegetation" modes.

Definition at line 308 of file smallmap_gui.cpp.

const byte _tiletype_importance[]`[static]`

Initial value:

     {
      2,
      8,
      7,
      5,
      2,
      9,
      2,
      1,
      6,
      8,
      2,
      0,
    }

Mapping of tile type to importance of the tile (higher number means more interesting to show).

Definition at line 324 of file smallmap_gui.cpp.

const uint32 _vegetation_clear_bits[]`[static]`

Initial value:

     {
      MKCOLOUR(0x54545454),
      MKCOLOUR(0x52525252),
      MKCOLOUR(0x0A0A0A0A),
      MKCOLOUR(0x25252525),
      MKCOLOUR(0x98989898),
      MKCOLOUR(0xC2C2C2C2),
      MKCOLOUR(0x54545454),
      MKCOLOUR(0x54545454),
    }

Definition at line 438 of file smallmap_gui.cpp.

const byte _vehicle_type_colours[6]`[static]`

Initial value:

     {
      184, 191, 152, 15, 215, 184
    }

Vehicle colours in SMT_VEHICLES mode.

Indexed by VehicleTypeByte.

Definition at line 504 of file smallmap_gui.cpp.

const uint32 _violet_map_heights[]`[static]`

Initial value:

     {
      MKCOLOUR(0x80808080),
      MKCOLOUR(0x80818081),
      MKCOLOUR(0x81818181),
      MKCOLOUR(0x81828182),
      MKCOLOUR(0x82828282),
      MKCOLOUR(0x82838283),
      MKCOLOUR(0x83838383),
      MKCOLOUR(0x83848384),
      MKCOLOUR(0x84848484),
      MKCOLOUR(0x84858485),
      MKCOLOUR(0x85858585),
      MKCOLOUR(0x85868586),
      MKCOLOUR(0x86868686),
      MKCOLOUR(0x86878687),
      MKCOLOUR(0x87878787),
      MKCOLOUR(0x87878787),
    }

Height map colours for the violet colour scheme, ordered by height.

Definition at line 238 of file smallmap_gui.cpp.