mirror of https://github.com/OpenTTD/OpenTTD.git
Codechange: Use SQInteger for generic numbers in script_industrytype
This commit is contained in:
parent
6671994655
commit
5eaf9d39bf
|
@ -156,10 +156,10 @@
|
|||
return (::GetIndustrySpec(industry_type)->behaviour & INDUSTRYBEH_AI_AIRSHIP_ROUTES) != 0;
|
||||
}
|
||||
|
||||
/* static */ IndustryType ScriptIndustryType::ResolveNewGRFID(uint32 grfid, uint16 grf_local_id)
|
||||
/* static */ IndustryType ScriptIndustryType::ResolveNewGRFID(SQInteger grfid, SQInteger grf_local_id)
|
||||
{
|
||||
EnforcePrecondition(INVALID_INDUSTRYTYPE, IsInsideBS(grf_local_id, 0x00, NUM_INDUSTRYTYPES_PER_GRF));
|
||||
|
||||
grfid = BSWAP32(grfid); // Match people's expectations.
|
||||
grfid = BSWAP32(GB(grfid, 0, 32)); // Match people's expectations.
|
||||
return _industry_mngr.GetID(grf_local_id, grfid);
|
||||
}
|
||||
|
|
|
@ -189,7 +189,7 @@ public:
|
|||
* @pre 0x00 <= grf_local_id < NUM_INDUSTRYTYPES_PER_GRF.
|
||||
* @return the industry-type ID, local to the current game (this diverges from the grf_local_id).
|
||||
*/
|
||||
static IndustryType ResolveNewGRFID(uint32 grfid, uint16 grf_local_id);
|
||||
static IndustryType ResolveNewGRFID(SQInteger grfid, SQInteger grf_local_id);
|
||||
};
|
||||
|
||||
#endif /* SCRIPT_INDUSTRYTYPE_HPP */
|
||||
|
|
Loading…
Reference in New Issue