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

Function GetSurname

src/strings.cpp:1960–1964  ·  view source on GitHub ↗

* Get the surname of the president with the given seed. * @param seed The seed the surname was generated from. * @return The surname. */

Source from the content-addressed store, hash-verified

1958 * @return The surname.
1959 */
1960static std::string_view GetSurname(uint32_t seed)
1961{
1962 auto surname_options = GetSurnameOptions();
1963 return surname_options[surname_options.size() * GB(seed, 16, 8) >> 8];
1964}
1965
1966static void GenAndCoName(StringBuilder &builder, uint32_t seed)
1967{

Callers 2

GenAndCoNameFunction · 0.85
GenPresidentNameFunction · 0.85

Calls 3

GetSurnameOptionsFunction · 0.85
GBFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected