diff options
author | peter1138 <peter1138@openttd.org> | 2006-11-28 21:03:28 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2006-11-28 21:03:28 +0000 |
commit | 86d4052b1e1c4d9df2caf84956c8e47378607fad (patch) | |
tree | 5a357ebccac82da73d3ad28972ceccb578bef15e /newgrf_station.c | |
parent | 3311f57b207bff2e46e76c46b38e014fafcee5e3 (diff) | |
download | openttd-86d4052b1e1c4d9df2caf84956c8e47378607fad.tar.xz |
(svn r7282) -Fix (r625): ttdpatch vars are little endian
Diffstat (limited to 'newgrf_station.c')
-rw-r--r-- | newgrf_station.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/newgrf_station.c b/newgrf_station.c index 04688821d..043fe113d 100644 --- a/newgrf_station.c +++ b/newgrf_station.c @@ -371,7 +371,7 @@ static uint32 StationGetVariable(const ResolverObject *object, byte variable, by case 0xF2: return st->truck_stops->status; case 0xF3: return st->bus_stops->status; case 0xF6: return st->airport_flags; - case 0xF7: return st->airport_flags & 0xFF; + case 0xF7: return GB(st->airport_flags, 8, 8); case 0xFA: return max(st->build_date - DAYS_TILL_ORIGINAL_BASE_YEAR, 0); } @@ -380,7 +380,7 @@ static uint32 StationGetVariable(const ResolverObject *object, byte variable, by const GoodsEntry *g = &st->goods[GB(variable - 0x8C, 3, 4)]; switch (GB(variable - 0x8C, 0, 3)) { case 0: return g->waiting_acceptance; - case 1: return g->waiting_acceptance & 0xFF; + case 1: return GB(g->waiting_acceptance, 8, 8); case 2: return g->days_since_pickup; case 3: return g->rating; case 4: return g->enroute_from; |