1
0
Fork 0

Codechange: NewGRF varaction parameter is 32 bit.

pull/13309/head
Peter Nelson 2025-01-10 18:35:12 +00:00
parent 348e6b7f82
commit 0a99bf7091
No known key found for this signature in database
GPG Key ID: 8EF8F0A467DF75ED
4 changed files with 5 additions and 5 deletions

View File

@ -113,7 +113,7 @@ struct BaseStation : StationPool::PoolItem<&_station_pool> {
* @param available will return false if ever the variable asked for does not exist
* @return the value stored in the corresponding variable
*/
virtual uint32_t GetNewGRFVariable(const struct ResolverObject &object, uint8_t variable, uint8_t parameter, bool &available) const = 0;
virtual uint32_t GetNewGRFVariable(const struct ResolverObject &object, uint8_t variable, uint32_t parameter, bool &available) const = 0;
/**
* Update the coordinated of the sign (as shown in the viewport).

View File

@ -404,7 +404,7 @@ TownScopeResolver *StationResolverObject::GetTown()
return this->st->GetNewGRFVariable(this->ro, variable, parameter, available);
}
uint32_t Station::GetNewGRFVariable(const ResolverObject &object, uint8_t variable, uint8_t parameter, bool &available) const
uint32_t Station::GetNewGRFVariable(const ResolverObject &object, uint8_t variable, uint32_t parameter, bool &available) const
{
switch (variable) {
case 0x48: { // Accepted cargo types
@ -470,7 +470,7 @@ uint32_t Station::GetNewGRFVariable(const ResolverObject &object, uint8_t variab
return UINT_MAX;
}
uint32_t Waypoint::GetNewGRFVariable(const ResolverObject &, uint8_t variable, [[maybe_unused]] uint8_t parameter, bool &available) const
uint32_t Waypoint::GetNewGRFVariable(const ResolverObject &, uint8_t variable, [[maybe_unused]] uint32_t parameter, bool &available) const
{
switch (variable) {
case 0x48: return 0; // Accepted cargo types

View File

@ -573,7 +573,7 @@ public:
return IsAirportTile(tile) && GetStationIndex(tile) == this->index;
}
uint32_t GetNewGRFVariable(const ResolverObject &object, uint8_t variable, uint8_t parameter, bool &available) const override;
uint32_t GetNewGRFVariable(const ResolverObject &object, uint8_t variable, uint32_t parameter, bool &available) const override;
void GetTileArea(TileArea *ta, StationType type) const override;
};

View File

@ -41,7 +41,7 @@ struct Waypoint final : SpecializedStation<Waypoint, true> {
return IsRailWaypointTile(tile) && GetStationIndex(tile) == this->index;
}
uint32_t GetNewGRFVariable(const struct ResolverObject &object, uint8_t variable, uint8_t parameter, bool &available) const override;
uint32_t GetNewGRFVariable(const struct ResolverObject &object, uint8_t variable, uint32_t parameter, bool &available) const override;
void GetTileArea(TileArea *ta, StationType type) const override;