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

Function ResolveObject

src/settingentry_gui.cpp:249–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247}
248
249const void *ResolveObject(const GameSettings *settings_ptr, const IntSettingDesc *sd)
250{
251 if (sd->flags.Test(SettingFlag::PerCompany)) {
252 if (Company::IsValidID(_local_company) && _game_mode != GM_MENU) {
253 return &Company::Get(_local_company)->settings;
254 }
255 return &_settings_client.company;
256 }
257 return settings_ptr;
258}
259
260/**
261 * Function to draw setting value (button + text + current value)

Callers 3

DrawSettingMethod · 0.85
OptionsPanelClickMethod · 0.85

Calls 1

TestMethod · 0.80

Tested by

no test coverage detected