1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-18 01:42:38 +01:00

Codefix: Sprite offsets and counts are not SpriteIDs. (#13336)

This commit is contained in:
Peter Nelson
2025-01-19 15:58:13 +00:00
committed by GitHub
parent 0aa9faf187
commit d22fd78b1c
4 changed files with 24 additions and 24 deletions

View File

@@ -442,9 +442,9 @@ void DrawFoundation(TileInfo *ti, Foundation f)
if (!HasFoundationNE(ti->tile, slope, z)) sprite_block += 2;
/* Use the original slope sprites if NW and NE borders should be visible */
SpriteID leveled_base = (sprite_block == 0 ? (int)SPR_FOUNDATION_BASE : (SPR_SLOPES_VIRTUAL_BASE + sprite_block * SPR_TRKFOUND_BLOCK_SIZE));
SpriteID inclined_base = SPR_SLOPES_VIRTUAL_BASE + SPR_SLOPES_INCLINED_OFFSET + sprite_block * SPR_TRKFOUND_BLOCK_SIZE;
SpriteID halftile_base = SPR_HALFTILE_FOUNDATION_BASE + sprite_block * SPR_HALFTILE_BLOCK_SIZE;
SpriteID leveled_base = (sprite_block == 0 ? (int)SPR_FOUNDATION_BASE : (SPR_SLOPES_VIRTUAL_BASE + sprite_block * TRKFOUND_BLOCK_SIZE));
SpriteID inclined_base = SPR_SLOPES_VIRTUAL_BASE + SLOPES_INCLINED_OFFSET + sprite_block * TRKFOUND_BLOCK_SIZE;
SpriteID halftile_base = SPR_HALFTILE_FOUNDATION_BASE + sprite_block * HALFTILE_BLOCK_SIZE;
if (IsSteepSlope(ti->tileh)) {
if (!IsNonContinuousFoundation(f)) {