mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-29 01:19:11 +00:00
Codechange: Rename DrawRoadAsSnowDesert to DrawRoadAsSnowOrDesert to be consistent with other functions.
This commit is contained in:
@@ -1356,7 +1356,7 @@ static uint GetRoadSpriteOffset(Slope slope, RoadBits bits)
|
|||||||
* @param roadside What sort of road this is
|
* @param roadside What sort of road this is
|
||||||
* @return True if snow/desert road sprites should be used.
|
* @return True if snow/desert road sprites should be used.
|
||||||
*/
|
*/
|
||||||
static bool DrawRoadAsSnowDesert(bool snow_or_desert, Roadside roadside)
|
static bool DrawRoadAsSnowOrDesert(bool snow_or_desert, Roadside roadside)
|
||||||
{
|
{
|
||||||
return (snow_or_desert &&
|
return (snow_or_desert &&
|
||||||
!(_settings_game.game_creation.landscape == LandscapeType::Tropic && HasGrfMiscBit(GrfMiscBit::DesertPavedRoads) &&
|
!(_settings_game.game_creation.landscape == LandscapeType::Tropic && HasGrfMiscBit(GrfMiscBit::DesertPavedRoads) &&
|
||||||
@@ -1556,7 +1556,7 @@ static SpriteID GetRoadGroundSprite(const TileInfo *ti, Roadside roadside, const
|
|||||||
{
|
{
|
||||||
/* Draw bare ground sprite if no road or road uses overlay system. */
|
/* Draw bare ground sprite if no road or road uses overlay system. */
|
||||||
if (rti == nullptr || rti->UsesOverlay()) {
|
if (rti == nullptr || rti->UsesOverlay()) {
|
||||||
if (DrawRoadAsSnowDesert(snow_or_desert, roadside)) {
|
if (DrawRoadAsSnowOrDesert(snow_or_desert, roadside)) {
|
||||||
return SPR_FLAT_SNOW_DESERT_TILE + SlopeToSpriteOffset(ti->tileh);
|
return SPR_FLAT_SNOW_DESERT_TILE + SlopeToSpriteOffset(ti->tileh);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1571,7 +1571,7 @@ static SpriteID GetRoadGroundSprite(const TileInfo *ti, Roadside roadside, const
|
|||||||
|
|
||||||
/* Draw original road base sprite */
|
/* Draw original road base sprite */
|
||||||
SpriteID image = SPR_ROAD_Y + offset;
|
SpriteID image = SPR_ROAD_Y + offset;
|
||||||
if (DrawRoadAsSnowDesert(snow_or_desert, roadside)) {
|
if (DrawRoadAsSnowOrDesert(snow_or_desert, roadside)) {
|
||||||
image += 19;
|
image += 19;
|
||||||
} else {
|
} else {
|
||||||
switch (roadside) {
|
switch (roadside) {
|
||||||
@@ -1720,7 +1720,7 @@ static void DrawTile_Road(TileInfo *ti)
|
|||||||
SpriteID image = SPR_ROAD_Y + axis;
|
SpriteID image = SPR_ROAD_Y + axis;
|
||||||
|
|
||||||
Roadside roadside = GetRoadside(ti->tile);
|
Roadside roadside = GetRoadside(ti->tile);
|
||||||
if (DrawRoadAsSnowDesert(IsOnSnow(ti->tile), roadside)) {
|
if (DrawRoadAsSnowOrDesert(IsOnSnow(ti->tile), roadside)) {
|
||||||
image += 19;
|
image += 19;
|
||||||
} else {
|
} else {
|
||||||
switch (roadside) {
|
switch (roadside) {
|
||||||
@@ -1736,7 +1736,7 @@ static void DrawTile_Road(TileInfo *ti)
|
|||||||
if (IsCrossingBarred(ti->tile)) image += 2;
|
if (IsCrossingBarred(ti->tile)) image += 2;
|
||||||
|
|
||||||
Roadside roadside = GetRoadside(ti->tile);
|
Roadside roadside = GetRoadside(ti->tile);
|
||||||
if (DrawRoadAsSnowDesert(IsOnSnow(ti->tile), roadside)) {
|
if (DrawRoadAsSnowOrDesert(IsOnSnow(ti->tile), roadside)) {
|
||||||
image += 8;
|
image += 8;
|
||||||
} else {
|
} else {
|
||||||
switch (roadside) {
|
switch (roadside) {
|
||||||
|
Reference in New Issue
Block a user