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

Method DrawType

src/road_gui.cpp:1262–1272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1260 }
1261
1262 void DrawType(int x, int y, int cls_id, int id) const override
1263 {
1264 const auto *spec = this->GetSpec(cls_id, id);
1265 if (spec == nullptr) {
1266 StationPickerDrawSprite(x, y, roadstoptype == RoadStopType::Bus ? StationType::Bus : StationType::Truck, INVALID_RAILTYPE, _cur_roadtype, _roadstop_gui.orientation);
1267 } else {
1268 DiagDirection orientation = _roadstop_gui.orientation;
1269 if (orientation < DIAGDIR_END && spec->flags.Test(RoadStopSpecFlag::DriveThroughOnly)) orientation = DIAGDIR_END;
1270 DrawRoadStopTile(x, y, _cur_roadtype, spec, roadstoptype == RoadStopType::Bus ? StationType::Bus : StationType::Truck, (uint8_t)orientation);
1271 }
1272 }
1273
1274 void FillUsedItems(std::set<PickerItem> &items) override
1275 {

Callers

nothing calls this directly

Calls 4

StationPickerDrawSpriteFunction · 0.85
DrawRoadStopTileFunction · 0.85
TestMethod · 0.80
GetSpecMethod · 0.45

Tested by

no test coverage detected