mirror of https://github.com/OpenTTD/OpenTTD
(svn r4319) -Codechange: Station map accessors
parent
4fdb25e65b
commit
9760d3dccf
|
@ -1926,11 +1926,11 @@ static void DrawTile_Station(TileInfo *ti)
|
||||||
|
|
||||||
relocation = GetCustomStationRelocation(statspec, st, 0);
|
relocation = GetCustomStationRelocation(statspec, st, 0);
|
||||||
//debug("Relocation %d", relocation);
|
//debug("Relocation %d", relocation);
|
||||||
t = &statspec->renderdata[ti->map5];
|
t = &statspec->renderdata[GetStationGfx(ti->tile)];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (t == NULL) t = &_station_display_datas[ti->map5];
|
if (t == NULL) t = &_station_display_datas[GetStationGfx(ti->tile)];
|
||||||
|
|
||||||
image = t->ground_sprite;
|
image = t->ground_sprite;
|
||||||
if (image & PALETTE_MODIFIER_COLOR) image |= image_or_modificator;
|
if (image & PALETTE_MODIFIER_COLOR) image |= image_or_modificator;
|
||||||
|
|
|
@ -223,6 +223,12 @@ static inline uint GetCustomStationSprite(TileIndex t)
|
||||||
return _m[t].m4;
|
return _m[t].m4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline byte GetStationGfx(TileIndex t)
|
||||||
|
{
|
||||||
|
assert(IsTileType(t, MP_STATION));
|
||||||
|
return _m[t].m5;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline void MakeStation(TileIndex t, Owner o, StationID sid, byte m5)
|
static inline void MakeStation(TileIndex t, Owner o, StationID sid, byte m5)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue