1
0
Fork 0

Codechange: Replace a magic value with a maybe less magical constant.

pull/14151/head
frosch 2025-04-28 16:08:56 +02:00 committed by frosch
parent 360670626b
commit 7b08170ac8
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}
/**