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

Method DrawType

src/object_gui.cpp:96–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94 }
95
96 void DrawType(int x, int y, int cls_id, int id) const override
97 {
98 const auto *spec = this->GetSpec(cls_id, id);
99 if (!spec->grf_prop.HasGrfFile()) {
100 extern const DrawTileSpriteSpan _objects[];
101 const DrawTileSprites *dts = &_objects[spec->grf_prop.local_id];
102 DrawOrigTileSeqInGUI(x, y, dts, PAL_NONE);
103 } else {
104 DrawNewObjectTileInGUI(x, y, spec, std::min<int>(_object_gui.sel_view, spec->views - 1));
105 }
106 }
107
108 void FillUsedItems(std::set<PickerItem> &items) override
109 {

Callers

nothing calls this directly

Calls 4

DrawOrigTileSeqInGUIFunction · 0.85
DrawNewObjectTileInGUIFunction · 0.85
HasGrfFileMethod · 0.80
GetSpecMethod · 0.45

Tested by

no test coverage detected