mirror of https://github.com/OpenTTD/OpenTTD
Codechange: Replace a magic value with a maybe less magical constant.
parent
360670626b
commit
7b08170ac8
|
@ -635,14 +635,14 @@ StationResolverObject::StationResolverObject(const StationSpec *statspec, BaseSt
|
|||
* @param st Station (nullptr in GUI)
|
||||
* @param tile Station tile being drawn (INVALID_TILE in GUI)
|
||||
* @param var10 Value to put in variable 10; normally 0; 1 when resolving the groundsprite and StationSpecFlag::SeparateGround is set.
|
||||
* @return First sprite of the Action 1 spriteset to use, minus an offset of 0x42D to accommodate for weird NewGRF specs.
|
||||
* @return First sprite of the Action 1 spriteset to use, minus an offset of SPR_RAIL_PLATFORM_Y_FRONT (0x42D) to accommodate for weird NewGRF specs.
|
||||
*/
|
||||
SpriteID GetCustomStationRelocation(const StationSpec *statspec, BaseStation *st, TileIndex tile, uint32_t var10)
|
||||
{
|
||||
StationResolverObject object(statspec, st, tile, CBID_NO_CALLBACK, var10);
|
||||
const SpriteGroup *group = object.Resolve();
|
||||
if (group == nullptr || group->type != SGT_RESULT) return 0;
|
||||
return group->GetResult() - 0x42D;
|
||||
return group->GetResult() - SPR_RAIL_PLATFORM_Y_FRONT;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue