Codechange: Use SQInteger for generic numbers in script_newgrf

This commit is contained in:
glx22
2023-03-04 15:52:47 +01:00
committed by Loïc Guilloux
parent ca67075397
commit f22903ab14
2 changed files with 9 additions and 9 deletions

View File

@@ -24,9 +24,9 @@ ScriptNewGRFList::ScriptNewGRFList()
}
}
/* static */ bool ScriptNewGRF::IsLoaded(uint32 grfid)
/* static */ bool ScriptNewGRF::IsLoaded(SQInteger grfid)
{
grfid = BSWAP32(grfid); // Match people's expectations.
grfid = BSWAP32(GB(grfid, 0, 32)); // Match people's expectations.
for (auto c = _grfconfig; c != nullptr; c = c->next) {
if (!HasBit(c->flags, GCF_STATIC) && c->ident.grfid == grfid) {
@@ -37,9 +37,9 @@ ScriptNewGRFList::ScriptNewGRFList()
return false;
}
/* static */ uint32 ScriptNewGRF::GetVersion(uint32 grfid)
/* static */ SQInteger ScriptNewGRF::GetVersion(SQInteger grfid)
{
grfid = BSWAP32(grfid); // Match people's expectations.
grfid = BSWAP32(GB(grfid, 0, 32)); // Match people's expectations.
for (auto c = _grfconfig; c != nullptr; c = c->next) {
if (!HasBit(c->flags, GCF_STATIC) && c->ident.grfid == grfid) {
@@ -50,9 +50,9 @@ ScriptNewGRFList::ScriptNewGRFList()
return 0;
}
/* static */ char *ScriptNewGRF::GetName(uint32 grfid)
/* static */ char *ScriptNewGRF::GetName(SQInteger grfid)
{
grfid = BSWAP32(grfid); // Match people's expectations.
grfid = BSWAP32(GB(grfid, 0, 32)); // Match people's expectations.
for (auto c = _grfconfig; c != nullptr; c = c->next) {
if (!HasBit(c->flags, GCF_STATIC) && c->ident.grfid == grfid) {