1336 if (callback != CALLBACK_FAILED) tile = callback; |
1334 if (callback != CALLBACK_FAILED) tile = callback; |
1337 } |
1335 } |
1338 |
1336 |
1339 if (statspec->renderdata == NULL) { |
1337 if (statspec->renderdata == NULL) { |
1340 cust = GetStationTileLayout(tile); |
1338 cust = GetStationTileLayout(tile); |
1341 relocation -= 0x42D; |
|
1342 } else { |
1339 } else { |
1343 cust = &statspec->renderdata[(tile < statspec->tiles ? tile : 0) + GetWaypointAxis(ti->tile)]; |
1340 cust = &statspec->renderdata[(tile < statspec->tiles ? tile : 0) + GetWaypointAxis(ti->tile)]; |
1344 } |
1341 } |
1345 |
1342 |
1346 /* If there is no sprite layout, we fall back to the default waypoint graphics. */ |
1343 /* If there is no sprite layout, we fall back to the default waypoint graphics. */ |
1347 if (cust != NULL && cust->seq != NULL) { |
1344 if (cust != NULL && cust->seq != NULL) { |
1348 image = cust->ground_sprite; |
1345 image = cust->ground_sprite; |
1349 image += (image < _custom_sprites_base) ? rti->total_offset : rti->custom_ground_offset; |
1346 if (HASBIT(image, 31)) { |
|
1347 CLRBIT(image, 31); |
|
1348 image += GetCustomStationGroundRelocation(statspec, st, ti->tile); |
|
1349 image += rti->custom_ground_offset; |
|
1350 } else { |
|
1351 image += rti->total_offset; |
|
1352 } |
1350 |
1353 |
1351 DrawGroundSprite(image); |
1354 DrawGroundSprite(image); |
1352 |
1355 |
1353 if (GetRailType(ti->tile) == RAILTYPE_ELECTRIC) DrawCatenary(ti); |
1356 if (GetRailType(ti->tile) == RAILTYPE_ELECTRIC) DrawCatenary(ti); |
1354 |
1357 |