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

Function GetStringTab

src/strings_func.h:22–28  ·  view source on GitHub ↗

* Extract the StringTab from a StringID. * @param str String identifier * @return StringTab from \a str */

Source from the content-addressed store, hash-verified

20 * @return StringTab from \a str
21 */
22inline StringTab GetStringTab(StringID str)
23{
24 StringTab result = (StringTab)(str >> TAB_SIZE_BITS);
25 if (result >= TEXT_TAB_NEWGRF_START) return TEXT_TAB_NEWGRF_START;
26 if (result >= TEXT_TAB_GAMESCRIPT_START) return TEXT_TAB_GAMESCRIPT_START;
27 return result;
28}
29
30/**
31 * Extract the StringIndex from a StringID.

Callers 8

GetStringPtrFunction · 0.85
GetStringWithArgsFunction · 0.85
FormatStringFunction · 0.85
GetStringIndexFunction · 0.85
StringToErrorMethod · 0.85
CopyFromOldNameFunction · 0.85
LoadMethod · 0.85
LoadCheckMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected