From 93b3a666783318cc6b979d8142826c7e0769bb9c Mon Sep 17 00:00:00 2001 From: frosch Date: Mon, 25 Feb 2008 13:48:23 +0000 Subject: (svn r12247) -Fix (r9315): Town variables 0x9E to 0xAD (company ratings) returned wrong values. --- src/newgrf_town.cpp | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'src') 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; -- cgit v1.2.3-70-g09d2