From eef0109949508c1bdfbaeb56d9661e1ad9ca47e4 Mon Sep 17 00:00:00 2001 From: frosch Date: Mon, 28 Apr 2025 16:08:56 +0200 Subject: [PATCH] Codechange: Replace a magic value with a maybe less magical constant. --- src/newgrf_station.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp index 28e81f7ee8..485df62210 100644 --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -633,14 +633,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; } /**