summaryrefslogtreecommitdiff
path: root/station_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-10-11 13:54:21 +0000
committertron <tron@openttd.org>2005-10-11 13:54:21 +0000
commitf556128dde898016c4f5ea3087509882f6437b2f (patch)
tree9f0604075083d2ae2a82e369ecf7a836c04021b5 /station_gui.c
parent4eb7a0ac6b5c1cc42e04803633b5f9d3e47f6e10 (diff)
downloadopenttd-f556128dde898016c4f5ea3087509882f6437b2f.tar.xz
(svn r3030) More work for GB/SB, this time concerning the waiting_acceptance attribute of stations
Diffstat (limited to 'station_gui.c')
-rw-r--r--station_gui.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/station_gui.c b/station_gui.c
index be1376b32..97b8c9ae6 100644
--- a/station_gui.c
+++ b/station_gui.c
@@ -188,7 +188,7 @@ static void PlayerStationsWndProc(Window *w, WindowEvent *e)
// show cargo waiting and station ratings
for(j=0; j!=NUM_CARGO; j++) {
- int acc = (st->goods[j].waiting_acceptance & 0xFFF);
+ int acc = GB(st->goods[j].waiting_acceptance, 0, 12);
if (acc != 0) {
StationsWndShowStationRating(x, y, j, acc, st->goods[j].rating);
x += 10;
@@ -324,7 +324,7 @@ static void DrawStationViewWindow(Window *w)
num = 1;
for(i=0; i!=NUM_CARGO; i++) {
- if ((st->goods[i].waiting_acceptance & 0xFFF) != 0) {
+ if (GB(st->goods[i].waiting_acceptance, 0, 12) != 0) {
num++;
if (st->goods[i].enroute_from != station_id)
num++;
@@ -351,8 +351,7 @@ static void DrawStationViewWindow(Window *w)
if (--pos < 0) {
str = STR_00D0_NOTHING;
for(i=0; i!=NUM_CARGO; i++)
- if (st->goods[i].waiting_acceptance & 0xFFF)
- str = STR_EMPTY;
+ if (GB(st->goods[i].waiting_acceptance, 0, 12) != 0) str = STR_EMPTY;
SetDParam(0, str);
DrawString(x, y, STR_0008_WAITING, 0);
y += 10;
@@ -360,7 +359,7 @@ static void DrawStationViewWindow(Window *w)
i = 0;
do {
- uint waiting = (st->goods[i].waiting_acceptance & 0xFFF);
+ uint waiting = GB(st->goods[i].waiting_acceptance, 0, 12);
if (waiting == 0)
continue;