summaryrefslogtreecommitdiff
path: root/src/smallmap_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-11-07 17:59:51 +0000
committerrubidium <rubidium@openttd.org>2008-11-07 17:59:51 +0000
commit0b3706a8d390e97c2d39f901977b414a5440d174 (patch)
treec380e6faa058315b7e8b64e8999b7750c233e297 /src/smallmap_gui.cpp
parent157d107f2a3a77b0b7835f555802fec10cab36bb (diff)
downloadopenttd-0b3706a8d390e97c2d39f901977b414a5440d174.tar.xz
(svn r14566) -Fix [FS#2397]: RV's go via order would reserve a slot at the 'via' station which it never uses, which makes it unlikely that it reserves a slot for the next station and that makes queueing fail (Aali)
Diffstat (limited to 'src/smallmap_gui.cpp')
-rw-r--r--src/smallmap_gui.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp
index 5c993cc2c..4eaf50926 100644
--- a/src/smallmap_gui.cpp
+++ b/src/smallmap_gui.cpp
@@ -383,6 +383,20 @@ static inline uint32 GetSmallMapIndustriesPixels(TileIndex tile)
return ApplyMask(MKCOLOR(0x54545454), &_smallmap_vehicles_andor[t]);
}
+#define MK(x) MKCOLOR(x << 24 | x << 16 | x << 8 | x)
+
+static const uint32 _busyness[] = {
+ MK(15),
+ MK(150),
+ MK(209),
+ MK(206),
+ MK(191),
+ MK(186),
+ MK(184),
+ MK(180),
+};
+
+
/**
* Return the color a tile would be displayed with in the small map in mode "Routes".
*
@@ -405,7 +419,7 @@ static inline uint32 GetSmallMapRoutesPixels(TileIndex tile)
}
} else {
/* ground color */
- bits = ApplyMask(MKCOLOR(0x54545454), &_smallmap_contours_andor[t]);
+ bits = ApplyMask(t == MP_RAILWAY ? _busyness[CountBits(GetStat(tile))] : MKCOLOR(0x54545454), &_smallmap_contours_andor[t]);
}
return bits;
}