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

Function GetFeature

src/newgrf_debug_gui.cpp:240–244  ·  view source on GitHub ↗

* Get the NIFeature related to the window number. * @param window_number The window to get the NIFeature for. * @return the NIFeature, or nullptr is there isn't one. */

Source from the content-addressed store, hash-verified

238 * @return the NIFeature, or nullptr is there isn't one.
239 */
240static inline const NIFeature *GetFeature(uint window_number)
241{
242 GrfSpecFeature idx = GetFeatureNum(window_number);
243 return idx < GSF_FAKE_END ? _nifeatures[idx] : nullptr;
244}
245
246/**
247 * Get the NIHelper related to the window number.

Callers 4

DrawMainPanelWidgetMethod · 0.85
OnClickMethod · 0.85
IsNewGRFInspectableFunction · 0.85

Calls 1

GetFeatureNumFunction · 0.85

Tested by

no test coverage detected