summaryrefslogtreecommitdiff
path: root/src/newgrf_town.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-02-25 13:48:23 +0000
committerfrosch <frosch@openttd.org>2008-02-25 13:48:23 +0000
commit93b3a666783318cc6b979d8142826c7e0769bb9c (patch)
tree8f3a8a6f61821bc9f52b593886c7b89a8958d786 /src/newgrf_town.cpp
parentc2f3e0e3264aa173e85a07741c2082372b016d06 (diff)
downloadopenttd-93b3a666783318cc6b979d8142826c7e0769bb9c.tar.xz
(svn r12247) -Fix (r9315): Town variables 0x9E to 0xAD (company ratings) returned wrong values.
Diffstat (limited to 'src/newgrf_town.cpp')
-rw-r--r--src/newgrf_town.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/newgrf_town.cpp b/src/newgrf_town.cpp
index ebf771ab2..223be9803 100644
--- a/src/newgrf_town.cpp
+++ b/src/newgrf_town.cpp
@@ -47,13 +47,21 @@ uint32 TownGetVariable(byte variable, byte parameter, bool *available, const Tow
case 0x9C: return t->radius[4];
case 0x9D: return GB(t->radius[4], 8, 8);
case 0x9E: return t->ratings[0];
- case 0x9F: return t->ratings[1];
- case 0xA0: return t->ratings[2];
- case 0xA1: return t->ratings[3];
- case 0xA2: return t->ratings[4];
- case 0xA3: return t->ratings[5];
- case 0xA4: return t->ratings[6];
- case 0xA5: return t->ratings[7];
+ case 0x9F: return GB(t->ratings[0], 8, 8);
+ case 0xA0: return t->ratings[1];
+ case 0xA1: return GB(t->ratings[1], 8, 8);
+ case 0xA2: return t->ratings[2];
+ case 0xA3: return GB(t->ratings[2], 8, 8);
+ case 0xA4: return t->ratings[3];
+ case 0xA5: return GB(t->ratings[3], 8, 8);
+ case 0xA6: return t->ratings[4];
+ case 0xA7: return GB(t->ratings[4], 8, 8);
+ case 0xA8: return t->ratings[5];
+ case 0xA9: return GB(t->ratings[5], 8, 8);
+ case 0xAA: return t->ratings[6];
+ case 0xAB: return GB(t->ratings[6], 8, 8);
+ case 0xAC: return t->ratings[7];
+ case 0xAD: return GB(t->ratings[7], 8, 8);
case 0xAE: return t->have_ratings;
case 0xB2: return t->statues;
case 0xB6: return t->num_houses;