MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / SetOverlayCargoMask

Method SetOverlayCargoMask

src/smallmap_gui.cpp:1255–1262  ·  view source on GitHub ↗

* Set the link graph overlay cargo mask from the legend. */

Source from the content-addressed store, hash-verified

1253 * Set the link graph overlay cargo mask from the legend.
1254 */
1255 void SetOverlayCargoMask()
1256 {
1257 CargoTypes cargo_mask = 0;
1258 for (int i = 0; i != _smallmap_cargo_count; ++i) {
1259 if (_legend_linkstats[i].show_on_map) SetBit(cargo_mask, _legend_linkstats[i].type);
1260 }
1261 this->overlay->SetCargoMask(cargo_mask);
1262 }
1263
1264 /**
1265 * Function to set up widgets depending on the information being shown on the smallmap.

Callers 2

SmallMapWindowMethod · 0.95
OnClickMethod · 0.95

Calls 2

SetBitFunction · 0.85
SetCargoMaskMethod · 0.80

Tested by

no test coverage detected