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

Method ResolveNewGRFID

src/script/api/script_industrytype.cpp:160–166  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

158}
159
160/* static */ IndustryType ScriptIndustryType::ResolveNewGRFID(SQInteger grfid, SQInteger grf_local_id)
161{
162 EnforcePrecondition(IT_INVALID, IsInsideBS(grf_local_id, 0x00, NUM_INDUSTRYTYPES_PER_GRF));
163
164 grfid = std::byteswap(GB(grfid, 0, 32)); // Match people's expectations.
165 return _industry_mngr.GetID(grf_local_id, grfid);
166}

Callers

nothing calls this directly

Calls 4

IsInsideBSFunction · 0.85
byteswapFunction · 0.85
GBFunction · 0.85
GetIDMethod · 0.45

Tested by

no test coverage detected